/* UTILITIES & SPACING */
.m-0 { margin: 0; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mb-5 { margin-bottom: 5px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.ml-10 { margin-left: 10px; }
.p-15 { padding: 15px; }
.px-15 { padding-left: 15px; padding-right: 15px; }
.pb-10 { padding-bottom: 10px; }
.py-10 { padding-top: 10px; padding-bottom: 10px; }
.fw-bold { font-weight: bold; }
.fs-10 { font-size: 10px; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex-between-center { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.d-none { display: none !important; }
.d-block { display: block; }
.border-bottom { border-bottom: 1px solid var(--color-border); }
.border-none { border: none !important; }
.cursor-pointer { cursor: pointer; }
.w-100 { width: 100%; }
.h-200 { height: 200px; }
.sticky-top { position: sticky; top: 0; z-index: 100; }

/* TEXT & BG COLORS */
.text-success, .text-income, .text-green { color: var(--color-success); }
.text-expense, .text-red { color: var(--color-danger); }
.text-info { color: var(--color-info); }
.text-warning { color: var(--color-warning); }
.text-pink { color: var(--color-pink); }
.text-muted { color: var(--color-text-muted); }
.text-white { color: #ffffff; }

.bg-expense { background-color: var(--color-danger); color: white; }
.bg-green { background-color: var(--color-success); color: white; }
.bg-pink { background-color: var(--color-pink); color: white; }
.bg-dark { background-color: var(--color-dark); color: white; }
.bg-info { background-color: var(--color-info); color: white; }
.bg-warning { background-color: var(--color-warning); color: #000; }
.bg-gradient-blue { background: linear-gradient(135deg, #2980b9, #3498db); }

/* FORMS & INPUTS */
input, select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 13px;
    background-color: var(--color-bg);
    color: var(--color-text);
    outline: none;
    box-sizing: border-box;
    transition: 0.2s;
}
input:focus, select:focus { border-color: var(--color-primary); }
select { min-height: 45px; display: block; position: relative; cursor: pointer; }
label { font-size: 11px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 4px; display: block; }

/* BUTTONS */
.btn-primary {
    width: 100%;
    background: var(--color-primary);
    color: white;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
}
.btn-aksi {
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    transition: 0.2s;
}
.btn-kembali {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 10px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--color-card);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    border-top: 1px solid var(--color-border);
    z-index: 1000;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.nav-item {
    color: var(--color-text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    gap: 4px;
}
.nav-item i { font-size: 18px; }
.nav-item.active { color: var(--color-primary); }
.nav-fab {
    background: var(--color-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    margin-top: -35px;
    box-shadow: 0 6px 12px rgba(27,94,32,0.3);
    border: 4px solid var(--color-bg);
    transition: transform 0.2s;
}

/* BOTTOM SHEET MODAL & TOAST */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}
.bottom-sheet-overlay.active { opacity: 1; pointer-events: all; }
.bottom-sheet {
    background: var(--color-card);
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px 15px;
    transform: translateY(100%);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
    max-height: 90vh;
}
.bottom-sheet-overlay.active .bottom-sheet { transform: translateY(0); }
.sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.sheet-title { margin: 0; font-size: 16px; font-weight: bold; color: var(--color-text); }
.btn-close-sheet { background: none; border: none; font-size: 24px; color: var(--color-text-muted); cursor: pointer; }

#custom-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 12px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.toast-hidden { opacity: 0; top: -50px; pointer-events: none; }

.view-section { 
    display: none; 
    animation: fadeIn 0.2s ease-in-out; 
} 

.view-section.active { 
    display: block; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(8px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* QUICK ACTIONS */
.quick-action-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
}
.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    text-align: center;
}
.quick-action-item i { 
    font-size: 20px; 
    margin-bottom: 2px; 
}

/* SETTINGS ITEM */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

/* Modifikasi tipis khusus dark mode agar lebih menyatu */
[data-theme="dark"] .settings-item {
    background: rgba(255,255,255,0.03);
}

/* =========================================
   KOMPONEN & UTILITIES YANG TERTINGGAL
   ========================================= */

/* PROGRESS BAR */
.progress-wrapper {
    background: var(--color-bg);
    border-radius: 8px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-top: 4px;
}
.progress-fill { height: 100%; border-radius: 8px; transition: width 0.3s ease; }

/* HALAMAN LOGIN */
.login-screen {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.login-container {
    background: var(--color-card);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    width: 85%;
    max-width: 320px;
    text-align: center;
    border: 1px solid var(--color-border);
}

/* CONFIRM MODAL & AUTOCOMPLETE */
.modal-overlay, #custom-confirm {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.2s;
}
.confirm-hidden { opacity: 0; pointer-events: none; }
.modal-box, .confirm-box {
    background: var(--color-card);
    padding: 20px;
    border-radius: var(--radius-md);
    width: 85%;
    max-width: 320px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transform: scale(0.95);
    transition: transform 0.2s;
}
.modal-overlay:not(.confirm-hidden) .modal-box, #custom-confirm:not(.confirm-hidden) .confirm-box { transform: scale(1); }
#confirm-msg { font-size: 14px; margin-bottom: 15px; color: var(--color-text); text-align: center; }
.confirm-actions, .modal-actions { display: flex; gap: 10px; justify-content: center; }

.autocomplete-wrapper { position: relative; width: 100%; display: block; }
.autocomplete-list {
    position: absolute;
    top: calc(100% - 12px);
    left: 0;
    right: 0;
    background: var(--color-card);
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    font-size: 12px;
    color: var(--color-text);
    transition: 0.2s;
}
.autocomplete-item:hover { background-color: var(--color-primary); color: white; font-weight: bold; }

/* UTILITIES & LAINNYA */
.filter-input { margin: 0; padding: 8px; }
.input-search { flex: 1; min-width: 120px; }
.input-auto-width { width: auto; }
.beta-banner {
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 6px;
    font-size: 11px;
    font-weight: bold;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.logo-preview-img { width: 50px; height: 50px; object-fit: cover; border-radius: 50%; }
.paylater-due-container { background: rgba(231, 76, 60, 0.1); border: 1px dashed var(--color-danger); border-radius: 8px; }
.input-amount-large { font-size: 24px; font-weight: bold; color: var(--color-primary); }
.sheet-tall { max-height: 95vh; }
.budget-card {
    padding: 10px 12px;
    margin-bottom: 8px;
    background: var(--color-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-left-style: solid;
}
.wallet-icon-placeholder {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    color: var(--color-text);
}
.gap-10 { gap: 10px; }
.goal-card-main {
    background: var(--color-card);
    padding: 15px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    margin-bottom: 12px;
}
.goal-home-card { border-left: 4px solid var(--color-pink); }
.border-dashed-bottom { border-bottom: 1px dashed var(--color-border); }
.paylater-bg { background: rgba(231, 76, 60, 0.03); border-left-color: var(--color-pink); }
.border-left-pink { border-left: 4px solid var(--color-pink); }
.border-left-success { border-left: 4px solid var(--color-success); }
.border-left-info { border-left: 4px solid var(--color-info); }

/* FITUR SPLIT TRANSAKSI & OFFLINE MODE */
.split-trx-container {
    background: rgba(52, 152, 219, 0.05); 
    border: 1px dashed var(--color-info); 
    border-radius: 8px;
}
.split-ui-container {
    border-color: rgba(52, 152, 219, 0.3);
}
body.offline-mode {
    border-top: 6px solid var(--color-danger);
}
body.offline-mode button[type="submit"] {
    opacity: 0.5;
    cursor: not-allowed;
}