@import url('../vendor/fonts/poppins.css');

:root {
    --primary-blue: #2563EB;
    --secondary-blue: #0F172A;
    --light-blue: #DBEAFE;
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: #F1F5F9;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    color: white;
    z-index: 1000;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar > nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar > nav::-webkit-scrollbar { display: none; }

.sidebar .sidebar-brand {
    padding: 24px 20px 18px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .sidebar-brand .sidebar-logo {
    width: 66px;
    height: 66px;
    object-fit: contain;
    padding: 9px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid rgba(238, 242, 250, 0.9);
    box-shadow: 0 10px 22px rgba(15, 43, 102, 0.28);
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.sidebar .sidebar-brand h5 {
    margin: 0;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.sidebar .sidebar-brand small {
    opacity: 0.5;
    font-size: 10.5px;
    display: block;
    margin-top: 2px;
}

.sidebar .nav-link {
    position: relative;
    color: rgba(255,255,255,0.78);
    padding: 11px 18px;
    display: flex;
    align-items: center;
    transition: all 0.28s ease;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    margin: 2px 12px;
    border-radius: 12px;
    border-left: none;
    gap: 12px;
}

.sidebar .nav-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    transition: all 0.28s ease;
}

.sidebar .nav-link i {
    font-size: 14px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
}

.top-navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-wrapper {
    padding: 30px;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .card-body {
    padding: 20px;
}

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-card .stat-label {
    color: #888;
    font-size: 13px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafbfc;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.upload-area i {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 15px;
}

.upload-area.dragover i {
    color: var(--primary-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* ============================================================
   DESAIN BARU KONTEN UTAMA (KANAN) — modern, bold, clean
   ============================================================ */

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --secondary: #0F172A;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    --bg: #F1F5F9;
    --card: #FFFFFF;
    --border: #E2E8F0;
    --text: #1E293B;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background-color: #F1F5F9;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
    padding: 28px 32px;
    position: relative;
}
.content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2563EB, #3B82F6, #0F172A);
    opacity: 0.2;
    pointer-events: none;
}

/* ===== TOP NAVBAR ===== */
.top-navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 32px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.top-navbar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 220px;
    height: 2px;
    background: linear-gradient(90deg, #2563EB, #60A5FA);
}
.top-navbar h5 {
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.3px;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--card);
    border-radius: 0 !important;
    position: relative;
}
.card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}
.card-header h6 {
    font-weight: 700;
    font-size: 14px;
    color: var(--secondary);
    letter-spacing: -0.2px;
}
.card-body {
    padding: 22px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card .card-body {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
}
.stat-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.5px;
}
.stat-card .stat-label {
    font-size: 12.5px;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 2px;
}
.stat-card .icon.bg-success {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
}
.stat-card .icon.bg-secondary {
    background: linear-gradient(135deg, #64748B, #475569) !important;
}
.stat-card .icon.bg-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
}
.stat-card .icon.bg-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
}
.stat-card .icon.bg-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 10px 24px;
    font-size: 13px;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
    border: none;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.08);
}
.btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    transform: translate(-50%, -50%);
    transition: width 0.45s ease, height 0.45s ease;
    pointer-events: none;
}
.btn:hover::before {
    width: 260px;
    height: 260px;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}
.btn:active {
    transform: translateY(0) scale(0.97);
}
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.28);
}
.btn:disabled, .btn.disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}
.btn-sm {
    padding: 7px 16px;
    font-size: 11.5px;
    border-radius: 10px;
}
.btn-sm::before { width: 0; height: 0; }
.btn-sm:hover::before { width: 170px; height: 170px; }
.btn-lg {
    padding: 13px 30px;
    font-size: 15px;
    border-radius: 14px;
}
.btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    box-shadow: 0 4px 14px rgba(37,99,235,0.32), inset 0 1px 0 rgba(255,255,255,0.20);
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #1D4ED8, #2563EB);
    box-shadow: 0 10px 24px rgba(37,99,235,0.42);
    color: #fff;
}
.btn-primary i {
    color: #fff;
}
.btn-success {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    box-shadow: 0 4px 14px rgba(34,197,94,0.28), inset 0 1px 0 rgba(255,255,255,0.20);
}
.btn-success:hover {
    background: linear-gradient(135deg, #16A34A, #22C55E);
    box-shadow: 0 10px 24px rgba(34,197,94,0.40);
}
.btn-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    box-shadow: 0 4px 14px rgba(239,68,68,0.28), inset 0 1px 0 rgba(255,255,255,0.20);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626, #EF4444);
    box-shadow: 0 10px 24px rgba(239,68,68,0.40);
}
.btn-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    box-shadow: 0 4px 14px rgba(245,158,11,0.28), inset 0 1px 0 rgba(255,255,255,0.20);
    color: #fff;
}
.btn-warning:hover {
    background: linear-gradient(135deg, #D97706, #F59E0B);
    box-shadow: 0 10px 24px rgba(245,158,11,0.40);
    color: #fff;
}
.btn-info {
    background: linear-gradient(135deg, #06B6D4, #0891B2);
    box-shadow: 0 4px 14px rgba(6,182,212,0.28), inset 0 1px 0 rgba(255,255,255,0.20);
    color: #fff;
}
.btn-info:hover {
    background: linear-gradient(135deg, #0891B2, #06B6D4);
    box-shadow: 0 10px 24px rgba(6,182,212,0.40);
    color: #fff;
}
.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}
.btn-outline-primary::before { background: rgba(37,99,235,0.12); }
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37,99,235,0.30);
}
.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-light);
    box-shadow: none;
}
.btn-outline-secondary:hover {
    background: var(--bg);
    border-color: var(--text-muted);
    color: var(--text);
    box-shadow: none;
}
.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
    box-shadow: none;
}
.btn-outline-danger::before { background: rgba(239,68,68,0.12); }
.btn-outline-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 6px 16px rgba(239,68,68,0.30);
}
.btn-icon {
    padding: 9px;
    border-radius: 10px;
    width: 38px; height: 38px;
}
.btn-icon.btn-sm { width: 32px; height: 32px; padding: 6px; }

/* ===== FORMS ===== */
.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 9px 16px;
    font-size: 13.5px;
    transition: all 0.25s ease;
    background: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-control-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}
.form-control-lg {
    padding: 13px 18px;
    font-size: 15px;
    border-radius: 12px;
}
.input-group-text {
    background: var(--bg);
    border: 2px solid var(--border);
    color: var(--text-light);
    border-radius: 10px;
}
.form-label {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.form-text {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== TABLES ===== */
.table {
    margin-bottom: 0;
}
.table thead th {
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 14px;
    border-bottom: none;
    white-space: nowrap;
}
.table thead th:first-child {
    border-radius: 0;
}
.table thead th:last-child {
    border-radius: 0;
}
.table tbody td {
    padding: 11px 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}
.table tbody tr:hover {
    background: rgba(37,99,235,0.04);
}
.table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.008);
}

/* ===== DATATABLES ===== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
}
.dataTables_wrapper .dataTables_length label {
    font-size: 13px;
    color: var(--text-light);
}
.dataTables_wrapper .dataTables_length select {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 4px 10px;
    margin: 0 4px;
    font-size: 13px;
    outline: none;
}
.dataTables_wrapper .dataTables_filter label {
    font-size: 13px;
    color: var(--text-light);
}
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    margin-left: 8px;
    outline: none;
    transition: border-color 0.2s;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.dataTables_wrapper .dataTables_info {
    font-size: 12.5px;
    color: var(--text-light);
    padding-top: 16px;
}
.dataTables_wrapper .dataTables_paginate {
    padding-top: 12px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1.5px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 5px 14px !important;
    margin: 0 2px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text) !important;
    background: var(--card) !important;
    transition: all 0.2s;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--bg) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 1 !important;
    cursor: not-allowed !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled .page-link {
    color: var(--text-light) !important;
    pointer-events: none;
    opacity: 1 !important;
}

/* ===== TABLE INSIDE CARD ===== */
.card .table thead th {
    background: var(--secondary);
    color: #fff;
    border-bottom: none;
}
/* Prevent table columns from being hidden on wide tables (desktop only) */
@media (min-width: 992px) {
    .table-responsive .table {
        min-width: 1400px;
    }
    .table-responsive .table th:last-child,
    .table-responsive .table td:last-child {
        min-width: 140px;
    }
}
/* Log Aktivitas: kecualikan dari min-width 1400px agar tanpa scroll horizontal */
@media (min-width: 992px) {
    .table-responsive #tableLog {
        min-width: 0;
        width: 100%;
    }
    .table-responsive #tableLog th:last-child,
    .table-responsive #tableLog td:last-child {
        min-width: 0;
    }
}
.card-body.p-0 .table-responsive {
    border: none;
    border-radius: 0;
}

