html, body { overflow-x: hidden; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --light: #f8fafc;
    --dark: #1e293b;
    --sidebar-width: 300px;
    --sidebar-collapsed: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f1f5f9;
    color: #334155;
}

/* ========== LOGIN ========== */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-selector {
    text-align: center;
    margin: 20px 0;
}

.mode-selector h3 {
    color: white;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 600;
}

.mode-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-mode {
    flex: 1;
    min-width: 200px;
    padding: 25px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 140px;
}

.btn-mode::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-mode:hover::before {
    left: 100%;
}

.btn-mode:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.btn-admin {
    background: linear-gradient(150deg, #2563eb 100%, #00f2fe 100%);
    color: white;
}

.btn-tamu {
    background: linear-gradient(150deg, #2563eb 100%, #00f2fe 100%);
    color: white;
}

.btn-mode i {
    font-size: 36px;
}

.btn-mode span {
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-mode small {
    font-size: 12px;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .mode-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-mode {
        min-width: 250px;
        height: 120px;
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.login-header {
    background: var(--primary);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.login-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

#loginForm {
    padding: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.input-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-error {
    margin-top: 15px;
    color: var(--danger);
    font-size: 14px;
    text-align: center;
    display: none;
}

/* ========== APP LAYOUT ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    cursor: pointer;
    cursor: pointer;
    background: var(--dark);
    color: white;
    position: fixed;
    height: calc(100vh - 35px);
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header i {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 4px;
}

.sidebar-menu {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-menu::-webkit-scrollbar{
    width: 0;
    height: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--primary);
}

.menu-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 18px;
    text-align: center;
}

.menu-item span {
    font-size: 14px;
    transition: opacity .2s ease, transform .2s ease;
    font-weight: 500;
}

/* Sidebar collapsed (desktop) */
.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}
.sidebar.collapsed .menu-item {
    padding-left: 16px;
    padding-right: 16px;
}
.sidebar.collapsed .menu-item i {
    margin-right: 0;
}
.sidebar.collapsed .menu-item span {
    opacity: 0;
    transform: translateX(-6px);
    pointer-events: none;
}
.sidebar.collapsed .sidebar-header {
    padding: 20px 10px;
}
.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .sidebar-header p,
.sidebar.collapsed .sidebar-footer .user-info {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-6px);
}
.sidebar.collapsed #sidebarLogo {
    display: block !important;
}



.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-info i {
    font-size: 28px;
    color: var(--primary);
}

.user-info div {
    flex: 1;
}

.user-info .name {
    font-size: 14px;
    font-weight: 600;
}

.user-info .role {
    font-size: 12px;
    opacity: 0.7;
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--danger);
}

/* Sidebar Toggle (Mobile) */
.sidebar-toggle {
    display: none;
    flex-shrink: 0;

    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 110;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 95;
}

.sidebar.open + .sidebar-overlay,
.sidebar.open ~ .main-content .sidebar-overlay {
    display: block;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 25px;
    min-height: calc(100vh - 50px);
    padding-bottom: 20px;
    /* hindari scroll samping saat lebar komponen/ grid melebihi viewport */
    overflow-x: hidden;
}



/* Adjust main content when sidebar collapsed (desktop) */
.sidebar.collapsed ~ .main-content,
.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}


.page-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    font-size: 24px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h2 i {
    color: var(--primary);
}

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== STATS ========== */
.stats-grid {
    display: grid;
    /* Max 4 kotak per baris, tetap responsif agar tampil di layar normal 100% */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}




.stat-card {
    background: white;
    border-radius: 12px;
    /* kecilkan lagi supaya card statistik aktif/arsip makin proporsional */
    padding: 12px;


    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.blue { background: #dbeafe; color: var(--primary); }
.stat-icon.green { background: #dcfce7; color: var(--success); }
.stat-icon.yellow { background: #fef9c3; color: var(--warning); }
.stat-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-icon.red { background: #fee2e2; color: var(--danger); }

.stat-info h4 {
    font-size: 13px;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

/* ========== BUTTONS ========== */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #a16207; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }

.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #475569; }

.btn-info { background: #0ea5e9; color: white; }
.btn-info:hover { background: #0284c7; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ========== TABLES ========== */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* agar scroll tabel pendaftaran tidak “turun” keluar tabel */
    max-height: 540px;
}



/* tinggi baris tabel pendaftaran tetap (±10 baris saat max-height aktif) */
.data-table tbody td {
    height: 48px;
    vertical-align: middle;
}



.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0px;
}

.data-table thead th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    white-space: nowrap;
}

.data-table tbody td:first-child {
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table .actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

/* ========== SEARCH & FILTER ========== */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-box {
    flex: 1;
    min-width: 100px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-box select,
.filter-box input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

/* ========== FORMS ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group input:read-only {
    background: #f1f5f9;
}

/* Search & Suggestion Box */
.suggestion-box {
    position: relative;
}

.suggestion-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.suggestion-list.active {
    display: block;
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-item strong {
    color: var(--primary);
}

/* History Section */
.history-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.history-section h5 {
    font-size: 13px;
    color: var(--secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}

.history-item:last-child {
    border-bottom: none;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--dark);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== CALENDAR ========== */
.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-header h3 {
    font-size: 16px;
    text-transform: capitalize;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav button:hover {
    background: #e2e8f0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day-name {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    padding: 8px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.calendar-day:hover {
    background: #f1f5f9;
}

.calendar-day.today {
    border-color: var(--primary);
    background: #eff6ff;
    font-weight: 700;
    color: var(--primary);
}

.calendar-day.has-note::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--warning);
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
}

.calendar-day.other-month {
    color: #cbd5e1;
}

/* ========== CALCULATOR INPUT ========== */
.calc-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.calc-input-group label {
    flex: 1;
    font-size: 14px;
}

.calc-input-group input {
    width: 150px;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 16px;
}

.calc-total {
    background: var(--dark);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.calc-total span {
    font-size: 14px;
    opacity: 0.8;
}

.calc-total strong {
    font-size: 24px;
    font-family: 'Courier New', monospace;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ========== BADGE ========== */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary { background: #dbeafe; color: var(--primary); }
.badge-success { background: #dcfce7; color: var(--success); }
.badge-warning { background: #fef9c3; color: var(--warning); }
.badge-danger { background: #fee2e2; color: var(--danger); }
.badge-secondary { background: #e2e8f0; color: var(--secondary); }

/* ========== DASHBOARD GRID ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

/* pastikan container kalender + catatan tidak wrap turun */
.calendar-notes-list,
.calendar-container {
    min-width: 0;
}


/* ========== PRINT ========== */
@media print {
    .sidebar, .toolbar, .form-actions, .no-print,
    .sidebar-toggle, .sidebar-overlay {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========== NOTES POPUP ========== */
.note-tooltip {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: fixed;
    z-index: 300;
    min-width: 280px;
    display: none;
}

.note-tooltip.active {
    display: block;
}

.note-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 250;
    display: none;
}

.note-overlay.active {
    display: block;
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 90;
    }
    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 70px 15px 15px;
    }

    /* Page Header Mobile */
    .page-header {
        margin-bottom: 15px;
    }
    .page-header h2 {
        font-size: 18px;
    }
    .page-header .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stat-card {
        padding: 12px;
        gap: 10px;
    }
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .stat-info h4 {
        font-size: 11px;
    }
    .stat-info p {
        font-size: 16px;
    }

    /* Toolbar Mobile */
    .toolbar {
        gap: 8px;
    }
    .search-box {
        min-width: 100%;
        flex: none;
    }
    .filter-box select,
    .filter-box input {
        min-width: 120px;
        font-size: 13px;
    }

    /* Table Mobile */
    .data-table {
        font-size: 12px;
    }
    .data-table thead th {
        padding: 10px 8px;
        font-size: 11px;
    }
    .data-table tbody td {
        padding: 10px 8px;
        font-size: 12px;
    }
    .data-table .actions {
        flex-wrap: nowrap;
    }
    .data-table .actions .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* Form Grid Mobile */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Modal Mobile */
    .modal {
        max-width: 95%;
        max-height: 85vh;
    }
    .modal-body {
        padding: 15px;
    }

    /* Calculator Mobile */
    .calc-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        margin-bottom: 15px;
    }
    .calc-input-group label {
        font-size: 13px;
    }
    .calc-input-group input {
        width: 100%;
    }
    .calc-total strong {
        font-size: 18px;
    }

    /* Card Mobile */
    .card {
        padding: 15px;
    }

    /* Suggestion List Mobile */
    .suggestion-list {
        max-height: 150px;
    }

    /* History Section Mobile */
    .history-section {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
    .toolbar .btn {
        width: 100%;
        justify-content: center;
    }
    .data-table {
        min-width: 500px;
    }
}

/* ========== FOOTER ========== */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;



    background: white;




    border-top: 1px solid #e2e8f0;
    padding: 10px 25px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--secondary);
    z-index: 90;
}

.footer-user {
    font-weight: 500;
    color: var(--primary);
}

@media (max-width: 768px) {
    .app-footer {
        left: 0;
        right: 0;
        padding: 8px 15px;
    }
}

/* Desktop sidebar collapsed (minimized) */
.sidebar.collapsed ~ .app-footer,
.sidebar.collapsed + .app-footer,
.sidebar.collapsed ~ .main-content ~ .app-footer {
    left: var(--sidebar-collapsed) !important;
}




/* Calendar Notes List */
.calendar-notes-list {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-height: 220px;
    overflow-y: auto;
}

.note-list-item {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.note-list-item:hover {
    background: #f8fafc;
}

.note-list-date {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.note-list-text {
    font-size: 13px;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* WIZARD DOTS */
.wizard-dot { width: 32px; height: 32px; border-radius: 50%; background: #e2e8f0; color: #64748b; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.wizard-dot.active { background: var(--primary) !important; color: white !important; }

/* TIPE BAYAR */
.tipe-bayar { padding: 8px 10px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 13px; min-width: 75px; cursor: pointer; }
.tipe-bayar:focus { outline: none; border-color: var(--primary); }



