/* GENERATED BAYLEO CSS BUNDLE — DO NOT EDIT.
 * Sources, in cascade order: core.css
 * Rebuild with: venv\Scripts\python.exe tools\build_css_bundles.py
 */
/* Bayleo route-scoped stylesheet: shared shell and cross-surface components. Generated conservatively from static/style.css for Performance Slice 9. */

/* =========================================================
   PicPac UI
   Sections:
   1. Variables / base
   2. Layout / navigation
   3. Buttons / shared components
   4. Dashboard statistics
   5. Worker status bar
   6. Order cards / order detail
   7. Search / empty states
   8. Analytics
   9. Intake log
   10. Worker device
   11. Responsive
   ========================================================= */

/* 1. Variables / base */
:root {
    --bg: #f3f5f7;
    --panel: #ffffff;
    --text: #111827;
    --muted: #475467;
    --border: #d6dce6;

    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --blue-soft: #dbeafe;
    --blue-border: #bfdbfe;

    --open: #64748b;
    --picking: #2563eb;
    --packing: #d97706;
    --ready: #059669;
    --complete: #64748b;
    --danger: #b42318;
    --gold: #f59e0b;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 8px 20px rgba(23, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
}

a {
    color: inherit;
}

/* 2. Layout / navigation */
.page {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 18px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.brand h1 {
    margin: 0;
    color: var(--blue-dark);
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1;
}

.brand p {
    margin: 8px 0 0;
    color: var(--muted);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;
    padding: 0 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #f8fafc;
    color: var(--text);

    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;
}

.nav a.active {
    background: var(--text);
    color: #ffffff;
    border-color: var(--text);
}

/* 3. Buttons / shared components */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #ffffff;
}

.button.primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

.button.success {
    background: var(--ready);
    border-color: var(--ready);
    color: #ffffff;
}

.button.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #ffffff;
}

.button.secondary {
    background: #ffffff;
}