/* Data Pegawai & Presensi: tampil semua kolom tanpa scroll horizontal di desktop */
@media (min-width: 992px) {
    .table-responsive #tablePegawai,
    .table-responsive #tableAdmin,
    .table-responsive #tablePresensi {
        min-width: 0;
        width: 100%;
    }
    .table-responsive #tablePegawai th,
    .table-responsive #tablePegawai td,
    .table-responsive #tableAdmin th,
    .table-responsive #tableAdmin td,
    .table-responsive #tablePresensi th,
    .table-responsive #tablePresensi td {
        white-space: nowrap;
        padding: 8px 10px;
    }
}

/* Rekap Presensi (harian/mingguan/bulanan): semua kolom muat tanpa scroll kanan di desktop.
   Layout fixed + lebar persentase; kolom teks panjang membungkus, sel pendek tetap satu baris. */
@media (min-width: 992px) {
    .table-responsive #tableHarian,
    .table-responsive #tableMingguan,
    .table-responsive #tableBulanan {
        min-width: 0 !important;
        width: 100%;
        font-size: 12px;
        table-layout: fixed;
    }
    .table-responsive #tableHarian th,
    .table-responsive #tableHarian td,
    .table-responsive #tableMingguan th,
    .table-responsive #tableMingguan td,
    .table-responsive #tableBulanan th,
    .table-responsive #tableBulanan td {
        padding: 6px 8px;
        vertical-align: middle;
        overflow-wrap: break-word;
    }

    /* Lebar kolom Rekap Harian (9 kolom) */
    .table-responsive #tableHarian th:nth-child(1), .table-responsive #tableHarian td:nth-child(1) { width: 4%; }
    .table-responsive #tableHarian th:nth-child(2), .table-responsive #tableHarian td:nth-child(2) { width: 13%; }
    .table-responsive #tableHarian th:nth-child(3), .table-responsive #tableHarian td:nth-child(3) { width: 16%; }
    .table-responsive #tableHarian th:nth-child(4), .table-responsive #tableHarian td:nth-child(4) { width: 14%; }
    .table-responsive #tableHarian th:nth-child(5), .table-responsive #tableHarian td:nth-child(5) { width: 13%; }
    .table-responsive #tableHarian th:nth-child(6), .table-responsive #tableHarian td:nth-child(6) { width: 13%; }
    .table-responsive #tableHarian th:nth-child(7), .table-responsive #tableHarian td:nth-child(7) { width: 7%; }
    .table-responsive #tableHarian th:nth-child(8), .table-responsive #tableHarian td:nth-child(8) { width: 9%; }
    .table-responsive #tableHarian th:nth-child(9), .table-responsive #tableHarian td:nth-child(9) { width: 11%; }

    /* Lebar kolom Rekap Mingguan/Bulanan (7 kolom) */
    .table-responsive #tableMingguan th:nth-child(1), .table-responsive #tableMingguan td:nth-child(1),
    .table-responsive #tableBulanan th:nth-child(1), .table-responsive #tableBulanan td:nth-child(1) { width: 5%; }
    .table-responsive #tableMingguan th:nth-child(2), .table-responsive #tableMingguan td:nth-child(2),
    .table-responsive #tableBulanan th:nth-child(2), .table-responsive #tableBulanan td:nth-child(2) { width: 16%; }
    .table-responsive #tableMingguan th:nth-child(3), .table-responsive #tableMingguan td:nth-child(3),
    .table-responsive #tableBulanan th:nth-child(3), .table-responsive #tableBulanan td:nth-child(3) { width: 22%; }
    .table-responsive #tableMingguan th:nth-child(4), .table-responsive #tableMingguan td:nth-child(4),
    .table-responsive #tableBulanan th:nth-child(4), .table-responsive #tableBulanan td:nth-child(4) { width: 22%; }
    .table-responsive #tableMingguan th:nth-child(5), .table-responsive #tableMingguan td:nth-child(5),
    .table-responsive #tableBulanan th:nth-child(5), .table-responsive #tableBulanan td:nth-child(5) { width: 12%; }
    .table-responsive #tableMingguan th:nth-child(6), .table-responsive #tableMingguan td:nth-child(6),
    .table-responsive #tableBulanan th:nth-child(6), .table-responsive #tableBulanan td:nth-child(6) { width: 11%; }
    .table-responsive #tableMingguan th:nth-child(7), .table-responsive #tableMingguan td:nth-child(7),
    .table-responsive #tableBulanan th:nth-child(7), .table-responsive #tableBulanan td:nth-child(7) { width: 12%; }

    /* Sel pendek tetap satu baris (NIP sengaja dikecualikan: patah ke bawah) */
    .table-responsive #tableHarian th,
    .table-responsive #tableHarian td:nth-child(1),
    .table-responsive #tableHarian td:nth-child(5),
    .table-responsive #tableHarian td:nth-child(6),
    .table-responsive #tableHarian td:nth-child(7),
    .table-responsive #tableMingguan th,
    .table-responsive #tableMingguan td:nth-child(1),
    .table-responsive #tableMingguan td:nth-child(5),
    .table-responsive #tableMingguan td:nth-child(6),
    .table-responsive #tableMingguan td:nth-child(7),
    .table-responsive #tableBulanan th,
    .table-responsive #tableBulanan td:nth-child(1),
    .table-responsive #tableBulanan td:nth-child(5),
    .table-responsive #tableBulanan td:nth-child(6),
    .table-responsive #tableBulanan td:nth-child(7) {
        white-space: nowrap;
    }

    /* NIP panjang: patah per karakter ke baris bawah agar tidak menabrak kolom Nama */
    .table-responsive #tableHarian td:nth-child(2),
    .table-responsive #tableMingguan td:nth-child(2),
    .table-responsive #tableBulanan td:nth-child(2) {
        white-space: normal;
        word-break: break-all;
        line-height: 1.35;
    }

    /* Tombol foto di kolom jam dibuat ringkas */
    .table-responsive #tableHarian .btn-sm.btn-outline-primary {
        padding: 1px 6px;
        font-size: 11px;
        border-width: 1px;
    }
}

/* Riwayat pegawai & Data Presensi: kolom muat tanpa scroll horizontal di desktop */
@media (min-width: 992px) {
    .table-responsive #tableRiwayat {
        min-width: 0;
        font-size: 12px;
        table-layout: fixed;
        width: 100%;
    }
    .table-responsive #tableRiwayat th,
    .table-responsive #tableRiwayat td {
        padding: 6px 8px;
        vertical-align: middle;
    }
    .table-responsive #tableRiwayat th,
    .table-responsive #tableRiwayat td:nth-child(6),
    .table-responsive #tableRiwayat td:nth-child(7) {
        white-space: nowrap;
    }
    .table-responsive #tableRiwayat td:nth-child(2),
    .table-responsive #tableRiwayat td:nth-child(3),
    .table-responsive #tableRiwayat td:nth-child(4),
    .table-responsive #tableRiwayat td:nth-child(5),
    .table-responsive #tableRiwayat td:nth-child(8),
    .table-responsive #tableRiwayat td:nth-child(9),
    .table-responsive #tableRiwayat td:nth-child(10) {
        white-space: normal;
        word-break: break-word;
    }
    .table-responsive #tableRiwayat .btn-sm {
        font-size: 12px;
        padding: 2px 8px;
    }
}

