/* App frame of BN-SYS (picture 01d/02d): dark sidebar with icons, white top bar, page header, buttons.
   Taken from design/mockups/bnsys/app-shell.css; prototype-only parts (fake links, draft ribbon) left out. */
a { color: var(--brand-dark); }
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

/* --- sidebar --- */
.side { background: var(--sidebar-bg); color: var(--sidebar-ink); display: flex; flex-direction: column; }
.side__logo { margin: 16px 16px 6px; background: #fff; border-radius: var(--radius); padding: 10px 12px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.side__logo img { height: 26px; }
.side__logo span { font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .06em; color: var(--brand-dark); }
.side__group { padding: 14px 16px 4px; font-size: var(--fs-2xs); font-weight: 600; color: var(--sidebar-soft); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 10px; margin: 1px 10px; padding: 8px 10px; border-radius: var(--radius); font-size: var(--fs-md); color: var(--sidebar-ink); text-decoration: none; }
a.nav:hover { background: rgba(255, 255, 255, .06); }
.nav i { font-size: var(--fs-2xl); color: var(--sidebar-soft); }
.nav--active { background: rgba(255, 255, 255, .10); box-shadow: inset 3px 0 0 var(--bn-purple-500); font-weight: 600; }
.nav--active i { color: #fff; }
.nav--muted { color: var(--sidebar-soft); }
.nav--muted small { margin-left: auto; font-size: var(--fs-2xs); }
.side__user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .10); font-size: var(--fs-sm); }
.side__user small { display: block; color: var(--sidebar-soft); font-size: var(--fs-xs); }
.side__user form { margin-left: auto; }
.side__logout { display: grid; place-items: center; width: var(--control-h); height: var(--control-h); border: 0; border-radius: var(--radius); background: transparent; color: var(--sidebar-soft); font-size: var(--fs-2xl); cursor: pointer; }
.side__logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ini { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-2xs); font-weight: 700; background: #ece2f6; color: var(--brand-dark); }

/* --- top bar --- */
.main { display: flex; flex-direction: column; min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.crumbs { font-size: var(--fs-sm); color: var(--ink-soft); }
.crumbs b { color: var(--ink); font-weight: 600; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: var(--fs-sm); color: var(--ink-soft); }
.content { padding: 18px 24px 20px; }

/* --- page header ("pagehead": Phosphor owns the .ph class) --- */
.pagehead { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.pagehead h1 { margin: 0; font-size: var(--fs-5xl); font-weight: 700; letter-spacing: -.01em; }
.pagehead p { margin: 3px 0 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.pagehead__actions { margin-left: auto; display: flex; gap: 8px; }

/* --- buttons --- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: var(--control-h); padding: 0 14px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius); white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(.97); }
.btn i { font-size: var(--fs-xl); }
.btn--primary { background: var(--brand); border-color: var(--brand-dark); color: #fff; }

/* --- messages (refaat-team:user-friendly-errors: visible where the user acted) --- */
.alert { display: flex; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--error-line); border-radius: var(--radius); background: var(--error-bg); color: var(--error-ink); font-size: var(--fs-sm); line-height: 1.45; }
.alert i { font-size: var(--fs-2xl); flex: none; }
.alert--ok { border-color: #9fd3b0; background: #e8f5ec; color: #1d6b3a; }

/* --- staging server (BNSYS_UMGEBUNG=test): always visible, never mistaken for the real system --- */
.env-banner { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 12px; border-bottom: 1px solid var(--attention-line); background: var(--attention-bg);
  color: var(--attention-ink); font-size: var(--fs-sm); font-weight: 600; }
.env-banner i { font-size: var(--fs-xl); }
