:root {
    --brand-dark:   #1a5d0e;
    --brand-mid:    #2e861e;
    --brand-light:  #4ed137;
    --brand-pale:   #a7eb9b;
    --brand-paler:  #c9f3c2;

    --bg-page: var(--brand-pale);
    --text-muted: var(--brand-paler);

    --danger:  #dc3545;
    --warning: #ffc107;
    --info:    #0d6efd;
    --success: #28a745;

    --ink:        #2d3a3a;
    --ink-soft:   #4a5568;
    --ink-mute:   #8a9797;

    --teal-dark: var(--brand-dark);
    --teal-mid: var(--brand-mid);
    --teal-light: var(--brand-light);
    --bg-page-alias: var(--brand-pale);
    --maroon-dark: var(--brand-dark);
    --maroon-darker: var(--brand-mid);
    --pink-mid: var(--brand-light);
    --pink-light: var(--brand-pale);
    --pink-lighter: var(--brand-paler);
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-page);
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 2rem;
}

.app-shell {
    max-width: 100%;
    margin: 10px auto;
    display: flex;
    background: #f4f7f6;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand-mid) 60%, var(--brand-light) 100%);
    padding: 1.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    color: #fff;
    transition: transform 0.25s ease;
}

.brand {
    padding-left: 20px;
    height: 40px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand .accent { color: #ffd23f; }

.menu-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    margin: 0.5rem 0 0.9rem 0.75rem;
    user-select: none;
    pointer-events: none;
}

.menu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.menu-nav .menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-nav .menu-item a i { font-size: 1.05rem; }
.menu-nav .menu-item a:hover { background: rgba(255, 255, 255, 0.15); }

.menu-nav .menu-item.active a {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.sidebar-footer { margin-top: auto; padding-top: 1.5rem;}

.btn-logout {
    position: sticky;
    width: 100%;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.6rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-logout:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }

.sidebar-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e4ece4;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--brand-dark);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: fit-content;
}

.mobile-topbar { display: none; }
.mobile-topbar-brand { font-weight: 800; color: var(--ink); }

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

.topbar .search-box { flex: 1; max-width: 320px; position: relative; }

.topbar .search-box input {
    width: 100%;
    border: none;
    background: #f1f5f5;
    border-radius: 30px;
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    font-size: 0.85rem;
    outline: none;
}

.topbar .search-box i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa5a5;
}

.btn-notif {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand-mid);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.btn-notif .dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 8px;
    height: 8px;
    background: #ff5b5b;
    border-radius: 50%;
    border: 2px solid #fff;
}

.page-title { font-weight: 700; color: var(--ink); margin-bottom: 0.2rem; }
.page-sub   { color: var(--ink-mute); font-size: 0.85rem; margin-bottom: 1.5rem; }

.placeholder-card {
    background: #f6fafa;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed #cfe4e2;
}

.stat-cards { display: flex; gap: 1.25rem; margin-bottom: 1.75rem; flex-wrap: wrap; }