/* Data Presensi: kolom lebih kecil agar muat tanpa scroll horizontal di desktop */
@media (min-width: 992px) {
    .table-responsive #tablePresensi,
    .table-responsive #tablePegawai {
        font-size: 12px;
        table-layout: fixed;
        width: 100%;
    }
    .table-responsive #tablePresensi th,
    .table-responsive #tablePresensi td,
    .table-responsive #tablePegawai th,
    .table-responsive #tablePegawai td {
        padding: 6px 8px;
        vertical-align: middle;
    }
    .table-responsive #tablePegawai th:nth-child(1),
    .table-responsive #tablePegawai td:nth-child(1) { width: 4%; }
    .table-responsive #tablePegawai th:nth-child(2),
    .table-responsive #tablePegawai td:nth-child(2) { width: 14%; }
    .table-responsive #tablePegawai th:nth-child(3),
    .table-responsive #tablePegawai td:nth-child(3) { width: 16%; }
    .table-responsive #tablePegawai th:nth-child(4),
    .table-responsive #tablePegawai td:nth-child(4) { width: 14%; }
    .table-responsive #tablePegawai th:nth-child(5),
    .table-responsive #tablePegawai td:nth-child(5) { width: 9%; }
    .table-responsive #tablePegawai th:nth-child(6),
    .table-responsive #tablePegawai td:nth-child(6) { width: 9%; }
    .table-responsive #tablePegawai th:nth-child(7),
    .table-responsive #tablePegawai td:nth-child(7) { width: 10%; }
    .table-responsive #tablePegawai th:nth-child(8),
    .table-responsive #tablePegawai td:nth-child(8) { width: 24%; }
    .table-responsive #tablePresensi th,
    .table-responsive #tablePresensi td:nth-child(6),
    .table-responsive #tablePresensi td:nth-child(7),
    .table-responsive #tablePegawai th {
        white-space: nowrap;
    }
    .table-responsive #tablePegawai td:nth-child(8) { white-space: normal; }
    .table-responsive #tablePresensi td:nth-child(2),
    .table-responsive #tablePresensi td:nth-child(3),
    .table-responsive #tablePresensi td:nth-child(4),
    .table-responsive #tablePresensi td:nth-child(5),
    .table-responsive #tablePresensi td:nth-child(9),
    .table-responsive #tablePresensi td:nth-child(10),
    .table-responsive #tablePegawai td:nth-child(2),
    .table-responsive #tablePegawai td:nth-child(3),
    .table-responsive #tablePegawai td:nth-child(4),
    .table-responsive #tablePegawai td:nth-child(5) {
        white-space: normal;
        word-break: break-word;
    }
    .table-responsive #tablePresensi .badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    .table-responsive #tablePresensi .aksi-ket {
        min-width: 0;
        padding: 2px 6px;
        font-size: 12px;
        width: 100%;
    }
    .table-responsive #tablePresensi .aksi-ket-lainnya {
        font-size: 12px;
        padding: 2px 6px;
    }
    .table-responsive #tablePresensi .btn-sm {
        font-size: 12px;
        padding: 2px 8px;
    }
    .table-responsive #tablePresensi td[style] {
        min-width: 0 !important;
    }
}
.card .table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    font-size: 10.5px;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.badge.bg-success {
    background: linear-gradient(135deg, #22C55E, #16A34A) !important;
}
.badge.bg-danger {
    background: linear-gradient(135deg, #EF4444, #DC2626) !important;
}
.badge.bg-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706) !important;
    color: #fff;
}
.badge.bg-info {
    background: linear-gradient(135deg, #06B6D4, #0891B2) !important;
}
.badge.bg-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
}
.badge.bg-secondary {
    background: linear-gradient(135deg, #64748B, #475569) !important;
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 13px;
    border-left: 4px solid transparent;
}
.alert-success {
    background: #DCFCE7;
    color: #166534;
    border-left-color: #22C55E;
}
.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border-left-color: #EF4444;
}
.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left-color: #F59E0B;
}
.alert-info {
    background: #CFFAFE;
    color: #155E75;
    border-left-color: #06B6D4;
}

/* ===== MODAL ===== */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 22px;
    background: var(--bg);
    position: relative;
}
.modal-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}
.modal-header .modal-title {
    font-weight: 700;
    font-size: 16px;
}
.modal-body {
    padding: 22px;
}
.modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 22px;
}

/* ===== NAV PILLS ===== */
.nav-pills .nav-link {
    border-radius: 10px;
    font-weight: 600;
    padding: 8px 20px;
    color: var(--text-light);
    transition: all 0.25s ease;
    font-size: 13px;
}
.nav-pills .nav-link:hover {
    color: var(--text);
    background: var(--bg);
}
.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    box-shadow: 0 3px 8px rgba(37,99,235,0.25);
}

/* ===== NAV TABS ===== */
.nav-tabs {
    border-bottom: 2px solid var(--border);
}
.nav-tabs .nav-link {
    border: none;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-light);
    padding: 10px 20px;
    margin-bottom: -2px;
    transition: all 0.2s;
    border-radius: 0;
    position: relative;
}
.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s;
}
.nav-tabs .nav-link:hover {
    color: var(--text);
    border: none;
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    border: none;
    background: transparent;
}
.nav-tabs .nav-link.active::after {
    width: 60%;
}

/* ===== UPLOAD ZONE OVERRIDES ===== */
.card .upload-zone {
    border-radius: var(--radius) !important;
    border: 2px dashed var(--border) !important;
    background: var(--bg) !important;
    text-align: center;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease !important;
}
.card .upload-zone:hover,
.card .upload-zone.dragover {
    border-color: var(--primary) !important;
    background: rgba(37,99,235,0.05) !important;
}
.card .upload-zone i {
    color: var(--text-muted) !important;
    font-size: 48px !important;
    transition: color 0.3s;
}
.card .upload-zone:hover i {
    color: var(--primary) !important;
}
.card.photo-card {
    border-radius: var(--radius) !important;
    border: 2px solid var(--border) !important;
    overflow: visible;
    transition: border-color 0.3s;
}
.card.photo-card .card-header {
    border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0 !important;
}
.card.photo-card.done {
    border-color: var(--success) !important;
}

/* ===== LINK STYLING ===== */
a:not(.btn):not(.nav-link):not(.sidebar *):not(.dropdown-item) {
    color: var(--primary);
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}
a:not(.btn):not(.nav-link):not(.sidebar *):not(.dropdown-item):hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== DROPDOWN ===== */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 6px;
    border: 1px solid var(--border);
}
.dropdown-item {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    transition: background 0.15s;
    color: var(--text);
}
.dropdown-item:hover {
    background: var(--bg);
    color: var(--primary);
}
.dropdown-item:active {
    background: var(--primary);
    color: #fff;
}
.dropdown-header {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 8px 14px 4px;
}

/* ===== MISC ===== */
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
    padding-bottom: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    position: relative;
    letter-spacing: -0.2px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 70px;
    height: 2px;
    background: linear-gradient(90deg, #2563EB, #60A5FA);
}
.page-header {
    margin-bottom: 24px;
}
.page-header h4, .page-header h5 {
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
    letter-spacing: -0.3px;
}
.page-header p {
    color: var(--text-light);
    font-size: 13px;
    margin: 4px 0 0;
}
.breadcrumb {
    background: none;
    padding: 0;
    font-size: 13px;
}
.table-responsive {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.row.g-4 {
    --bs-gutter-y: 1.25rem;
}

/* ===== PROGRESS BARS ===== */
.progress {
    height: 8px;
    border-radius: 10px;
    background: var(--border);
}
.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
}

