:root {
    /* Identitas Warna Utama (Berdasarkan Navbar Gambar Anda) */
    --color-primary: #0061FF;         /* Biru vibrant agar logo tetap 'pop' */
    --color-primary-dark: #004DCF;    /* Untuk bayangan atau hover tombol */
    --color-primary-light: #F0F7FF;   /* Background menu sidebar yang sedang aktif */

    /* Latar Belakang & Permukaan */
    --color-body-bg: #F8FAFC;        /* Abu-abu sangat muda agar card putih terlihat jelas */
    --color-white: #FFFFFF;
    --color-sidebar-bg: #FFFFFF;     /* Sidebar putih seperti di gambar Anda */
    
    /* Border & Garis */
    --color-gray-border: #E2E8F0;    /* Garis tipis untuk memisahkan menu */

    /* Tipografi */
    --font-primary: 'Public Sans', sans-serif;
    --color-text-main: #0F172A;      /* Teks gelap untuk dashboard */
    --color-text-muted: #64748B;     /* Teks keterangan di sidebar */
    
    /* Aksen Logo (Kuning & Hijau Sukses) */
    --color-accent-yellow: #FACC15;  /* Kuning dari logo */
    --color-success: #10B981;        /* Hijau untuk chart 'Masuk' di gambar Anda */
    --color-danger: #EF4444;         /* Merah untuk chart 'Keluar' di gambar Anda */

    /* Layering */
    --z-navbar: 1001;
    --z-sidebar: 1000;
    --z-modal: 2000;
    --z-swal: 9999;
}

.swal2-container {
    z-index: var(--z-swal) !important;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { 
    font-family: var(--font-primary); 
    min-height: 100vh; 
    overflow: hidden;
}

body {
    background-color: var(--color-body-bg); 
    display: block;
}

/* --- Navbar Utama --- */
.navbar {
    background-color: var(--color-primary);
    color: var(--color-white);
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px; /* Mengurangi padding luar sedikit agar seimbang */
    z-index: var(--z-navbar);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0; /* Gap dinonaktifkan agar kita bisa kontrol manual */
}

/* Gambar Logo */
.domain-icon {
    height: 32px;
    width: auto;
    object-fit: contain;
    margin-right: 12px; 
    margin-left: 5px; /* Ubah ke positif agar ada jarak dari tepi layar */
}

/* --- BRANDING SIMAK ROYAL GOLD (CENTERED) --- */
.brand-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* KUNCI: Bikin semua anak elemen ke tengah */
    justify-content: center;
    line-height: 1;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 2px solid var(--color-gray-border);
}

.brand-main {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-align: center;
    display: block; /* Tambahkan ini agar text-align center bekerja maksimal */
    
    /* GRADASI EMAS METALLIC */
    background: linear-gradient(to bottom, 
        #FDE047 0%,   
        #EAB308 50%,  
        #B45309 100%
    );

    /* --- PERBAIKAN DI SINI --- */
    background-clip: text;          /* Standar W3C */
    -webkit-background-clip: text;   /* Untuk Chrome/Safari/Edge */
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback jika webkit-text-fill tidak didukung */
    
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
    font-family: var(--font-primary);
    text-transform: uppercase;
}

.brand-sub {
    font-size: 8px; /* Kecilin dikit biar nggak balapan sama SIMAK */
    font-weight: 800;
    background: var(--color-primary); 
    color: var(--color-white);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px; /* Tagline lebih lebar jarak hurufnya makin pro */
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content; /* Biar background biru ngikutin panjang teks */
    margin-top: 2px;
    box-shadow: 0 2px 4px rgba(0, 97, 255, 0.2);
}

/* --- Area Kiri (Hamburger) --- */
#sidebar-toggle { 
    cursor: pointer !important; 
    width: 45px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: var(--color-white) !important;
}

/* --- Area Kanan (Dropdown) --- */
.admin-only-flex {
    display: flex;
    flex-direction: column; /* Biar numpuk ke bawah seperti menu lainnya */
    width: 100%;
}

.dropdown { 
    position: relative; 
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 15px;
    cursor: pointer !important;
    transition: background 0.2s;
}


/* Memastikan elemen teks dan ikon di dalam dropdown tetap putih */
.dropdown .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 500;
    border: none; 
}

/* Memaksa ikon tangan pada semua elemen di dalamnya */
.dropdown *, 
.dropdown-item,
.dropdown-item * {
    cursor: pointer !important;
}

/* Panel Konten Dropdown (Login Admin) */
.dropdown-content { 
    display: none; 
    position: absolute; 
    background: var(--color-white); 
    color: var(--color-text-main); 
    min-width: 180px; 
    right: 0; 
    /* Posisi pas di bawah navbar 50px */
    top: 50px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    border-radius: 0 0 12px 12px;
    overflow: hidden; 
    z-index: 2100; 
    border: 1px solid rgba(0,0,0,0.05); 
    animation: slideDown 0.3s ease;
}

/* Menampilkan menu saat hover */
.dropdown:hover .dropdown-content { 
    display: block; 
}

.dropdown-item { 
    padding: 12px 18px; 
    color: var(--color-text-main); 
    cursor: pointer !important; 
    display: flex; 
    align-items: center; 
    font-size: 13px; 
    transition: 0.2s; 
    border-bottom: 1px solid #f1f5f9; 
}

.dropdown-item:hover { 
    background: #f1f5f9; 
    color: var(--color-primary); 
}

.dropdown-item:last-child { border-bottom: none; }

