/* ============================================================
   COMMAND CENTER -- v5 Premium Executive Dashboard
   Dark navy base, gold accents, glassmorphism cards,
   instrument-panel aesthetic
   ============================================================ */

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

/* ============================================================
   1. DARK MODE TOKENS (default)
   ============================================================ */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Base backgrounds */
    --bg-base:        #0c0f1a;
    --bg-surface:     #111528;
    --bg-card:        rgba(18, 22, 42, 0.75);
    --bg-card-solid:  #121630;
    --bg-card-hover:  rgba(24, 30, 56, 0.85);
    --bg-input:       rgba(16, 20, 38, 0.9);
    --bg-elevated:    rgba(22, 28, 52, 0.7);
    --bg-glass:       rgba(14, 18, 34, 0.85);

    /* Borders -- gold-tinted glass edges */
    --border:         rgba(212, 175, 55, 0.10);
    --border-light:   rgba(212, 175, 55, 0.18);
    --border-focus:   rgba(212, 175, 55, 0.40);

    /* Text */
    --text:           #e8e4d9;
    --text-dim:       #9a9585;
    --text-muted:     #5c5849;

    /* Gold accent system */
    --gold:           #d4af37;
    --gold-light:     #e8c547;
    --gold-dim:       rgba(212, 175, 55, 0.12);
    --gold-glow:      rgba(212, 175, 55, 0.20);
    --gold-bright:    #f0d060;

    /* Semantic colors */
    --green:          #4ade80;
    --green-dim:      rgba(74, 222, 128, 0.10);
    --red:            #f87171;
    --red-dim:        rgba(248, 113, 113, 0.10);
    --yellow:         #fbbf24;
    --yellow-dim:     rgba(251, 191, 36, 0.10);
    --orange:         #fb923c;
    --blue:           #60a5fa;
    --blue-dim:       rgba(96, 165, 250, 0.10);
    --silver:         #94a3b8;
    --silver-dim:     rgba(148, 163, 184, 0.10);
    --purple:         #a78bfa;
    --purple-dim:     rgba(167, 139, 250, 0.10);

    /* Radii */
    --radius:         16px;
    --radius-sm:      10px;
    --radius-xs:      6px;

    /* Shadows */
    --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-hover:   0 8px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-glow:    0 0 20px rgba(212, 175, 55, 0.08), 0 0 60px rgba(212, 175, 55, 0.04);
}

/* ============================================================
   LIGHT MODE TOKENS
   ============================================================ */
[data-theme="light"] {
    --bg-base:        #fafafa;
    --bg-surface:     #f3f2ef;
    --bg-card:        rgba(255, 255, 255, 0.92);
    --bg-card-solid:  #ffffff;
    --bg-card-hover:  rgba(245, 243, 238, 0.95);
    --bg-input:       rgba(255, 255, 255, 0.95);
    --bg-elevated:    rgba(248, 246, 241, 0.9);
    --bg-glass:       rgba(255, 255, 255, 0.88);

    --border:         rgba(184, 148, 31, 0.14);
    --border-light:   rgba(184, 148, 31, 0.22);
    --border-focus:   rgba(184, 148, 31, 0.45);

    --text:           #1a1810;
    --text-dim:       #6b6558;
    --text-muted:     #9e9688;

    --gold:           #b8941f;
    --gold-light:     #d4a820;
    --gold-dim:       rgba(184, 148, 31, 0.08);
    --gold-glow:      rgba(184, 148, 31, 0.10);
    --gold-bright:    #c9a01a;

    --green:          #16a34a;
    --green-dim:      rgba(22, 163, 74, 0.08);
    --red:            #dc2626;
    --red-dim:        rgba(220, 38, 38, 0.08);
    --yellow:         #d97706;
    --yellow-dim:     rgba(217, 119, 6, 0.08);
    --orange:         #ea580c;
    --blue:           #2563eb;
    --blue-dim:       rgba(37, 99, 235, 0.08);
    --silver:         #64748b;
    --silver-dim:     rgba(100, 116, 139, 0.08);
    --purple:         #7c3aed;
    --purple-dim:     rgba(124, 58, 237, 0.08);

    --shadow-card:    0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-hover:   0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-glow:    none;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--gold-light);
}

