/* ==========================================================================
   Soft Pastel Tech - Dashboard Theme
   ========================================================================== */

:root {
    /* Main Colors */
    --bg-body: #F4F7F6;
    --bg-card: #FFFFFF;
    
    /* Text Colors */
    --text-main: #2D3748;
    --text-muted: #718096;
    
    /* Sidebar (Mint Pastel) */
    --sidebar-bg: #D4EDDA;
    --sidebar-text: #1B5E20;
    --sidebar-hover: rgba(27, 94, 32, 0.08);
    --sidebar-active: rgba(27, 94, 32, 0.15);
    
    /* Accents */
    --accent-blue: #81D4FA;
    --accent-blue-dark: #4FC3F7;
    --accent-yellow: #FFF9C4;
    --accent-mint-light: #E8F5E9;
    
    /* Layout */
    --sidebar-width: 250px;
    --topbar-height: 70px;
    
    /* UI Elements */
    --radius-card: 24px; /* rounded-3xl */
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.05);
    
    --transition: 0.3s ease;
}

/* Dark Mode Variables (added via class) */
body.dark-mode {
    --bg-body: #121212;
    --bg-card: #1E1E1E;
    --text-main: #E0E0E0;
    --text-muted: #9E9E9E;
    --sidebar-bg: #1A3021;
    --sidebar-text: #81C784;
    --sidebar-hover: rgba(129, 199, 132, 0.1);
    --sidebar-active: rgba(129, 199, 132, 0.2);
    --accent-yellow: #33301B;
    --accent-mint-light: #1A261D;
    --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.15;
    transition: background-color var(--transition), color var(--transition);
}

/* Force compact text everywhere */
p, h1, h2, h3, h4, h5, h6, span, div, li, td, th {
    line-height: 1.15 !important;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 4px !important;
}

p {
    margin-bottom: 4px !important;
}

/* Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ================== SIDEBAR ================== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.sidebar-logo i {
    font-size: 42px;
    color: var(--sidebar-text);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 15px;
    border-radius: 10px;
    transition: var(--transition);
}

.nav-item i {
    font-size: 22px;
}

.nav-item:hover {
    background-color: var(--sidebar-hover);
}

.nav-item.active {
    background-color: var(--sidebar-active);
    font-weight: 600;
}

/* ================== MAIN CONTENT ================== */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ================== TOPBAR ================== */
.topbar {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background-color: transparent;
    margin-top: 10px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-menu-btn {
    display: block; /* Selalu tampil untuk minimize desktop & buka mobile */
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--accent-blue-dark);
}

/* ================== SIDEBAR COLLAPSED (DESKTOP) ================== */
body.sidebar-collapsed .sidebar {
    width: 80px;
    padding: 24px 10px;
}

body.sidebar-collapsed .nav-item span {
    display: none; /* Sembunyikan teks menu */
}

body.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

body.sidebar-collapsed .nav-item i {
    margin: 0;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: 80px;
}

.topbar-left h1 {
    font-size: 16px;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.05);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--text-main);
    transform: scale(1.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.greeting {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.user-profile img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--sidebar-bg); /* Pastel border */
    object-fit: cover;
}

/* ================== CONTENT AREA (GRID) ================== */
.content-area {
    padding: 24px 32px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Utility to span 2 columns */
.span-2 {
    grid-column: span 2;
}

/* ================== CARDS ================== */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

/* Pemberitahuan Penting Card (Yellow Accent) */
.card-warning {
    background-color: var(--accent-yellow);
}
body.dark-mode .card-warning {
    background-color: var(--bg-card);
    border-left: 6px solid #FBC02D;
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #F57F17;
}

.card-body p {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 8px;
}

.btn-action {
    align-self: flex-start;
    padding: 8px 16px;
    background-color: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background-color: rgba(0,0,0,0.02);
}

/* Stats Card (Progress Bars) */
.progress-wrapper {
    margin-bottom: 12px;
}
.mt-3 {
    margin-top: 16px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-blue-dark);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.progress-bar-fill.orange {
    background-color: #FFB74D;
}
.progress-bar-fill.green {
    background-color: #81C784;
}
.progress-bar-fill.purple {
    background-color: #BA68C8;
}
.progress-bar-fill.red {
    background-color: #FF8A65;
}

/* Schedule Card (Minimalist Table) */
.card-table {
    padding: 0;
    overflow: hidden;
}

.card-table .card-header {
    padding: 24px 24px 0 24px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}

.pastel-table {
    width: 100%;
    border-collapse: collapse;
}

.pastel-table th, 
.pastel-table td {
    padding: 12px 18px;
    text-align: left;
    font-size: 14px;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}

.pastel-table th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    background-color: var(--bg-card);
    z-index: 10;
}

