/* CSS Variables and Design System */
:root {
    --lime: #b8f900;
    --lime-dark: #a2db00;
    --lime-glow: rgba(184, 249, 0, 0.4);
    --charcoal: #121212;
    --charcoal-light: #242424;
    --bg-light: #f4f4f5;
    --card-bg: #ffffff;
    --text-primary: #121212;
    --text-muted: #737373;
    --border-color: #e4e4e7;

    /* Layout Constants */
    --radius-large: 24px;
    --radius-medium: 16px;
    --radius-pill: 100px;

    /* Shadows */
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    min-height: 100%;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

/* Outer layout wrapper */
.desktop-wrapper {
    width: 100%;
    min-height: 100%;
    height: auto !important;
    display: block;
    background-color: #f8fafc;
    overflow: visible !important;
}

/* App Viewport: Widescreen Layout */
.app-viewport {
    width: 100%;
    min-height: 100%;
    height: auto !important;
    background-color: #f8fafc;
    position: relative;
    display: block;
    overflow: visible !important;
}

/* Hide scrollbar default behaviour */
.screen-tab::-webkit-scrollbar,
.transaction-list-container::-webkit-scrollbar,
.settings-container::-webkit-scrollbar {
    width: 6px;
}

.screen-tab::-webkit-scrollbar-thumb,
.transaction-list-container::-webkit-scrollbar-thumb,
.settings-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Tab Switching Layout */
.screen-tab {
    display: none;
    width: 100%;
    min-height: 100%;
    height: auto !important;
    overflow: visible !important;
    touch-action: pan-y !important;
    padding-bottom: 140px;
}

.screen-tab:not(.active) {
    display: none !important;
}

.screen-tab.active {
    display: block;
}

/* Common Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px 20px;
    background-color: var(--bg-light);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-container {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e4e4e7;
    border: 2px solid #ffffff;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon Buttons styling */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.05);
    background-color: #fafafa;
}

/* Supabase status indicator badge */
.status-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background-color: var(--lime);
    color: var(--charcoal);
    box-shadow: 0 0 10px rgba(184, 249, 0, 0.4);
}

.status-indicator.offline {
    background-color: #e4e4e7;
    color: #a1a1aa;
    border: 1px solid var(--border-color);
}

/* Balance Card (Neon Lime Green) */
.balance-card {
    background-color: var(--lime);
    color: var(--charcoal);
    margin: 10px 16px 16px 16px;
    padding: 24px;
    border-radius: var(--radius-large);
    box-shadow: 0 12px 35px rgba(184, 249, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.balance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.month-badge {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--charcoal);
}

.balance-amount-container {
    display: flex;
    align-items: baseline;
}

.currency-symbol {
    font-size: 1.4rem;
    font-weight: 600;
    margin-right: 4px;
}

.balance-val {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.decimal-zeros {
    font-size: 1.7rem;
    font-weight: 400;
    opacity: 0.65;
}

.balance-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.summary-inout {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 0.75rem;
    opacity: 0.6;
}

.summary-val {
    font-size: 0.85rem;
    font-weight: 700;
}

.btn-black-capsule {
    background-color: var(--charcoal);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-black-capsule:hover {
    background-color: var(--charcoal-light);
    transform: translateY(-1px);
}

/* Weekly Bar Chart Card (Clean Modern UX) */
.chart-card {
    background-color: var(--card-bg);
    margin: 0 16px 16px 16px;
    padding: 22px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

html.dark .chart-card {
    border-color: #26272B !important;
}

.weekly-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 110px;
    padding: 6px 4px 0 4px;
    gap: 6px;
}

.weekly-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease;
}

.weekly-bar-item:hover {
    transform: translateY(-2px);
}

.bar-track {
    width: 14px;
    height: 80px;
    background-color: #f1f5f9;
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

html.dark .bar-track {
    background-color: #26272B !important;
}

.bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #94a3b8;
    border-radius: var(--radius-pill);
    transform-origin: bottom;
    transform: scaleY(0.08);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

html.dark .bar-fill {
    background-color: #3F4147 !important;
}

.weekly-bar-item.active .bar-fill {
    background-color: #121212;
}

html.dark .weekly-bar-item.active .bar-fill {
    background-color: #bdf532 !important;
    box-shadow: 0 0 10px rgba(189, 245, 50, 0.35) !important;
}

.day-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 8px;
}

html.dark .day-label {
    color: #9ca3af !important;
}

.weekly-bar-item.active .day-label {
    color: #121212;
    font-weight: 800;
}

html.dark .weekly-bar-item.active .day-label {
    color: #bdf532 !important;
    font-weight: 800;
}

/* Table Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 10px 20px;
}

.section-header h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Transaction List Container */
.transaction-list-container {
    background-color: var(--card-bg);
    margin: 0 16px 20px 16px;
    padding: 16px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
    max-height: 250px;
    overflow-y: auto;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bg-light);
}

.transaction-table td {
    padding: 12px 0;
    font-size: 0.82rem;
    border-bottom: 1px solid #fafafa;
}

.transaction-table tr:last-child td {
    border-bottom: none;
    padding-bottom: 0;
}

.amount-income {
    color: #10b981;
    font-weight: 700;
}

.amount-expense {
    color: #ef4444;
    font-weight: 700;
}

.transaction-table th:last-child,
.transaction-table td:last-child {
    text-align: right;
}

.transaction-table td.date-col {
    color: var(--text-muted);
}

.sidebar-logo-wrapper {
    display: none;
}

/* Bottom Floating Capsule Navigation (mobile-first base) */
.bottom-nav-capsule {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background-color: var(--charcoal);
    border-radius: var(--radius-pill);
    padding: 8px 14px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 99999;
}

.nav-item {
    background: none;
    border: none;
    color: #737373;
    font-size: 1.2rem;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}

.nav-item.active {
    color: var(--charcoal) !important;
    background-color: var(--lime);
    box-shadow: 0 4px 15px var(--lime-glow);
}

.nav-tooltip {
    display: none;
}

.nav-center-wrapper {
    position: relative;
    top: -19px;
}

.nav-hump-bg {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 74px;
    height: 74px;
    background-color: var(--charcoal);
    border-radius: 50%;
    z-index: -1;
}

.nav-hump-bg::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: 100%;
    top: 24px;
    background: radial-gradient(circle at 0 0, transparent 16px, var(--charcoal) 0);
}