/* ===== LIST GROUP ===== */
.list-group-item {
    border: 1px solid var(--border);
    padding: 12px 18px;
    font-size: 13px;
    color: var(--text);
}
.list-group-item:first-child {
    border-radius: 10px 10px 0 0;
}
.list-group-item:last-child {
    border-radius: 0 0 10px 10px;
}

/* ===== PAGINATION ===== */
.pagination {
    gap: 2px;
}
.page-link {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}
.page-link:hover {
    background: var(--bg);
    border-color: var(--primary);
    color: var(--primary);
}
.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    font-weight: 700;
}
.page-item.disabled .page-link {
    opacity: 1 !important;
    color: var(--text-light) !important;
    background-color: var(--card) !important;
    border-color: var(--border) !important;
}

/* ===== CARD FOOTER ===== */
.card-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 14px 22px;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}

/* ===== SIDEBAR BACKDROP (mobile only) ===== */
#sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999;
}

/* ===== RESPONSIVE ===== */
/* Desktop / Laptop */
@media (max-width: 1199.98px) {
    .content-wrapper { padding: 24px; }
    .top-navbar { padding: 12px 24px; }
}

/* Tablet landscape */
@media (max-width: 991.98px) {
    .content-wrapper { padding: 20px 22px; }
    .top-navbar { padding: 12px 22px; }
}

/* Tablet portrait & mobile */
@media (max-width: 767.98px) {
    .content-wrapper { padding: 16px 18px; }
    .top-navbar { padding: 10px 16px; }
    .top-navbar h5 { font-size: 13px; max-width: 55vw; white-space: normal; line-height: 1.2; overflow-wrap: break-word; }
    .top-navbar .badge { font-size: 9px; padding: 3px 8px; }
    .top-navbar .fa-user-circle { display: none; }
    .stat-card .stat-value { font-size: 24px; }
    .card-body { padding: 18px; }
    .card-header { padding: 14px 18px; }
    .card-header .btn { white-space: nowrap; }
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter { display: inline-flex; align-items: center; margin-top: 0; }
    .dataTables_wrapper > .row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .dataTables_wrapper > .row > [class*="col-"] { flex: 0 0 auto; width: auto !important; max-width: none; }
    .dataTables_wrapper .dataTables_length { float: left; width: auto !important; }
    .dataTables_wrapper .dataTables_filter { float: right; margin-left: auto; width: auto !important; text-align: right; }
    .dataTables_wrapper .dataTables_filter label { display: flex; align-items: center; gap: 6px; }
    .dataTables_wrapper .dataTables_filter input { width: 110px !important; margin-left: 0; margin-top: 0; }
    .dataTables_wrapper .dataTables_length label { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
    .dataTables_wrapper div.dataTables_paginate ul.pagination { justify-content: center !important; flex-wrap: wrap; gap: 4px; }
    .dataTables_wrapper .dataTables_paginate { text-align: center; float: none !important; }
    .dataTables_wrapper div.dataTables_paginate .paginate_button {
        padding: 4px 10px !important;
        margin: 2px 1px;
        font-size: 12px;
        min-width: 34px;
    }
    .dataTables_wrapper .dataTables_info { text-align: center; width: 100%; padding-top: 12px; }
    .dataTables_wrapper div.dataTables_paginate ul.pagination li.previous,
    .dataTables_wrapper div.dataTables_paginate ul.pagination li.next {
        flex-shrink: 1;
        min-width: 0;
    }
    .dataTables_wrapper div.dataTables_paginate ul.pagination li.previous .paginate_button,
    .dataTables_wrapper div.dataTables_paginate ul.pagination li.next .paginate_button {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        max-width: 96px;
    }
    .dataTables_wrapper .dataTables_paginate { width: 100%; display: flex; justify-content: center; }
    .dataTables_wrapper div.dataTables_paginate ul.pagination {
        margin: 0 auto;
        padding: 0;
        display: inline-flex;
    }
}

/* Small phones */
@media (max-width: 575.98px) {
    .content-wrapper { padding: 12px 12px; }
    .card-body { padding: 14px; }
    .card-header { padding: 12px 14px; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    .stat-card .icon { width: 44px; height: 44px; font-size: 18px; }
    .stat-card .stat-value { font-size: 20px; }
    .stat-card .card-body { padding: 14px 16px; gap: 12px; }
    .top-navbar { padding: 8px 12px; }
    .top-navbar h5 { font-size: 12px; max-width: 55vw; white-space: normal; line-height: 1.2; overflow-wrap: break-word; }
    .top-navbar .me-3 { margin-right: 8px !important; font-size: 12px; }
    .btn { padding: 7px 14px; font-size: 12px; }
    .btn-sm { padding: 5px 10px; font-size: 11px; }
    .form-control, .form-select { padding: 7px 12px; font-size: 13px; }
    .table thead th { font-size: 10.5px; padding: 10px 10px; }
    .table tbody td { padding: 9px 10px; font-size: 12px; }
    .section-title { font-size: 14px; }
    .page-hero { padding: 22px 24px !important; }
    .page-hero h4 { font-size: 17px; }
}

/* ============================================================
   PREMIUM DESIGN LAYER — konten utama terlihat custom
   ============================================================ */

/* Custom Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #E2E8F0; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563EB, #1E3A8A);
    border-radius: 20px;
    border: 2px solid #E2E8F0;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #3B82F6, #2563EB); }
* { scrollbar-width: thin; scrollbar-color: #2563EB #E2E8F0; }

/* Text selection */
::selection { background: #BFDBFE; color: #0F172A; }

/* Content background decoration */
body {
    background-image:
        radial-gradient(circle at 100% 0%, rgba(37,99,235,0.05), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(15,23,42,0.04), transparent 40%);
    background-attachment: scroll;
}

/* ===== PAGE HERO BANNER ===== */
.page-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 55%, #2563EB 100%);
    border-radius: 18px;
    padding: 28px 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 12px 28px rgba(37,99,235,0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.page-hero::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    right: 40px;
    bottom: -80px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}
.page-hero h4 {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
}
.page-hero p {
    margin: 0;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
}
.page-hero .page-hero-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    margin-top: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}
.page-hero .page-hero-icon {
    font-size: 64px;
    opacity: 0.35;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* ===== CARD ENTRANCE ANIMATION (HANYA HALAMAN DASHBOARD) ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
body.dash-page .content-wrapper > .row,
body.dash-page .content-wrapper > .card {
    animation: fadeInUp 0.45s ease both;
}
body.dash-page .content-wrapper > .row:nth-child(2) { animation-delay: 0.05s; }
body.dash-page .content-wrapper > .row:nth-child(3) { animation-delay: 0.1s; }
body.dash-page .content-wrapper > .row:nth-child(4) { animation-delay: 0.15s; }
body.dash-page .content-wrapper > .card:nth-child(2) { animation-delay: 0.05s; }

/* ===== CARD HEADER ICON CHIP ===== */
.card-header .fa,
.card-header .fas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(37,99,235,0.1);
    color: var(--primary);
    border-radius: 8px;
    font-size: 13px;
    margin-right: 8px;
}
/* Ikon di dalam tombol pada card-header: tampil normal (warna ikut tombol) */
.card-header .btn .fa,
.card-header .btn .fas {
    display: inline;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
    margin-right: 0;
}
/* Header kartu berlatar solid (bg-primary/success/warning/danger):
   ikon chip mengikuti warna teks header agar selalu terlihat */
.card-header.bg-primary .fa,
.card-header.bg-primary .fas,
.card-header.bg-success .fa,
.card-header.bg-success .fas,
.card-header.bg-warning .fa,
.card-header.bg-warning .fas,
.card-header.bg-danger .fa,
.card-header.bg-danger .fas {
    background: rgba(255,255,255,0.22);
    color: inherit;
}

/* ===== TABLE ROW HOVER ACCENT ===== */
.table tbody tr {
    position: relative;
    transition: background 0.15s;
}
.table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--primary);
}

