/* ============================================
   XangXe - Mobile-First Design System
   Light/Dark Mode via prefers-color-scheme + [data-theme]
   ============================================ */

/* ===== THEME VARIABLES (light-dark unified) ===== */
:root {
    color-scheme: light dark;

    /* Accents */
    --accent-cyan:   light-dark(#0891b2, #22d3ee);
    --accent-purple: light-dark(#7c3aed, #a78bfa);
    --accent-green:  light-dark(#059669, #34d399);
    --accent-orange: light-dark(#d97706, #fbbf24);
    --accent-red:    light-dark(#dc2626, #f87171);
    --accent-blue:   light-dark(#2563eb, #60a5fa);
    --accent-pink:   light-dark(#db2777, #f472b6);
    --accent-gradient: linear-gradient(135deg, light-dark(#0891b2, #06b6d4), light-dark(#7c3aed, #8b5cf6));

    /* Backgrounds */
    --bg-primary:      light-dark(#f0f2f5, #0a0e1a);
    --bg-secondary:    light-dark(#ffffff, #111827);
    --bg-card:         light-dark(rgba(255,255,255,0.85), rgba(255,255,255,0.05));
    --bg-glass:        light-dark(rgba(255,255,255,0.7), rgba(255,255,255,0.07));
    --bg-glass-hover:  light-dark(rgba(255,255,255,0.9), rgba(255,255,255,0.12));
    --nav-bg:          light-dark(rgba(255,255,255,0.92), rgba(10,14,26,0.92));
    --input-bg:        light-dark(rgba(0,0,0,0.03), rgba(255,255,255,0.04));
    --input-focus-bg:  light-dark(rgba(8,145,178,0.05), rgba(6,182,212,0.06));

    /* Text */
    --text-primary:   light-dark(#1e293b, #f1f5f9);
    --text-secondary: light-dark(#64748b, #94a3b8);
    --text-muted:     light-dark(#94a3b8, #475569);

    /* Borders */
    --border-color: light-dark(rgba(0,0,0,0.06), rgba(255,255,255,0.06));
    --border-glass: light-dark(rgba(0,0,0,0.08), rgba(255,255,255,0.1));

    /* Shadows */
    --shadow-sm: light-dark(0 1px 3px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.3));
    --shadow-md: light-dark(0 4px 12px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.4));
    --shadow-lg: light-dark(0 8px 24px rgba(0,0,0,0.12), 0 8px 32px rgba(0,0,0,0.5));
    --shadow-glow-cyan:   light-dark(0 4px 16px rgba(8,145,178,0.2), 0 0 20px rgba(6,182,212,0.3));
    --shadow-glow-purple: light-dark(0 4px 16px rgba(124,58,237,0.2), 0 0 20px rgba(139,92,246,0.3));

    /* Misc */
    --tint-alpha-bg: light-dark(0.12, 0.15);
    --chart-grid:    light-dark(rgba(0,0,0,0.06), rgba(255,255,255,0.04));

    /* Radius, font, nav */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 70px;
}

[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }

/* ===== TINT TOKEN SYSTEM =====
   One place to define color variants. Any component consuming
   var(--tint) / var(--tint-rgb) automatically picks up the color. */
.tint-cyan   { --tint: var(--accent-cyan);   --tint-rgb: 8,145,178; }
.tint-orange { --tint: var(--accent-orange); --tint-rgb: 217,119,6; }
.tint-green  { --tint: var(--accent-green);  --tint-rgb: 5,150,105; }
.tint-purple { --tint: var(--accent-purple); --tint-rgb: 124,58,237; }
.tint-red    { --tint: var(--accent-red);    --tint-rgb: 220,38,38; }
.tint-blue   { --tint: var(--accent-blue);   --tint-rgb: 37,99,235; }
.tint-pink   { --tint: var(--accent-pink);   --tint-rgb: 219,39,119; }

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse at 30% 0%, light-dark(rgba(8,145,178,0.06), rgba(6,182,212,0.06)) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 100%, light-dark(rgba(124,58,237,0.04), rgba(139,92,246,0.06)) 0%, transparent 40%);
    background-attachment: fixed;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-purple); }

/* ===== Focus ring (a11y) ===== */
:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
    border-radius: inherit;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ===== LAYOUT ===== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-content {
    padding: 16px 16px calc(var(--nav-height) + 24px) 16px;
    animation: fadeInUp .35s ease;
}

.main-content.full-height {
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.theme-toggle {
    position: fixed;
    top: 12px; right: 12px;
    z-index: 1000;
    width: 36px; height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all .2s;
}
.theme-toggle:hover { color: var(--accent-cyan); box-shadow: var(--shadow-md); }

@media (min-width: 481px) {
    .app-container { border-left: 1px solid var(--border-color); border-right: 1px solid var(--border-color); }
}

/* ===== UNIFIED GLASS CONTAINERS ===== */
.glass-card,
.stat-card,
.log-item,
.user-item,
.quick-action,
.admin-nav-item {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
}

.glass-card:hover,
.log-item:hover,
.user-item:hover,
.quick-action:hover,
.admin-nav-item:hover {
    background: var(--bg-glass-hover);
    box-shadow: var(--shadow-md);
}

.glass-card { border-radius: var(--radius-lg); padding: 20px; }
.glass-card--tight { padding: 14px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 500;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    transition: all .3s ease;
    min-width: 50px;
}
.bottom-nav a i { font-size: 1.15rem; transition: transform .2s; }
.bottom-nav a:hover,
.bottom-nav a.active { color: var(--accent-cyan); }
.bottom-nav a.active i { transform: scale(1.15); }

/* FAB (Floating Action) */
.bottom-nav a.add-btn { position: relative; top: -18px; color: #fff; }
.fab-inner {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-glow-cyan), var(--shadow-md);
    transition: all .3s ease;
}
.bottom-nav a.add-btn:hover .fab-inner {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow-purple), var(--shadow-lg);
}
.bottom-nav a.fab-disabled .fab-inner { background: var(--text-muted); box-shadow: none; opacity: 0.5; }
.bottom-nav a.fab-disabled:hover .fab-inner { transform: none; box-shadow: none; }
.bottom-nav a.add-btn i { font-size: 1.3rem; color: #fff; }

/* ===== AUTH PAGES ===== */
.auth-container { width: 100%; padding: 20px; animation: fadeInUp .5s ease; }
.auth-card { padding: 32px 24px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-secondary); }

.auth-header h2 {
    font-size: 1.5rem; font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-header p { color: var(--text-secondary); font-size: 0.85rem; margin-top: 4px; }

.logo-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-glow-cyan);
    animation: pulseGlow 3s infinite;
}
.logo-icon i { font-size: 1.6rem; color: #fff; }

/* ===== FORMS ===== */
.styled-form { display: flex; flex-direction: column; gap: 14px; }

.input-group { position: relative; display: flex; flex-direction: column; }

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.input-group label.mb-0 { margin-bottom: 0; }

.input-group > i {
    position: absolute;
    left: 14px;
    bottom: 0;
    height: 50px;
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color .3s;
    z-index: 1;
    pointer-events: none;
}
.input-group:has(.small-hint) > i { bottom: auto; top: 18px; height: auto; }
.input-group:has(.small-hint):has(label) > i { top: 38px; height: auto; }

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 0 14px 0 42px;
    height: 50px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    line-height: 1.5;
    box-sizing: border-box;
    transition: all .3s ease;
    outline: none;
}
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--accent-cyan);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}
.input-group:focus-within > i { color: var(--accent-cyan); }

.input-group textarea { min-height: 80px; resize: vertical; padding-top: 12px; }

.input-group.no-icon input,
.input-group.no-icon select,
.input-group.no-icon textarea {
    padding-left: 14px;
}

/* Select dropdown arrow */
.input-group select {
    -webkit-appearance: none;
    appearance: none;
    background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
    padding-right: 38px;
    cursor: pointer;
}
.input-group select:focus {
    background: var(--input-focus-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2306b6d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px;
}
.input-group select option { background: var(--bg-secondary); color: var(--text-primary); padding: 10px 14px; }

/* Date input */
.input-group input[type="date"] {
    position: relative;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    max-width: 100%;
    text-align: left !important;
    display: block;
    padding-left: 42px !important;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="date"]::-webkit-datetime-edit { text-align: left !important; padding: 0; }
.input-group input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute; inset: 0;
    width: auto; height: auto;
    opacity: 0;
    cursor: pointer;
    background: transparent;
}
@media (prefers-color-scheme: dark) {
    .input-group input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); }
}

/* Inline icon wrap (for inputs in a flex row) */
.input-icon-wrap { position: relative; }
.input-icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}
.input-with-icon { padding-left: 40px; width: 100%; box-sizing: border-box; }

/* Checkbox (unified for form + auth) */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.checkbox-label--lg {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    margin-bottom: 16px;
}

.checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px; height: 20px;
    min-width: 20px; min-height: 20px;
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all .2s;
    flex-shrink: 0;
}
.checkbox-label input:checked {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}
.checkbox-label input:checked::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 5px; height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-cyan), var(--shadow-md);
    color: #fff;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(220, 38, 38, 0.15);
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.2); color: var(--accent-red); }

