/* static/css/style.css */

/* === Design Tokens === */
:root {
    --color-income:   #1D9E75;
    --color-expenses: #D85A30;
    --color-savings:  #56A6C4;

    --color-income-tint:   rgba(29, 158, 117, 0.15);
    --color-expenses-tint: rgba(216, 90, 48, 0.15);
    --color-savings-tint:  rgba(86, 166, 196, 0.15);

    --color-income-muted:   rgba(29, 158, 117, 0.40);
    --color-expenses-muted: rgba(216, 90, 48, 0.40);
    --color-savings-muted:  rgba(86, 166, 196, 0.40);

    --text-primary:   #e8e8e6;
    --text-secondary: #888885;
    --text-muted:     #888885;

    --bg-page:    #1a1a1a;
    --bg-white:   #242424;
    --bg-subtle:  #2a2a2a;

    --border:       rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.06);

    --radius:    6px;
    --radius-sm: 4px;

    --nav-height: 44px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "Consolas", "Menlo", "Monaco", monospace;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 15px;
    line-height: 1.6;
    font-family: var(--font);
    color: var(--text-primary);
    background-color: var(--bg-page);
}

body {
    margin: 0;
    padding-top: var(--nav-height);
}

h1, h2, h3 {
    line-height: 1.25;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

h2 { font-size: 1.25rem; }

a {
    color: var(--color-savings);
    text-decoration: none;
}
a:hover { text-decoration: underline; }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}


/* === Navigation === */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: #141414;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 100;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-decoration: none;
}

