/* ==========================================================================
   OCER Modern Dark Theme & Design Tokens
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-base: #0a0e17;
    --bg-surface: #111827;
    --bg-surface-elevated: #162032;
    --bg-surface-hover: #1e293b;
    
    /* Accents */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.25);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.25);

    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.25);

    --info: #38bdf8;

    /* Text Colors */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    /* Borders & Dividers */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-card: rgba(22, 32, 50, 0.6);

    /* Shadows & Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glows */
.glow-bg-primary {
    position: fixed;
    top: -150px;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(99, 102, 241, 0) 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

.glow-bg-secondary {
    position: fixed;
    top: 300px;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(16, 185, 129, 0) 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(90px);
}

/* App Container Layout */
.app-layout {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 28px 60px;
}

/* Top Navbar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-shield {
    background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 18px var(--primary-glow);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
}

.brand-subtitle {
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* Status Badges */
.status-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    backdrop-filter: blur(10px);
}

.status-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--text-subtle);
}

.status-pill.status-online {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.06);
}
.status-pill.status-online .dot {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-pill.status-warning {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}
.status-pill.status-warning .dot {
    background-color: var(--warning);
}

/* Glass Card */
.glass-card {
    background: var(--glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    padding: 22px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-blue { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 4px;
}

.metric-desc {
    font-size: 0.78rem;
    color: var(--text-subtle);
}

/* Upload Section & Drop Zone */
.upload-section {
    padding: 24px;
    margin-bottom: 28px;
}

.drop-zone {
    border: 2px dashed rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.03);
    border-radius: var(--radius-md);
    padding: 46px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2) inset;
    transform: translateY(-2px);
}

.drop-illustration {
    position: relative;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    color: #818cf8;
    z-index: 1;
    transition: transform 0.2s ease;
}

.drop-zone:hover .upload-icon {
    transform: translateY(-4px) scale(1.08);
    color: #a5b4fc;
}

.upload-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-glow);
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.drop-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.drop-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.btn-link {
    background: none;
    border: none;
    color: #818cf8;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    font-family: inherit;
}

.btn-link:hover {
    color: #a5b4fc;
}

.format-tags {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-muted);
}

.tag-note {
    font-size: 0.75rem;
    color: var(--text-subtle);
    margin-left: 6px;
}

/* Progress Tracker & Live Stepper */
.progress-bar-container {
    margin-top: 20px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.65);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.progress-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(129, 140, 248, 0.3);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.current-filename {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9;
}

.progress-count-badge {
    padding: 3px 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #a5b4fc;
}

/* Stepper Bar */
.processing-stepper {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .processing-stepper {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

.step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.step-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.step-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Step States */
.step-item.step-active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.step-item.step-active .step-icon {
    background: #6366f1;
    color: #ffffff;
    box-shadow: 0 0 8px #6366f1;
    animation: pulseGlow 1.2s infinite ease-in-out;
}

.step-item.step-active .step-label {
    color: #ffffff;
    font-weight: 600;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.step-item.step-done {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.step-item.step-done .step-icon {
    background: #10b981;
    color: #ffffff;
}

.step-item.step-done .step-label {
    color: #34d399;
}

.step-item.step-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
}

.step-item.step-error .step-icon {
    background: #ef4444;
    color: #ffffff;
}

.step-item.step-error .step-label {
    color: #f87171;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.pulse-text {
    color: #818cf8;
    animation: fadeInOut 1.5s infinite ease-in-out;
}

.progress-pct {
    font-family: var(--font-mono);
    color: #34d399;
    font-weight: 700;
    font-size: 0.85rem;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.progress-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #3b82f6, #10b981);
    border-radius: 999px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Upload Results Section */
.results-container {
    margin-bottom: 28px;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

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

.btn-secondary-sm {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.results-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.result-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
}

.result-card.success-card {
    border-left: 4px solid var(--success);
}

.result-card.error-card {
    border-left: 4px solid var(--danger);
}

.result-card.duplicate-card {
    border-left: 4px solid var(--warning);
}

.result-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.result-filename {
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-all;
}

.result-renamed {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.result-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-success { background: var(--success-bg); color: #34d399; border: 1px solid var(--success-border); }
.badge-error { background: var(--danger-bg); color: #f87171; border: 1px solid var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: #fbbf24; border: 1px solid var(--warning-border); }

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    color: var(--text-subtle);
    font-size: 0.7rem;
    text-transform: uppercase;
}

.detail-val {
    font-weight: 600;
    color: #fff;
}

.result-actions {
    display: flex;
    gap: 8px;
}

.btn-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}

.btn-action-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-highlight);
    transform: translateY(-1px);
}

.btn-action-link.drive-btn {
    border-color: rgba(66, 133, 244, 0.3);
}
.btn-action-link.drive-btn:hover {
    background: rgba(66, 133, 244, 0.2);
}

.btn-action-link.notion-btn {
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-action-link.notion-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* History Section */
.history-section {
    padding: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 14px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    color: var(--text-muted);
}

.search-box input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.82rem;
    font-family: inherit;
    width: 220px;
}

.search-box input::placeholder {
    color: var(--text-subtle);
}

.btn-refresh {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-refresh.spinning svg {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Data Table */
.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.supplier-cell {
    font-weight: 600;
    color: #fff;
}

.supplier-sub {
    font-size: 0.72rem;
    color: var(--text-subtle);
    font-family: var(--font-mono);
}

.text-right {
    text-align: right;
}

.font-mono {
    font-family: var(--font-mono);
}

.category-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.links-group {
    display: flex;
    gap: 6px;
}

.link-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-decoration: none;
    transition: all 0.2s;
}

.link-badge:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #bfdbfe;
}

.loading-cell, .empty-cell {
    text-align: center;
    padding: 40px !important;
    color: var(--text-subtle);
    font-style: italic;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

/* Modal & Auth Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-glow);
    position: relative;
    background: var(--bg-surface-elevated);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

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

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 50%;
}

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

.toast {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-size: 0.85rem;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }
.toast.toast-info { border-left: 4px solid var(--primary); }

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-layout { padding: 16px; }
    .top-nav { flex-direction: column; align-items: flex-start; }
    .search-box input { width: 140px; }
    .metrics-grid { grid-template-columns: 1fr; }
}
