/* =============================================================================
   MNPS Action Tracker — liquid-glass design system v2
   -----------------------------------------------------------------------------
   Dark-first. Floating glass panels with gradient light edges, specular sheens,
   layered depth shadows, and an animated teal/gold ambient field behind it all.
   Brand: Metro Nashville Public Schools — teal + gold.
   Theming via <html data-theme="dark|light"> (dark is the default).
   ============================================================================= */

:root {
    /* Brand constants — azure + gold, matched to the district wallpaper artwork */
    --mnps-teal: #1E7CB8;
    --mnps-gold: #F2AE1C;

    --blur: blur(18px) saturate(1.5);
    --blur-soft: blur(12px) saturate(1.4);
    --r-lg: 24px;
    --r-md: 18px;
    --r-sm: 14px;
}

/* ------------------------------- DARK (default) --------------------------- */
:root,
:root[data-theme="dark"] {
    --bg-base: #070d17;
    --text: #EAF3F9;
    --text-muted: #8FA7B8;
    --border: rgba(255, 255, 255, .09);

    --glass: rgba(17, 32, 48, .52);
    --glass-strong: rgba(23, 41, 60, .72);
    --glass-soft: rgba(17, 32, 48, .32);
    --edge-hi: rgba(255, 255, 255, .30);
    --edge-lo: rgba(255, 255, 255, .05);
    --sheen: rgba(255, 255, 255, .09);
    --inner-light: rgba(255, 255, 255, .13);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .38), 0 14px 36px -8px rgba(0, 0, 0, .58);
    --shadow-2: 0 3px 6px rgba(0, 0, 0, .45), 0 28px 68px -12px rgba(0, 0, 0, .72);

    --primary: #4AA3E0;
    --primary-hover: #6DB9EC;
    --primary-soft: rgba(74, 163, 224, .17);
    /* wallpaper fade veils — heavy enough that content stays razor legible */
    --bg-veil: rgba(5, 10, 18, .87);
    --bg-veil-2: rgba(5, 10, 18, .94);
    --bg-veil-auth: rgba(5, 10, 18, .78);
    --bg-veil-auth-2: rgba(5, 10, 18, .88);
    --gold: #F5B62E;
    --gold-soft: rgba(245, 182, 46, .16);
    --danger: #F26F68;
    --danger-soft: rgba(242, 111, 104, .15);

    --sidebar-text: #94ACBC;
    --sidebar-text-active: #FFFFFF;

    --st-new: #4AA3E0;
    --st-progress: #F5B62E;
    --st-blocked: #F26F68;
    --st-done: #47C489;
    --st-cancelled: #7F96A3;

    --pr-low: #7F96A3;
    --pr-medium: #4AA3E0;
    --pr-high: #F2913E;
    --pr-critical: #F26F68;

    --orb-teal: rgba(30, 124, 184, .28);
    --orb-gold: rgba(242, 174, 28, .17);
    --dots: rgba(255, 255, 255, .05);

    /* near-opaque glass for high-count scroll-path elements (no backdrop-filter) */
    --glass-opaque-top: rgba(27, 45, 64, .92);
    --glass-opaque: rgba(18, 32, 47, .92);
}

/* --------------------------------- LIGHT ---------------------------------- */
:root[data-theme="light"] {
    --bg-base: #E7EFF5;
    --text: #0D2836;
    --text-muted: #4D6B7C;
    --border: rgba(13, 60, 84, .13);

    --glass: rgba(255, 255, 255, .58);
    --glass-strong: rgba(255, 255, 255, .80);
    --glass-soft: rgba(255, 255, 255, .40);
    --edge-hi: rgba(255, 255, 255, .95);
    --edge-lo: rgba(255, 255, 255, .30);
    --sheen: rgba(255, 255, 255, .35);
    --inner-light: rgba(255, 255, 255, .85);

    --shadow-1: 0 1px 2px rgba(10, 55, 75, .09), 0 14px 36px -8px rgba(10, 55, 75, .20);
    --shadow-2: 0 3px 6px rgba(10, 55, 75, .12), 0 28px 68px -12px rgba(10, 55, 75, .30);

    --primary: #1D6FA8;
    --primary-hover: #16577F;
    --primary-soft: rgba(29, 111, 168, .14);
    --bg-veil: rgba(231, 239, 245, .93);
    --bg-veil-2: rgba(231, 239, 245, .965);
    --bg-veil-auth: rgba(231, 239, 245, .88);
    --bg-veil-auth-2: rgba(231, 239, 245, .94);
    --gold: #E7A414;
    --gold-soft: rgba(231, 164, 20, .18);
    --danger: #D4403A;
    --danger-soft: rgba(212, 64, 58, .12);

    --sidebar-text: #3D5D6C;
    --sidebar-text-active: #0D2836;

    --st-new: #1E7CB8;
    --st-progress: #DD9A10;
    --st-blocked: #DE4B45;
    --st-done: #2E9E68;
    --st-cancelled: #7E95A2;

    --pr-low: #7E95A2;
    --pr-medium: #1E7CB8;
    --pr-high: #DE7B12;
    --pr-critical: #DE4B45;

    --orb-teal: rgba(30, 124, 184, .24);
    --orb-gold: rgba(242, 174, 28, .30);
    --dots: rgba(13, 60, 84, .06);

    --glass-opaque-top: rgba(255, 255, 255, .96);
    --glass-opaque: rgba(247, 250, 253, .93);
}

/* ---------- typography: Poppins (self-hosted, latin subset) ---------- */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/poppins-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/poppins-800.woff2') format('woff2');
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI Variable Text', 'Segoe UI', system-ui,
        -apple-system, 'Helvetica Neue', sans-serif;
    background: var(--bg-base);
    color: var(--text);
    transition: color .35s ease;
    min-height: 100vh;
}

/* District wallpaper + veil + dot grid: one STATIC composited fixed layer.
   (background-attachment: fixed forces full repaints on scroll — this doesn't.) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(var(--dots) 1px, transparent 1.5px) 0 0 / 28px 28px,
        linear-gradient(180deg, var(--bg-veil), var(--bg-veil-2)),
        url('../img/brand-bg.svg') center / cover no-repeat;
    transform: translateZ(0);
}

/* Ambient orbs drift on the compositor (transform-only animation) */
body::after {
    content: "";
    position: fixed;
    inset: -14%;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(52rem 38rem at 12% 4%, var(--orb-teal), transparent 62%),
        radial-gradient(46rem 34rem at 90% -6%, var(--orb-gold), transparent 60%),
        radial-gradient(56rem 42rem at 80% 98%, var(--orb-teal), transparent 62%),
        radial-gradient(38rem 30rem at -2% 84%, var(--orb-gold), transparent 58%);
    animation: ambient-drift 46s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
    to { transform: translate3d(3%, -2.5%, 0) scale(1.07); }
}