.nav-hump-bg::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 100%;
    top: 24px;
    background: radial-gradient(circle at 100% 0, transparent 16px, var(--charcoal) 0);
}

.nav-center-plus {
    background-color: var(--lime);
    color: var(--charcoal);
    border: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(184, 249, 0, 0.35);
    transition: all 0.2s ease;
}

.nav-center-plus i {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.nav-center-plus:hover {
    transform: scale(1.08) translateY(-2px);
    background-color: #c9ff33;
}

/* SLIDE-UP PANEL: TRANSACTION PANEL */
.transaction-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 9999999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    overflow: hidden;
}

.transaction-panel.active {
    visibility: visible;
    opacity: 1;
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999999;
}

.transaction-panel.active .panel-overlay {
    opacity: 1;
}

.panel-content {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 94vh;
    max-height: 94dvh;
    height: auto;
    background-color: #ffffff;
    border-radius: 28px 28px 0 0;
    padding: 16px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
    overscroll-behavior: contain;
}

.transaction-panel.active .panel-content {
    bottom: 0;
}

.drag-handle {
    width: 40px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: var(--radius-pill);
    margin: 0 auto 16px auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* Quick Date Selector Pills & Calendar Picker */
.quick-date-selector {
    background-color: #f3f4f6;
    padding: 3px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.quick-date-btn,
.date-badge {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-date-btn.active,
.date-badge.active {
    background-color: #ffffff !important;
    color: #111827 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
}

.quick-date-btn:not(.active):hover,
.date-badge:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #374151;
}

.icon-btn-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--charcoal);
    cursor: pointer;
}

.icon-btn-back:hover {
    background-color: var(--border-color);
}

.date-badge-wrapper {
    position: relative;
}

.hidden-date-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Let the visual date-badge look clickable and pass through clicks */
.date-badge {
    pointer-events: none !important;
}

/* Sibling hover effect trigger */
.hidden-date-input:hover + .date-badge:not(.active) {
    background-color: rgba(0, 0, 0, 0.06);
    color: #374151;
}

html.dark .hidden-date-input:hover + .date-badge:not(.active) {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}



.type-badge {
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-badge.expense {
    background-color: var(--lime);
    color: var(--charcoal);
}

.type-badge.income {
    background-color: var(--charcoal);
    color: #ffffff;
}

/* Projection text */
.transaction-projection {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.arrow-icon {
    width: 12px;
    height: 12px;
}

.expense-text {
    font-weight: 700;
    color: var(--charcoal);
}

/* Nominal Input Display */
.nominal-display-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-bottom: 16px;
}

.nominal-prefix {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-right: 4px;
}

.nominal-value-wrapper {
    display: flex;
    align-items: baseline;
}

.nominal-digits {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -1px;
}

/* Category Pill */
.category-selector-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    width: 100%;
    flex-shrink: 0; /* Mencegah penyusutan */
}

.category-input {
    width: 100%;
    max-width: 340px;
    background-color: #f4f4f5;
    color: #121212;
    border: 1.5px solid #e4e4e7;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
    outline: none !important;
    box-shadow: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.category-input::placeholder {
    color: #a1a1aa;
    font-weight: 500;
}

.category-input:focus {
    background-color: #ffffff;
    border-color: var(--lime-dark) !important;
    box-shadow: 0 0 0 3px rgba(184, 249, 0, 0.35) !important;
    outline: none !important;
}

.description-input {
    width: 100%;
    max-width: 340px;
    background-color: #f4f4f5;
    color: #121212;
    border: 1.5px solid #e4e4e7;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    outline: none !important;
    box-shadow: none;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.description-input::placeholder {
    color: #a1a1aa;
}

.description-input:focus {
    background-color: #ffffff;
    border-color: var(--lime-dark) !important;
    box-shadow: 0 0 0 3px rgba(184, 249, 0, 0.35) !important;
    outline: none !important;
}

/* Keypad Numeric */
.numeric-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: auto;
    padding-bottom: 8px;
}

.keypad-key {
    background-color: var(--bg-light);
    border: none;
    border-radius: var(--radius-medium);
    height: 44px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--charcoal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.15s;
}

.keypad-key span {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 1px;
}

.keypad-key:active {
    background-color: var(--border-color);
}

.keypad-key.empty-key {
    background-color: transparent;
    cursor: default;
}

.keypad-key.delete-key {
    color: var(--charcoal);
}

/* Save transaction button layout */
.save-btn-wrapper {
    margin-bottom: 12px;
}

.btn-lime {
    background-color: var(--lime);
    color: var(--charcoal);
    border: none;
    padding: 14px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--lime-glow);
}

.btn-lime:hover {
    background-color: var(--lime-dark);
}

.btn-lime:active {
    transform: scale(0.98);
}