.pastel-table tbody tr {
    border-bottom: 1px solid rgba(0,0,0,0.02);
}

/* Mint pastel accent row */
.pastel-table tbody tr.highlight {
    background-color: var(--accent-mint-light);
}

/* ================== DASHBOARD WIDGETS ================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue { background-color: rgba(79, 195, 247, 0.15); color: #0288D1; }
.stat-icon.green { background-color: rgba(129, 199, 132, 0.15); color: #388E3C; }
.stat-icon.orange { background-color: rgba(255, 183, 77, 0.15); color: #F57C00; }
.stat-icon.purple { background-color: rgba(186, 104, 200, 0.15); color: #7B1FA2; }

.stat-details h3 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0;
}

.stat-details p {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.dashboard-middle {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-quick {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-quick:hover {
    background-color: var(--accent-blue-dark);
    color: #FFF;
    border-color: var(--accent-blue-dark);
}

.btn-quick i {
    font-size: 18px;
}

.todo-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 2px solid rgba(255, 0, 0, 0.2);
    padding-left: 12px;
    margin-left: 8px;
}

.activity-list, .agenda-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 150, 255, 0.2);
    border-radius: 0;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-input-inline {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-main);
    padding: 0;
}

.todo-input-inline::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.btn-delete-task {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
    opacity: 0.5;
    transition: var(--transition);
}

.btn-delete-task:hover {
    opacity: 1;
}

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue-dark);
    cursor: pointer;
}

.todo-text {
    font-size: 13px;
    color: var(--text-main);
    flex: 1;
}

.todo-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.todo-badge.urgent { background-color: #ffebee; color: #d32f2f; }
.todo-badge.normal { background-color: #e8f5e9; color: #2e7d32; }

.agenda-item {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.agenda-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.agenda-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 52px;
    background-color: var(--accent-blue-dark);
    color: #fff;
    border-radius: 12px;
    font-weight: 700;
}

.agenda-date span {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.9;
}

.agenda-details h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-main);
}

.agenda-details p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-item {
    display: flex;
    gap: 12px;
    position: relative;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    z-index: 2;
    border: 2px solid var(--bg-card);
}

.activity-content {
    flex: 1;
    background-color: rgba(0,0,0,0.02);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-main);
}

.activity-content span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-line {
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: -16px;
    width: 2px;
    background-color: rgba(0,0,0,0.05);
    z-index: 1;
}

.activity-item:last-child .activity-line {
    display: none;
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .span-2 {
        grid-column: span 1;
    }
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-middle {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-width); /* Kembalikan width normal di mobile */
        padding: 24px 20px;
    }
    body.sidebar-collapsed .nav-item span {
        display: inline-block;
    }
    body.sidebar-collapsed .nav-item {
        justify-content: flex-start;
        padding: 12px 20px;
    }

/* ================== PROFILE DROPDOWN ================== */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: rgba(0,0,0,0.03);
}
body.dark-mode .dropdown-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.dropdown-item i {
    font-size: 20px;
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(0,0,0,0.05);
    margin: 5px 0;
}
body.dark-mode .dropdown-divider {
    background-color: rgba(255,255,255,0.05);
}

.text-danger {
    color: #ef4444;
}
.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.05);
}

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-md);
    }
    
    .main-wrapper, body.sidebar-collapsed .main-wrapper {
        margin-left: 0;
    }
    
    .topbar {
        padding: 0 20px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .greeting {
        display: none;
    }
}

/* ================== PROFILE DROPDOWN ================== */
.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 15px;
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: rgba(0,0,0,0.03);
}
body.dark-mode .dropdown-item:hover {
    background-color: rgba(255,255,255,0.05);
}

.dropdown-item i {
    font-size: 20px;
}

.dropdown-divider {
    height: 1px;
    background-color: rgba(0,0,0,0.05);
    margin: 5px 0;
}
body.dark-mode .dropdown-divider {
    background-color: rgba(255,255,255,0.05);
}

.text-danger {
    color: #ef4444;
}
.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.05);
}

