/* ============================================================
   Backup Dashboard — app.css
   Style-Card v1. Tokens uit rrb-design-tokens.css,
   primitives uit rrb-primitives.css, layout uit rrb-responsive.css.
   ============================================================ */

/* === Legacy aliases — backward-compat voor inline style="" attrs === */
:root {
    --color-bg: var(--bg);
    --color-card: var(--surface);
    --color-card-highlight: var(--surface-muted);
    --color-border: var(--border);
    --color-border-light: var(--gray-100);
    --color-border-faint: var(--gray-100);
    --color-success: var(--color-accent);
    --color-primary-hover: var(--color-primary-dark);
    --color-accent-hover: var(--color-accent-dark);
    --color-table-header-bg: var(--surface-muted);
    --color-text-table-header: var(--color-text-muted);
    --color-badge-info-bg: var(--primary-50);
    --color-badge-info-text: var(--color-primary);
    --color-badge-success-bg: var(--accent-50);
    --color-badge-success-text: var(--color-accent-dark);
    --color-badge-warning-bg: var(--warning-50);
    --color-badge-warning-text: var(--color-warning);
    --color-badge-danger-bg: var(--danger-50);
    --color-badge-danger-text: var(--color-danger-dark);
    --color-badge-neutral-bg: var(--surface-muted);
    --color-badge-neutral-text: var(--color-text-muted);
    --shadow-dropdown: 0 4px 12px rgba(0,0,0,.12);
}

/* === Reset === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--color-text); -webkit-text-size-adjust: 100%; }
[x-cloak] { display: none !important; }

/* === Login (project special) === */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 40px; width: 100%; max-width: 400px; }
.login-error { color: var(--color-danger); font-size: 13px; margin-bottom: 12px; }

/* === Btn project specials (canonical .btn/.btn-primary/.btn-accent/.btn-danger/.btn-ghost in primitives) === */
.btn-green { background: var(--color-accent); border-color: var(--color-accent); color: var(--surface); }
@media (hover: hover) { .btn-green:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); } }
.btn-danger-outline { background: transparent; border: 1px solid var(--color-danger); color: var(--color-danger); }
@media (hover: hover) { .btn-danger-outline:hover { background: var(--color-danger); color: var(--surface); } }
.btn-inline { padding: 4px 8px; font-size: 12px; height: auto; }
.btn-full { width: 100%; padding: 12px; font-size: 15px; }