/* ===== STAT CARD DECORATION ===== */
.stat-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid rgba(226,232,240,0.6);
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -14px;
    bottom: -14px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.06), transparent 70%);
    pointer-events: none;
}

/* ===== FOCUS VISIBILITY ===== */
.form-control:focus,
.form-select:focus,
.btn:focus,
.page-link:focus {
    outline: none;
}

/* ===== ROLE LABEL (no background, text only) ===== */
.role-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding-left: 10px;
    border-left: 2px solid var(--border);
}
.role-label.role-admin { color: var(--primary); }
.role-label.role-pegawai { color: var(--success); }

/* ===== TOP NAVBAR POLISH ===== */
.top-navbar h5 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

/* ===== CHART CONTAINER ===== */
canvas {
    max-height: 100%;
}

/* ===== DASHBOARD CHART CARDS ===== */
.content-wrapper .card:has(canvas) .card-body {
    background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
}

/* ===== EMPTY STATE ===== */
.text-muted i.fa-inbox,
.text-muted i.fa-folder-open {
    color: #CBD5E1;
}

/* ===== UTILITY: subtle divider ===== */
.soft-divider {
    border-top: 1px dashed var(--border);
    margin: 18px 0;
}

/* ============================================================
   PEGAWAI DASHBOARD REDESIGN — Modern Government 2026
   ============================================================ */
html, body { overflow-x: clip; }
body { font-family: 'Poppins', 'Inter', 'Segoe UI', system-ui, sans-serif; background-color: #F6F9FF; }

/* ---- SIDEBAR PREMIUM ---- */
.sidebar {
    width: var(--sidebar-width);
    background:
        radial-gradient(circle at 20% 85%, rgba(37,99,235,0.25), transparent 55%),
        radial-gradient(circle at 90% 10%, rgba(59,130,246,0.14), transparent 45%),
        linear-gradient(180deg, #0F172A 0%, #1E3A8A 100%);
    box-shadow: 4px 0 24px rgba(15,23,42,0.16);
    border-right: 1px solid rgba(255,255,255,0.06);
}
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1.5px);
    background-size: 22px 22px;
    pointer-events: none;
}
.sidebar::after {
    content: '';
    position: fixed;
    left: 0; bottom: 0;
    width: var(--sidebar-width);
    height: 180px;
    z-index: 0;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(37,99,235,0.30), transparent 72%),
        url('../img/gedung.jpg') center bottom / cover no-repeat;
    opacity: 0.38;
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 85%);
    mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 85%);
    pointer-events: none;
    border-radius: 24px 24px 0 0;
}
.sidebar > * { position: relative; z-index: 1; }

.sidebar-brand {
    padding: 26px 20px 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .sidebar-logo { width: 66px; height: 66px; filter: none; }
.sidebar-brand h5 { font-size: 14.5px; letter-spacing: 0.6px; font-weight: 800; }
.sidebar nav { padding-top: 6px; }
.sidebar .nav-link {
    margin: 5px 16px;
    padding: 10px 14px;
    border-left: none;
    border-radius: 14px;
    color: rgba(255,255,255,0.72);
    font-size: 13.5px;
    font-weight: 500;
    gap: 12px;
    transition: all 0.3s ease;
}
.sidebar .nav-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    transition: all 0.3s ease;
}
.sidebar .nav-link i { width: 18px; margin-right: 0; font-size: 14px; text-align: center; }
.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.sidebar .nav-link:hover .nav-icon,
.sidebar .nav-link.active .nav-icon {
    background: rgba(255,255,255,0.18);
}
.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    box-shadow: 0 8px 20px rgba(37,99,235,0.42);
}
.sidebar .nav-link.active i { color: #fff; }
.sidebar .nav-link-danger:hover {
    background: linear-gradient(135deg, rgba(239,68,68,0.95), rgba(220,38,38,0.95));
    box-shadow: 0 6px 16px rgba(239,68,68,0.35);
}
.sidebar .nav-link-danger:hover .nav-icon { background: rgba(255,255,255,0.18); }
.sidebar .nav-link.active::after {
    content: '';
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,0.9);
}
.sidebar .sidebar-section {
    padding: 16px 24px 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.38);
}
.sidebar hr { border-color: rgba(255,255,255,0.12) !important; margin: 14px 18px !important; }

/* ---- TOP NAVBAR / HEADER ---- */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 900;
    height: 80px;
    padding: 0 32px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 18px rgba(15,23,42,0.04);
}
.top-navbar::after { display: none; }
.navbar-toggle { padding: 8px 12px; }
.navbar-title-wrap { display: flex; align-items: center; gap: 10px; }
.navbar-title-wrap h5 { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; margin: 0; }

.header-search {
    display: flex; align-items: center; gap: 10px;
    width: 240px;
    padding: 9px 16px;
    background: #F6F9FF;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.header-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.10); }
.header-search i { color: var(--text-light); font-size: 14px; }
.header-search input {
    border: none; background: transparent; outline: none;
    width: 100%; font-size: 13px; font-family: 'Poppins', sans-serif; color: var(--text);
}
.header-search input::placeholder { color: #A8B4C8; }

.header-icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--border); border-radius: 12px;
    background: #fff; color: var(--text-light); font-size: 15px;
    transition: all 0.3s ease; cursor: pointer;
}
.header-icon-btn:hover {
    color: var(--primary); border-color: var(--primary);
    background: #F6F9FF; transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(37,99,235,0.12);
}
.notif-dot {
    position: absolute; top: 8px; right: 9px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #EF4444; border: 2px solid #fff;
}

.profile-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 12px 6px 6px;
    border: 1.5px solid transparent; border-radius: 14px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}
.profile-btn:hover { background: #F6F9FF; border-color: var(--border); }
.profile-btn::after { margin-left: 2px; color: var(--text-muted); }
.profile-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff; font-weight: 700; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(37,99,235,0.30);
    flex-shrink: 0;
}
.profile-meta { display: flex; flex-direction: column; line-height: 1.3; }
.profile-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.profile-role { font-size: 11px; font-weight: 500; color: var(--text-light); }
.profile-role.role-admin { color: var(--primary); }
.profile-role.role-pegawai { color: var(--success); }