/* Ghost button: transparent, uses --tint when set */
.btn-ghost {
    background: transparent;
    color: var(--tint, var(--text-secondary));
    border: 1px solid var(--border-glass);
}
.btn-ghost:hover {
    background: rgba(var(--tint-rgb, 148,163,184), 0.08);
    border-color: rgba(var(--tint-rgb, 148,163,184), 0.3);
    color: var(--tint, var(--text-primary));
}

/* Tint-aware outline button */
.btn-outline {
    background: transparent;
    color: var(--tint, var(--accent-cyan));
    border: 1px solid var(--tint, var(--accent-cyan));
}
.btn-outline:hover { background: rgba(var(--tint-rgb, 8,145,178), 0.1); color: var(--tint, var(--accent-cyan)); }

/* Sizes */
.btn-xs { padding: 4px 10px; font-size: 0.72rem; border-radius: var(--radius-sm); }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; }
.btn-block { display: flex; width: 100%; text-align: center; margin-top: 6px; }

/* Square icon button (keeps width = height) */
.btn-square {
    padding: 0;
    width: 40px; height: 40px; min-width: 40px;
    aspect-ratio: 1;
}
.btn-square.btn-sm { width: 34px; height: 34px; min-width: 34px; }
.btn-square.btn-xs { width: 28px; height: 28px; min-width: 28px; }