/* Category Drawer Popup overlay inside panel */
.category-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background-color: #ffffff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    z-index: 105;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.category-drawer.active {
    transform: translateY(0);
}

.category-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.category-drawer-header h5 {
    font-size: 0.95rem;
    font-weight: 700;
}

.icon-btn-small {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--charcoal);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    overflow-y: auto;
    flex: 1;
}

.category-pill-btn {
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    padding: 10px;
    border-radius: var(--radius-medium);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.category-pill-btn:hover {
    background-color: var(--bg-light);
}

.category-pill-btn.selected {
    background-color: var(--lime);
    border-color: var(--lime);
    color: var(--charcoal);
    font-weight: 700;
}

/* RIWAYAT / SEARCH TAB SCREENS */
.history-header,
.settings-header {
    padding: 20px 20px 10px 20px;
}

.history-header h2,
.settings-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.search-filter-box {
    margin: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-input-wrapper {
    background-color: var(--card-bg);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-soft);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-input-wrapper input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.filter-dates-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.month-filter-wrapper,
.date-filter-wrapper {
    background-color: var(--card-bg);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-soft);
    width: 100%;
    min-width: 0;
}

.calendar-filter-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.month-input-filter,
.date-input-filter {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    min-width: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}

.filter-capsules {
    display: flex;
    gap: 8px;
}

.filter-capsule {
    background-color: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-capsule.active {
    background-color: var(--charcoal);
    border-color: var(--charcoal);
    color: #ffffff;
}

.reports-section {
    margin: 0 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-card {
    background-color: var(--card-bg);
    padding: 16px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
}

.report-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.chart-wrapper {
    position: relative;
    height: 150px;
    width: 100%;
}

.full-history {
    max-height: 350px; /* Desktop default - overridden on mobile */
}

.action-buttons {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.btn-edit-row,
.btn-delete-row {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, color 0.2s;
}

.btn-edit-row {
    color: var(--charcoal);
}

.btn-edit-row:hover {
    transform: scale(1.1);
    color: var(--lime-dark);
}

.btn-delete-row {
    color: #ef4444;
}

.btn-delete-row:hover {
    transform: scale(1.1);
    color: #dc2626;
}

/* SETTINGS TAB SCREENS */
.settings-container {
    padding: 0 16px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-soft);
}

.settings-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.settings-card-title i {
    width: 18px;
    height: 18px;
}

.settings-card-title.danger {
    color: #ef4444;
}

.settings-info {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: var(--radius-medium);
    font-size: 0.82rem;
    outline: none;
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--charcoal);
}

.supabase-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-medium);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.supabase-status-badge.offline {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.supabase-status-badge.offline .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
}

.supabase-status-badge.online {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.supabase-status-badge.online .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #16a34a;
}

.settings-button-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-outline {
    background-color: transparent;
    color: var(--charcoal);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--bg-light);
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.sql-code-box {
    background-color: #1e1e24;
    color: #f8f8f2;
    padding: 12px;
    border-radius: var(--radius-medium);
    font-size: 0.65rem;
    overflow-x: auto;
    font-family: monospace;
    max-height: 180px;
    margin-bottom: 12px;
}

.divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 16px 0;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Notification Toast Alert */
.toast {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--charcoal);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        top: 10px;
    }

    to {
        opacity: 1;
        top: 24px;
    }
}

/* Auth Alert Popup Animations */
@keyframes authAlertFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes authAlertFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes authAlertScaleIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* History Summary Bar under table */
.history-summary-bar {
    display: flex;
    justify-content: space-between;
    background-color: var(--card-bg);
    border-radius: var(--radius-large);
    padding: 14px 20px;
    margin: 16px 16px 20px 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    gap: 16px;
}

.summary-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.summary-bar-item .bar-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.summary-bar-item .bar-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
}

.summary-bar-item .bar-val.income {
    color: #16a34a;
    /* Emerald green */
}

.summary-bar-item .bar-val.expense {
    color: #dc2626;
    /* Crimson red */
}

.summary-bar-item.net-item {
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
    flex: 1.2;
}

@media (max-width: 480px) {
    .history-summary-bar {
        flex-direction: column;
        gap: 10px;
        margin: 16px 0 20px 0;
    }

    .summary-bar-item.net-item {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 10px;
    }
}

/* ==========================================================================
   MEDIA QUERIES: RESPONSIVE DESKTOP LAYOUT (Widescreen SaaS Dashboard)
   ========================================================================= */