.dropdown-item i { 
    margin-right: 10px; 
    width: 16px; 
    color: #64748b; 
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.wrapper { display: flex; margin-top: 50px; margin-bottom: 0; height: calc(100vh - 50px); overflow: hidden; }

.sidebar { 
    width: 230px; 
    background-color: var(--color-sidebar-bg); 
    flex-shrink: 0; 
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: calc(100vh - 50px); /* Fill from navbar to footer */
    transition: width 0.3s ease;
    position: relative;
    z-index: 1000;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar:hover { scrollbar-width: thin; }
.sidebar:hover::-webkit-scrollbar { display: block; }
.sidebar.hidden { width: 50px; }
.sidebar.hidden:hover { width: 230px; }
.sidebar.hidden .menu-item,
.sidebar.hidden .menu-label {
    font-size: 0;
    padding: 15px 10px;
}
.sidebar.hidden:hover .menu-item {
    font-size: 12px;
    padding: 10px 20px;
}
.sidebar.hidden:hover .menu-label {
    font-size: 9px;
    padding: 10px 20px 5px;
}

/* Solderan Bantal Bawah */
.sidebar::after {
    content: "";
    display: block;
    height: 50px; /* Jarak napas yang Mas Bor mau */
    width: 100%;
    pointer-events: none; /* Biar nggak bisa diklik */
}

/* Biar pas mode hidden bantalnya nggak bikin scrollbar aneh */
.sidebar.hidden::after {
    height: 50px; 
}

.footer { 
    text-align: center; 
    padding: 15px; 
    font-size: 11px; 
    color: var(--color-text-muted); 
    border-top: 1px solid var(--color-gray-border); 
    /* Hilangkan border-left default agar tidak ada garis aneh di tengah */
    border-left: 1px solid var(--color-gray-border); 
    background-color: var(--color-white); 
    position: fixed; 
    bottom: 0; 
    left: 230px; /* Lebar default sidebar */
    right: 0; 
    z-index: 999; 
    transition: left 0.3s ease, border-left 0.3s ease;
}

/* 1. Kondisi saat sidebar ciut (hidden) */
.sidebar.hidden ~ .main-container .footer {
    left: 50px;
    border-left: none;
}

/* 2. Kondisi saat sidebar ciut TAPI sedang di-hover (sidebar melebar kembali) */
.sidebar.hidden:hover ~ .main-container .footer {
    left: 230px;
    border-left: 1px solid var(--color-gray-border);
}

body.sidebar-hidden .main-container {
    border-left: none;
}

.menu-label { 
    font-size: 9px; 
    color: #94a3b8; 
    padding: 15px 20px 5px; 
    font-weight: 700; 
    text-transform: uppercase; 
}

.menu-item { 
    display: flex; 
    align-items: center; 
    padding: 8px 20px; 
    color: var(--color-text-muted); 
    font-size: 12px; 
    cursor: pointer; 
    transition: 0.2s; 
}

.menu-item i { 
    width: 20px; 
    margin-right: 12px; 
    font-size: 14px; 
    text-align: center; 
}

.menu-item:hover { background-color: var(--color-white); color: var(--color-primary); }
.menu-item.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-left: 4px solid var(--color-primary); /* Menambah penegasan posisi user */
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white); 
    position: relative;
    border-left: 1px solid var(--color-gray-border);
}

.content-body {
    flex: 1;
    display: flex; 
    flex-direction: column; 
    align-items: stretch; 
    padding: 20px 0 100px; 
    overflow-y: auto;
    scrollbar-width: none;
    background-color: var(--color-body-bg);
}

/* Scrollbar behaviors */
.content-body::-webkit-scrollbar { display: none; }
.content-body:hover { scrollbar-width: thin; }
.content-body:hover::-webkit-scrollbar { display: block; }

/* Pusatkan semua konten utama secara konsisten */
.breadcrumb, 
.cards-area, 
.chart-container,
#data-view { 
    width: 95%; 
    max-width: 1200px; 
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Pengaturan khusus data-view */
#dashboard-view {
    display: none; /* Default sembunyi */
    flex-direction: column;
    gap: 15px; 
    width: 95%; 
    max-width: 1200px; 
    margin: 0 auto !important;
    min-height: 200px; /* Tambahkan min-height agar area load terlihat */
}

#data-view {
    display: none; /* Default sembunyi */
    flex-direction: column;
    gap: 15px; 
    width: 95%; 
    max-width: 1200px; 
    margin: 0 auto !important;
    min-height: 200px; /* Tambahkan min-height agar area load terlihat */
}

/* Pastikan table-container (tempat kartu profil masuk) terlihat */
#table-container {
    width: 100%;
    display: block;
    transition: opacity 0.15s ease-in-out; 
    will-change: opacity; /* Optimasi performa browser */
}

/* Tambahan untuk indikator loading di tengah */
.loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: rgba(255, 255, 255, 0.7); /* Memberi sedikit latar belakang transparan */
    padding: 20px;
    border-radius: 10px;
}

.breadcrumb {
    font-size: 13px;
    font-weight: 600; 
    color: var(--color-text-muted);
    margin-bottom: 25px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breadcrumb::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 10px;
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-prefix {
    font-weight: 850;
    /* Gradasi Emas Metallic agar senada dengan Logo */
    background: linear-gradient(to bottom, #FDE047, #EAB308);
    
    /* Tambahkan dua baris ini untuk kompatibilitas */
    background-clip: text; 
    -webkit-background-clip: text;
    
    -webkit-text-fill-color: transparent;
    /* Tambahan opsional: color transparan sebagai fallback */
    color: transparent; 
    
    letter-spacing: 1px;
    font-size: 14px;
}

.breadcrumb-separator {
    color: var(--color-gray-border);
    font-weight: 400;
    font-size: 12px;
}

#current-page {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cards-area {
    display: grid;
    /* Mengunci 3 kolom agar tetap sejajar */
    grid-template-columns: repeat(3, 1fr); 
    
    /* Jarak antar kartu: 25px bikin layout terlihat lebih "mahal" & lega */
    gap: 25px; 
    
    /* Margin top 10px menjaga jarak presisi di bawah SIMAK breadcrumb */
    margin-top: 10px !important; 
    
    /* Padding bottom memberi napas sebelum masuk ke area Chart */
    padding-bottom: 20px; 
    
    /* Kunci agar kartu tidak menciut dan memenuhi container pelurus */
    width: 100% !important; 
    
    /* Memastikan konten di dalam grid tetap rapi di tengah */
    justify-content: center;
}

.card { 
    background: var(--color-white);
    padding: 30px 20px; /* Saya besarkan padding atas-bawah dari 20px ke 30px */
    border-radius: 16px; 
    border: 1px solid var(--color-gray-border); 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    min-height: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    transition: transform 0.2s, box-shadow 0.2s; 
}

.card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 24px rgba(0,0,0,0.1); 
}

