/* ============================================
   GLM Monitor Dashboard — Design System v2.0
   Aesthetic: Refined Minimal / Linear-inspired
   Typography: DM Sans + JetBrains Mono
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ============================================
   1. DESIGN TOKENS — Light Mode
   ============================================ */
:root {
    /* --- Color Palette --- */
    --bg-primary: #fafbfc;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #ebedf0;
    --surface: #ffffff;
    --surface-hover: #f9fafb;
    --surface-elevated: #ffffff;

    /* --- Text --- */
    --text-primary: #111318;
    --text-secondary: #5f6b7a;
    --text-tertiary: #8b95a5;
    --text-inverse: #ffffff;

    /* --- Brand / Primary --- */
    --accent: #4f6ef7;
    --accent-hover: #3d5be5;
    --accent-subtle: rgba(79, 110, 247, 0.08);
    --accent-muted: rgba(79, 110, 247, 0.15);
    --accent-glow: rgba(79, 110, 247, 0.25);

    /* --- Semantic Colors --- */
    --green: #0d9668;
    --green-subtle: rgba(13, 150, 104, 0.08);
    --green-muted: rgba(13, 150, 104, 0.15);
    --orange: #d97706;
    --orange-subtle: rgba(217, 119, 6, 0.08);
    --orange-muted: rgba(217, 119, 6, 0.15);
    --red: #dc2626;
    --red-subtle: rgba(220, 38, 38, 0.08);
    --red-muted: rgba(220, 38, 38, 0.15);
    --blue-chart: #3b82f6;

    /* --- Borders --- */
    --border-primary: #e5e7eb;
    --border-secondary: #f0f1f3;
    --border-accent: rgba(79, 110, 247, 0.2);

    /* --- Shadows (layered, soft) --- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
    --shadow-accent: 0 4px 16px rgba(79, 110, 247, 0.12);
    --shadow-accent-lg: 0 8px 32px rgba(79, 110, 247, 0.15);

    /* --- Spacing Scale (4px base) --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* --- Radii --- */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* --- Typography --- */
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* --- Transitions --- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    /* --- Chart text (used by app.js) --- */
    --chart-text: #5f6b7a;

    /* --- Legacy aliases (for app.js compatibility) --- */
    --bg-color: var(--bg-secondary);
    --bg-gradient: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    --card-bg: var(--surface);
    --text-main: var(--text-primary);
    --text-sub: var(--text-secondary);
    --border-color: var(--border-primary);
    --primary: var(--accent);
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --green-light: #34d399;
}

/* ============================================
   2. DESIGN TOKENS — Dark Mode
   ============================================ */
body.dark {
    --bg-primary: #09090b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1f;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.05);
    --surface-elevated: rgba(255, 255, 255, 0.06);

    --text-primary: #f0f0f3;
    --text-secondary: #8b8b9e;
    --text-tertiary: #5f5f73;
    --text-inverse: #09090b;

    --accent: #6b8aff;
    --accent-hover: #8ba3ff;
    --accent-subtle: rgba(107, 138, 255, 0.08);
    --accent-muted: rgba(107, 138, 255, 0.15);
    --accent-glow: rgba(107, 138, 255, 0.2);

    --green: #34d399;
    --green-subtle: rgba(52, 211, 153, 0.08);
    --green-muted: rgba(52, 211, 153, 0.15);
    --orange: #fbbf24;
    --orange-subtle: rgba(251, 191, 36, 0.08);
    --orange-muted: rgba(251, 191, 36, 0.15);
    --red: #f87171;
    --red-subtle: rgba(248, 113, 113, 0.08);
    --red-muted: rgba(248, 113, 113, 0.15);

    --border-primary: rgba(255, 255, 255, 0.06);
    --border-secondary: rgba(255, 255, 255, 0.03);
    --border-accent: rgba(107, 138, 255, 0.2);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.25);
    --shadow-accent: 0 4px 16px rgba(107, 138, 255, 0.1);
    --shadow-accent-lg: 0 8px 32px rgba(107, 138, 255, 0.12);

    --chart-text: #8b8b9e;

    /* Legacy aliases */
    --bg-color: var(--bg-secondary);
    --bg-gradient: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    --card-bg: var(--surface);
    --text-main: var(--text-primary);
    --text-sub: var(--text-secondary);
    --border-color: var(--border-primary);
}

