/* ============================================
   THRONE ROOM DASHBOARD STYLES
   Standalone version — Shopify overrides removed
   ============================================ */

/* The Outfit webfont is linked from base.html <head> so it downloads in parallel
   with this stylesheet. An @import here would serialize it behind this file. */

:root {
    --throne-bg-dark: #f8fafc;
    --throne-bg-mid: #ffffff;
    --throne-sidebar-bg: #0353A4;
    --throne-sidebar-width: 248px;
    --throne-sidebar-collapsed-width: 64px;
    --throne-accent-blue: #023e7d;
    --throne-accent-gold: #fbbf24;
    --throne-text-primary: #0f172a;
    --throne-text-secondary: #475569;
    --throne-border: rgba(0, 0, 0, 0.08);
    --throne-font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --throne-body-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --throne-sidebar-text: #ffffff;
    --throne-sidebar-text-muted: rgba(255, 255, 255, 0.9);
    --throne-accent-gradient: linear-gradient(135deg, var(--throne-sidebar-bg) 0%, var(--throne-accent-blue) 100%);
}

/* ── Global Reset ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Removed manual html font-size to allow browser default (16px) for Tailwind compatibility */

body {
    font-family: var(--throne-font);
    background: var(--throne-body-gradient);
    background-attachment: fixed;
    color: var(--throne-text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 1rem;
}

a { color: inherit; text-decoration: none; }

/* ── Dashboard Layout ───────────────────────── */
.throne-dashboard {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ── Sidebar ────────────────────────────────── */
.throne-sidebar {
    width: var(--throne-sidebar-width);
    background: var(--throne-sidebar-bg);
    border-right: 1px solid var(--throne-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition:
        width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.2s ease;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
}

.sidebar-header {
    height: 64px;
    min-height: 64px;
    padding: 0 0.9rem;
    border-bottom: 1px solid var(--throne-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sidebar-logo {
    color: #ffffff;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    text-decoration: none !important;
    text-transform: uppercase;
}

.sidebar-logo picture {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
}

.sidebar-logo img {
    display: block;
    height: 36px;
    width: auto;
    object-fit: contain;
}

.sidebar-brand {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-brand-name {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    white-space: nowrap;
}

.sidebar-brand-room {
    display: block;
    width: 100%;
    margin-top: 0.28rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-align: center;
    white-space: nowrap;
}

.sidebar-header-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sidebar-header > * {
    transition: opacity 0.14s ease, transform 0.14s ease;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.18rem 0 0.75rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.37rem 0.9rem;
    color: var(--throne-sidebar-text-muted);
    text-decoration: none !important;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.1;
    min-height: 32px;
    min-width: 0;
    overflow: hidden;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    margin-bottom: 0;
}

.nav-item:not(.nav-item-disabled):hover:not(.active) {
    color: var(--throne-sidebar-text);
    background: rgba(255, 255, 255, 0.09);
}

.nav-item.nav-item-disabled,
.nav-item.nav-item-disabled:hover {
    color: var(--throne-sidebar-text-muted);
    background: transparent;
    border-left-color: transparent;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.46;
}

.nav-item.nav-item-disabled:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.48);
    outline-offset: -2px;
}

.nav-item.active {
    color: var(--throne-sidebar-text);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
    border-left-color: var(--throne-accent-gold);
    font-weight: 600;
}

.nav-item .icon {
    width: 17px; height: 17px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nav-item .icon svg {
    width: 17px; height: 17px;
    stroke: var(--throne-sidebar-text-muted);
    transition: all 0.2s ease;
}

.nav-item .label {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fbbf24;
    color: #111827;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-badge[hidden] {
    display: none;
}

.nav-item:not(.nav-item-disabled):hover .icon svg {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.nav-item.nav-item-disabled .icon svg,
.nav-item.nav-item-disabled:hover .icon svg {
    stroke: var(--throne-sidebar-text-muted);
    filter: none;
}

.nav-item.active .icon svg {
    stroke: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.nav-divider {
    display: none;
}

.nav-section-label {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.74);
    cursor: default;
    display: flex;
    align-items: center;
    font-family: inherit;
    gap: 0.5rem;
    padding: 0.24rem 0.9rem 0.14rem;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    margin-top: 0.42rem;
    /* The server renders a bare text label; __initThroneSidebarSections then replaces it
       with a text span plus a .nav-section-toggle-icon on DOMContentLoaded. That icon is
       opacity:0 until hover, but it still takes layout space, so every label grew 2.06px
       after first paint -- roughly 10px of shift across the five static section labels on
       each page load. Reserving the decorated height (icon + this rule's own vertical
       padding) makes both states identical, and tracks the padding if it is ever changed. */
    min-height: calc(16px + 0.24rem + 0.14rem);
    overflow: hidden;
    position: relative;
    text-align: left;
    white-space: nowrap;
    width: 100%;
}

.nav-section-label.is-collapsible {
    cursor: pointer;
}

.nav-section-label:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.48);
    outline-offset: -2px;
}

.nav-section-text {
    flex: 0 1 auto;
    min-width: 0;
    order: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-section-label::after {
    content: "";
    flex: 1 1 auto;
    min-width: 18px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    order: 2;
    transition: opacity 0.16s ease;
}

.nav-section-toggle-icon {
    align-items: center;
    color: rgba(255, 255, 255, 0.84);
    display: inline-flex;
    flex: 0 0 16px;
    height: 16px;
    justify-content: center;
    margin-left: -0.12rem;
    opacity: 0;
    order: 3;
    pointer-events: none;
    transform: translateX(-2px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    width: 16px;
}

.nav-section-toggle-icon svg {
    display: block;
    height: 13px;
    transition: transform 0.16s ease;
    width: 13px;
}

.nav-section-label.is-collapsible:hover .nav-section-toggle-icon,
.nav-section-label.is-collapsible:focus-visible .nav-section-toggle-icon,
.nav-section-label.is-collapsed .nav-section-toggle-icon {
    opacity: 1;
    transform: translateX(0);
}

.nav-section-label.is-collapsed .nav-section-toggle-icon svg {
    transform: rotate(-90deg);
}

.nav-section-label.is-collapsed::after {
    opacity: 0.62;
}

.nav-section-row.is-section-collapsed {
    display: none !important;
}

/* Account Section */
.sidebar-account {
    padding: 1rem 1rem 0.65rem;
    border-top: 1px solid var(--throne-border);
    background: rgba(0, 0, 0, 0.15);
}

/* The "Loading..." placeholder is 38px while the states that replace it are ~96px
   (signed-in card) and 125px (signed-out prompt), so the sidebar footer jumped up to
   87px on every load. Reserving the incoming height on the placeholder keeps the swap
   still. throne-account-returning is set during parse when a cached account nav exists,
   which means this browser last resolved a signed-in session.
   Heights are measured from the rendered states; test_throne_room_performance_templates
   pins them so a redesign has to update them deliberately. */
#auth-loading {
    min-height: 125px;
}

body.throne-account-returning #auth-loading {
    min-height: 96px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    min-width: 0;
}

.account-info > div {
    min-width: 0;
}

.account-privacy-toggle {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex: 1 1 0;
    gap: 10px;
    min-width: 0;
    padding: 0.24rem;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-privacy-toggle:hover,
.account-privacy-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    outline: none;
}

.account-privacy-toggle::after {
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    bottom: calc(100% + 0.4rem);
    color: #e2e8f0;
    content: "Toggle privacy mode";
    font-size: 0.62rem;
    font-weight: 700;
    left: 2.2rem;
    line-height: 1;
    opacity: 0;
    padding: 0.35rem 0.45rem;
    pointer-events: none;
    position: absolute;
    transform: translateY(3px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
    z-index: 20;
}

.account-privacy-toggle:hover::after,
.account-privacy-toggle:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.account-avatar {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--throne-accent-blue), #1d4ed8);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.account-info img.account-avatar {
    width: 30px !important;
    height: 30px !important;
}

.account-name,
.account-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-name-row {
    align-items: center;
    display: flex;
    gap: 0.38rem;
    max-width: 100%;
    min-width: 0;
}

.account-name {
    color: var(--throne-sidebar-text);
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-email {
    color: var(--throne-sidebar-text-muted);
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-tier-badge {
    align-items: center;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin-top: 0.22rem;
    padding: 0.14rem 0.36rem;
    text-transform: uppercase;
}

.account-tier-free {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.account-tier-unlimited {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.36);
    color: #fde68a;
}

.account-tier-beta {
    background: rgba(129, 140, 248, 0.22);
    border-color: rgba(129, 140, 248, 0.42);
    color: #ddd6fe;
}

.account-tier-admin {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.42);
    color: #bbf7d0;
}

#auth-text-container {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

#auth-hidden-placeholder {
    font-size: 0.72rem !important;
}

.account-links {
    display: grid;
    align-items: center;
    gap: 0.65rem;
    grid-template-columns: minmax(0, 148px) max-content;
    justify-content: space-between;
    margin-top: 0.55rem;
}
.account-links a { font-size: 0.76rem; color: var(--throne-sidebar-text-muted); text-decoration: none; transition: color 0.2s; }
.account-links a:hover { color: var(--throne-sidebar-text); }
.account-links #auth-logout-btn {
    justify-self: end;
    padding: 0.25rem 0;
    white-space: nowrap;
}

.login-prompt { text-align: center; }
.login-prompt p { font-size: 0.8rem; color: var(--throne-sidebar-text-muted); margin-bottom: 0.65rem; }

.login-btn {
    display: block; width: 100%; text-align: center;
    background: linear-gradient(135deg, var(--throne-accent-blue), #1e40af);
    color: white; font-size: 0.8rem; font-weight: 600; padding: 0.5rem;
    border-radius: 8px; border: none; cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.google-login-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 18px;
    height: 18px;
    justify-content: center;
    width: 18px;
}

.google-login-icon svg {
    display: block;
    height: 18px;
    width: 18px;
}

.email-login-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    color: var(--throne-sidebar-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.email-login-separator::before,
.email-login-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.email-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 0.52rem 0.65rem;
    color: var(--throne-sidebar-text);
    cursor: pointer;
    font-family: var(--throne-font);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.email-login-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: currentColor;
}

.email-login-icon svg {
    width: 100%;
    height: 100%;
}

.sidebar-email-login-link {
    width: 100%;
}

.email-login-link:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.38);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

.email-login-link:focus-visible {
    outline: 3px solid rgba(147, 197, 253, 0.45);
    outline-offset: 2px;
}

.email-login-link:disabled {
    cursor: wait;
    opacity: 0.65;
}

.auth-email-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(5px);
}

.auth-email-popover-backdrop[hidden] {
    display: none;
}

.auth-email-popover {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: min(380px, calc(100vw - 32px));
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
    color: #0f172a;
    padding: 18px;
}

.auth-email-popover[hidden] {
    display: none;
}

.auth-email-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.auth-email-popover h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-email-popover p {
    margin: 0;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.4;
}

.auth-email-popover-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1;
}

.auth-email-popover-close:hover {
    background: #e2e8f0;
}

.auth-email-popover label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-email-popover input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    padding: 11px 12px;
    outline: none;
}

