﻿/* â”€â”€â”€ RESET & BASE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0a0a14;
    --bg2: #111125;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8e8f0;
    --text-muted: #8888aa;
    --primary: #7c6fff;
    --primary-glow: rgba(124, 111, 255, 0.3);
    --income: #22c55e;
    --expense: #f43f5e;
    --gold: #f59e0b;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --font: 'Inter', sans-serif;
}

html {
    font-size: 15px;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
}

/* â”€â”€â”€ GLASS MORPHISM â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* â”€â”€â”€ SCREENS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
}

.screen.active {
    display: flex;
}

/* â”€â”€â”€ LOGIN â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#login-screen {
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 60% 40%, #1a1040 0%, var(--bg) 70%);
}

.login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float 8s ease-in-out infinite;
}

.b1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -100px;
    animation-delay: 0s;
}

.b2 {
    width: 350px;
    height: 350px;
    background: #ff6bff;
    bottom: -100px;
    left: -80px;
    animation-delay: 3s;
}

.b3 {
    width: 250px;
    height: 250px;
    background: var(--income);
    top: 40%;
    left: 50%;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.login-card {
    width: 420px;
    max-width: 90vw;
    border-radius: 24px;
    padding: 40px 36px;
    position: relative;
    z-index: 10;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    font-size: 52px;
    text-align: center;
    margin-bottom: 12px;
}

.login-title { font-size: 2rem; font-weight: 800; text-align: center; background: linear-gradient(135deg, var(--primary), #a78bff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 4px;
}

.login-hint {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: rgba(124, 111, 255, 0.08);
    border: 1px solid rgba(124, 111, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.login-hint code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--primary);
}

.error-text {
    color: var(--expense);
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* â”€â”€â”€ BUTTONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #a78bff);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}

/* â”€â”€â”€ DASHBOARD LAYOUT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#dashboard-screen {
    overflow: hidden;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: rgba(10, 10, 20, 0.8);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 20px;
}

.sidebar-logo {
    font-size: 1.8rem;
}

.sidebar-brand { font-size: 1.3rem; font-weight: 800; background: linear-gradient(135deg, var(--primary), #a78bff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #a78bff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.88rem;
}

.user-tag {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.nav-item.active {
    background: rgba(124, 111, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(124, 111, 255, 0.2);
}

.nav-icon {
    font-size: 1.1rem;
    width: 22px;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.month-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.month-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

#current-month-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
}

/* â”€â”€â”€ MAIN CONTENT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 28px;
    background: radial-gradient(ellipse at 80% 20%, rgba(124, 111, 255, 0.05) 0%, transparent 60%);
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    background: rgba(124, 111, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(124, 111, 255, 0.2);
    border-radius: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* â”€â”€â”€ CARDS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card {
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, 0.03));
}

.card-icon {
    font-size: 2rem;
}

.card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 4px;
}

.card-income .card-value {
    color: var(--income);
}

.card-expense .card-value {
    color: var(--expense);
}

.card-net .card-value {
    color: var(--gold);
}

.card-total .card-value {
    color: var(--primary);
}

/* â”€â”€â”€ CHARTS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    border-radius: var(--radius);
    padding: 20px 24px;
}

.chart-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.chart-wrap {
    height: 220px;
    position: relative;
}

/* â”€â”€â”€ SECTION CARDS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.section-card {
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.link-action {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.link-action:hover {
    opacity: 0.8;
}

/* â”€â”€â”€ TRANSACTION LIST â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    transition: background 0.15s;
}

.tx-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tx-type-icon {
    font-size: 1.2rem;
}

.tx-info {
    flex: 1;
    min-width: 0;
}

.tx-desc {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.tx-amount {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.tx-amount.income {
    color: var(--income);
}

.tx-amount.expense {
    color: var(--expense);
}

/* â”€â”€â”€ TRANSACTION TABLE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tx-stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.tx-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.income-color {
    color: var(--income);
    font-weight: 600;
}

.expense-color {
    color: var(--expense);
    font-weight: 600;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

/* â”€â”€â”€ TRANSACTION TABLE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tx-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.tx-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

.tx-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* Column-specific sizing */
.tx-table .td-date  { white-space: nowrap; color: var(--text-muted); font-size: 0.82rem; width: 100px; }
.tx-table .td-type  { width: 76px; }
.tx-table .td-amt   { width: 130px; text-align: right; font-weight: 700; }
.tx-table .td-owner { width: 90px; color: var(--text-muted); font-size: 0.8rem; }
.tx-table .tx-actions { width: 70px; text-align: right; white-space: nowrap; }