@media (prefers-reduced-motion: reduce) {
    body::before { animation: none; }
}

h1 { font-size: 1.85rem; margin: 0; letter-spacing: -.015em; font-weight: 700; }
h1:focus { outline: none; }
h2 { font-size: 1.25rem; margin: 1.8rem 0 .9rem; letter-spacing: -.015em; font-weight: 700; }
h3 { font-size: 1.05rem; margin: 0; font-weight: 700; }
a { color: var(--primary); text-decoration: none; }
pre { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: .88rem; }
code { background: var(--glass-soft); padding: .12em .45em; border-radius: 6px; }

::selection { background: var(--gold-soft); }

.muted { color: var(--text-muted); font-size: .89rem; }
.page-subtitle { margin: .35rem 0 0; color: var(--text-muted); font-size: .98rem; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* =============================== GLASS CORE ===============================
   Panels: translucent gradient fill + gradient light edge (border-box trick)
   + inset top light + layered drop shadows + diagonal specular sheen.      */

.card,
.sidebar,
.quick-add,
.toast,
.modal,
.auth-card,
.item-row,
.project-chip,
.stat-tile,
.empty-state,
.error-panel,
.skeleton-row {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--glass-strong) 55%, transparent),
            var(--glass)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
}

/* Specular sheen sweep across the top of every panel */
.card::before,
.sidebar::before,
.quick-add::before,
.toast::before,
.modal::before,
.auth-card::before,
.item-row::before,
.stat-tile::before,
.empty-state::before,
.error-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, var(--sheen), transparent 40%);
    pointer-events: none;
}

/* PERF: high-count elements in the scroll path use near-opaque glass instead of
   backdrop-filter — visually near-identical, dramatically cheaper to scroll. */
.item-row,
.project-chip,
.stat-tile,
.skeleton-row {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background:
        linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
}

/* PERF: small numerous controls skip backdrop-filter too */
.btn,
.btn-icon,
.input,
.pill,
.team-chip,
.bug-button,
.bug-nav,
.date-field,
.section-divider-label {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card, .sidebar, .quick-add, .toast, .modal, .auth-card, .item-row,
    .project-chip, .stat-tile, .empty-state, .error-panel, .skeleton-row,
    .input, .btn, .btn-icon, .pill {
        background: var(--glass-strong);
    }
}

/* ---------- app shell ---------- */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-main { flex: 1; min-width: 0; }

.float-controls {
    position: fixed;
    top: 22px;
    right: 26px;
    z-index: 60;
    display: flex;
    gap: .6rem;
}

.content {
    /* extra top clearance for the floating user chip / theme toggle */
    padding: 5.6rem 2.6rem 3.2rem;
    max-width: 1220px;
    margin: 0 auto;
    animation: page-in .32s cubic-bezier(.22, .9, .35, 1);
}

@keyframes page-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.page-loading {
    display: grid;
    place-items: center;
    min-height: 50vh;
    color: var(--text-muted);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header-actions { display: flex; gap: .55rem; }

/* Action row below a page header — keeps buttons clear of the floating top bar */
.page-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    margin: -.5rem 0 1.1rem;
}
.breadcrumb { font-size: .88rem; color: var(--text-muted); }
.breadcrumb:hover { color: var(--primary); }

/* ---------- floating island sidebar ---------- */

.sidebar {
    width: 282px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: calc(100vh - 40px);
    margin: 20px 0 20px 20px;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    z-index: 30;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1.35rem 1.3rem 1.1rem;
}

.logo-img {
    width: 46px;
    height: 46px;
    display: block;
    filter: drop-shadow(0 3px 8px rgba(6, 30, 45, .45));
}

.logo-text { display: flex; flex-direction: column; line-height: 1.25; gap: .06rem; }

.logo-text strong {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--text);
}

.logo-text small {
    font-size: .64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: var(--gold);
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: .6rem .85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-section {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    padding: 1.25rem .8rem .4rem;
    color: var(--text-muted);
    opacity: .75;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .68rem .85rem;
    border-radius: 14px;
    color: var(--sidebar-text);
    font-size: .98rem;
    font-weight: 500;
    transition: background-color .18s ease, color .18s ease, transform .18s ease,
        box-shadow .18s ease;
}

.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .85; }

.nav-link:hover {
    color: var(--sidebar-text-active);
    background: var(--glass-soft);
    transform: translateX(3px);
}

.nav-link.active {
    color: var(--sidebar-text-active);
    font-weight: 700;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--glass-strong) 80%, transparent), var(--glass-strong));
    box-shadow: inset 0 1px 0 var(--inner-light), 0 6px 18px -6px rgba(0, 0, 0, .35);
}

.nav-link.active svg { opacity: 1; color: var(--primary); }

.nav-link.active::before {
    content: "";
    position: absolute;
    left: -.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 58%;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 60%, #b97e00));
    box-shadow: 0 0 12px var(--gold-soft);
}

.sidebar-version {
    padding: .85rem 1rem 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: .75;
    user-select: none;
}

.auth-version {
    margin: 1.3rem 0 0;
    text-align: center;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: .75;
    position: relative;
    z-index: 1;
}

/* Signed-in user chip (floats top-right): gradient-ring avatar, bold name, role */
.user-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .42rem .55rem .42rem .45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--glass-strong) 60%, transparent),
            var(--glass)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
}

.avatar-ring {
    display: inline-flex;
    padding: 2.5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--mnps-teal) 70%);
    box-shadow: 0 0 16px -2px color-mix(in srgb, var(--gold) 45%, transparent);
    flex-shrink: 0;
}

.avatar-ring .avatar { border: 2px solid var(--bg-base); width: 40px; height: 40px; font-size: .9rem; }

.user-card-info { display: flex; flex-direction: column; min-width: 0; gap: .1rem; flex: 1; padding-right: .2rem; }

.user-card-name {
    color: var(--sidebar-text-active);
    font-size: .98rem;
    font-weight: 750;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-role {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
}

.user-card-role::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--st-done);
    box-shadow: 0 0 8px var(--st-done);
}

.logout-form { margin: 0; display: flex; }

.user-signout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .18s ease;
}

.user-signout svg { width: 17px; height: 17px; }

.user-signout:hover {
    color: var(--danger);
    background: var(--danger-soft);
    transform: translateX(2px);
}