img, svg {
    display: block;
    max-width: 100%;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

/* Selection */
::selection {
    background: var(--gold-dim);
    color: var(--gold-bright);
}

/* ============================================================
   23. SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.28);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.15) transparent;
}

/* ============================================================
   3. LOGIN PAGE
   ============================================================ */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: var(--bg-base);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-glow) 25%, var(--gold) 50%, var(--gold-glow) 75%, transparent 100%);
    opacity: 0.6;
}

.login-logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: border-color 0.25s;
}
.login-input:focus {
    border-color: var(--border-focus);
}
.login-input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: #0c0f1a;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.login-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
.login-btn:active {
    transform: translateY(0);
}

.login-error {
    color: var(--red);
    font-size: 0.78rem;
    margin-top: 0.75rem;
}

/* ============================================================
   4. HEADER
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.02em;
}

.header-tagline {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-clock {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gold);
    background: var(--gold-dim);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(212, 175, 55, 0.12);
}

.header-date {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-xs);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.header-btn:hover {
    color: var(--gold);
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.header-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   5. COMMAND STRIP (KPI bar)
   ============================================================ */
.command-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.kpi-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.kpi-box:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-glow);
}

.kpi-box::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-glow) 40%, var(--gold-glow) 60%, transparent 100%);
    opacity: 0.3;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    font-family: var(--mono);
}

.kpi-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.kpi-sub {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

.kpi-icon {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero-section {
    padding: 1.5rem 1.5rem 1rem;
    max-width: 1600px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.02) 0%, transparent 100%);
    border-radius: var(--radius);
}

.hero-quote {
    border-left: 3px solid var(--gold);
    padding: 0.75rem 1.25rem;
    font-style: italic;
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    background: var(--gold-dim);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}

.hero-quote cite {
    display: block;
    font-style: normal;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-on-this-day {
    font-size: 0.78rem;
    color: var(--text-dim);
    padding: 0.5rem 0;
}

.hero-on-this-day strong {
    color: var(--gold);
    font-weight: 600;
}

/* ============================================================
   7. MAIN GRID
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    padding: 0 1.5rem 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.span-full {
    grid-column: 1 / -1;
}

.span-half {
    grid-column: span 1;
}

/* ============================================================
   CARD SYSTEM (glassmorphism)
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-hover), var(--shadow-glow);
    border-color: var(--border-light);
}

/* Gold top edge glow */
.card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-glow) 30%, var(--gold) 50%, var(--gold-glow) 70%, transparent 100%);
    opacity: 0.4;
    z-index: 1;
}

/* Corner radiance */
.card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at top left, var(--gold-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}

.card > * {
    position: relative;
    z-index: 1;
}

/* Card titles */
.card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title svg {
    width: 14px;
    height: 14px;
    color: var(--gold);
    flex-shrink: 0;
}

.card-title .card-title-badge {
    font-size: 0.6rem;
    background: var(--gold-dim);
    color: var(--gold);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-xs);
    font-weight: 600;
    margin-left: auto;
}

/* ============================================================
   8. AI BRIEF
   ============================================================ */
.ai-brief {
    position: relative;
}

.ai-brief-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

.ai-brief-toggle .chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.ai-brief.collapsed .ai-brief-toggle .chevron {
    transform: rotate(-90deg);
}