/* Description cell: main text + sub-label below */
.tx-table .td-desc { max-width: 280px; }
.tx-desc-text { display: block; font-weight: 500; }
.tx-cat-label {
    display: block;
    margin-top: 2px;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-style: normal;
}

.text-right { text-align: right !important; }

.income { color: var(--income); }
.expense { color: var(--expense); }

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}
.badge-income  { background: rgba(34,197,94,0.15);  color: var(--income); }
.badge-expense { background: rgba(244,63,94,0.15);  color: var(--expense); }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-icon  { font-size: 3rem; margin-bottom: 12px; }

/* â”€â”€â”€ TRANSACTION ACTION BUTTONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tx-actions { white-space: nowrap; text-align: right; }
.tx-btn-edit, .tx-btn-del, .tx-btn-save, .tx-btn-cancel {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
    border-radius: 6px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    line-height: 1;
    min-width: 30px;
    min-height: 30px;
}
.tx-btn-edit:hover  { opacity: 1; background: rgba(124,111,255,0.2); }
.tx-btn-del:hover   { opacity: 1; background: rgba(244,63,94,0.2); }
.tx-btn-save:hover  { opacity: 1; background: rgba(34,197,94,0.2); }
.tx-btn-cancel:hover{ opacity: 1; background: rgba(148,163,184,0.2); }

/* Fade-out on delete */
#tx-table-body tr { transition: opacity 0.3s ease; }

/* â”€â”€â”€ TABLE WRAPPER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.tx-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}

/* â”€â”€â”€ EDIT MODAL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#tx-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.edit-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
}
.edit-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #1a1a2e;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: modalPop 0.2s ease;
}
@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.edit-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.edit-modal-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    margin-top: 14px;
}
.edit-modal-label:first-of-type { margin-top: 0; }
.edit-modal-input {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
.edit-modal-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.edit-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}
.edit-modal-actions .btn { flex: 1; }

.btn-secondary {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* â”€â”€â”€ WALLETS GRID â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.wallets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.wallet-card {
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid var(--border);
}
.wallet-card:hover { transform: translateY(-3px); }
.wallet-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.wallet-icon { font-size: 1.6rem; }
.wallet-name { font-weight: 600; font-size: 0.95rem; }
.wallet-type { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; }
.wallet-balance { font-size: 1.2rem; font-weight: 700; margin-top: 8px; }
.wallet-owner { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.wallet-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }

/* â”€â”€â”€ SHARED WALLET COMPONENTS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.wallets-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.section-total { font-size: 0.95rem; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; }
.wallets-section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.wallet-badge { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.wallet-badge.mine    { background: rgba(124,111,255,0.18); color: #a78bff; }
.wallet-badge.partner { background: rgba(236,72,153,0.18);  color: #f9a8d4; }
.wallet-badge.shared  { background: rgba(34,197,94,0.18);   color: #4ade80; }
.wallet-card-shared   { box-shadow: 0 0 16px rgba(34,197,94,0.15) !important; transition: box-shadow 0.3s ease, transform 0.2s ease; }
.wallet-card-shared:hover { box-shadow: 0 0 28px rgba(34,197,94,0.3) !important; transform: translateY(-3px); }
.wallet-card-partner  { border: 1px solid rgba(236,72,153,0.2) !important; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MOBILE RESPONSIVE
   Breakpoints: 768px (tablet/mobile), 480px (small phone)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€â”€ HAMBURGER BUTTON â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hamburger {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 200;
    background: rgba(10,10,20,0.92);
    border: 1px solid var(--border);
    border-radius: 10px;
    width: 44px; height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    backdrop-filter: blur(10px);
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* â”€â”€â”€ SIDEBAR OVERLAY â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 150; backdrop-filter: blur(2px); }
.sidebar-overlay.active { display: block; }

/* â”€â”€â”€ TABLET (â‰¤ 768px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
    body { overflow: auto; }

    #dashboard-screen { flex-direction: column; overflow: auto; }

    .hamburger { display: flex; }

    /* Sidebar â†’ slide-in drawer */
    .sidebar {
        position: fixed;
        left: -260px; top: 0;
        height: 100vh; width: 240px;
        z-index: 160;
        transition: left 0.3s ease;
        border-right: 1px solid var(--border);
    }
    .sidebar.open { left: 0; }

    .main-content {
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 72px 14px 28px;
    }

    /* Summary cards â€” 2 columns */
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card       { padding: 14px; gap: 10px; }
    .card-icon  { font-size: 1.4rem; }
    .card-value { font-size: 1rem; }

    /* Charts â€” stack */
    .charts-grid { grid-template-columns: 1fr; }

    /* Header */
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header h2 { font-size: 1.2rem; }
    .header-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
    .filter-select  { flex: 1; min-width: 110px; }

    /* Stats row */
    .tx-stats-row { flex-wrap: wrap; gap: 10px; }

    /* â”€â”€ TABLE â†’ CARD VIEW â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
    /* Hide the actual <thead> */
    .tx-table thead { display: none; }
    .tx-table, .tx-table tbody { display: block; }

    .tx-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "desc  amt"
            "meta  type"
            "empty actions";
        gap: 2px 8px;
        border: 1px solid var(--border);
        border-radius: 12px;
        margin-bottom: 10px;
        padding: 12px 14px;
        background: rgba(255,255,255,0.025);
        transition: background 0.2s;
    }
    .tx-table tr:hover { background: rgba(255,255,255,0.045); }

    /* Map columns to grid areas */
    .tx-table .td-date   { display: none; }            /* date folded into meta */
    .tx-table .td-desc   { grid-area: desc; align-self: center; }
    .tx-table .td-owner  { display: none; }            /* hidden â€” not critical */
    .tx-table .td-type   { grid-area: type; align-self: center; justify-self: end; }
    .tx-table .td-amt    { grid-area: amt; text-align: right; align-self: center; font-size: 1rem; }
    .tx-table .tx-actions{ grid-area: actions; justify-self: end; align-self: center; }

    /* Remove cell borders in card mode */
    .tx-table td { border-bottom: none; padding: 2px 0; }

    /* Description in card: text + sub-label */
    .tx-table .td-desc .tx-desc-text { font-size: 0.9rem; font-weight: 600; }
    .tx-table .td-desc .tx-cat-label { font-size: 0.75rem; margin-top: 1px; }

    /* Action buttons â€” larger tap targets on mobile */
    .tx-btn-edit, .tx-btn-del { font-size: 1.1rem; padding: 6px 8px; opacity: 0.8; }

    /* Budget */
    .budget-strip-list { grid-template-columns: 1fr; }
    .budget-list       { grid-template-columns: 1fr; }

    /* Wallets â€” 2 col on tablet */
    .wallets-grid, .wallets-section-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* Section cards */
    .section-card { padding: 16px; }
    .chart-card   { padding: 14px 16px; }

    /* Toast */
    .toast { bottom: 16px; right: 12px; left: 12px; text-align: center; }

    /* Partner grid */
    .partner-grid { grid-template-columns: 1fr; }
}