.btn-stepper {
    width: 40px; height: 40px; min-width: 40px; padding: 0;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s ease;
}
.btn-stepper:hover { background: var(--bg-glass-hover); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.btn-stepper:active { transform: scale(0.92); }

.btn-load-more {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
    margin: 12px 0;
}
.btn-load-more:hover { background: var(--bg-primary); border-style: solid; color: var(--text-primary); }

/* Minimal ghost-delete (inline log/charge delete) */
.btn-delete-inline {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    transition: all .2s;
}
.btn-delete-inline:hover { color: var(--accent-red); background: rgba(220, 38, 38, 0.08); }
.btn-delete-inline--xs { font-size: 0.65rem; padding: 1px 3px; opacity: 0.6; vertical-align: middle; }
.btn-delete-inline--xs:hover { opacity: 1; }

/* ===== ALERTS & TOAST ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeInDown .3s ease;
}
.alert-error,
.alert.tint-red   { background: rgba(220,38,38,0.1);  color: var(--accent-red);   border: 1px solid rgba(220,38,38,0.15); }
.alert-success,
.alert.tint-green { background: rgba(5,150,105,0.1);  color: var(--accent-green); border: 1px solid rgba(5,150,105,0.15); }

/* Toast variant: floating at top */
.toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: calc(100% - 32px);
    max-width: 448px;
    margin-bottom: 0;
    box-shadow: var(--shadow-lg);
    animation: toastIn .3s ease, toastOut .3s ease 3s forwards;
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}
.page-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.page-header h1 i {
    font-size: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}
.page-header__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title i { color: var(--accent-cyan); }

/* ===== STAT CARDS =====
   Uses --tint / --tint-rgb from .tint-* class */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 12px 14px 12px 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp .4s ease both;
    /* default tint for stat-cards without explicit tint-* */
    --tint: var(--accent-cyan);
    --tint-rgb: 8,145,178;
}
.stat-card:hover { transform: translateY(-2px); }
a.stat-card { text-decoration: none; color: inherit; }
a.stat-card:hover { color: inherit; }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: var(--tint);
}