@media (min-width: 769px) {

    /* Main body background slate details */
    body {
        background-color: #f1f5f9;
    }

    .desktop-wrapper {
        padding: 0;
        min-height: 100vh;
        width: 100%;
        display: block;
    }

    /* Viewport occupies full widescreen on desktop */
    .app-viewport {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Left vertical sidebar (Fixed to left edge) */
    .bottom-nav-capsule {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        right: auto !important;
        transform: none !important;
        width: 84px !important;
        min-width: 84px !important;
        height: 100vh !important;
        background-color: #121212 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 24px 0 !important;
        gap: 14px !important;
        z-index: 9999 !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15) !important;
    }

    .sidebar-logo-wrapper {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-bottom: 12px;
        cursor: pointer;
    }

    .sidebar-logo-icon {
        width: 48px;
        height: 48px;
        border-radius: 16px;
        background-color: #1f2937;
        border: 1px solid rgba(255, 255, 255, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 6px;
    }

    .sidebar-logo-icon:hover {
        transform: scale(1.08);
    }

    .sidebar-logo-icon i {
        width: 24px;
        height: 24px;
    }

    .nav-center-wrapper {
        position: relative;
        top: 0;
        margin: 4px 0;
        order: unset;
    }

    .nav-item {
        width: 48px;
        height: 48px;
        position: relative;
    }

    .nav-center-plus {
        position: relative;
    }

    .nav-tooltip {
        display: block;
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%) translateX(10px);
        margin-left: 14px;
        background-color: var(--charcoal);
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 0.72rem;
        font-weight: 700;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
    }

    .nav-tooltip::before {
        content: '';
        position: absolute;
        right: 100%;
        top: 50%;
        transform: translateY(-50%);
        border-width: 5px;
        border-style: solid;
        border-color: transparent var(--charcoal) transparent transparent;
    }

    .nav-item:hover .nav-tooltip,
    .nav-center-plus:hover .nav-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }

    .nav-hump-bg {
        display: none;
        /* Hide the mobile hump on desktop */
    }

    .screen-tab {
        margin-left: 84px !important;
        width: calc(100% - 84px) !important;
        height: auto !important;
        min-height: 100vh !important;
        padding: 40px 48px;
        overflow: visible !important;
    }

    /* Centering content with a max-width to prevent stretch */
    .screen-tab>* {
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Responsive Grid Columns */
    .dashboard-cols {
        display: grid;
        grid-template-columns: 360px 1fr;
        gap: 30px;
        margin-top: 16px;
        align-items: start;
    }

    /* Ensure the Balance Card and Today's logs do not stretch awkwardly */
    .balance-card {
        margin: 0 0 24px 0;
        width: 100%;
    }

    .transaction-list-container {
        margin: 0;
        width: 100%;
        max-height: 400px;
    }

    /* Weekly Chart occupies the right column beautifully */
    .chart-card {
        margin: 0;
        height: 100%;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .weekly-bar-container {
        height: 320px;
        /* Taller chart bars for desktop view */
        margin-top: auto;
    }

    .bar-track {
        height: 280px;
        width: 14px;
    }

    .section-header {
        padding: 0 0 10px 0;
    }

    /* History tab grid layout */
    .history-cols {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        gap: 24px;
        margin-top: 16px;
        align-items: start;
    }

    .history-left-col,
    .history-right-col {
        min-width: 0;
        width: 100%;
    }

    .search-filter-box {
        margin: 0;
        width: 100%;
        min-width: 0;
    }

    .transaction-list-container.full-history {
        margin: 0;
        width: 100%;
        max-height: 520px;
    }

    /* Reports section side-by-side */
    .reports-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin: 16px 0 0 0;
    }

    .report-card {
        margin: 0;
        height: 100%;
        max-height: 460px;
    }

    .chart-wrapper {
        height: 300px;
    }

    /* Settings section side-by-side */
    .settings-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding: 0;
        margin-top: 16px;
    }

    .settings-card {
        margin: 0;
    }

    /* Slide up panel behaves as modal on desktop */
    .transaction-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0.3s, opacity 0.3s;
    }

    .transaction-panel.active {
        visibility: visible;
        opacity: 1;
    }

    .transaction-panel .panel-overlay {
        backdrop-filter: blur(5px);
    }

    .transaction-panel .panel-content {
        position: relative;
        bottom: auto;
        left: auto;
        width: 420px;
        height: auto;
        max-height: 90vh;
        border-radius: var(--radius-large);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        transform: translateY(30px);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 24px;
        background-color: #ffffff;
    }

    .transaction-panel.active .panel-content {
        transform: translateY(0);
    }

    .drag-handle {
        display: none;
    }
}

/* ==========================================================================
   MEDIA QUERIES: MOBILE LAYOUT OPTIMIZATIONS (Compact and screen-fitting)
   ========================================================================= */
@media (max-width: 768px) {

    html,
    body {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
    }

    .app-viewport {
        overflow: visible !important;
        height: auto !important;
        min-height: 100dvh !important;
    }

    .desktop-wrapper {
        overflow: visible !important;
        height: auto !important;
    }

    .screen-tab {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        padding-bottom: 120px !important;
        touch-action: pan-y !important;
    }

    /* Hide the 3rd column ("Type" column) in both tables to save space */
    .transaction-table th:nth-child(3),
    .transaction-table td:nth-child(3) {
        display: none;
    }

    /* App Header spacing */
    .app-header {
        padding: 10px 16px 6px 16px;
    }

    /* Balance Card - Compact styling */
    .balance-card {
        margin: 8px 12px 12px 12px;
        padding: 16px;
        gap: 12px;
    }

    .balance-val {
        font-size: 2.0rem;
    }

    .decimal-zeros {
        font-size: 1.3rem;
    }

    .balance-card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .summary-inout {
        flex-direction: row;
        gap: 20px;
    }

    #card-add-btn {
        display: none;
        /* Hide since we have floating add button */
    }

    /* Weekly Activity Chart Card - Compact styling */
    .chart-card {
        margin: 0 12px 12px 12px;
        padding: 12px 16px;
    }

    .card-title {
        margin-bottom: 10px;
    }

    .weekly-bar-container {
        height: 80px;
    }

    .bar-track {
        height: 55px;
        width: 10px;
    }

    /* Today's Transactions & History - Compact styling */
    .transaction-list-container {
        margin: 0 12px 12px 12px;
        padding: 12px 14px;
        max-height: none !important;
        overflow: visible !important;
    }

    .transaction-list-container.full-history {
        max-height: none !important;
        overflow: visible !important;
    }

    .transaction-table td {
        padding: 8px 0;
        font-size: 0.78rem;
    }

    .section-header {
        padding: 0 16px 6px 16px;
    }

    .transaction-panel .panel-content {
        height: auto !important;
        max-height: 94vh !important;
        max-height: 94dvh !important;
        padding-bottom: 40px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-y !important;
    }

    /* Hide numeric keypad when native keyboard is active */
    .transaction-panel.keyboard-active .numeric-keypad {
        display: none;
    }
}