.card-header-minimal { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.icon-small { 
    width: 40px; 
    height: 40px; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 18px; 
    background: var(--color-primary-light); 
    color: var(--color-primary); 
}
.card-info-minimal h3 { font-size: 16px; font-weight: 700; margin: 0 0 5px 0; }
.card-info-minimal p { font-size: 12px; color: var(--color-text-muted); margin: 0; line-height: 1.4; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--color-text-main); margin: 10px 0 5px 0; }
.stat-subtext { font-size: 13px; color: var(--color-text-muted); margin: 0; }

/* Warna khusus untuk ikon di status card */
.icon-working { color: #fbbf24; }
.icon-absent { color: #ef4444; }
.icon-finished { color: #10b981; }

/* --- GLOBAL DATA CARD (Digunakan di semua menu) --- */
.table-card {
    background: var(--color-white);
    border-radius: 12px;
    border: 1px solid var(--color-gray-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 24px;
    margin-top: 5px; 
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    padding: 14px 20px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 14px 20px;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* --- KHUSUS DASHBOARD/HOME (Grafik) --- */
/* Container utama grafik */
.chart-container {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    
    /* KUNCI POSISI */
    margin-top: -10px !important; 
    /* KASIH NAPAS KE FOOTER */
    margin-bottom: 80px !important; 
    
    position: relative;
    z-index: 5; 
    width: 100%;
}

/* Area Canvas - BIAR STABIL */
.placeholder-chart { 
    width: 100%; 
    height: 280px; /* Sedikit lebih lega agar label bawah grafik gak kepotong */
    position: relative; 
    background: transparent;
    display: block;
    overflow: hidden; 
}

/* Tambahan biar Chart Header lebih modern */
.chart-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   FINAL OPTIMIZED MODAL SYSTEM
   ============================================================ */

/* 1. Base Modal (Berlaku Global) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); 
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal, 2000); 
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-overlay.open {
    display: flex; 
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--color-white, #fff);
    padding: 30px; /* Padding standar untuk semua modal */
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto; 
    border: 1px solid var(--color-gray-border);
    scrollbar-width: none; 
    -ms-overflow-style: none;
    animation: slideUp 0.3s ease;
}

.modal-content::-webkit-scrollbar { display: none; }

/* 2. Spesifik Edit Profil */
#editProfileModal .modal-content {
    max-width: 650px; 
    font-family: var(--font-primary);
}

/* Header & Photo */
.profile-modal-header { text-align: center; margin-bottom: 20px; }

.photo-preview-container {
    position: relative;
    width: 100px; height: 100px;
    margin: 0 auto 15px;
}

#edit-foto-preview {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-success, #10b981);
}

.btn-edit-photo {
    position: absolute;
    bottom: 0; right: 0;
    background: var(--color-success, #10b981);
    color: white;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
    cursor: pointer;
}

/* Form & Inputs */
#editProfileModal .form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 20px; /* Jarak vertikal diperkecil sesuai kode Anda */
}

#editProfileModal .input-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 5px;
    text-align: left;
}

#editProfileModal label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
}

#editProfileModal input, 
#editProfileModal select, 
#editProfileModal textarea {
    padding: 12px 15px;
    border: 1px solid var(--color-gray-border);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    width: 100%;
}

#editProfileModal input:focus, 
#editProfileModal select:focus, 
#editProfileModal textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 97, 255, 0.1);
}

#editProfileModal input[readonly] {
    background: var(--color-body-bg, #f1f5f9);
    color: var(--color-text-muted);
    cursor: not-allowed;
}

/* Tombol-Tombol */
.btn-save-profile {
    width: 100%;
    padding: 14px;
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-top: 15px;
    transition: filter 0.2s;
}

.btn-save-profile:hover { filter: brightness(0.9); }

.btn-close-modal {
    position: absolute;
    top: 15px; right: 15px;
    width: 38px; height: 38px;
    background: #dbeafe;
    color: #2563eb;
    border: none;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.btn-close-modal:hover {
    transform: rotate(180deg);
    background: #bfdbfe;
    color: #1d4ed8;
}

/* 3. Animasi */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- MODAL LOGIN ADMIN & GANTI PASSWORD --- */
/* MODAL GANTI PASSWORD (Tetap Blur & Transparan) */
#changePasswordModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55); /* Hitam transparan */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(4px); /* Efek blur dashboard */
}

/* MODAL LOGIN (Putih Solid Menutupi Dashboard) */
#adminLoginModal {
  position: fixed;
  inset: 0;
  background: #FFFFFF; /* Putih bersih 100% */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Pastikan menutupi segalanya */
  /* Tanpa backdrop-filter agar tidak berat */
}

/* 2. Animasi Muncul */
#adminLoginModal.open,
#changePasswordModal.open {
  display: flex;
  animation: fadeIn .3s ease forwards;
}

/* Cari bagian /* 3. Konten Kartu (Card) */

#changePasswordModal .modal-content {
  background: var(--color-white);
  max-width: 420px;
  padding: 32px 28px 28px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  animation: slideUp .35s ease;
}

#adminLoginModal .modal-content {
  background: var(--color-white);
  max-width: 400px;
  padding: 32px;
  /* Kita hilangkan shadow atau tipiskan saja agar tetap terlihat elegan di atas putih */
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.04);
  border-radius: 20px;
  animation: fadeIn .5s ease; /* Pake fade in aja biar smooth */
}

/* 4. Styling Icon */
.admin-login-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  font-size: 28px;
}

/* Icon khusus Ganti Password dengan Animasi Shake */
#changePasswordModal .admin-login-icon {
  background: #f39c12;
  animation: key-shake 3s infinite; /* Memanggil keyframe di bawah */
}

/* 5. Typography - Paksa Center di Semua Layar */
#adminLoginModal h3,
#changePasswordModal h3 {
  margin: 6px auto 4px !important;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center !important;
  display: block; /* Pastikan dia makan ruang satu baris penuh */
  width: 100%;
}

#adminLoginModal .subtitle,
#changePasswordModal .subtitle {
  margin: 0 auto 24px !important;
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center !important;
  display: block;
  width: 100%;
}

