
/* ═══════════════════════════════════════════
   tacho.morne.pl — Minimalist Tachograph UI
   ═══════════════════════════════════════════ */

/* ── Dark theme (domyślny) ─────────────────── */
:root,
[data-theme="dark"] {
    --bg:          #0c0e13;
    --bg-card:     #13161d;
    --bg-card-hover: #181c25;
    --bg-input:    #1a1e28;
    --border:      #222838;
    --border-hover:#2e3548;
    --text:        #e2e8f0;
    --text-muted:  #64748b;
    --text-dim:    #475569;
    --accent:      #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --green:       #10b981;
    --yellow:      #f59e0b;
    --red:         #ef4444;
    --purple:      #8b5cf6;
    --radius:      8px;
    --radius-lg:   12px;
    --font:        'DM Sans', system-ui, sans-serif;
    --mono:        'JetBrains Mono', 'Fira Code', monospace;
    --shadow:      0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg:   0 4px 20px rgba(0,0,0,0.4);
    --nav-bg:      rgba(12, 14, 19, 0.85);
    --bar-bg:      rgba(255,255,255,0.03);
    --row-hover:   rgba(255,255,255,0.03);
    --badge-gen1-bg:   rgba(251, 191, 36, 0.12);
    --badge-gen1-text: #fbbf24;
    --badge-gen1-border: rgba(251, 191, 36, 0.2);
    --badge-gen2-bg:   rgba(59, 130, 246, 0.12);
    --badge-gen2-text: #60a5fa;
    --badge-gen2-border: rgba(59, 130, 246, 0.2);
}

/* ── Light theme ───────────────────────────── */
[data-theme="light"] {
    --bg:          #f5f7fa;
    --bg-card:     #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input:    #f1f5f9;
    --border:      #e2e8f0;
    --border-hover:#cbd5e1;
    --text:        #1e293b;
    --text-muted:  #64748b;
    --text-dim:    #94a3b8;
    --accent:      #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.12);
    --green:       #059669;
    --yellow:      #d97706;
    --red:         #dc2626;
    --purple:      #7c3aed;
    --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg:   0 4px 20px rgba(0,0,0,0.08);
    --nav-bg:      rgba(255, 255, 255, 0.9);
    --bar-bg:      rgba(0,0,0,0.04);
    --row-hover:   rgba(0,0,0,0.02);
    --badge-gen1-bg:   rgba(217, 119, 6, 0.1);
    --badge-gen1-text: #b45309;
    --badge-gen1-border: rgba(217, 119, 6, 0.2);
    --badge-gen2-bg:   rgba(37, 99, 235, 0.1);
    --badge-gen2-text: #1d4ed8;
    --badge-gen2-border: rgba(37, 99, 235, 0.2);
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

/* ── Navigation ────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text);
}

.nav-icon {
    font-size: 1.4rem;
}

.nav-title {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ── Theme Switch ──────────────────────────── */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 26px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}

.theme-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s;
    z-index: 2;
}

.theme-switch input:checked + .theme-slider::before {
    transform: translateX(22px);
}

.theme-icon {
    font-size: 0.7rem;
    z-index: 1;
    line-height: 1;
}

.theme-sun { opacity: 0.5; }
.theme-moon { opacity: 0.5; }
.theme-switch input:checked + .theme-slider .theme-sun { opacity: 1; }
.theme-switch input:not(:checked) + .theme-slider .theme-moon { opacity: 1; }

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 450;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--row-hover);
}

.nav-link.active {
    color: var(--text);
    background: var(--accent-glow);
}

/* ── Main Content ──────────────────────────── */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ── Section Headers ───────────────────────── */
.section-header {
    margin-bottom: 1.5rem;
}

.section-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ── Stats Grid ────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: border-color 0.2s;
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Cards ─────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-wide {
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Report Grid ───────────────────────────── */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.report-header {
    margin-bottom: 1.5rem;
}

.report-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.report-export {
    display: flex;
    gap: 0.5rem;
}

.report-header .btn {
    margin-bottom: 0;
}

/* ── Info Rows ─────────────────────────────── */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.9rem;
    font-weight: 450;
    text-align: right;
}

/* ── Activity Summary ──────────────────────── */
.activity-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.act-stat {
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bar-bg);
    border: 1px solid var(--border);
}

.act-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.act-value {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.act-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.act-jazda .act-value       { color: var(--accent); }
.act-praca .act-value       { color: var(--yellow); }
.act-dostepnosc .act-value  { color: var(--purple); }
.act-odpoczynek .act-value  { color: var(--green); }

/* ── Chart ─────────────────────────────────── */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ── Timeline Chart ────────────────────────── */
.timeline-chart {
    width: 100%;
}

.tl-legend {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tl-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tl-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.tl-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 0;
}

.tl-date {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--mono);
    text-align: right;
}

.tl-bar-wrap {
    flex: 1;
    display: flex;
    position: relative;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--bar-bg);
}

.tl-segment {
    height: 100%;
    min-width: 1px;
    transition: opacity 0.2s;
    cursor: default;
}

.tl-segment.tl-abs {
    position: absolute;
    top: 0;
}

.tl-segment:hover {
    opacity: 0.8;
    filter: brightness(1.2);
}

.tl-scale {
    margin-bottom: 0.25rem;
}

.tl-hours {
    background: transparent !important;
    height: 14px;
    overflow: visible;
}