/* Hero variant: gradient left-border for "total" cards */
.stat-card--hero::before { background: var(--accent-gradient); width: 4px; }

.stat-card-full { width: 100%; }

.stat-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    background: rgba(var(--tint-rgb), var(--tint-alpha-bg));
    color: var(--tint);
}

.stat-text { flex: 1; min-width: 0; }
.stat-value {
    font-size: 1rem; font-weight: 700; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-label {
    font-size: 0.60rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Stagger animation */
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }

/* Chevron cue on hoverable stat-card link */
a.stat-card::after {
    content: '\f054'; /* chevron-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity .2s, transform .2s;
}
a.stat-card:hover::after { opacity: 0.6; transform: translateY(-50%) translateX(2px); }

/* ===== CHART SECTION ===== */
.chart-section { margin-bottom: 20px; }
.chart-section .glass-card { padding: 16px; }

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.chart-title {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chart-title i { color: var(--accent-cyan); font-size: 0.9rem; }

.chart-container { position: relative; height: 220px; }
.chart-container-tall { min-height: 200px; }

.chart-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chart-filter-select {
    -webkit-appearance: none;
    appearance: none;
    padding: 8px 30px 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all .3s ease;
}
.chart-filter-select:focus {
    border-color: var(--accent-cyan);
    background-color: var(--input-focus-bg);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}
.chart-filter-select option { background: var(--bg-secondary); color: var(--text-primary); }

/* ===== LOG LIST / LOG ITEM ===== */
.log-list, .user-list, .admin-nav, .notice-card__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.log-list { gap: 10px; }
.notice-card__list { gap: 6px; }

.log-item-link { text-decoration: none; color: inherit; display: block; }

.log-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp .4s ease both;
}
.log-item:hover { transform: translateX(4px); }

/* log-icon inherits --tint from a .tint-* class on itself or ancestor */
.log-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    position: relative;
    background: rgba(var(--tint-rgb, 8,145,178), var(--tint-alpha-bg));
    color: var(--tint, var(--accent-cyan));
}

.log-icon-badge {
    position: absolute;
    top: -10px; right: -10px;
    width: 25px; height: 25px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.5rem;
    background: rgba(var(--tint-rgb, 8,145,178), 0.15);
    color: var(--tint, var(--accent-cyan));
}

.log-info { flex: 1; min-width: 0; }
.log-info .log-title { font-size: 0.88rem; font-weight: 600; }
.log-info .log-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px; margin-bottom: 5px;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.log-amount { font-size: 0.92rem; font-weight: 700; color: var(--accent-cyan); white-space: nowrap; }
.log-date { font-size: 0.68rem; color: var(--text-muted); text-align: right; white-space: nowrap; }
.log-right { text-align: right; flex-shrink: 0; }
.log-title-sub { font-size: 0.75rem; color: var(--text-secondary); font-weight: normal; margin-left: 4px; }
.log-plate-tag { font-size: 0.65rem; color: var(--text-muted); }

/* Charge details (EV multi-charge) */
.charge-history {
    font-size: 0.72rem;
    line-height: 1.5;
    margin-top: 2px;
    color: var(--accent-cyan);
}
.charge-history i.charge-history__icon-sm { font-size: 0.55rem; }
.charge-history i.charge-history__icon-xs { font-size: 0.6rem; }

/* Stagger animation */
.log-item:nth-child(2) { animation-delay: 0.04s; }
.log-item:nth-child(3) { animation-delay: 0.08s; }
.log-item:nth-child(4) { animation-delay: 0.12s; }
.log-item:nth-child(5) { animation-delay: 0.16s; }
.log-item:nth-child(n+6) { animation-delay: 0.2s; }

/* ===== USER / VEHICLE LIST ITEMS ===== */
.user-item {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.user-info { display: flex; align-items: center; gap: 12px; }

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
/* Tinted avatar (for vehicle cards) */
.user-avatar.tint-cyan,
.user-avatar.tint-orange,
.user-avatar.tint-green,
.user-avatar.tint-purple,
.user-avatar.tint-red {
    background: rgba(var(--tint-rgb), 0.12);
    color: var(--tint);
}
.user-name { font-weight: 600; font-size: 0.9rem; }
.user-role { font-size: 0.7rem; color: var(--text-muted); }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(var(--tint-rgb, 8,145,178), 0.1);
    color: var(--tint, var(--accent-cyan));
    border: 1px solid rgba(var(--tint-rgb, 8,145,178), 0.15);
}
.badge-admin { background: rgba(124,58,237,0.1); color: var(--accent-purple); border-color: rgba(124,58,237,0.15); }
.badge-user  { background: rgba(8,145,178,0.1); color: var(--accent-cyan);   border-color: rgba(8,145,178,0.15); }
.badge-recurring {
    font-size: 0.6rem;
    background: rgba(124,58,237,0.15);
    color: var(--accent-purple);
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    border: none;
    text-transform: none;
    letter-spacing: 0;
}

.energy-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    background: rgba(var(--tint-rgb, 8,145,178), 0.1);
    color: var(--tint, var(--accent-cyan));
}

