/* === Salin SELURUH isi CSS dari sini === */
:root {
    --primary: #0A1435;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --text-dark: #111827;
    --text-light: #6B7280;
    --bg-page: #F0F7FF;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --purple: #8B5CF6;
    --sidebar-width: 220px;
    --shadow-soft: 0 8px 24px rgba(37, 99, 235, 0.08);
    --shadow-hover: 0 12px 32px rgba(37, 99, 235, 0.15);
    --transition-speed: 0.5s;
    --transition-fast: 0.3s;
    --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(180deg, #F0F7FF 0%, #E6EFFC 100%);
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    font-size: 14px;
}

#app {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #0F2540 0%, #091C33 100%);
    color: #E2E8F0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    background-image: 
        linear-gradient(180deg, rgba(15, 37, 64, 0.92) 0%, rgba(9, 28, 51, 0.95) 100%),
        url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_YTgPjh8yFs573qzCCJvnWJCef0n9e3jxeZtf5mkyDX8tnG1PVRRWVP0YUiwPn40_GtjLU2YjvQwN-iYe6dClkzB_024rRjaeR2667TJgBhyphenhyphenAxd09o7ZfirsJRtPWRIMGeCxfJSCezObVN-GO3wWySJarV_Vu-F_KkivBy2BgSrrCuxVMqKEbSiTWyDY/w225-h400/Pisahkan%20Gambar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sidebar.tertutup {
    transform: translateX(-100%);
}

.sidebar-brand {
    padding: 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-logo-row img {
    height: 42px;
    width: auto;
    object-fit: contain;
}
.brand-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-title-main {
    font-size: 22px;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}
.brand-title-sub {
    font-size: 13px;
    color: #94A3B8;
    font-weight: 500;
}

.brand-description {
    margin-top: 14px;
    padding: 12px 3px 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    text-align: left;
}

.brand-system-name {
    font-size: 8.5px;
    line-height: 1.6;
    font-weight: 600;
    color: #CBD5E1;
    letter-spacing: 0.35px;
}

.brand-location {
    margin-top: 6px;
    font-size: 8px;
    line-height: 1.5;
    color: #64748B;
    font-weight: 500;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}
.sidebar-menu::-webkit-scrollbar {
    width: 3px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.menu-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748B;
    padding: 12px 8px 8px;
    letter-spacing: 0.8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    margin-bottom: 2px;
    border-radius: 8px;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.menu-item i {
    width: 20px;
    font-size: 17px;
    text-align: center;
    flex-shrink: 0;
}
.menu-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #FFFFFF;
    transform: translateX(3px);
}
.menu-item.active {
    background: rgba(59, 130, 246, 0.18);
    color: #FFFFFF;
    border-left: 3px solid #3B82F6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
.menu-item-sub {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 1px;
}

/* === FOOTER SIDEBAR === */
.sidebar-footer {
    padding: 16px 12px 20px;
    border-top: 0px solid rgba(255,255,255,0.1);
    text-align: center;
    margin-top: auto; /* Selalu di bagian bawah sidebar */
}
.sidebar-footer-logo img {
    height: 150px;
    width: auto;
    margin-bottom: 8px;
    object-fit: contain;
}
.sidebar-footer-text strong {
    display: block;
    font-size: 12px;
    color: #FFFFFF;
    margin-bottom: 4px;
    font-weight: 600;
}
.sidebar-footer-text div {
    font-size: 10px;
    color: #94A3B8;
    line-height: 1.4;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: 100%;
    padding: 2rem;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.main-content.geser {
    margin-left: 0;
}

/* =========================================================
   HEADER + USER PROFILE DROPDOWN
   ========================================================= */

.top-header.premium {
    position: relative;
    z-index: 1000;

    background: linear-gradient(
        135deg,
        #0F2540 0%,
        #2563EB 50%,
        #0A1435 100%
    );

    color: white;
    padding: 1.75rem 2rem;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(15, 37, 64, 0.30);
    margin-bottom: 2rem;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 1.25rem;
    flex-wrap: wrap;

    border: 1px solid rgba(255,255,255,0.10);

    /* dropdown boleh keluar dari header */
    overflow: visible !important;
}


/* =========================
   HEADER KANAN
   ========================= */

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    position: relative;
    z-index: 1100;
}


/* =========================
   TANGGAL & JAM
   ========================= */

.tanggal-header {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    line-height: 1.4;
    text-align: right;
}

.jam-realtime {
    font-size: 10px;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
    margin-top: 2px;
}


/* =========================
   USER MENU
   ========================= */

.user-menu {
    position: relative;
    z-index: 1200;
}


/* =========================
   BUTTON PROFILE
   ========================= */

.user-profile-btn {
    height: 48px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 6px 10px 6px 8px;

    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;

    background: rgba(255,255,255,0.10);

    color: #FFFFFF;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.user-profile-btn:hover {
    background: rgba(255,255,255,0.17);
    border-color: rgba(255,255,255,0.20);
}

.user-profile-btn:active {
    transform: scale(0.98);
}


/* =========================
   AVATAR HEADER
   ========================= */
.user-menu .user-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  overflow: hidden; /* ✅ Tambahkan ini agar gambar bulat rapi */
}


/* =========================
   USER INFO HEADER
   ========================= */

.user-menu .user-info {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    min-width: 60px;

    line-height: 1.25;
}

.user-menu .user-name {
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
}

.user-menu .user-role {
    font-size: 10px;
    color: rgba(255,255,255,0.65);

    margin-top: 2px;
}


/* =========================
   CHEVRON
   ========================= */

.user-profile-btn > .fa-chevron-down {
    font-size: 10px;
    color: rgba(255,255,255,0.75);

    margin-left: 2px;

    transition: transform 0.2s ease;
}

.user-dropdown.show
~ .fa-chevron-down {
    transform: rotate(180deg);
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.user-dropdown {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    width: 220px;
    min-width: 220px;

    background: #FFFFFF;

    border: 1px solid #E2E8F0;

    border-radius: 14px;

    padding: 8px;

    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.08);

    display: none;

    z-index: 999999;

    transform-origin: top right;
}


/* Dropdown tampil */

.user-dropdown.show {
    display: block;

    animation: dropdownMasuk 0.18s ease-out;
}


@keyframes dropdownMasuk {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================
   HEADER USER DI DROPDOWN
   ========================= */

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px 11px;
}


/* Avatar dropdown */
.dropdown-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB, #3B82F6);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37,99,235,0.20);
  overflow: hidden; /* ✅ Tambahkan ini juga */
}

/* Nama user */

.dropdown-user-info strong {
    display: block;

    color: #0F172A;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.3;
}


/* Role */

.dropdown-user-info span {
    display: block;

    margin-top: 2px;

    color: #64748B;

    font-size: 11px;
}


/* =========================
   GARIS PEMISAH
   ========================= */

.dropdown-divider {
    height: 1px;

    background: #E2E8F0;

    margin: 5px 2px;
}


/* =========================
   ITEM MENU
   ========================= */

.dropdown-item {
    width: 100%;

    min-height: 38px;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 9px 10px;

    border: none;

    border-radius: 9px;

    background: transparent;

    color: #334155;

    font-size: 12px;
    font-weight: 500;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}


/* Icon */

.dropdown-item i {
    width: 18px;

    text-align: center;

    font-size: 14px;

    color: #64748B;

    flex-shrink: 0;

    transition: color 0.18s ease;
}


/* Hover */

.dropdown-item:hover {
    background: #F1F5F9;

    color: #1D4ED8;

    transform: translateX(2px);
}

.dropdown-item:hover i {
    color: #2563EB;
}


/* =========================
   LOGOUT
   ========================= */

.dropdown-item.logout-item {
    color: #DC2626;
}

.dropdown-item.logout-item i {
    color: #EF4444;
}

.dropdown-item.logout-item:hover {
    background: #FEF2F2;

    color: #B91C1C;

    transform: translateX(2px);
}

.dropdown-item.logout-item:hover i {
    color: #DC2626;
}

.header-aksi-user,
.ikon-profil,
.tombol-keluar-header {
    display: none;
}

.toggle-sidebar {
    width: 38px; 
    height: 38px; 
    border-radius: 10px;
    background: rgba(255,255,255,0.2); 
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 17px; 
    color: white; 
    transition: all 0.3s ease; 
    flex-shrink: 0;
}
.toggle-sidebar:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); }