/* 6. Form & Input Layout */
#admin-login-form,
#change-password-form {
  text-align: left;
}

#admin-login-form label,
#change-password-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 6px;
  display: block;
}

.input-group {
  position: relative;
  margin-bottom: 18px;
}

.input-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 15px;
}

#change-password-form .input-group i {
  color: #f39c12;
}

#admin-login-form input,
#change-password-form input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: 12px;
  border: 1px solid var(--color-gray-border);
  background: var(--color-gray-light);
  font-size: 14px;
  outline: none;
  transition: all .2s ease;
}

#admin-login-form input:focus {
  border-color: var(--color-primary);
  background: var(--color-white);
}

#change-password-form input:focus {
  border-color: #f39c12;
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15);
}

/* 7. Tombol Submit (Login - Biru) */
#admin-login-form .btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
}

#admin-login-form .btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(12, 77, 110, 0.3);
}

/* 8. Tombol Submit (Change Password - Oranye) */
#change-password-form .btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: var(--color-white);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
}

#change-password-form .btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(243, 156, 18, 0.4);
}

/* Efek saat diklik untuk kedua tombol */
#admin-login-form .btn-primary:active,
#change-password-form .btn-primary:active {
  transform: scale(0.97);
}

/* 9. Modal Actions (Tombol Batal) */
/* .modal-actions {
  margin-top: 16px;
  text-align: center;
}

.modal-actions button {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-actions button:hover {
  text-decoration: underline;
  color: var(--color-primary);
} */

/* 10. Keyframes Animasi */
@keyframes fadeIn { 
  from { opacity: 0; } 
  to { opacity: 1; } 
}

@keyframes slideUp { 
  from { transform: translateY(28px); opacity: 0; } 
  to { transform: translateY(0); opacity: 1; } 
}

@keyframes key-shake {
  0%, 90%, 100% { transform: rotate(0); }
  92% { transform: rotate(-15deg); }
  95% { transform: rotate(15deg); }
  97% { transform: rotate(-15deg); }
}

/* 11. Styling Khusus Link Lupa Password (Identik dengan Tombol Batal) */
.btn-link-forgot {
  font-size: 12px;
  color: var(--color-text-muted); /* Warna awal sama dengan Batal */
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

/* Hover: Identik dengan .modal-actions button:hover */
.btn-link-forgot:hover {
  text-decoration: underline;
  color: var(--color-primary); /* Berubah menjadi biru primer saat disorot */
  text-underline-offset: 3px;
}

/* Efek saat diklik */
.btn-link-forgot:active {
  transform: scale(0.98);
}

/* --- CSS PROFIL USER --- */
.profile-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--color-gray-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--color-body-bg);
    margin-bottom: 30px;
}

.profile-avatar i {
    font-size: 80px;
    color: var(--color-primary);
}

.profile-main-info h2 {
    font-size: 28px;
    color: var(--color-text-main);
    margin-bottom: 5px;
}

.badge-role {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item p {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-main);
}

/* Spesifik untuk Menu Setup Lembaga - Enterprise Sticky Mode */
#lembaga-setup-container {
    padding: 10px 0 20px 0;
    /* max-width dihapus agar sejajar dengan breadcrumb di kiri */
    width: 100%; 
    margin: 0; 
}

#lembaga-setup-container .table-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Tinggi maksimal agar header & footer tetap terlihat (sticky) */
    max-height: calc(100vh - 170px); 
}

#lembaga-setup-container .scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 10px 5px;
}

#lembaga-setup-container .enterprise-table {
    width: 100%;
    border-collapse: collapse;
}

#lembaga-setup-container .enterprise-table td {
    padding: 12px 20px; /* Padding disesuaikan agar terlihat lebih lega seperti Saldo Awal */
    border-bottom: 1px solid #f1f5f9;
}

#lembaga-setup-container .label-cell {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    background: #fcfdfe;
    width: 25%; /* Lebar label diperkecil sedikit */
}

#lembaga-setup-container .modern-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc; /* Warna background input lembut */
    font-size: 13px;
    transition: all 0.2s;
    box-sizing: border-box;
}

#lembaga-setup-container .modern-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    outline: none;
    background: #fff;
}

@media print {
    /* Sembunyikan elemen yang tidak perlu dicetak */
    #sidebar, .navbar, .btn-action, .filter-section, .pagination, .aksi-column {
        display: none !important;
    }

    /* Pastikan tabel memenuhi halaman kertas */
    .active-page, .container-fluid {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th, td {
        border: 1px solid #333 !important;
        color: #000 !important;
        padding: 5px !important;
        font-size: 9pt !important;
    }

    /* Paksa logo atau judul muncul di setiap halaman jika perlu */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
    }
}

/* --- STEP 1: MODAL SELECTION CARDS --- */
.step1-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px 0;
}

.btn-mode {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid var(--color-gray-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-white);
    text-align: left;
}

.btn-mode:hover {
    border-color: var(--color-success);
    background: var(--color-primary-light); /* Pakai biru sangat muda saat hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-mode i {
    font-size: 24px;
    margin-right: 18px;
    color: var(--color-success); /* Hijau aksen dari logo */
    width: 30px;
    text-align: center;
}

.btn-mode-text {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Memberikan jarak agar tidak dempet dengan deskripsi */
}

.btn-mode-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-text-main);
}

.btn-mode-desc {
    font-size: 12.5px;
    color: var(--color-text-muted);
    line-height: 1.5; /* Spasi antar baris deskripsi agar lebih bersih */
}

/* --- STEP 2: OPTIONS B (SNAPSHOT) --- */
#container-opsi-b {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px 5px;
    text-align: left;
}

.swal-select-group {
    display: flex;
    gap: 10px;
}

.modern-select {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid var(--color-gray-border);
    background: var(--color-white);
    font-size: 14px;
    color: var(--color-text-main);
    cursor: pointer;
    transition: border-color 0.3s;
}

.modern-select:focus {
    outline: none;
    border-color: var(--color-success);
}

