:root {
    --bg-gradient: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    --container-bg: rgba(255, 255, 255, 0.96);
    --text-main: #4a4a4a; --text-muted: #636e72;
    --input-bg: #fafafa; --input-border: #e2e8f0;
    --card-bg: #ffffff; --highlight: #6a82fb;
    --laba-bg: #f0fdf4; --laba-border: #86efac;
    --laba-bulanan-bg: #f0f8ff; --laba-bulanan-border: #8cc4ef;
    --modal-overlay: rgba(0, 0, 0, 0.5); --nav-bg: rgba(255, 255, 255, 0.9);
}
body.dark-mode {
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --container-bg: #1f2937; --text-main: #f3f4f6; --text-muted: #9ca3af;
    --input-bg: #374151; --input-border: #4b5563; --card-bg: #273340;
    --nav-bg: rgba(31, 41, 55, 0.9); --modal-overlay: rgba(0, 0, 0, 0.8);
}
body { font-family: 'Quicksand', sans-serif; background: var(--bg-gradient); margin: 0; min-height: 100vh; padding-bottom: 120px; transition: background 0.4s; }
.container { width: 95%; max-width: 700px; margin: auto; background: var(--container-bg); padding: 25px; border-radius: 24px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); position: relative; box-sizing: border-box; }
.view { display: none; animation: fadeIn 0.4s; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.header-row h2 {
    flex: 1;
    text-align: center;
    margin: 0;
    padding-left: 40px;
}

.btn-tema {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    transition: transform 0.2s;
}

.btn-tema:hover {
    transform: scale(1.1);
}

h2 { text-align: center; color: var(--highlight); font-weight: 700; }
.pengaturan-toko { background: var(--card-bg); padding: 15px; border-radius: 16px; border: 2px dashed #a29bfe; margin-bottom: 20px; text-align: center; }
.input-toko { font-size: 1.2em; font-weight: 700; color: var(--text-main); border: none; background: transparent; width: 100%; text-align: center; }
.input-jadwal { font-size: 0.85em; color: var(--text-muted); border: none; background: transparent; width: 100%; text-align: center; }
label { font-weight: 600; display: block; margin-top: 15px; font-size: 0.9em; }
input, select { width: 100%; padding: 12px; margin-top: 5px; border: 2px solid var(--input-border); border-radius: 12px; font-family: inherit; background: var(--input-bg); color: var(--text-main); box-sizing: border-box; }
button { width: 100%; padding: 14px; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: inherit; }
.btn-utama { background: linear-gradient(135deg, #fc99b9, #ffb199); color: white; margin-top: 20px; }
.btn-batal { background: #dfe6e9; color: #636e72; margin-top: 10px; display: none; }
.rekap-container { 
    display: grid; 
    grid-template-columns: 1fr 1fr;
    gap: 10px; 
    margin-top: 20px; 
}
.laba-box { flex: 1; padding: 12px; background: var(--laba-bg); border-radius: 16px; text-align: center; border: 2px dashed var(--laba-border); }
.laba-box.bulanan { background: var(--laba-bulanan-bg); border-color: var(--laba-bulanan-border); }
.angka-laba { font-size: 1.1em; font-weight: 700; display: block; margin-top: 5px; }
.text-hijau { color: #10b981; } .text-biru { color: #3b82f6; }
.input-cari { border: 2px solid #a29bfe; margin: 20px 0 10px 0; border-radius: 20px; padding: 10px 15px; }
.kartu-riwayat { background: var(--card-bg); padding: 15px; margin-top: 10px; border-radius: 16px; border-left: 6px solid #a29bfe; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.grup-tombol { display: flex; gap: 5px; margin-top: 10px; }
.grup-tombol button { padding: 8px; font-size: 0.8em; }
.btn-wa { background: #4ae38c; color: white; }
.btn-edit-kartu { background: #74b9ff; color: white; }
.btn-hapus { background: #ff7675; color: white; }
.table-responsive { overflow-x: auto; margin-top: 10px; border-radius: 12px; }
.ledger-table { width: 100%; border-collapse: collapse; background: var(--card-bg); font-size: 0.85em; }
.ledger-table th { background: var(--input-bg); padding: 12px; border-bottom: 2px solid var(--input-border); }
.ledger-table td { padding: 12px; border-bottom: 1px solid var(--input-border); }
.clickable-debit { background: rgba(16, 185, 129, 0.05); cursor: pointer; color: #10b981; font-weight: 700; text-align: center; }
.clickable-cell { background: rgba(255, 118, 117, 0.05); cursor: pointer; color: #ff7675; font-weight: 700; text-align: center; }
.bottom-nav { position: fixed; bottom: 38px; left: 0; width: 100%; height: 65px; background: var(--nav-bg); backdrop-filter: blur(10px); display: flex; justify-content: space-around; align-items: center; z-index: 1000; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.nav-item svg { width: 22px; height: 22px; margin-bottom: 2px; }
.nav-item.active { color: var(--highlight); }
.floating-copyright { position: fixed; bottom: 0; left: 0; width: 100%; height: 38px; background: var(--input-bg); text-align: center; font-size: 10px; display: flex; flex-direction: column; justify-content: center; z-index: 1005; border-top: 1px solid var(--input-border); color: var(--text-muted); }
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: var(--modal-overlay); display:none; justify-content:center; align-items:center; z-index:2000; backdrop-filter: blur(3px); }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--container-bg); padding: 25px; border-radius: 20px; width: 85%; max-width: 320px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.modal-actions { display: flex; gap: 10px; margin-top: 15px; }
.modal-actions button { flex: 1; }