/* Stage 2 application shell: authenticated routes only. */
body.admin-page { background: var(--surface-canvas); background-image: none; color: var(--text-primary); }

/* Legacy header becomes a non-box; shell chrome is fixed-position. */
body.admin-page .header, body.admin-page .header .container { display: contents; }
body.admin-page .header .logo-link { display: none; }

/* Sidebar */
body.admin-page .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 55; width: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 20px 12px 24px; background: var(--nav-canvas); }
body.admin-page .sidebar-brand { padding: 4px 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
body.admin-page .sidebar-logo { display: block; width: 128px; height: auto; }
body.admin-page .app-sidebar .admin-drawer-head { display: none; }
body.admin-page .app-sidebar .sidenav-label { padding: 8px 12px 6px; color: var(--nav-text-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
body.admin-page .app-sidebar .sidenav-links { display: flex; flex-direction: column; gap: 2px; }
body.admin-page .app-sidebar .nav-item { display: flex; min-height: 38px; align-items: center; padding: 8px 12px; color: var(--nav-text-muted); border-left: 2px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 500; text-decoration: none; }
body.admin-page .app-sidebar .nav-item:hover { color: var(--nav-text); background: var(--nav-hover); }
body.admin-page .app-sidebar .nav-item:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
body.admin-page .app-sidebar .nav-item.active { color: var(--nav-text); background: rgba(125,193,66,.13); border-left-color: var(--brand-primary); font-weight: 700; }

/* Top bar */
body.admin-page .app-topbar { position: fixed; inset: 0 0 auto 240px; z-index: 60; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: var(--surface-base); border-bottom: 1px solid var(--border-subtle); }
body.admin-page .admin-menu-toggle { display: none; }
body.admin-page .topbar-brand-logo { display: none; }
body.admin-page .admin-header-context { color: var(--text-primary); font-size: 15px; font-weight: 600; }
body.admin-page .app-topbar .notif-bell-wrap { margin-left: auto; }
body.admin-page .notif-bell { width: 44px; height: 44px; background: transparent; color: var(--text-secondary); border: 1px solid var(--border-default); border-radius: 6px; box-shadow: none; }
body.admin-page .notif-bell:hover { background: var(--surface-hover); transform: none; box-shadow: none; }

/* Content + footer */
body.admin-page .main-content { margin-left: 240px; padding-top: 60px; min-height: calc(100vh - 60px); background: var(--surface-canvas); }
body.admin-page .main-content > .container { max-width: none; padding: 28px 32px; }
body.admin-page .footer { display: none; }
body.admin-page .admin-nav-scrim { display: none; }

@media (max-width: 767px) {
    /* Charcoal app bar */
    body.admin-page .app-topbar { inset: 0; height: 56px; padding: 0 10px; background: var(--nav-canvas); border-bottom: 1px solid rgba(255,255,255,0.08); }
    body.admin-page .admin-menu-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 0; color: var(--nav-text); border-radius: 6px; }
    body.admin-page .topbar-brand-logo { display: block; width: 96px; height: auto; }
    body.admin-page .admin-header-context { display: none; }
    body.admin-page .notif-bell { width: 44px; height: 44px; color: var(--nav-text); border-color: rgba(255,255,255,0.16); }
    body.admin-page .notif-bell:hover { background: rgba(255,255,255,0.08); }

    /* Drawer */
    body.admin-page .app-sidebar { width: min(88vw, 320px); z-index: 80; transform: translateX(-105%); transition: transform .22s ease; padding: 16px 12px 24px; }
    body.admin-page .app-sidebar.is-open { transform: translateX(0); }
    body.admin-page .app-sidebar .sidebar-brand { display:none; }
    body.admin-page .app-sidebar .admin-drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 4px 4px 12px 8px; color: var(--nav-text); }
    body.admin-page .app-sidebar .admin-drawer-head::before { content:""; display:block; width:104px; height:30px; background:url("/static/simco-logo-trimmed.png") left center/contain no-repeat; }
    body.admin-page .app-sidebar .admin-drawer-head strong { display:none; }
    body.admin-page .admin-drawer-close { background: transparent; border: 0; color: var(--nav-text); font-size: 24px; width: 44px; height: 44px; border-radius: 6px; cursor: pointer; }
    body.admin-page .app-sidebar .nav-item { min-height: 44px; }
    body.admin-page .admin-nav-scrim { display: block; position: fixed; inset: 0; z-index: 75; background: rgba(0,0,0,0.45); }
    body.admin-page .admin-nav-scrim[hidden] { display: none; }

    body.admin-page .main-content { margin-left: 0; padding-top: 56px; }
    body.admin-page .main-content > .container { padding: 16px 12px; }
}

/* Sidebar brand subtitle, account footer, breadcrumb (Design Bible v1.0) */
body.admin-page .sidebar-brand-sub { margin-top:6px; color:var(--nav-text-muted); font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
body.admin-page .sidebar-account { margin-top:auto; display:flex; align-items:center; gap:10px; padding:12px; border-top:1px solid rgba(255,255,255,0.08); }
body.admin-page .sidebar-avatar { flex:0 0 32px; width:32px; height:32px; border-radius:50%; background:var(--surface-base); color:var(--nav-canvas); font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; }
body.admin-page .sidebar-account-meta { display:flex; flex-direction:column; min-width:0; }
body.admin-page .sidebar-account-meta strong { color:var(--nav-text); font-size:13px; font-weight:600; line-height:1.2; }
body.admin-page .sidebar-account-meta span { color:var(--nav-text-muted); font-size:11px; }
body.admin-page .sidebar-logout { margin-left:auto; display:flex; align-items:center; justify-content:center; width:36px; height:36px; color:var(--nav-text-muted); border-radius:6px; }
body.admin-page .sidebar-logout:hover { color:var(--nav-text); background:var(--nav-hover); }
body.admin-page .sidebar-logout:focus-visible { outline:2px solid var(--brand-primary); outline-offset:-2px; }
body.admin-page .admin-header-context .crumb-group { color:var(--text-muted); font-weight:500; }
body.admin-page .admin-header-context .crumb-sep { margin:0 8px; color:var(--text-disabled); font-weight:400; }
body.admin-page .admin-header-context .crumb-page { color:var(--text-primary); font-weight:600; }
body.admin-page .app-sidebar .sidenav-label, body.admin-page .app-sidebar .nav-item { text-align: left; }