.radio-box {
    border: 1px solid var(--color-gray-border);
    border-radius: 12px;
    background: var(--color-body-bg); /* Pakai abu-abu muda dashboard */
    padding: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 6px;
    border-radius: 10px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.radio-item:hover {
    background: var(--color-primary-light);
    border-color: var(--color-success);
}

.radio-item span {
    font-size: 14px;
    color: var(--color-text-main);
    font-weight: 500;
}

.radio-item input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-text-muted);
    border-radius: 50%;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    background: var(--color-white);
    flex-shrink: 0;
}

.radio-item input[type="radio"]:checked {
    border-color: var(--color-success);
    background: var(--color-success);
}

.radio-item input[type="radio"]:checked::after {
    content: '';
    width: 8px; height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================================
   ENTERPRISE BATCH INPUT SYSTEM - FULL VERSION
   ============================================================ */

/* 1. CONTAINER UTAMA & MODAL SYSTEM */
#batchInputModal {
    position: fixed;
    inset: 0;
    background: #f8fafc;
    z-index: 9999;
    display: none;
    flex-direction: column;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#batchInputModal .modal-header-full {
    background: #ffffff;
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#batchInputModal .modal-header-full h2 {
    letter-spacing: -0.025em;
    color: #0f172a;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
}

#batchInputModal .modal-body-full {
    flex: 1;
    overflow: auto;
    padding: 1.5rem 2.5rem;
}

/* 2. TABLE SYSTEM (GRID ENTERPRISE) */
#batchInputModal .batch-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Tabel (Sticky, Bold, & Blue Accent) */
#batchInputModal .batch-table thead th {
    background: #e2e681;
    color: #0d5ccc;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 16px 12px;
    position: sticky;
    top: -1px;
    z-index: 50;
    border-bottom: 2px solid #3b82f6;
    border-right: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Baris & Sel */
#batchInputModal .grid-row td {
    height: 50px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    vertical-align: middle;
    transition: all 0.2s;
}

#batchInputModal .grid-row:hover { background: #fafafa; }

/* Indikator Baris Aktif */
#batchInputModal .grid-row:focus-within {
    background: #f0f9ff !important;
    box-shadow: inset 3px 0 0 #3b82f6;
}

/* 3. ALIGNMENT & ACTION COLUMN (Pusat Presisi) */
#batchInputModal .batch-table th:first-child, 
#batchInputModal .batch-table td:first-child {
    width: 55px;
    text-align: center !important;
}

/* PAKSA TANGGAL TERLIHAT SEMPURNA */
#batchInputModal .batch-table th:nth-child(2),
#batchInputModal .batch-table td:nth-child(2) {
    width: 98px !important; /* Tambah lebar agar format DD/MM/YYYY muat */
    min-width: 98px !important;
}

#batchInputModal .action-cell-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100%;
    width: 100%;
    margin: 0 auto;
}

/* 4. INPUT ELEMENTS STYLING */
#batchInputModal .grid-input {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid transparent !important;
    background: transparent;
    font-size: 14px;
    color: #334155;
    outline: none !important;
}

#batchInputModal .grid-input:focus {
    background: white !important;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px #3b82f6 !important;
}

/* Warna Kolom Transaksi */
#batchInputModal .col-debet { background: #f0fdf480; font-weight: 600; }
#batchInputModal .col-kredit { background: #fef2f280; font-weight: 600; }

#batchInputModal .text-right { text-align: right !important; padding-right: 15px; }

/* Spinner Hider (Penting buat Input Angka) */
#batchInputModal input::-webkit-outer-spin-button,
#batchInputModal input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 5. ANIMASI & HEADER BUTTONS */
.modal-header-full .btn-close-header {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.modal-header-full .btn-close-header:hover {
    color: #ef4444;
    background: #fef2f2;
    transform: rotate(180deg); /* Animasi muter andalan Mas Bro */
}

/* 6. FOOTER & SUMMARY CARD */
#batch-footer-action {
    background: white;
    padding: 1.25rem 2.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    bottom: 0;
}

#batchInputModal .summary-box {
    display: flex;
    gap: 2.5rem;
    background: #f8fafc;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

#batchInputModal .summary-item { display: flex; flex-direction: column; }
#batchInputModal .label-sm { font-size: 10px; font-weight: 800; color: #94a3b8; text-transform: uppercase; }
#batchInputModal .value-md { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }

#total-debet-display { color: #10b981 !important; }
#total-kredit-display { color: #ef4444 !important; }