/* ---------- buttons & inputs ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .62rem 1.2rem;
    font-size: .95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: var(--glass-strong);
    color: var(--text);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: transform .13s ease, box-shadow .2s ease, background-color .18s ease,
        border-color .18s ease, color .18s ease, filter .18s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 82%, #fff) 0%,
        var(--primary) 52%,
        color-mix(in srgb, var(--primary) 82%, #063a4e) 100%);
    border-color: rgba(255, 255, 255, .32);
    color: #06222e;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45),
        0 10px 26px -8px color-mix(in srgb, var(--primary) 60%, transparent);
}

:root[data-theme="light"] .btn-primary { color: #fff; }

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45),
        0 14px 34px -8px color-mix(in srgb, var(--primary) 75%, transparent);
}

.btn-ghost { background: var(--glass-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--glass-strong); }

.btn-danger { background: transparent; border-color: transparent; box-shadow: none; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); box-shadow: none; }

/* Standout page actions (item Edit / Delete) — unmistakably buttons */
.btn-edit,
.btn-delete {
    padding: .68rem 1.35rem;
    font-weight: 700;
    border-radius: 15px;
}

.btn-edit svg,
.btn-delete svg { width: 17px; height: 17px; }

.btn-edit {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 22%, transparent),
        color-mix(in srgb, var(--primary) 12%, transparent));
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 22px -8px color-mix(in srgb, var(--primary) 45%, transparent);
}

.btn-edit:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 12px 30px -8px color-mix(in srgb, var(--primary) 65%, transparent);
}

.btn-delete {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--danger) 20%, transparent),
        color-mix(in srgb, var(--danger) 11%, transparent));
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 22px -8px color-mix(in srgb, var(--danger) 40%, transparent);
}

.btn-delete:hover:not(:disabled) {
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 12px 30px -8px color-mix(in srgb, var(--danger) 60%, transparent);
}

.btn-sm { padding: .38rem .8rem; font-size: .84rem; border-radius: 11px; }
.btn-block { width: 100%; }

.btn-icon {
    background: var(--glass-strong);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-icon:hover { transform: rotate(10deg) scale(1.06); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }
.btn-icon svg { width: 20px; height: 20px; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- notification bell ---------- */

.notify-wrap { position: relative; }

.notify-bell { position: relative; }

.notify-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    font-weight: 800;
    background: linear-gradient(180deg, #FFC94F, var(--mnps-gold));
    color: #43300A;
    border: 2px solid var(--bg-base);
    box-shadow: 0 0 14px color-mix(in srgb, var(--mnps-gold) 60%, transparent);
    animation: badge-pop .3s cubic-bezier(.34, 1.56, .64, 1);
}

.notify-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: transparent;
}

.notify-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 80;
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
    border-radius: 20px;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--glass-strong) 70%, transparent),
            var(--glass-strong)) padding-box,
        linear-gradient(150deg, var(--edge-hi), var(--edge-lo) 45%, var(--edge-lo)) border-box;
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
    animation: modal-in .24s cubic-bezier(.34, 1.3, .64, 1);
    padding: .5rem;
}

.notify-head {
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: .55rem .7rem .45rem;
}

.notify-empty { padding: 1rem .7rem 1.1rem; color: var(--text-muted); font-size: .92rem; }

.notify-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .6rem .7rem;
    border-radius: 13px;
    color: var(--text);
    transition: background-color .15s ease;
}

.notify-item:hover { background: var(--glass-soft); }

.notify-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: .42rem;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    flex-shrink: 0;
}

.notify-item-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.notify-item-title { font-size: .92rem; font-weight: 600; line-height: 1.35; }
.notify-item-time { font-size: .76rem; color: var(--text-muted); }

/* unseen indicator on dashboard rows */
.unseen-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: .45rem;
    vertical-align: 2px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
    animation: badge-pop .3s ease;
}

/* quick-capture modal extras */
.capture-title {
    margin: 0 0 1rem;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    padding: .7rem .9rem;
    border-radius: var(--r-sm);
    background: var(--gold-soft);
    border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}

.field-hint-inline {
    font-weight: 500;
    text-transform: none;
    color: var(--text-muted);
    opacity: .8;
}

.input {
    width: 100%;
    background: var(--glass-strong);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .62rem .85rem;
    font-size: .95rem;
    font-family: inherit;
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light);
    transition: border-color .18s ease, box-shadow .2s ease, background-color .3s ease;
}

.input::placeholder { color: var(--text-muted); }

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: inset 0 1px 0 var(--inner-light), 0 0 0 4px var(--primary-soft),
        0 6px 20px -6px color-mix(in srgb, var(--primary) 35%, transparent);
}

select.input { cursor: pointer; }
textarea.input { resize: vertical; }

select.input option {
    background: var(--bg-base);
    color: var(--text);
}

.form-field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-field label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.field-error { color: var(--danger); font-size: .8rem; }
.field-hint { color: var(--text-muted); font-size: .78rem; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .92rem;
    cursor: pointer;
    user-select: none;
}

input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }

/* ---------- cards ---------- */

.card {
    border-radius: var(--r-lg);
    padding: 1.4rem 1.55rem;
    transition: box-shadow .25s ease;
}

.card-label {
    display: block;
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    margin-bottom: .65rem;
}

.table-card { padding: 0; overflow-x: auto; }
.table-card::before { display: none; } /* sheen distorts sticky headers */

/* ---------- stat strip ---------- */

.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.stat-tile {
    border-radius: 20px;
    padding: 1.05rem 1.25rem .95rem;
    display: flex;
    flex-direction: column;
    gap: .1rem;
    transition: transform .18s ease, box-shadow .22s ease;
}

.stat-tile:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--st-new);
    text-shadow: 0 0 24px color-mix(in srgb, var(--st-new) 40%, transparent);
}

.stat-tile-progress .stat-num { color: var(--st-progress); text-shadow: 0 0 24px color-mix(in srgb, var(--st-progress) 40%, transparent); }
.stat-tile-blocked .stat-num { color: var(--st-blocked); text-shadow: 0 0 24px color-mix(in srgb, var(--st-blocked) 40%, transparent); }
.stat-tile-idle .stat-num { color: var(--pr-high); text-shadow: 0 0 24px color-mix(in srgb, var(--pr-high) 40%, transparent); }

.stat-label {
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
}