/* === Penyelarasan Header Kiri === */
.header-left {
    display: flex;
    align-items: center;  /* Sejajar vertikal tengah dengan tombol */
    gap: 12px;            /* Jarak antara tombol dan teks */
}

.header-text h1 { 
    font-size: 22px;      /* Sedikit diperkecil agar proporsional */
    font-weight: 700; 
    color: white; 
    line-height: 1,2;       /* Tinggi baris rapat agar sejajar */
    margin: 0;
}

.stats-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 1.5rem; 
    margin-bottom: 2rem;
}
.stat-card {
    background: rgba(255,255,255,0.92); 
    backdrop-filter: blur(12px); 
    border-radius: 20px;
    padding: 1.5rem; 
    box-shadow: var(--shadow-soft); 
    display: flex; 
    align-items: center; 
    gap: 1.25rem;
    border: 1px solid rgba(255,255,255,0.7); 
    transition: all 0.3s ease;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.stat-card.blue { border-left: 4px solid var(--accent); }
.stat-card.green { border-left: 4px solid var(--success); }
.stat-card.amber { border-left: 4px solid var(--warning); }
.stat-card.purple { border-left: 4px solid var(--purple); }
.stat-icon {
    width: 56px; 
    height: 56px; 
    border-radius: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 24px; 
    color: white; 
    flex-shrink: 0;
}
.blue .stat-icon { background: linear-gradient(135deg, var(--accent) 0%, #3B82F6 100%); }
.green .stat-icon { background: linear-gradient(135deg, var(--success) 0%, #34D399 100%); }
.amber .stat-icon { background: linear-gradient(135deg, var(--warning) 0%, #FBBF24 100%); }
.purple .stat-icon { background: linear-gradient(135deg, var(--purple) 0%, #A78BFA 100%); }
.stat-value { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.stat-label { color: var(--text-light); font-size: 14px; line-height: 1.4; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.page-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
}
.breadcrumb {
    font-size: 12px;
    color: var(--text-light);
}
.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-row input,
.filter-row select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: white;
    transition: all 0.15s;
}
.filter-row input {
    width: 260px;
}
.filter-row input:focus,
.filter-row select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.btn-reset {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s;
}
.btn-reset:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.table-container {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,0.7);
    overflow: hidden;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border);
}
th {
    background: #F8FAFC;
    font-weight: 600;
    color: var(--text-light);
}
tr:hover {
    background: rgba(248,250,252,0.8);
}
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #E2E8F0;
    margin-right: 8px;
    font-size: 11px;
    color: var(--text-dark);
    font-weight: 600;
}
.role-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
.role-super { background: #EDE9FE; color: #7C3AED; }
.role-op { background: #DBEAFE; color: #1D4ED8; }
.role-ver { background: #D1FAE5; color: #047857; }
.role-staff { background: #FEF3C7; color: #B45309; }
.role-view { background: #F3F4F6; color: #4B5563; }
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
.status-aktif { background: #ECFDF5; color: #065F46; }
.status-nonaktif { background: #FEF2F2; color: #991B1B; }
.aksi-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 2px;
    font-size: 12px;
    transition: all 0.15s;
}
.aksi-btn:nth-child(1) { background: #EFF6FF; color: #2563EB; }
.aksi-btn:nth-child(2) { background: #FFFBEB; color: #D97706; }
.aksi-btn:nth-child(3) { background: #ECFDF5; color: #059669; }
.aksi-btn:nth-child(4) { background: #FEF2F2; color: #EF4444; }
.aksi-btn:hover { transform: scale(1.15); }

.table-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}
.page-nav {
    display: flex;
    gap: 4px;
}
.page-nav a {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-dark);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.page-nav a:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.page-nav a.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 53, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}
.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #FFFFFF;
    width: 100%;
    max-width: 580px;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(10, 20, 53, 0.18);
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: munculModal 0.2s ease-out;
}
@keyframes munculModal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}
.modal-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.15s;
}
.modal-close:hover { color: var(--danger); }

.modal-body {
    padding: 22px;
}

.form-dua-kolom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.form-kiri, .form-kanan {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}
.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: #FFFFFF;
    transition: all 0.15s ease;
}
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bagian-hak-akses {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.label-utama {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.grid-hak-akses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
}
.item-akses {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dark);
    cursor: pointer;
    margin: 0;
    transition: color 0.15s;
}
.item-akses:hover { color: var(--accent); }
.item-akses input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
    cursor: pointer;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.btn-batal {
    padding: 8px 18px;
    border: 1px solid var(--border);
    background: #FFFFFF;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-batal:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}
.btn-simpan {
    padding: 8px 18px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-simpan:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}

.input-grup-mata {
    position: relative;
    display: flex;
    align-items: center;
}
.input-grup-mata input {
    padding-right: 38px;
}
.btn-mata {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}
.btn-mata:hover {
    color: var(--accent);
}

@keyframes goyang {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}
.goyang {
    animation: goyang 0.35s ease;
    border-color: #EF4444 !important;
    background: #FEF2F2 !important;
}

.peringatan-atas {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 0 22px 12px;
    padding: 8px 12px;
    background: #FEE2E2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #991B1B;
    font-size: 12px;
    animation: munculPeringatan 0.2s ease-out;
}
@keyframes munculPeringatan {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.peringatan-atas i:first-child {
    color: #EF4444;
    font-size: 14px;
}
.tutup-peringatan {
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #991B1B;
    font-size: 12px;
    transition: color 0.15s;
}
.tutup-peringatan:hover {
    color: #EF4444;
}

@keyframes fadeMasuk {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-header.premium,
.stat-card,
.filter-row,
.table-container {
    opacity: 0;
    animation: fadeMasuk 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.top-header.premium { animation-delay: 0.08s; }
.stat-card:nth-child(1) { animation-delay: 0.18s; }
.stat-card:nth-child(2) { animation-delay: 0.26s; }
.stat-card:nth-child(3) { animation-delay: 0.34s; }
.stat-card:nth-child(4) { animation-delay: 0.42s; }
.filter-row { animation-delay: 0.52s; }
.table-container { animation-delay: 0.60s; }

.popup-latar {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 53, 0.55);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.popup-latar.aktif {
    display: flex;
}
.popup-kotak {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 40px 35px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 35px rgba(10, 20, 53, 0.2);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}
.popup-kotak::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    border-radius: 14px 14px 0 0;
}
.popup-kotak h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.popup-kotak h3::before {
    content: '\f2f5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
    color: var(--accent);
}
.popup-kotak p {
    color: var(--text-dark);
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 14px;
}
.popup-tombol {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.btn {
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
}
.btn-batal {
    background: #FFFFFF;
    color: var(--text-dark);
    border: 1px solid var(--border);
}
.btn-batal:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}
.btn-ya {
    background: var(--accent);
    color: white;
}
.btn-ya:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.kolom-nama {
    display: flex;
    align-items: center;
    gap: 8px;
}
/* =========================
   AVATAR DI TABEL USER
   ========================= */

.kolom-nama .user-avatar {
    width: 30px;
    height: 30px;

    min-width: 30px;

    border-radius: 50%;

    background: #E2E8F0;
    color: #1E293B;

    font-weight: 600;
    font-size: 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}
.avatar-role-gambar {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}
.teks-nama {
    line-height: 1;
}

.popup-kotak.detail-baru {
    width: 400px;
    padding: 24px 24px 18px;
    position: relative;
    border-radius: 14px;
    border-top: none;
}
.bagian-atas-detail {
    text-align: center;
    margin-bottom: 18px;
}
.avatar-bulat {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    object-fit: contain;
    background: #F1F5F9;
}
.avatar-bulat img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.nama-pengguna {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 3px;
}
.peran-pengguna {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-light);
    margin: 0 0 6px;
}
.status-badge-detail {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 500;
    background: #ECFDF5;
    color: #059669;
}
.garis-pemisah {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}
.bagian-info {
    margin-bottom: 14px;
}
.judul-bagian {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
    letter-spacing: 0.4px;
}
.grid-dua-kolom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.item-info {
    background: #F8FAFC;
    padding: 9px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.item-info label {
    font-size: 10.5px;
    color: var(--text-light);
    font-weight: 500;
}
.item-info span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
}
.daftar-hak-akses {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.tag-akses {
    padding: 4px 9px;
    background: #F1F5F9;
    border-radius: 5px;
    font-size: 10.5px;
    color: var(--text-dark);
    font-weight: 500;
}
.bagian-bawah {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.teks-login {
    font-size: 11px;
    color: var(--text-light);
    margin: 0;
}

.popup-kotak.reset-sandi {
    width: 380px;
    padding: 24px 22px 20px;
}
.popup-kotak.reset-sandi h3 {
    font-size: 16px;
    margin-bottom: 6px;
}
.popup-kotak.reset-sandi p {
    font-size: 12.5px;
    color: var(--text-light);
    margin-bottom: 16px;
}
.popup-kotak.reset-sandi .form-group {
    margin-bottom: 18px;
}
.popup-kotak.reset-sandi .form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: block;
}
.popup-kotak.reset-sandi .form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: white;
    outline: none;
    transition: all 0.15s;
}
.popup-kotak.reset-sandi .form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.popup-kotak.reset-sandi h3::before {
    content: none;
}

.btn-hapus-konfirm {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
}
.btn-hapus-konfirm:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

#popupHapusAkun .popup-kotak h3::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
    color: var(--warning);
}

@media (max-width: 992px) {
    .grid-konten { grid-template-columns: 1fr; }
    .grid-dua { grid-template-columns: 1fr; }
    .main-content { padding: 1.5rem; }
    .sidebar { transform: translateX(-100%); z-index: 999; }
    .sidebar.tertutup { transform: translateX(0); width: 220px; }
    .top-header.premium { flex-direction: column; align-items: flex-start; }
    .header-right { width: 100%; justify-content: space-between; margin-top: 0.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-body { grid-template-columns: 1fr; }
    .hak-akses-box { grid-column: 1; border-left: none; border-top: 1px solid var(--border); padding-left: 0; padding-top: 16px; }
}

@media (max-width: 640px) {
    .form-dua-kolom {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .grid-hak-akses {
        grid-template-columns: 1fr;
    }
    .modal-box {
        max-width: 94%;
    }
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .user-profile-btn .user-info {
        display: none;
    }
}   