/* 7. ACTION BUTTONS (Enterprise Style) */
.btn-save-main, .btn-update-enterprise {
    background: #10b981;
    color: white;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-save-main:hover { background: #059669; transform: translateY(-1px); }

.btn-cancel-enterprise {
    background: #f1f5f9;
    color: #475569;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    margin-right: 10px;
}

.btn-cancel-enterprise:hover { background: #e2e8f0; color: #0f172a; }

/* UTILS */
.btn-delete { color: #94a3b8; background: none; border: none; cursor: pointer; transition: color 0.2s; }
.btn-delete:hover { color: #ef4444; }

/* TOMBOL TAMBAH BARIS (F2) REFACTOR */
#btn-add-row-action {
    background: #ffffff;
    color: #2563eb;
    border: 2px dashed #cbd5e1;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

#btn-add-row-action:hover {
    border-color: #2563eb;
    background: #f8fafc;
    color: #1d4ed8;
}

/* TOMBOL MODE RESTORE */
.btn-sadis { 
    background: #fee2e2 !important; 
    color: #dc2626 !important; 
    border: 1px solid #fecaca !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-sadis:hover { background: #dc2626 !important; color: white !important; }

.btn-mulia { 
    background: #dcfce7 !important; 
    color: #166534 !important; 
    border: 1px solid #bbf7d0 !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-mulia:hover { background: #166534 !important; color: white !important; }

/* TOMBOL BATAL UNIVERSAL */
.btn-close-modal-bawah {
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-modal-bawah:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Container Utama Footer */
.modal-footer-sticky {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 2px solid #e2e8f0;
    padding: 12px 20px;
    z-index: 10;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Box Kecil untuk Lampiran PDF */
.flex.items-center.space-x-3.bg-gray-100 {
    background-color: #f1f5f9; /* Abu-abu muda clean */
    border: 1px solid #cbd5e1;
    transition: all 0.3s ease;
    min-width: 250px;
}

.flex.items-center.space-x-3.bg-gray-100:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Label Animasi Upload */
#label-pdf-transaksi {
    display: inline-block;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* Warna khusus jika file sudah masuk (lewat JS nanti) */
.text-green-600 {
    color: #16a34a !important;
    font-weight: bold;
}

/* Penyesuaian Tabel agar tidak tertutup footer */
.modal-body-full {
    padding-bottom: 20px;
}
/* PRESENSI*/

@media print {
    body { background: white !important; padding: 0 !important; }
    .no-print { display: none !important; } /* Sembunyikan tombol & search bar */
    .print-area { width: 100%; border: none !important; box-shadow: none !important; }
    table { page-break-inside: auto; width: 100%; border: 1px solid #000 !important; }
    tr { page-break-inside: avoid; page-break-after: auto; }
    thead { display: table-header-group; } /* Biar header tabel muncul di setiap halaman */
}

.btn-izin {
        width: 100%; 
        background: #f8fafc; 
        color: #475569; 
        border: 2px solid #e2e8f0; 
        padding: 12px; 
        border-radius: 15px; 
        font-weight: 800; 
        font-size: 12px; 
        cursor: pointer; 
        transition: all 0.2s ease;
    }
    .btn-izin:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
        transform: translateY(-1px);
    }
    .btn-izin:active {
        transform: translateY(0);
    }

/* --- ENTERPRISE COMPACT FINAL --- */

.modal-presensi-container {
    text-align: left;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
}

/* 1. Header & Preview Cards (Dibuat lebih compact) */
.info-karyawan-card, .tgl-preview-container {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    border: 1px solid;
    padding: 10px 14px;
    margin-bottom: 12px; /* Margin dipersempit */
}

.info-karyawan-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #e2e8f0;
}

.tgl-preview-container {
    background: #f0f7ff;
    border-color: #bae6fd;
}

/* 2. Typography di dalam Cards */
.avatar-placeholder {
    width: 38px; height: 38px;
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: bold;
}

.user-meta .name { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0; }
.user-meta .id-badge { font-size: 10px; color: #64748b; background: #e2e8f0; padding: 1px 6px; border-radius: 4px; margin-top: 2px; display: inline-block; font-family: monospace; }

.tgl-preview-icon { font-size: 20px; color: #0284c7; }
.tgl-preview-text .label-kecil { font-size: 9px; color: #0369a1; text-transform: uppercase; font-weight: 700; display: block; }
.tgl-preview-text .tgl-besar { font-size: 14px; font-weight: 700; color: #0c4a6e; }

/* 3. Form Elements (Global Style untuk Input & Select) */
.modal-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}

/* Gabungkan selector agar tidak redundant */
.swal-custom-input, .swal-custom-textarea {
    width: 100% !important;
    font-size: 13px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    margin: 0 0 10px 0 !important; /* Spasi antar field seragam */
}

.swal-custom-input { height: 38px !important; }
.swal-custom-textarea { padding: 8px 12px !important; font-family: inherit !important; resize: none; }

.swal-custom-input:focus, .swal-custom-textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* 4. Layout Grid */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 5. Section Lokasi (Footer) */
.separator {
    height: 1px;
    background: #e2e8f0;
    margin: 15px 0;
    position: relative;
}
.separator::after {
    content: 'Data Lokasi';
    position: absolute;
    top: -8px; left: 15px;
    background: #fff; padding: 0 8px;
    font-size: 9px; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.tikor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tikor-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px; font-family: 'JetBrains Mono', monospace;
    text-decoration: none; transition: 0.2s;
}

/* Button variants */
.tikor-btn { background: #fdf2f2; border: 1px solid #fee2e2; color: #991b1b; }
.tikor-btn:hover { background: #fecaca; }
.tikor-btn.out { background: #f0fdf4; border: 1px solid #dcfce7; color: #166534; }
.tikor-btn.out:hover { background: #dcfce7; }

/* =========================================
   MODAL REGISTER - ENTERPRISE VERSION (FIXED)
   ========================================= */
.auth-wrapper {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    z-index: 1500;
    display: none;
}

#registerModal {
    position: fixed;
    inset: 0;
    background: #FFFFFF;
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow-y: auto;
}

#registerModal.open {
    display: flex;
    animation: fadeIn 0.3s ease-out forwards;
}

#registerModalContent {
    background: #FFFFFF;
    width: 100%;
    max-width: 600px;
    margin: 20px;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.register-header {
    text-align: center;
    margin-bottom: 30px;
}

.register-icon-circle {
    width: 72px;
    height: 72px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 15px;
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.2);
}

#registerModalContent h3 {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 5px;
}

#registerModalContent .subtitle {
    color: #6b7280;
    font-size: 14px;
}

/* 4. Grid System - DIBERSIHKAN AGAR SIMETRIS */
.reg-form-grid {
    display: grid;
    /* KUNCI 1: minmax(0, 1fr) agar kolom tidak melar karena isi dropdown */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
    gap: 15px 20px;
}

.span-full {
    grid-column: span 2;
}

.form-group-reg {
    display: flex;
    flex-direction: column;
    /* KUNCI 2: Mencegah elemen dalam kolom mendorong lebar grid */
    min-width: 0; 
}

.form-group-reg label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group-reg label i {
    color: #10b981;
    font-size: 12px;
}

.form-group-reg input, 
.form-group-reg select, 
.form-group-reg textarea {
    width: 100%;
    /* KUNCI 3: Box-sizing agar padding tidak menambah lebar */
    box-sizing: border-box; 
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.2s ease;
}

.form-group-reg input:focus, 
.form-group-reg select:focus, 
.form-group-reg textarea:focus {
    outline: none;
    border-color: #10b981;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.reg-actions {
    margin-top: 30px;
    display: flex;
    gap: 12px;
}

.btn-reg-submit {
    flex: 2;
    background: #10b981;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;    justify-content: center;
    gap: 8px;
}

.btn-reg-submit:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.2);
}

.btn-reg-cancel {
    flex: 1;
    background: #ffffff;
    color: #6b7280;
    padding: 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reg-cancel:hover {
    background: #f3f4f6;
    color: #374151;
}

.swal2-container {
    z-index: 10001 !important;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- FORMULA PELURUS DASHBOARD --- */

#dashboard-alignment-wrapper {
    /* Samakan persis dengan container breadcrumb & table-card */
    width: 95% !important;
    max-width: 1200px !important;
    margin: 0 auto !important; /* KUNCI: Mengetengahkan container */
    padding: 0 !important;
    margin-bottom: 50px !important;
}

/* Container Modal Utama */
#modalTambahBarang {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7); /* Biru gelap transparan khas enterprise */
    backdrop-filter: blur(4px); /* Efek blur di belakang modal */
    z-index: 9999;
    display: none; /* Dikontrol via toggleModalTambahBarang(show) */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Membuat Modal Benar-benar di Tengah */
#modalTambahBarang.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5); /* Overlay gelap di belakang */
    backdrop-filter: blur(4px); /* Efek blur estetik */
    opacity: 1;
}

/* Kotak Modal */
#modalTambahBarang .modal-content {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
}

/* Header */
#modalTambahBarang .modal-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 20px 24px;
    border: none;
}

#modalTambahBarang .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styling */
#modalTambahBarang .modal-body {
    padding: 24px;
}

#modalTambahBarang label {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
    display: block;
}

#modalTambahBarang .form-control {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

#modalTambahBarang .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: #fff;
}

/* Tombol */
#modalTambahBarang .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
}

#modalTambahBarang .btn-primary {
    background: #2563eb;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

#modalTambahBarang .btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
}