/* ---- WELCOME CARD ---- */
.welcome-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 190px;
    margin-bottom: 26px;
    padding: 34px 38px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.15);
    background: linear-gradient(120deg, #1D4ED8 0%, #2563EB 60%, #3B82F6 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(37,99,235,0.35);
}
.welcome-card::before {
    content: '';
    position: absolute; top: -80px; right: -60px;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
    pointer-events: none;
}
.welcome-card::after {
    content: '';
    position: absolute; bottom: -100px; left: 30%;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    filter: blur(12px);
    pointer-events: none;
}
.wc-content { position: relative; z-index: 2; max-width: 60%; }
.wc-eyebrow {
    font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(255,255,255,0.8); font-weight: 600; margin-bottom: 8px;
}
.wc-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 6px; }
.wc-subtitle { font-size: 13.5px; color: rgba(255,255,255,0.82); margin: 0 0 18px; }
.wc-date-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 9px 18px; border-radius: 30px;
    color: #fff; font-size: 12.5px; font-weight: 600;
}
.wc-calendar {
    position: relative; z-index: 2;
    width: 150px; height: 170px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transform: rotate(3deg);
    box-shadow: 0 18px 30px rgba(15,23,42,0.25);
    flex-shrink: 0;
}
.wc-cal-month { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.wc-cal-day { font-size: 46px; font-weight: 800; line-height: 1; margin: 6px 0; }
.wc-cal-dow { font-size: 12px; color: rgba(255,255,255,0.8); }

/* ---- STAT CARD V2 ---- */
.stat-card-v2 {
    position: relative;
    background: #fff;
    border: 1px solid rgba(229,231,235,0.6);
    border-radius: 22px;
    box-shadow: 0 4px 16px rgba(15,23,42,0.05);
    padding: 22px 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}
.stat-card-v2:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(37,99,235,0.14); }
.stat-card-v2::after {
    content: '';
    position: absolute; right: -20px; top: -20px;
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, var(--sc-color, rgba(37,99,235,0.08)), transparent 70%);
    pointer-events: none;
}
.stat-card-v2 .sc-icon {
    width: 54px; height: 54px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    background: var(--sc-grad, linear-gradient(135deg, #2563EB, #1D4ED8));
    box-shadow: 0 8px 18px var(--sc-glow, rgba(37,99,235,0.3));
    margin-bottom: 16px;
}
.stat-card-v2 .sc-value { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -0.5px; }
.stat-card-v2 .sc-label { font-size: 12.5px; color: var(--text-light); font-weight: 500; margin-top: 6px; }
.stat-card-v2 .sc-trend {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    background: #F0FDF4; color: #16A34A;
}
.stat-card-v2 .sc-trend.trend-info { background: #EFF6FF; color: #2563EB; }
.stat-card-v2 .sc-trend.trend-warn { background: #FEF3C7; color: #B45309; }
.stat-card-v2 .sc-trend.trend-danger { background: #FEF2F2; color: #DC2626; }

/* ---- DASH CARDS ---- */
.dash-card {
    border: none;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(15,23,42,0.06);
}
.dash-card .card-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding: 18px 24px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    border-radius: 22px 22px 0 0 !important;
}
.dash-card .card-header::before { display: none; }
.dash-card .card-body { padding: 22px 24px; }
.chart-body { height: 320px; }
@media (min-width: 768px) {
    .dash-card .table-responsive .table { min-width: 680px; }
}
/* Dashboard "Data Presensi Terbaru" (6 kolom): Nama, Tanggal, Jam Masuk, Jam Pulang, Status, Aksi */
.dash-card .table-responsive #tablePresensi {
    table-layout: fixed;
    width: 100%;
}
.dash-card .table-responsive #tablePresensi th,
.dash-card .table-responsive #tablePresensi td {
    padding: 8px 10px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-card .table-responsive #tablePresensi th:nth-child(1) { width: 28%; }
.dash-card .table-responsive #tablePresensi th:nth-child(2) { width: 15%; }
.dash-card .table-responsive #tablePresensi th:nth-child(3) { width: 14%; }
.dash-card .table-responsive #tablePresensi th:nth-child(4) { width: 14%; }
.dash-card .table-responsive #tablePresensi th:nth-child(5) { width: 15%; }
.dash-card .table-responsive #tablePresensi th:nth-child(6) { width: 14%; }
.dash-card .table-responsive #tablePresensi td:nth-child(1) {
    white-space: normal;
    word-break: break-word;
}
.dash-card .table-responsive #tablePresensi td:nth-child(2),
.dash-card .table-responsive #tablePresensi td:nth-child(3),
.dash-card .table-responsive #tablePresensi td:nth-child(4),
.dash-card .table-responsive #tablePresensi td:nth-child(5),
.dash-card .table-responsive #tablePresensi td:nth-child(6) {
    white-space: nowrap;
}
.dash-card .table-responsive #tablePresensi .btn-sm {
    padding: 3px 8px;
    font-size: 12px;
}
@media (min-width: 992px) {
    .dash-card .table-responsive #tableRiwayatDash,
    .table-responsive #tableRiwayatProfil {
        min-width: 0;
        table-layout: fixed;
        width: 100%;
    }
    .table-responsive #tableRiwayatDash th:nth-child(1),
    .table-responsive #tableRiwayatProfil th:nth-child(1) { width: 24%; }
    .table-responsive #tableRiwayatDash th:nth-child(2),
    .table-responsive #tableRiwayatProfil th:nth-child(2) { width: 15%; }
    .table-responsive #tableRiwayatDash th:nth-child(3),
    .table-responsive #tableRiwayatProfil th:nth-child(3) { width: 15%; }
    .table-responsive #tableRiwayatDash th:nth-child(4),
    .table-responsive #tableRiwayatProfil th:nth-child(4) { width: 22%; }
    .table-responsive #tableRiwayatDash th:nth-child(5),
    .table-responsive #tableRiwayatProfil th:nth-child(5) { width: 14%; }
    .table-responsive #tableRiwayatDash th:nth-child(6),
    .table-responsive #tableRiwayatProfil th:nth-child(6) { width: 10%; }
    .table-responsive #tableRiwayatDash th,
    .table-responsive #tableRiwayatDash td,
    .table-responsive #tableRiwayatProfil th,
    .table-responsive #tableRiwayatProfil td {
        padding: 8px 10px;
        vertical-align: middle;
    }
.table-responsive #tableRiwayatDash th,
    .table-responsive #tableRiwayatDash td:nth-child(1),
    .table-responsive #tableRiwayatDash td:nth-child(2),
    .table-responsive #tableRiwayatDash td:nth-child(3),
    .table-responsive #tableRiwayatDash td:nth-child(6),
    .table-responsive #tableRiwayatProfil th,
    .table-responsive #tableRiwayatProfil td:nth-child(1),
    .table-responsive #tableRiwayatProfil td:nth-child(2),
    .table-responsive #tableRiwayatProfil td:nth-child(3),
    .table-responsive #tableRiwayatProfil td:nth-child(6) {
        white-space: nowrap;
    }
    .table-responsive #tableRiwayatDash td:nth-child(4),
    .table-responsive #tableRiwayatDash td:nth-child(5),
    .table-responsive #tableRiwayatProfil td:nth-child(4),
    .table-responsive #tableRiwayatProfil td:nth-child(5) {
        white-space: normal;
        word-break: break-word;
    }
}

.chart-title { display: flex; align-items: center; gap: 12px; }
.chart-title-icon {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    box-shadow: 0 6px 14px rgba(37,99,235,0.28);
    flex-shrink: 0;
}
.chart-title h6 { margin: 0; font-weight: 700; font-size: 14.5px; color: var(--text); }
.chart-title small { color: var(--text-light); font-size: 11px; }
.chart-filter {
    width: auto; min-width: 150px;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 12px; font-weight: 500; padding: 7px 12px;
}
.chart-filter:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.10); }

/* ---- DONUT ---- */
.donut-wrap { position: relative; height: 220px; }
.donut-center {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center; pointer-events: none;
}
.donut-center .dc-value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.donut-center .dc-label { font-size: 11px; color: var(--text-light); font-weight: 500; margin-top: 4px; }
.donut-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 18px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-light); }
.donut-legend-item .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-item .label { flex: 1; font-weight: 500; }
.donut-legend-item .pct { font-weight: 700; color: var(--text); }

/* ---- INFO LIST (Presensi Hari Ini) ---- */
.info-list { display: flex; flex-direction: column; }
.info-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 4px; border-bottom: 1px dashed var(--border);
}
.info-item:last-child { border-bottom: none; }
.info-item .ii-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: #EFF6FF; color: var(--primary); font-size: 16px;
    flex-shrink: 0;
}
.info-item .ii-label { font-size: 11.5px; color: var(--text-light); font-weight: 500; }
.info-item .ii-value { font-size: 14px; font-weight: 600; color: var(--text); }

.empty-icon {
    width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%;
    background: #EFF6FF;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: var(--primary);
}

/* ---- FOOTER ---- */
.dash-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding: 22px 4px 6px; margin-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--text-light); font-size: 12.5px;
}
.dash-footer strong { color: var(--text); }

