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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --sidebar-bg: #1e293b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-box h2 {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: normal;
    text-align: center;
    margin-bottom: 2rem;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    color: var(--white);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.2);
    color: var(--white);
    border-left: 3px solid var(--primary-color);
}

.nav-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-size: 0.9375rem;
}

/* Group section di sidebar: header label + spasi atas */
.nav-group {
    margin-top: 0.5rem;
}
.nav-group:first-of-type {
    margin-top: 0;
}
.nav-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s, background 0.15s;
}
.nav-section-header:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.04);
}
.nav-chevron {
    display: inline-block;
    font-size: 0.7rem;
    transition: transform 0.18s ease;
    transform: rotate(90deg); /* default: expanded → arah bawah */
    width: 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
}
.nav-group.collapsed .nav-chevron {
    transform: rotate(0deg); /* collapsed → arah kanan */
}
.nav-group-items {
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.25s ease;
}
.nav-group.collapsed .nav-group-items {
    max-height: 0;
}
/* Sub-item di dalam group sedikit indent supaya hirarki jelas */
.nav-group .nav-item {
    padding-left: 1.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

.top-header {
    background: var(--white);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header h1 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.user-info {
    color: var(--text-light);
    font-size: 0.875rem;
}

.content-area {
    padding: 2rem;
}

/* Page */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Forms */
.form-container,
.salary-form-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #475569;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--bg-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

.data-table tbody tr.row-invalid {
    background: #ffcccc !important;
}

.data-table tbody tr.row-invalid:hover {
    background: #ffb3b3 !important;
}

/* Salary Result */
.salary-result {
    margin-top: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.salary-result h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.result-grid {
    display: grid;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 6px;
}

.result-item.highlight {
    background: #dbeafe;
    border: 2px solid var(--primary-color);
}

.result-item span {
    color: var(--text-light);
}

.result-item strong {
    color: var(--text-color);
    font-size: 1.125rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--white);
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--text-color);
}

.modal-close {
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Error Message */
.error-message {
    color: var(--danger-color);
    margin-top: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

/* Filter Section */
.filter-section {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.filter-section .form-group {
    margin: 0;
    display: flex;
    align-items: center;
}

.filter-section .form-group label {
    display: inline-block;
    margin: 0 0.5rem 0 0;
    margin-bottom: 0;
}

.filter-section .form-group select,
.filter-section .form-group input {
    display: inline-block;
    width: auto;
    margin: 0;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.chart-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.chart-card canvas {
    max-height: 300px;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    display: none;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast.show {
    display: flex;
}

.toast.success {
    background: var(--success-color);
    color: white;
}

.toast.error {
    background: var(--danger-color);
    color: white;
}

.toast.info {
    background: var(--primary-color);
    color: white;
}

.toast.warning {
    background: var(--warning-color);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-nav {
        /* Scroll handled by parent .sidebar */
    }
    
    .nav-item {
        padding: 0.75rem 1.5rem;
    }
    
    .nav-text {
        display: block;
    }
    
    /* Overlay untuk tutup sidebar saat klik di luar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-toggle {
        display: block !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Overlay untuk tutup sidebar saat klik di luar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }

    .top-header {
        padding: 1rem;
    }

    .content-area {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

    .data-table {
        min-width: 600px;
    }

    .modal.active {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        margin: 1rem;
    }

    .content-area {
        padding: 0.5rem;
    }

    .form-container,
    .salary-form-container {
        padding: 1rem;
    }
}

/* ===== Resign Modal ===== */
.resign-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.resign-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 640px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}
.resign-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.resign-modal-header h3 { margin: 0; font-size: 1.1rem; }
.resign-modal-close {
    border: none;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #555;
}
.resign-modal-body { padding: 1rem 1.25rem; }
.resign-modal-body .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.resign-modal-body .form-group { margin-bottom: 0.75rem; }
.resign-modal-body small { display: block; margin-top: 4px; color: #6b7280; }
.resign-emp-info {
    background: #eef2ff;
    border-left: 3px solid #4f46e5;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
}
.resign-info-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
    padding: 0.7rem 0.85rem;
    border-radius: 6px;
    font-size: 0.88rem;
    margin: 0.75rem 0;
}
.resign-history {
    margin-top: 0.75rem;
    border-top: 1px dashed #d1d5db;
    padding-top: 0.6rem;
    font-size: 0.85rem;
    max-height: 160px;
    overflow-y: auto;
}
.resign-history h4 { margin: 0 0 0.4rem 0; font-size: 0.9rem; color: #374151; }
.resign-history-item {
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
}
.resign-history-item.active { background: #ecfdf5; border: 1px solid #a7f3d0; }
.resign-history-item.revoked { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.resign-modal-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}
.resign-modal-footer .btn-danger { margin-right: auto; }
.badge-resigned { background: #fde68a; color: #78350f; }

@media (max-width: 600px) {
    .resign-modal-body .form-row { grid-template-columns: 1fr; }
}

/* ========================================================================
   UI POLISH LAYER — override & extend styles above dgn look modern.
   Ditulis di akhir file supaya menang atas rule di atas (CSS cascade).
   ======================================================================== */

:root {
    --brand-1: #4f46e5;
    --brand-2: #7c3aed;
    --brand-3: #ec4899;
    --bg-soft: #f5f7fb;
    --card-shadow: 0 4px 6px -1px rgba(15,23,42,.06), 0 2px 4px -1px rgba(15,23,42,.04);
    --card-shadow-lg: 0 10px 30px -6px rgba(15,23,42,.10), 0 6px 12px -4px rgba(15,23,42,.06);
    --radius: 12px;
    --radius-sm: 8px;
}

body { background: var(--bg-soft); }

/* ---------- LOGIN PAGE ---------- */
.login-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
}
.login-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .45;
    pointer-events: none;
}
.login-bg-blob-1 {
    width: 480px; height: 480px;
    background: #38bdf8;
    top: -160px; left: -160px;
}
.login-bg-blob-2 {
    width: 520px; height: 520px;
    background: #fb7185;
    bottom: -180px; right: -180px;
}
.login-box {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem 2.25rem 1.75rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255,255,255,.5);
    animation: loginFadeIn .5s cubic-bezier(.16,1,.3,1);
}
@keyframes loginFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--brand-1);
}
.login-logo svg {
    padding: 12px;
    background: linear-gradient(135deg, rgba(79,70,229,.1), rgba(236,72,153,.1));
    border-radius: 16px;
    color: var(--brand-1);
}
.login-box h1 {
    color: #111827;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.25rem;
    letter-spacing: -.01em;
}
.login-subtitle {
    color: #6b7280;
    font-size: .9rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.login-foot {
    text-align: center;
    color: #9ca3af;
    font-size: .75rem;
    margin-top: 1.25rem;
}
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon svg {
    position: absolute;
    left: 12px;
    width: 18px; height: 18px;
    color: #9ca3af;
    pointer-events: none;
}
.input-with-icon input {
    padding-left: 40px !important;
}
.btn-block { display: block; width: 100%; }

/* ---------- SIDEBAR ---------- */
.sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    box-shadow: 4px 0 24px -8px rgba(0,0,0,.2);
}
.sidebar-header {
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(135deg, rgba(79,70,229,.15), rgba(236,72,153,.05));
}
.sidebar-header h2 {
    background: linear-gradient(135deg, #a5b4fc, #f9a8d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    letter-spacing: -.01em;
}
.nav-item {
    position: relative;
    border-radius: 0;
    margin: 2px 8px;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    transition: all .2s cubic-bezier(.4,0,.2,1);
}
.nav-item:hover {
    background: rgba(255,255,255,.06);
    transform: translateX(2px);
}
.nav-item.active {
    background: linear-gradient(135deg, rgba(79,70,229,.35), rgba(124,58,237,.25));
    border-left: none;
    box-shadow: 0 4px 12px -2px rgba(79,70,229,.4);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px; top: 20%; bottom: 20%;
    width: 3px;
    background: linear-gradient(180deg, #a5b4fc, #f9a8d4);
    border-radius: 0 3px 3px 0;
}
.nav-group .nav-item { padding-left: 1.25rem; }
.nav-group-items { padding: 4px 0; }

/* ---------- TOP HEADER ---------- */
.top-header {
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.top-header h1 {
    font-size: 1.375rem;
    letter-spacing: -.01em;
}

/* ---------- DASHBOARD ---------- */
.dashboard-greeting {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow-lg);
    position: relative;
    overflow: hidden;
}
.dashboard-greeting::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,.15) 0%, transparent 70%);
    border-radius: 50%;
}
.dashboard-greeting h2 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -.01em;
}
.dashboard-greeting #dashboardUserName {
    font-weight: 400;
    opacity: .85;
    margin-left: 4px;
}
.dashboard-greeting p {
    margin: 4px 0 0;
    opacity: .85;
    font-size: .95rem;
}

.stat-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform .18s ease, box-shadow .18s ease;
    border: 1px solid #eef1f5;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-lg);
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}
.stat-card .stat-icon svg {
    width: 26px; height: 26px;
    stroke-width: 2;
}
.stat-card.stat-blue .stat-icon   { background: rgba(79,70,229,.12);  color: #4f46e5; }
.stat-card.stat-green .stat-icon  { background: rgba(16,185,129,.12); color: #059669; }
.stat-card.stat-orange .stat-icon { background: rgba(245,158,11,.12); color: #d97706; }
.stat-card .stat-body h3 {
    text-transform: none;
    letter-spacing: 0;
    font-size: .85rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}
.stat-card .stat-body p {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.chart-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #eef1f5;
}
.chart-card h3 {
    font-size: .95rem;
    color: #374151;
    margin-bottom: 1rem;
    font-weight: 600;
}
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.25rem;
}

/* ---------- CARDS / CONTAINERS ---------- */
.form-container,
.salary-form-container,
.table-container {
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid #eef1f5;
}

.data-table thead th {
    background: linear-gradient(180deg, #f9fafb, #f3f4f6);
    color: #374151;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.data-table tbody tr {
    transition: background .12s;
}
.data-table tbody tr:hover {
    background: #f8faff;
}

/* ---------- BUTTONS ---------- */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all .15s cubic-bezier(.4,0,.2,1);
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0,0,0,.15);
}
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    box-shadow: 0 6px 18px -4px rgba(79,70,229,.5);
}
.btn-info {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
    border: none;
}
.btn-info:hover {
    background: linear-gradient(135deg, #0284c7, #0891b2);
    box-shadow: 0 6px 18px -4px rgba(14,165,233,.5);
}
.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}
.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
}
.btn-sm { padding: .35rem .75rem; font-size: .82rem; }