/* ---------- badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    font-size: .78rem;
    font-weight: 700;
    padding: .3rem .7rem;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
    animation: badge-pop .28s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes badge-pop {
    from { transform: scale(.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.status-new { background: color-mix(in srgb, var(--st-new) 17%, transparent); color: var(--st-new); }
.status-progress { background: color-mix(in srgb, var(--st-progress) 18%, transparent); color: var(--st-progress); }
.status-blocked { background: color-mix(in srgb, var(--st-blocked) 17%, transparent); color: var(--st-blocked); }
.status-done { background: color-mix(in srgb, var(--st-done) 17%, transparent); color: var(--st-done); }
.status-cancelled { background: color-mix(in srgb, var(--st-cancelled) 19%, transparent); color: var(--st-cancelled); }

.badge-outline { background: transparent; border: 1.5px solid currentColor; box-shadow: none; }
.prio-low { color: var(--pr-low); }
.prio-medium { color: var(--pr-medium); }
.prio-high { color: var(--pr-high); }
.prio-critical { color: var(--pr-critical); animation: badge-pop .28s ease, critical-pulse 2s ease-in-out infinite; }

@keyframes critical-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pr-critical) 40%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

/* ---------- quick add (hero capture bar) ---------- */

.quick-add {
    display: flex;
    align-items: center;
    gap: .8rem;
    border-radius: 22px;
    padding: .95rem 1.2rem;
    margin-bottom: 1.6rem;
    cursor: text; /* the whole bar focuses the input on click */
    transition: box-shadow .28s ease, transform .28s ease;
}

.quick-add:focus-within {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 0 0 3px var(--gold-soft),
        0 0 42px -6px color-mix(in srgb, var(--gold) 45%, transparent),
        var(--shadow-2);
}

.quick-add-icon { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }

.quick-add-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.08rem;
    padding: .4rem 0;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.quick-add-input:focus { outline: none; }
.quick-add-input::placeholder { color: var(--text-muted); }

/* Empty bar: a quiet keyboard hint teaching the fast path */
.quick-add-hint {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: .75;
    flex-shrink: 0;
}

.kbd {
    display: inline-flex;
    align-items: center;
    padding: .14rem .5rem;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    box-shadow: inset 0 -2px 0 var(--border);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.kbd-dark {
    border-color: rgba(67, 48, 10, .35);
    background: rgba(255, 255, 255, .35);
    box-shadow: inset 0 -2px 0 rgba(67, 48, 10, .3);
    color: #43300A;
}

/* Text present: the hint morphs into the gold capture pill */
.quick-add-go {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .4);
    background: linear-gradient(180deg, #FFC94F 0%, var(--mnps-gold) 60%, #E19E12 100%);
    color: #43300A;
    font-family: inherit;
    font-size: .92rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 8px 22px -8px color-mix(in srgb, var(--mnps-gold) 70%, transparent);
    animation: capture-pop .28s cubic-bezier(.34, 1.56, .64, 1);
    transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}

.quick-add-go:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 12px 30px -8px color-mix(in srgb, var(--mnps-gold) 85%, transparent);
}

.quick-add-go:active:not(:disabled) { transform: scale(.97); }
.quick-add-go:disabled { opacity: .6; cursor: wait; }

@keyframes capture-pop {
    from { transform: scale(.8); opacity: 0; }
}

/* ---------- feedback: bug + idea submission ---------- */

/* Sidebar feedback trigger — pinned at the bottom of the nav list */
.bug-nav {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-top: auto;
    padding: .68rem .85rem;
    border-radius: 14px;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--gold) 16%, transparent),
        color-mix(in srgb, var(--gold) 8%, transparent));
    color: var(--text);
    font-weight: 700;
    font-size: .93rem;
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 6px 18px -6px color-mix(in srgb, var(--gold) 45%, transparent);
    transition: transform .15s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.bug-nav:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 10px 26px -6px color-mix(in srgb, var(--gold) 60%, transparent);
}

.bug-nav .bug-emoji {
    display: inline-block;
    font-size: 1.1rem;
    animation: bug-wiggle 2.6s ease-in-out infinite;
}

.bug-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--gold) 18%, transparent),
        color-mix(in srgb, var(--gold) 9%, transparent));
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 22px -8px color-mix(in srgb, var(--gold) 50%, transparent);
    transition: transform .15s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.bug-button:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 12px 30px -8px color-mix(in srgb, var(--gold) 65%, transparent);
}

.bug-button .bug-emoji {
    display: inline-block;
    font-size: 1.05rem;
    animation: bug-wiggle 2.6s ease-in-out infinite;
}

@keyframes bug-wiggle {
    0%, 84%, 100% { transform: rotate(0); }
    88% { transform: rotate(-16deg); }
    92% { transform: rotate(12deg); }
    96% { transform: rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
    .bug-button .bug-emoji { animation: none; }
}

.nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    background: linear-gradient(180deg, #FFC94F, var(--mnps-gold));
    color: #43300A;
    box-shadow: 0 0 10px color-mix(in srgb, var(--mnps-gold) 50%, transparent);
}

.pick-row { display: flex; gap: .9rem; margin: .4rem 0 1.2rem; }

.pick-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: 1.5rem 1rem 1.3rem;
    border-radius: 18px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    transition: all .18s ease;
    text-align: center;
}

.pick-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    background: color-mix(in srgb, var(--gold) 10%, transparent);
    box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--gold) 45%, transparent);
}

.pick-card .pick-emoji { font-size: 2.6rem; line-height: 1; }
.pick-card .pick-title { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.pick-card .pick-sub { font-size: .8rem; color: var(--text-muted); }

.severity-row { display: flex; gap: .55rem; }

.severity-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    padding: .7rem .4rem;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all .15s ease;
    text-align: center;
    user-select: none;
}

.severity-pill span:first-child { font-size: 1.35rem; }

.severity-pill.sel {
    border-color: color-mix(in srgb, var(--gold) 55%, transparent);
    background: color-mix(in srgb, var(--gold) 13%, transparent);
    color: var(--text);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.bug-modal-hint { margin: 0 0 1rem; color: var(--text-muted); font-size: .9rem; }

.stat-tile-done .stat-num {
    color: var(--st-done);
    text-shadow: 0 0 24px color-mix(in srgb, var(--st-done) 40%, transparent);
}

/* ---------- team workload strip ---------- */

.team-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .85rem;
    margin: .4rem 0 1.7rem;
}

.team-strip-people {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.team-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .4rem .55rem .4rem .4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    color: var(--text-muted);
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: all .18s ease;
}

.team-chip:hover { color: var(--text); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.team-chip-name { line-height: 1; }

.team-chip-count {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 800;
    background: var(--glass-strong);
    color: var(--text);
    box-shadow: inset 0 1px 0 var(--inner-light);
}

/* "Everyone" — the master chip: teal presence, mini team-avatar stack, larger */
.team-chip-everyone {
    padding: .68rem 1.35rem .68rem .8rem;
    gap: .75rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--primary) 22%, transparent),
        color-mix(in srgb, var(--primary) 10%, transparent));
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 8px 24px -8px color-mix(in srgb, var(--primary) 55%, transparent);
}

