/* ===== Pgoal — Personal Finance App ===== */
:root {
    --bg: #0f0f23;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1f1f35;
    --bg-input: #16162b;
    --bg-modal: #1e1e36;
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-glow: rgba(99,102,241,0.15);
    --income: #10B981;
    --income-bg: rgba(16,185,129,0.12);
    --expense: #EF4444;
    --expense-bg: rgba(239,68,68,0.12);
    --warn: #F59E0B;
    --warn-bg: rgba(245,158,11,0.12);
    --text: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: rgba(255,255,255,0.06);
    --border-light: rgba(255,255,255,0.1);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.25);
    --nav-height: 68px;
    --header-height: 56px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* ===== Login ===== */
.login-screen {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; min-height: 100dvh; padding: 24px;
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.15) 0%, var(--bg) 60%);
}
.login-container { width: 100%; max-width: 360px; text-align: center; }
.login-logo { margin-bottom: 16px; color: var(--primary-light); }
.login-title {
    font-size: 2rem; font-weight: 800; letter-spacing: -0.03em;
    background: linear-gradient(135deg, #6366F1, #A78BFA);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-subtitle { color: var(--text-secondary); margin: 4px 0 32px; font-size: 0.9rem; }
.login-form { text-align: left; }
.login-form .form-group + .form-group { margin-top: 12px; }
.login-form .btn { margin-top: 20px; }
.error-message { color: var(--expense); font-size: 0.8rem; margin-top: 10px; text-align: center; }

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; background: var(--bg-input); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-group select option { background: var(--bg-card); }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border: none; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all 0.15s;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border-light); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-card-hover); }
.btn-block { width: 100%; }
.btn-block + .btn-block { margin-top: 8px; }
.btn-small { padding: 8px 14px; font-size: 0.82rem; border-radius: var(--radius-xs); }
.btn-text { background: none; border: none; color: var(--primary-light); font-size: 0.82rem; font-weight: 600; cursor: pointer; font-family: inherit; padding: 4px 8px; }
.btn-text:hover { color: var(--primary); }
.btn-icon {
    width: 32px; height: 32px; border-radius: 8px; background: transparent;
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all 0.15s;
}
.btn-icon:hover { background: var(--bg-input); color: var(--text); }
.btn-close {
    width: 32px; height: 32px; border-radius: 50%; background: var(--bg-input); color: var(--text-muted);
    border: none; cursor: pointer; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; line-height: 1;
}
.btn-close:hover { background: var(--expense-bg); color: var(--expense); }
.btn-logout { background: var(--expense-bg); color: var(--expense); border: 1px solid transparent; }
.btn-logout:hover { border-color: var(--expense); }
.delete-btn { color: var(--text-muted); }
.delete-btn:hover { color: var(--expense); background: var(--expense-bg); }

