/* ===========================
   E-ARSIP — Main Stylesheet
   =========================== */

:root {
    --primary: #1a3a5c;
    --primary-light: #2563a8;
    --primary-dark: #0f2540;
    --accent: #2563EB;
    --accent-hover: #1d4ed8;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;

    --bg-main: #F0F4F8;
    --bg-card: #FFFFFF;
    --bg-sidebar: #0f2540;
    --bg-sidebar-hover: rgba(255,255,255,0.08);
    --bg-sidebar-active: rgba(37,99,235,0.3);

    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-light: #CBD5E1;

    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

    --sidebar-width: 230px;
    --topbar-height: 60px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --font: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ---- Layout ---- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .logout-btn span { display: none; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-icon {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.brand-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}
.brand-sub {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-item i { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-sidebar-hover); color: #fff; }
.nav-item.active { background: var(--bg-sidebar-active); color: #fff; border-left: 3px solid var(--accent); }

.sidebar-footer {
    padding: 14px 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}
.logout-btn:hover { color: #EF4444; background: rgba(239,68,68,0.1); }
.logout-btn i { width: 20px; text-align: center; }

/* ---- Main Content ---- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ---- Topbar ---- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-center { flex: 1; max-width: 400px; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.menu-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 16px;
    padding: 6px; border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--bg-main); }

.page-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 14px;
}
.search-box i { color: var(--text-muted); font-size: 13px; }
.search-box input {
    border: none; background: none;
    font-size: 13px; color: var(--text-primary);
    outline: none; width: 240px;
    font-family: var(--font);
}
.search-box input::placeholder { color: var(--text-muted); }

.date-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.icon-btn {
    position: relative;
    background: none; border: none;
    width: 34px; height: 34px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
    cursor: pointer; font-size: 15px;
}
.icon-btn:hover { background: var(--bg-main); color: var(--primary); }
.icon-btn .badge {
    position: absolute; top: 4px; right: 4px;
    width: 14px; height: 14px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

.user-avatar {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 40px;
    cursor: pointer;
}
.user-avatar img { width: 30px; height: 30px; border-radius: 50%; }
.user-name { display: block; font-size: 12px; font-weight: 600; color: var(--text-primary); }
.user-role { display: block; font-size: 10px; color: var(--text-muted); }

/* ---- Page Content ---- */
.page-content {
    flex: 1;
    padding: 24px;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ---- Stat Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.stat-icon.blue { background: #EFF6FF; color: var(--accent); }
.stat-icon.orange { background: #FFF7ED; color: #F97316; }
.stat-icon.green { background: #F0FDF4; color: var(--success); }
.stat-icon.purple { background: #F5F3FF; color: #7C3AED; }

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.stat-change {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
}
.stat-change.down { color: var(--danger); }

/* ---- Dashboard Grid ---- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- Section Card ---- */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- AI Recommendation Card ---- */
.ai-card {
    background: linear-gradient(135deg, #1a3a5c 0%, #2563a8 100%);
    border-radius: var(--radius);
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.ai-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ai-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ai-desc {
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 16px;
}

.btn-ai {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}
.btn-ai:hover { background: rgba(255,255,255,0.3); }

/* ---- Activity List ---- */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg-main); }

.activity-dot {
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}
.dot-blue { background: #EFF6FF; color: var(--accent); }
.dot-green { background: #F0FDF4; color: var(--success); }
.dot-orange { background: #FFF7ED; color: #F97316; }
.dot-red { background: #FEF2F2; color: var(--danger); }

.activity-text {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.5;
}
.activity-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
}
td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFBFC; }

.doc-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}
.doc-title { font-weight: 500; }
.doc-file { font-size: 11px; color: var(--text-muted); }

/* ---- Status Badges ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.status-active { background: #F0FDF4; color: #16A34A; }
.status-archived { background: #F1F5F9; color: #64748B; }
.status-pending { background: #FFF7ED; color: #EA580C; }
.status-verified { background: #F0FDF4; color: #16A34A; }

.badge-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.cat-finance { background: #EFF6FF; color: #1D4ED8; }
.cat-legal { background: #F5F3FF; color: #7C3AED; }
.cat-hr { background: #F0FDF4; color: #15803D; }
.cat-strategy { background: #FFF7ED; color: #C2410C; }

/* ---- Action Buttons ---- */
.action-btns { display: flex; gap: 4px; }
.btn-icon {
    width: 28px; height: 28px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-main); }
.btn-icon.view:hover { color: var(--accent); border-color: var(--accent); }
.btn-icon.edit:hover { color: var(--warning); border-color: var(--warning); }
.btn-icon.delete:hover { color: var(--danger); border-color: var(--danger); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--font);
}

.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { background: #059669; }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ---- Form Styles ---- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-card);
    font-family: var(--font);
    transition: border-color 0.2s;
    outline: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Upload Area ---- */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.upload-area:hover { border-color: var(--accent); background: #EFF6FF; }
.upload-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 12px; }
.upload-text { font-size: 13px; color: var(--text-secondary); }
.upload-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}
.uploaded-file i { color: var(--danger); font-size: 18px; }
.file-name { font-size: 12px; font-weight: 500; }
.file-size { font-size: 11px; color: var(--text-muted); }

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.filter-select {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-card);
    font-family: var(--font);
    outline: none;
    cursor: pointer;
}

.showing-info {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    justify-content: space-between;
}

.page-btn {
    padding: 5px 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

.page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
.page-jump input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-align: center;
    outline: none;
    font-family: var(--font);
}

/* ---- Export Page ---- */
.export-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 16px;
}

.export-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.export-count {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.export-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.meta-row:last-child { border-bottom: none; }
.meta-key { color: var(--text-muted); font-weight: 500; }
.meta-val { font-weight: 600; color: var(--text-primary); }

.tip-box {
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    color: #C2410C;
    line-height: 1.6;
    margin-top: 14px;
}

/* ---- Checkbox ---- */
.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}
.check-row input[type="checkbox"] {
    width: 15px; height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ---- AI Page ---- */
.ai-reco-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.reco-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.reco-title { font-size: 12px; font-weight: 700; color: var(--text-primary); }
.reco-badge-high { color: var(--danger); font-size: 11px; font-weight: 600; }
.reco-badge-med { color: var(--warning); font-size: 11px; font-weight: 600; }
.reco-count { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 8px 0 4px; }
.reco-desc { font-size: 11px; color: var(--text-muted); }

.insight-row {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
}
.insight-label { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
}
.insight-val { font-size: 12px; font-weight: 700; color: var(--text-primary); }

.dup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
}
.dup-name { font-weight: 500; color: var(--text-primary); }
.dup-sub { color: var(--warning); font-size: 11px; }

/* ---- Alert ---- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
}
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #15803D; }
.alert-error { background: #FEF2F2; border: 1px solid #FECACA; color: #DC2626; }
.alert-info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1D4ED8; }

/* ---- Login Page ---- */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #EFF6FF 0%, #F0F4F8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 360px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 54px; height: 54px;
    background: var(--accent);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white;
    margin: 0 auto 12px;
}

.auth-logo h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-logo p {
    font-size: 12px;
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }
    .sidebar { width: 230px; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .export-grid { grid-template-columns: 1fr; }
    .ai-reco-grid { grid-template-columns: 1fr; }
    .topbar-center { display: none; }
}

/* ---- Chart placeholder ---- */
.chart-placeholder {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 16px 20px;
}

.chart-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--accent) 0%, #93C5FD 100%);
    border-radius: 4px 4px 0 0;
    transition: opacity 0.2s;
}
.chart-bar:hover { opacity: 0.8; }

.chart-bar.dim {
    background: linear-gradient(180deg, #CBD5E1 0%, #E2E8F0 100%);
}

.chart-label {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
