/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius: 0.75rem;
  --bs-border-radius-lg: 1rem;
  --bs-border-radius-xl: 1.25rem;

  --bg-body: #eef1f6;
  --bg-surface: #ffffff;
  --bg-surface-2: #fafbfc;
  --surface-alt: #f8f9fc;
  --border-subtle: #e9ecf2;
  --dashed-border: #cfd6e4;
  --scrollbar-thumb: #c7ccd6;

  --text-primary: #1f2530;
  --text-muted: #6b7280;
  --text-faint: #8a92a3;
  --text-label: #374151;

  --accent: #0d6efd;
  --accent-rgb: 13, 110, 253;
  --accent-contrast: #ffffff;

  --positive: #198754;
  --positive-bg: #eafaf0;
  --negative: #dc3545;
  --negative-bg: #fdecee;
  --negative-border: #f6c6cc;
  --warn: #ffc107;
  --warn-bg: #fff3cd;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);
}

[data-bs-theme="dark"] {
  --bg-body: #0b0f17;
  --bg-surface: #141925;
  --bg-surface-2: #0f131c;
  --surface-alt: #1b2230;
  --border-subtle: #232a3a;
  --dashed-border: #2a3142;
  --scrollbar-thumb: #2a3142;

  --text-primary: #edeff3;
  --text-muted: #8b93a7;
  --text-faint: #5b6478;
  --text-label: #c7ccd6;

  --accent: #7c5cfc;
  --accent-rgb: 124, 92, 252;
  --accent-contrast: #ffffff;

  --positive: #34d399;
  --positive-bg: rgba(52, 211, 153, .14);
  --negative: #fb7185;
  --negative-bg: rgba(251, 113, 133, .14);
  --negative-border: rgba(251, 113, 133, .4);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, .45);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, .55);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--scrollbar-thumb); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }

/* ==========================================================================
   Base
   ========================================================================== */
body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background-color .15s ease, color .15s ease;
}

h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

a { transition: color .15s ease; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar.bg-dark {
  background: linear-gradient(135deg, #1b2436 0%, #0f1522 100%) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.3rem;
}

.navbar .nav-link {
  font-weight: 500;
  font-size: .93rem;
  border-radius: var(--bs-border-radius-sm);
  padding: .5rem .85rem !important;
  margin: 0 .1rem;
  transition: background-color .15s ease, color .15s ease;
  color: rgba(255, 255, 255, 0.78) !important;
}

.navbar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}

.navbar .nav-link.active {
  background-color: rgba(var(--accent-rgb), 0.22);
  color: #fff !important;
  font-weight: 600;
}

.navbar .nav-link.active:hover {
  background-color: rgba(var(--accent-rgb), 0.3);
}

.navbar .text-light {
  opacity: .85;
  font-size: .9rem;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, background-color .15s ease, border-color .15s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: var(--surface-alt);
  border-bottom: 1px solid var(--border-subtle);
  border-top-left-radius: var(--bs-border-radius-lg) !important;
  border-top-right-radius: var(--bs-border-radius-lg) !important;
  font-weight: 600;
}

.stat-card {
  border-radius: var(--bs-border-radius-lg);
  border-left: 4px solid var(--accent);
  transition: transform .18s ease, box-shadow .18s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card.positive { border-left-color: var(--positive); }
.stat-card.negative { border-left-color: var(--negative); }

.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: .88rem;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.trend-badge.trend-up {
  background-color: var(--positive-bg);
  color: var(--positive);
}

.trend-badge.trend-down {
  background-color: var(--negative-bg);
  color: var(--negative);
}

.tile {
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--bs-border-radius);
  padding: 12px 14px;
}

/* ==========================================================================
   Investments
   ========================================================================== */
.inv-list {
  overflow: hidden;
}

.inv-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.inv-row:last-child {
  border-bottom: none;
}

.inv-row:hover {
  background-color: var(--surface-alt);
}

.inv-row:hover .inv-actions {
  opacity: 1;
}

.inv-avatar {
  width: 38px;
  height: 38px;
  font-size: 1.05rem;
}

.inv-name {
  width: 190px;
  flex-shrink: 0;
}

.inv-qty {
  width: 150px;
  flex-shrink: 0;
}

.inv-prices {
  width: 170px;
  flex-shrink: 0;
}

.inv-value {
  flex-grow: 1;
  text-align: right;
  font-size: .95rem;
}

.inv-gain {
  width: 190px;
  flex-shrink: 0;
  text-align: right;
}

.inv-actions {
  display: flex;
  gap: 6px;
  opacity: .3;
  transition: opacity .15s ease;
  flex-shrink: 0;
  margin-left: 10px;
}

.inv-row-link {
  display: contents;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.inv-tx-list {
  border-top: 1px solid var(--border-subtle);
}

.inv-tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: .85rem;
}

.inv-tx-row:last-child {
  border-bottom: none;
}

.inv-tx-row:hover {
  background-color: var(--surface-alt);
}

.inv-tx-date {
  width: 90px;
  flex-shrink: 0;
}

.inv-tx-name {
  width: 180px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-tx-type {
  width: 80px;
  flex-shrink: 0;
}

.inv-tx-detail {
  flex-grow: 1;
}

.inv-tx-amount {
  width: 100px;
  text-align: right;
  flex-shrink: 0;
}

.inv-tx-actions {
  flex-shrink: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  font-weight: 500;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.4);
}

.btn-transfer {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background-color: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  border: 1.5px solid rgba(var(--accent-rgb), 0.25);
}

.btn-transfer svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-transfer:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.35);
}