/* ===== Toggle Group ===== */
.toggle-group { display: flex; gap: 8px; margin-bottom: 14px; }
.toggle-group button {
    flex: 1; padding: 10px; border: 1px solid var(--border-light); border-radius: var(--radius-sm);
    background: var(--bg-input); color: var(--text-muted); font-weight: 600; font-size: 0.88rem;
    cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.toggle-group button.active { background: var(--primary-glow); color: var(--primary-light); border-color: var(--primary); }

/* ===== App Layout ===== */
#app { height: 100vh; height: 100dvh; }
.app-container { display: flex; flex-direction: column; height: 100%; }
.app-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; padding-top: calc(12px + var(--safe-top));
    background: rgba(15,15,35,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); min-height: var(--header-height);
}
.header-left { display: flex; flex-direction: column; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-title {
    font-size: 1.15rem; font-weight: 700;
    background: linear-gradient(135deg, #6366F1, #A78BFA);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header-avatar { cursor: pointer; }
.avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-img.large { width: 80px; height: 80px; border: 3px solid var(--primary-glow); }
.avatar-initial {
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 700; color: #fff;
}
.avatar-initial.large { width: 80px; height: 80px; font-size: 2rem; }

/* ===== Page Content ===== */
.page-content {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 16px 16px calc(var(--nav-height) + var(--safe-bottom) + 16px);
    scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}

/* ===== Bottom Nav ===== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: stretch; justify-content: space-around;
    background: rgba(15,15,35,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border); padding-bottom: var(--safe-bottom); height: var(--nav-height);
}
.bottom-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-family: inherit; font-size: 0.68rem; font-weight: 500;
    padding: 8px 4px; position: relative; transition: color 0.2s;
}
.bottom-nav button.active { color: var(--primary-light); }
.bottom-nav button.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 24px; height: 2px; background: var(--primary); border-radius: 0 0 2px 2px;
}

/* ===== Balance Card ===== */
.balance-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
    position: relative; overflow: hidden;
}
.balance-card::before {
    content: ''; position: absolute; top: -40%; right: -20%; width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%); border-radius: 50%;
}
.balance-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.balance-amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; position: relative; }
.balance-row { display: flex; gap: 20px; position: relative; }
.balance-stat { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.balance-stat.income svg { color: var(--income); }
.balance-stat.expense svg { color: var(--expense); }
.balance-stat.income span { color: var(--income); }
.balance-stat.expense span { color: var(--expense); }

/* ===== Quick Actions ===== */
.quick-actions { display: flex; gap: 12px; margin-bottom: 20px; }
.quick-action {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 14px 8px; background: var(--bg-card); border-radius: var(--radius-sm);
    border: 1px solid var(--border); cursor: pointer; font-family: inherit;
    color: var(--text); transition: all 0.15s;
}
.quick-action:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.qa-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700;
}
.qa-icon.expense-icon { background: var(--expense-bg); color: var(--expense); }
.qa-icon.income-icon { background: var(--income-bg); color: var(--income); }
.qa-icon.bank-icon { background: var(--warn-bg); color: var(--warn); font-size: 1.1rem; }
.qa-icon.task-icon { background: var(--primary-glow); color: var(--primary-light); }
.qa-label { font-size: 0.78rem; font-weight: 500; }

