/* ==========================================================================
   ANDEL Admin v2 — shared Classic app shell (sidebar)
   Canon: prototype app shell (232px sidebar, mobile bottom bar).
   Tokens come from admin_v2.css (A1). Used by Demo Hub and Dashboard.
   ========================================================================== */

.classic-shell {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 100vh;
    align-items: start;
}
/* Every content child (not the sidebar) must be able to shrink inside its grid
   track. Without min-width:0 a wide panel blows the track out and overflows the
   page. Generalised so surfaces added later (Command Center, Relationship,
   Cognitive, Memory Intake) inherit the guard instead of re-declaring it. */
.classic-shell > :not(.c-sidebar) {
    min-width: 0;
}

.c-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.c-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; border-bottom: 1px solid var(--border-subtle); }
.c-brand-mark {
    width: 28px; height: 28px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, var(--brand), var(--brand-hi));
    display: grid; place-items: center;
    color: #fff; font-weight: 700; font-size: 14px;
}
.c-brand b { font-size: 15px; letter-spacing: 0.02em; display: block; }
.c-brand span { display: block; font-size: 11px; color: var(--text-muted); }

.c-nav { display: flex; flex-direction: column; gap: 2px; }
.c-nav-eyebrow {
    font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-muted); padding: 8px 8px 4px;
}
.c-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13px;
    transition: background 120ms cubic-bezier(0.2, 0, 0, 1), color 120ms cubic-bezier(0.2, 0, 0, 1);
}
.c-nav-item svg { flex: none; opacity: 0.75; }
.c-nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); text-decoration: none; }
.c-nav-item[aria-current="page"] {
    background: var(--blue-soft);
    color: var(--text-primary);
    box-shadow: inset 2px 0 0 var(--blue);
}
.c-nav-item[aria-current="page"] svg { opacity: 1; color: var(--blue); }
.c-nav-chip { margin-left: auto; }
.c-nav-foot { margin-top: auto; border-top: 1px solid var(--border-subtle); padding-top: 12px; }
/* Legacy Admin note: a full-width muted subtitle under its row — not an
   unstyled <small> squeezed after the chip and bleeding out of the fixed
   232px sidebar. */
.c-nav-foot .c-nav-item { flex-wrap: wrap; }
.c-nav-note {
    flex-basis: 100%;
    margin: 2px 0 0 26px;
    font-size: 10.5px;
    line-height: 1.35;
    color: var(--text-muted);
}

/* Mobile companion: fixed bottom bar, horizontal items */
@media (max-width: 880px) {
    .classic-shell { grid-template-columns: 1fr; }
    .c-sidebar {
        position: fixed; inset: auto 0 0 0; top: auto;
        height: auto; z-index: 60;
        flex-direction: row; align-items: center; gap: 2px;
        padding: 6px; overflow-x: auto; overflow-y: hidden;
        border-right: none; border-top: 1px solid var(--border-light);
    }
    .c-brand, .c-nav-eyebrow, .c-nav-foot, .c-nav-chip { display: none; }
    .c-nav { flex-direction: row; }
    .c-nav-item { flex-direction: column; gap: 3px; font-size: 10px; padding: 6px 10px; white-space: nowrap; }
    /* keep content clear of the fixed bottom bar on every Classic surface */
    .classic-shell > :not(.c-sidebar) { padding-bottom: 72px; }
}

/* Locked (owner-only) items for anonymous visitors */
.c-nav-item--locked { opacity: 0.5; cursor: not-allowed; }
.c-nav-item--locked:hover { background: none; color: var(--text-secondary); }