/* === Chip project specials (canonical .chip + variants in primitives) === */
.chip-plan-basic { background: var(--primary-50); color: var(--color-primary); }
.chip-plan-plus { background: var(--accent-50); color: #008020; }
.chip-plan-solid { background: var(--warning-50); color: var(--color-warning); }
.chip-plan-custom { background: #e0f7fa; color: #0097a7; }

.chip-sys-dahua { background: var(--danger-50); color: var(--color-danger); }
.chip-sys-milestone { background: var(--primary-50); color: var(--color-primary); }
.chip-sys-ajax { background: #212121; color: var(--surface); }
.chip-sys-paxton { background: var(--accent-50); color: #008020; }
.chip-sys-nxwitness { background: #f3e5f5; color: #7b1fa2; }
.chip-sys-axis { background: #fffde7; color: #f9a825; }
.chip-sys-2n { background: #e0f2f1; color: #00695c; }
.chip-sys-default { background: var(--surface-muted); color: var(--color-text-muted); }

.chip-werkbon { background: var(--primary-50); color: var(--color-primary); }
.chip-service { background: #f3e5f5; color: #7b1fa2; }

/* === Layout === */
.dashboard { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* === Header === */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left h1 { font-size: 22px; color: var(--color-primary); white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.refresh-indicator { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }
.refresh-indicator .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-accent); margin-right: 4px; vertical-align: middle; }

/* === Info Section === */
.info-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; margin-bottom: 20px; font-size: 13px; line-height: 1.6; color: var(--color-text-secondary); }
.info-section h3 { font-size: 15px; font-weight: 700; color: var(--color-text); margin-bottom: 8px; }
.info-section ul { margin: 8px 0 8px 20px; }
.info-section li { margin: 4px 0; }

/* === Tabs === */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-100); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color .15s ease, border-color .15s ease; user-select: none; }
@media (hover: hover) { .tab:hover { color: var(--color-primary); } }
.tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* === Stat card variants (canonical .stat in primitives) === */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px; }
.stat-card .stat-label { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--color-text); }
.stat-card .stat-value.green { color: var(--color-accent); }
.stat-card .stat-value.red { color: var(--color-danger); }
.stat-card .stat-value.warning { color: var(--color-warning); }
.stat-card .stat-value.primary { color: var(--color-primary); }

/* === Health Grid === */
.health-section { margin-bottom: 28px; }
.health-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--color-text); }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.health-item { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border-radius: var(--r-card); padding: 12px 14px; border: 1px solid var(--border); }
.health-item .dot-col { padding-top: 3px; }
.health-item .info-col { flex: 1; min-width: 0; }
.health-item .check-name { font-size: 14px; font-weight: 600; }
.health-item .check-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.health-item .check-meta .ms { color: var(--color-text-secondary); }
.health-item .check-error { font-size: 12px; color: var(--color-danger); margin-top: 4px; word-break: break-word; }

/* === Status dots === */
.status-dot { display: inline-block; border-radius: 50%; flex-shrink: 0; }
.status-dot.lg { width: 16px; height: 16px; }
.status-dot.sm { width: 10px; height: 10px; }
.status-dot.green { background: var(--color-accent); box-shadow: 0 0 6px rgba(0,193,48,.4); }
.status-dot.red { background: var(--color-danger); box-shadow: 0 0 6px rgba(220,53,69,.4); animation: pulse-red 2s infinite; }
.status-dot.yellow { background: var(--color-warning); box-shadow: 0 0 6px rgba(239,108,0,.4); }
.status-dot.grey { background: var(--gray-400); }
@keyframes pulse-red { 0%, 100% { box-shadow: 0 0 6px rgba(220,53,69,.4); } 50% { box-shadow: 0 0 12px rgba(220,53,69,.6); } }

/* === Activity Feed === */
.activity-section { margin-bottom: 28px; }
.activity-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.activity-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.activity-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.activity-item:last-child { border-bottom: none; }
.activity-item .activity-time { color: var(--color-text-muted); white-space: nowrap; font-size: 12px; min-width: 130px; }
.activity-item .activity-text { flex: 1; }
.activity-item .activity-type { display: inline-block; padding: 1px 8px; border-radius: var(--r-btn); font-size: 11px; font-weight: 600; margin-right: 6px; }
.type-ok { background: var(--accent-50); color: var(--color-accent-dark); }
.type-warning { background: var(--warning-50); color: var(--color-warning); }
.type-error { background: var(--danger-50); color: var(--color-danger-dark); }
.type-info { background: var(--primary-50); color: var(--color-primary); }

/* === Tables === */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 14px; background: var(--surface-muted); border-bottom: 1px solid var(--border); font-weight: 600; color: var(--color-text-muted); font-size: 12px; text-transform: uppercase; white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--border); overflow: hidden; }
.data-table thead th { background: var(--surface-muted); text-align: left; padding: 10px 14px; font-size: 13px; font-weight: 700; color: var(--color-text-muted); border-bottom: 2px solid var(--gray-100); white-space: nowrap; text-transform: none; }
.data-table tbody td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid var(--gray-100); vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: none; }
@media (hover: hover) { .data-table tbody tr:hover { background: var(--surface-muted); } }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.row-danger { background: var(--danger-50); }
@media (hover: hover) { .data-table tbody tr.row-danger:hover { background: #fde4e4; } }
.data-table tbody tr.row-warning { background: var(--warning-50); }
@media (hover: hover) { .data-table tbody tr.row-warning:hover { background: #fff3d6; } }

/* === Section Cards === */
.section-card { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; }
.section-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--color-text); }

/* === Search === */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.search-input { flex: 1; min-width: 200px; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--r-field); font-size: 14px; font-family: var(--font);background: var(--surface); color: var(--color-text); transition: border-color 0.15s ease; }
.search-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(26, 106, 163, 0.25); }