.team-chip-everyone:hover { color: var(--text); }

.avatar-xs { width: 23px; height: 23px; font-size: .56rem; }
.team-chip-stack .avatar { margin-left: -8px; border-width: 1.5px; }
.team-chip-stack .avatar:first-child { margin-left: 0; }

.empty-state-roomy { padding: 4.4rem 1.4rem; margin-top: 2.2rem; }

/* Selected scope chip — radio-group semantics, exactly one is always gold.
   Specificity beats .team-chip-everyone so gold always wins when selected. */
.team-strip .team-chip-sel {
    color: #43300A;
    border-color: rgba(255, 255, 255, .4);
    background: linear-gradient(180deg, #FFC94F 0%, var(--mnps-gold) 60%, #E19E12 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 10px 26px -8px color-mix(in srgb, var(--mnps-gold) 70%, transparent);
}

.team-strip .team-chip-sel:hover { color: #43300A; }

.team-strip .team-chip-sel .team-chip-count {
    background: rgba(255, 255, 255, .85);
    color: #43300A;
    box-shadow: none;
}

/* ---------- section divider (overview ⇢ find & filter) ---------- */

.section-divider {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    margin: 3rem 0 2.2rem;
}

.section-divider::before,
.section-divider::after {
    content: "";
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg,
        transparent,
        color-mix(in srgb, var(--primary) 65%, transparent) 30%,
        color-mix(in srgb, var(--gold) 75%, transparent) 70%,
        transparent);
    background-size: 200% 100%;
    box-shadow: 0 0 22px color-mix(in srgb, var(--primary) 40%, transparent),
        0 0 8px color-mix(in srgb, var(--gold) 25%, transparent);
    animation: divider-flow 7s linear infinite;
}

.section-divider::after {
    background: linear-gradient(90deg,
        transparent,
        color-mix(in srgb, var(--gold) 75%, transparent) 30%,
        color-mix(in srgb, var(--primary) 65%, transparent) 70%,
        transparent);
    background-size: 200% 100%;
    animation-direction: reverse;
}

@keyframes divider-flow {
    from { background-position: 0% 0; }
    to { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .section-divider::before, .section-divider::after { animation: none; }
}

.section-divider-label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem 1.25rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    font-size: .84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--text);
    white-space: nowrap;
}

.section-divider-label svg { width: 18px; height: 18px; color: var(--gold); }

.divider-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: 0;
    background: linear-gradient(180deg, #FFC94F, var(--mnps-gold));
    color: #43300A;
    box-shadow: 0 0 10px color-mix(in srgb, var(--mnps-gold) 45%, transparent);
}

/* ---------- overview rings (dashboard concept D) ---------- */

.ring-strip {
    display: grid;
    grid-template-columns: 1.25fr 1.25fr 1fr 1fr;
    gap: .95rem;
    margin-bottom: 1.3rem;
}

.ring-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 20px;
}

.ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: color-mix(in srgb, var(--text) 8%, transparent); }

.ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -.02em;
}

.ring-center-sm { font-size: 1.05rem; }

.ring-info { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.ring-legend { display: flex; flex-direction: column; gap: .18rem; }

.ring-leg {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: none;
    border: none;
    padding: .14rem .45rem .14rem .3rem;
    margin-left: -.3rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: .8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
    white-space: nowrap;
}

.ring-leg i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--leg);
    box-shadow: 0 0 8px var(--leg);
    flex-shrink: 0;
}

.ring-leg b { margin-left: .15rem; color: var(--text); }
.ring-leg:hover { background: var(--glass-soft); color: var(--text); }

.ring-leg-active {
    background: color-mix(in srgb, var(--leg) 16%, transparent);
    color: var(--text);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--leg) 45%, transparent);
}

.stat-tile-click {
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    text-align: left;
    transition: transform .18s ease, box-shadow .22s ease;
}

.stat-tile-click:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.stat-tile-active {
    box-shadow: inset 0 1px 0 var(--inner-light),
        0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent),
        0 10px 28px -8px color-mix(in srgb, var(--gold) 50%, transparent);
}

/* ---------- filter bar ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem;
    margin-bottom: 1.6rem;
}

.filter-search { position: relative; flex: 1 1 240px; min-width: 210px; }

.filter-search svg {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.filter-search .input { padding-left: 2.3rem; }

.filter-select { width: auto; min-width: 138px; }
.filter-dates { display: flex; align-items: center; gap: .65rem; }
.filter-closed { color: var(--text-muted); }

/* ---------- date fields (custom-skinned native pickers) ---------- */

.date-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 158px;
    padding: .68rem 1rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--glass-strong);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    color: var(--text-muted);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: transform .15s ease, box-shadow .2s ease, color .18s ease, border-color .18s ease;
}

.date-field:hover { color: var(--text); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.date-field:focus-within {
    border-color: var(--primary);
    box-shadow: inset 0 1px 0 var(--inner-light), 0 0 0 4px var(--primary-soft);
}

.date-field svg { width: 17px; height: 17px; flex-shrink: 0; }

.date-field-has-value {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}

.date-field-has-value svg { color: var(--primary); }

/* The real input covers the whole field invisibly, so any click opens the picker */
.date-field input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
    margin: 0;
}

.date-field input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pill {
    border: 1px solid var(--border);
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    color: var(--text-muted);
    border-radius: 999px;
    padding: .55rem 1.05rem;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-1);
    transition: all .18s ease;
}

.pill:hover { color: var(--text); transform: translateY(-1px); }

.pill-active {
    background: linear-gradient(180deg, #FFC94F 0%, var(--mnps-gold) 58%, #D9970D 100%);
    border-color: rgba(255, 255, 255, .4);
    color: #43300A;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55),
        0 10px 26px -8px color-mix(in srgb, var(--mnps-gold) 65%, transparent);
}

.pill-active:hover { color: #43300A; }

/* ---------- project strip & cards ---------- */

.project-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1.5rem;
}

.project-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .12rem;
    border-radius: 15px;
    padding: .58rem .95rem;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    transition: all .18s ease;
}

.project-chip:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }

.project-chip-active {
    box-shadow: inset 0 1px 0 var(--inner-light), 0 0 0 2px var(--primary),
        0 8px 24px -6px color-mix(in srgb, var(--primary) 45%, transparent);
}