.ai-brief-body {
    max-height: 600px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.ai-brief.collapsed .ai-brief-body {
    max-height: 0;
}

.ai-brief-category {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.ai-brief-item {
    font-size: 0.82rem;
    color: var(--text-dim);
    padding: 0.3rem 0;
    line-height: 1.5;
}

.ai-brief-item strong {
    color: var(--text);
    font-weight: 600;
}

/* ============================================================
   9. PRIORITIES
   ============================================================ */
.priorities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.priority-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, background 0.2s;
}
.priority-item:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.priority-dot.high    { background: var(--red); box-shadow: 0 0 8px var(--red-dim); }
.priority-dot.medium  { background: var(--yellow); box-shadow: 0 0 8px var(--yellow-dim); }
.priority-dot.low     { background: var(--green); box-shadow: 0 0 8px var(--green-dim); }

.priority-content {
    flex: 1;
    min-width: 0;
}

.priority-text {
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.4;
}

.priority-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.priority-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.12rem 0.4rem;
    border-radius: var(--radius-xs);
    margin-left: 0.35rem;
}

.priority-tag.urgent {
    background: var(--red-dim);
    color: var(--red);
}
.priority-tag.today {
    background: var(--yellow-dim);
    color: var(--yellow);
}
.priority-tag.soon {
    background: var(--blue-dim);
    color: var(--blue);
}

/* ============================================================
   10. WEEKLY TIMELINE
   ============================================================ */
.week-timeline {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.timeline-day {
    display: flex;
    flex-direction: column;
    min-height: 100px;
    gap: 0.3rem;
}

.timeline-day-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.2rem;
    text-align: center;
}

.timeline-day.today .timeline-day-label {
    color: var(--gold);
    border-bottom-color: var(--gold-dim);
}

.timeline-event {
    font-size: 0.68rem;
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    border-left: 2px solid transparent;
}

.timeline-event.event-work {
    background: var(--blue-dim);
    color: var(--blue);
    border-left-color: var(--blue);
}
.timeline-event.event-personal {
    background: var(--green-dim);
    color: var(--green);
    border-left-color: var(--green);
}
.timeline-event.event-urgent {
    background: var(--red-dim);
    color: var(--red);
    border-left-color: var(--red);
}
.timeline-event.event-social {
    background: var(--purple-dim);
    color: var(--purple);
    border-left-color: var(--purple);
}
.timeline-event.event-cooking {
    background: var(--gold-dim);
    color: var(--gold);
    border-left-color: var(--gold);
}

/* ============================================================
   11. FINANCIAL OVERVIEW
   ============================================================ */
.finance-layout {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    align-items: flex-start;
}

.finance-donut-wrap {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    position: relative;
}

.finance-donut-wrap canvas {
    width: 100%;
    height: 100%;
}

.finance-donut-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.finance-donut-center .donut-total {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--mono);
    line-height: 1.1;
}

.finance-donut-center .donut-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.finance-blocks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
}

.finance-block {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
}

.finance-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.finance-block-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.finance-block-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--mono);
}

.finance-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-xs);
}

.finance-delta.up {
    background: var(--green-dim);
    color: var(--green);
}

.finance-delta.down {
    background: var(--red-dim);
    color: var(--red);
}

.finance-delta .arrow {
    font-size: 0.72rem;
}

.finance-sparkline {
    width: 100%;
    height: 40px;
    margin-top: 0.35rem;
}

.finance-sparkline canvas {
    width: 100%;
    height: 100%;
}

/* ============================================================
   12. METALS (bar gauges)
   ============================================================ */
.metals-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metal-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.metals-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    z-index: 1;
}

.metal-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: all 0.2s;
}

.metal-card:hover {
    border-color: var(--border-light);
}

.metal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.metal-card.gold .metal-icon {
    background: var(--gold-dim);
    color: var(--gold);
    border: 1px solid var(--border-light);
}

.metal-card.silver .metal-icon {
    background: var(--silver-dim);
    color: var(--silver);
    border: 1px solid rgba(148,163,184,0.15);
}

.metal-info {
    flex: 1;
    min-width: 0;
}

.metal-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.metal-spot {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.metal-holdings {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.metal-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: -0.02em;
    margin-top: 0.2rem;
}

.metal-card.silver .metal-value {
    color: var(--silver);
}

.metal-price {
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text);
}