/* ===== TOGGLE SWITCH ===== */
.toggle-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}
.toggle-label { display: flex; flex-direction: column; gap: 2px; }
.toggle-label strong { font-size: 0.95rem; }
.toggle-label span { font-size: 0.75rem; color: var(--text-secondary); }

.switch { position: relative; width: 52px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--border-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: all .3s ease;
}
.slider::before {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    left: 2px; bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all .3s ease;
}
.switch input:checked + .slider {
    background: var(--accent-gradient);
    box-shadow: var(--shadow-glow-cyan);
    border-color: transparent;
}
.switch input:checked + .slider::before { transform: translateX(24px); background: #fff; }

/* ===== TABS ===== */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.tab-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all .3s ease;
    text-decoration: none;
}
.tab-bar a i { font-size: 0.95rem; }
.tab-bar a.active {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.tab-bar a.active:hover { color: #fff; }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.empty-state > i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}
.empty-state p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.empty-state--compact { padding: 24px 16px; }
.empty-state--compact > i { font-size: 2rem; }

/* ===== NOTICE CARD =====
   Generic replacement for maintenance-alert & maintenance-box */
.notice-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--tint, var(--accent-cyan));
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.notice-card--compact {
    border-left-width: 3px;
    padding: 12px 14px;
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: var(--border-glass);
    margin-bottom: 0;
    margin-top: 4px;
    width: 100%;
}
.notice-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--tint, var(--accent-orange));
    margin-bottom: 8px;
}
.notice-card__title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.notice-card__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
}
.notice-card__row {
    font-size: 0.82rem;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.notice-card__row + .notice-card__row { border-top: 1px solid var(--border-color); }
.notice-card__row .m-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}
.notice-card__row .m-name i { margin-right: 6px; font-size: 0.78rem; }
.notice-card__row .m-status {
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
}
.notice-card__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}
.notice-card__sub { color: var(--text-secondary); font-size: 0.78rem; }
.notice-card__empty { font-size: 0.75rem; color: var(--text-muted); }

/* ===== QUICK ACTIONS & ADMIN NAV ===== */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.quick-action,
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
}
.quick-action { gap: 10px; padding: 14px; font-size: 0.85rem; font-weight: 600; }
.quick-action:hover,
.admin-nav-item:hover { color: var(--text-primary); }
.quick-action:hover { transform: translateY(-2px); }
.admin-nav-item:hover { transform: translateX(4px); }

.quick-action i { font-size: 1.1rem; color: var(--tint, var(--accent-cyan)); }
.admin-nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--accent-cyan);
}
.admin-nav-item .nav-arrow { margin-left: auto; color: var(--text-muted); }

.admin-nav { margin-bottom: 20px; }
.admin-logout { text-align: center; margin-top: 20px; }

/* ===== CALC RESULT ===== */
.calc-result {
    background: rgba(8,145,178,0.06);
    border: 1px solid rgba(8,145,178,0.12);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: center;
    margin-top: 4px;
}
.calc-result .result-detail {
    font-size: 0.8rem;
    color: var(--accent-green);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(5,150,105,0.25);
}
.calc-result .result-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.calc-result .result-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-top: 4px;
}
.calc-result .result-footer {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(8,145,178,0.25);
}
.calc-result .result-detail strong,
.calc-result .result-footer strong { font-weight: 700; }

