/* =========================================
   1. RESET & BASE
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: #f8fafc; color: #0f172a; overflow-x: hidden; }

/* =========================================
   2. SPA SYSTEM (ROUTING)
   ========================================= */
.page-view { display: none; }
.page-view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
   3. UTILITIES (TOMBOL & BANTUAN)
   ========================================= */
.btn-login { width: 100%; padding: 0.8rem; background: #e50000; color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-login:hover { background: #cc0000; }
.btn-danger { background: #e50000; color: #fff; border: none; padding: 0.6rem 1.5rem; border-radius: 8px; cursor: pointer; transition: background 0.2s;}
.btn-danger:hover { background: #cc0000; }
.btn-outline { background: #fff; border: 1px solid #e2e8f0; padding: 0.6rem 1.5rem; border-radius: 8px; color: #0f172a; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-outline:hover { background: #f1f5f9; }
button:disabled { opacity: 0.7; cursor: not-allowed !important; }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.mt-4 { margin-top: 1rem; } 
.text-center { text-align: center; }

/* =========================================
   4. HALAMAN LOGIN & FORMULIR
   ========================================= */
.login-container { height: 100vh; display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.login-box { background: #ffffff; padding: 3rem; border-radius: 16px; width: 100%; max-width: 420px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); border-top: 5px solid #e50000; }
.login-logo { max-width: 170px; display: block; margin: 0 auto 2.5rem; }
.login-box h1, .login-box h2, .login-box h3 { color: #0f172a; }

.form-floating { position: relative; margin-bottom: 1.5rem; }
.form-floating input { width: 100%; padding: 1.25rem 1rem 0.5rem; border: 1px solid #cbd5e1; border-radius: 10px; outline: none; background: transparent; }
.form-floating label { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: #64748b; transition: 0.2s; pointer-events: none; }
.form-floating input:focus ~ label, .form-floating input:not(:placeholder-shown) ~ label { top: 0.3rem; transform: translateY(0); font-size: 0.75rem; color: #e50000; font-weight: 600; }
.form-floating input:placeholder-shown ~ label { max-width: calc(100% - 3rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.password-wrapper { position: relative; }
.btn-toggle-pass { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: #64748b; font-size: 1.1rem; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: color 0.2s; }
.btn-toggle-pass:hover { color: #e50000; }

.forgot-password-link { text-align: right; margin-bottom: 1.5rem; margin-top: -0.5rem; }
.forgot-password-link a, .forgot-password-link a:visited { color: #64748b; font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.forgot-password-link a:hover { color: #e50000; }

/* =========================================
   5. LAYOUT DASHBOARD & SIDEBAR
   ========================================= */
.dashboard-wrapper { display: flex; min-height: 100vh; }
.main-content { flex-grow: 1; padding: 2.5rem; background: #f8fafc; }

.sidebar { width: 260px; background: #ffffff; border-right: 1px solid #e2e8f0; padding: 2rem 1.5rem; transition: width 0.3s ease; flex-shrink: 0; display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0; overflow-y: auto; }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; height: 40px; }
.sidebar-logo { max-width: 140px; height: auto; object-fit: contain; margin: 0; transition: opacity 0.2s; }

.btn-icon-only { background: none; border: none; color: #64748b; font-size: 1.5rem; cursor: pointer; transition: color 0.2s; padding: 0; }
.btn-icon-only:hover { color: #e50000; }

.nav-links { list-style: none; margin-top: 1rem; }
.nav-item { display: flex; align-items: center; gap: 1rem; color: #64748b; text-decoration: none; padding: 0.8rem 1.2rem; border-radius: 10px; transition: all 0.2s ease; margin-bottom: 0.5rem; font-weight: 500; }

/* KUNCI ALIGNMENT ICON & TEKS */
.nav-item i, .btn-logout i { font-size: 1.1rem; width: 24px; text-align: center; }
.nav-item span, .btn-logout span { transform: translateY(1px); }

.nav-item:hover { background: #fef2f2; color: #e50000; }
.nav-item.active { background: #e50000; color: #ffffff; box-shadow: 0 4px 10px rgba(229, 0, 0, 0.2); }

.sidebar-footer { margin-top: auto; padding-top: 1rem; }
.btn-logout { background: transparent; border: 1px solid #e2e8f0; color: #64748b; padding: 0.8rem; border-radius: 10px; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.75rem; font-weight: 600; transition: all 0.2s ease; }
.btn-logout:hover { background: #fef2f2; border-color: #f87171; color: #e50000; }

/* Efek Minimize Sidebar */
.sidebar.collapsed { width: 85px; padding: 2rem 0.75rem; }
.sidebar.collapsed span, .sidebar.collapsed .sidebar-logo { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; }
.sidebar.collapsed .nav-item, .sidebar.collapsed .btn-logout { justify-content: center; padding: 0.8rem 0; width: 100%; }
.sidebar.collapsed .nav-item i, .sidebar.collapsed .btn-logout i { font-size: 1.2rem; }

/* =========================================
   6. KOMPONEN DASHBOARD (KARTU STATISTIK MODERN)
   ========================================= */
.section-title { font-size: 1.1rem; color: #0f172a; margin-bottom: 1rem; font-weight: 700; }
.mt-4 { margin-top: 2rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }

.stat-card { 
    background: #ffffff; 
    padding: 1.5rem; 
    border-radius: 20px; 
    border: 1px solid #f1f5f9; 
    box-shadow: 0 10px 25px rgba(226, 232, 240, 0.4); 
    display: flex; 
    flex-direction: column; 
    gap: 0.5rem; 
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
}

.stat-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; width: 100%; }

.icon-wrapper { width: 45px; height: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.icon-green { background: #dcfce7; color: #16a34a; }
.icon-blue { background: #dbeafe; color: #2563eb; }
.icon-red { background: #fee2e2; color: #dc2626; }
.icon-dark { background: #f1f5f9; color: #334155; }
.icon-orange { background: #ffedd5; color: #ea580c; }
.icon-purple { background: #f3e8ff; color: #9333ea; }

.stat-title { color: #64748b; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: #0f172a; margin: 0; letter-spacing: -0.5px; }
.stat-desc { font-size: 0.8rem; color: #94a3b8; margin-top: 0.2rem; }

.badge { background: #f1f5f9; color: #64748b; font-size: 0.75rem; padding: 0.3rem 0.8rem; border-radius: 20px; font-weight: 600; }

.clickable-card { cursor: pointer; }
.clickable-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(226, 232, 240, 0.6); border-color: #e2e8f0; }

/* Wadah Grafik (Dibuat 2 Kolom) */
.charts-section { 
    display: grid; 
    /* Mengatur minimal lebar 400px. Jika layar kecil, otomatis turun ke bawah (responsif) */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 1.5rem; 
}

.chart-container { 
    background: #fff; 
    padding: 1.5rem; 
    border-radius: 20px; 
    border: 1px solid #f1f5f9; 
    box-shadow: 0 10px 25px rgba(226, 232, 240, 0.4); 
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* =========================================
   7. MODAL / POP-UP NOTIFIKASI
   ========================================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box { background: #ffffff; padding: 2.5rem; border-radius: 16px; width: 90%; max-width: 450px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); transform: translateY(20px) scale(0.95); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.modal-overlay.active .modal-box { transform: translateY(0) scale(1); }

/* =========================================
   8. TABEL & KOMPONEN BARU (ARUS KAS & PRODUK)
   ========================================= */
.grid-2-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.text-right { text-align: right !important; }
.text-green { color: #16a34a; font-weight: 600; }
.text-red { color: #dc2626; font-weight: 600; }

/* Dropdown Kecil */
.input-select-sm { padding: 0.4rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 0.85rem; outline: none; cursor: pointer; color: #0f172a; font-weight: 600; }

/* Tabel Modern */
.table-responsive { overflow-x: auto; width: 100%; }
.data-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.data-table th, .data-table td { padding: 1rem; border-bottom: 1px solid #f1f5f9; text-align: left; font-size: 0.9rem; color: #0f172a; }
.data-table th { color: #64748b; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; background: #f8fafc; }
.data-table tbody tr:hover { background: #f8fafc; }

/* Kartu Pembayaran */
.payment-summary { display: flex; flex-direction: column; gap: 1rem; }
.pay-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #f1f5f9; border-radius: 12px; background: #fafafa; }
.pay-card i { font-size: 1.5rem; color: #64748b; width: 40px; text-align: center; }
.pay-card span { font-size: 0.85rem; color: #64748b; }
.pay-card h4 { font-size: 1.2rem; color: #0f172a; margin-top: 0.2rem; }

/* Layout 3 Kolom & Perapihan Tabel Top Produk */
.grid-3-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

#topQtyBody td, #topOmsetBody td, #topLabaBody td { 
    padding: 0.6rem 0; 
    border-bottom: 1px dashed #e2e8f0; 
    font-size: 0.85rem; 
    font-weight: 500;
}
#topQtyBody tr:last-child td, #topOmsetBody tr:last-child td, #topLabaBody tr:last-child td { 
    border-bottom: none; 
}

/* =========================================
   9. EFEK HEADER MELAYANG (STICKY GLASSMORPHISM)
   ========================================= */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 90;
    /* Efek transparan blur ala aplikasi modern/Apple */
    background: rgba(248, 250, 252, 0.85); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    
    /* Menarik header paksa ke ujung atap dan samping */
    margin: -2.5rem -2.5rem 2rem -2.5rem; 
    /* Mengembalikan ruang bernapas di bagian dalam */
    padding: 2rem 2.5rem 1.5rem 2.5rem; 
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0, 0.02);
}

/* =========================================
   10. MENU HUTANG PIUTANG & TABS
   ========================================= */
.tabs-container { display: flex; gap: 1rem; border-bottom: 2px solid #f1f5f9; padding-bottom: 0.5rem; }
.tab-btn { background: none; border: none; font-size: 1rem; font-weight: 600; color: #94a3b8; padding: 0.5rem 1rem; cursor: pointer; position: relative; transition: color 0.2s; }
.tab-btn:hover { color: #0f172a; }
.tab-btn.active { color: #e50000; }
.tab-btn.active::after { content: ''; position: absolute; bottom: -0.65rem; left: 0; width: 100%; height: 3px; background: #e50000; border-radius: 3px 3px 0 0; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

/* =========================================
   11. PRINT STYLES DUAL MODE (SABILLAH POS)
   ========================================= */

/* Gaya Interaktif di Dashboard */
.row-detail { display: none; background: #fdfdfd; font-size: 0.85rem; }
.row-detail td { padding-left: 3rem !important; color: #64748b; border-bottom: 1px dashed #eee; }
.clickable-row { cursor: pointer; transition: background 0.2s; }
.clickable-row:hover { background: #f8fafc; }
.footer-cetak { display: none; }

/* Warna Laba Bersih (Teks Putih, Background Merah) */
.row-laba-bersih, .row-laba-bersih td, .row-laba-bersih strong {
   background-color: #e50000 !important;
   color: #ffffff !important;
   -webkit-print-color-adjust: exact !important;
   print-color-adjust: exact !important;
}

@media print {
    /* 1. Pembersihan Layout Utama */
    .dashboard-wrapper, .main-content, body, html {
        display: block !important; background: #fff !important; padding: 0 !important; margin: 0 !important;
    }
    .sidebar, .sticky-header, .btn-outline, .btn-login, .tabs-container { display: none !important; }

    /* 2. Sembunyikan SEMUA area cetak secara default */
    #printableArea, #printableNeraca { display: none !important; }

    /* 3. LOGIKA DUAL MODE: Hanya tampilkan yang sedang dipilih */
    body.print-mode-laba #printableArea { display: block !important; }
    body.print-mode-laba #view-dashboard > *:not(#printableArea) { display: none !important; }
    body.print-mode-laba #view-neraca { display: none !important; }

    body.print-mode-neraca #printableNeraca { display: block !important; }
    body.print-mode-neraca #view-neraca > *:not(#printableNeraca) { display: none !important; }
    body.print-mode-neraca #view-dashboard { display: none !important; }

    /* 4. FORMAL TABLE STYLE (Garis Hitam Tegas Sesuai Keinginan Anda) */
    .data-table, .neraca-table {
        border-collapse: collapse !important; width: 100% !important; margin-bottom: 20px !important;
    }
    .data-table th, .data-table td, .neraca-table th, .neraca-table td {
        border: 1px solid #000000 !important; padding: 10px !important; color: #000000 !important;
    }
    
    /* 5. Detail & Tanda Tangan */
    .row-detail { display: table-row !important; }
    
    /* KOREKSI: Kembalikan print-only ke bentuk aslinya (block) agar kop surat tidak tergencet */
    .print-only { display: block !important; }
    
    /* Footer tanda tangan biarkan di kanan */
    .footer-cetak { 
        display: flex !important; justify-content: flex-end !important; margin-top: 40px;
        page-break-inside: avoid !important; 
    }

    /* 6. WARNA LATAR TABEL NERACA (AGAR MUDAH DIBACA) */
    
    /* Warna untuk Header Tabel (Paling Atas) */
    .neraca-table th {
        background-color: #cbd5e1 !important; /* Abu-abu agak gelap */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Warna untuk baris Judul Kategori (AKTIVA / PASIVA) */
    .neraca-table .row-bold td {
        background-color: #f8fafc !important; /* Abu-abu sangat muda */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Warna untuk baris TOTAL */
    .neraca-table .row-total-tebal td {
        background-color: #e2e8f0 !important; /* Abu-abu medium */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Efek Zebra (selang-seling warna) khusus untuk baris rincian data */
    .neraca-table tbody tr:not(.row-bold):not(.row-total-tebal):nth-child(even) td {
        background-color: #f1f5f9 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    @page { size: A4 portrait; margin: 15mm; }
}

/* =========================================
   TAMBAHAN NERACA
   ========================================= */
/* Perbaikan khusus Select di dalam Modal */
.form-floating select {
    width: 100%;
    padding: 1.25rem 1rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    background: #fff;
    cursor: pointer;
    appearance: none; /* Hilangkan panah bawaan browser */
}

/* Memaksa label select selalu melayang di atas agar tidak menabrak teks */
.form-floating select ~ label {
    top: 0.3rem;
    transform: translateY(0);
    font-size: 0.75rem;
    color: #e50000;
    font-weight: 600;
}

/* Sembunyikan area cetak Neraca di tampilan web/layar utama */
#printableNeraca { 
    display: none; 
}

/* =========================================
   12. POS KASIR STYLES (DINAMIS & RESPONSIVE)
   ========================================= */
.pos-table th, .pos-table td { padding: 0.6rem !important; vertical-align: middle; }
.pos-table input { border: 1px solid #cbd5e1; border-radius: 4px; padding: 0.4rem; width: 100%; outline: none; font-size: 0.85rem; }
.pos-table input:focus { border-color: #2563eb; }

/* Kotak Dropdown Autocomplete Pencarian Produk */
.suggestions-box {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 8px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); z-index: 50; max-height: 250px; overflow-y: auto;
    display: none;
}
.suggestion-item { padding: 0.8rem 1rem; cursor: pointer; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.suggestion-item:hover { background: #f8fafc; }
/* Efek saat produk disorot menggunakan tombol panah keyboard */
.suggestion-item.active-suggestion {
    background: #f1f5f9;
    border-left: 4px solid #e50000;
}
.suggestion-item strong { color: #0f172a; }
.suggestion-item span { font-size: 0.85rem; color: #16a34a; font-weight: bold; }

.input-select { width: 100%; padding: 0.6rem; border: 1px solid #cbd5e1; border-radius: 6px; outline: none; font-family: 'Inter'; }
.input-select:focus { border-color: #e50000; }

/* Warna Peringatan Hutang di POS */
.text-warning { color: #f59e0b !important; }

/* =========================================
   13. INPUT GROUP (UNTUK DISKON RP/%) & STRUK THERMAL
   ========================================= */
.input-group {
    display: flex;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    min-width: 130px;
}
.input-group input {
    flex: 1;
    border: none;
    padding: 0.4rem 0.6rem;
    outline: none;
    width: 100%;
    min-width: 0; /* Mencegah input meluber */
    text-align: right;
    color: #0f172a;
}
.input-group select {
    border: none;
    border-left: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 0.4rem;
    outline: none;
    cursor: pointer;
    width: 50px;
    color: #0f172a;
}

/* Memberikan jarak antar tombol aksi di tabel Riwayat */
.action-buttons-gap {
    display: flex;
    gap: 15px; /* Jarak antar icon */
    justify-content: center;
    align-items: center;
}

/* Mempercantik tampilan tombol icon agar lebih tegas */
.btn-icon-only i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.btn-icon-only:hover i {
    transform: scale(1.2);
}

/* =========================================
   14. PERBAIKAN HEADER TABEL (RATA TENGAH)
   ========================================= */
.data-table th { 
    text-align: center !important; 
    vertical-align: middle !important;
}
/* Pengecualian agar kolom angka (Nominal) tetap rata kanan */
.data-table th.text-right { 
    text-align: right !important; 
}

/* =========================================
   15. MODE CETAK KHUSUS THERMAL 58MM
   ========================================= */
@media print {
    /* Jika sedang mode cetak struk, SEMBUNYIKAN seluruh aplikasi (Dashboard, Sidebar, Modal) */
    body.print-mode-struk #app-layout,
    body.print-mode-struk .modal-overlay {
        display: none !important;
    }
    
    /* MUNCULKAN hanya area struk dengan ukuran pasti 58mm */
    body.print-mode-struk #printableStruk { 
        display: block !important; 
        width: 58mm !important;      /* Lebar kertas kasir */
        max-width: 58mm !important;
        margin: 0 !important;
        padding: 0 !important;
        color: #000 !important;
    }
}

/* 1. Paksa isi tabel (TD) menjadi Rata Tengah secara umum */
.data-table td, .pos-table td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* 2. KHUSUS Kolom Produk & Pelanggan: 
   Boleh Tengah atau Kiri (Jika nama produk sangat panjang, Kiri lebih enak dibaca) */
.data-table td:first-child, 
.pos-table td:first-child {
    text-align: center !important; 
}

/* 3. WAJIB: Kolom Nominal Uang tetap Rata Kanan 
   Agar angka ribuan, jutaan, dan desimal sejajar lurus ke bawah */
.data-table td.text-right, 
.pos-table td.text-right,
.subtotal-cell, 
.net-price {
    text-align: right !important;
    padding-right: 1.5rem !important; /* Beri sedikit ruang di kanan */
}

/* =========================================
   16. FORM GRID & INVENTORY STYLES
   ========================================= */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem; /* Jarak horizontal 1rem, vertikal diatur oleh form-floating */
}

/* Jika layar HP (Kecil), jadikan 1 kolom saja */
@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.badge-outline {
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    background: #f8fafc;
}

/* =========================================
   17. AUTO-SUGGEST LOKASI STOK
   ========================================= */
.loc-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid #f8fafc;
    color: #334155;
    transition: all 0.2s;
}
.loc-suggestion-item:hover {
    background: #f1f5f9;
    color: #3b82f6;
    font-weight: bold;
}

/* =========================================
   18. BADGE & MODAL STOK OPNAME
   ========================================= */
.badge-opname {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 5px;
}
.opname-belum { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.opname-sesuai { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.opname-selisih { background: #fee2e2; color: #e50000; border: 1px solid #fecaca; }

.opname-row {
    display: flex; justify-content: space-between; align-items: center; 
    padding: 10px; border-bottom: 1px dashed #cbd5e1;
}

/* =========================================
   19. PERBAIKAN KOTAK TEXTAREA (ALAMAT)
   ========================================= */
.form-floating textarea {
    width: 100%;
    padding: 1rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    color: #334155;
    outline: none;
    transition: all 0.2s;
    resize: vertical; /* Mengizinkan kotak ditarik ke bawah jika alamat sangat panjang */
    min-height: 80px; /* Tinggi minimal */
}

.form-floating textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Animasi Label Mengambang untuk Textarea */
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    top: 0;
    left: 0.5rem;
    font-size: 0.75rem;
    color: #3b82f6;
    background: #fff;
    padding: 0 4px;
    transform: translateY(-50%);
}

/* =========================================
   20. LOADING BAR NOTIFIKASI
   ========================================= */
#modernAlertModal .modal-box {
    position: relative; /* Wajib agar bar tidak menembus batas lengkungan (border-radius) */
    overflow: hidden;
}

.alert-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 6px;
    background-color: #10b981;
    width: 100%;
    display: none;
    transform-origin: left; 
}

/* =========================================
   21. PREMIUM GRADIENT CARD (DASHBOARD)
   ========================================= */
.premium-gradient-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.2) !important;
}

.filter-glass {
    background: transparent; border: none; color: #ffffff; font-weight: 600;
    outline: none; cursor: pointer; font-size: 0.85rem; font-family: 'Inter', sans-serif;
}
.filter-glass option { background: #0f172a; color: #fff; }

.deco-circle-1 {
    position: absolute; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: -50px; right: -50px; border-radius: 50%; pointer-events: none; z-index: 1;
}
.deco-circle-2 {
    position: absolute; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(0,0,0,0) 70%);
    bottom: -100px; left: -50px; border-radius: 50%; pointer-events: none; z-index: 1;
}

/* =========================================
   21. PREMIUM GRADIENT CARD (RED THEME SABILLAH)
   ========================================= */
.premium-gradient-card {
    background: linear-gradient(135deg, #5e0909 0%, #b12e2e 100%); /* Merah Sabillah elegan */
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(185, 28, 28, 0.2) !important;
    border: none !important;
}

.filter-glass {
    background: transparent; border: none; color: #ffffff; font-weight: 600;
    outline: none; cursor: pointer; font-size: 0.85rem; font-family: 'Inter', sans-serif;
}
.filter-glass option { 
    background: #7f1d1d; /* Ubah background dropdown agar tidak biru */
    color: #fff; 
}

.deco-circle-1 {
    position: absolute; width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.15) 0%, rgba(0,0,0,0) 70%); /* Cahaya emas tipis */
    top: -50px; right: -50px; border-radius: 50%; pointer-events: none; z-index: 1;
}
.deco-circle-2 {
    position: absolute; width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(0,0,0,0) 70%); /* Cahaya putih tipis */
    bottom: -100px; left: -100px; border-radius: 50%; pointer-events: none; z-index: 1;
}