.metal-change {
    font-size: 0.68rem;
    font-weight: 600;
}
.metal-change.up   { color: var(--green); }
.metal-change.down { color: var(--red); }

.metal-bar-gauge {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.metal-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.metal-bar-fill.gold-fill {
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
}

.metal-bar-fill.silver-fill {
    background: linear-gradient(90deg, var(--silver) 0%, #b0bec5 100%);
}

.metal-bar-fill.platinum-fill {
    background: linear-gradient(90deg, #a8b5c2 0%, #c8d4df 100%);
}

.metal-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.58rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ============================================================
   13. STOCKS (table + sparklines)
   ============================================================ */
.stocks-table {
    width: 100%;
    border-collapse: collapse;
}

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

.stocks-table td {
    font-size: 0.8rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.stocks-table tr:last-child td {
    border-bottom: none;
}

.stocks-table tr:hover td {
    background: var(--bg-card-hover);
}

.stocks-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
}

.stock-row {
    display: grid;
    grid-template-columns: 1fr 1fr 0.6fr 1fr 0.8fr 60px;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    align-items: center;
    transition: background 0.15s;
}

.stock-row:hover:not(.stock-header) {
    background: var(--bg-elevated);
}

.stock-header {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.2rem;
}

.stock-symbol {
    font-weight: 700;
    color: var(--gold-light);
    font-family: var(--mono);
    font-size: 0.78rem;
}

.stock-name {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.stock-price {
    font-family: var(--mono);
    font-weight: 600;
    color: var(--text);
    font-size: 0.78rem;
}

.stock-shares {
    color: var(--text-muted);
    text-align: right;
    font-size: 0.76rem;
}

.stock-value {
    font-weight: 700;
    color: var(--text);
    text-align: right;
    font-family: var(--mono);
    font-size: 0.78rem;
}

.stock-change {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.08rem 0.3rem;
    border-radius: 8px;
}
.stock-change.up   { color: var(--green); background: var(--green-dim); }
.stock-change.down { color: var(--red); background: var(--red-dim); }

.stock-sparkline {
    width: 60px;
    height: 24px;
}

.stock-sparkline canvas {
    width: 100%;
    height: 100%;
}

/* ============================================================
   14. TASKS
   ============================================================ */
.task-progress-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-ring-wrap {
    flex-shrink: 0;
}

.task-ring-wrap canvas {
    width: 64px;
    height: 64px;
}

.task-ring-label {
    text-align: center;
}

.task-ring-label .task-count-big {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--mono);
    line-height: 1;
}

.task-ring-label .task-count-total {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.task-ring-label .task-count-label {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    transition: border-color 0.2s;
    cursor: pointer;
}
.task-item:hover {
    border-color: var(--border-light);
}

.task-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.task-item.done .task-checkbox {
    background: var(--gold);
    border-color: var(--gold);
}

.task-item.done .task-checkbox::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--bg-base);
    border-radius: 1px;
}

.task-item.done .task-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-text {
    font-size: 0.8rem;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.task-due {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-family: var(--mono);
    flex-shrink: 0;
}

.task-priority-badge {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    flex-shrink: 0;
}
.task-priority-badge.high   { background: var(--red-dim); color: var(--red); }
.task-priority-badge.medium { background: var(--yellow-dim); color: var(--yellow); }
.task-priority-badge.low    { background: var(--green-dim); color: var(--green); }

/* ============================================================
   15. WEATHER
   ============================================================ */
.weather-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.weather-icon-big {
    font-size: 3rem;
    line-height: 1;
}

.weather-temp-big {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text);
    font-family: var(--mono);
    line-height: 1;
}

.weather-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

.weather-feels {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.weather-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.weather-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}

.weather-stat-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--mono);
}

.weather-stat-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.weather-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 0.4rem;
}

.forecast-item {
    text-align: center;
    padding: 0.5rem 0.25rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
}