.main-nav .nav-brand .brand-grid   { color: #6b6e6b !important; }
.main-nav .nav-brand .brand-budget { color: #1D9E75 !important; }

.main-nav a.nav-brand {
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: inherit;
}
.main-nav a.nav-brand:hover {
    background: none;
    color: inherit;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-nav a {
    display: block;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.main-nav a:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.main-nav a.active {
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-weight: 600;
}


/* === Layout === */
main.container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.summary-page main.container,
.categories-page main.container {
    max-width: 100%;
}

body.summary-page,
body.categories-page {
    overflow-x: auto;
}


/* === Footer === */
footer {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}


/* === Flash Messages === */
.flashes.top-flashes {
    list-style: none;
    padding: 0;
    margin-bottom: 1.25rem;
}

.flash-message {
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.9rem;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}
.flash-message.fade-out { opacity: 0; }

.flash-message.success {
    color: #1D9E75;
    background-color: var(--color-income-tint);
    border-color: var(--color-income-muted);
}

.flash-message.error {
    color: #D85A30;
    background-color: var(--color-expenses-tint);
    border-color: var(--color-expenses-muted);
}


/* === Forms === */
label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    background: #2a2a2a;
    font-family: var(--font);
    font-size: 0.95rem;
    color: #e8e8e6;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--color-savings);
    box-shadow: 0 0 0 3px rgba(86, 166, 196, 0.15);
}

input[type="submit"],
button {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    background-color: var(--color-savings);
    color: #fff;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

input[type="submit"]:hover,
button:hover {
    background-color: #3d8aab;
}
input[type="submit"]:disabled,
button:disabled {
    background-color: #3a3a3a;
    color: #666;
    cursor: not-allowed;
}

.error-message {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--color-expenses);
}


/* === Transaction Table === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

th, td {
    border-bottom: 1px solid var(--border-light);
    padding: 0.55rem 0.75rem;
    text-align: left;
    vertical-align: middle;
}

th {
    background-color: var(--bg-subtle);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background-color: rgba(255, 255, 255, 0.04); }

/* Amount cell — monospaced, right-aligned */
.amount-cell {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    white-space: nowrap;
    text-align: right;
    padding-right: 0.9rem;
}


/* === Yearly Summary Table === */
.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.82rem;
    table-layout: fixed;
    background: var(--bg-white);
    overflow: visible;
}

.summary-table col.col-category { width: 18%; min-width: 130px; }
.summary-table col.col-budget   { width: 5%;   min-width: 85px; }
.summary-table col.col-month    { width: 5.6%; min-width: 110px; }
.summary-table col.col-annual   { width: 8.5%; min-width: 120px; }

.summary-table th,
.summary-table td {
    border: 1px solid var(--border-light);
    padding: 0.2rem 0.5rem;
    text-align: left;
    vertical-align: middle;
    overflow: hidden;
}
.summary-table th:first-child, .summary-table td:first-child { border-left: 1px solid rgba(255,255,255,0.08); }
.summary-table th:last-child,  .summary-table td:last-child  { border-right: 1px solid rgba(255,255,255,0.08); }
.summary-table tr.spacer-row td:first-child { border-left: none !important; }
.summary-table tr.spacer-row td:last-child  { border-right: none !important; }

.summary-table thead th {
    background: #1e1e1e;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

/* Type rows */
.summary-table .type-row td {
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.3rem 0.75rem;
    border-left: none;
    border-right: none;
    letter-spacing: 0.02em;
}

.summary-table tr.type-income td {
    background-color: rgba(29, 158, 117, 0.35);
    color: var(--color-income);
}
.summary-table tr.type-income td:first-child {
    border-left: 3px solid var(--color-income);
}

.summary-table tr.type-expenses td {
    background-color: rgba(216, 90, 48, 0.35);
    color: var(--color-expenses);
}
.summary-table tr.type-expenses td:first-child {
    border-left: 3px solid var(--color-expenses);
}

.summary-table tr.type-savings td {
    background-color: rgba(86, 166, 196, 0.35);
    color: #56A6C4;
}
.summary-table tr.type-savings td:first-child {
    border-left: 3px solid #56A6C4;
}

/* Grouping rows — section dividers */
.summary-table tr.grouping-row td {
    background-color: #1f1f1f;
    font-weight: 600;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.25rem 0;
    border-top: 1px solid var(--border);
    border-left: none;
    border-right: none;
}
.summary-table tr.grouping-row td.grouping-name {
    padding-left: 1rem;
}

/* Category rows */
.summary-table .category-row td {
    font-size: 0.86rem;
}
.summary-table .category-row td.category-name {
    padding-left: calc(1.75rem + 7px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.summary-table tr.category-row.odd td  { background-color: var(--bg-white); }
.summary-table tr.category-row.even td { background-color: rgba(255, 255, 255, 0.02); }

/* Muted dash for empty cells */
.summary-table .empty-dash {
    color: var(--text-muted);
}

/* Grouping subtotal rows */
.summary-table tr.grouping-total-row td {
    background-color: #1e1e1e;
    font-size: 0.86rem;
    border-top: 2px solid rgba(255, 255, 255, 0.10);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

.summary-table tr.grouping-total-row .total-col {
    background-color: #1e1e1e;
}

.summary-table tr.grouping-total-row td.grouping-total-label {
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.86rem;
    padding-left: calc(1.375rem + 3.5px);
}

/* Total rows */
.summary-table .total-type-row td {
    font-weight: 700;
    border-top: 2px solid var(--border);
    font-size: 0.86rem;
}
.summary-table .total-type-row td:first-child {
    padding-left: 0.75rem;
}

/* Total row tinted backgrounds */
.summary-table .total-type-row.total-income td {
    background-color: rgba(29, 158, 117, 0.07);
    border-top-color: var(--color-income);
    color: var(--color-income);
}
.summary-table .total-type-row.total-expenses td {
    background-color: rgba(216, 90, 48, 0.07);
    border-top-color: var(--color-expenses);
    color: var(--color-expenses);
}
.summary-table .total-type-row.total-savings td {
    background-color: rgba(86, 166, 196, 0.07);
    border-top-color: var(--color-savings);
    color: var(--color-savings);
}

/* Annual total column — only on non-total rows */
.summary-table tr:not(.total-type-row) .total-col {
    font-weight: 600;
}
/* Left border separator — runs full table height */
.summary-table .total-col,
.summary-table thead th:last-child             { border-left: 3px solid rgba(255,255,255,0.2); }
/* Soft gold color — consistent down the full column */
.summary-table .total-col,
.summary-table thead th:last-child             { color: #d4c9a8; }
/* Zebra stripe — match regular category row colors exactly */
.summary-table tr.category-row.odd  .total-col { background-color: var(--bg-white); border-left: 3px solid rgba(255,255,255,0.2); }
.summary-table tr.category-row.even .total-col { background-color: rgba(255,255,255,0.02); border-left: 3px solid rgba(255,255,255,0.2); }
/* Spacer rows between type sections */
.summary-table tr.spacer-row td { height: 10px; background: var(--bg-page) !important; border-top: none !important; border-bottom: none !important; border-left: none !important; border-right: none !important; padding: 0; box-shadow: -2px 0 0 var(--bg-page), 2px 0 0 var(--bg-page); }
/* Net row border */
.summary-table tr.net-row td              { border-top: 2px solid rgba(255,255,255,0.4) !important; border-bottom: 2px solid rgba(255,255,255,0.4) !important; }
.summary-table tr.net-row td:first-child  { border-left: 2px solid rgba(255,255,255,0.4) !important; }
.summary-table tr.net-row td:last-child   { border-right: 2px solid rgba(255,255,255,0.4) !important; }

/* Yearly summary page header */
.yearly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 1rem;
    position: fixed;
    top: 44px;
    left: 0;
    right: 0;
    z-index: 10;
    height: 56px;
    background: #1a1a1a;
    margin: 0;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.yearly-header h2 {
    margin: 0;
}

.yearly-header-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.yearly-header-controls select {
    width: auto;
    min-width: 90px;
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
}

.btn-hide-empty {
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-hide-empty:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-hide-empty.active {
    background: var(--bg-subtle);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}



/* =============================================================================
   Monthly View
   ============================================================================= */

/* Shared type-colored amounts — used on monthly page and anywhere else */
.amount-income   { color: var(--color-income)   !important; font-weight: 600; }
.amount-expenses { color: var(--color-expenses)  !important; font-weight: 600; }
.amount-savings  { color: var(--color-savings)   !important; font-weight: 600; }

/* Month top bar */
.month-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    margin-top: 0.5rem;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-arrows {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.month-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.month-sep {
    width: 1px;
    height: 28px;
    background: #3a3a3a;
}

.month-year-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.month-year-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.month-year-caret {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    width: 20px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888885;
    font-size: 0.75rem;
}

.month-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    text-decoration: none;
    background: var(--bg-white);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.month-arrow:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

.month-year-select {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    padding: 0;
    margin: 0;
    border: none;
}

.btn-add {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: not-allowed;
}

/* Cash flow summary */
.cashflow-section {
    margin-bottom: 1.5rem;
}

.cashflow-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border-left-width: 4px;
}

.stat-income   { border-left-color: var(--color-income);   background: rgba(29, 158, 117, 0.10); }
.stat-expenses { border-left-color: var(--color-expenses); background: rgba(216, 90, 48, 0.10); }
.stat-savings  { border-left-color: #56A6C4;               background: rgba(86, 166, 196, 0.10); }
.stat-net      { border-left-color: #888885;               background: rgba(136, 136, 133, 0.10); }

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-income   .stat-value { color: var(--color-income); }
.stat-expenses .stat-value { color: var(--color-expenses); }
.stat-savings  .stat-value { color: #56A6C4; }
.stat-net      .stat-value { color: #888885; font-size: 1.2rem; }

.stat-income   .stat-label { color: var(--color-income); }
.stat-expenses .stat-label { color: var(--color-expenses); }
.stat-savings  .stat-label { color: #56A6C4; }

/* Two-column layout */
.monthly-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
    align-items: start;
}

/* Section heading */
.section-heading {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

/* Transaction table */
.tx-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 0.875rem;
    margin-top: 0;
}

.tx-table th {
    background: var(--bg-subtle);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.tx-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    color: var(--text-primary);
}

.tx-table tbody tr:last-child td { border-bottom: none; }
.tx-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

.tx-date   { color: var(--text-secondary); font-size: 0.82rem; white-space: nowrap; }
.tx-source { font-weight: 500; }
.tx-note   { color: var(--text-muted); font-size: 0.85rem; }
.tx-table .col-amount {
    text-align: right;
    padding-right: 0.9rem;
}
.tx-amount {
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    white-space: nowrap;
    padding-right: 0.9rem;
}

/* Category pill */
.type-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.type-pill-income   { background: rgba(29, 158, 117, 0.15);  color: var(--color-income); }
.type-pill-expenses { background: rgba(216, 90, 48, 0.15);   color: var(--color-expenses); }
.type-pill-savings  { background: rgba(86, 166, 196, 0.15);  color: var(--color-savings); }

/* Action buttons (edit/delete) on transaction rows */
.col-actions { width: 1px; } /* shrink column to content */

.tx-actions {
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.12s;
}
.tx-table tbody tr:hover .tx-actions { opacity: 1; }

.btn-tx-edit,
.btn-tx-delete {
    padding: 0.2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color 0.12s;
    line-height: 1;
}
.btn-tx-edit { margin-right: 0.15rem; }
.btn-tx-edit:hover  { color: var(--text-primary); }
.btn-tx-delete:hover { color: var(--color-expenses); }

/* Button below transaction table */
.tx-table-footer {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Empty state */
.empty-state {
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.empty-state p { margin: 0; }

/* Sidebar */
.monthly-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.sidebar-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin: 0 0 0.85rem;
}

/* Sidebar card header (title + toggle button) */
.sidebar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.sidebar-card-header .sidebar-card-title {
    margin: 0;
}

.sidebar-card-header .btn-hide-empty {
    font-size: 0.68rem;
    padding: 0.2rem 0.5rem;
    flex-shrink: 0;
}

/* Sidebar budget rows */
.sidebar-row {
    padding: 0.45rem 0;
    border-top: 1px solid var(--border-light);
}

.sidebar-row:first-of-type {
    border-top: none;
}

.sidebar-row-name {
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-row-amounts {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.3rem;
}

.sidebar-actual,
.sidebar-actual-muted {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.sidebar-actual-muted {
    color: var(--text-muted);
}

.sidebar-budget {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
}

.sidebar-no-budget {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Progress bar */
.sidebar-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.sidebar-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.2s ease;
}

/* Empty state */
.sidebar-empty-msg {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    padding: 0.25rem 0;
}


/* =============================================================================
   Modal
   ============================================================================= */

/* Prevent body scroll when modal is open */
body.modal-active { overflow: hidden; }

/* Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.modal-open {
    display: flex;
}

/* Card */
.modal-card {
    background: #242424;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#editCatModal .modal-card {
    max-width: 580px;
}

/* Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.9rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}
.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.required-asterisk {
    color: #D85A30;
    margin-left: 2px;
    font-weight: 600;
}

/* Form body */
.modal-form {
    padding: 1.25rem;
}

.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Override label style inside modal to remove uppercase */
.modal-form label {
    text-transform: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0;
    margin-bottom: 0.25rem;
}

/* Footer */
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-light);
}

.btn-cancel {
    padding: 0.45rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-cancel:hover {
    background: var(--bg-subtle);
    border-color: rgba(255, 255, 255, 0.18);
}

input[type="submit"].btn-save,
button.btn-save {
    padding: 0.45rem 1.1rem;
    border: 1px solid #56A6C4;
    border-radius: var(--radius-sm);
    background: #2a2a2a;
    color: #56A6C4;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
input[type="submit"].btn-save:hover,
button.btn-save:hover {
    background: #1e3540;
}
input[type="submit"].btn-save:disabled,
button.btn-save:disabled {
    background-color: #2a2a2a;
    color: #888885;
    border-color: #888885;
    cursor: not-allowed;
}

/* Also style the enabled Add Transaction button */
.btn-add:not([disabled]) {
    border: 1px solid var(--color-savings);
    background: var(--bg-white);
    color: var(--color-savings);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-add:not([disabled]):hover {
    background: var(--color-savings);
    color: #fff;
}


/* =============================================================================
   Categories Page
   ============================================================================= */

.categories-page .cat-page-header {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 2.5rem;
}

.categories-page .cat-page-header h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    flex-shrink: 0;
}

.cat-page-flash {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.cat-page-flash .flash-message {
    display: inline-block;
    margin: 0;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

.btn-copy-budgets {
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.82rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-copy-budgets:hover {
    color: var(--text-secondary);
    border-color: var(--text-secondary);
    background: none;
}

/* Type section — card wrapper */
.cat-type-section {
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    background: var(--bg-white);
}

/* Type header bar — matches yearly summary type-row style */
.cat-type-header {
    padding: 0.4rem 0.9rem;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border);
}

.cat-type-header.type-header-income {
    background-color: rgba(29, 158, 117, 0.35);
    color: var(--color-income);
    border-left: 3px solid var(--color-income);
}

.cat-type-header.type-header-expenses {
    background-color: rgba(216, 90, 48, 0.35);
    color: var(--color-expenses);
    border-left: 3px solid var(--color-expenses);
}

.cat-type-header.type-header-savings {
    background-color: rgba(86, 166, 196, 0.35);
    color: var(--color-savings);
    border-left: 3px solid var(--color-savings);
}

/* Grouping block */
.cat-grouping-block {
    border-bottom: 1px solid var(--border-light);
}

.cat-grouping-block:last-of-type {
    border-bottom: none;
}

/* Categories table */
.cat-table {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    table-layout: fixed;
}

/* Year header row */
.cat-col-headers th {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-white);
}

.cat-th-name {
    text-align: left;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
}

.cat-th-year {
    text-align: center;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    width: 70px;
    min-width: 70px;
    max-width: 70px;
}

.cat-th-actions {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
}

/* Grouping row */
.cat-grouping-row td {
    background: #1f1f1f;
    border-bottom: 1px solid var(--border-light);
    padding: 0;
}

.cat-grouping-name-cell {
    display: table-cell;
    vertical-align: middle;
    padding: 0.3rem 0.75rem 0.3rem 1rem;
    width: 100%;
}

.cat-grouping-name-cell .cat-grouping-actions {
    float: right;
}

.cat-grouping-name {
    font-size: 0.69rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding-left: 0.75rem;
}

.cat-grouping-actions {
    opacity: 0;
    transition: opacity 0.12s;
    display: flex;
    align-items: center;
    gap: 0.1rem;
    padding-right: 0.75rem;
}

.cat-grouping-row:hover .cat-grouping-actions {
    opacity: 1;
}

/* Category row */
.cat-category-row td {
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s;
    vertical-align: middle;
}

.cat-category-row:last-of-type td {
    border-bottom: none;
}

.cat-category-row:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.cat-cat-name {
    padding-left: calc(1rem + 14px) !important;
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-budget-cell {
    text-align: right;
    padding-left: 0.2rem !important;
    padding-right: 0.35rem !important;
}

.cat-budget-value {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.cat-budget-dash {
    font-size: 0.82rem;
    color: rgba(136, 136, 133, 0.4);
}

.cat-actions-cell {
    padding-right: 0.75rem !important;
}

.cat-cat-actions {
    opacity: 0;
    transition: opacity 0.12s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.1rem;
}

.cat-category-row:hover .cat-cat-actions {
    opacity: 1;
}

/* Add trigger / inline form rows */
.cat-add-row td {
    padding: 0.3rem 0.75rem 0.3rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.cat-add-grouping-row-trigger td {
    border-top: 1px solid var(--border-light);
    border-bottom: none;
}

.cat-inline-row td {
    padding: 0;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.cat-inline-form-inner {
    padding: 0.4rem 0.75rem 0.4rem 1rem;
}

.cat-inline-form-inner form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cat-inline-form-inner input[type="text"] {
    flex: 1;
    max-width: 340px;
    padding: 0.33rem 0.65rem;
    font-size: 0.875rem;
    width: auto;
}

/* Icon buttons — same pattern as .btn-tx-edit / .btn-tx-delete */
.btn-cat-edit,
.btn-cat-delete,
.btn-grp-edit,
.btn-grp-delete,
.btn-sort {
    padding: 0.2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color 0.12s;
    line-height: 1;
}

.btn-cat-edit,
.btn-grp-edit {
    margin-right: 0.1rem;
}

.btn-cat-edit:hover,
.btn-grp-edit:hover {
    color: var(--text-primary);
}

.btn-cat-delete:hover,
.btn-grp-delete:hover {
    color: var(--color-expenses);
}

/* Sort arrow buttons */
.btn-sort:hover {
    color: var(--text-primary);
}

.btn-sort[data-first="true"],
.btn-sort[data-last="true"] {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-inline-add {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font);
    cursor: pointer;
    padding: 0.1rem 0;
    font-weight: 500;
    transition: color 0.15s;
}

.btn-inline-add:hover {
    color: var(--text-secondary);
    background: none;
}

.btn-inline-submit {
    padding: 0.33rem 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-savings);
    color: #fff;
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-inline-submit:hover {
    background: #3d8aab;
}

.btn-inline-cancel {
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.1rem 0;
    font-family: var(--font);
    transition: color 0.15s;
    white-space: nowrap;
}

.btn-inline-cancel:hover {
    color: var(--text-secondary);
    background: none;
}

/* Modal body layout for categories modals */
.cat-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cat-modal-body .form-group {
    margin: 0;
}

.cat-budget-section-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cat-budget-year-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cat-budget-year-labels,
.cat-budget-year-inputs {
    display: flex;
    gap: 0.4rem;
}

.cat-year-label {
    width: 75px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    flex-shrink: 0;
}

.cat-year-label-current {
    color: var(--text-primary);
    font-weight: 600;
}

.cat-year-input {
    width: 75px !important;
    max-width: 75px;
    min-width: 0;
    text-align: right;
    padding-left: 0.25rem;
    padding-right: 0.4rem;
    flex-shrink: 0;
}

.cat-year-input::-webkit-outer-spin-button,
.cat-year-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cat-year-input[type=number] {
    -moz-appearance: textfield;
}

/* Cross-type move warning inside edit category modal */
.cat-move-warning {
    display: none;
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: var(--color-expenses);
    background: var(--color-expenses-tint);
    border: 1px solid var(--color-expenses-muted);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
}


/* ===========================================================================
   Copy from Previous feature
   =========================================================================== */

/* Modal 1 header — source month navigation */
.copy-src-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.5rem;
}
.copy-src-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
button.copy-src-arrow {
    background: none;
    border: none;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
button.copy-src-arrow:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}
button.copy-src-arrow:disabled {
    opacity: 0.25;
    cursor: default;
    background: none;
}
.copy-src-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 118px;
    text-align: center;
}
.copy-src-year-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    cursor: pointer;
    margin-left: 0.25rem;
}
.copy-src-year-text {
    font-size: 0.82rem;
    color: var(--text-primary);
    font-weight: 500;
    pointer-events: none;
}
.copy-src-year-caret {
    font-size: 0.65rem;
    color: var(--text-muted);
    pointer-events: none;
}
.copy-src-year-select {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    background: #2a2a2a;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

button.btn-copy-month {
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
button.btn-copy-month:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    background: transparent;
}

/* Wider card for Modal 2 */
.modal-card-wide {
    max-width: 700px;
}

/* Scrollable body shared by both copy modals */
.copy-modal-body {
    padding: 0 1.25rem 1.25rem;
    overflow-y: auto;
    max-height: calc(60vh - 4rem);
}

/* Select-all control row above the list */
.copy-modal-controls {
    padding: 0.75rem 0 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.25rem;
}
.copy-select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* Modal 1 — transaction list */
.copy-tx-list {
    display: flex;
    flex-direction: column;
}
.copy-tx-row {
    display: grid;
    grid-template-columns: 20px 50px 1fr auto 68px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-primary);
    transition: background 0.1s;
}
.copy-tx-row:hover {
    background: rgba(255, 255, 255, 0.04);
}
.copy-tx-row .type-pill {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.copy-tx-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
}
.copy-tx-source-wrap {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.copy-tx-note {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-left: 0.3rem;
}
.copy-tx-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Modal 2 — review rows */
.copy-review-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.5rem;
}
.copy-review-row {
    display: grid;
    grid-template-columns: 130px 1fr auto 90px;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.copy-review-row:last-child {
    border-bottom: none;
}
.copy-review-source-note {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    overflow: hidden;
}
.copy-review-source {
    font-size: 0.82rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
input.copy-review-amount {
    text-align: right;
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
}
input.copy-review-date {
    padding: 0.3rem 0.5rem;
    font-size: 0.82rem;
}

/* Note text inside Modal 2 review rows */
.copy-review-note {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Footer padding for copy modals (they sit outside the padded body div) */
.copy-modal-footer {
    padding: 0.75rem 1rem;
}

/* Inline error shown if a copy POST fails */
.copy-error-msg {
    color: var(--color-expenses);
    font-size: 0.82rem;
    padding: 0.5rem 0;
}


/* =============================================================================
   Authentication - landing page, account menu, account modals
   ============================================================================= */

/* --- Landing page layout --- */
body.landing-page main.container {
    max-width: 400px;
    margin-top: 3.5rem;
}

.auth-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.auth-brand {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.auth-brand .brand-grid   { color: #6b6e6b; }
.auth-brand .brand-budget { color: var(--color-income); }

.auth-tagline {
    text-align: center;
    margin: 0.15rem 0 1.35rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* --- Sign In / Sign Up toggle --- */
.auth-toggle {
    display: flex;
    gap: 0.35rem;
    padding: 0.25rem;
    margin-bottom: 1.35rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
}

button.auth-toggle-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
button.auth-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}
button.auth-toggle-btn.active {
    background: var(--bg-white);
    color: var(--color-savings);
}

/* --- Auth forms --- */
.auth-form .form-group {
    margin-bottom: 0.9rem;
}

.auth-form label {
    text-transform: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0;
    margin-bottom: 0.25rem;
}

.field-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

button.auth-submit,
input[type="submit"].auth-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.55rem 1rem;
}

.auth-help {
    margin: 0.9rem 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.auth-disabled-note {
    margin: 0 0 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--color-expenses-tint);
    border: 1px solid var(--color-expenses-muted);
    color: #D85A30;
    font-size: 0.8rem;
}

/* --- Navbar account menu --- */
.user-menu {
    position: relative;
    margin-left: auto;
}

button.user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
button.user-icon:hover {
    background: #333;
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    padding: 0.35rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 150;
}
.user-dropdown.open { display: block; }

.user-dropdown-email {
    padding: 0.4rem 0.6rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

button.user-dropdown-item,
a.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.42rem 0.6rem;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
button.user-dropdown-item:hover,
a.user-dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
    text-decoration: none;
}

button.user-dropdown-item.danger {
    color: var(--color-expenses);
}
button.user-dropdown-item.danger:hover {
    background: var(--color-expenses-tint);
    color: var(--color-expenses);
}

.user-dropdown-divider {
    height: 1px;
    margin: 0.3rem 0.2rem;
    background: var(--border);
}

/* --- Delete Account modal --- */
.delete-warning-lead {
    margin: 0 0 0.6rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.delete-warning-list {
    margin: 0 0 0.9rem;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.delete-warning-list li { margin-bottom: 0.2rem; }

.delete-warning-final {
    margin: 0;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--color-expenses-tint);
    border: 1px solid var(--color-expenses-muted);
    color: var(--color-expenses);
    font-size: 0.85rem;
    font-weight: 600;
}

button.btn-danger {
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--color-expenses);
    border-radius: var(--radius-sm);
    background: #2a2a2a;
    color: var(--color-expenses);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
button.btn-danger:hover {
    background: #3a2018;
}
