/* ════════════════════════════════════════════════════════════════════════════
   App shell — same structure and look as the company «new shell»: white sidebar 264 / rail 68 / drawer on phones,
   fixed white top bar, quick search Ctrl+K, home with tiles. The current item is the only coloured thing in the menu.
   ════════════════════════════════════════════════════════════════════════════ */

.sh { min-height: 100vh; }
.sh.rail { --side-w: 68px; }

/* ── sidebar: white, a hairline on its edge, the current item in a soft accent ── */
.sh-side {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1200;
    width: var(--side-w); display: flex; flex-direction: column;
    background: var(--surface); color: var(--text); border-inline-end: 1px solid var(--border);
    transition: width .18s var(--ease);
}
.sh-brand { flex: none; height: var(--top-h); display: flex; align-items: center; gap: 10px; padding-inline: 16px 10px; border-bottom: 1px solid var(--border); }
.sh-logo { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }
.sh-name { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.sh-name b { font-size: 15px; font-weight: 700; color: var(--heading); letter-spacing: .2px; }
.sh-name small { font-size: 11px; color: var(--text-3); }
.sh-collapse { width: 30px; height: 30px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); display: grid; place-items: center; padding: 0; }
.sh-collapse:hover { background: var(--surface-inset); color: var(--text); }

.sh-jump {
    flex: none; margin: 12px 12px 6px; height: 38px; display: flex; align-items: center; gap: 8px; padding-inline: 10px;
    border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); color: var(--text-3); font-size: 13px; text-align: start;
}
.sh-jump:hover { border-color: var(--field-border); color: var(--text-2); }
.sh-jump span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-kbd { flex: none; font-family: var(--mono); font-size: 10.5px; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface-sunken); color: var(--text-3); direction: ltr; line-height: 1; }

.sh-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 12px; }
.sh-label { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.sh-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.sh-link {
    position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 36px; padding: 6px 10px;
    border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; text-align: start; text-decoration: none;
}
.sh-link:hover { background: var(--surface-inset); color: var(--text); text-decoration: none; }
.sh-link .ag-i { color: var(--text-3); }
.sh-link .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-link .cnt { flex: none; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-inset); color: var(--text-2); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.sh-link .cnt.hot { background: var(--danger-bg); color: var(--danger); }
.sh-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sh-link.active .ag-i { color: var(--accent); }

.sh-foot { flex: none; padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.sh-me { display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 10px; }
.sh-me .ag-av { background: var(--accent-tint); color: var(--accent); }
.sh-me-tx { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.sh-me-tx b { font-size: 13px; color: var(--heading); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-me-tx small { font-size: 11.5px; color: var(--text-3); }

/* rail */
.sh.rail .sh-name, .sh.rail .sh-jump span, .sh.rail .sh-jump .sh-kbd, .sh.rail .sh-label, .sh.rail .sh-link .lbl,
.sh.rail .sh-link .cnt, .sh.rail .sh-me-tx { display: none; }
.sh.rail .sh-brand { justify-content: center; padding: 0; flex-direction: column; gap: 4px; height: auto; padding-block: 10px; }
.sh.rail .sh-jump { width: 44px; margin-inline: auto; justify-content: center; padding: 0; }
.sh.rail .sh-link { justify-content: center; padding: 6px 0; }
.sh.rail .sh-nav { padding-inline: 8px; }
.sh.rail .sh-me { justify-content: center; }

/* ── top bar ── */
.sh-top {
    position: fixed; top: 0; inset-inline-start: var(--side-w); inset-inline-end: 0; z-index: 1100;
    height: var(--top-h); display: flex; align-items: center; gap: 10px; padding-inline: 20px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: inset-inline-start .18s var(--ease);
}
.sh-menu-btn { display: none; }
.sh-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.sh-crumb a { color: var(--text-2); }
.sh-crumb a:hover { color: var(--accent-text); }
.sh-crumb b { color: var(--heading); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.sh-crumb .sep { color: var(--border-strong); }
.sh-top-acts { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.sh-ctx { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding-inline: 10px; margin-inline-end: 6px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-sunken); color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap; }

/* ── main ── */
.sh-main { margin-inline-start: var(--side-w); padding-top: var(--top-h); min-height: 100vh; transition: margin-inline-start .18s var(--ease); }
.sh-body { padding: 24px 28px 40px; max-width: 1480px; margin-inline: auto; }

/* phones / tablets: the sidebar is a drawer */
.sh-scrim { display: none; }
@media (max-width: 960px) {
    .sh { --side-w: 0px; }
    .sh-side { width: 264px; transform: translateX(100%); transition: transform .2s var(--ease); box-shadow: var(--shadow-pop); }
    [dir="ltr"] .sh-side { transform: translateX(-100%); }
    .sh.drawer-open .sh-side { transform: none; }
    .sh.drawer-open .sh-scrim { display: block; position: fixed; inset: 0; z-index: 1150; background: var(--overlay); }
    .sh-menu-btn { display: inline-grid; }
    .sh-collapse { display: none; }
    .sh-body { padding: 16px; }
    .sh-ctx { display: none; }
}

/* ── quick search (Ctrl+K) ── */
.qs-wrap { position: fixed; inset: 0; z-index: 1800; display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; background: var(--overlay); animation: ag-fade .12s var(--ease); }
.qs { width: min(620px, calc(100% - 32px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden; animation: ag-pop .16s var(--ease); }
.qs-head { flex: none; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.qs-head input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--text); }
.qs-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.qs-g { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.qs-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; text-align: start; color: var(--text); }
.qs-row .ag-sq { width: 32px; height: 32px; border-radius: 8px; }
.qs-row.on, .qs-row:hover { background: var(--accent-soft); }
.qs-row .tx { flex: 1; display: grid; min-width: 0; }
.qs-row .tx b { font-weight: 500; font-size: 14px; }
.qs-row .tx small { font-size: 12px; color: var(--text-3); }
.qs-empty { padding: 28px 16px; text-align: center; color: var(--text-3); }
.qs-foot { flex: none; display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--border); background: var(--surface-sunken); font-size: 12px; color: var(--text-3); }
.qs-foot kbd { font-family: var(--mono); font-size: 10.5px; padding: 2px 5px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface); margin-inline-end: 4px; }

/* ── notification bell ── */
.nb { position: relative; }
.nb-away { position: fixed; inset: 0; z-index: 1300; }
.nb-pop { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 1301; width: min(380px, calc(100vw - 24px));
          background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; animation: ag-pop .14s var(--ease); }
.nb-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.nb-list { max-height: 420px; overflow-y: auto; }
.nb-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: start; color: var(--text); }
.nb-item:hover { background: var(--surface-sunken); }
.nb-item.unread { background: var(--accent-soft); }
.nb-dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.nb-item.unread .nb-dot { background: var(--accent); }
.nb-tx { display: grid; gap: 2px; min-width: 0; }
.nb-tx b { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.nb-item.unread .nb-tx b { font-weight: 600; }
.nb-tx small { font-size: 12px; color: var(--text-2); }
.nb-tx small.muted { color: var(--text-3); }
.nb-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 16px; color: var(--text-3); font-size: 13px; }
.nb-all { display: block; padding: 10px; text-align: center; font-size: 13px; border-top: 1px solid var(--border); }
