/* app shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: var(--s-4) var(--s-3); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s-4); }
.sidebar .logo { padding: var(--s-1) var(--s-2); }
.nav { display: grid; gap: 2px; } .nav-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: var(--s-3) var(--s-2) var(--s-1); }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--muted); font-weight: 550; font-size: .92rem; }
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary-soft-text); font-weight: 650; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.sidebar { gap: var(--s-3); } .nav { flex: 1; align-content: start; }
.nav-label { padding-top: var(--s-4); }
.sidebar-foot { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.sidebar-foot .meta { display: grid; min-width: 0; line-height: 1.25; } .sidebar-foot strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sidebar-foot small { color: var(--muted); font-size: .74rem; }
.topbar-title { display: grid; line-height: 1.2; margin-right: var(--s-2); } .topbar-title strong { font-size: 1rem; } .topbar-title .muted { font-size: .76rem; }
.bell { position: relative; } .bell .dot { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
:root[data-theme="dark"] .bell .dot { color: #1a0a0a; }
.nav-link svg { flex: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: var(--s-2); padding: .55rem var(--s-6); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar .chip { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: .25rem .6rem; border-radius: 999px; }
.spacer { flex: 1; } .user { display: flex; align-items: center; gap: var(--s-2); } .user .name { font-size: .88rem; font-weight: 600; line-height: 1.2; } .user .role { font-size: .75rem; color: var(--muted); }
.content { padding: var(--s-8) var(--s-8) var(--s-6); max-width: 1440px; width: 100%; }
.footer { padding: var(--s-4) var(--s-6); color: var(--muted); font-size: .8rem; border-top: 1px solid var(--border); margin-top: auto; }
.menu-btn { display: none; } .scrim { display: none; }
@media (max-width: 1024px) and (min-width: 861px) { /* tablet: icon rail */
  .shell { grid-template-columns: 68px 1fr; } .sidebar .logo span, .nav-link span, .nav-label { display: none; } .nav-link { justify-content: center; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40; transform: translateX(-100%); transition: transform var(--t); }
  .nav-open .sidebar { transform: none; } .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(14, 21, 24, .5); z-index: 30; }
  .menu-btn { display: inline-flex; } .topbar-title .muted, .topbar .chip { display: none; } .content { padding: var(--s-4); } .topbar { padding: .5rem var(--s-4); }
}
/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1fr) 1fr; }
.auth-form { display: grid; place-items: center; padding: var(--s-6); background: var(--bg); }
.auth-box { width: 100%; max-width: 380px; display: grid; gap: var(--s-5); }
.auth-aside { background: var(--primary-700); color: #fff; padding: var(--s-8); display: grid; align-content: space-between; }
:root[data-theme="dark"] .auth-aside { background: var(--primary-soft); color: var(--text); }
.auth-aside h2 { font-size: 2rem; max-width: 18ch; line-height: 1.15; } .auth-aside p { opacity: .9; max-width: 42ch; margin-top: var(--s-3); }
.auth-points { display: grid; gap: var(--s-3); list-style: none; padding: 0; margin: 0; } .auth-points li { display: flex; gap: var(--s-3); align-items: center; opacity: .95; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }
/* system pages */
.system { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6); text-align: center; }
.system .code { font-size: 4.5rem; font-weight: 800; color: var(--primary); letter-spacing: -.04em; line-height: 1; }
