/* =========================================
   RESET & BASIC SETUP
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    padding: 20px;
    color: #f0f0f0;
    overflow-x: hidden;
    /* TEMA HITAM: background hitam solid, tanpa gambar */
    background: #000000;
}

/* Overlay dihapus — body sudah hitam */
body::before {
    display: none;
}

/* Scrollbar Kustom Emas */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 4px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #D4AF37, #AA771C);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #FFD700; }

/* =========================================
   UTILITIES & STATUS
   ========================================= */
.status-offline {
    position: fixed; top: 20px; right: 20px;
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    color: #fff; padding: 10px 20px; border-radius: 30px;
    font-weight: 600; z-index: 2000;
    animation: pulse 2s infinite; font-size: 0.9em;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* =========================================
   CONTAINER UTAMA
   ========================================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 85vh;
    display: flex; flex-direction: column;
}

/* =========================================
   HEADER
   ========================================= */
header {
    background: linear-gradient(180deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    color: #D4AF37;
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    position: relative;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.4em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #FFE57F;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
    font-weight: 800;
}
header span { color: #ccc; font-size: 0.9em; letter-spacing: 0.5px; }

/* =========================================
   TABS
   ========================================= */
.main-content .tab-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #333;
    overflow-x: auto;
}

.tab-btn {
    flex: 1; 
    min-width: 120px; 
    padding: 18px 10px;
    border: none; background: transparent;
    font-family: 'Cinzel', serif;
    font-size: 0.9em; font-weight: 700;
    color: #888; cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    text-transform: uppercase; letter-spacing: 1px;
    white-space: nowrap;
}

.tab-btn:hover { background: rgba(255, 255, 255, 0.03); color: #D4AF37; }
.tab-btn.active {
    background: rgba(212, 175, 55, 0.12);
    color: #FFD700;
    border-bottom: 3px solid #D4AF37;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.tab-content { 
    display: none; 
    padding: 40px; 
    animation: fadeIn 0.4s ease-out; 
    height: 100%;
}
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   FORMS & INPUTS
   ========================================= */
.form-group { position: relative; margin-bottom: 25px; }

.form-group label {
    display: block; margin-bottom: 10px; font-weight: 600; color: #D4AF37;
    text-transform: uppercase; font-size: 0.8em; letter-spacing: 1.2px;
}

.form-group input, .form-group select {
    width: 100%; 
    padding: 16px; 
    background: rgba(10, 10, 10, 0.8) !important; 
    border: 1px solid rgba(212, 175, 55, 0.3); 
    border-radius: 12px;
    font-size: 1.05em;
    color: #fff !important; 
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

input[type="date"] {
    position: relative;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(212,175,55,0.4);
    padding: 12px 45px 12px 12px;
    border-radius: 10px;
    font-size: 16px;
    width: 100%;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0; display: block; cursor: pointer;
    filter: invert(1) brightness(2);
    position: absolute; right: 12px;
}
input[type="date"]::-webkit-datetime-edit { color: #fff; }
input[type="date"]::-moz-focus-inner { border: 0; }

.date-input-wrapper { position: relative; width: 100%; }
.date-input-wrapper i {
    position: absolute; right: 15px; top: 50%;
    transform: translateY(-50%); color: #D4AF37;
    pointer-events: none; font-size: 18px; z-index: 0;
}

.form-group input:focus, .form-group select:focus {
    outline: none; 
    border-color: #FFD700; 
    background: rgba(0, 0, 0, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15); 
}

::placeholder { color: #888; font-style: normal; opacity: 0.7; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }

.total-display {
    display: flex; align-items: center; justify-content: flex-end; width: 100%;
    padding: 16px; background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px; font-size: 1.3em; font-weight: 700; color: #fff;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
    min-height: 58px;
}
.total-display.large {
    color: #ffeb3b; font-size: 1.5em; background: rgba(212, 175, 55, 0.2);
    border-color: #fff; box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    width: 100%; padding: 18px; border: none; border-radius: 12px;
    font-family: 'Cinzel', serif; font-size: 1em; font-weight: 700;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    text-transform: uppercase; letter-spacing: 1px;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-buy, .btn-sell {
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    color: #000; border: 1px solid rgba(255,255,255,0.4);
}
.btn-buy:hover, .btn-sell:hover {
    transform: translateY(-2px); box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    filter: contrast(1.1);
}
.btn-save {
    background: linear-gradient(135deg, #11998e, #38ef7d); color: white;
}
.btn-logout {
    background: rgba(212, 175, 55, 0.1); border: 1px solid #D4AF37; color: #D4AF37;
    padding: 8px 18px; border-radius: 25px; cursor: pointer; font-weight: 600; font-size: 0.9em;
    transition: all 0.3s;
}
.btn-logout:hover { background: #D4AF37; color: #000; box-shadow: 0 0 15px #D4AF37; }

/* =========================================
   DASHBOARD / BERANDA
   ========================================= */
.dashboard-welcome { text-align: center; margin-bottom: 40px; }
.dashboard-welcome h2 {
    font-family: 'Cinzel', serif;
    font-size: 2.2em;
    color: #fff;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-icon {
    width: 60px; height: 60px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8em;
}
.card-profit .stat-icon { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.card-masuk .stat-icon { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.card-keluar .stat-icon { background: rgba(52, 152, 219, 0.15); color: #3498db; }

.stat-info h3 {
    font-size: 0.85em; text-transform: uppercase;
    letter-spacing: 1px; color: #aaa; margin-bottom: 5px;
}
.stat-info p {
    font-family: 'Cinzel', serif;
    font-size: 1.4em; font-weight: 700; color: #fff;
}
.stat-info small { font-size: 0.9em; color: #888; display: block; margin-top: 3px; }

.dashboard-section {
    background: rgba(0,0,0,0.2);
    border-radius: 16px; padding: 25px; margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.03);
}

.section-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.section-header h3 { color: #D4AF37; font-family: 'Cinzel', serif; font-size: 1.1em; }
.btn-link {
    background: none; border: none; color: #3498db;
    cursor: pointer; font-weight: 600; font-size: 0.9em;
    transition: color 0.3s;
}
.btn-link:hover { color: #5dade2; text-decoration: underline; }

.recent-list { display: flex; flex-direction: column; gap: 15px; }
.recent-item {
    background: rgba(255,255,255,0.03);
    padding: 15px; border-radius: 12px;
    border-left: 4px solid #555;
    display: flex; justify-content: space-between; align-items: center;
}
.recent-item.type-jual { border-left-color: #e74c3c; }
.recent-item.type-beli { border-left-color: #27ae60; }
.recent-item.type-blok { border-left-color: #8e44ad; }
.ri-left strong { display: block; color: #fff; font-size: 1em; margin-bottom: 3px; }
.ri-left span { color: #888; font-size: 0.85em; }
.ri-right { text-align: right; }
.ri-right .amt { display: block; font-weight: 700; font-size: 1em; }
.ri-right .time { font-size: 0.75em; color: #666; margin-top: 2px; }

/* =========================================
   RIWAYAT & LIST (PRO VERSION)
   ========================================= */
.riwayat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; flex-wrap: wrap; gap: 20px; }
.riwayat-header h3 { color: #D4AF37; font-family: 'Cinzel', serif; font-size: 1.5em; letter-spacing: 1px; }

.header-controls { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; flex: 1; }
.search-container {
    display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,0.4);
    padding: 6px 10px; border-radius: 30px; border: 1px solid #444; transition: all 0.3s ease;
}
.search-container:focus-within { border-color: #D4AF37; box-shadow: 0 0 15px rgba(212, 175, 55, 0.15); background: rgba(0,0,0,0.6); }

.btn-search, .btn-clear-search {
    padding: 8px 15px; border: none; border-radius: 8px; font-size: 0.9em; cursor: pointer;
    display: flex; align-items: center; gap: 5px; transition: all 0.3s ease; color: white;
}
.btn-search { background: linear-gradient(45deg, #D4AF37, #AA771C); color: black; border-radius: 20px; }
.btn-search:hover { box-shadow: 0 0 10px #D4AF37; }
.btn-clear-search { background: #333; color: #fff; border-radius: 50%; width: 32px; height: 32px; justify-content: center; padding: 0;}
.btn-clear-search:hover { background: #d32f2f; }

.header-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-print {
    background: linear-gradient(45deg, #2193b0, #6dd5ed); color: white; border: none; padding: 10px 25px;
    border-radius: 30px; cursor: pointer; font-weight: 600; font-size: 0.9em;
    box-shadow: 0 4px 15px rgba(33, 147, 176, 0.3); transition: all 0.3s ease;
}
.btn-print:hover { transform: translateY(-2px); box-shadow: 0 0 20px #6dd5ed; }

.riwayat-list { max-height: 500px; overflow-y: auto; margin-bottom: 30px; padding-right: 5px; }

.riwayat-item {
    background: rgba(255, 255, 255, 0.04); 
    padding: 20px 120px 20px 20px; 
    margin-bottom: 15px; border-radius: 16px;
    border-left: 4px solid #D4AF37; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.05);
    position: relative; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.riwayat-item:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.07); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.riwayat-item.jual { border-left-color: #e74c3c; }
.riwayat-item.beli { border-left-color: #27ae60; }

.riwayat-info { width: 100%; }
.riwayat-item h4 { color: #D4AF37; margin-bottom: 8px; font-family: 'Cinzel', serif; font-size: 1.1em; padding-right: 10px;}
.riwayat-item p { color: #ccc; margin-bottom: 4px; font-size: 0.9em; line-height: 1.4; }

.empty-state {
    text-align: center; color: #888; font-style: italic; padding: 40px;
    background: rgba(0,0,0,0.3); border-radius: 10px;
}
.empty-state.search-empty {
    background: linear-gradient(45deg, #4a0d0d, #2c0b0b); color: #ff6b6b; border: 1px solid #ff6b6b;
}

/* ACTION BUTTONS (POJOK KANAN) */
.action-buttons { 
    position: absolute; 
    top: 15px;         
    right: 15px;       
    display: flex; 
    gap: 8px;          
    z-index: 10;       
}

/* DP Toggle */
.dp-toggle-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}
.dp-toggle-option {
    flex: 1;
    cursor: pointer;
}
.dp-toggle-option input[type="radio"] {
    display: none;
}
.dp-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: #aaa;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}
.dp-toggle-label i {
    font-size: 1.1em;
}
.dp-toggle-option input[type="radio"]:checked + .dp-toggle-label {
    border-color: #D4AF37;
    background: rgba(212, 175, 55, 0.15);
    color: #D4AF37;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}
.dp-toggle-option input[type="radio"]:checked + .dp-toggle-label i {
    color: #FFD700;
}

.btn-edit, .btn-delete, .btn-print-small {
    width: 36px;       
    height: 36px;      
    border-radius: 50%; 
    padding: 0;        
    font-size: 0.9em;  
    justify-content: center; 
    align-items: center; 
    transition: all 0.2s ease;
}

.btn-edit { background: #3498db; }
.btn-delete { background: #e74c3c; }

.btn-pelunasan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}
.btn-pelunasan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    background: linear-gradient(135deg, #d35400, #e67e22);
}
.btn-print-small { background: #16a085; }

.btn-edit:hover, .btn-delete:hover, .btn-print-small:hover { 
    transform: scale(1.1); 
    box-shadow: 0 0 10px rgba(0,0,0,0.5); 
    filter: brightness(1.2); 
}

/* =========================================
   SUMMARY
   ========================================= */
.summary {
    background: linear-gradient(135deg, #D4AF37, #F4D03F, #FAD02C) !important;
    color: #1a1a1a !important; padding: 25px; border-radius: 15px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px;
    text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 2px solid #fff;
}
.summary-item span { display: block; opacity: 0.8; margin-bottom: 5px; font-weight: 600; text-transform: uppercase; font-size: 0.9em; }
.summary-item strong { font-size: 1.4em; color: #000; }

/* =========================================
   MODAL
   ========================================= */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}
.modal-content {
    background: rgba(10, 10, 10, 0.95); margin: 5% auto; padding: 0; border-radius: 15px;
    width: 90%; max-width: 500px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 30px rgba(212, 175, 55, 0.2);
    border: 2px solid #D4AF37; animation: slideIn 0.5s ease-out;
}
@keyframes slideIn { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

.modal-header {
    background: linear-gradient(135deg, #D4AF37, #F4D03F, #FAD02C) !important;
    color: #1a1a1a !important; padding: 20px; border-radius: 13px 13px 0 0;
    display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #fff;
}
.modal-header h3 { margin: 0; font-size: 1.4em; font-family: 'Cinzel', serif; text-transform: uppercase; letter-spacing: 1px; }
.close { font-size: 2em; cursor: pointer; color: #000; opacity: 0.6; transition: opacity 0.3s; }
.close:hover { opacity: 1; }
.modal-body { padding: 30px; }

/* LOGIN SPECIFIC */
#modalLogin .modal-content {
    border: 2px solid #D4AF37; box-shadow: 0 0 50px rgba(212, 175, 55, 0.4);
}
#modalLogin .modal-header {
    background: transparent !important; color: #D4AF37 !important; border-bottom: 1px solid #333; padding-bottom: 10px;
}
#modalLogin h3 { text-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }

/* Responsive */
@media (max-width: 768px) {
    .form-row, .summary { grid-template-columns: 1fr; }
    .header-controls { align-items: stretch; width: 100%; }
    .search-container { justify-content: center; flex-wrap: wrap; }
    .header-buttons { justify-content: center; width: 100%; }
    .btn-print { width: 100%; }
    body { padding: 10px; }
    .riwayat-header { flex-direction: column; align-items: stretch; }
    header h1 { font-size: 1.8em; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* =========================================
   KEUANGAN TAB STYLES
   ========================================= */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.finance-card {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 20, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.finance-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); opacity: 0.7;
}
.finance-card:hover { transform: translateY(-8px) scale(1.02); }

.card-icon { font-size: 2.5em; margin-bottom: 20px; display: inline-block; transition: transform 0.3s ease; }
.finance-card:hover .card-icon { transform: scale(1.1) rotate(5deg); }

.finance-card h3 {
    font-family: 'Poppins', sans-serif; font-size: 0.8em; font-weight: 600;
    text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; opacity: 0.9;
    background: rgba(255,255,255,0.05); padding: 6px 16px; border-radius: 50px; display: inline-block;
}

.finance-card .value {
    font-family: 'Cinzel', serif; font-size: 2.2em; font-weight: 700; margin-bottom: 30px; line-height: 1.1;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Card Colors */
.card-gold { border: 1px solid rgba(212, 175, 55, 0.3); box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px rgba(212, 175, 55, 0.15), inset 0 0 20px rgba(212, 175, 55, 0.05); }
.card-gold .card-icon { color: #FFD700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.6); }
.card-gold .value { color: #FFD700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }

.card-red { border: 1px solid rgba(231, 76, 60, 0.3); box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px rgba(231, 76, 60, 0.15), inset 0 0 20px rgba(231, 76, 60, 0.05); }
.card-red .card-icon { color: #ff6b6b; text-shadow: 0 0 15px rgba(231, 76, 60, 0.6); }
.card-red .value { color: #ff6b6b; text-shadow: 0 0 15px rgba(231, 76, 60, 0.4); }

.card-blue { border: 1px solid rgba(52, 152, 219, 0.3); box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px rgba(52, 152, 219, 0.15), inset 0 0 20px rgba(52, 152, 219, 0.05); }
.card-blue .card-icon { color: #4facfe; text-shadow: 0 0 15px rgba(52, 152, 219, 0.6); }
.card-blue .value { color: #4facfe; text-shadow: 0 0 15px rgba(52, 152, 219, 0.4); }

.finance-card .btn {
    width: 100%; padding: 12px; border-radius: 30px; font-size: 0.85em; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 5px;
    text-transform: uppercase; border: 1px solid transparent; background: rgba(255,255,255,0.1); color: #fff;
}
.card-gold .btn:hover { background: rgba(212, 175, 55, 0.2); border-color: #FFD700; color: #FFD700; box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3); }
.card-red .btn:hover { background: rgba(231, 76, 60, 0.2); border-color: #ff6b6b; color: #ff6b6b; box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3); }
.card-blue .btn:hover { background: rgba(52, 152, 219, 0.2); border-color: #4facfe; color: #4facfe; box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3); }

/* =========================================
   FOOTER DASHBOARD (Inside Tab Riwayat)
   ========================================= */
.finance-footer {
    background: linear-gradient(to top, rgba(0,0,0,0.4), rgba(20,20,20,0.6));
    border-top: 1px solid #333; border: 1px solid rgba(212,175,55,0.2); padding: 25px;
    border-radius: 15px; margin-top: 30px;
}
.footer-stats { display: flex; flex-direction: column; gap: 15px; }
.stat-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.05); padding: 15px; border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}
.stat-label { color: #aaa; font-size: 0.9em; text-transform: uppercase; font-weight: 600; }
.stat-value { font-family: 'Cinzel', serif; font-size: 1.4em; font-weight: 700; color: #fff; }
.stat-value.profit { color: #2ecc71; text-shadow: 0 0 10px rgba(46, 204, 113, 0.3); }
.stat-value.loss { color: #e74c3c; text-shadow: 0 0 10px rgba(231, 76, 60, 0.3); }
.stat-value.modal-gold { color: #D4AF37; text-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }

/* =========================================
   LIST RIWAYAT OPERASIONAL
   ========================================= */
.list-ops-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid rgba(255, 255, 255, 0.05); margin-bottom: 12px; padding: 14px 16px;
    border-radius: 14px; transition: all 0.3s ease; min-height: 78px;
}
.list-ops-item:hover { transform: translateX(4px); background: rgba(231, 76, 60, 0.08); border-color: rgba(231, 76, 60, 0.2); }

.ops-delete-left {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(231, 76, 60, 0.12); border: 1px solid rgba(231, 76, 60, 0.25); color: #ff6b6b; cursor: pointer;
    transition: all 0.25s ease; font-size: 1em;
}
.ops-delete-left:hover { background: #e74c3c; color: white; transform: scale(1.08) rotate(90deg); box-shadow: 0 0 12px rgba(231, 76, 60, 0.4); }

.ops-info { flex: 1; min-width: 0; }
.ops-info strong { color: #fff; display: block; font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: capitalize; }
.ops-info p { margin: 4px 0 0; color: #bbb; font-size: 0.95em; }

.ops-date { flex-shrink: 0; font-family: 'Courier New', monospace; color: #D4AF37; font-size: 0.82em; text-align: right; white-space: nowrap; max-width: 135px; }

#listOperasional { max-height: 320px; overflow-y: auto; overflow-x: hidden; padding-right: 8px; scroll-behavior: smooth; }
#listOperasional::-webkit-scrollbar { width: 8px; }
#listOperasional::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
#listOperasional::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, #D4AF37, #AA771C); border-radius: 10px; }
#listOperasional::-webkit-scrollbar-thumb:hover { background: linear-gradient(to bottom, #FFD700, #D4AF37); }

/* =========================================
   MODAL & INPUT LUXURY
   ========================================= */
.modal-body-luxury {
    background: linear-gradient(145deg, #141414 0%, #000000 100%);
    border-radius: 0 0 15px 15px; padding: 40px 30px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}
.label-luxury {
    display: block; margin-bottom: 12px; font-family: 'Cinzel', serif; font-size: 0.85em; font-weight: 700;
    color: #D4AF37; text-transform: uppercase; letter-spacing: 1.5px; text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}
.input-luxury {
    width: 100%; padding: 18px 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; color: #fff; font-size: 1.4em; font-family: 'Poppins', sans-serif; font-weight: 500;
    letter-spacing: 0.5px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.input-luxury:focus {
    background: rgba(0, 0, 0, 0.8); border-color: #FFD700; box-shadow: 0 0 20px rgba(212, 175, 55, 0.3), inset 0 0 10px rgba(212, 175, 55, 0.1); outline: none; color: #fff;
}
.input-luxury::placeholder { color: #666; font-style: italic; opacity: 0.5; }
.btn-luxury {
    width: 100%; padding: 18px; border-radius: 12px; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.1em;
    cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 10px;
    text-transform: uppercase; letter-spacing: 1px; background: linear-gradient(45deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    color: #000; border: 1px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.5), 0 0 5px rgba(212, 175, 55, 0.3);
}
.btn-luxury:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5); filter: brightness(1.1); }

/* Responsive Mobile untuk Tombol Pojok */
@media (max-width: 500px) {
    .riwayat-item { padding-right: 95px; }
    .action-buttons { top: 10px; right: 10px; gap: 5px; }
    .btn-edit, .btn-delete, .btn-print-small { width: 30px; height: 30px; font-size: 0.8em; }
}

/* =========================================
   HISTORY SPLIT LAYOUT (2 KOLOM ELEGAN)
   ========================================= */
.history-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 30px;
    margin-bottom: 30px;
    align-items: stretch; 
    min-height: 70vh; 
}

.history-col.main-col {
    background: rgba(20, 20, 20, 0.4);
    border-radius: 16px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; overflow: hidden; height: 100%; 
}

.col-header {
    text-align: center; padding: 15px;
    font-family: 'Cinzel', serif; font-weight: 800; font-size: 1.1em; letter-spacing: 2px;
    text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.05);
}

.expense-header {
    background: linear-gradient(180deg, rgba(39, 174, 96, 0.15), transparent);
    color: #2ecc71; border-bottom: 1px solid rgba(39, 174, 96, 0.3);
}

.income-header {
    background: linear-gradient(180deg, rgba(231, 76, 60, 0.15), transparent);
    color: #e74c3c; border-bottom: 1px solid rgba(231, 76, 60, 0.3);
}

.sub-header {
    padding: 12px 20px; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.9em;
    color: #ccc; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.02); border-bottom: 2px solid;
}

.green-line { border-bottom-color: #27ae60; color: #27ae60; }
.purple-line { border-bottom-color: #8e44ad; color: #8e44ad; }
.red-line { border-bottom-color: #e74c3c; color: #e74c3c; }

.col-divider {
    height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); margin: 15px 20px;
}

.riwayat-list { padding: 10px 20px 20px 20px; max-height: 400px; overflow-y: auto; }
.riwayat-list::-webkit-scrollbar { width: 6px; }
.riwayat-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.riwayat-list::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.3); border-radius: 3px; }
.riwayat-list::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.6); }

.riwayat-item.jual_blok { border-left-color: #8e44ad !important; background: rgba(142, 68, 173, 0.03); }
.riwayat-item.jual_blok:hover { background: rgba(142, 68, 173, 0.12) !important; }

.badge-jualblok {
    background: linear-gradient(135deg, #8e44ad, #6c3483); color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 6px;
}

.badge-dp {
    background: linear-gradient(135deg, #e67e22, #d35400); color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 6px;
    animation: pulse-dp 2s infinite;
}
@keyframes pulse-dp { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.badge-lunas {
    background: linear-gradient(135deg, #27ae60, #1e8449); color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 0.75em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-left: 6px;
}

.kadar-info { color: #a569bd; font-size: 0.9em; font-weight: 600; }
/* =========================================
   SUMMARY BELI (HIJAU ELEGAN) & JUAL (MERAH ELEGAN)
   ========================================= */
.summary-beli {
    background: linear-gradient(135deg, #145a32 0%, #1e8449 40%, #27ae60 100%) !important;
    border-color: rgba(255,255,255,0.25) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 25px rgba(39,174,96,0.15) !important;
}
.summary-beli .summary-item span {
    color: rgba(255,255,255,0.7) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.summary-beli .summary-item strong {
    color: #eafaf1 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.summary-jual {
    background: linear-gradient(135deg, #78281f 0%, #c0392b 40%, #e74c3c 100%) !important;
    border-color: rgba(255,255,255,0.25) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 25px rgba(231,76,60,0.15) !important;
}
.summary-jual .summary-item span {
    color: rgba(255,255,255,0.7) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.summary-jual .summary-item strong {
    color: #fdedec !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* =========================================
   LIGHT THEME OVERRIDE
   ========================================= */
body.theme-light .summary-beli {
    background: linear-gradient(135deg, #145a32 0%, #1e8449 40%, #27ae60 100%) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12), 0 0 12px rgba(39,174,96,0.1) !important;
}
body.theme-light .summary-beli .summary-item span {
    color: rgba(255,255,255,0.7) !important;
}
body.theme-light .summary-beli .summary-item strong {
    color: #eafaf1 !important;
}

body.theme-light .summary-jual {
    background: linear-gradient(135deg, #78281f 0%, #c0392b 40%, #e74c3c 100%) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12), 0 0 12px rgba(231,76,60,0.1) !important;
}
body.theme-light .summary-jual .summary-item span {
    color: rgba(255,255,255,0.7) !important;
}
body.theme-light .summary-jual .summary-item strong {
    color: #fdedec !important;
}

/* =========================================
   SPACING ANTAR KOTAK SUMMARY
   ========================================= */
.summary-beli,
.summary-jualblok,
.summary-jual {
    margin-bottom: 18px !important;
}

.summary-jualblok {
    margin-top: 20px; background: linear-gradient(135deg, #6c3483, #8e44ad, #a569bd) !important; color: #fff !important;
    border: 2px solid rgba(255,255,255,0.2) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 25px rgba(142,68,173,0.35) !important;
}
.summary-jualblok .summary-item span { color: rgba(255,255,255,0.85) !important; }
.summary-jualblok .summary-item strong { color: #fff !important; }

#groupEditKadar input { font-size: 1.1em; }

@media (max-width: 768px) {
    .summary-jualblok { grid-template-columns: 1fr; }
    .history-wrapper { grid-template-columns: 1fr; gap: 25px; }
    .riwayat-list { max-height: 350px; }
}

/* =========================================
   SORTIR EMAS STYLES
   ========================================= */
.sortir-header-card {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 20, 0.85));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px; padding: 30px 20px; text-align: center; margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 0 20px rgba(212, 175, 55, 0.05);
}
.sortir-header-icon { font-size: 2.5em; color: #FFD700; margin-bottom: 10px; text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.sortir-header-card h3 { font-family: 'Poppins', sans-serif; font-size: 0.85em; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: #aaa; margin-bottom: 10px; }
.sortir-header-value { font-family: 'Cinzel', serif; font-size: 2.8em; font-weight: 800; color: #FFD700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.4); line-height: 1.1; }
.sortir-date-label { color: #777; font-size: 0.85em; margin-top: 8px; font-style: italic; }

.sortir-result-card {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.6), rgba(15, 15, 15, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 25px; margin-top: 25px; box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.sortir-result-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 1.05em; }
.sortir-result-row span { color: #bbb; display: flex; align-items: center; gap: 8px; }
.sortir-result-row span i { color: #888; font-size: 0.9em; }
.sortir-result-row strong { font-family: 'Cinzel', serif; font-size: 1.2em; color: #fff; }
.sortir-result-row.hasil-akhir strong { font-size: 1.5em; font-weight: 800; }
.sortir-divider { height: 2px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent); margin: 10px 0; }

.sortir-status {
    text-align: center; font-family: 'Cinzel', serif; font-size: 1.2em; font-weight: 800; letter-spacing: 2px;
    padding: 15px; border-radius: 10px; margin-top: 15px; text-transform: uppercase;
}
.status-neutral { background: rgba(255, 255, 255, 0.05); color: #666; border: 1px solid #444; }
.status-pass {
    background: rgba(46, 204, 113, 0.1); color: #2ecc71; border: 2px solid #2ecc71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.3); box-shadow: 0 0 20px rgba(46, 204, 113, 0.1);
}
.status-plus {
    background: rgba(243, 156, 18, 0.1); color: #f39c12; border: 2px solid #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.3); box-shadow: 0 0 20px rgba(243, 156, 18, 0.1);
}
.status-minus {
    background: rgba(231, 76, 60, 0.1); color: #e74c3c; border: 2px solid #e74c3c;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.3); box-shadow: 0 0 20px rgba(231, 76, 60, 0.1);
}

@media (max-width: 768px) { .sortir-header-value { font-size: 2em; } }

/* =========================================
   HIDE NUMBER INPUT SPINNERS
   ========================================= */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none !important; margin: 0 !important; }
input[type="number"] { -moz-appearance: textfield !important; }

/* =========================================
   SORTIR HISTORY SCROLL & ITEM
   ========================================= */
.sortir-history-scroll { max-height: 320px; overflow-y: auto; overflow-x: hidden; padding-right: 8px; scroll-behavior: smooth; }
.sortir-history-scroll::-webkit-scrollbar { width: 6px; }
.sortir-history-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
.sortir-history-scroll::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, #D4AF37, #AA771C); border-radius: 10px; }
.sortir-history-scroll::-webkit-scrollbar-thumb:hover { background: linear-gradient(to bottom, #FFD700, #D4AF37); }
.sortir-history-scroll { scrollbar-width: thin; scrollbar-color: #D4AF37 rgba(255,255,255,0.03); }

.sortir-history-item {
    position: relative; background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 16px; margin-bottom: 12px;
    transition: all 0.3s ease; overflow: hidden;
}
.sortir-history-item:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(212, 175, 55, 0.25); transform: translateX(3px); }

.sortir-history-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.sortir-history-date { color: #D4AF37; font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.95em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.sortir-history-top-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sortir-history-badge { padding: 3px 10px; border-radius: 6px; font-size: 0.7em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.badge-pass { background: rgba(46, 204, 113, 0.15); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.3); }
.badge-plus { background: rgba(243, 156, 18, 0.15); color: #f39c12; border: 1px solid rgba(243, 156, 18, 0.3); }
.badge-minus { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }

.sortir-history-details { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 15px; font-size: 0.85em; }
.sortir-history-details span { color: #777; font-size: 0.92em; }
.sortir-history-details strong { color: #ddd; text-align: right; font-weight: 600; }
.sortir-history-selisih {
    grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.06); font-size: 0.95em;
}
.sortir-history-selisih span { color: #999; font-weight: 600; }
.sortir-history-selisih strong { font-family: 'Cinzel', serif; font-size: 1.1em; font-weight: 800; }

.sortir-history-actions { display: flex; gap: 5px; }
.sortir-history-btn {
    width: 26px; height: 26px; border-radius: 50%; border: none; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.7em; transition: all 0.2s ease; color: #fff;
}
.btn-sortir-edit { background: #3498db; }
.btn-sortir-edit:hover { background: #2980b9; transform: scale(1.15); box-shadow: 0 2px 10px rgba(52, 152, 219, 0.5); }
.btn-sortir-delete { background: #e74c3c; }
.btn-sortir-delete:hover { background: #c0392b; transform: scale(1.15); box-shadow: 0 2px 10px rgba(231, 76, 60, 0.5); }

@media (max-width: 768px) {
    .sortir-history-details { grid-template-columns: 1fr; }
    .sortir-history-top { flex-wrap: wrap; }
}

/* =========================================
   THEME TOGGLE
   ========================================= */
.theme-toggle-btn {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(212,175,55,0.4);
    color: #D4AF37; padding: 8px 14px; border-radius: 25px; cursor: pointer;
    font-size: 0.85em; font-weight: 600; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 6px; font-family: 'Poppins', sans-serif;
}
.theme-toggle-btn:hover { background: rgba(212,175,55,0.2); box-shadow: 0 0 12px rgba(212,175,55,0.3); }

/* =========================================
   LIGHT THEME
   ========================================= */
body.theme-light { color: #333 !important; background-color: #f0f2f5 !important; }
body.theme-light::before { background: rgba(240, 242, 245, 0.95) !important; }
body.theme-light .container {
    background: rgba(255, 255, 255, 0.98) !important; border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08) !important;
}
body.theme-light header {
    background: linear-gradient(180deg, #ffffff, #fafafa) !important;
    border-bottom-color: rgba(0,0,0,0.06) !important; box-shadow: 0 2px 15px rgba(0,0,0,0.03) !important;
}
body.theme-light header h1 { color: #6b5200 !important; text-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; }
body.theme-light header h1 i { color: #6b5200 !important; }
body.theme-light header span, body.theme-light #userInfo { color: #555 !important; }
body.theme-light #userInfo strong { color: #333 !important; }
body.theme-light #userInfo span[style] { color: #6b5200 !important; }

body.theme-light .main-content .tab-nav { background: #fafafa !important; border-bottom: 1px solid #e0e0e0 !important; }
body.theme-light .tab-btn { color: #777 !important; border-bottom: 3px solid transparent !important; }
body.theme-light .tab-btn:hover { background: rgba(0,0,0,0.02) !important; color: #333 !important; }
body.theme-light .tab-btn.active {
    background: rgba(212,175,55,0.08) !important; color: #6b5200 !important;
    border-bottom: 3px solid #9a7b1a !important; text-shadow: none !important;
}

body.theme-light .form-group label { color: #555 !important; }
body.theme-light .form-group input, body.theme-light .form-group select {
    background: #ffffff !important; border: 1px solid #dcdcdc !important; color: #333 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03) !important;
}
body.theme-light .form-group input:focus, body.theme-light .form-group select:focus {
    border-color: #9a7b1a !important; box-shadow: 0 0 0 3px rgba(212,175,55,0.15) !important;
}
body.theme-light input[type="date"] {
    color-scheme: light !important; -webkit-color-scheme: light !important;
    background-color: #fff !important; color: #333 !important; border: 1px solid #dcdcdc !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.03) !important;
}
body.theme-light input[type="date"]::-webkit-datetime-edit { color: #333 !important; }
body.theme-light input[type="date"]::-webkit-datetime-edit-fields { color: #888 !important; }
body.theme-light input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(30%) !important; opacity: 0 !important; cursor: pointer !important;
}

body.theme-light .total-display {
    background: #f9f9f9 !important; border: 1px solid #e0e0e0 !important; color: #333 !important;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.05) !important;
}
body.theme-light .total-display.large { color: #6b5200 !important; background: rgba(212,175,55,0.08) !important; }
body.theme-light .total-jualblok-display { background: rgba(142,68,173,0.05) !important; border-color: rgba(142,68,173,0.2) !important; color: #6c3483 !important; }

body.theme-light .btn-buy, body.theme-light .btn-sell { box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; }
body.theme-light .btn-buy:hover, body.theme-light .btn-sell:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.15) !important; filter: contrast(1.05) !important; }
body.theme-light .btn-logout { background: #fff !important; border-color: #ccc !important; color: #555 !important; }
body.theme-light .btn-logout:hover { background: #6b5200 !important; color: #fff !important; border-color: #6b5200 !important; }
body.theme-light .theme-toggle-btn { background: #fff !important; border-color: #ccc !important; color: #555 !important; }
body.theme-light .theme-toggle-btn:hover { background: #f0f0f0 !important; box-shadow: 0 0 0 2px rgba(0,0,0,0.1) !important; }

body.theme-light .riwayat-header h3 { color: #6b5200 !important; }
body.theme-light .search-container { background: #fff !important; border: 1px solid #dcdcdc !important; }
body.theme-light .search-container:focus-within { border-color: #9a7b1a !important; box-shadow: 0 0 0 3px rgba(212,175,55,0.15) !important; }
body.theme-light .btn-search { background: #6b5200 !important; color: #fff !important; }
body.theme-light .btn-clear-search { background: #e0e0e0 !important; color: #333 !important; }
body.theme-light .btn-clear-search:hover { background: #d32f2f !important; color: #fff !important; }
body.theme-light .btn-print { background: linear-gradient(45deg, #2980b9, #3498db) !important; box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important; }

body.theme-light .riwayat-item { background: #fff !important; border: 1px solid rgba(0,0,0,0.06) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important; }
body.theme-light .riwayat-item:hover { background: #fafafa !important; box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important; }
body.theme-light .riwayat-item.beli { border-left: 4px solid #27ae60 !important; }
body.theme-light .riwayat-item.jual { border-left: 4px solid #e74c3c !important; }
body.theme-light .riwayat-item.jual_blok { border-left: 4px solid #8e44ad !important; background: rgba(142,68,173,0.03) !important; }
body.theme-light .riwayat-item h4 { color: #6b5200 !important; }
body.theme-light .riwayat-item p { color: #555 !important; }
body.theme-light .riwayat-item p[style*="3498db"] { color: #1a6da8 !important; }
body.theme-light .kadar-info { color: #5b2c7a !important; }
body.theme-light .badge-jualblok { background: linear-gradient(135deg, #7d3c98, #6c3483) !important; color: #fff !important; }
body.theme-light .badge-dp { background: linear-gradient(135deg, #e67e22, #d35400) !important; color: #fff !important; }
body.theme-light .badge-lunas { background: linear-gradient(135deg, #27ae60, #1e8449) !important; color: #fff !important; }
body.theme-light .btn-pelunasan { background: linear-gradient(135deg, #e67e22, #f39c12) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important; }
body.theme-light .dp-toggle-label { border-color: rgba(0,0,0,0.1) !important; background: #f8f8f8 !important; color: #666 !important; }
body.theme-light .dp-toggle-option input[type="radio"]:checked + .dp-toggle-label {
    border-color: #B8860B !important; background: rgba(184, 134, 11, 0.08) !important; color: #B8860B !important;
}
body.theme-light .btn-edit { background: #2980b9 !important; }
body.theme-light .btn-delete { background: #c0392b !important; }
body.theme-light .btn-print-small { background: #138d75 !important; }

body.theme-light .history-col { background: rgba(255,255,255,0.5) !important; border: 1px solid rgba(0,0,0,0.05) !important; }
body.theme-light [style*="border-bottom:2px solid #27ae60"] { border-bottom-color: #1a7a3a !important; color: #1a7a3a !important; }
body.theme-light [style*="border-bottom:2px solid #e74c3c"] { border-bottom-color: #b82020 !important; color: #b82020 !important; }

body.theme-light .summary-beli { box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important; }
body.theme-light .summary-jual { box-shadow: 0 5px 15px rgba(0,0,0,0.1), 0 0 15px rgba(231,76,60,0.1) !important; }
body.theme-light .summary-jualblok { box-shadow: 0 5px 15px rgba(0,0,0,0.1), 0 0 15px rgba(142,68,173,0.1) !important; }
body.theme-light .summary-item span { color: rgba(0,0,0,0.6) !important; }
body.theme-light .summary-item strong { color: #000 !important; text-shadow: none !important; }

body.theme-light .finance-footer { background: #ffffff !important; border: 1px solid rgba(0,0,0,0.06) !important; box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important; }
body.theme-light .finance-footer div[style*="D4AF37"], body.theme-light .finance-footer div[style*="d4af37"] { color: #6b5200 !important; border-bottom-color: rgba(0,0,0,0.1) !important; }
body.theme-light .stat-row { background: #fafafa !important; border: 1px solid rgba(0,0,0,0.05) !important; }
body.theme-light .stat-label { color: #666 !important; }
body.theme-light .stat-value { color: #333 !important; }
body.theme-light .stat-value.profit { color: #1e8449 !important; text-shadow: none !important; }
body.theme-light .stat-value.loss { color: #c0392b !important; text-shadow: none !important; }

body.theme-light .finance-card { background: #ffffff !important; border: 1px solid rgba(0,0,0,0.08) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important; }
body.theme-light .finance-card::before { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent) !important; }
body.theme-light .finance-card h3 { background: #f0f0f0 !important; color: #555 !important; }
body.theme-light .finance-card .btn { background: #f0f0f0 !important; color: #555 !important; border: 1px solid #dcdcdc !important; }
body.theme-light .card-gold .value { color: #6b5200 !important; text-shadow: none !important; }
body.theme-light .card-gold .card-icon { color: #6b5200 !important; text-shadow: none !important; }
body.theme-light .card-gold .btn:hover { background: rgba(212,175,55,0.1) !important; border-color: #6b5200 !important; color: #6b5200 !important; }
body.theme-light .card-red .value { color: #c0392b !important; text-shadow: none !important; }
body.theme-light .card-red .card-icon { color: #c0392b !important; text-shadow: none !important; }
body.theme-light .card-red .btn:hover { background: rgba(231,76,60,0.1) !important; border-color: #c0392b !important; color: #c0392b !important; }
body.theme-light .card-blue .value { color: #2471a3 !important; text-shadow: none !important; }
body.theme-light .card-blue .card-icon { color: #2471a3 !important; text-shadow: none !important; }
body.theme-light .card-blue .btn:hover { background: rgba(52,152,219,0.1) !important; border-color: #2471a3 !important; color: #2471a3 !important; }

body.theme-light .list-ops-item { background: #fff !important; border: 1px solid rgba(0,0,0,0.06) !important; box-shadow: 0 2px 5px rgba(0,0,0,0.03) !important; }
body.theme-light .list-ops-item:hover { background: rgba(231,76,60,0.03) !important; border-color: rgba(231,76,60,0.15) !important; }
body.theme-light .ops-info strong { color: #333 !important; }
body.theme-light .ops-info p { color: #666 !important; }
body.theme-light .ops-date { color: #6b5200 !important; }
body.theme-light .ops-delete-left { background: rgba(231,76,60,0.08) !important; border-color: rgba(231,76,60,0.2) !important; color: #c0392b !important; }
body.theme-light .ops-delete-left:hover { background: #e74c3c !important; color: #fff !important; }

body.theme-light .sortir-header-card { background: #fff !important; border-color: rgba(0,0,0,0.08) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important; }
body.theme-light .sortir-header-icon { color: #6b5200 !important; text-shadow: none !important; }
body.theme-light .sortir-header-card h3 { color: #777 !important; }
body.theme-light .sortir-header-value { color: #6b5200 !important; text-shadow: none !important; }
body.theme-light .sortir-result-card { background: #fff !important; border-color: rgba(0,0,0,0.06) !important; box-shadow: 0 5px 20px rgba(0,0,0,0.04) !important; }
body.theme-light .sortir-result-row span { color: #777 !important; }
body.theme-light .sortir-result-row strong { color: #333 !important; }
body.theme-light .sortir-divider { background: linear-gradient(90deg, transparent, #ddd, transparent) !important; }
body.theme-light .status-neutral { background: #f5f5f5 !important; color: #888 !important; border-color: #ddd !important; }
body.theme-light .status-pass { background: rgba(46,204,113,0.08) !important; color: #1e8449 !important; border-color: #27ae60 !important; text-shadow: none !important; box-shadow: none !important; }
body.theme-light .status-plus { background: rgba(243,156,18,0.08) !important; color: #b87800 !important; border-color: #f39c12 !important; text-shadow: none !important; box-shadow: none !important; }
body.theme-light .status-minus { background: rgba(231,76,60,0.08) !important; color: #b82020 !important; border-color: #e74c3c !important; text-shadow: none !important; box-shadow: none !important; }
body.theme-light .sortir-history-item { background: #fff !important; border-color: rgba(0,0,0,0.06) !important; }
body.theme-light .sortir-history-date { color: #6b5200 !important; }
body.theme-light .badge-pass { background: rgba(46,204,113,0.1) !important; color: #1e8449 !important; border-color: rgba(46,204,113,0.3) !important; }
body.theme-light .badge-plus { background: rgba(243,156,18,0.1) !important; color: #b87800 !important; border-color: rgba(243,156,18,0.3) !important; }
body.theme-light .badge-minus { background: rgba(231,76,60,0.1) !important; color: #b82020 !important; border-color: rgba(231,76,60,0.3) !important; }

body.theme-light .modal-content { background: #ffffff !important; border: 1px solid rgba(0,0,0,0.1) !important; box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important; }
body.theme-light .modal-body-luxury { background: #ffffff !important; box-shadow: none !important; }
body.theme-light .input-luxury { background: #f9f9f9 !important; border-color: #dcdcdc !important; color: #333 !important; }
body.theme-light .input-luxury:focus { background: #fff !important; border-color: #9a7b1a !important; color: #333 !important; box-shadow: 0 0 0 3px rgba(212,175,55,0.15) !important; }
body.theme-light .label-luxury { color: #555 !important; text-shadow: none !important; }

body.theme-light .finance-grid + div, body.theme-light #sortir > div:last-child { background: #f9f9f9 !important; border-color: #e0e0e0 !important; }
body.theme-light .finance-grid + div h4, body.theme-light #sortir > div:last-child h4 { color: #6b5200 !important; }
body.theme-light .finance-grid + div li, body.theme-light #sortir > div:last-child li { color: #555 !important; }

body.theme-light [style*="D4AF37"], body.theme-light [style*="d4af37"] { color: #6b5200 !important; }
body.theme-light [style*="color:#ccc"], body.theme-light [style*="color: #ccc"] { color: #666 !important; }

body.theme-light ::-webkit-scrollbar-track { background: #f0f0f0 !important; }
body.theme-light ::-webkit-scrollbar-thumb { background: #c1c1c1 !important; }
body.theme-light ::-webkit-scrollbar-thumb:hover { background: #a8a8a8 !important; }

/* =========================================
   PELANGGAN & KASBON STYLES
   ========================================= */
.pelanggan-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:25px; flex-wrap:wrap; gap:15px; }
.pelanggan-header h3 { color:#D4AF37; font-family:'Cinzel',serif; font-size:1.4em; letter-spacing:1px; }
.pelanggan-summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:15px; margin-bottom:25px; }
.pelanggan-sum-card { display:flex; align-items:center; gap:15px; padding:18px; border-radius:14px; border:1px solid rgba(255,255,255,0.08); background:linear-gradient(145deg,rgba(0,0,0,0.4),rgba(20,20,20,0.7)); transition:transform 0.3s ease; }
.pelanggan-sum-card:hover { transform:translateY(-3px); }
.pelanggan-sum-card > i { font-size:2em; }
.sum-info { display:flex; flex-direction:column; }
.sum-info small { color:#888; font-size:0.78em; text-transform:uppercase; letter-spacing:0.5px; }
.sum-info strong { font-family:'Cinzel',serif; font-size:1.2em; }
.card-sum-total > i { color:#D4AF37; }
.card-sum-total > .sum-info strong { color:#D4AF37; }
.card-sum-kasbon > i { color:#e74c3c; }
.card-sum-lunas > i { color:#27ae60; }
.card-sum-lunas > .sum-info strong { color:#27ae60; }
.pelanggan-list { max-height:65vh; overflow-y:auto; padding-right:5px; }
.pelanggan-list::-webkit-scrollbar { width:6px; }
.pelanggan-list::-webkit-scrollbar-track { background:rgba(255,255,255,0.03); border-radius:10px; }
.pelanggan-list::-webkit-scrollbar-thumb { background:linear-gradient(to bottom,#D4AF37,#AA771C); border-radius:10px; }
.pelanggan-card { display:flex; justify-content:space-between; align-items:center; gap:15px; background:linear-gradient(145deg,rgba(255,255,255,0.04),rgba(255,255,255,0.01)); border:1px solid rgba(255,255,255,0.06); border-radius:14px; padding:18px 20px; margin-bottom:12px; cursor:pointer; transition:all 0.3s ease; position:relative; }
.pelanggan-card:hover { background:rgba(255,255,255,0.07); border-color:rgba(212,175,55,0.2); transform:translateX(4px); box-shadow:0 4px 15px rgba(0,0,0,0.2); }
.pelanggan-card-left { display:flex; align-items:center; gap:15px; flex:1; min-width:0; }
.pelanggan-avatar { width:48px; height:48px; border-radius:50%; background:linear-gradient(135deg,rgba(212,175,55,0.15),rgba(212,175,55,0.05)); border:2px solid rgba(212,175,55,0.3); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:#D4AF37; font-size:1.2em; }
.pelanggan-card-info { min-width:0; }
.pelanggan-card-info h4 { color:#fff; font-family:'Cinzel',serif; font-size:1.05em; margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pelanggan-card-info p { color:#999; font-size:0.82em; margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pelanggan-card-info p i { color:#666; margin-right:5px; width:14px; text-align:center; }
.pelanggan-card-right { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.pelanggan-kasbon-badge { padding:3px 10px; border-radius:6px; font-size:0.7em; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; }
.pelanggan-card-actions { display:flex; gap:5px; opacity:0; transition:opacity 0.3s ease; }
.pelanggan-card:hover .pelanggan-card-actions { opacity:1; }
.kasbon-history-item { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid rgba(255,255,255,0.04); }
.kasbon-history-item:last-child { border-bottom:none; }
.kasbon-hist-left { display:flex; align-items:center; gap:12px; flex:1; min-width:0; }
.kasbon-hist-icon { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:0.85em; }
.kasbon-hist-info { min-width:0; }
.kasbon-hist-info strong { display:block; font-size:0.85em; text-transform:uppercase; letter-spacing:0.5px; }
.kasbon-hist-info p { color:#aaa; font-size:0.82em; margin:2px 0; }
.kasbon-hist-info small { color:#666; font-size:0.75em; }
.kasbon-hist-right { display:flex; flex-direction:column; align-items:flex-end; flex-shrink:0; }
@media (max-width:768px) {
    .pelanggan-summary-grid { grid-template-columns:1fr; }
    .pelanggan-header { flex-direction:column; align-items:stretch; }
    .pelanggan-card { flex-direction:column; align-items:flex-start; gap:12px; }
    .pelanggan-card-right { flex-direction:row; align-items:center; width:100%; justify-content:space-between; }
    .pelanggan-card-actions { opacity:1; }
}

/* =========================================
   AUTOCOMPLETE PELANGGAN
   ========================================= */
.pelanggan-suggestion {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    max-height: 250px; /* Tambah sedikit tingginya */
    overflow-y: auto;
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid #D4AF37;
    border-radius: 10px;
    
    /* ðŸ”¥ PERBAIKAN UTAMA: TINGKATKAN Z-INDEX */
    z-index: 9999 !important; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 20px rgba(212,175,55,0.4);
    margin-top: 4px;
}
.pelanggan-suggestion::-webkit-scrollbar { width: 6px; }
.pelanggan-suggestion::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 10px; }
.pelanggan-suggestion::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, #D4AF37, #AA771C); border-radius: 10px; }

.pelanggan-suggestion-item {
    padding: 12px 15px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.2s;
}
.pelanggan-suggestion-item:hover { background: rgba(212, 175, 55, 0.15); }
.pelanggan-suggestion-item:last-child { border-bottom: none; }

.suggestion-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.suggestion-info strong { color: #fff; font-size: 0.95em; }
.suggestion-info small { color: #888; font-size: 0.78em; background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 4px; }
.suggestion-alamat { color: #aaa; font-size: 0.82em; margin-top: 5px; }
.suggestion-alamat i { color: #3498db; margin-right: 5px; font-size: 0.85em; }

body.theme-light .pelanggan-suggestion { background: #fff; border-color: #dcdcdc; box-shadow: 0 10px 30px rgba(0,0,0,0.12); }
body.theme-light .pelanggan-suggestion-item:hover { background: rgba(212,175,55,0.08); }
@media (max-width: 500px) { .suggestion-info { flex-direction: column; align-items: flex-start; gap: 2px; } .suggestion-info small { margin-top: 2px; } }

/* =========================================
   INPUT KASBON DI INFO BOX
   ========================================= */
#kasbonInputArea .input-luxury {
    border: 1px solid #D4AF37; color: #fff; text-align: right; font-family: 'Poppins', sans-serif;
}
body:not(.theme-light) #kasbonInputArea .input-luxury { background: rgba(0,0,0,0.5); }
body.theme-light #kasbonInputArea .input-luxury { background: #fff; color: #333; }

/* =========================================
   FIX TABS
   ========================================= */
.tab-content:not(.active) {
    display: none !important; visibility: hidden; opacity: 0; height: 0; overflow: hidden;
}
.tab-content.active {
    display: block !important; visibility: visible; opacity: 1; height: auto; overflow: visible;
}
/* =========================================
   PERBAIKAN ICON & TOMBOL AKSI KEUANGAN
   ========================================= */

/* Container untuk tombol di header */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Base style untuk tombol aksi (Catat & Refresh) */
.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-family: 'Poppins', sans-serif;
}

/* Tombol Catat Pemasukan (Hijau) */
.btn-action-green {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}
.btn-action-green:hover {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

/* Tombol Catat Pengeluaran (Merah) */
.btn-action-red {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}
.btn-action-red:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Tombol Refresh (Icon Putar) */
.btn-action-refresh {
    background: rgba(255,255,255,0.05);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 12px; /* Padding lebih kecil agar pas untuk ikon */
    font-size: 1.1em;
    border-radius: 8px;
}
.btn-action-refresh:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #FFD700;
    transform: rotate(180deg); /* Efek berputar saat di-hover */
    border-color: #D4AF37;
}

/* Perbaikan tombol reset/refresh di baris filter tanggal */
.ops-search-row .btn-clear-search {
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   SUPPORT LIGHT THEME (MODE PUTIH)
   ========================================= */
body.theme-light .btn-action-green {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
body.theme-light .btn-action-red {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
body.theme-light .btn-action-refresh {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #dcdcdc;
}
body.theme-light .btn-action-refresh:hover {
    background: #e0e0e0;
    color: #333;
}
.history-wrapper .history-col:last-child .riwayat-list{
    min-height: 650px;
}
/* =========================================
   MONTH INPUT STYLING
   ========================================= */
input[type="month"] {
    position: relative;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(212,175,55,0.4);
    padding: 12px 45px 12px 12px;
    border-radius: 10px;
    font-size: 16px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}
input[type="month"]::-webkit-calendar-picker-indicator {
    opacity: 0; display: block; cursor: pointer;
    filter: invert(1) brightness(2);
    position: absolute; right: 12px;
}
input[type="month"]::-webkit-datetime-edit { color: #fff; }

/* Light theme override untuk month input */
body.theme-light input[type="month"] {
    color-scheme: light !important; -webkit-color-scheme: light !important;
    background-color: #fff !important; color: #333 !important; border: 1px solid #dcdcdc !important;
}
body.theme-light input[type="month"]::-webkit-datetime-edit { color: #333 !important; }
body.theme-light input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(30%) !important; opacity: 0 !important; cursor: pointer !important;
}
