/* ==========================================================================
   PRINTSYNC — Glass theme (red / black / white)
   SINGLE-FILE BUILD: style.css + sidebar/dashboard layer (ps-extras) +
   empty states, toasts and stage tracker. Nothing here depends on
   ps-extras.css loading, so the layout can't fall back to unstyled again.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    --black: #0A0A0A;
    --black-soft: #161616;
    --white: #FFFFFF;
    --white-dim: rgba(255, 255, 255, 0.72);
    --white-faint: rgba(255, 255, 255, 0.55);

    --red: #E01B2E;
    --red-bright: #FF4A5B;
    --red-deep: #8C0F1E;
    --on-red: #FFFFFF;

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-strong: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --field-bg: rgba(255, 255, 255, 0.06);
    --red-tint: rgba(224, 27, 46, 0.14);

    --radius: 16px;
    --radius-sm: 10px;
    --space: 16px;
}

:root[data-theme="light"] {
    --black: #FFFFFF;
    --black-soft: #F4F4F5;
    --white: #111111;
    --white-dim: rgba(17, 17, 17, 0.7);
    --white-faint: rgba(17, 17, 17, 0.55);
    --red-bright: #C8102E;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-strong: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.13);
    --glass-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
    --field-bg: rgba(255, 255, 255, 0.9);
    --red-tint: rgba(224, 27, 46, 0.09);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
    font-size: 16px;
    color: var(--white);
    background:
        radial-gradient(circle at 12% 8%, rgba(224, 27, 46, 0.16), transparent 42%),
        radial-gradient(circle at 88% 92%, rgba(224, 27, 46, 0.10), transparent 48%),
        linear-gradient(160deg, var(--black) 0%, var(--black-soft) 60%, var(--black) 100%);
    background-attachment: fixed;
    padding: 28px 20px 72px;
}
:root[data-theme="light"] body {
    background:
        radial-gradient(circle at 12% 8%, rgba(224, 27, 46, 0.12), transparent 42%),
        radial-gradient(circle at 88% 92%, rgba(224, 27, 46, 0.08), transparent 48%),
        linear-gradient(160deg, #FFFFFF 0%, #F4F4F5 60%, #FFFFFF 100%);
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; color: var(--white); line-height: 1.25; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; margin-top: 22px; }
h4 { font-size: 0.95rem; color: var(--white-dim); margin-top: 20px; }
.glass-card > h2:first-child, .glass-card > h3:first-child { margin-top: 0; }

p { line-height: 1.6; margin: 0 0 12px; }
a { color: var(--red-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
hr { border: none; border-top: 1px solid var(--glass-border); margin: 22px 0; }
section { margin-bottom: 36px; }

:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.page, .app-shell { max-width: 1040px; margin: 0 auto; }

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 28px 32px;
}

.topbar {
    position: sticky;
    top: 10px;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 0 0 18px;
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--white-dim);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.topbar > span:first-child { min-width: 0; flex-wrap: wrap; row-gap: 6px; }
.topbar a { color: var(--white); }
.topbar a:hover { text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.topbar-actions > a:not([class]) {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg-strong);
    font-weight: 500;
}
.topbar-actions > a:not([class]):hover { border-color: var(--red); }

.topbar .nav-icon,
#theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--white);
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.topbar .nav-icon:hover, #theme-toggle:hover { border-color: var(--red); background: var(--red-tint); }
.topbar .nav-icon svg, #theme-toggle svg { flex-shrink: 0; }

.bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    color: var(--on-red);
    background: var(--red);
    border: 2px solid var(--black-soft);
    border-radius: 999px;
}

.topbar a.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    font-size: 0.82rem;
    color: var(--white-dim);
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}
.topbar a.btn-logout:hover { color: var(--red-bright); border-color: var(--red); background: var(--red-tint); }

nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 26px; }
nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--white);
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
}
nav a:hover { background: var(--red-tint); border-color: var(--red); text-decoration: none; }
nav a[aria-current="page"] { border-color: var(--red); background: var(--glass-bg); font-weight: 600; }

nav a.nav-cta { color: var(--on-red); background: var(--red); border-color: var(--red); font-weight: 600; }
nav a.nav-cta:hover { background: var(--red-bright); border-color: var(--red-bright); }
nav a.nav-cta[aria-current="page"] { background: var(--red-deep); border-color: var(--red-deep); }
.nav-cta-icon { font-size: 1.1rem; font-weight: 700; line-height: 1; }

nav a.nav-admin { color: var(--red-bright); border-color: var(--red); background: var(--red-tint); font-weight: 600; }
nav a.nav-admin:hover, nav a.nav-admin[aria-current="page"] { color: var(--on-red); background: var(--red); }

.brand-mark { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.brand-mark .brand-word { font-weight: 700; font-size: 1.3rem; color: #E01B2E; letter-spacing: -0.01em; }
.brand-mark .brand-tag {
    background: #0A0A0A;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 2px;
    white-space: nowrap;
}
.brand-mark.brand-sm .brand-word { font-size: 1.1rem; }
.brand-mark.brand-sm .brand-tag { font-size: 0.5rem; padding: 2px 5px; }

/* --------------------------------------------------------------------------
   4. Forms
   -------------------------------------------------------------------------- */