/* ---------- FORM INPUTS ---------- */
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: .625rem .875rem;
    transition: border .15s, box-shadow .15s;
    background: white;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-1);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: .875rem;
}

/* ---------- CHOICES.JS THEME OVERRIDE ---------- */
.choices { min-width: 200px; }
.choices__inner {
    border-radius: 8px !important;
    border-color: #d1d5db !important;
    background: white !important;
    padding: .375rem .5rem !important;
    min-height: 40px !important;
    font-size: .9rem;
}
/* Input placeholder di dalam multi-select: kasih min-width supaya
   'Semua karyawan / department' tidak kepotong */
.choices__input {
    min-width: 160px !important;
    background: transparent !important;
    font-size: .9rem !important;
}
/* Placeholder item (bukan input): jangan wrap tanggung */
.choices__placeholder { opacity: .55; }
.choices.is-focused .choices__inner,
.choices.is-open .choices__inner {
    border-color: var(--brand-1) !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,.12) !important;
}
.choices__list--dropdown, .choices__list[aria-expanded] {
    border-radius: 8px !important;
    border-color: #d1d5db !important;
    box-shadow: var(--card-shadow-lg) !important;
    margin-top: 4px !important;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: linear-gradient(135deg, rgba(79,70,229,.1), rgba(124,58,237,.05)) !important;
    color: #4f46e5 !important;
}
.choices__list--multiple .choices__item {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
}
.choices[data-type*="select-multiple"] .choices__button {
    filter: brightness(0) invert(1);
    opacity: .8;
    margin-left: 6px !important;
    padding-left: 10px !important;
}

