/* ============================================================
   Dashboard CSS — Dark Theme v2
   Survey Kepuasan Pelanggan Kemenangan Jaya
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface2: #22263a;
    --border: #2e3248;
    --accent: #e8321a;
    --accent-hover: #ff5c42;
    --gold: #f5c518;
    --green: #22c55e;
    --red: #ef4444;
    --purple: #a855f7;
    --text: #e2e8f0;
    --text-muted: #64748b;
    --sidebar-w: 240px;
    --radius: 12px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR — no scroll, compact
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface2) 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.sidebar-brand {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-brand .logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--white, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.sidebar-brand .logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sidebar-brand .brand-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

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

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
    overflow-x: hidden;
    /* Sembunyikan scrollbar tapi tetap bisa scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 16px 3px;
}

.nav-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 7px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .15s;
    white-space: normal;
    line-height: 1.35;
}

.nav-item:hover {
    background: var(--surface2);
    color: var(--text);
}

.nav-item.active {
    background: rgba(232, 50, 26, .12);
    color: var(--accent);
    border-left-color: var(--accent);
}

.nav-item .icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar footer — user info only */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
}

.user-role {
    font-size: 10px;
    color: var(--text-muted);
}

/* ============================================================
   TOPBAR — logout ada di sini
   ============================================================ */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, .1);
    border: 1px solid rgba(34, 197, 94, .3);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

/* Logout button di topbar */
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ============================================================
   PAGE BODY
   ============================================================ */
.page-body,
.page-content {
    padding: 24px 28px;
    flex: 1;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar,
form.filter-bar {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: visible;
}

.filter-bar label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-right: 2px;
    white-space: nowrap;
    align-self: center;
    flex-shrink: 0;
}

.filter-bar select,
.filter-bar input[type="number"],
.filter-bar input[type="date"] {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: all .2s ease;
    color-scheme: dark;
    height: 38px;
    box-sizing: border-box;
}

.filter-bar .filter-group {
    display: contents;
}

.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 50, 26, 0.15);
}

/* Tombol di dalam filter bar — seragamkan tinggi */
.filter-bar .btn {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    border: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #e8321a 0%, #ff5c42 100%);
    color: #fff;
    border: none;
    gap: 8px;
    box-shadow: 0 3px 12px rgba(232, 50, 26, 0.35);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn-primary::before {
    content: '';
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    display: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff5c42 0%, #ff7a66 100%);
    box-shadow: 0 5px 16px rgba(232, 50, 26, 0.45);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.25) 100%);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.5);
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-success::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.2), transparent);
    transition: left 0.5s;
}

.btn-success:hover::after {
    left: 100%;
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.35) 100%);
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 5px 14px rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
}

.btn-excel {
    background: transparent;
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, .35);
}

.btn-excel:hover {
    background: rgba(34, 197, 94, .08);
    border-color: rgba(34, 197, 94, .55);
}

.btn-excel {
    background: rgba(21, 128, 61, .15);
    color: #4ade80;
    border: 1px solid rgba(21, 128, 61, .35);
}

.btn-excel:hover {
    background: rgba(21, 128, 61, .28);
}

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

.btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
}

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

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transition: all .2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(232, 50, 26, 0.15) 0%, rgba(232, 50, 26, 0.25) 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.25) 100%);
}

.stat-icon.gold {
    background: linear-gradient(135deg, rgba(245, 197, 24, 0.15) 0%, rgba(245, 197, 24, 0.25) 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(168, 85, 247, 0.25) 100%);
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.5px;
}