.forecast-day {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.forecast-icon {
    font-size: 1.3rem;
    margin: 0.25rem 0;
}

.forecast-hi {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    font-family: var(--mono);
}

.forecast-lo {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

/* ============================================================
   16. YOUTUBE
   ============================================================ */
.yt-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.yt-stat {
    text-align: center;
    padding: 0.6rem 0.4rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
}

.yt-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--mono);
    line-height: 1.2;
}

.yt-stat-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.yt-stat-delta {
    font-size: 0.62rem;
    font-weight: 600;
    margin-top: 0.15rem;
}
.yt-stat-delta.up   { color: var(--green); }
.yt-stat-delta.down { color: var(--red); }

.yt-chart-wrap {
    height: 80px;
    position: relative;
}

.yt-chart-wrap canvas {
    width: 100%;
    height: 100%;
}

.yt-chart-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.35rem;
}

/* ============================================================
   17. TIDES & MOON
   ============================================================ */
.tides-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tide-table {
    flex: 1;
}

.tide-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
}

.tide-row:last-child {
    border-bottom: none;
}

.tide-type {
    font-weight: 600;
    color: var(--text);
}

.tide-type.high {
    color: var(--blue);
}
.tide-type.low {
    color: var(--text-dim);
}

.tide-time {
    font-family: var(--mono);
    color: var(--text-dim);
    font-size: 0.75rem;
}

.tide-height {
    font-family: var(--mono);
    color: var(--text-muted);
    font-size: 0.72rem;
}

.moon-info {
    text-align: center;
    flex-shrink: 0;
    min-width: 100px;
}

.moon-icon {
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
}

.moon-phase {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 500;
}

.moon-illumination {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ============================================================
   18. F1 COUNTDOWN
   ============================================================ */
.f1-countdown-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.f1-race-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.f1-circuit {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Track progress bar */
.f1-track-container {
    height: 60px;
    position: relative;
    margin: 0.5rem 0;
}

.f1-track-line-bg {
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 6px;
    transform: translateY(-50%);
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.f1-track-progress {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
    transition: width 1s ease;
    position: relative;
}

.f1-track-progress::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: f1-shimmer 2s infinite;
}

@keyframes f1-shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.f1-finish-line {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 12px;
    height: 20px;
    background: repeating-conic-gradient(
        #fff 0% 25%,
        #111 0% 50%
    ) 0 0 / 6px 6px;
    border-radius: 2px;
}

.f1-car-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    transition: left 1s ease;
    filter: drop-shadow(0 0 6px var(--gold-glow));
}

/* Countdown digits */
.f1-countdown-digits {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
}

.f1-cd-block {
    text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 0.5rem 0.65rem;
    min-width: 52px;
}

.f1-cd-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--mono);
    line-height: 1;
}

.f1-cd-unit {
    display: block;
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.f1-cd-sep {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1;
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
}

/* Fireworks animation */
.f1-fireworks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.f1-spark {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: f1-burst 1.5s ease-out forwards;
}

@keyframes f1-burst {
    0% {
        transform: scale(0) translate(0, 0);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1) translate(var(--tx, 40px), var(--ty, -60px));
        opacity: 0;
    }
}

.f1-spark:nth-child(1) { --tx: 50px; --ty: -70px; background: var(--gold); animation-delay: 0s; }
.f1-spark:nth-child(2) { --tx: -40px; --ty: -80px; background: var(--red); animation-delay: 0.1s; }
.f1-spark:nth-child(3) { --tx: 60px; --ty: -40px; background: var(--gold-light); animation-delay: 0.2s; }
.f1-spark:nth-child(4) { --tx: -55px; --ty: -55px; background: var(--green); animation-delay: 0.15s; }
.f1-spark:nth-child(5) { --tx: 30px; --ty: -90px; background: var(--blue); animation-delay: 0.25s; }
.f1-spark:nth-child(6) { --tx: -35px; --ty: -65px; background: var(--gold-bright); animation-delay: 0.05s; }