/* ---------- TOAST ---------- */
.toast {
    border-radius: 10px;
    box-shadow: var(--card-shadow-lg);
    padding: 14px 20px;
    font-weight: 500;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; background-clip: padding-box; border: 2px solid transparent; }

/* ---------- ANTI TRUNCATION / OVERFLOW ---------- */
/* Sidebar menu items: nama panjang tampil full, bukan kepotong.
   Cukup 2 baris pakai clamp. */
.sidebar .nav-item {
    align-items: flex-start;
    min-height: 44px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}
.sidebar .nav-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    padding-top: 2px;
}
.sidebar .nav-icon { flex-shrink: 0; margin-top: 0; }

/* Stat card numbers: angka besar (Rp jutaan) tidak boleh kepotong */
.stat-card .stat-body {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}
.stat-card .stat-body p {
    word-break: break-word;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.stat-card .stat-body h3 {
    white-space: normal;
    line-height: 1.3;
}

/* Dashboard greeting: nama panjang wrap */
.dashboard-greeting h2 {
    word-break: break-word;
    line-height: 1.3;
}

/* Table cells: teks panjang boleh wrap tapi JANGAN pecah per huruf.
   Header pendek (NIK, PTKP, TER) harus tetap 1 baris. Pakai !important
   supaya menang atas override lain (mis. inline atau media query). */
.data-table td, .data-table th {
    vertical-align: middle;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}
.data-table th {
    white-space: nowrap !important;
    word-break: keep-all !important;
}
.data-table td .btn-sm,
.data-table td button { white-space: nowrap; }
/* Table container harus punya horizontal scroll kalau kolom banyak.
   Table sendiri width: auto agar mengembang sesuai konten header nowrap. */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-container .data-table { width: 100%; min-width: max-content; }

/* Top header user info: nama panjang tetap kelihatan */
.top-header .user-info,
#userName { white-space: normal; }

/* Choices.js: dropdown item panjang di-wrap, tidak dipotong */
.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.35 !important;
}
.choices__list--multiple .choices__item {
    white-space: normal !important;
    word-break: break-word !important;
}