form { margin: 12px 0; }
label { font-size: 0.85rem; font-weight: 500; color: var(--white-dim); }

form br + br { display: none; }

input[type="text"], input[type="password"], input[type="number"],
input[type="email"], input[type="tel"], input[type="search"],
select, textarea {
    width: 100%;
    max-width: 420px;
    margin: 4px 0 14px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--white);
    background-color: var(--field-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { max-width: 560px; resize: vertical; line-height: 1.5; }

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px !important;
    background-color: var(--field-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--white) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
}
select option { background: var(--black-soft); color: var(--white); }

input::placeholder, textarea::placeholder { color: var(--white-faint); opacity: 0.7; }
input:hover, select:hover, textarea:hover { border-color: rgba(224, 27, 46, 0.45); }
input:focus, select:focus, textarea:focus {
    border-color: var(--red-bright);
    box-shadow: 0 0 0 3px rgba(224, 27, 46, 0.25);
}
input[readonly] { opacity: 0.8; }
input:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }

.search-box { margin: 12px 0 18px; }
.search-box form { align-items: center; }
.search-box input, .part-row input, form.inline input { margin: 0; }
.search-box input { max-width: none; }
.part-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.part-row input { flex: 1 1 140px; max-width: 220px; }
.part-row input[name="part_name[]"] { flex: 2 1 200px; }
.part-row br { display: none; }
form.inline { display: inline; margin: 0; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
:where(button, input[type="submit"]) {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--on-red);
    background: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
:where(button):hover:not(:disabled) { background: var(--red-bright); border-color: var(--red-bright); }
:where(button):active:not(:disabled) { transform: scale(0.98); }
button:disabled { opacity: 0.7; cursor: not-allowed; }

td button:not(.copy-jo), form.inline button, .notif button, details button, .pw-toggle, .modal-cancel {
    color: var(--white);
    background: transparent;
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    font-size: 0.8rem;
}
td button:not(.copy-jo):hover:not(:disabled), form.inline button:hover:not(:disabled),
.notif button:hover:not(:disabled), details button:hover:not(:disabled),
.pw-toggle:hover, .modal-cancel:hover {
    color: var(--red-bright);
    background: var(--red-tint);
    border-color: var(--red);
}
.modal-cancel { padding: 10px 18px; font-size: 0.9rem; }

.approve, button.approve { color: var(--black); background: var(--white); border-color: var(--white); }
.approve:hover:not(:disabled) { background: var(--white-dim) !important; border-color: var(--white-dim) !important; }
:root[data-theme="light"] .approve, :root[data-theme="light"] button.approve { color: #FFFFFF; background: #111111; border-color: #111111; }
:root[data-theme="light"] .approve:hover:not(:disabled) { background: #333333 !important; border-color: #333333 !important; }
.decline, button.decline { color: var(--on-red); background: var(--red); border-color: var(--red); }
.decision-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.decision-buttons button { flex: 1 1 160px; padding: 12px 18px; }

.copy-jo {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px;
    color: var(--white-dim);
    background: transparent;
    border: none;
    vertical-align: middle;
    opacity: 0.75;
}
.copy-jo svg { display: block; }
.copy-jo:hover:not(:disabled) { color: var(--red-bright); background: transparent; opacity: 1; }

#menu-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    color: var(--white);
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
}
#menu-toggle:hover:not(:disabled) { color: var(--white); background: var(--red-tint); border-color: var(--red); }
#menu-toggle svg { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   6. Tables
   -------------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.88rem; }
th, td { padding: 11px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--glass-border); }
th { color: var(--white-dim); font-weight: 500; font-size: 0.78rem; }
thead th { border-bottom-color: var(--white-faint); }
tbody tr:hover td { background: var(--glass-bg); }
tfoot td { border-bottom: none; padding-top: 14px; }
.inactive, .inactive td { color: var(--white-faint); font-style: italic; }