/* ===== VEHICLE CARD ===== */
.vehicle-card { flex-wrap: wrap; }
.vehicle-display { display: flex; align-items: flex-start; width: 100%; gap: 12px; }
.vehicle-display__main { display: flex; flex-direction: column; gap: 12px; flex: 1; width: 100%; min-width: 0; }
.vehicle-display__row { display: flex; gap: 12px; width: 100%; }
.vehicle-display__link {
    display: flex; gap: 12px; flex: 1;
    text-decoration: none; color: inherit;
    min-width: 0;
}
.vehicle-display .user-avatar { align-self: flex-start; margin-top: 4px; }
.vehicle-display .user-avatar i { font-size: 0.95rem; }
.vehicle-name { font-size: 1.1rem; margin-bottom: 2px; }
.vehicle-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vehicle-plate { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.vehicle-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: flex-start;
}
.vehicle-actions .btn { width: 34px; height: 34px; min-width: 34px; padding: 0; border-radius: 50%; font-size: 0.8rem; }

.vehicle-edit-panel {
    display: none;
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}
.vehicle-edit-panel .styled-form { gap: 10px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }

/* ===== EV FORM (battery picker & charge section) ===== */
.ev-charge-section { display: flex; flex-direction: column; gap: 14px; }

.ev-pct-row { display: flex; gap: 6px; align-items: center; }
.ev-pct-row .input-icon-wrap { flex: 1; }
.ev-pct-row input { text-align: center; }
.ev-pct-row__sep { font-weight: 700; color: var(--text-muted); }
.ev-pct-row__unit { font-weight: 600; color: var(--text-muted); font-size: 0.85rem; }

.ev-battery-power-row,
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}
.form-row-2col > .input-group,
.ev-battery-power-row > * { min-width: 0; }

.ev-battery-power-row .battery-dropdown { left: 0; right: auto; width: max(100%, 220px); }
.ev-battery-power-row .charge-power-group { margin-bottom: 0; }
.charge-power-group > label,
.battery-picker > label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.battery-picker { margin-top: 2px; position: relative; }
.battery-select-wrap { position: static; }

.battery-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
    padding: 0 14px;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    cursor: pointer;
    user-select: none;
    transition: all .3s ease;
}
.battery-select-trigger:hover { border-color: var(--accent-cyan); }
.battery-select-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.battery-select-placeholder > i,
.battery-select-trigger > i { color: var(--text-muted); font-size: 0.75rem; transition: transform .2s ease; }
.battery-select-placeholder > i { font-size: 0.9rem; }

.battery-select-trigger.has-selection .battery-select-placeholder-text { color: var(--text-primary); }
.battery-select-trigger.has-selection .battery-select-placeholder > i { color: var(--accent-green); }

.battery-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    overflow: hidden;
    animation: fadeInDown .2s ease;
}
.battery-dropdown.open { display: block; }
.battery-dropdown.open + .battery-select-trigger > i,
.battery-select-trigger:has(+ .battery-dropdown.open) > i { transform: rotate(180deg); }

.battery-dropdown-list { max-height: 180px; overflow-y: auto; }
.battery-dropdown-empty {
    padding: 12px 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-align: center;
}

.battery-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    transition: background .15s ease;
}
.battery-dropdown-item:last-child { border-bottom: none; }
.battery-dropdown-item:hover { background: var(--bg-glass-hover); }

.battery-dropdown-kwh {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.battery-dropdown-kwh i { color: var(--accent-green); font-size: 0.8rem; }

.battery-dropdown-actions { display: flex; gap: 6px; }
.btn-battery-select,
.btn-battery-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all .2s;
}
.btn-battery-select { color: var(--accent-cyan); }
.btn-battery-select:hover { background: rgba(8,145,178,0.12); transform: scale(1.1); }
.btn-battery-delete { color: var(--text-muted); font-size: 0.75rem; }
.btn-battery-delete:hover { color: var(--accent-red); background: rgba(220,38,38,0.08); }

.battery-selected-section {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-glass);
    background: var(--bg-glass);
}
.battery-selected-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.battery-selected-list { display: flex; flex-wrap: wrap; gap: 6px; }