/* ===== Sections ===== */
.section { background: var(--bg-card); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; border: 1px solid var(--border); }
.section-title { font-size: 0.92rem; font-weight: 600; margin-bottom: 12px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* ===== Budget Alerts (Dashboard) ===== */
.budget-alerts { display: flex; flex-direction: column; gap: 12px; }
.budget-alert-card {
    background: var(--bg-input); border-radius: var(--radius-sm); padding: 12px;
    border-left: 3px solid var(--primary);
}
.budget-alert-card.warning { border-left-color: var(--warn); }
.budget-alert-card.over { border-left-color: var(--expense); }
.budget-alert-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.budget-alert-category { font-size: 0.85rem; font-weight: 500; }
.budget-alert-pct { font-size: 0.82rem; font-weight: 700; color: var(--text-secondary); }
.budget-alert-footer { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* ===== Progress Bar (generic) ===== */
.progress-bar { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.progress-bar.small { height: 4px; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s; background: var(--primary); }

/* ===== Goal Mini Cards (Dashboard) ===== */
.goals-grid { display: flex; flex-direction: column; }
.goal-mini-card { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.goal-mini-card + .goal-mini-card { border-top: 1px solid var(--border); }
.goal-mini-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.goal-mini-info { flex: 1; min-width: 0; }
.goal-mini-title { font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-mini-pct { font-size: 0.78rem; font-weight: 700; color: var(--text-secondary); width: 40px; text-align: right; flex-shrink: 0; }

/* ===== Transaction List ===== */
.transaction-list { min-height: 40px; }
.transaction-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.transaction-item + .transaction-item { border-top: 1px solid var(--border); }
.tx-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.tx-info { flex: 1; min-width: 0; }
.tx-label { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date, .tx-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-size: 0.92rem; font-weight: 700; white-space: nowrap; }
.tx-amount.income { color: var(--income); }
.tx-amount.expense { color: var(--expense); }
.tx-date-header {
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 12px 0 4px; position: sticky; top: 0; background: var(--bg); z-index: 1;
}

/* ===== Upcoming Bills ===== */
.upcoming-list { display: flex; flex-direction: column; }
.upcoming-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.upcoming-item + .upcoming-item { border-top: 1px solid var(--border); }
.upcoming-icon { font-size: 1.2rem; width: 32px; text-align: center; }
.upcoming-info { flex: 1; }
.upcoming-label { font-size: 0.85rem; font-weight: 500; }
.upcoming-date { font-size: 0.75rem; color: var(--text-muted); }
.upcoming-amount { font-size: 0.88rem; font-weight: 600; }
.upcoming-amount.income { color: var(--income); }
.upcoming-amount.expense { color: var(--expense); }

/* ===== Filter Bar ===== */
.filter-bar { margin-bottom: 16px; }

/* ===== FAB ===== */
.fab {
    position: fixed; bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px); right: 20px;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4); transition: all 0.15s; z-index: 50;
}
.fab:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ===== Budget Cards ===== */
.budget-list { display: flex; flex-direction: column; gap: 12px; }
.budget-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    border: 1px solid var(--border);
}
.budget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.budget-category { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; }
.budget-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.budget-amounts { margin-bottom: 10px; }
.budget-spent { font-size: 1.1rem; font-weight: 700; }
.budget-limit { font-size: 0.85rem; color: var(--text-muted); }
.budget-footer { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; }
.budget-footer .over { color: var(--expense); font-weight: 600; }

/* ===== Goal Cards ===== */
.goals-list { display: flex; flex-direction: column; gap: 12px; }
.goal-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    border: 1px solid var(--border);
}
.goal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.goal-icon-wrap { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.goal-title-wrap { flex: 1; min-width: 0; }
.goal-title { font-size: 0.95rem; font-weight: 600; }
.goal-deadline { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.goal-amounts { margin-bottom: 10px; }
.goal-current { font-size: 1.1rem; font-weight: 700; }
.goal-target { font-size: 0.85rem; color: var(--text-muted); }
.goal-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 0.82rem; color: var(--text-muted); }

/* ===== Stats ===== */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.stat-card {
    background: var(--bg-card); border-radius: var(--radius-sm); padding: 16px;
    border: 1px solid var(--border);
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 1.15rem; font-weight: 700; }
.stat-value.income { color: var(--income); }
.stat-value.expense { color: var(--expense); }

/* Category Breakdown */
.category-breakdown { display: flex; flex-direction: column; gap: 10px; }
.category-bar-item { padding: 4px 0; }
.cat-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 0.85rem; }

/* Monthly Chart */
.monthly-chart { display: flex; gap: 8px; align-items: flex-end; height: 120px; padding-bottom: 4px; }
.month-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.month-bars { display: flex; gap: 3px; align-items: flex-end; height: 100px; }
.month-bar { width: 14px; border-radius: 3px 3px 0 0; transition: height 0.3s; min-height: 2px; }
.month-bar.income-bar { background: var(--income); opacity: 0.8; }
.month-bar.expense-bar { background: var(--expense); opacity: 0.8; }
.month-label { font-size: 0.65rem; color: var(--text-muted); }
.chart-legend { display: flex; gap: 16px; justify-content: center; margin-top: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--text-muted); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.income { background: var(--income); }
.legend-dot.expense { background: var(--expense); }

/* ===== Recurring ===== */
.recurring-list { display: flex; flex-direction: column; gap: 12px; }
.recurring-card {
    background: var(--bg-card); border-radius: var(--radius); padding: 16px;
    border: 1px solid var(--border);
}
.recurring-card.paused { opacity: 0.5; }
.rec-header { display: flex; align-items: center; gap: 12px; }
.rec-icon { font-size: 1.2rem; width: 36px; text-align: center; flex-shrink: 0; }
.rec-info { flex: 1; min-width: 0; }
.rec-label { font-size: 0.92rem; font-weight: 600; }
.rec-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.rec-amount { font-size: 0.95rem; font-weight: 700; white-space: nowrap; }
.rec-amount.income { color: var(--income); }
.rec-amount.expense { color: var(--expense); }
.rec-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ===== Bank ===== */
.bank-status-card { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.bank-status-icon {
    width: 48px; height: 48px; border-radius: 14px; background: var(--bg-input);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.bank-status-icon.connected { background: var(--income-bg); }
.bank-status-info { flex: 1; }
.bank-status-label { font-weight: 600; font-size: 0.95rem; }
.bank-status-sync { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.bank-config-form { margin-top: 16px; }
.bank-config-form h4 { margin-bottom: 4px; }
.bank-config-actions { display: flex; gap: 8px; margin-top: 4px; }
.bank-config-actions .btn { flex: 1; }
.bank-connected-actions { margin-top: 16px; }

/* ===== Tasks ===== */
.tasks-list { display: flex; flex-direction: column; }
.task-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; }
.task-card + .task-card { border-top: 1px solid var(--border); }
.task-card.done { opacity: 0.5; }
.task-check {
    width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-light);
    background: transparent; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.15s; margin-top: 2px;
}
.task-check.checked { background: var(--income); border-color: var(--income); }
.task-check.checked svg { color: #fff; }
.task-info { flex: 1; }
.task-title { font-size: 0.9rem; font-weight: 500; }
.task-card.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-due { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ===== Settings ===== */
.settings-profile { display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; }
.settings-avatar { position: relative; cursor: pointer; }
.avatar-overlay {
    position: absolute; bottom: 0; right: 0; width: 28px; height: 28px;
    background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

/* ===== Modals ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    animation: fadeIn 0.15s ease;
}
.modal-sheet {
    width: 100%; max-width: 500px; max-height: 90vh;
    background: var(--bg-modal); border-radius: var(--radius) var(--radius) 0 0;
    overflow-y: auto; animation: slideUp 0.2s ease;
    padding-bottom: var(--safe-bottom);
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--bg-modal); z-index: 1;
}
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-form { padding: 20px; }

/* ===== Transaction Detail ===== */
.tx-detail { padding: 20px; text-align: center; }
.tx-detail-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 16px; }
.tx-detail-amount { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.tx-detail-amount.income { color: var(--income); }
.tx-detail-amount.expense { color: var(--expense); }
.tx-detail-label { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.tx-detail-meta { display: flex; gap: 12px; justify-content: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.tx-detail-notes { background: var(--bg-input); border-radius: var(--radius-sm); padding: 12px; font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 20px; text-align: left; }
.tx-detail-actions { display: flex; flex-direction: column; gap: 8px; }

/* ===== Empty State ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; text-align: center; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Toast ===== */
.toast {
    position: fixed; top: calc(16px + var(--safe-top)); left: 16px; right: 16px; z-index: 300;
    background: var(--bg-card); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 14px 18px; cursor: pointer;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4); font-size: 0.88rem; font-weight: 500;
    animation: slideDown 0.25s ease;
}
.toast.success { border-left: 3px solid var(--income); }
.toast.error { border-left: 3px solid var(--expense); }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Responsive ===== */
@media (min-width: 500px) {
    .modal-sheet { border-radius: var(--radius); max-height: 80vh; margin: auto; }
    .modal-overlay { align-items: center; }
}
@media (min-width: 768px) {
    .page-content { max-width: 600px; margin: 0 auto; }
    .balance-card { padding: 32px; }
    .balance-amount { font-size: 2.6rem; }
}