/* Animasi biar modal munculnya halus */
@keyframes modalZoom {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#modalTambahBarang[style*="display: flex"] .modal-content {
    animation: modalZoom 0.2s ease-out;
}


/* Container Modal Stok Masuk - Full Screen Support */
/* Container Utama - Center Flex */
#modalStokMasuk {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center; /* Vertikal tengah */
    justify-content: center; /* Horisontal tengah */
}

/* Kotak Modal - Dibuat Hampir Full Layar */
#modalStokMasuk .modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 98vw; /* Hampir selebar layar */
    max-width: 1400px; /* Tapi tetap ada batas maksimal biar gak pecah di monitor ultra-wide */
    height: 95vh; /* Hampir setinggi layar */
    display: flex;
    flex-direction: column; /* Biar header, body, footer bisa dipisah */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Modal Body - Ini yang harus bisa scroll kalau barangnya banyak */
#modalStokMasuk .modal-body {
    flex: 1; /* Ambil sisa ruang yang ada */
    overflow-y: auto; /* Scroll vertikal aktif di sini saja */
    padding: 24px;
    background: #f8fafc;
}

/* Header & Footer Tetap di Tempat (Sticky) */
#modalStokMasuk .modal-header {
    padding: 16px 24px;
    flex-shrink: 0;
}
#modalStokMasuk .modal-footer {
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Lebar Input biar pas di layar lebar */
.grid-input {
    font-size: 14px;
    width: 100%;
    height: 38px !important; /* Paksa tinggi yang sama untuk semua! */
    border: 1px solid #cbd5e1 !important;
    padding: 0 10px !important; /* Padding atas bawah kita nol-kan biar gak narik tinggi */
    border-radius: 6px;
    background-color: #ffffff;
    line-height: 38px; /* Biar teks di tengah secara vertikal */
    box-sizing: border-box; /* Sangat penting biar padding gak nambah tinggi */
    text-indent: 5px; 
}

/* Kolom Satuan & Subtotal (Readonly) */
.grid-input.input-readonly {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569;
    font-weight: 600;
}

/* Baris yang lagi diketik dikasih highlight tipis */
#tabel-batch-stok-masuk tr:focus-within {
    background-color: #f0fdf4 !important; /* Hijau sangat muda */
    transition: background 0.2s;
}

/* --- FOOTER ENTERPRISE STYLE --- */
.modal-footer-sticky {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-top: 2px solid #f1f5f9;
    padding: 15px 24px;
    min-height: 90px;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* Container Kiri: Total & PDF */
.footer-left-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Box Summary (Debet/Kredit) */
.summary-box {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.summary-item {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.label-sm {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.value-md {
    font-size: 18px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace; /* Biar angka lurus */
}

.pdf-upload-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    border: 2px dashed #cbd5e1; /* Border putus-putus sesuai gambar */
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 260px;
}

.pdf-upload-container:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

/* Lingkaran Ikon PDF Merah */
.pdf-icon-circle {
    width: 40px;
    height: 40px;
    background: #fee2e2; /* Merah muda lembut */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626; /* Merah PDF solid */
    flex-shrink: 0;
}

/* Wrapper Teks */
.pdf-text-wrapper {
    display: flex;
    flex-direction: column;
    pointer-events: none; /* Biar klik tembus ke label/input */
}

.pdf-label-top {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#label-pdf-transaksi {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb; /* Biru sesuai gambar Mas Bro */
}

/* SEMBUNYIKAN INPUT ASLI TOTAL */
#pdf_transaksi {
    display: none !important;
}

/* Button Group Kanan */
.footer-right-group {
    display: flex;
    gap: 12px;
}

/* ============================================================
   ULTIMATE BATCH STOK KELUAR - MASTERPIECE LIGHT EDITION
   Fokus: Anti-Lelah, High Readability, Border-Less
   ============================================================ */

/* 1. CONTAINER UTAMA (Overlay Terang Soft) */
#modalStokKeluar {
    position: fixed;
    inset: 0;
    background: rgba(241, 245, 249, 0.9); /* Latar belakang abu-abu sangat muda soft */
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

/* 2. KOTAK MODAL (Putih Bersih) */
#modalStokKeluar .modal-content-enterprise {
    background: #ffffff;
    width: 100%;
    max-width: 1400px;
    height: 95vh;
    margin: auto;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1); /* Shadow lembut, bukan gelap pekat */
    border: 1px solid #e2e8f0;
}

/* 3. HEADER (Biru Profesional - Bukan Gelap) */
#modalStokKeluar .modal-header-full {
    background: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3b82f6; /* Garis bawah biru sebagai aksen */
}

#modalStokKeluar .modal-header-full h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#modalStokKeluar .modal-header-full h2 i {
    color: #3b82f6;
}