/* === Credential Box === */
.credential-box { background: #fff9e6; border: 2px solid var(--color-warning); border-radius: var(--r-card); padding: 20px; margin: 16px 0; }
.credential-box h4 { color: var(--color-warning); margin-bottom: 12px; font-size: 15px; }
.credential-box .cred-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.credential-box .cred-label { font-weight: 600; min-width: 120px; }
.credential-box .cred-value { font-family: var(--font-mono); background: var(--surface); padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--r-btn); word-break: break-all; flex: 1; }
.credential-box .cred-warning { color: var(--color-danger); font-weight: 600; font-size: 13px; margin-top: 12px; }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-label, .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.form-input, .form-group input, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-field); font-size: 14px; font-family: var(--font);background: var(--surface); color: var(--color-text); transition: border-color 0.15s; }
.form-input:focus, .form-group input:focus, .form-group select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(26, 106, 163, 0.25); }
.form-group .hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }
select.form-input { appearance: auto; }

/* === Modal Overlay === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--border); padding: 28px; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-card h2 { font-size: 18px; color: var(--color-primary); margin-bottom: 20px; }

/* === Detail View === */
.detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-header .back-link { color: var(--color-primary); cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; }
@media (hover: hover) { .detail-header .back-link:hover { text-decoration: underline; } }
.detail-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.detail-info-item { font-size: 13px; }
.detail-info-item .label { color: var(--color-text-secondary); margin-bottom: 2px; }
.detail-info-item .value { font-weight: 600; }

/* === Loading & Empty === */
.loading { text-align: center; padding: 40px; color: var(--color-text-muted); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--color-primary); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-muted); }
.empty-state p { font-size: 14px; }

/* === Utility === */
.text-secondary { color: var(--color-text-secondary); font-size: 13px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--color-text-muted); font-size: 12px; }
.text-danger { color: var(--color-danger); font-weight: 700; }
.error { color: var(--color-danger); font-size: 13px; }
.empty { padding: 40px var(--sp-md); text-align: center; color: var(--color-text-muted); }
a { color: var(--color-primary); text-decoration: none; }
@media (hover: hover) { a:hover { text-decoration: underline; } }

/* === Pagination === */
.pagination { display: flex; justify-content: center; align-items: center; gap: var(--sp-sm); padding: var(--sp-md); flex-wrap: wrap; }
.pagination button { padding: var(--sp-sm) 14px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-btn); cursor: pointer; font-size: 13px; min-height: 36px; }
@media (hover: hover) { .pagination button:hover { background: var(--surface-muted); } }
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* ============================================================
   Sidebar (project special)
   ============================================================ */

.app-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px;
    background: var(--color-primary);
    color: var(--surface);
    display: flex;
    flex-direction: column;
    padding: 16px;
    transition: width 0.2s ease;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}
.sidebar.collapsed { width: 56px; padding: 12px 0; align-items: center; }

.sidebar-logo {
    font-weight: 700; font-size: 16px; padding-bottom: 12px; margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: space-between;
}
.sidebar-logo .brand-green { color: var(--color-accent); }

.sidebar-toggle { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 18px; padding: 0; }
@media (hover: hover) { .sidebar-toggle:hover { color: var(--surface); } }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-item {
    padding: 10px 12px; border-radius: 6px; display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,0.8); text-decoration: none; cursor: pointer; font-size: 14px; transition: background 0.15s;
}
@media (hover: hover) {
    .nav-item:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: var(--surface); }
}
.nav-item.active { background: rgba(255,255,255,0.15); font-weight: 600; color: var(--surface); }

.nav-icon { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; }
.nav-label { white-space: nowrap; }

.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-logo span:not(.sidebar-toggle),
.sidebar.collapsed .sidebar-user-name { display: none; }

.sidebar.collapsed .nav-item { width: 36px; height: 36px; padding: 0; justify-content: center; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }

.sidebar-user {
    padding: 10px 12px; border-top: 1px solid rgba(255,255,255,0.2); margin-top: 8px;
    font-size: 12px; opacity: 0.7; display: flex; align-items: center; gap: 10px;
}

.sidebar-avatar {
    width: 28px; height: 28px; background: rgba(255,255,255,0.2); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}

/* ============================================================
   Main content (project special — page-title color)
   ============================================================ */

.main-content-bg { background: var(--bg); }

.page-title { font-size: 20px; font-weight: 700; color: var(--color-primary); margin: 0; }

/* ============================================================
   Mobile top bar (project special)
   ============================================================ */

.mobile-topbar {
    background: var(--color-primary);
    color: var(--surface);
    gap: 12px;
}

.mobile-topbar .hamburger {
    font-size: 24px;
    background: none;
    border: none;
    color: var(--surface);
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}
.mobile-topbar .hamburger:active { background: rgba(255,255,255,0.15); }