.tl-hour-mark {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

.tl-clickable {
    cursor: pointer;
    border-radius: 4px;
    padding: 0.15rem 0.25rem;
    margin: 0 -0.25rem;
    transition: background 0.15s;
}

.tl-clickable:hover {
    background: var(--bg-card-hover);
}

/* ── Day Detail Modal ──────────────────────── */
.tl-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.tl-modal-overlay.active {
    display: flex;
}

.tl-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.tl-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.tl-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.tl-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.tl-modal-close:hover {
    color: var(--text);
}

.tl-modal-body {
    padding: 1.25rem 1.5rem;
}

.tl-modal-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.tl-modal-stat {
    font-size: 0.85rem;
    font-weight: 500;
}

.tl-modal-total {
    color: var(--text) !important;
    margin-left: auto;
}

.tl-modal-chart {
    margin-bottom: 1.25rem;
}

.tl-modal-hours {
    position: relative;
    height: 18px;
    margin-bottom: 2px;
}

.tl-mh-major {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.tl-mh-major::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 14px;
    width: 1px;
    height: 6px;
    background: var(--border);
}

.tl-mh-minor {
    position: absolute;
    top: 14px;
    transform: translateX(-50%);
}

.tl-mh-minor::after {
    content: '';
    display: block;
    width: 1px;
    height: 4px;
    background: var(--border);
}

.tl-modal-bar {
    position: relative;
    height: 36px;
    background: var(--bar-bg);
    border-radius: 4px;
    overflow: hidden;
}

.tl-modal-seg {
    position: absolute;
    top: 0;
    height: 100%;
    min-width: 1px;
    transition: filter 0.15s;
}

.tl-modal-seg:hover {
    filter: brightness(1.2);
}

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

.tl-modal-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.tl-modal-item:hover {
    background: var(--bar-bg);
}

.tl-modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.tl-modal-time {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 100px;
}

.tl-modal-type {
    color: var(--text);
    flex: 1;
}

.tl-modal-dur {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .tl-modal { width: 95%; max-width: none; }
    .tl-modal-summary { gap: 0.5rem; }
    .tl-modal-stat { font-size: 0.78rem; }
}

.tl-total {
    width: 60px;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

/* ── Sessions / Sesje pracy ────────────────── */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

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

.session-row {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.session-point {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.session-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.dot-start { background: var(--green); }
.dot-end   { background: var(--red); }

.session-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.session-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
}

.session-time {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.session-country {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.session-location {
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.session-location:hover {
    color: var(--bg);
    background: var(--accent);
    text-decoration: none;
}

.session-gps {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--mono);
    transition: color 0.2s;
}

.session-gps:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.session-no-gps {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-style: italic;
}

.session-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    min-width: 90px;
    padding-top: 1rem;
}

.session-odo {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-family: var(--mono);
}

.session-dist {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--mono);
}

@media (max-width: 768px) {
    .session-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .session-meta {
        flex-direction: row;
        padding-top: 0;
        gap: 1rem;
    }
    .tl-date { width: 60px; font-size: 0.65rem; }
    .tl-total { width: 50px; font-size: 0.65rem; }
}

/* ── Tables ────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(34, 40, 56, 0.5);
    vertical-align: middle;
}

.table tbody tr {
    transition: background 0.15s;
}

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

.table-compact td,
.table-compact th {
    padding: 0.45rem 0.6rem;
    font-size: 0.82rem;
}

.row-warning {
    background: rgba(239, 68, 68, 0.06) !important;
}

.row-warning:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ── Badges ────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-gen1 {
    background: var(--badge-gen1-bg);
    color: var(--badge-gen1-text);
    border: 1px solid var(--badge-gen1-border);
}

.badge-gen2 {
    background: var(--badge-gen2-bg);
    color: var(--badge-gen2-text);
    border: 1px solid var(--badge-gen2-border);
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:hover {
    background: #2563eb;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--row-hover);
    box-shadow: none;
}

.btn-pdf {
    background: #166534;
}

.btn-pdf:hover {
    background: #15803d;
    box-shadow: 0 0 20px rgba(22, 101, 52, 0.3);
}

/* ── Filters ───────────────────────────────── */
.filters {
    margin-bottom: 1.25rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-search {
    flex: 1;
    min-width: 200px;
}

.filter-group .btn + .btn {
    margin-left: 0.5rem;
}

.input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

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

.input::placeholder {
    color: var(--text-dim);
}

select.input {
    cursor: pointer;
    min-width: 120px;
}

/* ── Sort Bar ──────────────────────────────── */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sort-link {
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.sort-link:hover {
    color: var(--text);
}

.sort-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

/* ── Driver Info ───────────────────────────── */
.driver-name {
    display: block;
    font-weight: 450;
}

.driver-card {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

/* ── Pagination ────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Raw Output ────────────────────────────── */
.raw-output {
    margin-top: 1rem;
    max-height: 500px;
    overflow: auto;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}

.raw-output pre {
    padding: 1rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-break: break-all;
}

.raw-output .error {
    padding: 1rem;
    color: var(--red);
}

/* ── Error Box ─────────────────────────────── */
.error-box {
    padding: 1rem 1.25rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius);
    color: #fca5a5;
    font-size: 0.9rem;
}

/* ── Empty State ───────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ── Mono / Small ──────────────────────────── */
.mono {
    font-family: var(--mono);
    font-size: 0.83em;
}

.small {
    font-size: 0.78em;
}

/* ── Footer ────────────────────────────────── */
.footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* ── Animations ────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stat-card,
.card,
.table tbody tr {
    animation: fadeIn 0.3s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    html { font-size: 14px; }

    .nav-inner { padding: 0 1rem; }
    .main      { padding: 1.5rem 1rem; }

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

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

    .filter-row {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

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

    .table { font-size: 0.78rem; }
    .table td, .table th { padding: 0.4rem 0.5rem; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-title { font-size: 1rem; }
}