#modalStokKeluar .btn-close-header {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

#modalStokKeluar .btn-close-header:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* 4. BODY & TABEL (Clean & Airy) */
#modalStokKeluar .modal-body-full {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    background: #ffffff;
}

#modalStokKeluar .batch-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Header Tabel Rata Kanan-Kiri Sesuai Fungsi */
#modalStokKeluar .batch-table thead th {
    text-align: left;
    padding: 12px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc; /* Sedikit kontras untuk area header */
    position: sticky;
    top: 0;
}

/* Penyesuaian Lebar & Align Kolom */
#modalStokKeluar .batch-table th:nth-child(1) { width: 120px; } 
#modalStokKeluar .batch-table th:nth-child(2) { width: 130px; }
#modalStokKeluar .batch-table th:nth-child(3) { width: 180px; }
#modalStokKeluar .batch-table th:nth-child(4) { width: auto;  }
#modalStokKeluar .batch-table th:nth-child(5) { width: 90px; text-align: center; } /* Satuan */
#modalStokKeluar .batch-table th:nth-child(6) { width: 100px; text-align: center; } /* Volume */
#modalStokKeluar .batch-table th:nth-child(7) { width: 50px; text-align: center; }

/* Baris Data */
#modalStokKeluar .grid-row td {
    border-bottom: 1px solid #f1f5f9;
    padding: 0;
}

#modalStokKeluar .grid-row:hover {
    background-color: #f0f7ff; /* Highlight biru muda saat hover */
}

/* 5. INPUTAN (Fokus pada Readability) */
#modalStokKeluar .grid-input {
    width: 100%;
    padding: 12px 10px;
    border: none !important;
    background: transparent;
    font-size: 14px;
    color: #334155;
    outline: none !important;
}

#modalStokKeluar .grid-input:focus {
    background: #ffffff !important;
    box-shadow: inset 0 -2px 0 #3b82f6 !important; /* Indikator fokus bawah */
}

/* Kolom Satuan (Read Only Style) */
#modalStokKeluar .col-readonly {
    background: #f8fafc;
    color: #94a3b8;
}

/* Kolom Volume (Aksen Soft) */
#modalStokKeluar .col-volume-master {
    background: #f0fdf4 !important; /* Hijau pucat yang tidak silau */
}

#modalStokKeluar .col-volume-master input {
    color: #15803d !important;
    font-weight: 800 !important;
    text-align: center;
}

/* 6. FOOTER & BUTTONS */
#modalStokKeluar #batch-footer-action {
    background: #f8fafc;
    padding: 1rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-save-main {
    background: #3b82f6;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
    transition: all 0.2s;
}

.btn-save-main:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-delete-master {
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.btn-delete-master:hover {
    color: #ef4444;
}

/* ============================================================
   MOBILE OVERRIDE (Max 768px)
   Target: Layout Responsive, No Whitespace, Scroll Lancar
   ============================================================ */

@media (max-width: 768px) {
    /* 1. Reset Global - Aktifkan Scroll & Matikan Kunci Tinggi */
    html, body { 
        height: auto !important; 
        margin: 0;
        padding: 0;
        overflow-x: hidden !important;
        overflow-y: auto !important; 
    }
    
    body { 
        display: block !important; 
        padding-top: 50px !important; /* Sesuaikan tinggi Navbar agar rapat */
    } 

    /* 2. Wrapper & Container - Buang semua gap antar elemen */
    .wrapper { 
        display: block !important;
        width: 100%;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative;
    }

    .main-container { 
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding-top: 0 !important; /* Rapatkan ke atas */
        background-color: var(--color-body-bg);
        border-left: none !important;
        min-height: 100vh;
    }

    /* 3. Area Konten - Rapatkan Breadcrumb & Judul */
    .content-body {
        padding: 5px 10px 80px !important; /* Atas rapat (5px), Bawah lega (80px) */
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Hilangkan margin-top pada elemen pertama agar nempel ke Navbar */
    .content-body > *:first-child,
    .breadcrumb, 
    .breadcrumb-item,
    h2, h4, .page-title {
        margin-top: 0 !important;
        padding-top: 5px !important;
        margin-bottom: 10px !important;
    }

    /* 4. Tabel & Card - Biar gak ngerusak layout */
    .table-card {
        padding: 10px !important;
        border-radius: 12px;
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch;
        background: #fff;
        margin-bottom: 15px;
    }

    .data-table {
        min-width: 600px; 
    }

    .cards-area {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .card {
        padding: 15px !important;
        width: 100% !important;
        margin-bottom: 10px;
    }

    .chart-container {
        display: none !important;
    }

    /* 5. Sidebar & Overlay - Off Canvas System */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -280px; 
        width: 260px !important;
        height: 100% !important;
        z-index: 2000 !important; 
        transition: all 0.3s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        background: #ffffff;
    }

    .sidebar.active, .sidebar:not(.hidden) {
        left: 0 !important;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1900;
        display: none; 
        backdrop-filter: blur(2px);
    }

    .sidebar.active ~ .sidebar-overlay, 
    .sidebar:not(.hidden) ~ .sidebar-overlay {
        display: block;
    }

    /* 6. Modal & Footer */
    .modal-content {
        width: 92% !important;
        margin: 20px auto !important;
        padding: 20px !important;
    }

/* Sembunyikan semua label menu dan item menu di sidebar HP */
    .sidebar .menu-label,
    .sidebar .menu-item {
        display: none !important;
    }

    /* Tampilkan kembali HANYA 3 menu yang diizinkan */
    .sidebar .menu-item[data-sheet="home"],
    .sidebar .menu-item[data-sheet="absensi"],
    .sidebar .menu-item[data-sheet="profiluser"] {
        display: flex !important;
    }

    /* Tampilkan label Dashboard & Aktivitas saja yang relevan */
    .sidebar .menu-item[data-sheet="home"]Prev + .menu-label, /* Sesuai struktur HTML ente */
    .sidebar div:has(+ [data-sheet="home"]), 
    .sidebar div:has(+ [data-sheet="absensi"]) {
        display: block !important;
    }

    .footer {
        display: none !important; /* Footer Hidden */
    }

    .btn-text-old { display: none !important; }
}