/* Button dengan icon + text jangan wrap tengah kata */
.btn { white-space: normal; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .dashboard-greeting { padding: 1.25rem; }
    .dashboard-greeting h2 { font-size: 1.25rem; }
    .stat-card { padding: 1rem; }
    .stat-card .stat-icon { width: 44px; height: 44px; }
    .stat-card .stat-body p { font-size: 1.375rem; }
}

/* ========================================================================
   UI POLISH LAYER v2 — adopts mockup styling (sidebar brand, header chips,
   greeting hero, quick actions). Additive / overrides on top of v1.
   ======================================================================== */

:root {
    --brand-grad: linear-gradient(135deg, #6366f1 0%, #7c3aed 60%, #ec4899 100%);
    --brand-grad-soft: linear-gradient(135deg, rgba(99,102,241,.12), rgba(236,72,153,.10));
    --surface: #ffffff;
    --surface-2: #f5f7fb;
    --border-soft: #eef1f5;
    --text-strong: #0f172a;
    --text-mid: #475569;
    --text-muted: #94a3b8;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-strong);
    background: var(--bg-soft);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- SIDEBAR BRAND ---------- */
.sidebar-header {
    padding: 1.25rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}
.brand-mark {
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--brand-grad);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(99,102,241,.6);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { min-width: 0; line-height: 1.1; }
.brand-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .02em;
    background: linear-gradient(135deg, #c7d2fe, #f9a8d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.brand-sub {
    font-size: 0.66rem;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.24em;
    margin-top: 2px;
}

/* Sidebar section header — labelnya lebih tegas & tenang, tanpa bg hover pinky */
.nav-section-header {
    padding: 0.75rem 1.25rem 0.4rem;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.42);
    letter-spacing: 0.16em;
    background: none !important;
}
.nav-section-header:hover {
    background: none !important;
    color: rgba(255,255,255,0.7);
}
.nav-chevron { color: rgba(255,255,255,0.35); font-size: 0.6rem; }

/* ---------- TOP HEADER v2 ---------- */
.top-header {
    padding: 1rem 1.75rem;
    gap: 1rem;
}
.th-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}
.th-heading { min-width: 0; }
.th-heading h1 {
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0;
    color: var(--text-strong);
    letter-spacing: -0.01em;
    font-weight: 700;
}
.page-subtitle {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.th-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.th-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-mid);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--border-soft);
    transition: all .15s;
    cursor: default;
    white-space: nowrap;
}
.th-chip svg { width: 16px; height: 16px; color: var(--brand-1); }
.th-chip:hover { background: #fff; border-color: #dcdfe8; box-shadow: 0 4px 12px -4px rgba(15,23,42,.08); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    transition: all .15s;
}
.user-chip:hover { background: #fff; border-color: #dcdfe8; box-shadow: 0 4px 12px -4px rgba(15,23,42,.08); }
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0;
    flex-shrink: 0;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.user-meta .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.user-meta .user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ---------- DASHBOARD GREETING v2 ---------- */
.dashboard-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 18px;
    background: linear-gradient(120deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
    box-shadow: 0 20px 40px -20px rgba(79,70,229,.55);
}
.dashboard-greeting::before {
    top: -60%; right: -8%;
    width: 320px; height: 320px;
}
.greeting-content { position: relative; z-index: 2; flex: 1; min-width: 0; }
.greeting-content h2 { font-size: 1.65rem; font-weight: 700; }
.greeting-content h2 .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(14deg); } 50% { transform: rotate(-4deg); } }
.greeting-content p { margin-top: 0.4rem; opacity: 0.9; font-size: 0.95rem; max-width: 620px; }
.greeting-chips {
    display: flex; gap: 0.6rem; flex-wrap: wrap;
    margin-top: 1.1rem;
}
.greeting-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.greeting-chip svg { width: 15px; height: 15px; opacity: .9; }
.greeting-illust {
    position: relative; z-index: 2;
    flex-shrink: 0;
    width: 220px;
    display: block;
    pointer-events: none;
}
.greeting-illust svg { width: 100%; height: auto; display: block; }