/* Tab Navigation for Persuratan */
.tab-container {
    display: inline-flex;
    gap: 8px;
    background-color: var(--bg-body);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.tab-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: white;
    color: var(--accent-blue-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tab-btn:hover:not(.active) {
    color: var(--text-main);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Custom Print Modal Buttons */
.btn-cetak-solid {
    background-color: #4338ca !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin-left: 10px !important;
}
.btn-batal-outline {
    background-color: #ffffff !important;
    color: #4338ca !important;
    border: 1px solid #4338ca !important;
    padding: 10px 24px !important;


/* Custom Print Modal Buttons */
.btn-cetak-solid {
    background-color: #4338ca !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin-left: 10px !important;
}
.btn-batal-outline {
    background-color: #ffffff !important;
    color: #4338ca !important;
    border: 1px solid #4338ca !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
}
.swal-print-actions {
    justify-content: flex-end !important;
    padding-right: 20px !important;
    padding-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ================== PAGINATION CONTROLS ================== */
.pagination-container {
    border-top: 1px solid rgba(0,0,0,0.06);
    background-color: var(--bg-card);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    padding: 10px 18px;
}
body.dark-mode .pagination-container {
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* Baris utama: info kiri | kontrol kanan */
.pg-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Teks info */
.pg-info {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.pg-info b { color: var(--text-main); }

/* Grup kanan: Tampilkan [select] data [nav tombol] */
.pg-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.pg-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pg-select {
    height: 30px;
    padding: 0 6px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 7px;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s;
}
.pg-select:hover, .pg-select:focus { border-color: var(--accent-blue-dark); }
body.dark-mode .pg-select { border-color: rgba(255,255,255,0.12); background-color: #2a2a2a; }

/* Grup tombol nav */
.pg-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 4px;
}

/* Tombol halaman & navigasi */
.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 4px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 7px;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
body.dark-mode .pg-btn { border-color: rgba(255,255,255,0.1); }
.pg-btn:hover:not(:disabled):not(.active) {
    background: rgba(79,195,247,0.12);
    border-color: var(--accent-blue-dark);
    color: var(--accent-blue-dark);
}
.pg-btn.active {
    background: var(--accent-blue-dark);
    border-color: var(--accent-blue-dark);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79,195,247,0.3);
}
.pg-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pg-btn i { font-size: 14px; line-height: 1; }

/* Titik ellipsis */
.pg-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 30px;
    color: var(--text-muted);
    font-size: 13px;
    user-select: none;
}

/* Responsive: izinkan wrap di layar sempit */
@media (max-width: 640px) {
    .pg-bar { flex-wrap: wrap; }
    .pg-info { width: 100%; }
    .pg-right { justify-content: flex-end; width: 100%; }
}


body.dark-mode .pagination-container {
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* Three-column layout */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Left: info text */
.pagination-left {
    flex: 1;
    min-width: 140px;
}

.pagination-info-text {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pagination-info-text strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Center: nav + page buttons */
.pagination-center {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0 4px;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 14px;
    color: var(--text-muted);
    user-select: none;
}

/* Right: per-page selector */
.pagination-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: flex-end;
    min-width: 160px;
}

.pagination-perpage-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pagination-perpage-select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.pagination-perpage-select:hover {
    border-color: var(--accent-blue-dark);
}

.pagination-perpage-select:focus {
    border-color: var(--accent-blue-dark);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.15);
}

body.dark-mode .pagination-perpage-select {
    border-color: rgba(255,255,255,0.12);
    background-color: #2a2a2a;
}

/* Shared button base */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 4px;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
    font-family: inherit;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    user-select: none;
}

body.dark-mode .pagination-btn {
    border-color: rgba(255,255,255,0.1);
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background-color: rgba(79, 195, 247, 0.1);
    border-color: var(--accent-blue-dark);
    color: var(--accent-blue-dark);
}

body.dark-mode .pagination-btn:hover:not(:disabled):not(.active) {
    background-color: rgba(79, 195, 247, 0.12);
}

.pagination-btn.active {
    background-color: var(--accent-blue-dark);
    color: #fff;
    border-color: var(--accent-blue-dark);
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.35);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-btn i {
    font-size: 15px;
    line-height: 1;
}

/* Navigation buttons (first/prev/next/last) slightly narrower */
.pagination-btn.nav-btn {
    min-width: 32px;
    background-color: rgba(0,0,0,0.02);
}

body.dark-mode .pagination-btn.nav-btn {
    background-color: rgba(255,255,255,0.03);
}

/* Responsive: stack on small screens */
@media (max-width: 600px) {
    .pagination-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .pagination-right {
        justify-content: flex-start;
    }
    .pagination-center {
        flex-wrap: wrap;
    }
}