.button.warning {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.button.lunch {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}


/* 6. Order cards / order detail */
.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.priority-section {
    margin: 24px 0 30px;
}

.priority-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.priority-heading::after {
    content: "";
    flex: 1;
    height: 2px;
    border-radius: 999px;
    background: var(--border);
}

.priority-heading.open { color: var(--open); }
.priority-heading.picking { color: var(--picking); }
.priority-heading.packing { color: var(--packing); }
.priority-heading.ready-to-ship { color: var(--ready); }

.order-card,
.summary-card,
.item-card,
.confirm-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 17px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

.order-card {
    border-left: 10px solid var(--open);
}

.order-card:hover {
    box-shadow: var(--shadow-md);
}

.order-card.open { border-left-color: var(--open); }
.order-card.picking { border-left-color: var(--picking); }
.order-card.packing { border-left-color: var(--packing); }
.order-card.ready-to-ship { border-left-color: var(--ready); }
.order-card.complete { border-left-color: var(--complete); }

.order-header,
.order-state {
    display: flex;
    gap: 14px;
}

.order-header {
    align-items: flex-start;
    justify-content: space-between;
}

.order-state {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 8px;
}

.buyer {
    margin: 0 0 14px;
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.order-title {
    margin: 2px 0 0;
    font-size: clamp(19px, 2vw, 23px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.order-title a {
    color: var(--muted);
    text-decoration: none;
}

.order-title a:hover {
    color: var(--text);
}

.card-meta-row,
.platform-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.platform-badge,
.assignment-badge,
.order-age {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    width: fit-content;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid var(--border);
    line-height: 1;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.platform-badge { gap: 7px; background: #f8fafc; }
.platform-logo,
.assignment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    min-width: 17px;
    min-height: 17px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

.platform-logo { background: var(--text); }
.assignment-icon { color: inherit; font-size: 12px; }

.platform-whatnot { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.platform-whatnot .platform-logo { background: #6d28d9; }
.platform-ebay { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.platform-ebay .platform-logo { background: #2563eb; }
.platform-tiktok { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.platform-tiktok .platform-logo { background: #0f172a; }
.platform-shopify { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.platform-shopify .platform-logo { background: #16a34a; }
.platform-other .platform-logo { background: var(--muted); }

.assignment-available {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.assignment-assigned {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill.open { background: var(--open); }
.status-pill.picking { background: var(--picking); }
.status-pill.packing { background: var(--packing); }
.status-pill.ready-to-ship { background: var(--ready); }
.status-pill.complete { background: var(--complete); }

.order-age.age-fresh { color: var(--muted); background: #f8fafc; }
.order-age.age-warning { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.order-age.age-fulfilment-attention { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.order-age.age-fulfilment-slow { color: #b42318; background: #fff1f2; border-color: #fecdd3; }
.order-age.age-critical { color: #991b1b; background: #fef2f2; border-color: #fecaca; font-weight: 950; }
.order-age.age-complete { color: #047857; background: #ecfdf3; border-color: #abefc6; }

.metrics,
.worker-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.metric {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
}

.metric strong {
    display: block;
    font-size: 26px;
}

.metric span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 800;
}

.progress-track {
    height: 16px;
    width: 100%;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.progress-fill {
    height: 100%;
    width: var(--progress);
    border-radius: 999px;
    background: var(--blue);
}

.progress-complete .progress-fill { background: var(--ready); }
.progress-strong .progress-fill { background: var(--ready); }
.progress-mid .progress-fill { background: var(--packing); }
.progress-started .progress-fill { background: var(--picking); }
.progress-empty .progress-fill { background: var(--muted); }

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-layout,
.items-list {
    display: grid;
    gap: 16px;
}

.item-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
}

.item-name {
    margin: 6px 0 0;
    font-size: 20px;
    font-weight: 800;
}

.item-meta {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.item-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.confirm-card {
    max-width: 720px;
    margin: 30px auto;
}

.warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    padding: 16px;
    color: #9a3412;
    font-weight: 700;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 14px;
    margin: 16px 0 22px;
}

.report-summary > div {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 15px 16px;
    box-shadow: var(--shadow-sm);
}

.report-summary span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.report-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 34px;
    line-height: 1;
}

/* 7. Search / empty states */
.search-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px;
    margin: 0 0 14px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
}

.search-form .button.primary {
    background: var(--ready);
    border-color: var(--ready);
}

.search-input {
    min-height: 46px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 17px;
}

.search-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.filter-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: -8px 0 18px;
    color: var(--muted);
    font-weight: 800;
}

.auto-refresh-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 7px 12px;
    border: 1px solid var(--blue-border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    box-shadow: var(--shadow-sm);
}

.empty {
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: 20px;
    padding: 28px;
    color: var(--muted);
    font-weight: 700;
}


/* Authentication */
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #eef2f7;
}

.auth-page {
    width: min(460px, 100%);
    padding: 18px;
}

.auth-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    margin: 8px 0 8px;
    font-size: clamp(34px, 7vw, 54px);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.auth-card p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 750;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-form input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff5f5;
    color: var(--danger);
    font-size: 14px;
    font-weight: 850;
}

.auth-hint {
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.auth-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.auth-links a {
    color: var(--blue-dark);
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--blue-border);
    border-radius: 999px;
    background: #eff6ff;
    color: var(--blue-dark);
    font-size: 13px;
    font-weight: 850;
}

.worker-auth-card h1 {
    font-size: clamp(36px, 8vw, 58px);
}


/* Auth and staff management */
.auth-body {
    min-height: 100vh;
    background: #eef2f7;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.auth-card h1 {
    margin: 7px 0 8px;
    font-size: clamp(30px, 6vw, 42px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.auth-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 16px;
    font-weight: 750;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
}

.auth-form input,
.auth-form select,
.staff-create-form input {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    font-size: 16px;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-links {
    display: flex;
    justify-content: center;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.auth-error,
.auth-success,
.auth-empty {
    margin: 0 0 14px;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
}

.auth-error {
    border: 1px solid #fecaca;
    background: #fff5f5;
    color: #b42318;
}

.auth-success {
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #047857;
}

.auth-empty {
    border: 1px dashed var(--border);
    background: #f8fafc;
    color: var(--muted);
}

.auth-help {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
}

.staff-header-panel,
.staff-create-panel {
    margin: 0 0 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.staff-header-panel h2,
.staff-create-panel h2 {
    margin: 5px 0 6px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.staff-header-panel p,
.staff-create-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 750;
}

.staff-create-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
    margin-top: 16px;
}

.staff-create-form label {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 850;
}

.staff-message {
    margin-bottom: 16px;
}

.staff-list {
    display: grid;
    gap: 12px;
}

.staff-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.staff-card.staff-inactive {
    opacity: 0.68;
}

.staff-card h2 {
    margin: 4px 0 9px;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.staff-meta-row,
.staff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.staff-actions {
    justify-content: flex-end;
}

.staff-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.staff-pin-set {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #047857;
}

.staff-pin-needed {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.staff-small-button {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.walkthrough-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(3px);
}

.walkthrough-card {
    width: min(460px, 100%);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-md);
}

.walkthrough-card h2 {
    margin: 7px 0 8px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.walkthrough-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-weight: 750;
}

.walkthrough-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 700px) {
    .staff-create-form,
    .staff-card {
        grid-template-columns: 1fr;
    }

    .staff-actions {
        justify-content: stretch;
    }

    .staff-actions form,
    .staff-actions .button,
    .staff-create-form .button {
        width: 100%;
    }
}


/* Account strip */
.account-strip {
    display: flex;
    justify-content: flex-end;
    margin: -10px 0 18px;
}

.account-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
}

.account-icon {
    font-size: 13px;
}

.account-dot {
    color: var(--muted);
    font-weight: 950;
}

/* Team management polish */
.staff-header-panel h2,
.staff-create-panel h2 {
    letter-spacing: -0.055em;
}

.staff-card h2 {
    font-size: 25px;
}

.staff-meta-row {
    align-items: center;
}

@media (max-width: 780px) {
    .account-strip {
        justify-content: stretch;
        margin-top: -4px;
    }

    .account-pill {
        width: 100%;
        justify-content: center;
    }
}




/* =========================================================
   PicPac UI polish pass
   Calmer headings, cleaner secondary text, softer hierarchy.
   ========================================================= */

body {
    color: var(--text);
    font-size: 17px;
}

.brand h1 {
    font-size: clamp(30px, 4.4vw, 44px);
    letter-spacing: -0.045em;
}

.brand p {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
}

h1,
h2,
h3 {
    letter-spacing: -0.045em;
}

.page-kicker,
.worker-kicker {
    display: inline-block;
    color: #667085;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.055em;
    line-height: 1;
    text-transform: none;
}

.page-kicker.subtle {
    color: #667085;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.nav a {
    min-height: 34px;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 650;
}

.account-strip {
    margin: -12px 0 16px;
}

.account-pill {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 750;
}

.stats {
    gap: 13px;
}

.stat-link,
.stat {
    border-radius: 18px;
}

.stat-label {
    color: #475467;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.045em;
}

.stat-link strong {
    font-size: 32px;
    font-weight: 800;
}

.workers-bar-header,
.team-metrics-header {
    color: #475467;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.055em;
}

.priority-heading {
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.buyer {
    font-weight: 850;
}

.order-title {
    font-weight: 750;
}

.staff-header-panel,
.staff-create-panel,
.staff-card {
    border-radius: 18px;
}

.staff-header-panel,
.staff-create-panel {
    padding: 17px;
}

.staff-header-panel h2,
.staff-create-panel h2 {
    margin: 7px 0 7px;
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.staff-header-panel p,
.staff-create-panel p {
    color: #475467;
    font-size: 15px;
    font-weight: 450;
    line-height: 1.35;
}

.staff-card {
    padding: 15px;
}

.staff-card h2 {
    margin: 5px 0 10px;
    font-size: 22px;
    font-weight: 760;
    letter-spacing: -0.035em;
}

.staff-pill {
    min-height: 27px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 700;
}

.staff-create-form label,
.auth-form label {
    font-size: 13px;
    font-weight: 720;
}

.staff-create-form input,
.auth-form input,
.auth-form select {
    font-size: 15px;
}

.button {
    font-weight: 720;
}

.staff-small-button {
    font-size: 13px;
    font-weight: 700;
}

.auth-card h1 {
    font-size: clamp(28px, 5.6vw, 38px);
    font-weight: 760;
}

.auth-card p {
    color: #475467;
    font-weight: 560;
}

.walkthrough-card h2 {
    font-size: clamp(28px, 4.7vw, 38px);
    font-weight: 760;
}

.walkthrough-card p {
    color: #475467;
    font-weight: 560;
    line-height: 1.4;
}

@media (max-width: 780px) {
    .topbar {
        align-items: flex-start;
    }

    .staff-header-panel h2,
    .staff-create-panel h2 {
        font-size: 28px;
    }
}



/* Final team page polish */
.staff-header-panel > div > .page-kicker:first-child {
    display: none;
}

.staff-header-panel p,
.staff-create-panel p,
.auth-card p,
.walkthrough-card p {
    color: #475467;
    font-weight: 450;
}

.staff-header-panel h2,
.staff-create-panel h2 {
    margin-top: 0;
}

.staff-card .page-kicker.subtle {
    color: #475467;
    font-weight: 500;
}





/* =========================================================
   PicPac Professional Typography Polish V1
   Calmer commercial hierarchy for dashboard and worker device.
   ========================================================= */
:root {
    --font-ui: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-ui);
}

.brand h1 {
    font-weight: 780;
    letter-spacing: -0.055em;
}

.buyer {
    font-size: clamp(20px, 2.3vw, 27px) !important;
    font-weight: 780 !important;
    letter-spacing: -0.045em !important;
    line-height: 1.05 !important;
}

.order-title {
    font-size: clamp(15px, 1.5vw, 18px) !important;
    font-weight: 720 !important;
    letter-spacing: -0.018em !important;
}

.order-card .status-pill,
.order-card .order-age,
.order-card .platform-badge,
.order-card .assignment-badge,
.order-card .quick-stat {
    font-weight: 760 !important;
}

.order-card .progress-track {
    height: 10px !important;
}

.order-pack-remaining {
    color: #475569 !important;
    font-size: 0.82rem !important;
    font-weight: 650 !important;
}


/* System Health */
.account-strip {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.system-health-card {
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.system-health-card summary {
    list-style: none;
}

.system-health-card summary::-webkit-details-marker {
    display: none;
}

.system-health-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.28rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.system-health-summary:hover {
    border-color: #bfdbfe;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.system-health-title {
    color: #334155;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.system-health-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: nowrap;
}

.system-health-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 1.35rem;
    padding: 0 0.42rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.system-health-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.system-health-healthy .system-health-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.13);
}

.system-health-warning .system-health-dot,
.system-health-unknown .system-health-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.13);
}

.system-health-offline .system-health-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.13);
}

.system-health-popover {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 50;
    width: min(21rem, calc(100vw - 2rem));
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.system-health-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.system-health-popover-header strong {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 900;
}

.system-health-popover-header span {
    padding: 0.2rem 0.48rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.66rem;
    font-weight: 850;
}

.system-health-overall-healthy .system-health-popover-header span {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.system-health-overall-warning .system-health-popover-header span {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.system-health-overall-offline .system-health-popover-header span {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.system-health-detail-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.system-health-detail-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    background: #f8fafc;
}

.system-health-detail-row strong,
.system-health-detail-row span,
.system-health-detail-row small {
    display: block;
}

.system-health-detail-row strong {
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 900;
}

.system-health-detail-row span {
    margin-top: 0.16rem;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
}

.system-health-detail-row small {
    margin-top: 0.18rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.25;
}


.system-health-card[open] .system-health-popover {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .system-health-card:hover .system-health-popover,
    .system-health-card:focus-within .system-health-popover {
        display: block;
    }
}

@media (max-width: 760px) {
    .account-strip {
        justify-content: stretch;
    }

    .system-health-card,
    .system-health-summary {
        width: 100%;
    }

    .system-health-summary {
        justify-content: space-between;
        border-radius: 0.85rem;
    }

    .system-health-popover {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
    }
}


/* System Health compact final polish */
.system-health-summary {
    user-select: none;
}

.system-health-pill.system-health-healthy {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #047857;
}

.system-health-pill.system-health-warning,
.system-health-pill.system-health-unknown {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.system-health-pill.system-health-offline {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

@media (hover: hover) and (pointer: fine) {
    .system-health-card[open] .system-health-popover {
        display: block;
    }
}


/* System Health V1.4: binary status only.
   Green means healthy. Red means offline/action needed. */
.system-health-warning .system-health-dot,
.system-health-unknown .system-health-dot {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.13);
}

.system-health-overall-warning .system-health-popover-header span {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.system-health-pill.system-health-warning,
.system-health-pill.system-health-unknown {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}


/* =========================================================
   Mobile Admin Phase 1
   Purpose: make the admin dashboard feel intentional on phones.
   ========================================================= */
.mobile-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: #ffffff;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.mobile-nav-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.admin-order-top-actions {
    margin: 0 0 0.85rem;
}

.admin-order-detail-layout {
    align-items: start;
}

@media (max-width: 820px) {
    html {
        scroll-padding-top: 0.8rem;
    }

    body {
        font-size: 16px;
        overflow-x: hidden;
    }

    .page {
        width: 100%;
        padding: 0.75rem;
    }

    .topbar {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.75rem;
        margin-bottom: 0.7rem;
    }

    .brand h1 {
        font-size: clamp(2rem, 10vw, 2.7rem);
    }

    .brand p {
        margin-top: 0.25rem;
        font-size: 0.92rem;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        justify-self: end;
        margin-top: 0.1rem;
    }

    .nav {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: 0;
        z-index: 1000;
        display: none;
        width: min(18rem, calc(100vw - 1.5rem));
        padding: 0.5rem;
        border: 1px solid var(--border);
        border-radius: 1rem;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
    }

    .nav.is-open {
        display: grid;
        gap: 0.42rem;
    }

    .nav a {
        width: 100%;
        min-height: 44px;
        border-radius: 0.78rem;
        justify-content: flex-start;
        padding: 0 0.9rem;
        font-size: 0.92rem;
    }

    .account-strip {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 0.35rem 0 0.85rem;
    }

    .account-pill {
        width: 100%;
        justify-content: center;
    }

    .system-health-card,
    .system-health-summary {
        width: 100%;
    }

    h1 {
        margin: 0.85rem 0 0.65rem;
        font-size: clamp(1.8rem, 8vw, 2.35rem);
        line-height: 1.03;
        letter-spacing: -0.055em;
    }

    .stats,
    .analytics-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.65rem !important;
        margin: 0.8rem 0 1rem !important;
    }

    .stat-link,
    .stat {
        min-height: 82px;
        padding: 0.75rem;
        border-radius: 1rem;
    }

    .stat-link {
        column-gap: 0.65rem;
    }

    .stat-icon {
        width: 2.4rem;
        height: 2.4rem;
        border-radius: 0.8rem;
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.68rem;
        letter-spacing: 0.055em;
    }

    .stat-link strong {
        font-size: 2rem;
    }

    .supervisor-action-centre,
    .operations-overview-bar,
    .search-panel,
    .live-feed-panel {
        border-radius: 1rem !important;
    }

    .supervisor-action-grid,
    .operations-overview-grid {
        grid-template-columns: 1fr !important;
    }

    .operations-overview-grid {
        max-height: 17.5rem;
        overflow: auto;
        padding-right: 0.1rem;
    }

    .dashboard-v3-workspace {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.9rem !important;
        margin-top: 0.8rem !important;
    }

    .dashboard-v3-main,
    .dashboard-v3-side {
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-v3-side {
        order: 2;
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .search-form {
        grid-template-columns: 1fr auto !important;
        gap: 0.45rem;
    }

    .search-form .button.primary {
        min-width: 0;
        padding-inline: 0.75rem;
    }

    .search-input {
        min-height: 44px;
        font-size: 0.96rem;
    }

    .priority-section {
        margin: 1rem 0 1.25rem;
    }

    .priority-heading {
        gap: 0.65rem;
        margin-bottom: 0.65rem;
        font-size: 0.82rem;
        letter-spacing: 0.08em;
    }

    .orders-grid,
    .priority-section .orders-grid.single-order,
    .priority-section .orders-grid:not(.single-order) {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }

    .order-card {
        border-left-width: 0.45rem;
        border-radius: 1.05rem;
        padding: 0.95rem;
    }

    .order-header {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.6rem !important;
    }

    .order-state {
        max-width: 100% !important;
        align-items: flex-start !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    .buyer {
        margin-bottom: 0.55rem;
        font-size: clamp(1.45rem, 7vw, 1.9rem);
    }

    .order-title {
        font-size: 1.05rem;
    }

    .card-meta-row,
    .platform-row,
    .order-quick-stats,
    .card-actions {
        gap: 0.4rem !important;
    }

    .platform-badge,
    .assignment-badge,
    .order-age,
    .quick-stat {
        min-height: 30px;
        height: auto;
        padding: 0.38rem 0.55rem;
        font-size: 0.75rem;
        line-height: 1.12;
    }

    .card-actions .button,
    .order-card .button {
        min-height: 44px;
        flex: 1 1 10rem;
        padding: 0.65rem 0.8rem;
    }

    .live-feed-panel {
        margin-bottom: 4.7rem;
    }

    .live-feed-summary-grid,
    .live-feed-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .live-feed-event {
        grid-template-columns: auto 1fr auto !important;
        gap: 0.5rem !important;
    }

    .live-feed-event-detail {
        font-size: 0.78rem;
    }

    .picpac-overlay {
        z-index: 9000 !important;
    }

    .pip-companion {
        right: 0.75rem !important;
        bottom: 1rem !important;
        transform: scale(0.88) !important;
        transform-origin: right bottom !important;
    }

    .pip-panel {
        right: -0.15rem !important;
        bottom: 4.9rem !important;
        width: min(20rem, calc(100vw - 1.2rem)) !important;
    }

    .admin-order-detail-page {
        display: grid;
        gap: 0.8rem;
    }

    .admin-order-top-actions {
        margin: 0;
    }

    .admin-back-button {
        width: 100%;
        justify-content: center;
    }

    .admin-order-detail-layout,
    .detail-layout {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }

    .admin-order-summary-card,
    .summary-card {
        border-radius: 1.1rem;
        padding: 1rem;
    }

    .admin-order-summary-card .order-header,
    .summary-card .order-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
    }

    .admin-order-summary-card .status-pill,
    .summary-card .status-pill {
        width: fit-content;
    }

    .metrics,
    .worker-metrics {
        gap: 0.5rem;
        margin: 0.85rem 0;
    }

    .metric {
        padding: 0.75rem 0.45rem;
    }

    .metric strong {
        font-size: 1.75rem;
    }

    .metric span {
        font-size: 0.78rem;
    }

    .admin-order-primary-actions .button,
    .summary-card .card-actions .button {
        width: 100%;
        min-height: 54px;
        font-size: 1rem;
    }

    .admin-order-action-zone h2 {
        margin: 0.2rem 0 0.7rem;
        font-size: 1.45rem;
    }

    .admin-order-item-card,
    .item-card {
        grid-template-columns: 1fr !important;
        align-items: stretch;
        gap: 0.7rem;
        padding: 0.95rem;
        border-radius: 1rem;
    }

    .item-name {
        font-size: 1.05rem;
        line-height: 1.22;
    }

    .admin-order-item-action,
    .item-card .button.primary {
        width: 100%;
        min-height: 54px;
        font-size: 1rem;
    }
}

@media (max-width: 430px) {
    .page {
        padding: 0.55rem;
    }

    .stats,
    .analytics-stats {
        gap: 0.5rem !important;
    }

    .stat-link,
    .stat {
        min-height: 76px;
        padding: 0.65rem;
    }

    .stat-icon {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 1rem;
    }

    .stat-link strong {
        font-size: 1.8rem;
    }

    .brand h1 {
        font-size: 2.05rem;
    }

    .brand p {
        font-size: 0.82rem;
    }

    .mobile-nav-toggle span:last-child {
        display: none;
    }

    .mobile-nav-toggle {
        width: 2.75rem;
        padding: 0;
    }

    .pip-companion {
        transform: scale(0.78) !important;
    }
}



/* 12. Evidence capture */
.evidence-capture-gate {
    display: grid;
    gap: 16px;
}

.evidence-capture-panel {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.evidence-camera-frame {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 280px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #0f172a;
}

.evidence-camera-video,
.evidence-camera-preview {
    width: 100%;
    max-height: 440px;
    display: block;
    object-fit: contain;
    background: #0f172a;
}

.evidence-camera-placeholder {
    position: absolute;
    inset: 16px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    color: #e5e7eb;
    text-align: center;
}

.evidence-camera-placeholder strong {
    font-size: 22px;
}

.evidence-camera-placeholder span {
    max-width: 360px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.35;
}

.evidence-capture-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.evidence-capture-status {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.evidence-capture-form {
    display: grid;
    gap: 14px;
}

.completion-evidence-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--text);
    font-weight: 750;
    line-height: 1.35;
}

.completion-evidence-check input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.worker-evidence-capture-panel .evidence-camera-frame {
    min-height: 320px;
}

.worker-evidence-capture-panel .evidence-capture-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.worker-evidence-capture-panel .evidence-retake-photo:not([hidden]) {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .evidence-camera-frame {
        min-height: 240px;
    }

    .evidence-capture-actions,
    .worker-evidence-capture-panel .evidence-capture-actions {
        grid-template-columns: 1fr;
    }
}


/* 12. Diagnostic information bubbles */
.platform-state-wrap,
.diagnostic-label-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.diagnostic-label-row {
    justify-content: flex-start;
    width: 100%;
}

.diagnostic-info {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    z-index: 30;
}

.diagnostic-info > summary {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.diagnostic-info > summary::-webkit-details-marker {
    display: none;
}

.diagnostic-info > summary:hover,
.diagnostic-info > summary:focus-visible {
    border-color: #60a5fa;
    color: #1d4ed8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.diagnostic-info[open] > summary {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.diagnostic-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(340px, calc(100vw - 36px));
    padding: 14px;
    border: 1px solid #d6dce6;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    text-align: left;
    z-index: 9999;
}

.diagnostic-popover::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-left: 1px solid #d6dce6;
    border-top: 1px solid #d6dce6;
    background: #ffffff;
    transform: rotate(45deg);
}

.diagnostic-popover-title {
    margin-bottom: 10px;
    padding-right: 18px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.25;
}

.diagnostic-popover-section + .diagnostic-popover-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.diagnostic-popover-section strong {
    display: block;
    color: #475569;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.diagnostic-popover-section p {
    margin: 4px 0 0;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.48;
}

.diagnostic-info-success > summary {
    border-color: #bbf7d0;
    color: #15803d;
    background: #f0fdf4;
}

.diagnostic-info-warning > summary {
    border-color: #fed7aa;
    color: #c2410c;
    background: #fff7ed;
}

.diagnostic-info-error > summary,
.diagnostic-info-blocked > summary {
    border-color: #fecaca;
    color: #b42318;
    background: #fef2f2;
}

.diagnostic-info:not([open]) > .diagnostic-popover {
    display: none;
}

.diagnostic-info[open] > .diagnostic-popover {
    display: block;
}

@media (max-width: 700px) {
    .diagnostic-popover {
        position: fixed;
        left: 18px;
        right: 18px;
        top: auto;
        bottom: 18px;
        width: auto;
        max-height: min(72vh, 520px);
        overflow-y: auto;
    }

    .diagnostic-popover::before {
        display: none;
    }
}


/* Diagnostic bubble float-layer correction */
.connections-shell,
.platform-grid {
    overflow: visible !important;
}

.connections-shell .platform-card {
    overflow: visible !important;
}

.connections-shell .platform-card:hover,
.connections-shell .platform-card:focus-within {
    z-index: 200;
}

.connections-shell .platform-card::before {
    border-radius: 1.1rem 1.1rem 0 0;
}

.connections-shell .diagnostic-info {
    z-index: 220;
}

.connections-shell .diagnostic-popover {
    z-index: 99999;
}


/* 13. PicPac Info Card final polish */
.platform-grid,
.connections-shell,
.shopify-wizard,
.wizard-grid,
.capability-checks {
    overflow: visible !important;
}

.platform-grid {
    isolation: isolate;
}

.platform-card,
.wizard-card,
.connector-check,
.capability-check,
.wizard-check {
    position: relative;
}

.platform-card:has(.diagnostic-info[open]),
.wizard-card:has(.diagnostic-info[open]),
.connector-check:has(.diagnostic-info[open]),
.capability-check:has(.diagnostic-info[open]),
.wizard-check:has(.diagnostic-info[open]) {
    z-index: 5000 !important;
}

.diagnostic-info[open] {
    z-index: 10000 !important;
}

.diagnostic-info[open] > summary {
    position: relative;
    z-index: 10002;
}

.diagnostic-info[open] > .diagnostic-popover {
    display: block;
    z-index: 10001 !important;
    animation: picpacInfoCardIn .17s cubic-bezier(.2,.8,.2,1) both;
}

.diagnostic-popover {
    width: min(330px, calc(100vw - 34px));
    padding: 15px;
    border-color: #dbe4f0;
    border-radius: 16px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, .18),
        0 3px 10px rgba(15, 23, 42, .06);
}

.diagnostic-popover-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
    line-height: 1.2;
}

.diagnostic-popover-title-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 950;
}

.diagnostic-popover-section + .diagnostic-popover-section {
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid #e8edf4;
}

.diagnostic-popover-section strong {
    color: #64748b;
    font-size: 9px;
    letter-spacing: .1em;
}

.diagnostic-popover-section p {
    margin-top: 4px;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.48;
}

@keyframes picpacInfoCardIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .diagnostic-info[open] > .diagnostic-popover {
        animation: none;
    }
}


/* =========================================================
   PicPac UI V2 permanent application shell
   Presentation-only overrides: page bodies retain their existing components.
   ========================================================= */
.app-shell-v2 {
    --shell-sidebar-width: 214px;
    --shell-sidebar-collapsed-width: 68px;
    --shell-header-height: 72px;
    margin: 0;
    min-width: 320px;
    background: #f6f8fb;
    color: #0f172a;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
}

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

.app-shell-v2 .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    display: flex;
    width: var(--shell-sidebar-width);
    min-height: 100vh;
    padding: 20px 16px 16px;
    flex-direction: column;
    overflow: hidden auto;
    border-right: 1px solid #e3e8f0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 8px 0 30px rgba(15, 23, 42, .025);
    transition: width .2s ease, padding .2s ease, transform .2s ease;
}

.app-shell-v2 .shell-brand {
    flex: 0 0 auto;
    min-width: 0;
}

.app-shell-v2 .shell-brand-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 59px;
    color: #2563eb;
    text-decoration: none;
}

.app-shell-v2 .shell-logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    background: #e9f0ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .07);
}

.app-shell-v2 .shell-logo-cube {
    width: 24px;
    height: 24px;
}

.app-shell-v2 .shell-brand-copy {
    display: grid;
    min-width: 0;
    padding-top: 1px;
    color: #0f172a;
}

.app-shell-v2 .shell-brand-copy strong {
    color: #2563eb;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1.1;
}

.app-shell-v2 .shell-brand-copy small {
    margin-top: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.app-shell-v2 .shell-navigation {
    display: grid;
    gap: 3px;
    margin-top: 22px;
}

.app-shell-v2 .shell-nav-group {
    min-width: 0;
}

.app-shell-v2 .shell-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 39px;
    padding: 0 10px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.app-shell-v2 .shell-nav-link:hover,
.app-shell-v2 .shell-nav-link:focus-visible {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #1d4ed8;
    outline: none;
}

.app-shell-v2 .shell-nav-link.active {
    border-color: #dbe7ff;
    background: linear-gradient(90deg, #edf3ff 0%, #e7efff 100%);
    color: #1458dc;
    box-shadow: inset 3px 0 0 #2563eb;
}

.app-shell-v2 .shell-nav-icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.app-shell-v2 .shell-icon {
    width: 21px;
    height: 21px;
}

.app-shell-v2 .shell-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-shell-v2 .shell-subnav {
    display: none;
    margin: 3px 0 7px 34px;
    padding: 4px 0 3px 13px;
    border-left: 1px solid #dbe3ef;
}

.app-shell-v2 .shell-nav-group-orders.is-active .shell-subnav {
    display: grid;
}

.app-shell-v2 .shell-subnav a {
    padding: 6px 8px;
    border-radius: 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.app-shell-v2 .shell-subnav a:hover,
.app-shell-v2 .shell-subnav a:focus-visible,
.app-shell-v2 .shell-subnav a.active {
    background: #f1f5f9;
    color: #1d4ed8;
    outline: none;
}

.app-shell-v2 .shell-sidebar-footer {
    display: grid;
    gap: 13px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e6ebf2;
}

.app-shell-v2 .shell-collapse-control {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 0 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.app-shell-v2 .shell-collapse-control:hover,
.app-shell-v2 .shell-collapse-control:focus-visible {
    background: #f1f5f9;
    color: #1d4ed8;
    outline: none;
}

.app-shell-v2 .shell-collapse-control .shell-icon {
    width: 17px;
    height: 17px;
    transition: transform .2s ease;
}

.app-shell-v2 .shell-system-status {
    padding: 11px 12px;
    border: 1px solid #dce3ed;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}

.app-shell-v2 .shell-system-status-title {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0f172a;
    font-size: 10px;
}

.app-shell-v2 .shell-system-status-icon {
    display: grid;
    place-items: center;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: 8px;
    font-weight: 900;
}

.app-shell-v2 .shell-system-status p {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 7px 0 0;
    color: #059669;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.3;
}

.app-shell-v2 .shell-system-status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border: 2px solid #bbf7d0;
    border-radius: 50%;
    background: #22c55e;
}

.app-shell-v2 .shell-system-status-warning .shell-system-status-icon,
.app-shell-v2 .shell-system-status-warning .shell-system-status-dot {
    background: #f59e0b;
}

.app-shell-v2 .shell-system-status-warning p {
    color: #b45309;
}

.app-shell-v2 .shell-system-status-offline .shell-system-status-icon,
.app-shell-v2 .shell-system-status-offline .shell-system-status-dot {
    background: #ef4444;
}

.app-shell-v2 .shell-system-status-offline p {
    color: #b42318;
}

.app-shell-v2 .shell-version {
    padding-left: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
}

.app-shell-v2 .shell-legal {
    padding-left: 4px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.35;
}

.sales-today-provider-provenance {
    grid-column: 3;
    justify-self: end;
    color: #087b79;
    font-size: .64rem;
    font-weight: 700;
    line-height: 1;
}

/* Bayleo UI branding prototype.
   The traced wordmark is deliberately temporary, while the shared component
   remains the stable boundary for the eventual production master. */
.bayleo-brand {
    display: inline-grid;
    gap: 5px;
    justify-items: start;
    min-width: 0;
}

.bayleo-wordmark {
    display: block;
    width: 116px;
    max-width: 100%;
    height: auto;
}

.bayleo-brand-sidebar {
    box-sizing: border-box;
    gap: 4px;
    padding: 2px 10px;
}

.bayleo-brand-sidebar .bayleo-wordmark {
    width: 107px;
}

.bayleo-brand-sidebar .bayleo-brand-supporting {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.bayleo-brand-supporting {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.bayleo-brand-auth {
    margin-bottom: 14px;
}

.bayleo-brand-auth .bayleo-wordmark {
    width: 138px;
}

.auth-legal {
    display: block;
    margin-top: 20px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.bayleo-brand-worker {
    gap: 0;
}

.bayleo-brand-worker .bayleo-wordmark,
.bayleo-brand-workbench .bayleo-wordmark {
    width: 76px;
}

.bayleo-brand-workbench {
    flex: 0 0 auto;
}

.shell-mobile-brand {
    display: none;
    width: max-content;
    color: inherit;
    text-decoration: none;
}

.bayleo-brand-mobile {
    gap: 0;
}

.bayleo-brand-mobile .bayleo-wordmark {
    width: 86px;
}

/* First-order launch guidance is a compact read-only projection of live state. */
.first-order-launch {
    margin: 0.9rem 0 1rem;
    padding: 1rem;
    border: 1px solid #cbdcf4;
    border-radius: 1rem;
    background: linear-gradient(145deg, #f8fbff 0%, #ffffff 72%);
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.05);
}

.first-order-launch-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.first-order-launch-header h2 {
    margin: 0.15rem 0 0.25rem;
    font-size: 1.1rem;
}

.first-order-launch-header p {
    margin: 0;
    color: #526174;
    font-size: 0.88rem;
}

.first-order-launch-kicker {
    color: #2563eb;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.first-order-launch-progress {
    flex: 0 0 auto;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #e8f0ff;
    color: #1d4ed8;
    font-size: 0.78rem;
    font-weight: 800;
}

.first-order-launch-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.first-order-launch-step {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.8rem;
    background: #ffffff;
}

.first-order-launch-step.is-current {
    border-color: #93b4ef;
    box-shadow: inset 3px 0 #2563eb;
}

.first-order-launch-step.needs-attention {
    border-color: #f0c36d;
    background: #fffaf0;
    box-shadow: inset 3px 0 #d97706;
}

.first-order-launch-step.is-complete {
    background: #f4fbf7;
    border-color: #b7dec7;
}

.first-order-launch-marker {
    display: inline-grid;
    place-items: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: #e8eef7;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 850;
}

.first-order-launch-step.is-complete .first-order-launch-marker {
    background: #d9f2e3;
    color: #137044;
}

.first-order-launch-copy {
    display: grid;
    min-width: 0;
    gap: 0.12rem;
}

.first-order-launch-copy strong {
    color: #172033;
    font-size: 0.86rem;
}

.first-order-launch-copy > span {
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.3;
}

.first-order-launch-action {
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.first-order-launch-action:hover,
.first-order-launch-action:focus-visible {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .first-order-launch-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .first-order-launch-header {
        display: grid;
    }

    .first-order-launch-progress {
        width: fit-content;
    }

    .first-order-launch-step {
        grid-template-columns: 1.7rem minmax(0, 1fr);
    }

    .first-order-launch-action {
        grid-column: 2;
        justify-self: start;
    }
}

.app-shell-v2 .app-workspace {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--shell-sidebar-width);
    transition: margin-left .2s ease;
}

.app-shell-v2 .app-header {
    position: sticky;
    top: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: var(--shell-header-height);
    padding: 11px 20px;
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    background: rgba(248, 250, 252, .92);
    box-shadow: 0 5px 20px rgba(15, 23, 42, .025);
    backdrop-filter: blur(14px);
}

.app-shell-v2 .shell-page-context {
    min-width: 0;
}

.app-shell-v2 .shell-page-context h1 {
    margin: 0;
    overflow: hidden;
    color: #0f172a;
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 850;
    letter-spacing: -.035em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell-v2 .shell-page-context p {
    margin: 6px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
}

.app-shell-v2 .shell-heading-wave {
    display: inline-block;
    margin-left: 3px;
    font-size: .84em;
    transform: rotate(-8deg);
}

.app-shell-v2 .shell-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.app-shell-v2 .shell-header-health {
    display: flex;
    align-items: center;
}

.app-shell-v2 .shell-header-health:empty {
    display: none;
}

.app-shell-v2 .shell-header-health .system-health-summary {
    min-height: 30px;
    padding: 3px 5px;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.app-shell-v2 .shell-header-health .system-health-pill {
    min-height: 23px;
    padding: 0 8px;
    font-size: 10px;
}

.app-shell-v2 .shell-header-health .system-health-popover {
    right: 0;
    top: calc(100% + 9px);
}

.app-shell-v2 .shell-account-menu {
    position: relative;
    min-width: 190px;
    padding-left: 17px;
    border-left: 1px solid #e2e8f0;
}

.app-shell-v2 .shell-account-menu > summary {
    display: grid;
    grid-template-columns: 38px minmax(80px, 1fr) 16px;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 4px 6px;
    border-radius: 11px;
    list-style: none;
    cursor: pointer;
}

.app-shell-v2 .shell-account-menu > summary::-webkit-details-marker {
    display: none;
}

.app-shell-v2 .shell-account-menu > summary:hover,
.app-shell-v2 .shell-account-menu > summary:focus-visible {
    background: #f1f5f9;
    outline: none;
}

.app-shell-v2 .shell-account-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #f0eefe;
    color: #5b3aa4;
}

.app-shell-v2 .shell-account-avatar .shell-icon {
    width: 19px;
    height: 19px;
}

.app-shell-v2 .shell-account-copy {
    display: grid;
    min-width: 0;
}

.app-shell-v2 .shell-account-copy strong,
.app-shell-v2 .shell-account-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-shell-v2 .shell-account-copy strong {
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.app-shell-v2 .shell-account-copy small {
    margin-top: 3px;
    color: #475569;
    font-size: 10px;
    font-weight: 600;
}

.app-shell-v2 .shell-account-chevron {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform .15s ease;
}

.app-shell-v2 .shell-account-menu[open] .shell-account-chevron {
    transform: rotate(180deg);
}

.app-shell-v2 .shell-account-popover {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 100;
    display: grid;
    width: 210px;
    padding: 8px;
    border: 1px solid #dce3ed;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
}

.app-shell-v2 .shell-account-popover > div {
    display: grid;
    gap: 2px;
    margin-bottom: 5px;
    padding: 9px 10px 11px;
    border-bottom: 1px solid #e8edf3;
}

.app-shell-v2 .shell-account-popover strong {
    font-size: 12px;
}

.app-shell-v2 .shell-account-popover span {
    color: #64748b;
    font-size: 10px;
}

.app-shell-v2 .shell-account-popover a,
.app-shell-v2 .shell-account-popover .shell-account-action-form button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.app-shell-v2 .shell-account-popover a:hover,
.app-shell-v2 .shell-account-popover a:focus-visible,
.app-shell-v2 .shell-account-popover .shell-account-action-form button:hover,
.app-shell-v2 .shell-account-popover .shell-account-action-form button:focus-visible {
    background: #f1f5f9;
    color: #1d4ed8;
    outline: none;
}

.shell-account-action-form,
.csrf-action-form {
    margin: 0;
}

.csrf-action-form {
    display: inline-flex;
}

.app-shell-v2 .shell-mobile-menu,
.app-shell-v2 .shell-mobile-backdrop {
    display: none;
}

.app-shell-v2 .page {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;
    padding: 16px 20px 30px;
}

.shell-sidebar-collapsed .app-sidebar {
    width: var(--shell-sidebar-collapsed-width);
    padding-inline: 14px;
}

.shell-sidebar-collapsed .app-workspace {
    margin-left: var(--shell-sidebar-collapsed-width);
}

.shell-sidebar-collapsed .shell-brand-copy,
.shell-sidebar-collapsed .bayleo-brand-copy,
.shell-sidebar-collapsed .bayleo-brand-supporting,
.shell-sidebar-collapsed .shell-nav-label,
.shell-sidebar-collapsed .shell-subnav,
.shell-sidebar-collapsed .shell-collapse-control span,
.shell-sidebar-collapsed .shell-system-status,
.shell-sidebar-collapsed .shell-version {
    display: none;
}

.shell-sidebar-collapsed .shell-legal {
    display: none;
}

.shell-sidebar-collapsed .shell-brand-link,
.shell-sidebar-collapsed .shell-nav-link,
.shell-sidebar-collapsed .shell-collapse-control {
    justify-content: center;
}

.shell-sidebar-collapsed .bayleo-brand-sidebar .bayleo-wordmark {
    width: 31px;
}

.shell-sidebar-collapsed .bayleo-brand-sidebar {
    gap: 0;
    padding-inline: 0;
}

.shell-sidebar-collapsed .shell-nav-link {
    padding-inline: 0;
}

.shell-sidebar-collapsed .shell-collapse-control .shell-icon {
    transform: rotate(180deg);
}

@media (max-width: 1100px) {
    .app-shell-v2 .app-header {
        gap: 16px;
        padding-inline: 22px;
    }

    .app-shell-v2 .shell-header-actions {
        gap: 10px;
    }

    .app-shell-v2 .shell-account-menu {
        min-width: 56px;
    }

    .app-shell-v2 .shell-account-menu > summary {
        grid-template-columns: 38px 14px;
    }

    .app-shell-v2 .shell-account-copy {
        display: none;
    }

    .app-shell-v2 .page {
        padding-inline: 22px;
    }
}

@media (max-width: 850px) {
    .app-shell-v2 .app-sidebar {
        width: min(260px, calc(100vw - 48px));
        padding-inline: 20px;
        transform: translateX(-105%);
        box-shadow: 18px 0 45px rgba(15, 23, 42, .17);
    }

    .app-shell-v2 .app-workspace,
    .shell-sidebar-collapsed .app-workspace {
        margin-left: 0;
    }

    .shell-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .app-shell-v2 .shell-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 110;
        border: 0;
        background: rgba(15, 23, 42, .28);
    }

    .shell-mobile-open .shell-mobile-backdrop {
        display: block;
    }

    .app-shell-v2 .shell-mobile-menu {
        display: grid;
        place-items: center;
        width: 39px;
        height: 39px;
        padding: 0;
        border: 1px solid #dce3ed;
        border-radius: 10px;
        background: #fff;
        color: #334155;
        box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
        cursor: pointer;
    }

    .app-shell-v2 .app-header {
        grid-template-columns: 39px minmax(0, 1fr) auto;
        min-height: 78px;
        padding: 13px 18px;
    }

    .app-shell-v2 .shell-header-health {
        display: none;
    }

    .app-shell-v2 .shell-sidebar-footer,
    .app-shell-v2 .shell-system-status,
    .app-shell-v2 .shell-version {
        display: grid;
    }

    .app-shell-v2 .shell-brand-copy,
    .app-shell-v2 .shell-nav-label {
        display: grid;
    }

    .app-shell-v2 .shell-nav-group-orders.is-active .shell-subnav {
        display: grid;
    }
}

@media (max-width: 620px) {
    .app-shell-v2 .app-header {
        grid-template-columns: 38px minmax(0, 1fr) 47px;
        gap: 10px;
        padding-inline: 12px;
    }

    .app-shell-v2 .shell-page-context h1 {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .app-shell-v2 .shell-page-context p {
        display: none;
    }

    .app-shell-v2 .shell-mobile-brand {
        display: block;
    }

    .app-shell-v2 .shell-account-menu {
        min-width: 47px;
        padding-left: 8px;
    }

    .app-shell-v2 .shell-account-menu > summary {
        display: grid;
        grid-template-columns: 34px;
        min-height: 40px;
        padding: 2px;
    }

    .app-shell-v2 .shell-account-avatar {
        width: 34px;
        height: 34px;
    }

    .app-shell-v2 .shell-account-chevron {
        display: none;
    }

    .app-shell-v2 .page {
        padding: 15px 12px 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell-v2 .app-sidebar,
    .app-shell-v2 .app-workspace,
    .app-shell-v2 .shell-collapse-control .shell-icon,
    .app-shell-v2 .shell-account-chevron {
        transition: none;
    }
}

/* =========================================================
   Project Harmony — Sprint 2
   Premium visual system for the approved PicPac V2 shell.
   ========================================================= */
.app-shell-v2 {
    /* Typography */
    --type-display: clamp(1.55rem, 2.2vw, 1.9rem);
    --type-h1: clamp(1.35rem, 1.8vw, 1.6rem);
    --type-h2: clamp(1.05rem, 1.3vw, 1.2rem);
    --type-h3: .92rem;
    --type-body: .875rem;
    --type-small: .75rem;
    --type-caption: .65rem;
    --weight-regular: 450;
    --weight-medium: 560;
    --weight-semibold: 660;
    --weight-display: 720;

    /* Spacing */
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 1.5rem;
    --space-10: 2rem;

    /* Surfaces */
    --surface-border: #e1e7ef;
    --surface-border-strong: #d5dde8;
    --surface-radius-sm: .625rem;
    --surface-radius: .875rem;
    --surface-radius-lg: 1.05rem;
    --surface-shadow: 0 1px 2px rgba(15, 23, 42, .025), 0 4px 12px rgba(15, 23, 42, .025);
    --surface-shadow-hover: 0 2px 4px rgba(15, 23, 42, .035), 0 8px 18px rgba(15, 23, 42, .04);
}

/* Type scale and reading rhythm */
.app-shell-v2 .shell-page-context h1 {
    font-size: var(--type-h1);
    font-weight: var(--weight-display);
    letter-spacing: -.025em;
}

.app-shell-v2 .shell-page-context p {
    margin-top: var(--space-1);
    color: #64748b;
    font-size: var(--type-small);
    font-weight: var(--weight-regular);
    line-height: 1.45;
}

.app-shell-v2 .page {
    color: #1e293b;
    font-size: var(--type-body);
    font-weight: var(--weight-regular);
    line-height: 1.55;
}

.app-shell-v2 .page h1,
.app-shell-v2 .page h2,
.app-shell-v2 .page h3 {
    color: #0f172a;
    text-wrap: balance;
}

.app-shell-v2 .page > h1,
.app-shell-v2 .page .page-title {
    margin: 0 0 var(--space-6);
    font-size: var(--type-h1);
    font-weight: var(--weight-display);
    letter-spacing: -.028em;
    line-height: 1.2;
}

.app-shell-v2 .page h2 {
    font-size: var(--type-h2);
    font-weight: var(--weight-semibold);
    letter-spacing: -.018em;
    line-height: 1.3;
}

.app-shell-v2 .page h3 {
    font-size: var(--type-h3);
    font-weight: var(--weight-semibold);
    letter-spacing: -.01em;
    line-height: 1.35;
}

.app-shell-v2 .page p,
.app-shell-v2 .page li,
.app-shell-v2 .page td,
.app-shell-v2 .page dd {
    line-height: 1.55;
}

.app-shell-v2 .page small,
.app-shell-v2 .page .small,
.app-shell-v2 .page .help-text,
.app-shell-v2 .page .form-help {
    color: #64748b;
    font-size: var(--type-small);
    font-weight: var(--weight-regular);
    line-height: 1.45;
}

.app-shell-v2 .page .page-kicker,
.app-shell-v2 .page .worker-kicker,
.app-shell-v2 .page .stat-label,
.app-shell-v2 .page .priority-heading,
.app-shell-v2 .page [class*="-kicker"] {
    color: #64748b;
    font-size: var(--type-caption);
    font-weight: var(--weight-semibold);
    letter-spacing: .075em;
    line-height: 1.25;
    text-transform: uppercase;
}

.app-shell-v2 .page .buyer {
    margin-bottom: var(--space-2);
    font-size: 1.35rem !important;
    font-weight: var(--weight-display) !important;
    letter-spacing: -.025em !important;
    line-height: 1.2 !important;
}

.app-shell-v2 .page .order-title {
    font-size: .95rem !important;
    font-weight: var(--weight-medium) !important;
    letter-spacing: -.008em !important;
    line-height: 1.35 !important;
}

.app-shell-v2 .page .stat-link strong,
.app-shell-v2 .page .metric strong,
.app-shell-v2 .page .analytics-card strong,
.app-shell-v2 .page [class*="metric-card"] strong {
    font-weight: var(--weight-display);
    letter-spacing: -.025em;
}

/* Section rhythm */
.app-shell-v2 .page .stats {
    gap: var(--space-3);
    margin: 0 0 var(--space-8);
}

.app-shell-v2 .page .workers-bar,
.app-shell-v2 .page .team-metrics,
.app-shell-v2 .page .search-bar,
.app-shell-v2 .page .filter-summary,
.app-shell-v2 .page .priority-section,
.app-shell-v2 .page .analytics-filter-form,
.app-shell-v2 .page .analytics-grid,
.app-shell-v2 .page .timeline-layout {
    margin-bottom: var(--space-8);
}

.app-shell-v2 .page .orders-grid,
.app-shell-v2 .page .analytics-grid,
.app-shell-v2 .page .staff-grid,
.app-shell-v2 .page .platform-grid,
.app-shell-v2 .page .items-list,
.app-shell-v2 .page .detail-layout {
    gap: var(--space-4);
}

.app-shell-v2 .page .priority-heading {
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.app-shell-v2 .page .priority-heading::after {
    height: 1px;
    background: #dce3ec;
}

/* Shared cards and panels */
.app-shell-v2 .page :is(
    .stat-link,
    .stat,
    .order-card,
    .summary-card,
    .item-card,
    .confirm-card,
    .analytics-card,
    .staff-card,
    .staff-header-panel,
    .staff-create-panel,
    .timeline-card,
    .connection-card,
    .connection-panel,
    .platform-card,
    .wizard-card
) {
    border-width: 1px;
    border-radius: var(--surface-radius-lg);
    box-shadow: var(--surface-shadow);
}

.app-shell-v2 .page :is(
    .stat-link,
    .order-card,
    .analytics-card,
    .staff-card,
    .timeline-card,
    .connection-card,
    .platform-card
):hover {
    box-shadow: var(--surface-shadow-hover);
}

.app-shell-v2 .page :is(
    .order-card,
    .summary-card,
    .item-card,
    .confirm-card,
    .analytics-card,
    .staff-card,
    .staff-header-panel,
    .staff-create-panel,
    .timeline-card,
    .connection-card,
    .connection-panel,
    .platform-card,
    .wizard-card
) {
    padding: var(--space-4);
}

.app-shell-v2 .page .order-card {
    border-left-width: 5px;
}

.app-shell-v2 .page .stat-link,
.app-shell-v2 .page .stat {
    min-height: 78px;
    padding: var(--space-3);
}

.app-shell-v2 .page .metric {
    padding: var(--space-3);
    border-color: var(--surface-border);
    border-radius: var(--surface-radius-sm);
    background: #fafbfc;
}

.app-shell-v2 .page .card-meta-row,
.app-shell-v2 .page .platform-row {
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.app-shell-v2 .page .card-actions {
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.app-shell-v2 .page .progress-track,
.app-shell-v2 .page .order-card .progress-track {
    height: 7px !important;
}

.app-shell-v2 .page .progress-label {
    margin-bottom: var(--space-2);
    font-size: var(--type-small);
    font-weight: var(--weight-medium);
}

/* Buttons */
.app-shell-v2 .page .button,
.app-shell-v2 .page button.button,
.app-shell-v2 .page input[type="submit"] {
    min-height: 34px;
    padding: .45rem .75rem;
    border-radius: var(--surface-radius-sm);
    box-shadow: none;
    font-size: var(--type-small);
    font-weight: var(--weight-semibold);
    letter-spacing: 0;
    line-height: 1.15;
}

.app-shell-v2 .page .button:hover,
.app-shell-v2 .page button.button:hover {
    box-shadow: 0 3px 9px rgba(15, 23, 42, .07);
}

.app-shell-v2 .page :is(.button.secondary, .button.warning) {
    border-color: var(--surface-border-strong);
    background: #fff;
}

/* Pills and compact operational labels */
.app-shell-v2 .page :is(
    .status-pill,
    .order-age,
    .platform-badge,
    .assignment-badge,
    .staff-pill,
    .auth-pill,
    .item-status,
    .quick-stat,
    .platform-state,
    .amazon-pill,
    .connection-pill
) {
    min-height: 22px;
    height: auto;
    padding: .2rem .45rem;
    border-radius: 999px;
    font-size: var(--type-caption);
    font-weight: var(--weight-semibold) !important;
    letter-spacing: .015em;
    line-height: 1.1;
}

.app-shell-v2 .page .status-pill {
    text-transform: uppercase;
}

.app-shell-v2 .page :is(.platform-logo, .assignment-icon) {
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
    font-size: 8px;
}

/* Forms */
.app-shell-v2 .page form label,
.app-shell-v2 .page .form-label {
    color: #475569;
    font-size: var(--type-small);
    font-weight: var(--weight-medium);
    letter-spacing: .005em;
    line-height: 1.35;
}

.app-shell-v2 .page :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]) {
    min-height: 38px;
    padding: .5rem .7rem;
    border: 1px solid var(--surface-border-strong);
    border-radius: var(--surface-radius-sm);
    background: #fff;
    color: #1e293b;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, .025);
    font-size: var(--type-body);
    font-weight: var(--weight-regular);
    line-height: 1.35;
}

.app-shell-v2 .page textarea {
    min-height: 92px;
    resize: vertical;
}

.app-shell-v2 .page :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #93b4f8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.app-shell-v2 .page :is(
    .staff-create-form,
    .auth-form,
    .analytics-filter-form,
    .connection-config-grid,
    .form-grid
) {
    gap: var(--space-4);
}

.app-shell-v2 .page fieldset {
    padding: var(--space-4);
    border: 1px solid var(--surface-border);
    border-radius: var(--surface-radius);
}

.app-shell-v2 .page legend {
    padding-inline: var(--space-2);
    color: #475569;
    font-size: var(--type-small);
    font-weight: var(--weight-semibold);
}

/* Refine shell weight without changing its structure. */
.app-shell-v2 .shell-brand-copy strong {
    font-weight: var(--weight-display);
}

.app-shell-v2 .shell-nav-link {
    font-weight: var(--weight-medium);
}

.app-shell-v2 .shell-nav-link.active {
    font-weight: var(--weight-semibold);
}

.app-shell-v2 .shell-account-copy strong,
.app-shell-v2 .shell-account-popover strong {
    font-weight: var(--weight-semibold);
}

.app-shell-v2 .shell-header-health .system-health-pill {
    font-weight: var(--weight-semibold);
}

@media (max-width: 620px) {
    .app-shell-v2 .page > h1,
    .app-shell-v2 .page .page-title {
        margin-bottom: var(--space-5);
        font-size: 1.25rem;
    }

    .app-shell-v2 .page :is(
        .order-card,
        .summary-card,
        .item-card,
        .confirm-card,
        .analytics-card,
        .staff-card,
        .timeline-card,
        .connection-card,
        .connection-panel,
        .platform-card,
        .wizard-card
    ) {
        padding: var(--space-4);
    }
}


/* Administrator MFA enrolment */
.admin-mfa-card {
    width: min(100%, 520px);
}

.admin-mfa-eyebrow {
    margin-bottom: 6px;
    color: #0f8f78;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-mfa-status {
    display: grid;
    gap: 4px;
    margin: 20px 0;
    padding: 16px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
}

.admin-mfa-status strong {
    color: #0f172a;
}

.admin-mfa-status--active {
    border-color: #b7dfd2;
    background: #f2fbf7;
}

.admin-mfa-status--pending {
    border-color: #f0d59e;
    background: #fffaf0;
}

.admin-mfa-qr {
    display: flex;
    justify-content: center;
    margin: 22px 0;
}

.admin-mfa-qr svg {
    width: min(100%, 240px);
    height: auto;
}

.admin-mfa-identity {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
}

.admin-mfa-identity div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.admin-mfa-identity dt {
    color: #64748b;
}

.admin-mfa-identity dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}

.admin-mfa-manual {
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid #dbe3ea;
    border-radius: 10px;
}

.admin-mfa-manual code {
    display: block;
    overflow-wrap: anywhere;
    margin-top: 10px;
    color: #0f172a;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
}

.admin-mfa-confirm-reset {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px;
}

.admin-mfa-confirm-reset input {
    width: auto;
    margin-top: 3px;
}

.admin-mfa-recovery-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 24px;
    margin: 22px 0;
    padding: 18px 18px 18px 42px;
    border: 1px solid #dbe3ea;
    border-radius: 12px;
    background: #f8fafc;
}

.admin-mfa-recovery-list code {
    color: #0f172a;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.admin-mfa-back {
    display: inline-block;
    margin-top: 18px;
    color: #475569;
}

@media (max-width: 520px) {
    .admin-mfa-recovery-list {
        grid-template-columns: 1fr;
    }

    .admin-mfa-identity div {
        display: grid;
        gap: 2px;
    }

    .admin-mfa-identity dd {
        text-align: left;
    }
}

/* Bayleo Experience Sprint 1: restrained shell identity and stable placement. */
.app-shell-v2 {
    --brand-primary: #114E5A;
    --brand-primary-hover: #0D3F49;
    --brand-soft: #E7F1F2;
    --brand-border: #C7DDDF;
    --brand-focus: #2B7A85;
}

.bayleo-wordmark {
    aspect-ratio: 1492 / 519;
    object-fit: contain;
}

.bayleo-brand-sidebar {
    gap: 4px;
    padding: 3px 10px 5px;
}

.bayleo-brand-sidebar .bayleo-wordmark {
    width: 104px;
}

.bayleo-brand-sidebar .bayleo-brand-supporting {
    color: #6b7787;
    font-size: 11px;
    font-weight: 540;
    line-height: 1.2;
}

.app-shell-v2 .shell-brand-link {
    min-height: 56px;
    color: var(--brand-primary);
}

.app-shell-v2 .shell-header-pip {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.app-shell-v2 .shell-nav-link:hover,
.app-shell-v2 .shell-nav-link:focus-visible {
    border-color: var(--brand-border);
    background: #f3f8f8;
    color: var(--brand-primary-hover);
    outline: 3px solid rgba(43, 122, 133, .22);
    outline-offset: 1px;
}

.app-shell-v2 .shell-nav-link.active {
    border-color: var(--brand-border);
    border-left-color: var(--brand-primary);
    border-left-width: 3px;
    background: var(--brand-soft);
    color: var(--brand-primary);
}

.app-shell-v2 .shell-subnav a:hover,
.app-shell-v2 .shell-subnav a:focus-visible,
.app-shell-v2 .shell-subnav a.active,
.app-shell-v2 .shell-collapse-control:hover,
.app-shell-v2 .shell-collapse-control:focus-visible {
    background: var(--brand-soft);
    color: var(--brand-primary);
    outline: 2px solid rgba(43, 122, 133, .2);
    outline-offset: 1px;
}

.app-shell-v2 .shell-account-popover a:hover,
.app-shell-v2 .shell-account-popover a:focus-visible {
    background: var(--brand-soft);
    color: var(--brand-primary);
}

.first-order-launch-kicker,
.first-order-launch-action {
    color: var(--brand-primary);
}

.first-order-launch-progress {
    background: var(--brand-soft);
    color: var(--brand-primary);
}

.first-order-launch-step.is-current {
    border-color: var(--brand-border);
    border-left-color: var(--brand-primary);
    border-left-width: 3px;
}

.shell-sidebar-collapsed .bayleo-brand-sidebar .bayleo-wordmark {
    width: 42px;
}

.shell-sidebar-collapsed .shell-brand-link {
    min-height: 56px;
    align-items: center;
}

@media (max-width: 850px) {
    .app-shell-v2 .bayleo-brand-sidebar .bayleo-wordmark {
        width: 104px;
    }
}

@media (max-width: 620px) {
    .app-shell-v2 .app-header {
        grid-template-columns: 38px minmax(0, 1fr) auto;
    }

    .app-shell-v2 .shell-header-actions {
        gap: 6px;
    }

    .app-shell-v2 .shell-account-menu {
        min-width: 43px;
        padding-left: 4px;
    }

    .app-shell-v2 .bayleo-brand-mobile .bayleo-wordmark {
        width: 84px;
    }
}

/* Bayleo Experience Sprint 1 refinement: calm operational hierarchy. */
.app-shell-v2 .app-header {
    gap: 18px;
    padding: 9px 18px;
}

.app-shell-v2 .shell-page-context p {
    margin-top: 4px;
}

.app-shell-v2 .shell-header-actions,
.app-shell-v2 .shell-operational-status {
    display: flex;
    align-items: center;
    min-width: 0;
}

.app-shell-v2 .shell-header-actions {
    gap: 11px;
}

.app-shell-v2 .shell-operational-status {
    gap: 7px;
    padding-right: 11px;
    border-right: 1px solid #e2e8f0;
}

.app-shell-v2 .shell-account-menu {
    min-width: 172px;
    padding-left: 0;
    border-left: 0;
}

.app-shell-v2 .shell-sidebar-footer {
    gap: 10px;
    padding-top: 16px;
}

.app-shell-v2 .shell-system-status {
    padding: 7px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.app-shell-v2 .shell-system-status-title {
    gap: 7px;
    color: #445065;
}

.app-shell-v2 .shell-system-status-icon {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #22c55e;
}

.app-shell-v2 .shell-system-status p {
    margin-top: 5px;
    padding-left: 14px;
    color: #657186;
    font-weight: 560;
}

.app-shell-v2 .shell-system-status p .shell-system-status-dot {
    display: none;
}

.app-shell-v2 .shell-system-status-warning .shell-system-status-icon {
    background: #f59e0b;
}

.app-shell-v2 .shell-system-status-offline .shell-system-status-icon {
    background: #ef4444;
}

.app-shell-v2 .shell-version,
.app-shell-v2 .shell-legal {
    padding-left: 4px;
    color: #8a94a5;
}

.app-shell-v2 .page {
    padding-top: 14px;
}


/* Sticky Operational Ribbon: one persistent, opaque shell stack. */
.app-shell-v2 .shell-persistent-top {
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    background: #f8fafc;
}

.app-shell-v2 .shell-persistent-top .app-header {
    position: static;
    top: auto;
    background: #f8fafc;
    backdrop-filter: none;
}

.app-shell-v2 .shell-operational-ribbon-host.page {
    margin: 0 auto;
    padding: 0 20px;
    background: #f8fafc;
}

.app-shell-v2 .shell-operational-ribbon-host.page .active-orders-dashboard .dashboard-workflow-metrics {
    position: static;
    top: auto;
    z-index: auto;
    margin: 0;
    border-top: 0;
    background: #f8fafc;
    backdrop-filter: none;
}

@media (max-width: 850px) {
    .app-shell-v2 .shell-operational-ribbon-host.page {
        padding-inline: 14px;
    }
}

@media (max-width: 620px) {
    .app-shell-v2 .shell-operational-ribbon-host.page {
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell-v2 .shell-persistent-top,
    .app-shell-v2 .shell-operational-ribbon-host {
        scroll-behavior: auto;
        transition: none;
    }
}

/* Bayleo dark navigation frame: final sidebar cascade boundary. */
.app-shell-v2 {
    --shell-sidebar-navy: #061824;
    --shell-sidebar-navy-deep: #04131d;
    --shell-sidebar-text: #dce8ec;
    --shell-sidebar-muted: #8fa7b1;
    --shell-sidebar-teal: #087383;
    --shell-sidebar-teal-bright: #38b8c3;
}

.app-shell-v2 .app-sidebar {
    padding: 18px 11px 14px;
    border-right: 1px solid rgba(75, 152, 164, .2);
    background:
        radial-gradient(circle at 18% 4%, rgba(24, 112, 127, .17), transparent 28%),
        linear-gradient(180deg, var(--shell-sidebar-navy) 0%, var(--shell-sidebar-navy-deep) 100%);
    box-shadow: 10px 0 34px rgba(3, 15, 23, .14);
    color: var(--shell-sidebar-text);
    scrollbar-color: rgba(99, 155, 165, .34) transparent;
    scrollbar-width: thin;
}

.app-shell-v2 .app-sidebar::-webkit-scrollbar {
    width: 6px;
}

.app-shell-v2 .app-sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(99, 155, 165, .3);
}

.app-shell-v2 .shell-brand {
    padding: 0 9px 15px;
    border-bottom: 1px solid rgba(159, 199, 205, .13);
}

.app-shell-v2 .shell-brand-link {
    min-height: 61px;
    align-items: flex-start;
    padding: 3px 0 0;
    color: #fff;
}

.app-shell-v2 .bayleo-brand-sidebar {
    gap: 6px;
    padding: 0;
}

.app-shell-v2 .bayleo-brand-sidebar .bayleo-wordmark {
    width: 111px;
    filter: brightness(0) invert(1);
}

.app-shell-v2 .bayleo-brand-sidebar .bayleo-brand-supporting {
    color: #a5b8c0;
    font-size: 10px;
    font-weight: 520;
    letter-spacing: .01em;
}

.app-shell-v2 .shell-navigation {
    gap: 5px;
    margin-top: 17px;
}

.app-shell-v2 .shell-nav-link {
    min-height: 42px;
    gap: 11px;
    padding: 0 11px;
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--shell-sidebar-text);
    font-size: 12px;
    font-weight: 630;
    letter-spacing: -.005em;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.app-shell-v2 .shell-nav-icon {
    width: 21px;
    height: 21px;
    flex-basis: 21px;
    color: #adc1c8;
    transition: color .15s ease, transform .15s ease;
}

.app-shell-v2 .shell-nav-link:hover {
    border-color: rgba(145, 193, 201, .12);
    background: rgba(225, 247, 249, .065);
    color: #fff;
    outline: none;
    transform: translateX(1px);
}

.app-shell-v2 .shell-nav-link:hover .shell-nav-icon {
    color: #d5f2f4;
}

.app-shell-v2 .shell-nav-link:focus-visible {
    border-color: rgba(92, 198, 209, .68);
    background: rgba(17, 112, 126, .26);
    color: #fff;
    outline: 2px solid rgba(68, 192, 204, .4);
    outline-offset: 2px;
}

.app-shell-v2 .shell-nav-link.active {
    border-color: rgba(56, 184, 195, .16);
    border-left-color: rgba(56, 184, 195, .46);
    border-left-width: 1px;
    background: linear-gradient(90deg, rgba(8, 115, 131, .82), rgba(6, 92, 108, .72));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--shell-sidebar-teal-bright), 0 5px 16px rgba(0, 20, 29, .18);
}

.app-shell-v2 .shell-nav-link.active .shell-nav-icon {
    color: #dcfbfd;
}

.app-shell-v2 .shell-subnav {
    margin: 4px 4px 7px 31px;
    padding: 3px 0 3px 12px;
    border-left-color: rgba(151, 196, 203, .2);
}

.app-shell-v2 .shell-subnav a {
    color: #8fa7b1;
    font-size: 10px;
    font-weight: 620;
}

.app-shell-v2 .shell-subnav a:hover,
.app-shell-v2 .shell-subnav a:focus-visible,
.app-shell-v2 .shell-subnav a.active {
    background: rgba(8, 115, 131, .2);
    color: #e3f5f6;
    outline-color: rgba(56, 184, 195, .34);
}

.app-shell-v2 .shell-sidebar-footer {
    gap: 9px;
    padding: 14px 5px 1px;
    border-top-color: rgba(159, 199, 205, .14);
}

.app-shell-v2 .shell-collapse-control {
    min-height: 35px;
    gap: 8px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #a5b8c0;
    font-size: 10px;
    font-weight: 620;
}

.app-shell-v2 .shell-collapse-control:hover,
.app-shell-v2 .shell-collapse-control:focus-visible {
    border-color: rgba(145, 193, 201, .15);
    background: rgba(225, 247, 249, .065);
    color: #fff;
    outline: 2px solid rgba(56, 184, 195, .3);
    outline-offset: 1px;
}

.app-shell-v2 .shell-system-status {
    padding: 9px 6px 7px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .025);
}

.app-shell-v2 .shell-system-status-title {
    gap: 7px;
    color: #d9e6ea;
    font-size: 9px;
    font-weight: 650;
}

.app-shell-v2 .shell-system-status-icon {
    width: 7px;
    height: 7px;
    flex-basis: 7px;
    background: #2dcc72;
    box-shadow: 0 0 0 3px rgba(45, 204, 114, .08);
}

.app-shell-v2 .shell-system-status p {
    margin-top: 5px;
    padding-left: 14px;
    color: #8fa7b1;
    font-size: 9px;
    font-weight: 520;
}

.app-shell-v2 .shell-system-status-warning .shell-system-status-icon {
    background: #f4ad32;
    box-shadow: 0 0 0 3px rgba(244, 173, 50, .08);
}

.app-shell-v2 .shell-system-status-warning p {
    color: #d6ad66;
}

.app-shell-v2 .shell-system-status-offline .shell-system-status-icon {
    background: #e3665c;
    box-shadow: 0 0 0 3px rgba(227, 102, 92, .08);
}

.app-shell-v2 .shell-system-status-offline p {
    color: #d59a95;
}

.app-shell-v2 .shell-version,
.app-shell-v2 .shell-legal {
    padding-left: 6px;
    color: #718a95;
    font-weight: 520;
}

.app-shell-v2 .shell-version {
    margin-top: 2px;
    font-size: 9px;
}

.app-shell-v2 .shell-legal {
    font-size: 8px;
}

.shell-sidebar-collapsed .app-sidebar {
    padding: 16px 10px 13px;
}

.shell-sidebar-collapsed .shell-brand {
    display: grid;
    min-height: 58px;
    place-items: start center;
    padding: 4px 0 13px;
}

.shell-sidebar-collapsed .shell-brand-link {
    width: 100%;
    min-height: 34px;
    justify-content: center;
    padding-top: 6px;
}

.shell-sidebar-collapsed .bayleo-brand-sidebar .bayleo-wordmark {
    width: 43px;
    filter: brightness(0) invert(1);
}

.shell-sidebar-collapsed .shell-navigation {
    gap: 7px;
    margin-top: 14px;
}

.shell-sidebar-collapsed .shell-nav-link {
    width: 44px;
    min-height: 42px;
    margin-inline: auto;
    padding: 0;
    justify-content: center;
    border-radius: 11px;
}

.shell-sidebar-collapsed .shell-nav-link:hover {
    transform: none;
}

.shell-sidebar-collapsed .shell-nav-link.active {
    border-color: rgba(56, 184, 195, .2);
    background: rgba(8, 115, 131, .72);
    box-shadow: inset 0 0 0 1px rgba(105, 214, 222, .2), 0 5px 14px rgba(0, 17, 25, .2);
}

.shell-sidebar-collapsed .shell-sidebar-footer {
    padding-inline: 0;
}

.shell-sidebar-collapsed .shell-collapse-control {
    width: 44px;
    min-height: 38px;
    margin-inline: auto;
    justify-content: center;
    padding: 0;
}

@media (max-width: 850px) {
    .app-shell-v2 .app-sidebar {
        width: min(260px, calc(100vw - 48px));
        padding: 18px 15px 14px;
        box-shadow: 18px 0 45px rgba(0, 11, 17, .36);
    }

    .app-shell-v2 .bayleo-brand-sidebar .bayleo-wordmark {
        width: 111px;
    }

    .app-shell-v2 .shell-brand-copy,
    .app-shell-v2 .bayleo-brand-copy,
    .app-shell-v2 .bayleo-brand-supporting,
    .app-shell-v2 .shell-nav-label,
    .app-shell-v2 .shell-system-status,
    .app-shell-v2 .shell-version {
        display: initial;
    }

    .app-shell-v2 .shell-nav-link {
        width: auto;
        justify-content: flex-start;
        padding-inline: 11px;
    }
}

.platform-mark {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.connection-logo-mini.platform-mark {
    width: 23px;
    height: 23px;
    min-width: 23px;
    font-size: 12px;
}

.platform-mark-shopify {
    background: #dcfce7;
    color: #15803d;
}

.platform-mark-whatnot {
    background: #e2e8f0;
    color: #334155;
}

.platform-mark-amazon {
    position: relative;
    background: #f8fafc;
    color: #111827;
    font-family: Georgia, serif;
}

.platform-mark-amazon::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 8px;
    width: 12px;
    height: 5px;
    border-bottom: 2px solid #f59e0b;
    border-radius: 0 0 999px 999px;
}

.platform-mark-ebay {
    background: #eef2ff;
    color: #2563eb;
    font-family: Arial, Helvetica, sans-serif;
}

.platform-mark-tiktok {
    background: #0f172a;
    color: #ffffff;
}

/* Shared shell header compaction retained from the pre-bundle stylesheet. */
@media (max-width: 1100px) {
    .app-shell-v2 .shell-operational-status {
        padding-right: 9px;
    }

    .app-shell-v2 .shell-account-menu {
        min-width: 52px;
    }
}

@media (max-width: 850px) {
    .app-shell-v2 .app-header {
        padding-inline: 14px;
    }

    .app-shell-v2 .shell-operational-status {
        padding-right: 0;
        border-right: 0;
    }
}