/* Sessions row */
.f1-sessions-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.4rem;
}

.f1-session-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 0.4rem 0.5rem;
    text-align: center;
}

.f1-session-name {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.f1-session-time {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--mono);
    margin-top: 0.1rem;
}

.f1-session-card.active {
    border-color: var(--gold-dim);
    background: var(--gold-dim);
}

.f1-session-card.active .f1-session-name {
    color: var(--gold);
}

.f1-session-card.completed {
    opacity: 0.5;
}

/* ============================================================
   19. FOOTER STRIP
   ============================================================ */
.footer-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
    position: relative;
    overflow: hidden;
}

.footer-strip::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--gold-glow) 30%, var(--gold) 50%, var(--gold-glow) 70%, transparent 100%);
    opacity: 0.3;
}

.footer-strip-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-strip-title svg {
    width: 14px;
    height: 14px;
    color: var(--gold);
}

.footer-kids {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-kid {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
}

.footer-kid-name {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 0.15rem;
}

.footer-kid-age {
    font-size: 1.3rem;
    color: var(--text);
    font-weight: 700;
    font-family: var(--mono);
    line-height: 1;
}

.footer-kid-detail {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

.footer-joke {
    padding: 0.75rem;
    background: var(--gold-dim);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--gold);
}

.footer-joke-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.footer-joke-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    font-style: italic;
    line-height: 1.5;
}

/* ============================================================
   20. FOOTER
   ============================================================ */
.footer {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    text-align: center;
    margin-top: 0.5rem;
}

.footer-text {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.footer-text a {
    color: var(--gold);
}

.footer-version {
    font-size: 0.58rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-family: var(--mono);
    opacity: 0.6;
}

/* ============================================================
   21. ADMIN PANEL
   ============================================================ */
.admin-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.admin-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.admin-panel {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
    position: relative;
}

.admin-panel::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
    opacity: 0.5;
}

.admin-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-title svg {
    color: var(--gold);
}

.admin-close {
    position: absolute;
    top: 1rem; right: 1rem;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-dim);
    transition: color 0.2s, border-color 0.2s;
}
.admin-close:hover {
    color: var(--red);
    border-color: var(--red-dim);
}

.admin-section {
    margin-bottom: 1.25rem;
}

.admin-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border);
}

.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.admin-row:last-child {
    border-bottom: none;
}

.admin-label {
    font-size: 0.8rem;
    color: var(--text);
}

.admin-input {
    padding: 0.4rem 0.65rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-size: 0.8rem;
    width: 200px;
    transition: border-color 0.2s;
}
.admin-input:focus {
    border-color: var(--border-focus);
}

.admin-toggle {
    width: 40px;
    height: 22px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.admin-toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.admin-toggle.active {
    background: var(--gold-dim);
    border-color: var(--gold);
}

.admin-toggle.active::after {
    transform: translateX(18px);
    background: var(--gold);
}

.admin-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: #0c0f1a;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius-xs);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.admin-btn:hover {
    opacity: 0.9;
}

.admin-btn.danger {
    background: linear-gradient(135deg, var(--red) 0%, #ef4444 100%);
}

/* ============================================================
   22. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 380px;
}

.toast {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    animation: toast-in 0.35s ease;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
}

.toast.success::before { background: var(--green); }
.toast.error::before   { background: var(--red); }
.toast.warning::before { background: var(--yellow); }
.toast.info::before    { background: var(--blue); }

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

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

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
}

.toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.1rem;
}

.toast-message {
    font-size: 0.72rem;
    color: var(--text-dim);
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    width: 20px; height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-radius: 3px;
    transition: color 0.2s, background 0.2s;
}
.toast-close:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-gold     { color: var(--gold); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-yellow   { color: var(--yellow); }
.text-blue     { color: var(--blue); }
.text-dim      { color: var(--text-dim); }
.text-muted    { color: var(--text-muted); }
.text-mono     { font-family: var(--mono); }

.bg-gold-dim   { background: var(--gold-dim); }
.bg-green-dim  { background: var(--green-dim); }
.bg-red-dim    { background: var(--red-dim); }
.bg-blue-dim   { background: var(--blue-dim); }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm        { gap: 0.5rem; }
.gap-md        { gap: 0.75rem; }
.gap-lg        { gap: 1.25rem; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden { display: none !important; }

/* Loading shimmer */
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-elevated) 25%,
        var(--bg-card-hover) 50%,
        var(--bg-elevated) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-xs);
}

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