.project-chip-title { font-size: .9rem; font-weight: 600; }
.project-chip-count { font-size: .74rem; color: var(--text-muted); }
.project-chip-link { justify-content: center; color: var(--primary); font-size: .88rem; font-weight: 600; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.1rem;
}

/* External ticket reference — classy gold ticket-stub badge */
.ticket-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    padding: .32rem .75rem;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .07em;
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18),
        0 4px 14px -6px color-mix(in srgb, var(--gold) 40%, transparent);
    white-space: nowrap;
}

.ticket-badge svg { width: 15px; height: 15px; flex-shrink: 0; }

.ticket-badge-sm {
    padding: .16rem .5rem;
    font-size: .72rem;
    border-radius: 8px;
    gap: .35rem;
}

.ticket-badge-sm svg { width: 12px; height: 12px; }

.project-chip-ticket {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: .04em;
}

.project-card { display: flex; flex-direction: column; gap: .65rem; }
.project-card:hover { box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2); }
.project-card-header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.project-desc { margin: 0; color: var(--text-muted); font-size: .92rem; }
.project-card-stats { display: flex; gap: 1rem; font-size: .92rem; }

.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.project-card-actions { display: flex; gap: .3rem; }

/* ---------- item list ---------- */

.item-list { display: flex; flex-direction: column; gap: .8rem; }

/* Results area dims briefly while fresh data loads — no teardown, no stutter */
.results-zone { transition: opacity .15s ease; }
.results-zone.refreshing { opacity: .55; pointer-events: none; }

.item-row {
    --row-accent: var(--st-new);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: var(--r-md);
    padding: 1.05rem 1.3rem;
    color: var(--text);
    transition: transform .17s ease, box-shadow .22s ease, opacity .2s ease;
    animation: row-in .18s ease;
}

@keyframes row-in {
    from { opacity: 0; }
}

/* status accent: soft color bar fused into the glass edge */
.item-row::after {
    content: "";
    position: absolute;
    left: 0;
    top: 14%;
    bottom: 14%;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--row-accent) 90%, #fff),
        var(--row-accent));
    box-shadow: 0 0 14px color-mix(in srgb, var(--row-accent) 55%, transparent);
}

.item-row:hover {
    transform: translateY(-2px) scale(1.004);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2),
        0 10px 34px -10px color-mix(in srgb, var(--row-accent) 40%, transparent);
}

.status-new-border { --row-accent: var(--st-new); }
.status-progress-border { --row-accent: var(--st-progress); }
.status-blocked-border { --row-accent: var(--st-blocked); }
.status-done-border { --row-accent: var(--st-done); }
.status-cancelled-border { --row-accent: var(--st-cancelled); }

.item-closed { opacity: .52; }
.item-closed .item-title { text-decoration: line-through; }

.item-main { min-width: 0; display: flex; flex-direction: column; gap: .28rem; padding-left: .35rem; }
.item-title { font-weight: 650; font-size: 1.03rem; letter-spacing: -.005em; }
.item-meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; font-size: .84rem; color: var(--text-muted); }

.item-project {
    background: var(--primary-soft);
    border-radius: 8px;
    padding: .15rem .55rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--primary);
}

.item-side { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.notes-count {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--text-muted);
    font-size: .86rem;
}

.notes-count svg { width: 16px; height: 16px; }

.aging-chip {
    font-size: .74rem;
    font-weight: 700;
    padding: .24rem .58rem;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.aging-warn { background: color-mix(in srgb, var(--pr-high) 19%, transparent); color: var(--pr-high); }

.aging-danger {
    background: color-mix(in srgb, var(--pr-critical) 19%, transparent);
    color: var(--pr-critical);
    animation: critical-pulse 2s ease-in-out infinite;
}

.list-summary { color: var(--text-muted); font-size: .84rem; text-align: right; }

/* ---------- avatars ---------- */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mnps-teal);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .35);
    box-shadow: 0 3px 10px rgba(4, 22, 34, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}

:root[data-theme="light"] .avatar { border-color: rgba(255, 255, 255, .85); }

.avatar-sm { width: 30px; height: 30px; font-size: .7rem; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { margin-left: -8px; transition: transform .15s ease; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack:hover .avatar { transform: translateX(2px); }
.avatar-more { background: var(--glass-strong); color: var(--text-muted); }
.avatars-empty { color: var(--text-muted); font-size: .8rem; font-style: italic; }

/* ---------- detail page ---------- */

.item-detail-title { margin-top: .35rem; }
.item-detail-meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-top: .6rem; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.2rem;
    margin-top: 1.3rem;
    align-items: start;
}

.detail-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.detail-side { position: sticky; top: 24px; }

.status-actions { display: flex; gap: .6rem; position: relative; z-index: 1; }
.status-actions .input { max-width: 230px; }

.note-input { width: 100%; position: relative; z-index: 1; }
.note-actions { display: flex; justify-content: flex-end; margin-top: .6rem; position: relative; z-index: 1; }

.assignee-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.assignee-list li { display: flex; align-items: center; gap: .55rem; font-size: .94rem; }

.assignee-picker {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    max-height: 210px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .65rem;
    background: var(--glass-soft);
}

/* ---------- timeline ---------- */

.timeline-heading { margin-top: .5rem; }

.timeline {
    position: relative;
    padding-left: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--gold));
    opacity: .4;
    border-radius: 999px;
}

.timeline-item { position: relative; animation: page-in .3s ease; }

.timeline-dot {
    position: absolute;
    left: -1.6rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid var(--bg-base);
    background: var(--text-muted);
    box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.timeline-created .timeline-dot { background: var(--st-new); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--st-new) 50%, transparent); }
.timeline-note .timeline-dot { background: var(--gold); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--gold) 50%, transparent); }
.timeline-statuschanged .timeline-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--primary) 50%, transparent); }
.timeline-assigned .timeline-dot { background: var(--st-done); box-shadow: 0 0 0 2px var(--border), 0 0 12px color-mix(in srgb, var(--st-done) 50%, transparent); }

.timeline-header { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: .93rem; }
.timeline-verb { color: var(--text-muted); }
.timeline-time { color: var(--text-muted); font-size: .8rem; margin-left: auto; }