/* ============================================
   3. BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    min-height: 100vh;
    transition: background var(--duration-slow) var(--ease-out),
                color var(--duration-normal) var(--ease-out);
}

/* Subtle noise texture overlay for dark mode */
body.dark::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   4. CONTAINER
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    position: relative;
    z-index: 1;
}

/* ============================================
   5. ENTRANCE ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.header-bar {
    animation: fadeInUp 0.5s var(--ease-out) both;
}

.grid {
    animation: fadeInUp 0.5s var(--ease-out) 0.08s both;
}

.chart-box:nth-of-type(1) {
    animation: fadeInUp 0.5s var(--ease-out) 0.16s both;
}

.chart-box:nth-of-type(2) {
    animation: fadeInUp 0.5s var(--ease-out) 0.24s both;
}

/* ============================================
   6. HEADER BAR — Refined Toolbar
   ============================================ */
.header-bar {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    margin-bottom: var(--space-6);
    gap: var(--space-4);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent line at top of header */
.header-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--accent) 30%,
        var(--accent) 70%,
        transparent 100%
    );
    opacity: 0.4;
}

body.dark .header-bar {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark .header-bar::before {
    opacity: 0.3;
}

/* ============================================
   7. API KEY INPUT GROUP
   ============================================ */
.api-key-group {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex: 1;
}

.api-key-actions {
    display: flex;
    gap: var(--space-2);
}

/* ============================================
   8. INPUT FIELD
   ============================================ */
.input {
    flex: 1;
    padding: 0 var(--space-4);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    height: 40px;
    box-sizing: border-box;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
    background: var(--surface);
}

.input::placeholder {
    color: var(--text-tertiary);
    font-family: var(--font-sans);
    font-size: 13px;
}

body.dark .input {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* ============================================
   9. BUTTONS
   ============================================ */

/* Primary Button */
.btn {
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    padding: 0 var(--space-5);
    border-radius: var(--radius-md);
    cursor: pointer;
    height: 40px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.01em;
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: var(--shadow-accent);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent-lg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
    filter: brightness(0.95);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: none;
}

/* Small Buttons */
.btn-small {
    background: var(--green-subtle);
    color: var(--green);
    border: 1px solid var(--green-muted);
    padding: 0 var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--duration-fast) var(--ease-out);
    height: 40px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-small:hover {
    background: var(--green-muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-small:active {
    transform: translateY(0);
}

.btn-small.danger {
    background: var(--red-subtle);
    color: var(--red);
    border-color: var(--red-muted);
}

.btn-small.danger:hover {
    background: var(--red-muted);
}

/* ============================================
   10. CARDS
   ============================================ */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--border-primary);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent on hover */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.card:hover::before {
    opacity: 1;
}

body.dark .card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark .card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(107, 138, 255, 0.15);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(107, 138, 255, 0.08);
}

.card.pending {
    opacity: 0.5;
}

.card.pending:hover {
    opacity: 0.7;
}

/* ============================================
   11. GRID LAYOUT
   ============================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

/* ============================================
   12. FLEX ROW
   ============================================ */
.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   13. TYPOGRAPHY
   ============================================ */
.big-num {
    font-family: var(--font-mono);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
}

body.dark .big-num {
    color: var(--text-primary);
}

.sub-txt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* ============================================
   14. TAGS / BADGES
   ============================================ */
.tag {
    font-family: var(--font-sans);
    font-size: 11px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all var(--duration-fast) var(--ease-out);
    display: inline-flex;
    align-items: center;
    line-height: 20px;
    white-space: nowrap;
}

/* Status tags */
.tag.valid {
    background: var(--green-subtle);
    color: var(--green);
    border: 1px solid var(--green-muted);
}

.tag.warn {
    background: var(--orange-subtle);
    color: var(--orange);
    border: 1px solid var(--orange-muted);
}

/* Package level tags */
.tag.lite {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.tag.pro {
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent-muted);
}

.tag.max {
    background: var(--orange-subtle);
    color: var(--orange);
    border: 1px solid var(--orange-muted);
}

.tag.standard {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.tag.plan-new {
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent-muted);
    font-weight: 700;
}

.tag.plan-old {
    background: var(--red-subtle);
    color: var(--red);
    border: 1px solid var(--red-muted);
}

/* ============================================
   15. USAGE STATUS BADGES
   ============================================ */
.usage-status {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 10px;
}

.usage-status.sufficient {
    background: var(--green-subtle);
    color: var(--green);
    border: 1px solid var(--green-muted);
}

.usage-status.moderate {
    background: var(--orange-subtle);
    color: var(--orange);
    border: 1px solid var(--orange-muted);
}

.usage-status.urgent {
    background: var(--red-subtle);
    color: var(--red);
    border: 1px solid var(--red-muted);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

/* ============================================
   16. PROGRESS BARS
   ============================================ */
.progress-bg {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    margin-top: var(--space-3);
    overflow: hidden;
    position: relative;
}

body.dark .progress-bg {
    background: rgba(255, 255, 255, 0.06);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
    width: 0;
    transition: width 0.8s var(--ease-out);
    border-radius: var(--radius-full);
    position: relative;
}

/* Shimmer effect */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: shimmer 2.5s infinite;
}

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

/* ============================================
   17. CHART CONTAINERS
   ============================================ */
.chart-box {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--border-primary);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}

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

body.dark .chart-box {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark .chart-box:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   18. CONTROL GROUPS (Segmented Controls)
   ============================================ */
.ctrl-group {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

body.dark .ctrl-group {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.ctrl-btn {
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-tertiary);
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out);
    line-height: 20px;
}

.ctrl-btn:hover {
    color: var(--text-primary);
    background: rgba(79, 110, 247, 0.04);
}

body.dark .ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ctrl-btn.active {
    background: var(--surface);
    color: var(--accent);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

body.dark .ctrl-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

/* ============================================
   19. MCP TOOL DETAILS
   ============================================ */
.mcp-details {
    display: flex;
    flex-direction: row;
    gap: var(--space-2);
    justify-content: space-between;
    flex-wrap: wrap;
}

.mcp-tool-item {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 12px;
    color: var(--text-secondary);
    padding: var(--space-1) var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
    border: 1px solid transparent;
}

.mcp-tool-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

body.dark .mcp-tool-item {
    background: rgba(255, 255, 255, 0.04);
}

body.dark .mcp-tool-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.mcp-tool-icon {
    font-size: 14px;
}

.mcp-tool-usage {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
}

/* ============================================
   20. CHART SIZES
   ============================================ */
#chart1, #chart2 {
    width: 100%;
    height: 360px;
}

/* ============================================
   21. PAGE CONTENT
   ============================================ */
.page-content {
    width: 100%;
}

/* ============================================
   22. SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ============================================
   23. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--space-4) var(--space-3);
    }

    .grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .flex-row {
        flex-direction: column;
        gap: var(--space-3);
        align-items: stretch;
    }

    .header-bar {
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-4);
        gap: var(--space-3);
    }

    .api-key-group {
        flex-direction: column;
        align-items: stretch;
    }

    .api-key-actions {
        justify-content: stretch;
    }

    .api-key-actions .btn-small {
        flex: 1;
    }

    #chart1, #chart2 {
        height: 280px;
    }

    .card {
        min-height: auto;
        padding: var(--space-5);
    }

    .chart-box {
        padding: var(--space-4);
    }

    .big-num {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--space-3) var(--space-2);
    }

    .header-bar {
        padding: var(--space-3);
    }

    .ctrl-group {
        flex-wrap: wrap;
    }

    .ctrl-btn {
        flex: 1;
        text-align: center;
        min-width: 0;
        padding: 5px 8px;
        font-size: 11px;
    }
}

/* ============================================
   24. SELECTION & FOCUS STYLES
   ============================================ */
::selection {
    background: var(--accent-muted);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   25. UTILITY — Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