.btn-outline-secondary, .btn-outline-primary, .btn-outline-danger {
  border-width: 1.5px;
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
}

.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  background-color: var(--surface-alt);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 700;
  padding-top: .7rem;
  padding-bottom: .7rem;
}

.table tbody td {
  vertical-align: middle;
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.table tbody tr {
  transition: background-color .12s ease;
}

.table tbody tr:hover {
  background-color: var(--surface-alt);
}

.table-responsive {
  border-radius: var(--bs-border-radius-lg);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-control, .form-select {
  border-color: var(--border-subtle);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(var(--accent-rgb), 0.15);
}

.form-label {
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-label);
}

/* ==========================================================================
   Alerts / badges / modals / progress
   ========================================================================== */
.alert {
  border: none;
  box-shadow: var(--shadow-sm);
}

.badge {
  font-weight: 600;
  padding: .4em .7em;
}

.modal-content {
  border: none;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background-color: var(--surface-alt);
  border-top-left-radius: var(--bs-border-radius-lg);
  border-top-right-radius: var(--bs-border-radius-lg);
}

.progress {
  border-radius: 999px;
  background-color: var(--surface-alt);
}

.progress-bar {
  border-radius: 999px;
}

/* ==========================================================================
   Nav tabs (sous-onglets)
   ========================================================================== */
.nav-tabs {
  border-bottom: 1px solid var(--border-subtle);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  border-radius: 0;
  padding: .6rem .2rem;
  margin-right: 1.5rem;
  transition: color .15s ease, border-color .15s ease;
}

.nav-tabs .nav-link:hover {
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.nav-tabs .nav-link.active {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
}

/* ==========================================================================
   Balances & highlights
   ========================================================================== */
.balance-positive { color: var(--positive); }
.balance-negative { color: var(--negative); }
.text-charge { color: var(--accent); }

/* ==========================================================================
   Calendar
   ========================================================================== */
.calendar-table th {
  text-align: center;
  background-color: var(--surface-alt);
  border: none;
}

.calendar-table {
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
}

.calendar-cell {
  vertical-align: top;
  height: 110px;
  width: 14.28%;
  padding: 6px !important;
  transition: background-color .15s ease;
}

.calendar-cell.empty {
  background-color: var(--bg-surface-2);
}

.calendar-cell.today {
  background-color: rgba(var(--accent-rgb), .12);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.day-number {
  font-weight: 700;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.recurring-pill {
  font-size: .7rem;
  line-height: 1.15;
  background-color: var(--warn-bg);
  border-radius: var(--bs-border-radius-sm);
  padding: 3px 6px;
  margin-bottom: 3px;
  box-shadow: var(--shadow-sm);
}

.recurring-pill.paid {
  background-color: var(--positive-bg);
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}

.legend-dot.paid {
  background-color: var(--positive-bg);
  border: 1px solid var(--positive);
}

.legend-dot.upcoming {
  background-color: var(--warn-bg);
  border: 1px solid var(--warn);
}

/* ==========================================================================
   Transactions list
   ========================================================================== */
.tx-list {
  overflow: hidden;
}

.tx-group-header {
  padding: 16px 20px 6px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.tx-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color .12s ease;
}

.tx-list .tx-group-header:first-child {
  padding-top: 18px;
}

.tx-row:hover {
  background-color: var(--surface-alt);
}

.tx-row:hover .tx-actions {
  opacity: 1;
}

.tx-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.tx-main {
  flex-grow: 1;
  min-width: 0;
}

.tx-description {
  font-weight: 600;
  font-size: .91rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-meta {
  font-size: .8rem;
  color: var(--text-faint);
  margin-top: 2px;
}

.tx-meta-dot {
  opacity: .5;
  margin: 0 6px;
}

.tx-amount {
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.tx-actions {
  display: flex;
  gap: 6px;
  opacity: .3;
  transition: opacity .15s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.tx-action-btn {
  width: 30px;
  height: 30px;
  border-radius: .6rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.tx-action-btn:hover {
  background-color: var(--surface-alt);
  color: var(--text-primary);
}

.tx-action-btn.danger:hover {
  background-color: var(--negative-bg);
  color: var(--negative);
  border-color: var(--negative-border);
}

/* ==========================================================================
   Accounts & categories
   ========================================================================== */
.acct-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.acct-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity .15s ease;
}

.acct-card:hover .acct-actions {
  opacity: 1;
}

.acct-action-btn {
  width: 28px;
  height: 28px;
  border-radius: .55rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.acct-action-btn:hover {
  background-color: var(--surface-alt);
  color: var(--text-primary);
}

.acct-action-btn.danger:hover {
  background-color: var(--negative-bg);
  color: var(--negative);
  border-color: var(--negative-border);
}

.acct-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.acct-name {
  font-weight: 700;
  font-size: .95rem;
}

.acct-type {
  font-size: .72rem;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 2px;
}

.acct-balance {
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: auto;
}

.acct-card-add {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 118px;
  border-radius: var(--bs-border-radius-lg);
  border: 1.5px dashed var(--dashed-border);
  color: var(--text-faint);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}

.acct-card-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cat-list {
  overflow: hidden;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cat-row:last-child {
  border-bottom: none;
}

.cat-row:hover {
  background-color: var(--surface-alt);
}

.cat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.cat-name {
  width: 190px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-bar-track {
  flex-grow: 1;
  height: 8px;
  border-radius: 999px;
  background-color: var(--surface-alt);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.cat-percent {
  width: 54px;
  text-align: right;
  font-size: .8rem;
  color: var(--text-faint);
  flex-shrink: 0;
}

.cat-amount {
  width: 110px;
  text-align: right;
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
}

.cat-actions {
  display: flex;
  gap: 6px;
  opacity: .3;
  transition: opacity .15s ease;
  flex-shrink: 0;
}

.cat-row:hover .cat-actions {
  opacity: 1;
}

/* ==========================================================================
   Sidebar layout
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  flex: 0 0 256px;
  width: 256px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  color: #fff;
  background: linear-gradient(180deg, #1b2436 0%, #0f1522 100%);
  z-index: 1030;
}

[data-bs-theme="dark"] .app-sidebar {
  background: #0f131c;
  border-right: 1px solid var(--border-subtle);
}

.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-page {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  box-sizing: border-box;
}

.app-topbar,
.app-scrim {
  display: none;
}

.sb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 10px 24px;
}

.sb-brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.sb-close {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  font-size: 1.1rem;
  border-radius: .75rem;
}

.sb-nav {
  flex: 1;
}

.sb-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
  padding: 0 12px 8px;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: .65rem .75rem;
  border: 0;
  background: none;
  border-radius: .7rem;
  font-size: .93rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.sb-link:hover {
  background-color: rgba(255, 255, 255, .08);
  color: #fff;
}

.sb-link.active {
  background-color: rgba(var(--accent-rgb), .26);
  color: #fff;
  font-weight: 600;
}

.sb-icon {
  width: 24px;
  text-align: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sb-foot {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-top: 12px;
  margin-top: 12px;
}

.sb-foot form {
  margin: 0;
}

.sb-switch {
  margin-left: auto;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  position: relative;
  flex-shrink: 0;
  transition: background-color .15s ease;
}

.sb-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left .15s ease;
}

.sb-switch.on {
  background: var(--accent);
}

.sb-switch.on::after {
  left: 16px;
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 0;
}

.sb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.sb-user-name {
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.2;
}

.sb-logout {
  font-size: .8rem;
  color: rgba(255, 255, 255, .55);
  text-decoration: none;
}

.sb-logout:hover {
  color: #fff;
}

@media (max-width: 991.98px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 296px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 1045;
  }

  .app-sidebar.open {
    transform: none;
    box-shadow: 8px 0 30px rgba(0, 0, 0, .4);
  }

  .app-scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 11, 17, .55);
    z-index: 1040;
  }

  .sb-close {
    display: inline-flex;
  }

  .app-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 1020;
    height: 58px;
    padding: 0 .75rem 0 .5rem;
    color: #fff;
    background: linear-gradient(135deg, #1b2436 0%, #0f1522 100%);
  }

  .app-burger {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    border-radius: .75rem;
  }

  .app-topbar-brand {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-decoration: none;
  }

  .app-page {
    padding: 1.25rem 1rem 2.5rem;
  }
}

/* ==========================================================================
   Login
   ========================================================================== */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 3rem 3.5rem;
  color: #edeff3;
  background:
    radial-gradient(circle at 85% 12%, rgba(var(--accent-rgb), .35), transparent 45%),
    radial-gradient(circle at 10% 95%, rgba(var(--accent-rgb), .18), transparent 40%),
    linear-gradient(145deg, #1b2436 0%, #0b0f17 100%);
}

.auth-hero-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  min-height: calc(100vh - 6rem);
}

.auth-visual {
  flex: 1;
  min-height: 0;
  margin: 0 -1rem 1.75rem;
  background: url("../img/finance-bg.svg") center / contain no-repeat;
}

.auth-brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

.auth-headline {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.auth-lead {
  color: rgba(237, 239, 243, .75);
  font-size: 1.02rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.auth-tip {
  padding: 1.1rem 1.25rem;
  border-radius: var(--bs-border-radius);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(4px);
}

.auth-tip-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(237, 239, 243, .6);
  margin-bottom: .4rem;
}

.auth-tip-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: .25rem;
}

.auth-tip-text {
  margin: 0;
  font-size: .88rem;
  line-height: 1.5;
  color: rgba(237, 239, 243, .75);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background-color: var(--bg-body);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-brand {
  display: none;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.auth-card .form-control {
  background-color: var(--bg-surface);
}

.auth-card .btn-primary {
  font-weight: 600;
  padding-top: .8rem;
  padding-bottom: .8rem;
}

.auth-toggle-pw {
  border-color: var(--border-subtle);
  background-color: var(--bg-surface);
  min-width: 52px;
}

.auth-footnote {
  margin: 1.75rem 0 0;
  font-size: .82rem;
  color: var(--text-faint);
  text-align: center;
}

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-hero {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 3.5rem;
  }

  .auth-card-brand {
    display: block;
  }
}

/* ==========================================================================
   Misc
   ========================================================================== */
.month-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--bs-border-radius);
  text-decoration: none;
  color: inherit;
  transition: background-color .15s ease;
}

.month-row:hover {
  background-color: var(--surface-alt);
}