/* Status dot */
.status-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    margin-right: 0.35rem;
}
.status-dot.online  { background: var(--green); box-shadow: 0 0 6px var(--green-dim); }
.status-dot.offline { background: var(--red); }
.status-dot.away    { background: var(--yellow); }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
}
.badge.gold   { background: var(--gold-dim); color: var(--gold); }
.badge.green  { background: var(--green-dim); color: var(--green); }
.badge.red    { background: var(--red-dim); color: var(--red); }
.badge.blue   { background: var(--blue-dim); color: var(--blue); }
.badge.purple { background: var(--purple-dim); color: var(--purple); }

/* ============================================================
   24. RESPONSIVE
   ============================================================ */

/* Tablet landscape */
@media (max-width: 1100px) {
    .command-strip {
        grid-template-columns: repeat(3, 1fr);
    }

    .finance-layout {
        flex-direction: column;
        align-items: center;
    }

    .finance-donut-wrap {
        margin-bottom: 0.5rem;
    }

    .finance-blocks {
        width: 100%;
    }

    .week-timeline {
        grid-template-columns: repeat(4, 1fr);
    }

    .weather-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .f1-countdown-digits {
        flex-wrap: wrap;
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    html {
        font-size: 14px;
    }

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

    .span-half {
        grid-column: span 1;
    }

    .command-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        padding: 0.65rem 1rem;
    }

    .grid {
        padding: 0 1rem 1rem;
    }

    .command-strip {
        padding: 0.75rem 1rem;
    }

    .week-timeline {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-kids {
        grid-template-columns: 1fr;
    }

    .tides-layout {
        flex-direction: column;
    }

    .yt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    html {
        font-size: 13px;
    }

    .command-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .kpi-value {
        font-size: 1.2rem;
    }

    .header-tagline {
        display: none;
    }

    .header-date {
        display: none;
    }

    .hero-section {
        padding: 1rem;
    }

    .grid {
        gap: 0.75rem;
        padding: 0 0.75rem 0.75rem;
    }

    .card {
        padding: 1rem;
        border-radius: var(--radius-sm);
    }

    .week-timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-day {
        min-height: 70px;
    }

    .weather-hero {
        flex-direction: column;
        text-align: center;
    }

    .weather-temp-big {
        font-size: 2.2rem;
    }

    .weather-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .f1-cd-value {
        font-size: 1.3rem;
    }

    .f1-cd-block {
        min-width: 42px;
        padding: 0.35rem 0.45rem;
    }

    .stocks-table th:nth-child(3),
    .stocks-table td:nth-child(3) {
        display: none;
    }

    .finance-donut-wrap {
        width: 140px;
        height: 140px;
    }

    .toast-container {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        max-width: none;
    }

    .admin-panel {
        width: 95%;
        padding: 1rem;
    }

    .login-card {
        padding: 1.75rem 1.25rem;
    }
}

/* Small mobile */
@media (max-width: 400px) {
    .command-strip {
        grid-template-columns: 1fr;
    }

    .f1-countdown-digits {
        gap: 0.3rem;
    }

    .f1-sessions-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .yt-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    body {
        background: #fff;
        color: #1a1810;
    }

    .header,
    .footer,
    .toast-container,
    .admin-overlay {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        backdrop-filter: none;
        break-inside: avoid;
    }

    .card::before,
    .card::after {
        display: none;
    }
}