.auth-email-popover input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.auth-email-popover-status {
    display: none;
    margin-top: 10px;
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.35;
}

.auth-email-popover-status.info {
    display: block;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.auth-email-popover-status.success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.auth-email-popover-status.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-email-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.auth-email-popover-secondary,
.auth-email-popover-primary {
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 10px 14px;
}

.auth-email-popover-secondary {
    background: #f1f5f9;
    color: #334155;
}

.auth-email-popover-primary {
    background: linear-gradient(135deg, #0353A4, #2563eb);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.auth-email-popover-primary:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 520px) {
    .auth-email-popover {
        top: auto;
        bottom: 16px;
        transform: translateX(-50%);
    }

    .auth-email-popover-actions {
        flex-direction: column-reverse;
    }

    .auth-email-popover-secondary,
    .auth-email-popover-primary {
        width: 100%;
    }
}

#beta-gate-container .email-login-separator,
#scannerBetaGate .email-login-separator,
#betaGate .email-login-separator,
.scanner-beta-gate .email-login-separator {
    margin-top: 12px;
    color: #64748b;
}

#beta-gate-container .email-login-separator::before,
#beta-gate-container .email-login-separator::after,
#scannerBetaGate .email-login-separator::before,
#scannerBetaGate .email-login-separator::after,
#betaGate .email-login-separator::before,
#betaGate .email-login-separator::after,
.scanner-beta-gate .email-login-separator::before,
.scanner-beta-gate .email-login-separator::after {
    background: #cbd5e1;
}

#beta-gate-container .email-login-link,
#scannerBetaGate .email-login-link,
#betaGate .email-login-link,
.scanner-beta-gate .email-login-link,
.gate-email-login-link {
    background: #1c64ad;
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    min-width: 260px;
    box-shadow: 0 10px 24px rgba(3, 83, 164, 0.2);
}

#beta-gate-container .email-login-link:hover,
#scannerBetaGate .email-login-link:hover,
#betaGate .email-login-link:hover,
.scanner-beta-gate .email-login-link:hover,
.gate-email-login-link:hover {
    background: #2a70b8;
    border-color: rgba(255, 255, 255, 0.38);
    color: #ffffff;
}

/* ── Main Content Area ──────────────────────── */
.throne-main {
    display: flex;
    flex-direction: column;
    flex: 0 0 calc(100% - var(--throne-sidebar-width));
    width: calc(100% - var(--throne-sidebar-width));
    max-width: calc(100vw - var(--throne-sidebar-width));
    margin-left: var(--throne-sidebar-width);
    padding: 1.75rem 3rem 0;
    min-height: 100vh;
    transition: opacity 120ms ease, filter 120ms ease, margin-left 0.2s ease, width 0.2s ease, max-width 0.2s ease, flex-basis 0.2s ease;
}

.throne-page-footer {
    background: var(--throne-surface-muted, #f8fafc);
    border-top: 1px solid var(--throne-border);
    color: var(--throne-text-secondary);
    margin: auto auto 0;
    max-width: 1400px;
    padding: 0.95rem 0;
    width: 100%;
}

.throne-page-footer-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    justify-content: center;
}

.throne-page-footer a {
    align-items: center;
    color: var(--throne-text-secondary);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 650;
    gap: 0.38rem;
    line-height: 1.25;
    min-height: 32px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.throne-page-footer a:hover,
.throne-page-footer a:focus-visible {
    color: var(--throne-sidebar-bg);
    outline: none;
}

.throne-page-footer-icon,
.throne-page-footer-icon svg {
    display: inline-flex;
    height: 16px;
    width: 16px;
}

/* will-change is scoped to the two navigating states so the content area is only
   promoted to its own compositing layer while it is actually animating. Keeping it
   on .throne-main permanently held a full-page layer for every long list view. */
body.throne-shell-navigating .throne-main {
    opacity: 0.82;
    filter: saturate(0.96);
    cursor: progress;
    will-change: opacity;
}

body.throne-shell-content-entering .throne-main {
    animation: throne-main-enter 150ms ease-out;
    will-change: opacity, transform;
}

body.throne-shell-navigating .throne-main,
body.throne-shell-navigating .throne-main *,
body.throne-shell-navigating .throne-sidebar,
body.throne-shell-navigating .throne-sidebar *,
body.throne-shell-navigating .topbar,
body.throne-shell-navigating .main {
    animation: none !important;
    transition-property: color, background-color, border-color, box-shadow, opacity !important;
}

@keyframes throne-main-enter {
    from {
        opacity: 0.9;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .throne-main {
        transition: none;
        will-change: auto;
    }

    body.throne-shell-navigating .throne-main {
        opacity: 1;
        filter: none;
    }

    body.throne-shell-content-entering .throne-main {
        animation: none;
    }
}

.throne-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
    color: var(--throne-text-primary);
}

body.has-throne-sidebar .throne-main > .throne-content-wrapper {
    padding-top: 1rem !important;
}

.pokemon-sets-shell .pokemon-sets-page,
.mtg-sets-page {
    padding-top: 0;
}

.throne-main > .ev-container {
    padding-top: 1rem;
}

/* Content Panels */
.throne-panel { display: none; }
.throne-panel.active {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile Hamburger ───────────────────────── */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem; left: 1rem;
    z-index: 1001;
    background: var(--throne-sidebar-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px; height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    background: #064f9b;
    outline: none;
}

.sidebar-toggle-mark,
.sidebar-toggle-open-icon,
.sidebar-toggle-tip {
    display: none;
}

.sidebar-toggle-bars {
    display: block;
}

.sidebar-toggle .bar {
    display: block; width: 20px; height: 2px;
    background: #ffffff;
    margin: 4px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(5, 11, 20, 0.8);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Collapsed Sidebar */
@media (min-width: 1025px) {
    body.throne-sidebar-collapsed .throne-sidebar {
        overflow-x: hidden;
        transform: none;
        width: var(--throne-sidebar-collapsed-width);
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .throne-sidebar {
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.22);
        width: var(--throne-sidebar-width);
    }

    body.throne-sidebar-collapsed .throne-main {
        flex-basis: calc(100% - var(--throne-sidebar-collapsed-width));
        width: calc(100% - var(--throne-sidebar-collapsed-width));
        max-width: calc(100vw - var(--throne-sidebar-collapsed-width));
        margin-left: var(--throne-sidebar-collapsed-width);
    }

    body.throne-sidebar-collapsed .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        top: 12px;
        left: 10px;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
        overflow: visible;
    }

    body.throne-sidebar-collapsed .sidebar-toggle:hover,
    body.throne-sidebar-collapsed .sidebar-toggle:focus-visible {
        background: rgba(2, 62, 125, 0.88);
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 18px rgba(0, 22, 51, 0.26);
    }

    body.throne-sidebar-collapsed .sidebar-toggle-bars {
        display: none;
    }

    body.throne-sidebar-collapsed .sidebar-toggle-mark,
    body.throne-sidebar-collapsed .sidebar-toggle-open-icon {
        align-items: center;
        display: flex;
        inset: 0;
        justify-content: center;
        position: absolute;
        transition: opacity 0.16s ease, transform 0.16s ease;
    }

    body.throne-sidebar-collapsed .sidebar-toggle-mark {
        opacity: 1;
        transform: scale(1);
    }

    body.throne-sidebar-collapsed .sidebar-toggle-open-icon {
        color: #ffffff;
        opacity: 0;
        transform: scale(0.86);
    }

    body.throne-sidebar-collapsed .sidebar-toggle-mark img {
        display: block;
        height: 31px;
        width: 41px;
        object-fit: contain;
    }

    body.throne-sidebar-collapsed .sidebar-toggle-open-icon svg {
        height: 23px;
        width: 23px;
    }

    body.throne-sidebar-collapsed .sidebar-toggle:hover .sidebar-toggle-mark,
    body.throne-sidebar-collapsed .sidebar-toggle:focus-visible .sidebar-toggle-mark {
        opacity: 0;
        transform: scale(0.86);
    }

    body.throne-sidebar-collapsed .sidebar-toggle:hover .sidebar-toggle-open-icon,
    body.throne-sidebar-collapsed .sidebar-toggle:focus-visible .sidebar-toggle-open-icon {
        opacity: 1;
        transform: scale(1);
    }

    body.throne-sidebar-collapsed .sidebar-toggle-tip {
        align-items: center;
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
        color: #111827;
        display: inline-flex;
        font-size: 0.84rem;
        font-weight: 600;
        height: 36px;
        left: calc(100% + 10px);
        line-height: 1;
        opacity: 0;
        padding: 0 14px;
        pointer-events: none;
        position: absolute;
        top: 50%;
        transform: translate(-4px, -50%);
        transition: opacity 0.16s ease, transform 0.16s ease;
        white-space: nowrap;
    }

    body.throne-sidebar-collapsed .sidebar-toggle-tip::before {
        border-bottom: 8px solid transparent;
        border-right: 8px solid #ffffff;
        border-top: 8px solid transparent;
        content: "";
        height: 0;
        left: -7px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
    }

    body.throne-sidebar-collapsed .sidebar-toggle:hover .sidebar-toggle-tip,
    body.throne-sidebar-collapsed .sidebar-toggle:focus-visible .sidebar-toggle-tip {
        opacity: 1;
        transform: translate(0, -50%);
    }

    body.throne-sidebar-collapsed .sidebar-header {
        justify-content: center;
        height: 64px;
        min-height: 64px;
        overflow: hidden;
        padding: 0;
    }

    body.throne-sidebar-collapsed .sidebar-header > * {
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateX(-8px);
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .sidebar-header {
        justify-content: space-between;
        padding: 0 0.9rem;
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .sidebar-header > * {
        max-width: none;
        opacity: 1;
        overflow: visible;
        pointer-events: auto;
        transform: none;
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .sidebar-logo {
        padding-left: 56px;
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .sidebar-logo picture {
        display: none;
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .sidebar-toggle-tip {
        visibility: hidden;
    }

    body.throne-sidebar-collapsed .sidebar-nav {
        overflow-x: hidden;
        padding-top: 0.18rem;
    }

    body.throne-sidebar-collapsed .nav-item {
        justify-content: flex-start;
        min-height: 32px;
        padding: 0.37rem 0.9rem;
        position: relative;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .nav-item.active {
        background: rgba(255, 255, 255, 0.08);
        border-left-color: transparent;
        box-shadow: inset 3px 0 0 var(--throne-accent-gold);
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .nav-item .label,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .nav-section-label,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .nav-divider {
        max-width: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        white-space: nowrap;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .nav-badge {
        font-size: 0.62rem;
        height: 17px;
        min-width: 17px;
        padding: 0 4px;
        position: absolute;
        right: 7px;
        top: 50%;
        transform: translateY(-50%);
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .sidebar-account {
        align-items: center;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0.7rem 0 0.55rem;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .account-info {
        align-items: center;
        flex-direction: column;
        gap: 7px;
        margin-bottom: 0;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .account-privacy-toggle {
        flex: 0 0 auto;
        justify-content: center;
        padding: 0;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) #auth-text-container,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) #auth-hidden-placeholder,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .account-links,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .login-prompt p,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .email-login-separator,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .google-login-label,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .sidebar-email-login-link span:not(.email-login-icon) {
        display: none !important;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .account-actions-stack {
        gap: 7px;
        margin-left: 0;
    }

    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .login-btn,
    body.throne-sidebar-collapsed:not(.throne-sidebar-hover-expanded) .sidebar-email-login-link {
        width: 40px !important;
        height: 40px;
        min-height: 40px;
        padding: 0;
    }

    body.throne-sidebar-collapsed.throne-sidebar-hover-expanded .nav-item.active {
        border-left-color: var(--throne-accent-gold);
        box-shadow: none;
    }
}

/* Mobile */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
    }
    .sidebar-toggle-mark,
    .sidebar-toggle-open-icon,
    .sidebar-toggle-tip {
        display: none !important;
    }
    .sidebar-toggle-bars {
        display: block;
    }
    .throne-sidebar { transform: translateX(-100%); }
    .throne-sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; opacity: 1; }
    .throne-main {
        flex-basis: 100%;
        width: 100%;
        max-width: 100vw;
        margin-left: 0;
        padding: 4.25rem 1.25rem 0;
    }
    .sidebar-toggle.active .sidebar-toggle-bars .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .sidebar-toggle.active .sidebar-toggle-bars .bar:nth-child(2) { opacity: 0; }
    .sidebar-toggle.active .sidebar-toggle-bars .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

/* ── Glassmorphism Card ─────────────────────── */
.throne-card {
    background: #ffffff;
    border: 1px solid var(--throne-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.throne-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    border-color: rgba(3, 83, 164, 0.5);
    box-shadow: 0 12px 24px rgba(3, 83, 164, 0.15);
}

.throne-card.card-gold:hover { border-color: rgba(251, 191, 36, 0.5); }

/* ── Overview Panel ─────────────────────────── */
.overview-header { text-align: center; margin-bottom: 4rem; }

.overview-badge {
    display: inline-block;
    background: rgba(3, 83, 164, 0.1);
    border: 1px solid rgba(3, 83, 164, 0.2);
    color: var(--throne-sidebar-bg);
    font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    padding: 0.5rem 1rem; border-radius: 50px;
    margin-bottom: 1.5rem;
}

.overview-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 1.25rem;
    line-height: 1.1; letter-spacing: -1px;
}

.overview-title span {
    color: var(--throne-sidebar-bg);
}

.overview-subtitle {
    font-size: 1rem;
    color: var(--throne-text-secondary);
    max-width: 650px; margin: 0 auto;
    line-height: 1.6; font-weight: 300;
}

/* Quick Access Grid */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.quick-card {
    background: #ffffff;
    border: 1px solid var(--throne-border);
    border-radius: 20px; padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    display: flex; flex-direction: column; height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.quick-card:hover {
    background: #f8fafc;
    border-color: var(--throne-sidebar-bg);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(3, 83, 164, 0.15);
}

.quick-card-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }

.quick-card-icon {
    width: 56px; height: 56px;
    background: rgba(3, 83, 164, 0.1);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(3, 83, 164, 0.2);
}

.quick-card-icon svg { width: 24px; height: 24px; stroke: var(--throne-sidebar-bg); }
.quick-card-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.quick-card-desc { font-size: 0.95rem; color: var(--throne-text-secondary); line-height: 1.5; margin-bottom: 1.5rem; flex: 1; }

.quick-card-cta {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--throne-accent-blue);
    font-size: 0.95rem; font-weight: 700;
    transition: gap 0.2s ease;
}

/* ── Dashboard Home ─────────────────────────── */
.dashboard-home {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    max-width: 1180px;
    margin: 0 auto;
}

.dashboard-command-panel,
.dashboard-auth-card,
.dashboard-panel,
.dashboard-tools {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 40, 83, 0.1);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 40, 83, 0.08);
}

.dashboard-command-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem;
    align-items: center;
    min-height: 176px;
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

.dashboard-command-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #0353a4, #18a058 58%, #f2b63d);
}

.dashboard-command-copy,
.dashboard-command-actions,
.dashboard-panel-header,
.dashboard-auth-card > * {
    min-width: 0;
    position: relative;
}

.dashboard-command-copy h1 {
    color: #071b3d;
    font-size: clamp(2rem, 4vw, 3.45rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.03;
    max-width: 760px;
    margin: 0 0 0.85rem;
}

.dashboard-command-copy p,
.dashboard-panel-header p,
.dashboard-auth-card p,
.dashboard-tool small,
.dashboard-checklist small,
.dashboard-batch-main small {
    color: #64748b;
    font-size: 0.96rem;
    line-height: 1.45;
}

.dashboard-command-copy p {
    max-width: 680px;
}

.dashboard-command-actions,
.dashboard-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.dashboard-primary-action,
.dashboard-secondary-action {
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 800;
    gap: 0.55rem;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1.05rem;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.dashboard-primary-action {
    background: #0353a4;
    border: 1px solid #0353a4;
    box-shadow: 0 10px 18px rgba(3, 83, 164, 0.22);
    color: #fff;
}

.dashboard-primary-action:hover {
    background: #023e7d;
    border-color: #023e7d;
    color: #fff;
    transform: translateY(-1px);
}

.dashboard-primary-action svg,
.dashboard-tool-icon svg {
    flex: 0 0 auto;
    height: 1rem;
    width: 1rem;
}

.dashboard-primary-action svg,
.dashboard-tool-icon svg,
.dashboard-checklist span::before {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.dashboard-secondary-action {
    background: #ffffff;
    border: 1px solid rgba(3, 83, 164, 0.22);
    color: #0353a4;
}

.dashboard-secondary-action:hover {
    background: #eef6ff;
    border-color: rgba(3, 83, 164, 0.34);
    color: #023e7d;
}

.dashboard-auth-card {
    align-items: center;
    border-color: rgba(3, 83, 164, 0.16);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
}

.dashboard-auth-card[hidden] {
    display: none;
}

.dashboard-auth-card h2,
.dashboard-panel-header h2 {
    color: #071b3d;
    font-size: 1.12rem;
    font-weight: 850;
    margin: 0 0 0.25rem;
}

.dashboard-auth-card button {
    border-style: solid;
}

.dashboard-metrics {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metric {
    background: #ffffff;
    border: 1px solid rgba(15, 40, 83, 0.09);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 40, 83, 0.06);
    min-width: 0;
    padding: 1rem;
}

.dashboard-metric span,
.dashboard-batch-status {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dashboard-metric strong {
    color: #071b3d;
    display: block;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1;
    margin: 0.55rem 0 0.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-metric small {
    color: #64748b;
    display: block;
    font-size: 0.82rem;
    line-height: 1.3;
    min-height: 1.05rem;
}

.dashboard-skeleton,
.dashboard-home.is-dashboard-loading .dashboard-metric strong::before,
.dashboard-home.is-dashboard-loading .dashboard-metric small::before,
.dashboard-home.is-dashboard-loading [data-dashboard-recent-note]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-count]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-note]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-value]::before,
.dashboard-home.is-value-loading [data-dashboard-value-note]::before {
    animation: dashboardSkeleton 1.15s ease-in-out infinite;
    background: linear-gradient(90deg, #e8eef7 0%, #f7faff 45%, #e8eef7 100%);
    background-size: 220% 100%;
    border-radius: 8px;
    display: block;
}

.dashboard-home.is-dashboard-loading .dashboard-metric strong,
.dashboard-home.is-dashboard-loading .dashboard-metric small,
.dashboard-home.is-dashboard-loading [data-dashboard-recent-note],
.dashboard-home.is-value-loading [data-dashboard-batch-count],
.dashboard-home.is-value-loading [data-dashboard-batch-note],
.dashboard-home.is-value-loading [data-dashboard-batch-value],
.dashboard-home.is-value-loading [data-dashboard-value-note] {
    color: transparent;
}

.dashboard-home.is-dashboard-loading .dashboard-metric strong::before,
.dashboard-home.is-value-loading [data-dashboard-batch-count]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-value]::before {
    content: "";
    height: 1.65rem;
    max-width: 5rem;
    width: 58%;
}

.dashboard-home.is-dashboard-loading .dashboard-metric small::before,
.dashboard-home.is-dashboard-loading [data-dashboard-recent-note]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-note]::before,
.dashboard-home.is-value-loading [data-dashboard-value-note]::before {
    content: "";
    height: 0.82rem;
    max-width: 9rem;
    width: 72%;
}

@keyframes dashboardSkeleton {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.dashboard-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.dashboard-panel,
.dashboard-tools {
    padding: 1.25rem;
}

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

.dashboard-panel-header a {
    color: #0353a4;
    flex: 0 0 auto;
    font-weight: 800;
}

.dashboard-batch-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    list-style: none;
}

.dashboard-batch-list a,
.dashboard-tool {
    border: 1px solid rgba(15, 40, 83, 0.09);
    border-radius: 10px;
    color: #071b3d;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.dashboard-batch-list a {
    align-items: center;
    display: grid;
    grid-template-columns: 3.35rem minmax(0, 1fr) auto;
    justify-content: initial;
    padding: 0.88rem 0.95rem;
}

.dashboard-batch-list a:hover,
.dashboard-tool:hover {
    background: #f8fbff;
    border-color: rgba(3, 83, 164, 0.24);
    transform: translateY(-1px);
}

.dashboard-batch-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-batch-preview {
    align-items: center;
    background: #edf5ff;
    border: 1px solid rgba(3, 83, 164, 0.12);
    border-radius: 8px;
    color: #0353a4;
    display: inline-flex;
    height: 3.35rem;
    justify-content: center;
    overflow: hidden;
    width: 3.35rem;
}

.dashboard-batch-preview img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.dashboard-batch-preview.is-empty::before {
    border: 2px solid currentColor;
    border-radius: 4px;
    content: "";
    height: 1.85rem;
    opacity: 0.5;
    width: 1.28rem;
}

.dashboard-batch-main strong {
    color: #071b3d;
    font-size: 0.98rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-batch-status {
    border-radius: 999px;
    flex: 0 0 auto;
    letter-spacing: 0;
    padding: 0.34rem 0.55rem;
}

.dashboard-status-staged {
    background: rgba(24, 160, 88, 0.12);
    color: #137145;
}

.dashboard-status-listed {
    background: rgba(3, 83, 164, 0.11);
    color: #0353a4;
}

.dashboard-status-review {
    background: rgba(242, 182, 61, 0.18);
    color: #8a5a04;
}

.dashboard-empty-row {
    color: #64748b;
    padding: 1rem 0.25rem;
}

.dashboard-loading-row {
    align-items: center;
    border: 1px solid rgba(15, 40, 83, 0.09);
    border-radius: 10px;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 3.35rem minmax(0, 1fr);
    padding: 0.88rem 0.95rem;
}

.dashboard-loading-lines {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.dashboard-skeleton-preview {
    height: 3.35rem;
    width: 3.35rem;
}

.dashboard-skeleton-title {
    height: 1rem;
    max-width: 15rem;
    width: 55%;
}

.dashboard-skeleton-text {
    height: 0.86rem;
    max-width: 22rem;
    width: 72%;
}

.dashboard-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    list-style: none;
    margin-bottom: 1rem;
}

.dashboard-checklist li {
    align-items: flex-start;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 1.3rem minmax(0, 1fr);
}

.dashboard-checklist span {
    align-items: center;
    background: #edf5ff;
    border: 1px solid rgba(3, 83, 164, 0.18);
    border-radius: 50%;
    color: #0353a4;
    display: inline-flex;
    height: 1.3rem;
    justify-content: center;
    margin-top: 0.05rem;
    width: 1.3rem;
}

.dashboard-checklist span::before {
    content: "";
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    height: 0.42rem;
    transform: rotate(45deg) translate(-1px, -1px);
    width: 0.24rem;
}

.dashboard-checklist li.is-complete span {
    background: #18a058;
    border-color: #18a058;
    color: #fff;
}

.dashboard-checklist strong {
    color: #071b3d;
    display: block;
    font-size: 0.94rem;
    font-weight: 850;
}

.dashboard-wide-link {
    width: 100%;
}

.dashboard-setup-panel .dashboard-wide-link + .dashboard-wide-link {
    margin-top: 0.65rem;
}

.dashboard-tool-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-tool {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
}

.dashboard-tool-icon {
    align-items: center;
    background: #edf5ff;
    border-radius: 9px;
    color: #0353a4;
    display: inline-flex;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.dashboard-tool-icon svg {
    height: 1.15rem;
    width: 1.15rem;
}

.dashboard-tool strong {
    font-size: 1rem;
    font-weight: 850;
}

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-command-panel,
    .dashboard-auth-card {
        grid-template-columns: 1fr;
    }

    .dashboard-command-panel {
        padding: 1.45rem;
    }

    .dashboard-command-actions,
    .dashboard-auth-actions {
        justify-content: stretch;
    }

    .dashboard-command-actions > *,
    .dashboard-auth-actions > * {
        flex: 1 1 100%;
        width: 100%;
    }

    .dashboard-metrics,
    .dashboard-tool-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-batch-list a {
        grid-template-columns: 3rem minmax(0, 1fr) auto;
        padding: 0.78rem 0.82rem;
    }

    .dashboard-batch-preview {
        height: 3rem;
        width: 3rem;
    }

    .dashboard-loading-row {
        grid-template-columns: 3rem minmax(0, 1fr);
        padding: 0.78rem 0.82rem;
    }

    .dashboard-skeleton-preview {
        height: 3rem;
        width: 3rem;
    }
}

/* Dashboard seller workspace */
.dashboard-home.tr-page {
    box-sizing: border-box;
    display: grid;
    gap: 0.9rem;
    max-width: 1400px;
    padding: 0 0 2.75rem;
    width: 100%;
}

.dashboard-home [hidden] {
    display: none !important;
}

.dashboard-header.tr-command-header {
    align-items: end;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    min-height: 4rem;
    padding: 0.25rem 0.25rem 0.45rem;
}

.dashboard-title-row,
.dashboard-panel-title-row {
    align-items: center;
    display: flex;
    gap: 0.7rem;
}

.dashboard-header .tr-command-title {
    color: var(--tr-slate-950);
    font-size: clamp(1.75rem, 3vw, 2.3rem);
    letter-spacing: -0.035em;
    line-height: 1;
}

.dashboard-plan-chip,
.dashboard-count-chip {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    min-height: 1.55rem;
    padding: 0.35rem 0.62rem;
}

.dashboard-plan-chip {
    background: var(--tr-blue-100);
    color: var(--tr-blue-700);
}

.dashboard-count-chip {
    background: var(--tr-slate-100);
    color: var(--tr-slate-600);
}

.dashboard-date {
    color: var(--tr-slate-500);
    font-size: 0.83rem;
    font-weight: 700;
}

.dashboard-summary,
.dashboard-panel,
.dashboard-upgrade-panel,
.dashboard-auth-card,
.dashboard-session-card {
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: 12px;
    box-shadow: var(--tr-shadow-soft);
}

.dashboard-summary {
    overflow: hidden;
}

.dashboard-metrics {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-home.is-operations-dashboard .dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-home.is-operations-dashboard.has-offers-dashboard .dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-metric {
    background: transparent;
    border: 0;
    border-left: 1px solid var(--tr-border);
    border-radius: 0;
    box-shadow: none;
    min-width: 0;
    padding: 1rem 1.15rem 0.95rem;
}

.dashboard-metric:first-child,
.dashboard-metric[hidden] + .dashboard-metric {
    border-left: 0;
}

.dashboard-metric span,
.dashboard-batch-status,
.dashboard-row-status {
    color: var(--tr-slate-500);
    display: block;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.dashboard-metric strong {
    color: var(--tr-slate-950);
    display: block;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 900;
    line-height: 1;
    margin: 0.48rem 0 0.28rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-metric small,
.dashboard-panel-header p,
.dashboard-batch-main small,
.dashboard-action-main small,
.dashboard-upgrade-heading p,
.dashboard-upgrade-benefits small,
.dashboard-auth-card p {
    color: var(--tr-slate-500);
    font-size: 0.8rem;
    line-height: 1.42;
}

.dashboard-panel {
    padding: 0;
}

.dashboard-panel-header {
    align-items: center;
    border-bottom: 1px solid var(--tr-border);
    display: flex;
    justify-content: space-between;
    margin: 0;
    min-height: 3.8rem;
    padding: 0.85rem 1.1rem;
}

.dashboard-panel-header h2,
.dashboard-auth-card h2,
.dashboard-upgrade-heading h2 {
    color: var(--tr-slate-950);
    font-size: 1.05rem;
    font-weight: 850;
    letter-spacing: -0.015em;
    margin: 0;
}

.dashboard-panel-header p {
    margin: 0.2rem 0 0;
}

.dashboard-panel-header a {
    color: var(--tr-blue-700);
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-priority-list,
.dashboard-batch-list {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-action-row {
    align-items: center;
    border-top: 1px solid var(--tr-border);
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto auto;
    min-height: 4.35rem;
    padding: 0.72rem 1.1rem;
}

.dashboard-priority-list > li:first-child,
.dashboard-batch-list > li:first-child a {
    border-top: 0;
}

.dashboard-action-icon {
    align-items: center;
    background: var(--tr-blue-050);
    border: 1px solid var(--tr-blue-100);
    border-radius: 8px;
    color: var(--tr-blue-700);
    display: inline-flex;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.dashboard-action-main,
.dashboard-batch-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dashboard-action-main strong,
.dashboard-batch-main strong {
    color: var(--tr-slate-950);
    font-size: 0.9rem;
    font-weight: 825;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-row-status,
.dashboard-batch-status {
    border-radius: 999px;
    letter-spacing: 0;
    padding: 0.33rem 0.52rem;
}

.dashboard-status-green,
.dashboard-status-staged {
    background: var(--tr-green-100);
    color: var(--tr-green-700);
}

.dashboard-status-blue,
.dashboard-status-listed {
    background: var(--tr-blue-100);
    color: var(--tr-blue-700);
}

.dashboard-status-amber,
.dashboard-status-review {
    background: var(--tr-amber-100);
    color: var(--tr-amber-700);
}

.dashboard-row-action,
.dashboard-primary-action,
.dashboard-secondary-action,
.dashboard-upgrade-action {
    align-items: center;
    border: 1px solid var(--tr-border);
    border-radius: 8px;
    color: var(--tr-blue-700);
    display: inline-flex;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    justify-content: center;
    min-height: 2.25rem;
    padding: 0.58rem 0.78rem;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-row-action:hover,
.dashboard-secondary-action:hover {
    background: var(--tr-blue-050);
    border-color: var(--tr-blue-100);
    color: var(--tr-blue-800);
}

.dashboard-row-action-primary,
.dashboard-primary-action {
    background: var(--tr-blue-700);
    border-color: var(--tr-blue-700);
    box-shadow: none;
    color: #fff;
}

.dashboard-row-action-primary:hover,
.dashboard-primary-action:hover {
    background: var(--tr-blue-800);
    border-color: var(--tr-blue-800);
    color: #fff;
    transform: none;
}

.dashboard-batch-list a {
    align-items: center;
    border: 0;
    border-top: 1px solid var(--tr-border);
    border-radius: 0;
    color: var(--tr-slate-950);
    display: grid;
    gap: 0.8rem;
    grid-template-columns: 2.85rem minmax(0, 1fr) auto;
    min-height: 4.25rem;
    padding: 0.68rem 1.1rem;
    text-decoration: none;
    transition: background-color 0.16s ease;
}

.dashboard-batch-list a:hover {
    background: var(--tr-slate-050);
    border-color: var(--tr-border);
    transform: none;
}

.dashboard-batch-preview {
    background: var(--tr-blue-050);
    border: 1px solid var(--tr-blue-100);
    border-radius: 7px;
    color: var(--tr-blue-600);
    height: 2.85rem;
    width: 2.85rem;
}

.dashboard-batch-preview.is-empty::before {
    height: 1.55rem;
    width: 1.05rem;
}

.dashboard-empty-row {
    color: var(--tr-slate-500);
    padding: 1.2rem 1.1rem;
}

.dashboard-loading-row {
    border: 0;
    border-radius: 0;
    grid-template-columns: 2.35rem minmax(0, 1fr);
    min-height: 4.25rem;
    padding: 0.75rem 1.1rem;
}

.dashboard-skeleton-icon {
    height: 2.35rem;
    width: 2.35rem;
}

.dashboard-skeleton-preview {
    height: 2.85rem;
    width: 2.85rem;
}

.dashboard-upgrade-panel {
    align-items: center;
    background: var(--tr-blue-050);
    display: grid;
    gap: 1.15rem;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.7fr) auto;
    padding: 1.15rem;
}

.dashboard-upgrade-heading {
    align-items: center;
    display: flex;
    gap: 0.8rem;
    min-width: 0;
}

.dashboard-upgrade-mark {
    align-items: center;
    background: var(--tr-blue-700);
    border-radius: 9px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.6rem;
    justify-content: center;
    width: 2.6rem;
}

.dashboard-upgrade-heading p {
    margin: 0.25rem 0 0;
}

.dashboard-upgrade-benefits {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-upgrade-benefits > div {
    display: grid;
    gap: 0.05rem 0.45rem;
    grid-template-columns: 1.3rem minmax(0, 1fr);
}

.dashboard-upgrade-benefits .tr-icon {
    color: var(--tr-green-700);
    font-size: 1.05rem;
    grid-row: 1 / span 2;
}

.dashboard-upgrade-benefits strong {
    color: var(--tr-slate-800);
    font-size: 0.78rem;
}

.dashboard-upgrade-action {
    background: #ff8f3d;
    border-color: #ff8f3d;
    color: #fff;
    min-height: 2.6rem;
    padding-inline: 1rem;
}

.dashboard-upgrade-action:hover {
    background: #e97827;
    border-color: #e97827;
    color: #fff;
}

.dashboard-auth-card {
    align-items: stretch;
    display: grid;
    gap: 1.35rem;
    grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.6fr);
    padding: 1.35rem;
}

.dashboard-auth-intro {
    align-content: center;
    display: grid;
}

.dashboard-auth-eyebrow {
    color: var(--tr-blue-700);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.dashboard-auth-card .dashboard-auth-intro h2 {
    font-size: 1.35rem;
}

.dashboard-auth-intro p {
    margin: 0.42rem 0 0;
    max-width: 34rem;
}

.dashboard-auth-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.dashboard-auth-benefits {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-auth-benefits > div {
    align-content: start;
    background: var(--tr-blue-050);
    border: 1px solid var(--tr-blue-100);
    border-radius: 10px;
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.9rem;
}

.dashboard-auth-benefits .tr-icon {
    color: var(--tr-blue-700);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.dashboard-auth-benefits strong {
    color: var(--tr-slate-900);
    font-size: 0.82rem;
}

.dashboard-auth-benefits small,
.dashboard-session-card small {
    color: var(--tr-slate-500);
    font-size: 0.75rem;
    line-height: 1.42;
}

.dashboard-session-card {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    min-height: 5.25rem;
    padding: 1rem 1.1rem;
}

.dashboard-session-card > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
}

.dashboard-session-card strong {
    color: var(--tr-slate-900);
    font-size: 0.9rem;
}

.dashboard-session-icon {
    align-items: center;
    background: var(--tr-blue-050);
    border: 1px solid var(--tr-blue-100);
    border-radius: 9px;
    color: var(--tr-blue-700);
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    width: 2.5rem;
}

.dashboard-home.is-dashboard-loading .dashboard-metric strong::before,
.dashboard-home.is-dashboard-loading .dashboard-metric small::before,
.dashboard-home.is-dashboard-loading [data-dashboard-recent-note]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-count]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-note]::before,
.dashboard-home.is-value-loading [data-dashboard-batch-value]::before,
.dashboard-home.is-value-loading [data-dashboard-value-note]::before,
.dashboard-skeleton {
    background-color: var(--tr-slate-100);
}

@media (max-width: 1400px) {
    .dashboard-auth-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .dashboard-home.is-operations-dashboard .dashboard-metrics,
    .dashboard-home.is-operations-dashboard.has-offers-dashboard .dashboard-metrics,
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric:nth-child(odd) {
        border-left: 0;
    }

    .dashboard-metric:nth-child(n + 3) {
        border-top: 1px solid var(--tr-border);
    }

    .dashboard-upgrade-panel {
        grid-template-columns: 1fr auto;
    }

    .dashboard-upgrade-benefits {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-row: 2;
    }

    .dashboard-auth-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dashboard-home.tr-page {
        gap: 0.72rem;
        padding-bottom: 1.5rem;
    }

    .dashboard-header.tr-command-header {
        min-height: 3.25rem;
    }

    .dashboard-date {
        display: none;
    }

    .dashboard-home.is-operations-dashboard .dashboard-metrics,
    .dashboard-home.is-operations-dashboard.has-offers-dashboard .dashboard-metrics,
    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-metric,
    .dashboard-metric:nth-child(odd),
    .dashboard-metric:nth-child(n + 3) {
        border-left: 0;
        border-top: 1px solid var(--tr-border);
        padding: 0.85rem 1rem;
    }

    .dashboard-metrics > .dashboard-metric:not([hidden]):first-child {
        border-top: 0;
    }

    .dashboard-action-row {
        align-items: start;
        grid-template-columns: 2.2rem minmax(0, 1fr) auto;
        padding: 0.75rem 0.9rem;
    }

    .dashboard-action-icon {
        height: 2.2rem;
        width: 2.2rem;
    }

    .dashboard-row-status {
        align-self: center;
    }

    .dashboard-row-action {
        grid-column: 2 / -1;
        justify-self: stretch;
    }

    .dashboard-panel-header,
    .dashboard-batch-list a {
        padding-inline: 0.9rem;
    }

    .dashboard-upgrade-panel,
    .dashboard-auth-card {
        grid-template-columns: 1fr;
    }

    .dashboard-upgrade-benefits {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .dashboard-auth-benefits {
        grid-template-columns: 1fr;
    }

    .dashboard-upgrade-action {
        width: 100%;
    }

    .dashboard-auth-actions {
        flex-direction: column;
    }
}

/* ── Page Header & Typography ───────────────── */
.throne-page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 2rem; flex-wrap: wrap; gap: 1.5rem;
}

.throne-page-title {
    font-size: 1.8rem; font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: var(--throne-sidebar-bg);
    letter-spacing: -0.02em;
}

.throne-page-subtitle { font-size: 0.95rem; color: var(--throne-text-secondary); margin: 0; }

.throne-last-updated {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
    padding: 6px 14px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.02em; white-space: nowrap;
}

.throne-last-updated::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%;
    background: #4ade80; animation: throne-pulse 2s ease-in-out infinite; flex-shrink: 0;
}

@keyframes throne-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Stats Bar ──────────────────────────────── */
.throne-stats-bar { display: flex; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }

.throne-stat-card {
    background: #ffffff;
    border: 1px solid var(--throne-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem; min-width: 140px; flex: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.throne-stat-label {
    font-size: 0.85rem; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 0.5rem; font-weight: 600;
}

.throne-stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.throne-stat-value.highlight { color: #4ade80; }

/* ── Filter Bar ─────────────────────────────── */
.throne-filter-bar { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }

.throne-search-wrapper { position: relative; flex: 1; min-width: 250px; }

.throne-search-icon {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: #64748b;
}

.throne-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--throne-border);
    border-radius: 10px;
    padding: 0.875rem 1rem 0.875rem 3rem;
    color: var(--throne-text-primary); font-size: 0.95rem;
    font-family: var(--throne-font);
    transition: all 0.2s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.throne-input:focus {
    outline: none;
    border-color: var(--throne-sidebar-bg);
    box-shadow: 0 0 0 3px rgba(3, 83, 164, 0.2);
}

.throne-input::placeholder { color: #64748b; }

.throne-filter-btn {
    background: #ffffff;
    border: 1px solid var(--throne-border);
    color: var(--throne-text-primary);
    padding: 0.75rem 1.25rem; border-radius: 8px;
    font-size: 0.9rem; font-family: var(--throne-font);
    cursor: pointer; transition: all 0.2s; font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.throne-filter-btn:hover, .throne-filter-btn.active {
    background: #f1f5f9;
    border-color: var(--throne-sidebar-bg);
    color: var(--throne-sidebar-bg);
}

/* ── Tables ──────────────────────────────────── */
.throne-table-container {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--throne-border);
    overflow: auto; max-height: 75vh;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.throne-table { width: 100%; border-collapse: collapse; color: var(--throne-text-primary); font-size: 0.95rem; }

.throne-table th {
    background: #f8fafc;
    padding: 1rem 1.25rem; text-align: left;
    font-size: 0.85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--throne-sidebar-bg);
    border-bottom: 2px solid var(--throne-border);
    white-space: nowrap; position: sticky; top: 0; z-index: 10;
}

.throne-table th.sortable { cursor: pointer; transition: background 0.2s; }
.throne-table th.sortable:hover { background: #e2e8f0; }

.throne-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--throne-border);
    transition: background 0.2s;
}

.throne-table tr:hover td { background: rgba(3, 83, 164, 0.04); }
.throne-table tr:hover td:first-child { box-shadow: inset 3px 0 0 0 var(--throne-sidebar-bg); }
.throne-table tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────── */
.throne-badge {
    padding: 0.25rem 0.6rem; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
    display: inline-flex; align-items: center; justify-content: center;
}

.throne-badge-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
.throne-badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.throne-badge-green { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }

/* ── Back Button ─────────────────────────────── */
.throne-back-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--throne-text-secondary); cursor: pointer;
    margin-bottom: 1rem; font-weight: 600;
    transition: color 0.2s; text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 0.05em;
    background: none; border: none;
}

.throne-back-btn:hover { color: var(--throne-accent-gold); }

/* ── Scrollbar ───────────────────────────────── */
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.1); border-radius: 20px; }
.sidebar-nav:hover::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.2); }

/* ── Billing Action ──────────────────────────── */
.billing-action-button {
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #fff;
    display: flex;
    font-size: 0.78rem;
    font-weight: 800;
    gap: 0.42rem;
    justify-content: center;
    line-height: 1.2;
    margin-top: 0;
    min-width: 0;
    min-height: 2.18rem;
    padding: 0.44rem 0.58rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
    width: 100%;
}

.account-links .billing-action-button,
.account-links .billing-action-button:hover {
    color: #fff;
}

.billing-action-button[data-billing-action="upgrade"] {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #fb923c, #f97316);
    border-color: rgba(253, 186, 116, 0.48);
    box-shadow: 0 7px 16px rgba(249, 115, 22, 0.22);
}

.billing-action-button[data-billing-action="manage"] {
    background:
        linear-gradient(135deg, rgba(96, 165, 250, 0.28), rgba(14, 165, 233, 0.14)),
        rgba(255, 255, 255, 0.08);
    border-color: rgba(147, 197, 253, 0.34);
    box-shadow: 0 7px 16px rgba(14, 165, 233, 0.14);
}

.billing-action-button:hover {
    transform: translateY(-1px);
}

body.throne-shell-navigating .billing-action-button {
    transform: none !important;
    transition: none !important;
}

body.throne-shell-navigating .billing-action-icon {
    opacity: 0;
}

.billing-action-button[data-billing-action="upgrade"]:hover {
    border-color: rgba(253, 186, 116, 0.72);
    box-shadow: 0 9px 20px rgba(249, 115, 22, 0.28);
}

.billing-action-button[data-billing-action="manage"]:hover {
    border-color: rgba(147, 197, 253, 0.56);
    box-shadow: 0 9px 20px rgba(14, 165, 233, 0.18);
}

.billing-action-icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
}

.billing-action-icon svg {
    color: currentColor;
    display: block;
    height: 0.9rem;
    stroke: currentColor;
    width: 0.9rem;
}

.billing-action-button [data-billing-action-label] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.billing-action-error {
    background: rgba(254, 226, 226, 0.96);
    border: 1px solid rgba(252, 165, 165, 0.92);
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 0.42rem;
    padding: 0.48rem 0.56rem;
}

.billing-action-error[data-type="info"] {
    background: rgba(219, 234, 254, 0.96);
    border-color: rgba(147, 197, 253, 0.9);
    color: #1e3a8a;
}

/* ── Skeleton Loader ─────────────────────────── */
@keyframes throne-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

.throne-skeleton-row td { padding: 1.25rem 1.5rem !important; }

.throne-skeleton-bar {
    height: 16px; border-radius: 6px;
    background: linear-gradient(90deg, rgba(148,163,184,0.08) 25%, rgba(148,163,184,0.18) 50%, rgba(148,163,184,0.08) 75%);
    background-size: 800px 100%;
    animation: throne-shimmer 1.5s infinite linear;
}

.throne-skeleton-bar.wide { width: 70%; }
.throne-skeleton-bar.medium { width: 50%; }
.throne-skeleton-bar.narrow { width: 35%; }

/* ── Settings Button ─────────────────────────── */
.settings-btn {
    background: none; border: none;
    color: #94a3b8; cursor: pointer;
    margin-left: auto; padding: 5px;
    display: flex; align-items: center;
}

.settings-btn:hover { color: var(--throne-accent-gold); }
.settings-btn svg { width: 20px; height: 20px; }

/* ── Collapse Button ─────────────────────────── */
.collapse-icon {
    background: none; border: none;
    padding: 3px; cursor: pointer;
    display: flex; align-items: center;
    color: var(--throne-sidebar-text-muted);
    transition: color 0.2s;
}

.collapse-icon:hover { color: var(--throne-sidebar-text); }

.collapse-icon svg,
.exit-icon svg {
    width: 18px;
    height: 18px;
}

.exit-icon {
    color: var(--throne-sidebar-text-muted);
    transition: color 0.2s;
    display: flex; align-items: center;
    text-decoration: none;
}

.exit-icon:hover { color: var(--throne-sidebar-text); }

/* %%% Topbar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 2rem; background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--throne-border);
    border-radius: 99px;
    margin: 0 24px 0 24px;
    position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 2rem; }
.topbar-logo {
    font-size: 1.1rem; font-weight: 800; color: var(--throne-sidebar-bg);
    text-decoration: none; letter-spacing: -0.02em;
    display: flex; align-items: center; gap: 0.5rem;
}
.topbar-nav { display: flex; gap: 0.25rem; align-items: center; }
.topbar-nav a {
    padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
    color: var(--throne-text-secondary); text-decoration: none; transition: all 0.2s;
}
.topbar-nav a:hover { color: var(--throne-sidebar-bg); background: rgba(3, 83, 164, 0.05); }
.topbar-nav a.active { color: #fff; background: var(--throne-accent-gradient); box-shadow: 0 4px 12px rgba(3, 83, 164, 0.2); }
.topbar-right { display: flex; align-items: center; gap: 1.5rem; }
.topbar-stat { font-size: 0.8rem; font-weight: 600; color: var(--throne-text-secondary); }
.topbar-stat strong { color: #10b981; font-weight: 800; }