.timeline-status-change { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.timeline-arrow { color: var(--text-muted); }

.timeline-body {
    margin: .5rem 0 0;
    background: var(--glass);
    -webkit-backdrop-filter: var(--blur-soft);
    backdrop-filter: var(--blur-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: .7rem .9rem;
    font-size: .94rem;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: inset 0 1px 0 var(--inner-light);
}

/* ---------- tables ---------- */

.data-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .9rem; }

.data-table th {
    text-align: left;
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr { transition: background-color .12s ease; }
.data-table tbody tr:hover { background: var(--glass-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }

.row-inactive { opacity: .5; }
.cell-name { margin-left: .55rem; font-weight: 600; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .btn { margin-left: .3rem; }
.cell-nowrap { white-space: nowrap; }
.cell-message { max-width: 500px; overflow: hidden; text-overflow: ellipsis; }

.cell-person {
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cell-email {
    white-space: nowrap;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.data-table .badge { white-space: nowrap; }

.log-row { cursor: pointer; }
.log-detail-row td { background: var(--glass-soft); }
.log-detail { margin: 0; display: grid; grid-template-columns: 116px 1fr; gap: .45rem .85rem; }
.log-detail dt { font-weight: 700; font-size: .8rem; color: var(--text-muted); }
.log-detail dd { margin: 0; min-width: 0; }
.log-exception { color: var(--danger); }

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 1.1rem;
}

/* ---------- skeleton loaders ---------- */

.skeleton-list { display: flex; flex-direction: column; gap: .7rem; }

.skeleton-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    border-radius: var(--r-md);
    padding: 1.1rem;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--glass-soft);
    border-radius: 9px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent,
            color-mix(in srgb, var(--text) 9%, transparent), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.skeleton-line { height: 15px; flex: 1; }
.skeleton-chip { height: 22px; width: 76px; border-radius: 999px; }
.skeleton-circle { height: 30px; width: 30px; border-radius: 50%; }

/* ---------- toasts ---------- */

.toast-stack {
    position: fixed;
    bottom: 1.4rem;
    right: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    z-index: 1000;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text);
    border-radius: 16px;
    padding: .8rem 1rem;
    font-size: .94rem;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
    animation: toast-in .34s cubic-bezier(.34, 1.3, .64, 1);
}

.toast::after {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    bottom: 18%;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--st-new);
    box-shadow: 0 0 12px color-mix(in srgb, var(--st-new) 60%, transparent);
}

.toast-success::after { background: var(--st-done); box-shadow: 0 0 12px color-mix(in srgb, var(--st-done) 60%, transparent); }
.toast-error::after { background: var(--st-blocked); box-shadow: 0 0 12px color-mix(in srgb, var(--st-blocked) 60%, transparent); }
.toast-info::after { background: var(--st-new); }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(34px) scale(.95); }
    to { opacity: 1; transform: none; }
}

.toast-out { animation: toast-out .25s ease forwards; }

@keyframes toast-out {
    to { opacity: 0; transform: translateX(34px) scale(.95); }
}

.toast-message { flex: 1; position: relative; z-index: 1; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: .82rem;
    padding: .15rem;
    position: relative;
    z-index: 1;
}

.toast-close:hover { color: var(--text); }

/* ---------- modal ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 9, 16, .5);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    display: grid;
    place-items: center;
    z-index: 900;
    animation: fade-in .2s ease;
    padding: 1rem;
}

@keyframes fade-in {
    from { opacity: 0; }
}

.modal {
    border-radius: var(--r-lg);
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    overflow-y: auto;
    animation: modal-in .28s cubic-bezier(.34, 1.3, .64, 1);
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(.92) translateY(16px); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.35rem .65rem;
    position: relative;
    z-index: 1;
}

.modal-body { padding: .45rem 1.35rem; position: relative; z-index: 1; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    padding: .9rem 1.35rem 1.25rem;
    position: relative;
    z-index: 1;
}

/* ---------- empty state / errors ---------- */

.empty-state {
    text-align: center;
    padding: 3.6rem 1.2rem;
    color: var(--text-muted);
    border-radius: var(--r-lg);
}

.empty-state h3 { color: var(--text); margin-bottom: .45rem; }

.error-panel {
    max-width: 480px;
    margin: 3.2rem auto;
    text-align: center;
    border-radius: var(--r-lg);
    padding: 2.2rem;
}

.error-panel-actions { display: flex; justify-content: center; gap: .65rem; margin-top: 1.1rem; position: relative; z-index: 1; }

.alert {
    border-radius: var(--r-sm);
    padding: .7rem 1rem;
    font-size: .92rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
}

/* ---------- auth pages ---------- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    /* Slightly lighter veil than the app — the brand artwork gets its hero moment.
       No 'fixed' attachment: it forces repaints on scroll. */
    background:
        linear-gradient(180deg, var(--bg-veil-auth), var(--bg-veil-auth-2)),
        url('../img/brand-bg.svg') center / cover no-repeat,
        var(--bg-base);
}

.auth-shell::before {
    content: "";
    position: fixed;
    inset: -14%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(48rem 36rem at 18% 12%, var(--orb-teal), transparent 62%),
        radial-gradient(44rem 32rem at 84% 18%, var(--orb-gold), transparent 60%),
        radial-gradient(50rem 38rem at 58% 100%, var(--orb-teal), transparent 62%);
    animation: ambient-drift 46s ease-in-out infinite alternate;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    border-radius: 26px;
    padding: 2.4rem;
    box-shadow: inset 0 1px 0 var(--inner-light), var(--shadow-2);
    animation: page-in .38s cubic-bezier(.22, .9, .35, 1);
}

.auth-card h1 { font-size: 1.45rem; margin-bottom: 1.2rem; position: relative; z-index: 1; }
.auth-card form, .auth-card .alert, .auth-card p, .auth-card a { position: relative; z-index: 1; }

.auth-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 700;
    font-size: 1.08rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.auth-logo img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 3px 8px rgba(6, 30, 45, .4));
}

.auth-note { color: var(--text-muted); font-size: .92rem; }
.auth-card .checkbox-label { margin-bottom: 1.1rem; }

/* ---------- scrollbars ---------- */

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--text) 16%, transparent);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 30%, transparent); background-clip: padding-box; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
    .sidebar { width: 84px; margin: 14px 0 14px 14px; border-radius: 22px; }
    .logo-text, .nav-link span, .bug-nav-text { display: none; }
    .bug-nav { justify-content: center; padding: .6rem .5rem; }
    .sidebar-logo { justify-content: center; padding: 1.1rem .4rem .8rem; }
    .nav-link { justify-content: center; padding: .7rem .5rem; }
    .nav-link.active::before { left: -.55rem; }
    .content { padding: 5.2rem 1.6rem 2.4rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-side { position: static; }
}