/* ==========================================================================
   GOALS & DEBTS FEATURES STYLING
   ========================================================================== */

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header-flex h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--charcoal);
}

.btn-lime-capsule {
    background-color: var(--lime);
    color: var(--charcoal);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--lime-glow);
    transition: all 0.2s ease;
}

.btn-lime-capsule:hover {
    background-color: var(--lime-dark);
    transform: translateY(-1px);
}

/* --- GOALS TAB STYLING --- */
.goals-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.goals-summary-card {
    background-color: #ffffff;
    padding: 14px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goals-summary-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.goals-summary-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--charcoal);
}

.goals-summary-val.lime {
    color: #16a34a;
}

.goals-summary-val.orange {
    color: #ea580c;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.goal-card {
    background-color: #ffffff;
    border-radius: var(--radius-large);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.goal-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.goal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background-color: #ecfccb;
    color: #4d7c0f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.goal-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--charcoal);
}

.goal-percentage-badge {
    background-color: var(--charcoal);
    color: var(--lime);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.goal-progress-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.goal-amount-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.goal-collected-val {
    color: var(--charcoal);
    font-weight: 800;
}

.goal-target-val {
    color: var(--text-muted);
}

.goal-progress-bar-track {
    width: 100%;
    height: 10px;
    background-color: var(--bg-light);
    border-radius: 5px;
    overflow: hidden;
}

.goal-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #84cc16, #a3e635);
    border-radius: 5px;
    transition: width 0.4s ease;
}

.goal-estimation-badge {
    background-color: #f7fee7;
    border: 1px dashed #bef264;
    color: #3f6212;
    padding: 8px 12px;
    border-radius: var(--radius-medium);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.goal-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    gap: 10px;
}