.battery-selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(5,150,105,0.12);
    color: var(--accent-green);
    border: 1px solid rgba(5,150,105,0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    animation: fadeInDown .2s ease;
}
.battery-selected-chip i { font-size: 0.7rem; }
.battery-selected-chip .chip-remove {
    background: none;
    border: none;
    color: var(--accent-green);
    font-size: 1rem;
    line-height: 1;
    padding: 0 2px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity .2s;
}
.battery-selected-chip .chip-remove:hover { opacity: 1; color: var(--accent-red); }

.battery-add-row {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-glass);
}
.battery-add-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.85rem;
    outline: none;
    transition: border-color .2s;
    min-width: 0;
}
.battery-add-row input:focus { border-color: var(--accent-cyan); }
.battery-add-row .btn { padding: 8px 12px; font-size: 0.75rem; white-space: nowrap; }

/* ===== PROGRESS BAR (generic) ===== */
.progress-track {
    width: 100%; height: 6px;
    background: var(--input-bg);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-track--lg { height: 14px; }

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width .8s cubic-bezier(.4,0,.2,1);
    min-width: 4px;
    background: var(--tint, var(--accent-cyan));
    background: linear-gradient(90deg, var(--tint, var(--accent-cyan)), rgba(var(--tint-rgb, 8,145,178), 0.6));
}

/* Stacked progress row (fuel cost breakdown) */
.progress-stacked {
    display: flex;
    height: 14px;
    border-radius: var(--radius-full);
    overflow: hidden;
    gap: 2px;
    margin-bottom: 12px;
}
.progress-stacked > .progress-seg {
    border-radius: var(--radius-full);
    min-width: 8px;
    transition: width .6s ease;
    background: var(--tint, var(--accent-cyan));
}

.progress-labels { display: flex; flex-direction: column; gap: 6px; }
.progress-label { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; }
.progress-label__dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    background: var(--tint, var(--accent-cyan));
}
.progress-label__name { color: var(--text-secondary); min-width: 50px; }
.progress-label__pct { font-weight: 700; color: var(--text-primary); min-width: 42px; }
.progress-label__cost { color: var(--text-muted); margin-left: auto; font-size: 0.72rem; }

/* Ranking row (reuses .progress-track + .progress-fill) */
.ranking-item { padding: 10px 14px; }
.ranking-item + .ranking-item { border-top: 1px solid var(--border-color); }

.ranking-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}
.ranking-label {
    font-size: 0.82rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    flex-shrink: 1;
}
.ranking-label strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-value { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.ranking-cost { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.ranking-detail { font-size: 0.68rem; color: var(--text-muted); }

/* ===== MISC / HINT TEXTS ===== */
.price-btns { margin-top: 8px; }
.price-btns:empty { display: none; }

.small-hint,
.km-interval-hint {
    font-size: 0.78rem;
    color: var(--accent-green);
    font-weight: 600;
    margin-top: 4px;
    display: block;
}
.km-interval-hint { margin-top: 0; margin-left: 2px; }

.rename-message {
    font-size: 0.75rem;
    margin-top: 4px;
    display: none;
}

.icon-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 4px;
}
.icon-link:hover { color: var(--accent-cyan); }

/* ===== UTILITIES ===== */
.d-flex { display: flex; }
.d-inline { display: inline; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none; }

/* Text utilities */
.text-xs        { font-size: 0.65rem; font-weight: 400; }
.text-sm        { font-size: 0.85rem; font-weight: 400; }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-tint      { color: var(--tint, var(--accent-cyan)); }

.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: 4px; }
.mb-6  { margin-bottom: 6px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.ml-6  { margin-left: 6px; }
.mt-4  { margin-top: 4px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.pt-5  { padding-top: 5px; }
.p-30  { padding: 30px; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: var(--shadow-glow-cyan); }
    50%      { box-shadow: var(--shadow-glow-cyan), var(--shadow-glow-purple); }
}
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toastOut {
    to { opacity: 0; transform: translate(-50%, -20px); pointer-events: none; }
}

/* Will-change hint */
.log-item, .stat-card { will-change: transform, opacity; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-glass); border-radius: 4px; }