/* --------------------------------------------------------------------------
   7. Components
   -------------------------------------------------------------------------- */
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 22px; }
.summary-card {
    padding: 0;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, transform 0.1s ease;
}
.summary-card a { display: block; height: 100%; padding: 14px 18px; color: var(--white-dim); font-size: 0.85rem; }
.summary-card a:hover { text-decoration: none; }
.summary-card .num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; color: var(--red-bright); margin-bottom: 2px; }
.summary-card:hover { border-color: var(--red); transform: translateY(-2px); }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
    color: var(--white);
    background: var(--glass-bg-strong);
    border: 1px solid var(--white-faint);
    border-radius: 999px;
}
.status-badge.attention { color: var(--red-bright); background: var(--red-tint); border-color: rgba(224, 27, 46, 0.45); }

.jo-code { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.01em; white-space: nowrap; }

.notif { padding: 14px 16px; margin-bottom: 10px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); }
.notif.unread { border-color: var(--red); background: var(--red-tint); }
.notif .meta { margin: 4px 0 8px; font-size: 0.78rem; color: var(--white-faint); }
.notif form { display: inline; margin: 0; }

details > summary { cursor: pointer; color: var(--red-bright); font-size: 0.85rem; }
details[open] > summary { margin-bottom: 8px; }

.faq-item { padding: 4px 0; border-bottom: 1px solid var(--glass-border); }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 0;
    text-align: left;
    font-weight: 500;
    color: var(--white);
    background: none;
    border: none;
    border-radius: 0;
}
.faq-question:hover:not(:disabled) { color: var(--red-bright); background: none; }
.faq-question::after { content: '+'; flex-shrink: 0; font-size: 1.2rem; color: var(--red-bright); }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { display: none; padding-bottom: 12px; font-size: 0.9rem; line-height: 1.6; color: var(--white-dim); }
.faq-item.open .faq-answer { display: block; }

#scroll-progress { position: fixed; top: 0; left: 0; z-index: 100; width: 0; height: 3px; background: var(--red); transition: width 0.1s ease-out; }
#scroll-top-btn {
    position: fixed; right: 20px; bottom: 20px; z-index: 60;
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    color: var(--on-red);
    border-radius: 50%;
    opacity: 0; pointer-events: none; transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}
#scroll-top-btn.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.floating-contact {
    position: fixed; left: 20px; bottom: 20px; z-index: 60;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--white);
    background: var(--black-soft);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: var(--glass-shadow);
}
.floating-contact:hover { border-color: var(--red); text-decoration: none; }
.floating-contact svg { flex-shrink: 0; }