.stat-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   CHARTS
   ============================================================ */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.chart-card {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transition: all .2s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.chart-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.chart-card .chart-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.chart-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-center {
    position: absolute;
    text-align: center;
    pointer-events: none;
}

.donut-center .pct {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.donut-center .lbl {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.chart-legend {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    color: var(--text-muted);
}

.legend-pct {
    font-weight: 700;
    color: var(--text);
}

.progress-bar-wrap {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.progress-label {
    color: var(--text-muted);
}

.progress-pct {
    font-weight: 700;
    color: var(--text);
}

.progress-track {
    height: 7px;
    background: var(--surface2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .6s ease;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-card {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.table-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.table-header h4 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.table-header a {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
}

.table-header a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead tr {
    background: linear-gradient(145deg, var(--surface2) 0%, rgba(46, 50, 72, 0.8) 100%);
}

th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.stars {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-baliho {
    background: rgba(232, 50, 26, .12);
    color: #ff7a66;
    border-color: rgba(232, 50, 26, .25);
}

.badge-baliho::before {
    content: '🪧';
    font-size: 11px;
}

.badge-instagram {
    background: rgba(225, 48, 108, .12);
    color: #f472b6;
    border-color: rgba(225, 48, 108, .25);
}

.badge-instagram::before {
    content: '📸';
    font-size: 11px;
}

.badge-tiktok {
    background: rgba(105, 201, 208, .12);
    color: #67e8f9;
    border-color: rgba(105, 201, 208, .25);
}

.badge-tiktok::before {
    content: '🎵';
    font-size: 11px;
}

.badge-youtube {
    background: rgba(255, 68, 68, .12);
    color: #f87171;
    border-color: rgba(255, 68, 68, .25);
}

.badge-youtube::before {
    content: '▶️';
    font-size: 11px;
}

.badge-website {
    background: rgba(245, 158, 11, .12);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, .25);
}

.badge-website::before {
    content: '🌐';
    font-size: 11px;
}

.badge-spanduk {
    background: rgba(34, 197, 94, .12);
    color: #4ade80;
    border-color: rgba(34, 197, 94, .25);
}

.badge-spanduk::before {
    content: '🏳️';
    font-size: 11px;
}

.badge-brosur {
    background: rgba(249, 115, 22, .12);
    color: #fb923c;
    border-color: rgba(249, 115, 22, .25);
}

.badge-brosur::before {
    content: '📄';
    font-size: 11px;
}

.badge-langganan {
    background: rgba(139, 92, 246, .12);
    color: #a78bfa;
    border-color: rgba(139, 92, 246, .25);
}

.badge-langganan::before {
    content: '🔔';
    font-size: 11px;
}

.badge-referensi {
    background: rgba(6, 182, 212, .12);
    color: #22d3ee;
    border-color: rgba(6, 182, 212, .25);
}

.badge-referensi::before {
    content: '👥';
    font-size: 11px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 44px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
    text-align: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 20px rgba(232, 50, 26, .2);
    overflow: hidden;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.login-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 50, 26, .12);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: .6;
}

.login-card .btn-primary {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    border-radius: 10px;
    margin-top: 4px;
    justify-content: center;
}

.alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}

.alert-danger {
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #f87171;
}

.alert-warning {
    background: rgba(245, 158, 11, .12);
    border: 1px solid rgba(245, 158, 11, .3);
    color: #fbbf24;
}

/* ============================================================
   REPORT PAGE extras
   ============================================================ */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.summary-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 11px;
    color: var(--text-muted);
}

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

/* ============================================================
   HAMBURGER BUTTON (mobile only)
   ============================================================ */
.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 18px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
    line-height: 1;
    padding: 0;
}

.sidebar-toggle:hover {
    background: var(--surface2);
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 768px) {

    /* Sidebar slide-in dari kiri, tersembunyi secara default */
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 100;
    }

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

    .main {
        margin-left: 0;
    }

    /* Tampilkan hamburger button */
    .sidebar-toggle {
        display: inline-flex;
    }

    .topbar-title {
        font-size: 13px;
    }

    /* Sembunyikan user info di topbar agar tidak terlalu padat */
    .topbar-user {
        display: none;
    }

    .stat-cards {
        grid-template-columns: 1fr 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .src-bar-section {
        grid-template-columns: 1fr !important;
    }

    .page-body,
    .page-content {
        padding: 12px;
    }

    .login-card {
        padding: 28px 20px;
    }

    /* Filter bar wraps instead of scrolling */
    .filter-bar,
    form.filter-bar {
        gap: 8px;
        flex-wrap: wrap;
        overflow: visible;
    }

    .filter-bar select,
    .filter-bar input[type="number"],
    .filter-bar input[type="date"] {
        font-size: 12px;
        padding: 6px 9px;
    }

    /* Table: smaller text */
    td {
        font-size: 12px;
        padding: 8px 10px;
    }

    th {
        padding: 8px 10px;
        font-size: 10px;
    }

    /* Summary grid pada report */
    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px 10px;
        gap: 8px;
        align-items: flex-start;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
    }

    .stat-info h3 {
        font-size: 15px;
        word-break: break-word;
        line-height: 1.2;
    }

    .stat-info p {
        font-size: 10px;
        line-height: 1.3;
    }

    .topbar {
        padding: 10px 14px;
    }

    .live-badge {
        display: none;
    }

    /* Hide some table columns on very small screens */
    .hide-xs {
        display: none;
    }
}