@media (max-width: 1100px) {
    .ring-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .content { padding: 4.6rem 1rem 2rem; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ring-strip { grid-template-columns: 1fr; }
    .item-row { flex-direction: column; align-items: flex-start; }
    .item-side { justify-content: flex-start; }
    .filter-dates { display: none; }
    .float-controls { top: 12px; right: 12px; }
    .user-card-info { display: none; }
}

/* =========================================================================
   Users roster (v2.0) — per-person stat cards on /admin/users
   ========================================================================= */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.person-card { border-radius: 20px; padding: 1.15rem 1.25rem 1rem; display: flex; flex-direction: column; gap: .8rem; }
.person-inactive { opacity: .6; filter: saturate(.6); }
.person-top { display: flex; align-items: center; gap: .8rem; }
.person-top .avatar { width: 44px; height: 44px; font-size: .95rem; }
.person-id { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.person-id strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-id span { font-size: .76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-role { font-size: .7rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; border: 1.5px solid var(--border); color: var(--text-muted); letter-spacing: .06em; flex: none; }
.person-role.role-admin { border-color: var(--primary); color: var(--primary); }
.person-seen { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--text-muted); flex-wrap: wrap; min-height: 1.4rem; }
.person-seen i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-done); box-shadow: 0 0 8px var(--st-done); flex: none; }
.person-seen.away i { background: var(--text-muted); box-shadow: none; opacity: .55; }
.person-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.pstat { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .55rem .2rem; border-radius: 12px; background: var(--glass-soft); border: 1px solid var(--border); }
.pstat b { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.pstat span { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.pstat.open b { color: var(--st-new); }
.pstat.done b { color: var(--st-done); }
.pstat.bugs b { color: var(--st-blocked); }
.pstat.ideas b { color: var(--gold); }
.person-load { display: flex; align-items: center; gap: .6rem; font-size: .74rem; color: var(--text-muted); }
.person-load > span { flex: none; }
.loadbar { flex: 1; height: 7px; border-radius: 999px; background: var(--glass-soft); overflow: hidden; display: flex; }
.loadbar i { height: 100%; }
.load-open { background: var(--st-new); }
.load-done { background: color-mix(in srgb, var(--st-done) 45%, transparent); }
.load-none { background: var(--glass-soft); }
.person-foot { display: flex; justify-content: flex-end; gap: .3rem; border-top: 1px solid var(--border); padding-top: .7rem; flex-wrap: wrap; }

/* =========================================================================
   Changelog (v2.0) — sidebar version badge opens the release story
   ========================================================================= */
button.sidebar-version {
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    font-family: inherit;
    cursor: pointer;
    transition: opacity .18s ease, color .18s ease;
}
button.sidebar-version:hover { opacity: 1; color: var(--gold); }
.version-spark { opacity: 0; transition: opacity .18s ease; }
button.sidebar-version:hover .version-spark { opacity: 1; }

.changelog-backdrop {
    position: fixed; inset: 0; z-index: 240;
    background: rgba(4, 10, 18, .55);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 1.2rem;
    animation: clg-fade .18s ease;
}
.changelog-panel {
    position: relative;
    width: min(620px, 100%);
    max-height: min(84vh, 760px);
    overflow-y: auto;
    border-radius: 24px;
    padding: 1.6rem 1.7rem 1.5rem;
    background: linear-gradient(180deg, var(--glass-opaque-top), var(--glass-opaque));
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    animation: clg-pop .22s cubic-bezier(.2, .9, .3, 1.2);
}
.changelog-close {
    position: absolute; top: .85rem; right: .9rem;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass-soft);
    color: var(--text-muted);
    cursor: pointer; font-size: .8rem;
    display: grid; place-items: center;
    transition: color .15s ease, border-color .15s ease;
}
.changelog-close:hover { color: var(--text); border-color: var(--primary); }
.changelog-kicker { font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.changelog-head h2 { margin: .25rem 0 .5rem; font-size: 1.45rem; }
.changelog-intro { font-size: .88rem; color: var(--text-muted); line-height: 1.55; margin: 0 0 1.3rem; }
.changelog-rail { position: relative; padding-left: 2.3rem; display: flex; flex-direction: column; gap: 1.15rem; }
.changelog-rail::before {
    content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold), var(--primary) 55%, transparent);
    opacity: .5;
}
.release { position: relative; }
.release-node {
    position: absolute; left: -2.3rem; top: -3px;
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-size: .95rem;
    background: var(--glass-opaque); border: 1px solid var(--border);
}
.release-current .release-node { border-color: var(--gold); box-shadow: 0 0 14px var(--gold-soft); }
.release-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    width: 100%; background: none; border: none; padding: 0;
    font-family: inherit; color: inherit; cursor: pointer; text-align: left;
}
.release-pill {
    font-size: .72rem; font-weight: 800; padding: .18rem .6rem; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary); letter-spacing: .04em; flex: none;
}
.release-current .release-pill { background: var(--gold-soft); color: var(--gold); }
.release-title { font-weight: 700; font-size: .98rem; }
.release-here {
    font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
    color: var(--gold); border: 1px dashed var(--gold);
    padding: .12rem .45rem; border-radius: 999px; flex: none; opacity: .85;
}
.release-date { margin-left: auto; font-size: .74rem; color: var(--text-muted); flex: none; }
.release-chev { font-size: .8rem; color: var(--text-muted); transition: transform .2s ease; flex: none; }
.release.expanded .release-chev { transform: rotate(180deg); }
.release-summary { margin: .3rem 0 0; font-size: .8rem; color: var(--text-muted); }
.release-items {
    margin: .6rem 0 0; padding: .75rem .9rem .75rem 1.7rem;
    border-radius: 14px; background: var(--glass-soft); border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: .45rem;
    font-size: .82rem; line-height: 1.45;
    animation: clg-fade .25s ease;
}
.release-items li::marker { color: var(--gold); }

@keyframes clg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes clg-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 680px) {
    .changelog-panel { padding: 1.25rem 1rem 1.1rem; }
    .release-date { display: none; }
    .roster { grid-template-columns: 1fr; }
}

/* Roster momentum (v2.1) — quiet signal for who's shipping; no negative styling */
.week-chip {
    margin-left: auto; flex: none;
    font-size: .68rem; font-weight: 800;
    padding: .16rem .55rem; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    white-space: nowrap;
}
.week-chip.lead { background: var(--gold-soft); color: var(--gold); }
.person-lead {
    outline: 1px solid var(--gold);
    outline-offset: -1px;
    box-shadow: 0 0 22px -8px var(--gold);
}

/* Quick-add bar sits clear of the fixed top-right user chip cluster */
.quick-add { margin-top: 2rem; }

/* Dashboard → Action items CTA under the team strip */
.dash-cta { display: flex; justify-content: center; margin: .4rem 0 1.4rem; }