.modal-overlay { display: none; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, 0.6); }
.modal-overlay.open { display: flex; }
.modal-box { width: 100%; max-width: 380px; padding: 24px; background: var(--black-soft); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--glass-shadow); }
.modal-box .modal-text { font-size: 1rem; margin: 0; }
.modal-box .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.spinner { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #FFFFFF; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 10px 18px; color: var(--on-red); background: var(--red); border-radius: 0 0 var(--radius-sm) 0; font-size: 0.9rem; }
.skip-link:focus { left: 0; }

.error-page { text-align: center; padding: 48px 24px; }
.error-page .code { margin-bottom: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 3.5rem; color: var(--red-bright); }

body.login-page { display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; }

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    body { padding: 14px 12px 84px; background-attachment: scroll; }
    .glass-card { padding: 20px 16px; }
    h2 { font-size: 1.3rem; }

    #menu-toggle { display: inline-flex; }
    nav.site-nav { display: none; flex-direction: column; width: 100%; }
    nav.site-nav.open { display: flex; }
    nav.site-nav a { justify-content: center; padding: 11px 16px; }

    .topbar { top: 6px; }
    .topbar-actions { margin-left: auto; }

    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    th, td { white-space: nowrap; }

    input[type="text"], input[type="password"], input[type="number"], input[type="email"],
    select, textarea { max-width: none; }
    .part-row input { max-width: none; }
    .floating-contact { left: 12px; bottom: 12px; }
    #scroll-top-btn { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   9. Print
   -------------------------------------------------------------------------- */
@media print {
    body { background: #fff !important; color: #000 !important; padding: 0; }
    .topbar, nav, .sidebar, #scroll-top-btn, #scroll-progress, .floating-contact, #menu-toggle, .search-box,
    form button[type="submit"], .no-print { display: none !important; }
    .app-shell.with-sidebar { margin-left: 0 !important; }
    .glass-card { background: #fff !important; border: 1px solid #000 !important; box-shadow: none !important; backdrop-filter: none !important; color: #000 !important; }
    h1, h2, h3, h4, p, td, th { color: #000 !important; }
    a { color: #000 !important; text-decoration: underline; }
    .status-badge { border: 1px solid #000 !important; background: #fff !important; color: #000 !important; }
}

/* ==========================================================================
   10. SIDEBAR, DASHBOARD AND PAGE LAYER (merged from ps-extras.css)
   ========================================================================== */

/* --- Theme toggle: one fixed screen position on every single page,
   regardless of where the button sits in each page's markup. --- */
body > #theme-toggle {
    position: fixed !important;
    top: 16px;
    right: 16px;
    z-index: 120;
}

/* --- Sidebar (authenticated pages) --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.6);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 100;
    transition: transform 0.25s ease;
}
:root[data-theme="light"] .sidebar { background: rgba(255, 255, 255, 0.7); }

.sidebar-brand { padding: 22px 20px 16px; border-bottom: 1px solid var(--glass-border); }

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

.side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--white-dim) !important;
    font-size: 0.88rem;
    font-weight: 500;
    position: relative;
}
.side-link svg { flex-shrink: 0; }
.side-link:hover { background: var(--glass-bg-strong); color: var(--white) !important; text-decoration: none; }
.side-link[aria-current="page"] {
    background: rgba(224, 27, 46, 0.14);
    color: var(--white) !important;
    border-left: 3px solid var(--red);
    padding-left: 9px;
}

.side-link-cta {
    background: var(--red);
    color: #fff !important;
    font-weight: 600;
    margin-bottom: 6px;
}
.side-link-cta:hover { background: var(--red-bright); color: #fff !important; }
.side-link-cta[aria-current="page"] { background: var(--red-deep); border-left: none; padding-left: 12px; }

.side-link-admin { border: 1px solid rgba(224, 27, 46, 0.4); color: var(--red-bright) !important; }
.side-link-admin:hover { background: rgba(224, 27, 46, 0.14); }

.side-bell-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.side-link-logout:hover { color: var(--red-bright) !important; }

.sidebar-user {
    padding: 12px;
    font-size: 0.78rem;
    color: var(--white-dim);
}
.sidebar-user .user-name { color: var(--white); font-weight: 600; font-size: 0.85rem; }
.sidebar-user .user-role { text-transform: capitalize; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 95;
    border: none;
    padding: 0;
    cursor: default;
}
.sidebar-overlay.open { display: block; }

/* --- Page content shifted right of the sidebar --- */
.app-shell.with-sidebar {
    margin-left: 240px;
    max-width: 900px;
    padding: 0 28px 48px;
}
.page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 0 18px;
}
.page-header h1 { font-size: 1.4rem; margin: 0; color: var(--white); }
#sidebar-toggle {
    display: none;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    color: var(--white);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .app-shell.with-sidebar { margin-left: 0; padding: 0 16px 40px; }
    #sidebar-toggle { display: inline-flex; }
    body > #theme-toggle { top: 12px; right: 12px; }
}

/* --- Contact popover (client-facing tracking page) --- */
.floating-contact-wrap { position: fixed; bottom: 24px; left: 24px; z-index: 60; }
.floating-contact-wrap .floating-contact {
    position: static;
    font-family: inherit;
    cursor: pointer;
}
.floating-contact-wrap .floating-contact:hover { background: var(--glass-bg-strong); border-color: var(--red); }
.contact-popover {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: var(--black-soft);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 16px 18px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.contact-popover.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.contact-label { margin: 0 0 4px; font-size: 0.78rem; color: var(--white-dim); }
.contact-number { margin: 0 0 12px; font-size: 1.35rem; font-weight: 600; letter-spacing: 0.02em; }
.contact-actions { display: flex; gap: 8px; }
.contact-actions a, .contact-actions button {
    flex: 1;
    text-align: center;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
}
.contact-call { background: var(--red); color: #fff !important; border: 1px solid var(--red); }
.contact-call:hover { background: var(--red-bright); text-decoration: none; }
.contact-actions button { background: transparent; border: 1px solid var(--glass-border); color: var(--white); }
.contact-actions button:hover { border-color: var(--white); background: transparent; }

/* --- "How it works" connected stepper (public landing page) --- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 28px; }
.step { position: relative; text-align: center; padding: 0 10px; }
.step:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 27px;
    left: calc(50% + 34px);
    width: calc(100% - 68px);
    height: 2px;
    background: linear-gradient(90deg, var(--glass-border), var(--red) 50%, var(--glass-border));
    opacity: 0.6;
}
.step-icon {
    position: relative;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.step:hover .step-icon { transform: translateY(-3px); border-color: var(--red); }
.step.attention .step-icon {
    background: rgba(224, 27, 46, 0.14);
    border-color: rgba(224, 27, 46, 0.45);
    color: var(--red-bright);
}
.step-num {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-body h4 { margin: 0 0 6px; color: var(--white); font-size: 0.95rem; }
.step-body p { margin: 0; font-size: 0.85rem; color: var(--white-dim); line-height: 1.5; }

@media (max-width: 760px) {
    .steps { grid-template-columns: 1fr; }
    .step { display: flex; gap: 16px; text-align: left; padding: 0 0 26px; }
    .step-icon { margin: 0; flex-shrink: 0; }
    .step:not(:last-child)::before {
        top: 62px;
        left: 27px;
        width: 2px;
        height: calc(100% - 66px);
        background: linear-gradient(180deg, var(--glass-border), var(--red), var(--glass-border));
    }
}

/* --- Master Data: tab bar splitting Models / Parts / Staff --- */
.tab-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 26px;
}
.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    color: var(--white-dim) !important;
    font-size: 0.87rem;
    font-weight: 500;
}
.tab-link:hover { border-color: var(--red); color: var(--white) !important; text-decoration: none; }
.tab-link.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff !important;
}
.tab-link .tab-count {
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.16);
    padding: 1px 7px;
    border-radius: 999px;
}
.tab-link.active .tab-count { background: rgba(255, 255, 255, 0.28); }

@media (max-width: 560px) {
    .tab-bar { gap: 6px; }
    .tab-link { flex: 1 1 auto; justify-content: center; padding: 9px 10px; font-size: 0.82rem; }
}

/* --- Select / dropdown design ---
   The closed box matches text inputs; the open option list is told to
   render in the app's own color scheme (color-scheme) instead of the
   browser's default, which is what was unreadable before — white text
   on a near-white native popup. A custom chevron replaces the native
   arrow so it isn't tied to the OS theme either. */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    max-width: 420px;
    background-color: rgba(255, 255, 255, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 40px 10px 14px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    color-scheme: dark;
}
select:hover { border-color: rgba(255, 255, 255, 0.32); }
select:focus {
    outline: none;
    border-color: var(--red-bright);
    box-shadow: 0 0 0 3px rgba(224, 27, 46, 0.25);
}
select option {
    background: var(--black-soft);
    color: var(--white);
}
select.select-sm { max-width: 260px; padding: 8px 34px 8px 12px; }

:root[data-theme="light"] select {
    background-color: rgba(0, 0, 0, 0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101010' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    color-scheme: light;
}
:root[data-theme="light"] select option {
    background: #FFFFFF;
    color: #101010;
}

/* --- Custom dropdown, replacing the native option list ---
   Chromium on Windows renders a <select>'s open popup using the OS's
   own combobox, not the page's CSS — color-scheme and option{} rules
   get ignored for that popup on that platform, which is why the list
   stayed white no matter what CSS targeted it. This builds the whole
   dropdown out of ordinary HTML the page actually controls. The real
   <select> stays in the DOM (invisible, sized to match the button) so
   forms still submit and validate exactly as before. */
.select-wrap { position: relative; max-width: 420px; }
.select-wrap.select-sm { max-width: 260px; }
.select-wrap select {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}
.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    text-align: left;
}
.select-wrap.select-sm .select-trigger { padding: 8px 12px; }
.select-trigger:hover { border-color: rgba(255, 255, 255, 0.32); }
.select-wrap.open .select-trigger { border-color: var(--red-bright); box-shadow: 0 0 0 3px rgba(224, 27, 46, 0.25); }
.select-trigger .chevron { flex-shrink: 0; display: flex; color: var(--white-dim); transition: transform 0.15s ease; }
.select-wrap.open .select-trigger .chevron { transform: rotate(180deg); }

.select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--black-soft);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--glass-shadow);
    padding: 6px;
    margin: 0;
    max-height: 240px;
    overflow-y: auto;
    list-style: none;
    z-index: 150;
}
.select-menu[hidden] { display: none; }
.select-option {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--white);
    cursor: pointer;
}
.select-option:hover, .select-option.highlighted { background: rgba(224, 27, 46, 0.16); }
.select-option[aria-selected="true"] { background: var(--red); color: #fff; }

:root[data-theme="light"] .select-trigger { background: rgba(0, 0, 0, 0.04); }
:root[data-theme="light"] .select-menu { background: #FFFFFF; }
:root[data-theme="light"] .select-option { color: #101010; }
:root[data-theme="light"] .select-option[aria-selected="true"] { color: #fff; }

/* --- Dashboard: status stat cards --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 30px;
}
@media (max-width: 560px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 16px 18px 14px;
    color: var(--white) !important;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--red); text-decoration: none; }
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.22);
}
.stat-card.attention::before { background: var(--red); }
.stat-card.is-active { border-color: var(--red); background: rgba(224, 27, 46, 0.12); }
.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white-dim);
    flex-shrink: 0;
}
.stat-card.attention .stat-icon { background: rgba(224, 27, 46, 0.16); color: var(--red-bright); }
.stat-num { font-size: 1.7rem; font-weight: 700; color: var(--red-bright); line-height: 1; }
.stat-label { font-size: 0.83rem; color: var(--white-dim); }

/* --- Dashboard: search field with inline icon --- */
.search-card { position: relative; max-width: 420px; flex: 1; }
.search-card .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white-dim);
    pointer-events: none;
}
.search-card input[type="text"] { padding-left: 38px; max-width: 100%; width: 100%; }

/* --- Dashboard: technician avatar chip --- */
.avatar-chip { display: inline-flex; align-items: center; gap: 8px; }
.avatar-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(224, 27, 46, 0.18);
    color: var(--red-bright);
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* --- Dashboard: empty state --- */
.dash-empty { text-align: center; padding: 48px 20px; color: var(--white-dim); }
.dash-empty svg { opacity: 0.45; margin-bottom: 12px; }
.dash-empty p { margin: 0; }
.dash-empty .dash-empty-title { color: var(--white); font-weight: 600; margin-bottom: 4px; }

/* ==========================================================================
   FIX: stop style.css's generic `nav` / `nav a` pill rules from leaking into
   the sidebar. Keep this block at the very END of the file.
   ========================================================================== */
.sidebar nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    margin: 0;
}
.sidebar nav.sidebar-nav { gap: 4px; padding: 14px 12px; }

.sidebar nav a.side-link {
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--white-dim) !important;
}
.sidebar nav a.side-link:hover { background: var(--glass-bg-strong); color: var(--white) !important; }
.sidebar nav a.side-link[aria-current="page"] {
    background: rgba(224, 27, 46, 0.14);
    border-left: 3px solid var(--red);
    padding-left: 9px;
    color: var(--white) !important;
}
.sidebar nav a.side-link-cta { background: var(--red); color: #fff !important; font-weight: 600; }
.sidebar nav a.side-link-cta:hover { background: var(--red-bright); }
.sidebar nav a.side-link-cta[aria-current="page"] { background: var(--red-deep); border-left: 0; padding-left: 12px; }
.sidebar nav a.side-link-admin { border: 1px solid rgba(224, 27, 46, 0.4); color: var(--red-bright) !important; }

/* Sidebar footer links aren't inside <nav>, but keep them consistent */
.sidebar-footer .side-link { background: transparent; }

/* ==========================================================================
   11. EMPTY STATES (renderEmptyState() in functions.php)
   ========================================================================== */
.empty-state { text-align: center; padding: 36px 20px 28px; color: var(--white-dim); }
.empty-art { display: block; width: 160px; max-width: 70%; height: auto; margin: 0 auto 14px; color: var(--white-dim); overflow: visible; }
.empty-state-message { margin: 0 0 4px; color: var(--white); font-weight: 600; font-size: 1.05rem; }
.empty-state-hint { max-width: 380px; margin: 0 auto 18px; font-size: 0.9rem; color: var(--white-dim); }
.empty-state-action {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--red);
    border: 1px solid var(--red);
    color: #FFFFFF !important;
    font-size: 0.9rem;
    font-weight: 600;
}
.empty-state-action:hover { background: var(--red-bright); border-color: var(--red-bright); text-decoration: none; }
.empty-state-action.secondary { background: var(--glass-bg-strong); border-color: var(--glass-border); color: var(--white) !important; font-weight: 500; }
.empty-state-action.secondary:hover { border-color: var(--red); background: var(--glass-bg-strong); }