.btn-setor {
    flex: 1;
    background-color: var(--charcoal);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.btn-setor:hover {
    background-color: var(--charcoal-light);
}

.btn-icon-delete {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.btn-icon-delete:hover {
    background-color: #fee2e2;
}

/* --- DEBTS TAB STYLING --- */
.debts-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.debts-summary-card {
    background-color: #ffffff;
    padding: 16px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debts-summary-card.green-border {
    border-left: 4px solid #22c55e;
}

.debts-summary-card.red-border {
    border-left: 4px solid #ef4444;
}

.debts-summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.debts-summary-val {
    font-size: 1.1rem;
    font-weight: 800;
}

.debts-summary-val.green {
    color: #16a34a;
}

.debts-summary-val.red {
    color: #dc2626;
}

.debt-filter-capsule {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.debt-filter-capsule.active {
    background-color: var(--charcoal);
    color: #ffffff;
    border-color: var(--charcoal);
}

.debts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.debt-card {
    background-color: #ffffff;
    border-radius: var(--radius-medium);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.debt-card.settled {
    opacity: 0.65;
    background-color: #f9fafb;
}

.debt-info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.debt-person-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.debt-type-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.debt-type-tag.piutang {
    background-color: #dcfce7;
    color: #15803d;
}

.debt-type-tag.hutang {
    background-color: #fee2e2;
    color: #b91c1c;
}

.debt-amount-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--charcoal);
}

.debt-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.debt-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-toggle-lunas {
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle-lunas.pending {
    background-color: #fef08a;
    color: #854d0e;
}

.btn-toggle-lunas.pending:hover {
    background-color: #fde047;
}

.btn-toggle-lunas.settled {
    background-color: #dcfce7;
    color: #166534;
}

/* --- MODALS STYLING --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background-color: #ffffff;
    border-radius: var(--radius-large);
    width: 100%;
    max-width: 440px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--charcoal);
}

.form-group input {
    padding: 10px 14px;
    border-radius: var(--radius-medium);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--charcoal);
}

.form-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.modal-read-only-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--charcoal);
    padding: 8px 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--charcoal);
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.type-toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.type-toggle-btn {
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-muted);
    padding: 10px;
    border-radius: var(--radius-medium);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.type-toggle-btn.active.green {
    background-color: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.type-toggle-btn.active.red {
    background-color: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- UNIFIED PLANNING TAB STYLING --- */
.planning-header {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.planning-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--charcoal);
    letter-spacing: -0.3px;
}

.planning-subtab-switch {
    display: flex;
    background-color: #f1f5f9;
    padding: 5px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    gap: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

.subtab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
    color: #737373;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.subtab-btn i {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.subtab-btn:hover {
    color: #121212;
}

.subtab-btn.active {
    background-color: #bdf532 !important;
    color: #121212 !important;
    box-shadow: 0 4px 14px rgba(189, 245, 50, 0.4) !important;
}

.subtab-btn.active i {
    transform: scale(1.1);
}

.planning-subview {
    display: flex;
}

.planning-subview.hidden {
    display: none !important;
}

/* Hide scrollbar utilities */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Nav item icon sizing */
.nav-item {
    font-size: 0.7rem;
}

/* ==========================================================================
   CUSTOM ROUNDED SCROLLBAR STYLING (GLOBAL & PANELS)
   ========================================================================== */

/* WebKit browsers (Chrome, Safari, Edge, Opera) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 9999px;
    border: 1px solid transparent;
    background-clip: padding-box;
    transition: background-color 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 9999px;
}

/* Specific inner modal & table scrollbars with Lime Green Accent */
.transaction-list-container::-webkit-scrollbar,
.modal-overlay::-webkit-scrollbar,
.overflow-y-auto::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.transaction-list-container::-webkit-scrollbar-track,
.modal-overlay::-webkit-scrollbar-track,
.overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 9999px;
}

.transaction-list-container::-webkit-scrollbar-thumb,
.modal-overlay::-webkit-scrollbar-thumb,
.overflow-y-auto::-webkit-scrollbar-thumb {
    background-color: #a8e024;
    border-radius: 9999px;
    box-shadow: 0 0 6px rgba(189, 245, 50, 0.5);
}

.transaction-list-container::-webkit-scrollbar-thumb:hover,
.modal-overlay::-webkit-scrollbar-thumb:hover,
.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background-color: #8ec712;
    border-radius: 9999px;
}

/* Hide scrollbar completely for transaction calculator panel */
.panel-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.panel-content {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Firefox standard scrollbar properties — Desktop only */
@media (min-width: 769px) {
    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
    }

    .overflow-y-auto, .modal-overlay {
        scrollbar-width: thin;
        scrollbar-color: #a8e024 rgba(0, 0, 0, 0.03);
    }
}

/* Hide ALL scrollbars on mobile */
@media (max-width: 768px) {
    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    *::-webkit-scrollbar {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* Mobile floating bottom nav capsule — reinforced */
@media (max-width: 768px) {
    .bottom-nav-capsule {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        min-width: unset !important;
        height: auto !important;
        background-color: #121212 !important;
        border-radius: 9999px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 16px !important;
        gap: 10px !important;
        z-index: 99999 !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
        order: unset !important;
        flex-shrink: unset !important;
    }

    html, body, .desktop-wrapper, .app-viewport {
        height: auto !important;
        min-height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .screen-tab {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: 100% !important;
        height: auto !important;
        padding-bottom: 140px !important;
        overflow: visible !important;
    }
}

/* ==========================================================================
   DARK MODE OVERRIDES (FINTECH PRO #0E0F10 & #1A1B1E SYSTEM)
   ========================================================================== */
html.dark,
body.dark-mode {
    --bg-light: #0E0F10 !important;
    --card-bg: #1A1B1E !important;
    --text-primary: #ffffff !important;
    --text-muted: #9CA3AF !important;
    --border-color: #26272B !important;
    --charcoal: #0E0F10 !important;
    --charcoal-light: #26272B !important;
    background-color: #0E0F10 !important;
    color: #e1e4d1 !important;
}

html.dark .desktop-wrapper,
html.dark .app-viewport,
html.dark main,
html.dark header,
html.dark body {
    background-color: #0E0F10 !important;
}

html.dark .dashboard-header,
html.dark .history-header,
html.dark .reports-header,
html.dark .planning-header,
html.dark .settings-header {
    background-color: #0E0F10 !important;
    border-color: #26272B !important;
}

/* OVERRIDE ALL WHITE CARDS & CONTAINERS TO SLEEK CHARCOAL #1A1B1E */
html.dark .bg-white,
html.dark .bg-gray-50,
html.dark .bg-gray-100,
html.dark .bg-slate-50,
html.dark .bg-slate-100,
html.dark [class*="bg-white"],
html.dark .card,
html.dark .card-surface,
html.dark .chart-card,
html.dark .transaction-list-container,
html.dark .settings-card,
html.dark .history-item,
html.dark .goal-card,
html.dark .debt-card,
html.dark .modal-card,
html.dark .panel-content,
html.dark .avatar-selector-grid,
html.dark #avatar-selector-grid,
html.dark table,
html.dark thead,
html.dark tbody,
html.dark tr {
    background-color: #1A1B1E !important;
    border-color: #26272B !important;
    color: #e1e4d1 !important;
}

/* WEEKLY BAR CHART IN DASHBOARD */
html.dark .bar-track {
    background-color: #26272B !important;
}

html.dark .bar-fill {
    background-color: #3F4147 !important;
}

html.dark .weekly-bar-item.active .bar-fill {
    background-color: #bdf532 !important;
    box-shadow: 0 0 10px rgba(189, 245, 50, 0.3) !important;
}

html.dark .day-label {
    color: #9CA3AF !important;
}

html.dark .weekly-bar-item.active .day-label {
    color: #bdf532 !important;
    font-weight: 700 !important;
}

/* EXCEPTION: LIME GREEN BALANCE CARD KEEPS LIME GREEN #bdf532 WITH DARK TEXT #121212 */
html.dark .bg-[#bdf532],
html.dark .bg-lime,
html.dark div.bg-[#bdf532],
html.dark div.bg-lime,
html.dark .balance-card {
    background-color: #bdf532 !important;
    color: #121212 !important;
}

html.dark .bg-[#bdf532] *,
html.dark .bg-lime *,
html.dark .balance-card * {
    color: #121212 !important;
}

html.dark .balance-card h1,
html.dark .balance-card .balance-val,
html.dark .balance-card .currency-symbol,
html.dark .balance-card .summary-val,
html.dark .balance-card .summary-label,
html.dark .balance-card .balance-label {
    color: #121212 !important;
}

html.dark .balance-card .month-badge {
    background-color: rgba(18, 18, 18, 0.15) !important;
    color: #121212 !important;
}

html.dark .bg-[#bdf532] button,
html.dark .bg-lime button,
html.dark .balance-card button,
html.dark .balance-card .btn-black-capsule {
    background-color: #1A1B1E !important;
    color: #ffffff !important;
}

/* OVERRIDE ALL BORDERS */
html.dark .border,
html.dark .border-gray-200,
html.dark .border-gray-100,
html.dark .border-gray-300,
html.dark .border-outline-variant,
html.dark [class*="border-gray"] {
    border-color: #26272B !important;
}

/* ALL TEXT COLORS IN DARK MODE */
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-gray-600,
html.dark .text-slate-900,
html.dark .text-slate-800,
html.dark .text-slate-700,
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5,
html.dark label,
html.dark th, html.dark td,
html.dark .font-bold {
    color: #ffffff !important;
}

html.dark .text-gray-500,
html.dark .text-gray-400,
html.dark .text-slate-500,
html.dark .text-slate-400,
html.dark small,
html.dark .form-hint,
html.dark .text-on-surface-variant {
    color: #9CA3AF !important;
}

/* NOMINAL DIGITS & CURRENCY IN CALCULATOR PANEL */
html.dark .nominal-display-container,
html.dark #nominal-digits,
html.dark .nominal-digits {
    color: #bdf532 !important;
}

html.dark .nominal-currency {
    color: #9CA3AF !important;
}

/* QUICK DATE PILLS & KEYPAD IN CALCULATOR PANEL */
html.dark .quick-date-selector {
    background-color: #26272B !important;
    border-color: #3F4147 !important;
}

html.dark .quick-date-btn,
html.dark .date-badge {
    background-color: transparent !important;
    color: #9CA3AF !important;
}

html.dark .quick-date-btn.active,
html.dark .date-badge.active {
    background-color: #bdf532 !important;
    color: #0E0F10 !important;
}

html.dark .quick-date-btn:not(.active):hover,
html.dark .date-badge:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

html.dark .key-btn,
html.dark .numeric-keypad button {
    background-color: #26272B !important;
    color: #ffffff !important;
    border: 1px solid #3F4147 !important;
    box-shadow: none !important;
}

html.dark .key-btn:hover,
html.dark .numeric-keypad button:hover {
    background-color: #3F4147 !important;
}

/* INPUTS & PLACEHOLDERS IN DARK MODE */
html.dark input[type="text"],
html.dark input[type="number"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="date"],
html.dark select,
html.dark .category-input,
html.dark .description-input {
    background-color: #26272B !important;
    color: #ffffff !important;
    border-color: #3F4147 !important;
}

html.dark input::placeholder,
html.dark .category-input::placeholder,
html.dark .description-input::placeholder {
    color: #9CA3AF !important;
}

/* SEARCH & DATE FILTERS IN HISTORY TAB (SEAMLESS PILL BLENDING) */
html.dark .search-input-wrapper,
html.dark .month-filter-wrapper,
html.dark .date-filter-wrapper {
    background-color: #1A1B1E !important;
    border: 1px solid #26272B !important;
    box-shadow: none !important;
}

html.dark .search-icon,
html.dark .calendar-filter-icon {
    color: #9CA3AF !important;
}

html.dark .search-input-wrapper input,
html.dark .month-input-filter,
html.dark .date-input-filter,
html.dark #search-input,
html.dark #month-filter,
html.dark #date-filter {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

html.dark .search-input-wrapper input::placeholder,
html.dark .month-input-filter::placeholder,
html.dark .date-input-filter::placeholder {
    color: #9CA3AF !important;
}

/* FILTER CAPSULES (SEMUA, PEMASUKAN, PENGELUARAN) */
html.dark .filter-capsule {
    background-color: #1A1B1E !important;
    border: 1px solid #26272B !important;
    color: #9CA3AF !important;
}

html.dark .filter-capsule.active {
    background-color: #bdf532 !important;
    border-color: #bdf532 !important;
    color: #0E0F10 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px rgba(189, 245, 50, 0.25) !important;
}

/* HEADER CARD & ICON BUTTONS */
html.dark .icon-btn,
html.dark #toggle-visibility-btn,
html.dark #header-settings-btn,
html.dark #visibility-btn,
html.dark .icon-btn-back {
    background-color: #26272B !important;
    color: #ffffff !important;
    border-color: #3F4147 !important;
}

html.dark .icon-btn i,
html.dark .icon-btn svg,
html.dark #toggle-visibility-btn i,
html.dark #header-settings-btn i {
    color: #ffffff !important;
    stroke: #ffffff !important;
}

/* BOTTOM NAVIGATION CAPSULE & SIDEBAR */
html.dark .bottom-nav-capsule,
html.dark #main-sidebar-nav {
    background-color: #0E0F10 !important;
    border-color: #26272B !important;
}

html.dark .sidebar-logo-icon {
    background-color: #1f2937 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

html.dark .nav-hump-bg {
    background-color: #0E0F10 !important;
}

html.dark .nav-hump-bg::before {
    background: radial-gradient(circle at 0 0, transparent 16px, #0E0F10 0) !important;
}

html.dark .nav-hump-bg::after {
    background: radial-gradient(circle at 100% 0, transparent 16px, #0E0F10 0) !important;
}

/* ==========================================================================
   CATEGORY & TAG CUSTOM STYLES
   ========================================================================== */

/* Category Manager Styles */
.cat-manager-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    gap: 10px;
    transition: all 0.2s ease;
}
.cat-manager-item:hover {
    background: #f3f4f6;
}
.cat-emoji {
    font-size: 1.2rem;
}
.cat-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
}
.cat-type-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}
.cat-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.cat-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px;
    border-radius: 4px;
    transition: background 0.2s;
}
.cat-actions button:hover {
    background: rgba(0,0,0,0.05);
}
.cat-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.05em;
    margin-top: 10px;
    margin-bottom: 4px;
}
.archived-label {
    margin-top: 16px;
}

/* Tag Chips */
.tag-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 9999px;
    border: 1px solid transparent;
    gap: 4px;
}
.tag-delete-btn {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0;
}
.tag-chip-mini {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    gap: 4px;
}
.remove-panel-tag {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 0;
    line-height: 1;
}
.tag-suggestion {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
}
.tag-suggestion:hover {
    opacity: 0.8;
}

/* Category Mini Chips in Transaction Panel */
.cat-chip-mini {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.cat-chip-mini.active {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Tag filter chips in history */
.tag-filter-chip {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f3f4f6;
    color: #4b5563;
}
.tag-filter-chip.active {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Dark mode overrides for Category Manager & Tags */
html.dark .cat-manager-item {
    background: #1e2025 !important;
    border-color: #2e3035 !important;
}
html.dark .cat-manager-item:hover {
    background: #2e3035 !important;
}
html.dark .cat-name {
    color: #e1e4d1 !important;
}
html.dark .cat-actions button:hover {
    background: rgba(255,255,255,0.08) !important;
}
html.dark .tag-filter-chip {
    background: #1A1B1E !important;
    color: #9CA3AF !important;
}
html.dark .tag-filter-chip.active {
    background: #bdf532 !important;
    color: #0E0F10 !important;
}

/* ==========================================================================
   FITUR 2: SECURITY LOCK SCREEN STYLES (PIN & BIOMETRIC)
   ========================================================================== */

.pin-lock-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(18, 18, 18, 0.8) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pin-lock-card {
    background: #1A1B1E;
    border: 1px solid #26272B;
    border-radius: 28px;
    padding: 30px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    text-align: center;
}

.pin-dots-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #3F4147;
    background: transparent;
    transition: all 0.15s ease;
}

.pin-dot.active {
    background: #bdf532;
    border-color: #bdf532;
    box-shadow: 0 0 8px rgba(189, 245, 50, 0.6);
}

.pin-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.pin-key {
    background: #26272B;
    color: #ffffff;
    border: 1px solid #3F4147;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.15s ease;
}

.pin-key:hover, .pin-key:active {
    background: #3F4147;
}

.pin-key.biometric-key {
    background: transparent;
    border-color: transparent;
    color: #bdf532;
}

.pin-key.biometric-key:hover {
    background: rgba(189, 245, 50, 0.1);
}

.pin-key.delete-key {
    background: transparent;
    border-color: transparent;
    color: #9CA3AF;
}

.pin-key.delete-key:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Animations */
.animate-scale-up {
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.shake-animation {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* Toggle Switch styling helper for light mode / dark mode compatibility */
.settings-card input[type="checkbox"]:checked ~ div {
    background-color: #bdf532 !important;
}

/* ==========================================================================
   DARK MODE BUTTON & AUTH MODAL SCREEN ADJUSTMENTS
   ========================================================================= */

/* Keep text/icons inside lime green elements dark in dark mode */
html.dark .bg-\[\#bdf532\],
html.dark .bg-\[\#C6FF3D\],
html.dark .bg-\[\#b5f02c\],
html.dark button[class*="bg-[#bdf532]"],
html.dark button[class*="bg-[#C6FF3D]"],
html.dark a[class*="bg-[#bdf532]"],
html.dark a[class*="bg-[#C6FF3D]"] {
    color: #0E0F10 !important;
}

html.dark .bg-\[\#bdf532\] *,
html.dark .bg-\[\#C6FF3D\] * {
    color: #0E0F10 !important;
}

/* Safety direct IDs override to prevent white text on lime green elements in dark mode */
html.dark #app-btn-submit-login,
html.dark #app-btn-submit-register,
html.dark #add-goal-btn,
html.dark #add-debt-btn,
html.dark #btn-submit-forgot,
html.dark #btn-submit-new-pwd,
html.dark #btn-submit-category,
html.dark #btn-submit-payment,
html.dark #btn-save-settings,
html.dark #apply-custom-avatar-btn,
html.dark #add-tag-btn {
    color: #0E0F10 !important;
}

html.dark #app-btn-submit-login *,
html.dark #app-btn-submit-register *,
html.dark #add-goal-btn *,
html.dark #add-debt-btn *,
html.dark #btn-submit-forgot *,
html.dark #btn-submit-new-pwd *,
html.dark #btn-submit-category *,
html.dark #btn-submit-payment *,
html.dark #btn-save-settings *,
html.dark #apply-custom-avatar-btn *,
html.dark #add-tag-btn * {
    color: #0E0F10 !important;
}

/* Ensure navigation / forgot password links are accessible bright lime */
html.dark #btn-switch-to-register,
html.dark #app-btn-forgot-password,
html.dark .text-\[\#7a9e00\],
html.dark .text-\[\#84CC00\],
html.dark button.text-\[\#7a9e00\],
html.dark button.text-\[\#84CC00\] {
    color: #bdf532 !important;
}

/* Ensure uniform dark background for auth overlay */
html.dark #auth-modal-screen {
    background-color: #0E0F10 !important;
}

/* Fix btn-black-capsule globally in dark mode to be lime green with dark text */
html.dark .btn-black-capsule {
    background-color: #bdf532 !important;
    color: #0E0F10 !important;
    box-shadow: 0 4px 12px rgba(189, 245, 50, 0.15) !important;
}

html.dark .btn-black-capsule:hover {
    background-color: #c6ff3d !important;
}

html.dark .btn-black-capsule * {
    color: #0E0F10 !important;
}

/* Fix Logout button styling and text visibility in dark mode */
html.dark #logout-btn {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

html.dark #logout-btn * {
    color: #ef4444 !important;
}