/* â”€â”€â”€ SMALL PHONE (â‰¤ 480px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr; }
    .wallets-grid, .wallets-section-grid { grid-template-columns: 1fr; }
    .main-content { padding: 66px 12px 24px; }
    .page-header h2 { font-size: 1.05rem; }
    .login-card  { padding: 28px 20px; }
    .login-title { font-size: 1.6rem; }
    .login-logo  { font-size: 40px; }
    .btn-sm      { padding: 6px 10px; font-size: 0.78rem; }

    /* Modal fills screen on small phones */
    .edit-modal-box { padding: 22px 18px; border-radius: 16px; }
}

/* ─── EDIT MODAL SELECT ─────────────────────────────────────────────── */
.edit-modal-select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath stroke='%238888aa' stroke-width='2' fill='none' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px !important;
    cursor: pointer;
}
.edit-modal-select option {
    background: #1a1a2e;
    color: var(--text);
}

/* ─── MOBILE SCROLL FIX ─────────────────────────────────────────────── */
/* body { overflow: hidden } di atas mematikan scroll desktop, pada mobile
   kita override supaya seluruh halaman bisa di-scroll dengan bebas */
@media (max-width: 768px) {
    body { overflow-y: auto; overflow-x: hidden; }
    #dashboard-screen { height: auto; min-height: 100vh; overflow: visible; }
    .main-content { height: auto; overflow-y: visible; }
    /* Modal tidak boleh melebihi viewport */
    .edit-modal-box { max-height: 90vh; overflow-y: auto; }
    #tx-edit-modal { align-items: flex-end; padding: 0; }
    .edit-modal-box { border-radius: 20px 20px 0 0; max-width: 100%; width: 100%; }
}