.empty-float, .empty-sweep, .empty-z { transform-box: fill-box; }
.empty-float { transform-origin: center; animation: empty-float 3.2s ease-in-out infinite; }
.empty-sweep { transform-origin: 50% 50%; animation: empty-sweep 3.6s ease-in-out infinite; }
.empty-z { animation: empty-z 2.8s ease-in-out infinite; opacity: 0; }
.empty-z.z2 { animation-delay: 0.5s; }
.empty-z.z3 { animation-delay: 1s; }
@keyframes empty-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes empty-sweep { 0%, 100% { transform: translate(-4px, -2px) rotate(-6deg); } 50% { transform: translate(4px, 2px) rotate(6deg); } }
@keyframes empty-z { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
    .empty-float, .empty-sweep { animation: none; }
    .empty-z { animation: none; opacity: 0.7; }
}

/* ==========================================================================
   12. TOASTS (renderToast() in functions.php)
   ========================================================================== */
.toast-stack {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    background: var(--black-soft);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--white-faint);
    border-radius: var(--radius-sm);
    box-shadow: var(--glass-shadow);
    animation: toast-in 0.25s ease-out both;
}
.toast-success { border-left-color: #3DDC84; }
.toast-error { border-left-color: var(--red); background: var(--red-tint); }
.toast-icon { flex-shrink: 0; display: flex; margin-top: 1px; color: #3DDC84; }
.toast-error .toast-icon { color: var(--red-bright); }
.toast-body { flex: 1; font-size: 0.9rem; line-height: 1.45; color: var(--white); }
.toast .toast-close {
    flex-shrink: 0;
    display: flex;
    padding: 4px;
    color: var(--white-dim);
    background: transparent;
    border: none;
    border-radius: 6px;
}
.toast .toast-close:hover:not(:disabled) { color: var(--white); background: var(--glass-bg-strong); }
.toast-hide { animation: toast-out 0.2s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* ==========================================================================
   13. STAGE TRACKER (renderStageTracker() in functions.php)
   ========================================================================== */
.stage-tracker { display: flex; list-style: none; margin: 14px 0 22px; padding: 0; overflow-x: auto; }
.stage-step { position: relative; flex: 1 1 0; min-width: 84px; text-align: center; padding: 0 4px; }
.stage-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 8px;
    left: calc(50% + 12px);
    width: calc(100% - 24px);
    height: 2px;
    background: var(--glass-border);
}
.stage-step.done:not(:last-child)::after { background: var(--red); }
.stage-dot {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: var(--black-soft);
    border: 2px solid var(--glass-border);
}
.stage-step.done .stage-dot { background: var(--red); border-color: var(--red); }
.stage-step.current .stage-dot { border-color: var(--red-bright); box-shadow: 0 0 0 4px rgba(224, 27, 46, 0.25); background: var(--red); }
.stage-step.declined .stage-dot { background: var(--red-deep); border-color: var(--red-bright); }
.stage-label { display: block; font-size: 0.75rem; line-height: 1.3; color: var(--white-dim); }
.stage-step.current .stage-label { color: var(--white); font-weight: 600; }
.stage-step.declined .stage-label { color: var(--red-bright); }

/* ==========================================================================
   14. MOBILE PAINT FIXES (white block at the bottom of the phone screen)
   Android browsers can leave a tile of the page unpainted (shows as white)
   when many large backdrop-filter layers and a fixed background stack up.
   Give the root a real background color, and drop the blur on small screens.
   ========================================================================== */
html { background-color: #0A0A0A; color-scheme: dark; }
:root[data-theme="light"] { background-color: #FFFFFF; color-scheme: light; }
body { background-color: var(--black); }

@media (max-width: 900px) {
    body { background-attachment: scroll; }
    .glass-card, .topbar, .sidebar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .glass-card { background: rgba(30, 30, 33, 0.92); }
    .topbar { background: rgba(30, 30, 33, 0.96); }
    .sidebar { background: rgba(14, 14, 15, 0.98); }
    :root[data-theme="light"] .glass-card { background: rgba(255, 255, 255, 0.94); }
    :root[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.97); }
    :root[data-theme="light"] .sidebar { background: rgba(255, 255, 255, 0.98); }
}

/* ==========================================================================
   15. MOBILE MENU BUTTON: the hamburger icon was squeezed to a dot because
   the global button padding (18px sides) left only 4px inside a 40px box.
   ========================================================================== */
#sidebar-toggle { padding: 0; }
#sidebar-toggle svg { flex-shrink: 0; width: 18px; height: 18px; }
#sidebar-toggle:hover:not(:disabled) { background: var(--red-tint); border-color: var(--red); color: var(--white); }
@media (max-width: 900px) {
    .page-header { padding-right: 56px; } /* keep the title clear of the fixed theme toggle */
}

/* ==========================================================================
   16. THEME TOGGLE PLACEMENT
   Staff pages: the toggle lives in the sidebar footer (see nav.php) and the
   floating corner button is hidden there. Public pages: the toggle sits
   inside the top bar / login card instead of floating over the page.
   ========================================================================== */
button.side-link {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}
button.side-link:hover:not(:disabled) { background: var(--glass-bg-strong); border: 0; }
.side-theme-icon { display: flex; flex-shrink: 0; }

.topbar #theme-toggle, .login-card #theme-toggle {
    position: relative !important;
    top: auto;
    right: auto;
    z-index: auto;
}

/* ==========================================================================
   17. THEME TOGGLE SIZE: never let a flex row squash it into a thin pill
   ========================================================================== */
#theme-toggle {
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}
.login-card .brand-mark { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
.login-card .glass-card > div:first-child { align-items: center !important; gap: 12px; }

/* ==========================================================================
   18. DASHBOARD RIGHT PANEL: needs-attention list and recent activity
   ========================================================================== */
.app-shell.with-sidebar.wide { max-width: 1260px; }
.dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}
.dash-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.aside-card {
    margin: 0;
    padding: 18px 18px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}
.aside-card h3 { margin: 0 0 12px; font-size: 0.95rem; }
.aside-empty { margin: 0 0 6px; font-size: 0.85rem; color: var(--white-dim); }

.aside-list, .activity-feed { list-style: none; margin: 0; padding: 0; }
.aside-list { display: flex; flex-direction: column; gap: 8px; }
.aside-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--red);
    border-radius: var(--radius-sm);
    color: var(--white);
}
.aside-item:hover { border-color: var(--red); text-decoration: none; background: var(--red-tint); }
.aside-item-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.aside-item .jo-code { font-size: 0.82rem; }
.aside-age { font-size: 0.72rem; color: var(--white-dim); }
.aside-age.late { color: var(--red-bright); font-weight: 600; }
.aside-item-name { font-size: 0.88rem; font-weight: 500; }
.aside-item-note { font-size: 0.76rem; color: var(--white-dim); }

.activity-feed li { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.activity-feed li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 14px;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}
.activity-dot { flex-shrink: 0; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--red); }
.activity-line { font-size: 0.85rem; color: var(--white); line-height: 1.35; }
.activity-line .jo-code { font-size: 0.8rem; }
.activity-meta { font-size: 0.74rem; color: var(--white-dim); margin-top: 2px; }

@media (max-width: 1240px) {
    .dash-layout { grid-template-columns: minmax(0, 1fr); }
    .dash-aside { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* Password show/hide: icon-only square button */
.pw-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
}
.pw-toggle svg { display: block; flex-shrink: 0; }