/* ---------- STAT CARDS: 4-column grid + variants ---------- */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}
.stat-card { padding: 1.25rem 1.35rem; gap: 1rem; border-radius: 14px; }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: 14px; }
.stat-card .stat-icon svg { width: 22px; height: 22px; }
.stat-card.stat-indigo .stat-icon { background: rgba(99,102,241,.13); color: #6366f1; }
.stat-card.stat-blue   .stat-icon { background: rgba(59,130,246,.13); color: #3b82f6; }
.stat-card.stat-green  .stat-icon { background: rgba(16,185,129,.14); color: #10b981; }
.stat-card.stat-orange .stat-icon { background: rgba(245,158,11,.15); color: #f59e0b; }
.stat-card .stat-body p { font-size: 1.6rem; font-weight: 800; }
.stat-hint {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- CHART CARDS v2 ---------- */
.chart-card { padding: 1.35rem 1.4rem; border-radius: 14px; }
.chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.5rem;
}
.chart-head h3 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--text-strong); }
.chart-pill {
    display: inline-flex; align-items: center;
    padding: 0.28rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-mid);
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.dashboard-charts { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- QUICK ACTIONS CARD ---------- */
.quick-actions-card { display: flex; flex-direction: column; }
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}
.qa-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    transition: all .18s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
}
.qa-item:hover {
    background: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px -8px rgba(15,23,42,.14);
    transform: translateX(3px);
}
.qa-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qa-icon svg { width: 20px; height: 20px; }
.qa-icon-indigo { background: rgba(99,102,241,.13); color: #6366f1; }
.qa-icon-green  { background: rgba(16,185,129,.14); color: #10b981; }
.qa-icon-orange { background: rgba(245,158,11,.15); color: #f59e0b; }
.qa-icon-blue   { background: rgba(59,130,246,.13); color: #3b82f6; }
.qa-meta { flex: 1; min-width: 0; }
.qa-title { font-size: 0.88rem; font-weight: 600; color: var(--text-strong); }
.qa-desc { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }
.qa-arrow {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 400;
    transition: transform .18s, color .18s;
}
.qa-item:hover .qa-arrow { color: var(--brand-1); transform: translateX(3px); }

/* ---------- GLOBAL SURFACE POLISH ---------- */
.page-header {
    margin-bottom: 1.5rem;
}
.filter-section {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1rem 1.25rem;
}

/* ---------- DASHBOARD HERO v3 (compact, tanpa narasi) ---------- */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(120deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px -18px rgba(79,70,229,.6);
    flex-wrap: wrap;
}
.dashboard-hero .hero-left { min-width: 0; }
.dashboard-hero .hero-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.dashboard-hero .hero-title #dashboardUserName { font-weight: 700; }
.dashboard-hero .hero-period {
    margin-top: 3px;
    font-size: 0.78rem;
    opacity: 0.8;
    letter-spacing: 0.02em;
}
.dashboard-hero .hero-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.dashboard-hero .hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.dashboard-hero .hero-chip svg { width: 14px; height: 14px; opacity: 0.9; }

/* Sembunyikan dashboard-greeting lama kalau sempat muncul */
#dashboardPage .dashboard-greeting { display: none; }

/* ---------- DASH ROWS ---------- */
.dash-row {
    display: grid;
    gap: 1.1rem;
    margin-bottom: 1.25rem;
}
.dash-row-2 { grid-template-columns: 1fr 2fr; }
.dash-row-2-right { grid-template-columns: 1fr 1.4fr; }
@media (max-width: 960px) {
    .dash-row-2, .dash-row-2-right { grid-template-columns: 1fr; }
}

/* ---------- SUMMARY CARD ---------- */
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.summary-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 0.88rem;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list .sum-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sum-dot-indigo { background: #6366f1; }
.sum-dot-red    { background: #ef4444; }
.sum-dot-green  { background: #10b981; }
.sum-dot-blue   { background: #3b82f6; }
.summary-list .sum-label { color: var(--text-mid); flex: 1; }
.summary-list .sum-value {
    font-weight: 700;
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.summary-list .summary-foot {
    margin-top: 4px;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-soft);
    border-bottom: none;
}
.summary-list .summary-foot .sum-label { color: var(--text-muted); font-size: 0.8rem; }
.summary-list .summary-foot .sum-value { color: var(--brand-1); }

/* ---------- RECENT SLIPS ---------- */
.recent-slips {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.recent-slip-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 0.85rem;
}
.recent-slip-row .rs-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}
.recent-slip-row .rs-name {
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-slip-row .rs-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.recent-slip-row .rs-amount {
    font-weight: 700;
    color: var(--text-strong);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.recent-slip-row .rs-amount-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}
.recent-empty {
    padding: 1.5rem 0.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    background: var(--surface-2);
    border-radius: 10px;
    border: 1px dashed var(--border-soft);
}

/* ---------- STAT HINT (data-driven, boleh kosong) ---------- */
.stat-hint {
    display: block;
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-hint:empty { display: none; }

/* ---------- RESPONSIVE v2 ---------- */
@media (max-width: 900px) {
    .greeting-illust { display: none; }
}
@media (max-width: 768px) {
    .top-header { padding: 1rem 1.25rem; flex-wrap: wrap; }
    .th-right { gap: 0.5rem; }
    .th-chip { padding: 0.45rem 0.7rem; font-size: 0.75rem; }
    .th-chip-date span { display: none; }
    .user-meta .user-role { display: none; }
    .user-meta .user-name { max-width: 100px; }
    .dashboard-greeting { padding: 1.25rem 1.35rem; border-radius: 14px; }
    .greeting-content h2 { font-size: 1.25rem; }
    .greeting-content p { font-size: 0.87rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .stat-card .stat-body p { font-size: 1.25rem; }
    .dashboard-charts { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .th-heading h1 { font-size: 1.15rem; }
    .page-subtitle { font-size: 0.75rem; }
}