.stat-card {
    flex: 1;
    min-width: 160px;
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 6px 18px rgba(23, 161, 154, 0.12);
    border: 1px solid #eef4f3;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-card.hadir .stat-icon { background: var(--brand-mid); }
.stat-card.izin .stat-icon  { background: #ffb020; }

.stat-card.sakit .stat-icon { background: var(--danger); }

.stat-card .stat-info .stat-number { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat-card .stat-info .stat-label  { font-size: 0.8rem; color: var(--ink-mute); font-weight: 600; }

.chart-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 6px 18px rgba(23, 161, 154, 0.12);
    border: 1px solid #eef4f3;
}
.chart-card.bulanan { flex: 2; min-width: 320px; }
.chart-card.tahunan { flex: 1; min-width: 260px; }
.chart-card h6 { font-weight: 700; color: var(--ink); margin-bottom: 1rem; font-size: 0.9rem; }
.chart-card canvas { max-height: 280px; }

.filter-form .form-label,
.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink-mute);
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.filter-form .form-control,
.filter-form .form-select {
    border-radius: 10px;
    border-color: #e4ece4;
    background: #f8faf8;
    font-size: 0.85rem;
    min-height: 38px;
}

.filter-panel {
    background: #f8fbf8;
    border: 1px solid #e0ebe0;
    border-radius: 14px;
    padding: 1rem;
}

.filter-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; flex-wrap: wrap; }
.quick-filter { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.quick-label { font-size: 0.72rem; color: var(--ink-soft); }

.quick-btn {
    border: 1px solid #d7e5d7;
    background: #fff;
    color: #2e6b24;
    border-radius: 7px;
    padding: 0.3rem 0.55rem;
    font-size: 0.72rem;
    cursor: pointer;
}
.quick-btn:hover { background: #eaf7e8; border-color: #8fc987; }

.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.filter-grid .form-control,
.filter-grid .form-select { border-color: #dfe9df; border-radius: 8px; min-height: 34px; font-size: 0.78rem; }
.filter-grid .input-group-text { border-color: #dfe9df; color: var(--ink-soft); }

.filter-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.9rem; flex-wrap: wrap; }

.filter-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.55rem; }
.summary-item { display: flex; align-items: center; gap: 0.55rem; background: #fff; border: 1px solid #edf2ed; border-radius: 10px; padding: 0.55rem 0.65rem; }
.summary-item small { display: block; color: var(--ink-soft); font-size: 0.65rem; }
.summary-item strong { display: block; color: #2d3748; font-size: 0.95rem; }

.summary-icon { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #edf2f7; color: var(--ink-soft); flex-shrink: 0; }
.summary-icon.tepat-icon { background: #e6f7ea; color: #28a745; }
.summary-icon.telat-icon { background: #fff5d6; color: #c28a00; }
.summary-icon.izin-icon  { background: #e8f1ff; color: #0d6efd; }
.summary-icon.sakit-icon { background: #f0e9ff; color: #6f42c1; }
.summary-icon.tidak-icon { background: #ffe8eb; color: #dc3545; }

.dashboard-grid { display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: start; }

.custom-card { background: #fff; border-radius: 16px; padding: 1.5rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03); border: 1px solid #eef4f3; }
.card-title-custom { font-size: 1rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 1rem; }

.table-ranking { width: 100%; font-size: 0.85rem; }
.table-ranking th { color: #2d3748; font-weight: 700; padding: 0.6rem 0.4rem; border-bottom: 2px solid #edf2f7; }
.table-ranking td { padding: 0.6rem 0.4rem; border-bottom: 1px solid #f7fafc; color: var(--ink-soft); }

table.tabel-absen { width: 100%; font-size: 0.85rem; border-collapse: separate; border-spacing: 0; }
table.tabel-absen thead th { color: #2d3748; font-weight: 700; padding: 0.75rem 0.5rem; border-bottom: 2px solid #edf2f7; white-space: nowrap; }

.th-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #2d3748;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}
.th-sort i { font-size: 0.85rem; color: #a0aec0; }
.th-sort:hover { color: var(--brand-mid); }
.th-sort:hover i { color: var(--brand-mid); }
.th-sort.active { color: var(--brand-mid); }
.th-sort.active i { color: var(--brand-mid); }
table.tabel-absen tbody td { padding: 0.75rem 0.5rem; border-bottom: 1px solid #f0f4f0; color: var(--ink-soft); vertical-align: middle; }

.table-versi { font-size: 0.83rem; }
.table-versi th { font-size: 0.7rem; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; border-bottom-width: 1px; }
.table-versi td { vertical-align: middle; }

.table-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.2rem; font-size: 0.8rem; color: #718096; flex-wrap: wrap; gap: 0.75rem; }

.badge-status { display: inline-block; padding: 0.25rem 0.85rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-status.tepat  { background: var(--success); color: #fff; }
.badge-status.tidak  { background: var(--danger); color: #fff; }
.badge-status.telat  { background: var(--warning); color: #212529; }
.badge-status.pulang { background: #fd7e14; color: #fff; }
.badge-status.izin   { background: var(--info); color: #fff; }
.badge-status.sakit  { background: #6f42c1; color: #fff; }
.badge-status.off    { background: #6c757d; color: #fff; }

.badge-id { padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.8rem; background: #f0f4f1; color: #5c7068; letter-spacing: 0.05em; }

.badge-role { padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.8rem; text-transform: uppercase; background: #e3f8ea; color: #1a7a3f; }

.badge-status-karyawan { padding: 0.25rem 0.6rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.8rem; }
.badge-status-karyawan.aktif    { background: #e3f8ea; color: #1a7a3f; }
.badge-status-karyawan.nonaktif { background: #fde3e3; color: #b12727; }

.badge-wajib { font-size: 0.68rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 20px; }

.btn-aksi { width: 28px; height: 28px; border-radius: 6px; border: 1px solid #e4ece4; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-mute); text-decoration: none; }
.btn-aksi.edit:hover  { background: #e8f1ff; color: var(--info); border-color: #cfe0ff; }
.btn-aksi.hapus:hover { background: #ffe8ea; color: var(--danger); border-color: #ffd0d4; }

.btn-xlsx { border: 1px solid #cbd5e0; background: #fff; color: #2d3748; font-weight: 600; font-size: 0.8rem; padding: 0.3rem 0.6rem; border-radius: 6px; display: inline-flex; align-items: center; gap: 0.3rem; text-decoration: none; }

.btn-tambah {
    background: var(--brand-mid);
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    color: #fff;
}
.btn-tambah:hover { background: var(--brand-dark); color: #fff; }

.btn-save, .btn-simpan {
    background: var(--brand-mid);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.2rem;
    font-weight: 600;
}
.btn-save:hover, .btn-simpan:hover { background: var(--brand-dark); color: #fff; }

.card-jabatan, .card-unit, .card-user, .card-karyawan {
    background: #fff;
    border: 1px solid #eef4f3;
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-jabatan:hover, .card-unit:hover, .card-user:hover, .card-karyawan:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(23, 161, 154, 0.15);
}

.icon-jabatan, .icon-unit {
    width: 65px; height: 65px; border-radius: 20px;
    background: #e4f7e9; color: var(--brand-mid);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin-bottom: 0.8rem;
}

.avatar-user, .avatar-large {
    width: 70px; height: 70px; border-radius: 50%;
    background: #e4f7e9; color: var(--brand-mid);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 700; margin-bottom: 0.6rem;
}

.jabatan-nama, .unit-nama, .user-nama, .karyawan-nama { font-weight: 700; font-size: 0.95rem; color: var(--ink); margin-bottom: 0.2rem; }
.user-username, .karyawan-nik { font-size: 0.78rem; color: var(--ink-mute); margin-bottom: 0.6rem; }

.info-list { width: 100%; font-size: 0.78rem; color: #64706f; border-top: 1px solid #f0f4f0; border-bottom: 1px solid #f0f4f0; padding: 0.5rem 0; margin-bottom: 0.8rem; text-align: left; }
.info-list-item { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 0.2rem; }
.info-list-item strong { text-align: right; color: #394443; }

.card-actions { margin-top: auto; display: flex; gap: 0.5rem; width: 100%; }
.card-actions .btn, .card-actions form { flex: 1; }
.card-actions .btn { width: 100%; font-size: 0.75rem; border-radius: 8px; font-weight: 600; padding: 0.45rem 0.5rem; }

.alert-info-custom { border-radius: 12px; font-size: 0.85rem; padding: 0.75rem 1rem; margin-bottom: 1.25rem; }

.setting-card { background: #fff; border: 1px solid #eef4f3; border-radius: 16px; padding: 1.5rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); margin-bottom: 1.5rem; }
.setting-card-title { font-weight: 700; font-size: 1rem; color: var(--ink); display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.setting-card-title i { width: 38px; height: 38px; border-radius: 12px; background: #e4f7e9; color: var(--brand-mid); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.setting-card-sub { color: var(--ink-mute); font-size: 0.8rem; margin-bottom: 1.25rem; }

.versi-terbaru-box { background: #e4f7e9; border-radius: 12px; padding: 0.9rem 1.1rem; margin-bottom: 1.25rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.versi-terbaru-box .label-kecil { font-size: 0.7rem; font-weight: 700; color: var(--brand-dark); text-transform: uppercase; letter-spacing: 0.05em; }
.versi-terbaru-box .versi-angka { font-size: 1.1rem; font-weight: 800; color: var(--brand-dark); }

.form-label { font-size: 0.72rem; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; margin-bottom: 0.3rem; }
.form-control, .form-select { border-radius: 10px; border-color: #e4ece4; background: #f8faf8; font-size: 0.88rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-mid); box-shadow: 0 0 0 0.2rem rgba(46, 134, 30, 0.12); }

.modal-content { border: none; border-radius: 18px; overflow: hidden; }
.modal-header { background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid)); color: #fff; border: none; }
.modal-header .btn-close { filter: brightness(0) invert(1); }
.modal-body { padding: 1.5rem; }

.foto-bukti-thumb { cursor: pointer; transition: transform 0.15s ease; }
.foto-bukti-thumb:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

.foto-zoom-wrap { width: 100%; height: 60vh; overflow: hidden; background: #111; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.foto-zoom-wrap img { max-width: 100%; max-height: 100%; transition: transform 0.12s ease; user-select: none; pointer-events: none; }
.zoom-controls .btn { width: 34px; }
#modalFotoMaps.disabled { pointer-events: none; opacity: 0.5; }

.login-page-body {
    background-image: url('../../bg-login/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 0;
}

.login-wrapper { position: relative; width: 100%; max-width: 700px; margin: 2rem; }

.login-card { display: flex; width: 100%; min-height: 460px; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); background: #fff; }

.side-panel { position: relative; width: 42%; background: var(--brand-dark); overflow: hidden; }
.side-panel .tri { position: absolute; width: 0; height: 0; }
.side-panel .tri-1 { top: -10%; left: -20%; border-style: solid; border-width: 260px 0 260px 220px; border-color: transparent transparent transparent var(--brand-pale); opacity: 0.9; }
.side-panel .tri-2 { bottom: -15%; left: -25%; border-style: solid; border-width: 220px 0 220px 200px; border-color: transparent transparent transparent var(--brand-light); opacity: 0.85; }
.side-panel .tri-3 { top: 28%; left: -10%; border-style: solid; border-width: 100px 0 100px 130px; border-color: transparent transparent transparent var(--brand-paler); }

.tab-group { position: absolute; right: -1px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; z-index: 5; }
.tab-item { padding: 0.7rem 1.2rem; font-weight: 900; font-size: 20px; letter-spacing: 0.05em; text-align: center; text-decoration: none; cursor: pointer; }
.tab-item.active { background: #fff; color: var(--brand-mid); border-radius: 30px 0 0 30px; }
.tab-item.inactive { color: rgba(255, 255, 255, 0.85); background: transparent; }

.form-panel { width: 58%; padding: 2.75rem 3rem; display: flex; flex-direction: column; justify-content: center; }

.avatar-circle {
    width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 0.75rem auto;
    background: radial-gradient(circle at 35% 30%, var(--brand-light), var(--brand-dark));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(26, 93, 14, 0.4);
}
.avatar-circle i { font-size: 2.1rem; color: #fff; }

.form-logo { display: block; max-width: 220px; width: 50%; height: auto; margin: 0 auto 1.75rem auto; }

.input-underline { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid #ccc; padding: 0.5rem 0.1rem; margin-bottom: 1.5rem; }
.input-underline i { color: #9b9b9b; font-size: 1.1rem; }
.input-underline input { border: none; outline: none; width: 100%; font-size: 0.95rem; color: #333; }
.input-underline input::placeholder { color: #adadad; }

.form-actions { display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; }

.btn-login-pill {
    background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
    border: none; color: #fff; font-weight: 700; font-size: 0.8rem;
    letter-spacing: 0.08em; padding: 0.6rem 2.2rem; border-radius: 30px;
}
.btn-login-pill:hover { filter: brightness(1.05); color: #fff; }

.alert-error { font-size: 0.85rem; text-align: center; margin-bottom: 1rem; }

@media (max-width: 1200px) {
    .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    body { padding: 0.75rem; }
    .app-shell { border-radius: 16px; }
    .dashboard-grid { grid-template-columns: 1fr; }

    .sidebar-toggle { display: inline-flex; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 30;
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    }
    .app-shell.sidebar-open .sidebar { transform: translateX(0); }
    .app-shell.sidebar-open .sidebar-overlay { display: block; }

    .main-content { padding: 1.25rem; }

    .mobile-topbar { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
}

@media (max-width: 768px) {
    .app-shell { flex-direction: column; }
    .stat-cards { flex-direction: column; }
    .chart-row { flex-direction: column; }
    .filter-header { flex-direction: column; align-items: stretch; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filter-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .table-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 576px) {
    .login-card { flex-direction: column; }
    .side-panel, .form-panel { width: 100%; }
    .side-panel { min-height: 120px; }
    .tab-group { display: none; }
    .form-panel { padding: 2rem 1.5rem; }

    .filter-grid { grid-template-columns: 1fr; }
    .filter-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar .search-box { max-width: none; order: 2; flex-basis: 100%; }
}