/* ---- FOCUS VISIBILITY ---- */
.header-icon-btn:focus-visible,
.profile-btn:focus-visible,
.wc-date-btn:focus-visible,
.chart-filter:focus-visible,
.navbar-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---- RESPONSIVE (Dashboard layer) ---- */
@media (max-width: 1199.98px) {
    .header-search { width: 200px; }
}
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
}
@media (max-width: 767.98px) {
    .top-navbar { height: 68px; padding: 0 16px; }
    .profile-meta { display: none; }
    .welcome-card { flex-direction: column; align-items: flex-start; gap: 18px; padding: 26px 22px; min-height: 0; }
    .wc-content { max-width: 100% !important; }
    .wc-calendar { width: 118px; height: 130px; }
    .wc-cal-day { font-size: 36px; }
    .chart-body { height: 280px; }
}
@media (max-width: 575.98px) {
    .wc-title { font-size: 20px; }
    .welcome-card { padding: 22px 18px; }
    .stat-card-v2 { padding: 18px; }
    .stat-card-v2 .sc-icon { width: 46px; height: 46px; font-size: 20px; margin-bottom: 12px; }
    .stat-card-v2 .sc-value { font-size: 24px; }
    .dash-card .card-header { padding: 14px 16px; }
    .dash-card .card-body { padding: 16px; }
    .dash-footer { flex-direction: column; text-align: center; }
    .quick-action { padding: 14px 14px; gap: 10px; border-radius: 16px; }
    .qa-icon { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
    .qa-title { font-size: 12.5px; }
    .qa-sub { font-size: 10.5px; }
    .qa-arrow { display: none; }
}
@media (max-width: 400px) {
    .wc-calendar { display: none; }
    .header-search { display: none !important; }
}

/* ---- MOBILE: tabel riwayat ditumpuk menjadi kartu (tanpa scroll kanan) ---- */
@media (max-width: 575.98px) {
    .table-stacked,
    .table-stacked tbody,
    .table-stacked tr,
    .table-stacked td { display: block; width: 100%; }
    .table-stacked thead { display: none; }
    .table-stacked th,
    .table-stacked td { width: auto !important; max-width: 100% !important; min-width: 0 !important; }
    .table-stacked table,
    .table-stacked tr,
    .table-stacked tbody { width: 100% !important; max-width: 100% !important; }
    .table-stacked td .btn,
    .table-stacked td .btn.w-100 { width: auto !important; max-width: 100% !important; white-space: normal; }
    .table-stacked tr {
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 6px 12px;
        margin-bottom: 10px;
    }
    .table-stacked td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 4px 12px;
        border: 0;
        padding: 6px 2px;
        font-size: 12.5px;
        text-align: right;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .table-stacked td > *:last-child {
        min-width: 0;
        flex: 1 1 auto;
        width: auto !important;
        overflow-wrap: anywhere;
        word-break: break-word;
        text-align: right;
    }
    .table-stacked td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-light);
        text-align: left;
        flex-shrink: 0;
    }
.dash-card .table-responsive .table,
    .table-responsive .table-stacked { min-width: 0 !important; }
    .table-responsive .table-stacked .dt-row .col-sm-12,
    .table-responsive .dt-row .col-sm-12 { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
    .table-responsive .table-stacked ~ * .row,
    .table-responsive .dataTables_wrapper:has(.table-stacked) > .row,
    .table-responsive .dataTables_wrapper:has(.table-stacked) .dt-layout-row,
    .table-responsive .dataTables_wrapper:has(.table-stacked) { flex-wrap: wrap !important; max-width: 100% !important; width: 100% !important; overflow-x: hidden !important; }
    .table-responsive .dataTables_wrapper:has(.table-stacked) .dataTables_wrapper > .row,
    .table-responsive .dataTables_wrapper:has(.table-stacked) .row > [class*="col-"] { flex: 0 0 100% !important; max-width: 100% !important; }
    .table-responsive .dataTables_wrapper:has(.table-stacked) .dataTables_paginate .pagination { flex-wrap: wrap !important; justify-content: center !important; }
    .table-responsive #tableRiwayat { min-width: 0 !important; }
    .table-responsive #tablePegawai,
    .table-responsive #tableAdmin,
    .table-responsive #tablePresensi,
    .table-responsive #tableHarian,
    .table-responsive #tableMingguan,
    .table-responsive #tableBulanan,
    .table-responsive #tableLog { min-width: 0 !important; }
}

/* ---- LOG AKTIVITAS: semua kolom muat tanpa scroll kanan di desktop ---- */
/* Hanya untuk layar >= 576px; di ponsel tabel mengikuti mode kartu .table-stacked */
@media (min-width: 576px) {
    #tableLog { table-layout: fixed !important; }
    #tableLog th:nth-child(1),
    #tableLog td:nth-child(1) { width: 13% !important; } /* Waktu */
    #tableLog th:nth-child(2),
    #tableLog td:nth-child(2) { width: 14% !important; } /* User */
    #tableLog th:nth-child(3),
    #tableLog td:nth-child(3) { width: 7% !important; }  /* Role */
    #tableLog th:nth-child(4),
    #tableLog td:nth-child(4) { width: 14% !important; } /* Aksi */
    #tableLog th:nth-child(5),
    #tableLog td:nth-child(5) { width: 40% !important; } /* Detail */
    #tableLog th:nth-child(6),
    #tableLog td:nth-child(6) { width: 12% !important; } /* IP */
    #tableLog th,
    #tableLog td {
        overflow-wrap: anywhere;
        word-break: break-word;
        white-space: normal;
    }
#tableLog td code { white-space: normal; font-size: 11.5px; }
    }

/* Catatan otomatis "Diisi Oleh Admin": warna terang sebagai pembeda dari catatan manual */
.catatan-admin {
    color: #f59e0b;
    font-weight: 600;
}

/* Status column: teks polos seperti kolom lain */

/* ============================================================
   ADMIN DASHBOARD REDESIGN — Enterprise layer (Quick Action,
   Timeline, Analytics glass, Section headings)
   ============================================================ */

/* ---- WELCOME ANALYTICS GLASS PANEL ---- */
.wc-analytics { transform: rotate(-3deg); gap: 6px; }
.wc-ana-icon {
    width: 58px; height: 58px; border-radius: 18px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.30);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: #fff;
}
.wc-ana-value { font-size: 34px; font-weight: 800; line-height: 1; }
.wc-ana-label { font-size: 11px; color: rgba(255,255,255,0.85); letter-spacing: 0.5px; text-transform: uppercase; }

/* ---- SECTION HEADING ---- */
.section-heading {
    display: flex; align-items: center; gap: 12px;
    margin: 6px 0 16px;
}
.section-heading .sh-icon {
    width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 12px rgba(37,99,235,0.25);
}
.section-heading h6 { margin: 0; font-weight: 700; font-size: 15px; color: var(--text); letter-spacing: -0.2px; }
.section-heading small { color: var(--text-light); font-size: 11.5px; display: block; }

