/* style.css — Clean & Optimized Version */

/* === 1. Transisi Tab & General === */
.tab-content { 
    opacity: 0; 
    transform: translateY(8px); 
    max-height: 0; 
    overflow: hidden; 
    transition: all .25s ease; 
}
.tab-content.show { 
    opacity: 1; 
    transform: translateY(0); 
    max-height: 4000px; 
}

/* === 2. Print Mode: Putih Bersih === */
@media print {
    body { background: #fff !important; color: #111 !important; }
    .glass, .bg-ink-900, .bg-ink-900\/80, .bg-hero-grad { 
        background: #fff !important; 
        box-shadow: none !important; 
        border: none !important; 
    }
    .tabBtn, button { display: none !important; }
}

/* === 3. Utility & UI Components === */
#seedBtn { display: none !important; }

/* Chevron Toggles (Stats, Preview, Form) */
#statsPanel > summary, 
#tfPreviewPanel > summary, 
#tfFormPanel > summary { list-style: none; }

#statsPanel > summary::-webkit-details-marker,
#tfPreviewPanel > summary::-webkit-details-marker,
#tfFormPanel > summary::-webkit-details-marker { display: none; }

.chev { transition: transform .2s ease; transform: rotate(-90deg); }
[open] .chev { transform: rotate(0deg); }
summary:hover .chev { opacity: .95; }

/* === 4. Tabel Dasar (Transfer, Request, Admin) === */
/* Gabungan untuk efisiensi kode */
#transferList table, #transferFormCard table, #adminPanelContainer table,
#transferList th, #transferFormCard th, #adminPanelContainer th,
#transferList td, #transferFormCard td, #adminPanelContainer td {
    color: #111 !important;
}

#transferList thead, #transferFormCard thead, #adminPanelContainer thead {
    background: #f1f5f9 !important;
}

/* Zebra Striping Transfer & Request */
#transferList tbody tr:nth-child(odd), 
#transferFormCard tbody tr:nth-child(odd) { background: #f9fafb !important; }
#transferList tbody tr:nth-child(even), 
#transferFormCard tbody tr:nth-child(even) { background: #f1f5f9 !important; }

/* Zebra Striping Admin Panel */
#adminPanelContainer tbody tr:nth-child(odd) { background: #ffffff !important; }
#adminPanelContainer tbody tr:nth-child(even) { background: #f8fafc !important; }

#transferList tr, #transferFormCard tr, #adminPanelContainer tr { 
    border-bottom: 1px solid #e5e7eb !important; 
}

/* Admin Panel Container Specifics */
#adminPanelContainer {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 20px -8px rgba(0,0,0,.15);
}

/* Form Controls di Tabel */
#transferFormCard select, #transferFormCard option, #transferFormCard input,
#adminPanelContainer select, #adminPanelContainer input, #adminPanelContainer option {
    color: #111 !important;
    background: #ffffff !important;
}

/* === 5. Produk Page === */
#produkPage.tab-content,
#produkPage.tab-content.show {
    max-height: none !important;
    overflow: visible !important;
}

#stockContent table tbody tr:hover td { transition: background-color .15s ease; }
#stockContent .overflow-x-auto { 
    scrollbar-width: thin; 
    scrollbar-color: #d1d5db #f3f4f6;
}
#stockContent .overflow-x-auto::-webkit-scrollbar { height: 8px; width: 8px; }
#stockContent .overflow-x-auto::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 8px; }
#stockContent .overflow-x-auto::-webkit-scrollbar-track { background: #f3f4f6; border-radius: 8px; }

/* === 6. Halaman Laporan (High Contrast Version) === */
#laporanPage .bg-white { background-color: #fff !important; color: #111; }

.export-btns { display: flex; gap: 8px; margin-bottom: 16px; }
.export-btns button {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: white !important;
    background: #3b82f6 !important;
}
.export-btns button:hover { transform: translateY(-1px); background: #2563eb !important; }

/* Laporan Table */
#laporanPage .stock-table {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#laporanPage .stock-table thead {
    background: #e5e7eb !important;
    color: #111 !important;
}

#laporanPage .stock-table thead th {
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 2px solid #d1d5db;
}

#laporanPage .stock-table tbody tr {
  background: #fff !important;
  color: #111 !important;
  border-bottom: 1px solid #e5e7eb;
}

#laporanPage .stock-table tbody tr:hover {
    background: #374151 !important;
}

/* Status & Badges */
.status-cukup { color: #10b981; font-weight: 600; }
.status-menipis { color: #f59e0b; font-weight: 600; }
.status-habis { color: #ef4444; font-weight: 600; }
.status-zonk { color: #ef4444; font-weight: 600; }

.low-stock-alert {
    background: #1c1917;
    border: 1px solid #fecaca;
    color: #fecaca;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.low-stock-badge {
    background: #1f2937;
    border: 1px solid #fbbf24;
    color: #fbbf24;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}
.low-stock-badge .loc { color: #fbbf24; font-weight: 700; }