.mobile-topbar-title { font-weight: 700; font-size: 15px; }
.mobile-page-indicator { font-size: 11px; opacity: 0.7; font-weight: 400; }

/* Sidebar backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0);
    z-index: 99;
    pointer-events: none;
    transition: background 0.3s ease;
}
.sidebar-backdrop.active {
    background: rgba(0,0,0,0.5);
    pointer-events: auto;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin: -8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-close:active { background: rgba(255,255,255,0.15); }

/* ============================================================
   Skeleton placeholders (project shimmer — canonical .skeleton too generic)
   ============================================================ */

.skel {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-btn);
}
.skel-card { height: 80px; border-radius: var(--r-card); }
.skel-chart { height: 200px; border-radius: var(--r-card); }
.skel-row { height: 44px; margin-bottom: 8px; border-radius: var(--r-btn); }
.skel-text { height: 16px; margin-bottom: 8px; }
.skel-text.short { width: 40%; }
.skel-text.medium { width: 65%; }

@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================================
   Project cards / containers
   ============================================================ */

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 16px; }
.chart-card h4 { font-size: 13px; font-weight: 600; color: var(--color-text-muted); margin: 0 0 12px; }

.table-container { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.table-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.table-header h3 { font-size: 15px; margin: 0; }
.table-scroll { overflow-x: auto; }

.settings-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 24px; max-width: 500px; }
.settings-form input { width: 100%; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-btn); color: var(--color-text); font-size: 14px; transition: border-color 0.15s; }
.settings-form input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(26, 106, 163, 0.25); outline: none; }

.info-row-detail { display: flex; gap: 8px; align-items: center; padding: 8px 0; font-size: 14px; flex-wrap: wrap; }
.info-row-detail .label { color: var(--color-text-secondary); min-width: 120px; flex-shrink: 0; }

.health-timeline { display: flex; gap: 3px; flex-wrap: wrap; }
.health-bar { width: 12px; height: 20px; border-radius: 3px; cursor: pointer; }

/* ---- Tablet (768px) — appearance overrides; structural rules in rrb-responsive.css ---- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        padding-top: max(16px, env(safe-area-inset-top, 16px));
    }
    .sidebar.collapsed { width: 280px; padding: 16px; align-items: stretch; }
    .sidebar.collapsed .nav-label,
    .sidebar.collapsed .sidebar-user-name { display: inline !important; }
    .sidebar.collapsed .nav-item { width: auto; height: auto; padding: 14px 16px; justify-content: flex-start; }
    .sidebar.collapsed .sidebar-logo { justify-content: space-between; }
    .sidebar.collapsed .sidebar-logo span:not(.sidebar-toggle) { display: inline !important; }

    .sidebar.mobile-open { transform: translateX(0); }

    .sidebar .nav-item {
        padding: 14px 16px;
        font-size: 15px;
        gap: 12px;
        min-height: 48px;
    }
    .sidebar .nav-icon { font-size: 18px; }
    .sidebar .sidebar-user { padding: 14px 16px; }

    .sidebar-close { display: flex; }
    .sidebar-toggle { display: none; }

    .app-layout { flex-direction: column; }
    .detail-grid-2col { grid-template-columns: 1fr !important; }
    .search-input { width: 100%; }
    .info-row-detail { flex-direction: column; gap: 2px; }
    .info-row-detail .label { min-width: 0; }

    .responsive-table tbody tr { background: var(--surface); }
    .responsive-table tbody td::before { color: var(--color-primary); }

    .dashboard { padding: 14px; }
    .header h1 { font-size: 18px; }
    .tab { padding: 10px 14px; font-size: 13px; }
    .data-table { font-size: 12px; display: block; overflow-x: auto; }
    .detail-info { grid-template-columns: 1fr; }
    .search-bar { flex-direction: column; }
    .search-bar .btn { width: 100%; }
    .activity-item { flex-direction: column; gap: 4px; }
    .activity-item .activity-time { min-width: auto; }
    .credential-box .cred-row { flex-direction: column; gap: 4px; }
}

/* ---- Small phones (480px) ---- */
@media (max-width: 480px) {
    .stat-card { padding: 12px 8px; }
    .stat-card div:first-child { font-size: 24px !important; }
    .page-title { font-size: 18px; }
    .chart-card { padding: 12px; }
    .chart-card h4 { font-size: 12px; }
}