/* ---- QUICK ACTION ---- */
.quick-action {
    display: flex; align-items: center; gap: 16px;
    background: #fff;
    border: 1px solid rgba(229,231,235,0.6);
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: 0 4px 16px rgba(15,23,42,0.05);
    transition: all 0.3s ease;
    height: 100%;
    text-decoration: none !important;
}
.quick-action:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(37,99,235,0.14);
    border-color: rgba(37,99,235,0.25);
}
.qa-icon {
    width: 54px; height: 54px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff; flex-shrink: 0;
    box-shadow: 0 8px 18px var(--qa-glow, rgba(37,99,235,0.3));
    background: var(--qa-grad, linear-gradient(135deg, #2563EB, #1D4ED8));
}
.qa-title { font-size: 14px; font-weight: 700; color: var(--text); }
.qa-sub { font-size: 11.5px; color: var(--text-light); margin-top: 1px; }
.qa-arrow { margin-left: auto; color: #CBD5E1; font-size: 17px; transition: all 0.3s; }
.quick-action:hover .qa-arrow { color: var(--primary); transform: translateX(5px); }

/* ---- ACTIVITY TIMELINE ---- */
.activity-timeline { display: flex; flex-direction: column; }
.activity-item { position: relative; display: flex; gap: 14px; padding: 0 0 22px 0; }
.activity-item::before {
    content: '';
    position: absolute; left: 19px; top: 42px; bottom: -2px;
    width: 2px;
    background: linear-gradient(180deg, var(--border), transparent);
}
.activity-item:last-child { padding-bottom: 0; }
.activity-item:last-child::before { display: none; }
.ai-dot {
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: #fff; flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 5px 12px rgba(15,23,42,0.14);
}
.ai-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ai-desc { font-size: 11.5px; color: var(--text-light); margin-top: 1px; }
.ai-time { font-size: 10.5px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }

/* ---- VERSION PILL ---- */
.ver-pill {
    display: inline-block;
    margin-left: 6px; padding: 2px 10px;
    border-radius: 20px;
    background: #EFF6FF; color: var(--primary);
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.5px;
}

/* ---- LIGHTWEIGHT TABLE (dashboard) ---- */
.table-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}
.tb-search { max-width: 320px; }
.tb-search .input-group-text {
    background: #F6F9FF;
    border: 1.5px solid var(--border); border-right: 0;
    border-radius: 10px 0 0 10px;
    color: var(--text-light);
    padding: 0 12px;
}
.tb-search .form-control {
    border: 1.5px solid var(--border); border-left: 0;
    border-radius: 0 10px 10px 0;
    font-size: 12.5px; padding: 7px 12px;
}
.tb-search .form-control:focus { box-shadow: none; border-color: var(--border); }
.tb-search:focus-within .input-group-text,
.tb-search:focus-within .form-control { border-color: var(--primary); }
.tb-count { font-size: 12.5px; color: var(--text-light); font-weight: 500; }
.table-pagination {
    display: flex; justify-content: flex-end;
    gap: 4px; flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}
.table-pagination .page-link {
    border: 1.5px solid var(--border); border-radius: 8px;
    padding: 5px 12px; font-size: 12.5px; font-weight: 600;
    color: var(--text); background: #fff;
    transition: all 0.2s; cursor: pointer;
}
.table-pagination .page-link:hover { border-color: var(--primary); color: var(--primary); }
.table-pagination .page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.table-pagination .page-link:disabled { opacity: 0.45; cursor: not-allowed; }
.table-pagination .page-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- RESPONSIVE (admin layer) ---- */
@media (max-width: 575.98px) {
    .quick-action { padding: 16px 18px; gap: 12px; }
    .qa-icon { width: 46px; height: 46px; font-size: 20px; }
    .qa-title { font-size: 13px; }
    .section-heading { margin: 4px 0 12px; }
}

/* ============================================================
   ELEGANT ANIMATIONS - Buttons, Navigation & Micro-interactions
   ============================================================ */

/* --- Button shine sweep on hover --- */
.btn {
    --shine: rgba(255,255,255,0.55);
}
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(105deg, transparent, var(--shine), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    opacity: 0;
}
body.dash-page .btn:hover::after {
    animation: btnShine 0.7s ease forwards;
}
@keyframes btnShine {
    0% { left: -80%; opacity: 0; }
    30% { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}

/* --- Button icon bob on hover (dashboard only) --- */
body.dash-page .btn:hover > i,
body.dash-page .btn:hover > .bi {
    animation: iconBob 0.5s ease;
}
@keyframes iconBob {
    0%, 100% { transform: translateX(0); }
    40% { transform: translateX(3px); }
}

/* --- Outline button: soft gradient border on hover --- */
.btn-outline-primary:hover,
.btn-outline-danger:hover {
    box-shadow: 0 8px 20px rgba(37,99,235,0.28);
}

/* --- Card hover lift (dashboard only) --- */
body.dash-page .card {
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), box-shadow 0.35s ease;
}
body.dash-page .card:hover {
    box-shadow: 0 14px 34px rgba(15,23,42,0.10);
}

/* --- Sidebar link icon pulse on active (dashboard only) --- */
body.dash-page .sidebar .nav-link.active .nav-icon {
    animation: iconPulse 2.4s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* --- Quick action hover lift + arrow slide --- */
.quick-action {
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s ease;
}
.quick-action:hover {
    transform: translateY(-4px);
}
.quick-action .qa-arrow {
    transition: transform 0.3s ease;
}
.quick-action:hover .qa-arrow {
    transform: translateX(4px);
}

/* --- Welcome card value fade-in (dashboard only) --- */
body.dash-page .wc-ana-value,
body.dash-page .sc-value {
    animation: valueFade 0.6s ease both;
}
body.dash-page .wc-ana-value { animation-delay: 0.15s; }
body.dash-page .sc-value:nth-child(2) { animation-delay: 0.05s; }
@keyframes valueFade {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Dropdown menu smooth reveal (dashboard only) --- */
body.dash-page .dropdown-menu {
    animation: menuReveal 0.22s ease;
    transform-origin: top right;
}
@keyframes menuReveal {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Profile avatar subtle ring pulse --- */
.profile-btn:hover .profile-avatar {
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
}

/* Export Time Mark Loading Overlay */
.export-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.export-loading-box {
    background: #fff;
    border-radius: 12px;
    padding: 28px 40px;
    text-align: center;
    font-weight: 600;
    color: #0F172A;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   BOTTOM NAVIGATION (khusus PEGAWAI, mobile only)
   Menu bawah tetap yang mudah dijangkau jempol pengguna orang tua.
   ============================================================ */
.bottom-nav {
    display: none; /* hanya tampil di layar kecil melalui media query */
}

@media (max-width: 767.98px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        height: 62px;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -6px 20px rgba(15,23,42,0.08);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 600;
        min-height: 58px;
        transition: color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-item .bn-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 17px;
        color: var(--text-muted);
        transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
    }
    .bottom-nav-item.active {
        color: var(--primary);
    }
    .bottom-nav-item.active .bn-icon {
        background: linear-gradient(135deg, #2563EB, #1D4ED8);
        color: #fff;
        box-shadow: 0 6px 14px rgba(37,99,235,0.35);
        transform: translateY(-2px);
    }
    .bottom-nav-item:active .bn-icon { transform: scale(0.94); }

    /* Item Logout — dipisah garis tipis, ikon merah agar mudah dikenali */
    .bottom-nav-logout {
        min-height: 58px;
    }
    .bottom-nav-logout .bn-icon {
        background: #FEE2E2;
        color: #DC2626;
    }
    .bottom-nav-logout .bn-label {
        color: #DC2626;
    }

    /* Beri ruang agar konten tidak tertutup menu bawah */
    body.peg-bottom-nav .content-wrapper,
    body.peg-bottom-nav .main-content {
        padding-bottom: 76px;
    }
}

/* ============================================================
   STEPPER / PANDUAN PRESENSI (dashboard pegawai, ramah orang tua)
   ============================================================ */
.stepper-card .card-header { border-bottom: 1px solid var(--border); }
.stepper-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
.stepper-title { font-weight: 700; color: var(--text); font-size: 15px; }

.step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #F8FAFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    opacity: 0.55;
}
.step.next {
    opacity: 1;
    border-color: #BFDBFE;
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.step.done {
    opacity: 1;
    border-color: #BBF7D0;
    background: #F0FDF4;
}
.step.locked { opacity: 0.5; }

.step-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    background: #CBD5E1;
}
.step.next .step-num { background: linear-gradient(135deg, #2563EB, #1D4ED8); }
.step.done .step-num { background: #22C55E; }

.step-body { flex: 1; min-width: 0; }
.step-body strong { display: block; font-size: 14px; color: var(--text); }
.step-body small { font-size: 12px; color: var(--text-muted); }

.step-status { font-weight: 700; font-size: 15px; white-space: nowrap; }

.stepper-cta { margin-top: 14px; }
.stepper-cta .btn { border-radius: 12px; min-height: 52px; font-size: 16px; }
