:root {
  --bg: #f5efe6;
  --surface: rgba(255, 251, 245, 0.94);
  --surface-strong: #fffaf3;
  --surface-dark: #1d2a24;
  --surface-soft: rgba(255, 248, 238, 0.92);
  --ink: #1d2a24;
  --muted: #5e6a62;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --warning: #b26b00;
  --danger: #b42318;
  --danger-soft: #fdebe8;
  --success: #157347;
  --border: rgba(29, 42, 36, 0.11);
  --shadow: 0 24px 64px rgba(29, 42, 36, 0.12);
  --shadow-soft: 0 24px 64px rgba(6, 10, 22, 0.2);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --accent-rgb: 124, 92, 255;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at right center, rgba(205, 165, 96, 0.18), transparent 25%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
}

.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(340px, calc(100% - 24px));
}

.mobile-menu-toggle,
.mobile-menu-backdrop {
  display: none;
}

.quick-action-fab {
  position: fixed;
  right: 26px;
  bottom: 24px;
  z-index: 9800;
  display: grid;
  justify-items: end;
  gap: 12px;
}

.quick-expense-fab {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #19d3ff);
  box-shadow:
    0 18px 40px rgba(124, 92, 255, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.quick-action-fab.is-open .quick-expense-fab {
  transform: rotate(45deg) scale(1.03);
  box-shadow:
    0 22px 52px rgba(124, 92, 255, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

.quick-action-menu {
  display: grid;
  gap: 8px;
  width: min(260px, calc(100vw - 52px));
  padding: 10px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(12, 17, 31, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
}

.quick-action-fab.is-open .quick-action-menu {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.quick-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.045);
  color: #f7f9ff;
  text-align: left;
  font-weight: 800;
}

.quick-action-item:hover {
  border-color: rgba(124, 92, 255, 0.2);
  background: rgba(255, 255, 255, 0.075);
}

.quick-action-item svg {
  width: 18px;
  height: 18px;
  color: #8feaff;
  flex-shrink: 0;
}

.quick-expense-modal {
  position: fixed;
  inset: 0;
  z-index: 9700;
  display: grid;
  place-items: center;
  padding: 18px;
}

.quick-expense-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.62);
  backdrop-filter: blur(10px);
}

.quick-expense-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(12, 17, 31, 0.96);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  transform: translateY(12px) scale(0.985);
  opacity: 0;
  transition: opacity 180ms ease, transform 220ms ease;
}

.quick-expense-modal.is-open .quick-expense-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pin-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.22), transparent 32%),
    rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(16px);
}

.pin-lock-screen.hidden {
  display: none;
}

.pin-lock-card {
  width: min(100%, 420px);
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(12, 17, 31, 0.96);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
  color: #f7f9ff;
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 220ms ease, opacity 180ms ease;
}

.pin-lock-screen.is-open .pin-lock-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pin-lock-card h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1;
}

.pin-lock-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.pin-form {
  display: grid;
  gap: 12px;
}

.pin-form input {
  text-align: center;
  font-size: 2rem;
  letter-spacing: 0.45em;
  font-weight: 900;
}

.pin-feedback {
  min-height: 20px;
  color: #ffadb9;
  font-weight: 800;
}

.quick-expense-head {
  margin-bottom: 14px;
}

.quick-expense-form {
  grid-template-columns: 1fr;
}

.quick-expense-form button {
  margin-top: 4px;
}

button,
input,
select {
  font: inherit;
}

button,
input,
select,
label,
.panel,
.stat-card,
.hero-copy,
.hero-card,
.login-card,
.budget-item,
.transaction-item,
.goal-card,
.insight-card {
  min-width: 0;
}

.hidden,
.hidden-field {
  display: none !important;
}

.redirect-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-screen,
.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.login-card {
  width: min(100%, 430px);
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.login-card h1,
.hero h1,
.panel h2,
.stat-card strong,
.hero-card strong {
  margin: 0;
  font-family: "Arial Nova", "Aptos Display", "Segoe UI", sans-serif;
}

.login-card h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 12px;
}

.eyebrow,
.section-kicker,
.hero-card-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--muted);
}

.login-text,
.hero-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-form,
.form-grid,
.budget-form,
.goal-form,
.stack-list,
.transaction-list,
.insight-cards,
.report-list,
.month-summary-list,
.annual-summary-grid,
.goals-grid {
  display: grid;
  gap: 14px;
}

.login-form {
  margin-top: 24px;
}

.login-feedback {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 0.95rem;
}

.login-feedback.neutral {
  color: var(--muted);
}

.login-switch {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.text-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: #9ec6ff;
  font-weight: 700;
  cursor: pointer;
}

.text-btn:hover {
  color: #d9e7ff;
}

.register-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.register-panel.is-open {
  opacity: 1;
  transform: translateY(0);
}

.register-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.register-panel-head h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
}

.register-form {
  margin-top: 0;
}

.compact-btn {
  padding: 10px 12px;
}

.app-shell {
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.9fr);
  gap: 20px;
  margin-bottom: 20px;
}

.hero-copy,
.hero-card,
.panel,
.stat-card,
.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-copy,
.hero-card,
.panel,
.stat-card {
  border-radius: var(--radius-lg);
}

.hero-copy {
  padding: 32px;
}

.welcome-user {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-photo {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(15, 118, 110, 0.22);
  box-shadow: 0 10px 24px rgba(29, 42, 36, 0.14);
  flex-shrink: 0;
}

.welcome-copy {
  display: grid;
  gap: 6px;
}

.welcome-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.global-search-shell {
  position: relative;
  z-index: 3;
  margin: 0 0 14px;
}

.global-search-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.global-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 12, 24, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.global-search-box svg {
  width: 18px;
  height: 18px;
  color: #9fb0d6;
  flex-shrink: 0;
}

.global-search-box input {
  border: 0;
  background: transparent;
  padding: 14px 0;
  box-shadow: none;
}

.global-search-box input:focus {
  outline: none;
  transform: none;
  box-shadow: none;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(10, 15, 28, 0.96);
  box-shadow: 0 24px 56px rgba(4, 8, 18, 0.36);
  backdrop-filter: blur(14px);
}

.global-search-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  color: #f6f8ff;
}

.global-search-item strong,
.global-search-item p,
.global-search-type {
  display: block;
}

.global-search-type {
  margin-bottom: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #92e7ff;
}

.global-search-item strong {
  font-size: 0.98rem;
}

.global-search-item p,
.global-search-empty {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.global-search-item mark {
  padding: 0 4px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.24);
  color: #ffffff;
}

.favorite-shortcuts {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.favorite-shortcuts-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.favorite-shortcuts-head h3 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 1rem;
}

.favorite-actions-list,
.favorite-actions-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.favorite-action-chip,
.favorite-option {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f7f9ff;
  text-align: left;
}

.favorite-action-chip strong,
.favorite-action-chip span,
.favorite-option strong,
.favorite-option span {
  display: block;
}

.favorite-action-chip strong,
.favorite-option strong {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.favorite-action-chip span,
.favorite-option span {
  color: var(--muted);
  font-size: 0.8rem;
}

.favorite-actions-picker {
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(9, 14, 28, 0.88);
}

.favorite-option.active {
  border-color: rgba(124, 92, 255, 0.32);
  background: rgba(124, 92, 255, 0.12);
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.12);
}

.dashboard-overview-shell {
  min-height: min(620px, calc(100vh - 210px));
  display: grid;
  place-items: center;
}

.dashboard-command-card {
  width: min(100%, 920px);
  display: grid;
  gap: 28px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(151, 125, 255, 0.22);
  background:
    linear-gradient(155deg, rgba(124, 92, 255, 0.78), rgba(13, 18, 36, 0.96)),
    var(--surface-dark);
  box-shadow: 0 28px 70px rgba(7, 9, 19, 0.38);
  overflow: hidden;
}

.dashboard-command-head,
.dashboard-command-body {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.dashboard-command-head h2 {
  margin: 0;
  max-width: 12ch;
  color: #ffffff;
  font-family: "Arial Nova", "Aptos Display", "Segoe UI", sans-serif;
  font-size: clamp(2.15rem, 4.5vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.dashboard-command-toolbar {
  justify-content: flex-end;
}

.dashboard-command-status {
  display: grid;
  gap: 14px;
  max-width: 54ch;
}

.dashboard-command-status strong {
  color: #ffffff;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.1;
}

.dashboard-command-status p {
  margin: 0;
  color: rgba(231, 237, 255, 0.74);
  font-size: 1rem;
  line-height: 1.6;
}

.dashboard-command-metrics {
  width: min(100%, 360px);
  display: grid;
  gap: 12px;
}

.dashboard-command-metric {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.065);
}

.dashboard-command-metric span {
  color: rgba(231, 237, 255, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-command-metric strong {
  color: #ffffff;
  font-family: "Arial Nova", "Aptos Display", "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.achievements-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.achievement-summary-card,
.achievement-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(20, 24, 42, 0.9) 0%, rgba(12, 15, 28, 0.96) 100%);
  box-shadow: 0 18px 45px rgba(4, 8, 20, 0.34);
}

.achievement-summary-card {
  padding: 22px;
}

.achievement-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.achievement-summary-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.achievement-summary-progress {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.achievement-summary-progress-bar,
.achievement-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.85) 0%, rgba(82, 196, 255, 0.95) 100%);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.34);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.achievement-card {
  padding: 22px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.achievement-card::after,
.achievement-summary-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.18) 0%, rgba(var(--accent-rgb), 0) 72%);
  pointer-events: none;
}

.achievement-card:hover,
.achievement-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.22);
  box-shadow: 0 22px 50px rgba(4, 8, 20, 0.4);
}

.achievement-card-head,
.achievement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.achievement-card-head {
  margin-bottom: 14px;
}

.achievement-card h3 {
  margin: 8px 0 0;
  font-size: 1.05rem;
}

.achievement-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.achievement-badge,
.achievement-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.achievement-badge {
  background: rgba(var(--accent-rgb), 0.14);
  color: rgba(214, 223, 255, 0.9);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

.achievement-status {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.achievement-status.positive {
  color: #92ffd8;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.22);
}

.achievement-progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.achievement-meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.achievement-meta strong {
  color: var(--ink);
}

.achievement-card.is-unlocked {
  border-color: rgba(34, 197, 94, 0.16);
}

.achievement-card.is-unlocked .achievement-progress-fill {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.9) 0%, rgba(110, 231, 183, 0.95) 100%);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.24);
}

.welcome-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  max-width: 11ch;
}

.hero-text {
  margin-top: 16px;
  max-width: 58ch;
}

.hero-card {
  padding: 26px;
  display: grid;
  gap: 18px;
  color: #f8f7f3;
  background: linear-gradient(155deg, rgba(15, 118, 110, 0.96), rgba(29, 42, 36, 0.95));
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.hero-card strong {
  display: block;
  font-size: 1.95rem;
}

.hero-card span {
  color: rgba(248, 247, 243, 0.88);
  line-height: 1.6;
}

.hero-logout {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8f7f3;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard,
.stats-grid,
.double-grid,
.triple-grid,
.module-grid,
.annual-summary-grid {
  display: grid;
  gap: 20px;
}

.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
}

.tab-btn.active {
  background: var(--surface-dark);
  color: #f8f7f3;
}

.tab-panel {
  display: none;
  gap: 20px;
}

.tab-panel.active {
  display: grid;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.double-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.triple-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.annual-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-gap {
  gap: 12px;
}

.stat-card {
  padding: 22px;
  display: grid;
  gap: 10px;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: 1.65rem;
}

.panel {
  padding: 22px;
}

.panel-soft {
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid rgba(29, 42, 36, 0.07);
  padding: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-header-wrap {
  flex-wrap: wrap;
}

.panel h2 {
  font-size: 1.35rem;
}

.form-grid,
.filter-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-grid {
  display: grid;
  gap: 14px;
}

.form-grid button {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

input,
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(29, 42, 36, 0.14);
  background: #fffdf9;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.delete-btn {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.primary-btn {
  background: var(--accent);
  color: #f8f7f3;
}

.secondary-btn {
  background: var(--surface-dark);
  color: #f8f7f3;
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(29, 42, 36, 0.16);
  color: var(--ink);
}

.ghost-btn.active-filter {
  background: var(--surface-dark);
  color: #f8f7f3;
  border-color: var(--surface-dark);
}

.inactive-filter {
  opacity: 0.6;
}

.insight-card,
.budget-item,
.transaction-item,
.goal-card,
.month-summary-card,
.stack-card,
.annual-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 42, 36, 0.08);
  background: var(--surface-strong);
}

.insight-card strong,
.stack-card strong,
.annual-card strong {
  display: block;
  margin-bottom: 8px;
}

.stack-card p,
.annual-card span {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.stack-card.danger {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(253, 235, 232, 0.72);
}

.stack-card.warning {
  border-color: rgba(178, 107, 0, 0.2);
  background: rgba(255, 245, 224, 0.9);
}

.top-decisions-section {
  margin-top: 18px;
}

.top-decisions-list {
  display: grid;
  gap: 12px;
}

.top-decision-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(29, 42, 36, 0.08);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(248, 242, 233, 0.92) 100%);
}

.top-decision-card.warning {
  border-color: rgba(178, 107, 0, 0.2);
  background: linear-gradient(180deg, rgba(255, 245, 224, 0.98) 0%, rgba(255, 240, 204, 0.9) 100%);
}

.top-decision-card.danger {
  border-color: rgba(180, 35, 24, 0.18);
  background: linear-gradient(180deg, rgba(253, 235, 232, 0.98) 0%, rgba(251, 225, 219, 0.92) 100%);
}

.top-decision-card.positive {
  border-color: rgba(21, 115, 71, 0.18);
  background: linear-gradient(180deg, rgba(233, 248, 240, 0.98) 0%, rgba(220, 242, 231, 0.92) 100%);
}

.top-decision-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f8f7f3;
  background: linear-gradient(135deg, var(--accent), #1d2a24);
}

.top-decision-copy strong {
  display: block;
  margin-bottom: 6px;
}

.top-decision-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.toast {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 42, 36, 0.08);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  display: block;
  margin-bottom: 6px;
}

.toast p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.toast.danger {
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(253, 235, 232, 0.96);
}

.toast.warning {
  border-color: rgba(178, 107, 0, 0.22);
  background: rgba(255, 245, 224, 0.96);
}

.toast.neutral {
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(236, 249, 247, 0.96);
}

.budget-item,
.transaction-item,
.month-summary-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.month-summary-card,
.report-row {
  cursor: pointer;
}

.month-summary-card.current {
  border-color: rgba(15, 118, 110, 0.38);
  background: rgba(15, 118, 110, 0.08);
}

.month-summary-card h3,
.month-summary-card p,
.budget-item p,
.transaction-item h3,
.transaction-item p,
.goal-card p {
  margin: 0;
}

.month-summary-card h3 {
  margin-bottom: 6px;
  text-transform: capitalize;
}

.month-summary-meta,
.transaction-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.transaction-main {
  min-width: 0;
}

.transaction-item h3 {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.transaction-meta {
  overflow-wrap: anywhere;
}

.transaction-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  flex-shrink: 0;
}

.delete-btn {
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 14px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filter-label {
  min-width: min(220px, 100%);
}

.goals-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.goal-card {
  display: grid;
  gap: 14px;
}

.goal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.goal-progress,
.report-bar {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #e7ddcf;
  overflow: hidden;
}

.goal-progress span,
.report-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #58c7b9);
}

.report-row {
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid rgba(29, 42, 36, 0.08);
  padding: 16px;
}

.report-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.muted-inline {
  color: var(--muted);
  font-size: 0.92rem;
}

.annual-card {
  display: grid;
  gap: 8px;
}

.missions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mission-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 250, 243, 0.98), rgba(236, 249, 247, 0.72));
  border: 1px solid rgba(29, 42, 36, 0.08);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}

.mission-card.completed {
  border-color: rgba(21, 115, 71, 0.26);
  background: linear-gradient(145deg, rgba(233, 248, 239, 0.95), rgba(255, 250, 243, 0.88));
}

.mission-card.failed {
  border-color: rgba(180, 35, 24, 0.22);
  background: linear-gradient(145deg, rgba(253, 235, 232, 0.95), rgba(255, 250, 243, 0.88));
}

.mission-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mission-head span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
}

.mission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mission-progress {
  height: 12px;
  border-radius: 999px;
  background: #e7ddcf;
  overflow: hidden;
}

.mission-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #58c7b9);
}

.mission-card.failed .mission-progress span {
  background: linear-gradient(90deg, var(--danger), #f97366);
}

.mission-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.mission-footer small {
  color: var(--muted);
}

.routine-days-field {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 42, 36, 0.08);
  background: var(--surface-strong);
}

.routine-days-field legend {
  padding: 0 6px;
  font-weight: 700;
}

.routine-days-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.routine-days-grid label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.12);
}

.agenda-task-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(29, 42, 36, 0.08);
  background: var(--surface-strong);
}

.agenda-task-card.is-completed {
  border-color: rgba(21, 115, 71, 0.22);
  background: linear-gradient(145deg, rgba(233, 248, 239, 0.95), rgba(255, 250, 243, 0.9));
}

.agenda-task-card.is-overdue {
  border-color: rgba(178, 107, 0, 0.2);
  background: linear-gradient(145deg, rgba(255, 245, 224, 0.96), rgba(255, 250, 243, 0.9));
}

.agenda-task-main strong,
.agenda-task-main p {
  display: block;
}

.agenda-task-main p {
  margin: 6px 0 0;
  color: var(--muted);
}

.agenda-task-card.is-completed .agenda-task-main strong {
  text-decoration: line-through;
  opacity: 0.72;
}

.agenda-task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.assistant-panel {
  display: grid;
  gap: 18px;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-question {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(29, 42, 36, 0.12);
  background: var(--surface-strong);
  color: var(--ink);
  font-weight: 700;
}

.chat-messages {
  min-height: 360px;
  max-height: 520px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.1), transparent 35%),
    rgba(255, 250, 243, 0.74);
  border: 1px solid rgba(29, 42, 36, 0.08);
}

.chat-message {
  width: fit-content;
  max-width: min(720px, 88%);
  padding: 13px 15px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.chat-message p {
  margin: 0;
  line-height: 1.55;
}

.chat-message.user {
  justify-self: end;
  background: var(--surface-dark);
  color: #f8f7f3;
  border-bottom-right-radius: 6px;
}

.chat-message.assistant {
  justify-self: start;
  background: var(--surface-strong);
  color: var(--ink);
  border-bottom-left-radius: 6px;
  border: 1px solid rgba(29, 42, 36, 0.08);
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.simulator-result {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.simulator-tab-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.simulator-hero-card,
.simulator-form-card {
  min-height: 100%;
}

.simulator-result {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(29, 42, 36, 0.08);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.96) 0%, rgba(249, 242, 232, 0.92) 100%);
}

.simulator-result.positive {
  border-color: rgba(21, 115, 71, 0.22);
  background: linear-gradient(180deg, rgba(233, 248, 240, 0.98) 0%, rgba(220, 242, 231, 0.92) 100%);
}

.simulator-result.warning {
  border-color: rgba(178, 107, 0, 0.22);
  background: linear-gradient(180deg, rgba(255, 245, 224, 0.98) 0%, rgba(255, 238, 199, 0.92) 100%);
}

.simulator-result.danger {
  border-color: rgba(180, 35, 24, 0.2);
  background: linear-gradient(180deg, rgba(253, 235, 232, 0.98) 0%, rgba(250, 224, 218, 0.92) 100%);
}

.simulator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sim-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid rgba(29, 42, 36, 0.08);
  display: grid;
  gap: 8px;
}

.sim-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.sim-card strong {
  font-size: 1.2rem;
}

.simulator-progress {
  margin-top: -4px;
}

.chart-box {
  display: grid;
  gap: 16px;
}

.chart-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.chart-svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.chart-svg.wide {
  max-width: 100%;
}

.chart-axis {
  stroke: rgba(29, 42, 36, 0.2);
  stroke-width: 1.5;
}

.chart-legend {
  display: grid;
  gap: 10px;
}

.legend-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.92rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.bar-chart {
  min-height: 180px;
  display: flex;
  align-items: end;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.bar-group {
  min-width: 42px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.bar-pair {
  height: 150px;
  display: flex;
  align-items: end;
  gap: 6px;
}

.bar {
  width: 14px;
  border-radius: 999px 999px 0 0;
  display: block;
}

.income-bar {
  background: #0f766e;
}

.expense-bar {
  background: #b42318;
}

.chart-mini-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-footnote {
  color: var(--muted);
  font-size: 0.94rem;
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(29, 42, 36, 0.18);
  border-radius: var(--radius-md);
}

.income {
  color: var(--success);
}

.expense {
  color: var(--danger);
}

.warning-text {
  color: var(--warning);
}

.danger-text {
  color: var(--danger);
}

.success-text {
  color: var(--success);
}

code {
  font-family: Consolas, monospace;
}

/* Fintech premium shell */
:root {
  --bg: #070a13;
  --surface: rgba(16, 22, 39, 0.78);
  --surface-strong: rgba(21, 29, 52, 0.92);
  --surface-dark: #6d5dfc;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --ink: #f7f8ff;
  --muted: #a9b2c7;
  --accent: #7c5cff;
  --accent-2: #19d3ff;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --warning: #f7b955;
  --danger: #ff5c7c;
  --danger-soft: rgba(255, 92, 124, 0.12);
  --success: #4de3a5;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.24);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 4%, rgba(124, 92, 255, 0.32), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(25, 211, 255, 0.22), transparent 26%),
    radial-gradient(circle at 55% 96%, rgba(77, 227, 165, 0.12), transparent 34%),
    linear-gradient(135deg, #060914 0%, #0b1020 46%, #11172a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 82%);
}

.app-shell {
  width: min(1680px, calc(100% - 32px));
  padding: 22px 0 42px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 360px;
  grid-template-areas:
    "nav hero rail"
    "nav main rail";
  align-items: start;
  gap: 20px;
}

.hero {
  grid-area: hero;
  margin-bottom: 0;
  align-items: stretch;
  gap: 12px;
}

.dashboard {
  grid-area: main;
  gap: 14px;
}

.dashboard-focus-grid,
.compact-chart-grid,
.planning-highlight-grid,
.agenda-grid,
.today-grid,
.today-lower-grid {
  display: grid;
  gap: 16px;
}

.dashboard-focus-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
}

.compact-chart-grid,
.agenda-grid,
.planning-highlight-grid,
.today-lower-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.today-grid {
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.82fr));
}

.today-status-card {
  min-height: 100%;
}

.today-mini-card {
  min-height: 220px;
}

.today-command-panel {
  display: grid;
  gap: 22px;
  padding: clamp(22px, 4vw, 38px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(151, 125, 255, 0.22);
  background:
    linear-gradient(155deg, rgba(124, 92, 255, 0.74), rgba(13, 18, 36, 0.96)),
    var(--surface-dark);
  box-shadow: 0 28px 70px rgba(7, 9, 19, 0.38);
}

.today-command-head,
.today-status-strip {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.today-command-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.today-command-head p,
.today-signal-card p,
.today-status-strip span {
  color: rgba(231, 237, 255, 0.74);
}

.today-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.today-command-grid,
.today-action-grid,
.today-task-columns {
  display: grid;
  gap: 16px;
}

.today-command-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.today-action-grid {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
}

.today-task-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.today-signal-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.065);
}

.today-signal-card span:first-child {
  color: rgba(231, 237, 255, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}

.today-signal-card strong,
.today-status-strip strong {
  color: #ffffff;
  font-family: "Arial Nova", "Aptos Display", "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.today-priority-card .premium-badge {
  width: fit-content;
}

.today-status-strip {
  align-items: center;
  padding-top: 4px;
  flex-wrap: wrap;
}

.today-task-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.today-routines-panel .form-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
  align-items: end;
  margin-bottom: 18px;
}

.chart-panel-large .chart-box {
  min-height: 280px;
}

.premium-inline-block {
  min-height: 100%;
  box-shadow: none;
}

.right-rail {
  grid-area: rail;
  display: grid;
  gap: 18px;
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding-right: 2px;
}

.right-rail::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.bar-chart::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.right-rail::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.bar-chart::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 255, 0.38);
  border-radius: 999px;
}

.tabs-nav {
  grid-area: nav;
  position: sticky;
  top: 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
  gap: 18px;
  min-height: calc(100vh - 44px);
  margin-bottom: 0;
  padding: 20px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(18, 25, 46, 0.96), rgba(7, 11, 24, 0.92));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.sidebar-top {
  display: grid;
  gap: 6px;
  padding: 4px 6px 0;
}

.sidebar-label {
  display: block;
  color: #f4f7ff;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.sidebar-menu {
  display: grid;
  gap: 14px;
  align-content: start;
}

.sidebar-menu-group {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-menu-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.sidebar-menu-group-primary {
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(124, 92, 255, 0.2);
  background:
    linear-gradient(145deg, rgba(124, 92, 255, 0.12), rgba(25, 211, 255, 0.045)),
    rgba(255, 255, 255, 0.035);
}

.sidebar-group-label {
  display: block;
  padding: 0 4px;
  color: #8feaff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tab-btn {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  text-align: left;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 16px;
  color: #dce3f7;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  box-shadow: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(124, 92, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.06);
}

.tab-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #dfe7ff;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.tab-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.tab-btn.active {
  color: #ffffff;
  border-color: rgba(124, 92, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.62), rgba(25, 211, 255, 0.2)),
    rgba(124, 92, 255, 0.09);
  box-shadow: 0 10px 22px rgba(124, 92, 255, 0.14);
}

.tab-btn.active .tab-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 22px rgba(8, 12, 26, 0.18);
}

.sidebar-user-card {
  display: grid;
  gap: 14px;
  padding: 12px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sidebar-user-photo {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.sidebar-user-head strong,
.sidebar-settings-btn span {
  color: #f7f9ff;
}

.sidebar-user-head strong {
  display: block;
  font-size: 0.95rem;
}

.sidebar-user-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-settings-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dfe7ff;
  font-weight: 700;
}

.sidebar-settings-btn svg {
  width: 16px;
  height: 16px;
}

.install-app-btn {
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(25, 211, 255, 0.12)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(var(--accent-rgb), 0.22);
}

.notification-btn {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.26), rgba(25, 211, 255, 0.12)),
    rgba(255, 255, 255, 0.04);
  border-color: rgba(25, 211, 255, 0.18);
}

.sidebar-settings-btn.active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(25, 211, 255, 0.14));
  border-color: rgba(var(--accent-rgb), 0.36);
  box-shadow:
    0 14px 28px rgba(var(--accent-rgb), 0.18),
    0 0 0 1px rgba(var(--accent-rgb), 0.12),
    0 0 24px rgba(25, 211, 255, 0.12);
}

.hero-copy,
.hero-card,
.panel,
.stat-card,
.login-card {
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-copy,
.hero-card,
.panel,
.stat-card {
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-copy,
.hero-card,
.panel,
.stat-card {
  border-radius: 28px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25, 211, 255, 0.2), transparent 68%);
}

.hero h1 {
  color: #ffffff;
  letter-spacing: -0.055em;
  font-size: clamp(1.8rem, 2.8vw, 2.55rem);
  line-height: 0.94;
  max-width: 9.2ch;
}

.hero-text,
.login-text,
.welcome-copy p,
.stack-card p,
.annual-card span,
.mission-card p,
.toast p,
.month-summary-meta,
.transaction-meta,
.muted-inline,
.chart-mini-legend,
.chart-footnote,
.sim-card span,
label {
  color: var(--muted);
}

.eyebrow,
.section-kicker,
.hero-card-label {
  color: #8feaff;
  font-weight: 800;
}

.welcome-label,
.panel h2,
.stat-card strong,
.stack-card strong,
.annual-card strong,
.sim-card strong {
  color: #ffffff;
}

.profile-photo {
  border-color: rgba(25, 211, 255, 0.5);
  box-shadow: 0 0 0 7px rgba(124, 92, 255, 0.12), 0 18px 42px rgba(0, 0, 0, 0.36);
  width: 64px;
  height: 64px;
}

.hero-card {
  padding: 18px;
  gap: 12px;
  align-content: start;
  border-color: rgba(151, 125, 255, 0.22);
  box-shadow: 0 22px 52px rgba(7, 9, 19, 0.36);
  background:
    radial-gradient(circle at top right, rgba(25, 211, 255, 0.24), transparent 42%),
    linear-gradient(155deg, rgba(124, 92, 255, 0.86), rgba(13, 18, 36, 0.94));
}

.welcome-user {
  margin-bottom: 10px;
}

.hero-text {
  margin-top: 8px;
  max-width: 44ch;
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-health-copy {
  display: grid;
  gap: 8px;
}

.health-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.health-badge {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #d9e2ff;
}

.health-badge.success {
  color: #9ff5cc;
  background: rgba(77, 227, 165, 0.12);
  border-color: rgba(77, 227, 165, 0.22);
}

.health-badge.warning {
  color: #ffd39b;
  background: rgba(247, 185, 85, 0.12);
  border-color: rgba(247, 185, 85, 0.24);
}

.health-badge.danger {
  color: #ffadb9;
  background: rgba(255, 92, 124, 0.12);
  border-color: rgba(255, 92, 124, 0.22);
}

.health-badge.neutral {
  color: #a8f1ff;
  background: rgba(25, 211, 255, 0.1);
  border-color: rgba(25, 211, 255, 0.22);
}

.health-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.health-mini-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 6px;
  min-height: 78px;
}

.health-mini-card small {
  color: rgba(231, 237, 255, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 800;
}

.health-mini-card strong {
  font-size: 1.08rem;
  color: #ffffff;
  line-height: 1;
}

.stats-grid {
  gap: 12px;
  margin-top: 2px;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.14), transparent 48%);
  pointer-events: none;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.stat-card {
  min-height: 164px;
  padding: 20px;
  align-content: space-between;
  gap: 10px;
  isolation: isolate;
}

.stat-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -64px;
  bottom: -78px;
  z-index: -1;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.5;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.34), transparent 68%);
}

.stat-income::after {
  background: radial-gradient(circle, rgba(77, 227, 165, 0.3), transparent 68%);
}

.stat-expense::after {
  background: radial-gradient(circle, rgba(255, 92, 124, 0.28), transparent 68%);
}

.stat-balance::after {
  background: radial-gradient(circle, rgba(25, 211, 255, 0.32), transparent 68%);
}

.stat-savings::after {
  background: radial-gradient(circle, rgba(124, 92, 255, 0.36), transparent 68%);
}

.stat-income strong {
  color: #66f0b2;
  filter: drop-shadow(0 8px 18px rgba(77, 227, 165, 0.18));
}

.stat-expense strong {
  color: #ff7f9a;
  filter: drop-shadow(0 8px 18px rgba(255, 92, 124, 0.16));
}

.stat-balance strong {
  color: #f7fbff;
}

.stat-savings strong {
  color: #9ec6ff;
}

.stat-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(25, 211, 255, 0.72));
  box-shadow: 0 14px 34px rgba(124, 92, 255, 0.22);
}

.stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-card strong {
  position: relative;
  z-index: 1;
  font-size: clamp(2.08rem, 3.2vw, 3.25rem);
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.stat-subtitle {
  position: relative;
  z-index: 1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.stat-trend {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
}

.stat-trend.positive {
  color: #9ff5cc;
  border-color: rgba(77, 227, 165, 0.28);
  background: rgba(77, 227, 165, 0.11);
}

.stat-trend.negative {
  color: #ffa7b8;
  border-color: rgba(255, 92, 124, 0.3);
  background: rgba(255, 92, 124, 0.11);
}

.stat-trend.neutral {
  color: #c7d0e6;
  border-color: rgba(25, 211, 255, 0.18);
  background: rgba(25, 211, 255, 0.08);
}

.premium-lower-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.premium-block {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  min-height: 220px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    rgba(12, 17, 31, 0.82);
  box-shadow: var(--shadow-soft);
}

.premium-block::after {
  content: "";
  position: absolute;
  inset: auto -30px -60px auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.26), transparent 68%);
  pointer-events: none;
}

.premium-block-wide {
  grid-column: span 2;
}

.premium-block-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.premium-badge {
  padding: 8px 12px;
  border-radius: 999px;
  color: #cdd8ff;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.premium-badge.completed {
  color: #9ff5cc;
  border-color: rgba(77, 227, 165, 0.28);
  background: rgba(77, 227, 165, 0.1);
}

.premium-badge.failed {
  color: #ffa7b8;
  border-color: rgba(255, 92, 124, 0.3);
  background: rgba(255, 92, 124, 0.1);
}

.premium-badge.in-progress {
  color: #95e9ff;
  border-color: rgba(25, 211, 255, 0.26);
  background: rgba(25, 211, 255, 0.08);
}

.premium-block h2 {
  margin: 2px 0 0;
}

.premium-big-number {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: #ffffff;
}

.premium-block-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.weekly-summary-card {
  min-height: auto;
}

.invisible-spending-card {
  margin-top: 18px;
  min-height: auto;
}

.invisible-spending-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invisible-spending-card .premium-big-number {
  color: #ffd8a8;
}

.weekly-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.weekly-summary-grid > div {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.weekly-summary-grid strong {
  line-height: 1.15;
}

.premium-progress {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.premium-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(25, 211, 255, 0.24);
}

.premium-action-card {
  background:
    radial-gradient(circle at top right, rgba(25, 211, 255, 0.18), transparent 38%),
    linear-gradient(160deg, rgba(124, 92, 255, 0.22), rgba(255, 255, 255, 0.03)),
    rgba(12, 17, 31, 0.86);
}

.premium-action-card .primary-btn {
  align-self: end;
  width: fit-content;
}

.premium-score-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.score-ring {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(8, 12, 24, 0.98) 54%, transparent 56%),
    conic-gradient(from 180deg, var(--accent-2), var(--accent), #8e7dff, var(--accent-2));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.score-ring span {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
}

.panel-soft,
.insight-card,
.budget-item,
.transaction-item,
.goal-card,
.month-summary-card,
.stack-card,
.annual-card,
.report-row,
.sim-card,
.mission-card {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.stack-card.warning {
  border-color: rgba(247, 185, 85, 0.34);
  background: rgba(247, 185, 85, 0.1);
}

.stack-card.danger {
  border-color: rgba(255, 92, 124, 0.34);
  background: rgba(255, 92, 124, 0.11);
}

.month-summary-card.current {
  border-color: rgba(25, 211, 255, 0.42);
  background: rgba(25, 211, 255, 0.1);
}

input,
select {
  color: #ffffff;
  background: rgba(6, 10, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

input::placeholder {
  color: rgba(220, 227, 247, 0.42);
}

input:focus,
select:focus {
  outline: 3px solid rgba(124, 92, 255, 0.18);
  border-color: rgba(25, 211, 255, 0.72);
}

.primary-btn,
.secondary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(124, 92, 255, 0.22);
}

.ghost-btn {
  color: #dce3f7;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.discreet-action {
  padding: 10px 12px;
  font-size: 0.82rem;
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.discreet-action:hover {
  opacity: 1;
}

.ghost-btn.active-filter {
  color: #ffffff;
  background: rgba(124, 92, 255, 0.24);
  border-color: rgba(124, 92, 255, 0.56);
}

.delete-btn {
  background: rgba(255, 92, 124, 0.12);
  color: #ff8fa5;
}

.goal-progress,
.report-bar,
.mission-progress {
  background: rgba(255, 255, 255, 0.09);
}

.goal-progress span,
.report-bar span,
.mission-progress span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 20px rgba(25, 211, 255, 0.28);
}

.pill,
.mission-head span {
  color: #cdd8ff;
  background: rgba(124, 92, 255, 0.16);
}

.chart-axis {
  stroke: rgba(255, 255, 255, 0.18);
}

.income-bar {
  background: linear-gradient(180deg, #4de3a5, #19d3ff);
}

.expense-bar {
  background: linear-gradient(180deg, #ff5c7c, #ff9d66);
}

.empty-state {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
}

.income {
  color: var(--success);
}

.expense {
  color: var(--danger);
}

.rail-panel {
  padding: 20px;
}

.right-rail .panel-header {
  margin-bottom: 14px;
}

.assistant-tab-shell {
  min-height: calc(100vh - 180px);
  display: grid;
  gap: 18px;
  align-content: start;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-card {
  min-height: 100%;
}

.settings-card.settings-about-card,
.settings-card:last-child {
  grid-column: span 2;
}

.settings-profile-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.settings-avatar {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  box-shadow:
    0 0 0 8px rgba(var(--accent-rgb), 0.08),
    0 20px 40px rgba(0, 0, 0, 0.24);
}

.settings-profile-fields,
.settings-stack {
  display: grid;
  gap: 14px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form-grid > .settings-toggle:last-child,
.settings-actions,
.settings-about {
  grid-column: 1 / -1;
}

.settings-preview-card,
.settings-card-visibility {
  grid-column: 1 / -1;
}

.settings-preview-card {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(25, 211, 255, 0.08)),
    rgba(255, 255, 255, 0.045);
}

.settings-preview-card span {
  color: #8feaff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-preview-card strong {
  color: #ffffff;
  font-size: 1.08rem;
}

.settings-preview-card p {
  margin: 0;
  color: var(--muted);
}

.settings-card-visibility {
  margin-top: 16px;
}

.settings-visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f5f7ff;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pin-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pin-settings-actions button {
  flex: 1 1 160px;
}

.pin-settings-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.settings-actions button {
  flex: 1 1 180px;
}

.settings-about {
  display: grid;
  gap: 8px;
}

.settings-about strong {
  font-size: 1.15rem;
  color: #ffffff;
}

.privacy-value {
  filter: blur(7px);
  user-select: none;
}

.compact-mode .hero-copy,
.compact-mode .hero-card,
.compact-mode .panel,
.compact-mode .stat-card {
  padding: 16px;
}

.compact-mode .dashboard,
.compact-mode .tab-panel.active,
.compact-mode .settings-grid,
.compact-mode .stats-grid,
.compact-mode .dashboard-focus-grid,
.compact-mode .compact-chart-grid,
.compact-mode .planning-highlight-grid,
.compact-mode .agenda-grid,
.compact-mode .today-grid,
.compact-mode .today-lower-grid {
  gap: 12px;
}

body.hide-card-dashboard #tab-dashboard .dashboard-overview-shell,
body.hide-card-today #tab-today .today-command-panel,
body.hide-card-todayAlerts #tab-today .today-alerts-panel,
body.hide-card-rightRail .right-rail {
  display: none !important;
}

.theme-light {
  --bg: #eef3fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.92);
  --surface-dark: #dfe8f6;
  --ink: #122034;
  --muted: #5e6b81;
  --border: rgba(18, 32, 52, 0.1);
  --shadow-soft: 0 22px 46px rgba(43, 64, 99, 0.12);
}

body.theme-light {
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.14), transparent 28%),
    radial-gradient(circle at right center, rgba(25, 211, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #edf3fb 100%);
}

body.theme-light .hero h1,
body.theme-light .welcome-label,
body.theme-light .panel h2,
body.theme-light .stat-card strong,
body.theme-light .stack-card strong,
body.theme-light .annual-card strong,
body.theme-light .sim-card strong,
body.theme-light .settings-about strong,
body.theme-light .sidebar-user-head strong {
  color: #122034;
}

body.theme-light .hero-copy,
body.theme-light .hero-card,
body.theme-light .panel,
body.theme-light .stat-card,
body.theme-light .login-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    var(--surface);
  border-color: rgba(18, 32, 52, 0.08);
}

body.theme-light .global-search-box {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(18, 32, 52, 0.08);
}

body.theme-light .global-search-results {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.9)),
    #ffffff;
  border-color: rgba(18, 32, 52, 0.08);
  box-shadow: 0 24px 56px rgba(43, 64, 99, 0.16);
}

body.theme-light .global-search-item {
  background: rgba(18, 32, 52, 0.03);
  border-color: rgba(18, 32, 52, 0.06);
  color: #122034;
}

body.theme-light .global-search-item p,
body.theme-light .global-search-empty,
body.theme-light .global-search-label {
  color: #5e6b81;
}

body.theme-light .favorite-shortcuts-head h3,
body.theme-light .favorite-action-chip,
body.theme-light .favorite-option {
  color: #122034;
}

body.theme-light .favorite-action-chip span,
body.theme-light .favorite-option span {
  color: #5e6b81;
}

body.theme-light .achievement-summary-card,
body.theme-light .achievement-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94)),
    #ffffff;
  border-color: rgba(18, 32, 52, 0.08);
  box-shadow: 0 18px 36px rgba(56, 79, 122, 0.12);
}

body.theme-light .achievement-card h3,
body.theme-light .achievement-meta strong {
  color: #122034;
}

body.theme-light .achievement-summary-label,
body.theme-light .achievement-summary-card p,
body.theme-light .achievement-card p,
body.theme-light .achievement-meta,
body.theme-light .achievement-status {
  color: #5e6b81;
}

body.theme-light .favorite-actions-picker {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.9)),
    #ffffff;
  border-color: rgba(18, 32, 52, 0.08);
}

body.theme-light .favorite-action-chip,
body.theme-light .favorite-option {
  background: rgba(18, 32, 52, 0.03);
  border-color: rgba(18, 32, 52, 0.06);
}

body.theme-light .weekly-summary-grid > div {
  background: rgba(18, 32, 52, 0.03);
  border-color: rgba(18, 32, 52, 0.06);
}

body.theme-light .global-search-type {
  color: #3556b8;
}

body.theme-light .hero-card {
  color: #f7fbff;
  background:
    radial-gradient(circle at top right, rgba(25, 211, 255, 0.24), transparent 42%),
    linear-gradient(155deg, rgba(var(--accent-rgb), 0.88), rgba(41, 68, 116, 0.94));
}

body.theme-light .tabs-nav {
  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 28%),
    linear-gradient(180deg, rgba(246, 249, 255, 0.98), rgba(231, 238, 250, 0.95));
  border-color: rgba(18, 32, 52, 0.08);
  box-shadow: 0 22px 48px rgba(56, 79, 122, 0.12);
}

body.theme-light .mobile-menu-toggle {
  color: #122034;
  border-color: rgba(18, 32, 52, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(241, 246, 255, 0.78)),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px rgba(56, 79, 122, 0.16);
}

body.theme-light .sidebar-label,
body.theme-light .sidebar-group-label,
body.theme-light .tab-btn,
body.theme-light .sidebar-settings-btn,
body.theme-light .sidebar-settings-btn span {
  color: #122034;
}

body.theme-light .sidebar-menu-group {
  border-top-color: rgba(18, 32, 52, 0.08);
}

body.theme-light .sidebar-menu-group-primary {
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.1), rgba(25, 211, 255, 0.04)),
    rgba(255, 255, 255, 0.72);
}

body.theme-light .install-app-btn {
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), rgba(25, 211, 255, 0.08)),
    rgba(255, 255, 255, 0.85);
}

body.theme-light .sidebar-caption,
body.theme-light .sidebar-user-head span,
body.theme-light .hero-text,
body.theme-light .welcome-copy p,
body.theme-light label,
body.theme-light .stat-subtitle,
body.theme-light .transaction-meta,
body.theme-light .month-summary-meta,
body.theme-light .chart-footnote,
body.theme-light .chart-mini-legend,
body.theme-light .stack-card p,
body.theme-light .settings-about p {
  color: #5e6b81;
}

body.theme-light .tab-btn.active,
body.theme-light .sidebar-settings-btn.active {
  color: #ffffff;
}

body.theme-light .settings-toggle {
  background: rgba(18, 32, 52, 0.03);
  border-color: rgba(18, 32, 52, 0.08);
  color: #122034;
}

body.theme-light .settings-preview-card strong {
  color: #122034;
}

.assistant-tab-header {
  margin-bottom: 0;
}

.assistant-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-chat-large {
  min-height: 460px;
  max-height: min(62vh, 720px);
}

.assistant-form-wide {
  grid-template-columns: 1fr auto;
}

.right-rail .quick-questions {
  display: grid;
}

.quick-question {
  color: #dce3f7;
  text-align: left;
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
}

.chat-messages {
  min-height: 260px;
  max-height: 360px;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.14), transparent 38%),
    rgba(5, 9, 20, 0.64);
  border-color: rgba(255, 255, 255, 0.1);
}

.chat-message.user {
  background: linear-gradient(135deg, var(--accent), #445cff);
}

.chat-message.assistant {
  color: #eaf0ff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.assistant-form {
  grid-template-columns: 1fr;
}

.toast {
  color: var(--ink);
  background: rgba(18, 25, 45, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
}

.toast.danger {
  background: rgba(64, 18, 33, 0.96);
}

.toast.warning {
  background: rgba(67, 43, 15, 0.96);
}

.toast.neutral {
  background: rgba(18, 38, 52, 0.96);
}

.toast.success {
  background: rgba(17, 49, 38, 0.96);
  border-color: rgba(77, 227, 165, 0.2);
}

.tab-panel {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.tab-panel.active {
  opacity: 1;
  transform: translateY(0);
}

.tab-panel.panel-enter > * {
  animation: panelFadeSlide 360ms cubic-bezier(.2,.8,.2,1) both;
}

.tab-panel.panel-enter > *:nth-child(2) {
  animation-delay: 36ms;
}

.tab-panel.panel-enter > *:nth-child(3) {
  animation-delay: 72ms;
}

.tab-panel.panel-enter > *:nth-child(4) {
  animation-delay: 108ms;
}

.app-shell.is-loaded .hero > *,
.app-shell.is-loaded .stats-grid > *,
.app-shell.is-loaded .dashboard-focus-grid > *,
.app-shell.is-loaded .compact-chart-grid > *,
.app-shell.is-loaded .planning-highlight-grid > *,
.app-shell.is-loaded .agenda-grid > *,
.app-shell.is-loaded .right-rail > * {
  animation: premiumRise 460ms cubic-bezier(.2,.8,.2,1) both;
}

.app-shell.is-loaded .stats-grid > *:nth-child(2),
.app-shell.is-loaded .compact-chart-grid > *:nth-child(2),
.app-shell.is-loaded .planning-highlight-grid > *:nth-child(2),
.app-shell.is-loaded .right-rail > *:nth-child(2) {
  animation-delay: 60ms;
}

.app-shell.is-loaded .stats-grid > *:nth-child(3),
.app-shell.is-loaded .planning-highlight-grid > *:nth-child(3) {
  animation-delay: 110ms;
}

.panel,
.stat-card,
.premium-block,
.health-mini-card,
.report-row,
.month-summary-card,
.stack-card,
.quick-question,
.sidebar-user-card,
.sidebar-settings-btn,
.tab-btn,
.chart-box,
.chat-message,
.toast,
.quick-expense-fab,
.quick-expense-dialog,
input,
select {
  transition:
    transform 180ms ease,
    box-shadow 220ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.panel:hover,
.stat-card:hover,
.premium-block:hover,
.sidebar-user-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(6, 10, 22, 0.22);
}

.health-mini-card:hover,
.report-row:hover,
.month-summary-card:hover,
.stack-card:hover,
.quick-question:hover,
.sidebar-settings-btn:hover {
  transform: translateY(-1px);
}

.quick-expense-fab:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 22px 48px rgba(124, 92, 255, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.quick-action-fab.is-open .quick-expense-fab:hover {
  transform: rotate(45deg) scale(1.03);
}

.global-search-item:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 92, 255, 0.22);
  background: rgba(124, 92, 255, 0.08);
}

.favorite-action-chip:hover,
.favorite-option:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 92, 255, 0.22);
  background: rgba(124, 92, 255, 0.08);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.quick-action-item:hover,
.tab-btn:hover {
  transition-timing-function: cubic-bezier(.2,.8,.2,1);
}

.primary-btn:hover,
.secondary-btn:hover {
  box-shadow: 0 18px 38px rgba(124, 92, 255, 0.26);
}

.ghost-btn:hover {
  box-shadow: inset 0 0 0 1px rgba(124, 92, 255, 0.1), 0 12px 26px rgba(6, 10, 22, 0.12);
}

.tab-btn:active,
.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.delete-btn:active,
.quick-question:active,
.sidebar-settings-btn:active {
  transform: scale(0.985);
}

.tab-btn.active {
  box-shadow:
    0 14px 28px rgba(124, 92, 255, 0.18),
    0 0 0 1px rgba(124, 92, 255, 0.12),
    0 0 24px rgba(25, 211, 255, 0.12);
}

.tab-btn.is-pressed {
  animation: tapPulse 220ms ease;
}

.panel.feedback-pulse,
.stat-card.feedback-pulse,
.premium-block.feedback-pulse {
  animation: feedbackPulse 700ms ease;
}

.panel.feedback-error,
.app-shell.feedback-error {
  animation: errorPulse 760ms ease;
}

.item-added {
  animation: itemAddedGlow 900ms ease;
}

.task-completed-pop {
  position: relative;
  animation: taskCompletePop 760ms ease;
}

.task-completed-pop::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #071318;
  font-weight: 900;
  background: linear-gradient(135deg, #9ff5cc, #19d3ff);
  box-shadow: 0 12px 28px rgba(77, 227, 165, 0.26);
  animation: checkPop 720ms ease both;
}

.delete-btn.feedback-danger {
  animation: shakeMini 240ms ease;
}

[data-touch-item] {
  touch-action: pan-y;
  will-change: transform;
}

[data-touch-item].touch-active {
  box-shadow: 0 18px 38px rgba(6, 10, 22, 0.18);
}

[data-touch-item].touch-swiping {
  position: relative;
  transition: transform 80ms linear, box-shadow 160ms ease, background 160ms ease;
}

[data-touch-item].touch-swiping::after {
  content: "Excluir";
  position: absolute;
  inset: 0 0 0 auto;
  width: 96px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(255, 92, 124, 0.9), rgba(180, 35, 24, 0.95));
  border-radius: inherit;
  transform: translateX(104px);
  pointer-events: none;
}

[data-touch-item].touch-delete-ready {
  border-color: rgba(255, 92, 124, 0.36);
  box-shadow: 0 18px 44px rgba(255, 92, 124, 0.18);
}

[data-touch-item].touch-editing {
  animation: feedbackPulse 620ms ease;
}

[data-touch-item].touch-details {
  animation: tapPulse 220ms ease;
}

input:hover,
select:hover {
  border-color: rgba(124, 92, 255, 0.26);
  background: rgba(9, 14, 28, 0.82);
}

input:focus,
select:focus {
  transform: translateY(-1px);
  box-shadow: 0 0 0 6px rgba(124, 92, 255, 0.08);
}

.toolbar .ghost-btn,
.filter-grid input,
.filter-grid select {
  animation: none;
}

.app-shell.is-busy .panel,
.app-shell.is-busy .stat-card {
  position: relative;
}

.app-shell.is-busy .panel::before,
.app-shell.is-busy .stat-card::before {
  animation: shimmer 1.1s linear infinite;
}

.skeleton-cover {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  gap: 16px;
  padding: inherit;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(12, 17, 31, 0.96);
  backdrop-filter: blur(10px);
}

.app-shell.is-busy .skeleton-cover {
  display: grid;
}

.dashboard-command-card,
.today-command-panel,
.hero-card {
  position: relative;
}

.skeleton-grid {
  display: grid;
  gap: 12px;
}

.skeleton-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skeleton-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skeleton-block,
.skeleton-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.skeleton-card {
  min-height: 116px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
}

.skeleton-line {
  display: block;
  height: 14px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.075));
  background-size: 220px 100%;
  animation: skeletonShimmer 1.12s linear infinite;
}

.skeleton-hero-block .skeleton-line:nth-child(2) {
  height: 42px;
  border-radius: 16px;
}

.transaction-list .skeleton-card,
.stack-list .skeleton-card {
  min-height: 92px;
}

@keyframes skeletonShimmer {
  0% { background-position: -220px 0; }
  100% { background-position: calc(220px + 100%) 0; }
}

@keyframes premiumRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelFadeSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tapPulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.975); }
  100% { transform: scale(1); }
}

@keyframes feedbackPulse {
  0% { box-shadow: 0 0 0 rgba(25, 211, 255, 0); }
  35% { box-shadow: 0 0 0 6px rgba(25, 211, 255, 0.08), 0 18px 36px rgba(6, 10, 22, 0.18); }
  100% { box-shadow: 0 0 0 rgba(25, 211, 255, 0); }
}

@keyframes errorPulse {
  0% { box-shadow: 0 0 0 rgba(255, 92, 124, 0); }
  36% { box-shadow: 0 0 0 7px rgba(255, 92, 124, 0.13), 0 18px 36px rgba(64, 18, 33, 0.2); }
  100% { box-shadow: 0 0 0 rgba(255, 92, 124, 0); }
}

@keyframes itemAddedGlow {
  0% { transform: translateY(8px) scale(0.985); box-shadow: 0 0 0 rgba(25, 211, 255, 0); }
  42% { transform: translateY(0) scale(1.01); box-shadow: 0 0 0 7px rgba(25, 211, 255, 0.1), 0 22px 42px rgba(6, 10, 22, 0.22); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 0 0 rgba(25, 211, 255, 0); }
}

@keyframes taskCompletePop {
  0% { transform: scale(0.985); }
  38% { transform: scale(1.018); border-color: rgba(77, 227, 165, 0.4); }
  100% { transform: scale(1); }
}

@keyframes checkPop {
  0% { opacity: 0; transform: scale(0.4) rotate(-18deg); }
  38% { opacity: 1; transform: scale(1.12) rotate(0deg); }
  100% { opacity: 0; transform: scale(0.86) rotate(0deg); }
}

@keyframes shakeMini {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1100px) {
  .triple-grid,
  .annual-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .hero,
  .stats-grid,
  .double-grid,
  .module-grid,
  .goals-grid,
  .missions-grid,
  .achievements-summary-grid,
  .achievements-grid,
  .annual-summary-grid,
  .triple-grid,
  .simulator-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .login-screen,
  .app-shell {
    width: min(100% - 18px, 100%);
  }

  .login-card,
  .hero-copy,
  .hero-card,
  .panel,
  .stat-card {
    padding: 18px;
  }

  .hero-topbar,
  .toolbar,
  .budget-item,
  .transaction-item,
  .agenda-task-card,
  .goal-head,
  .month-summary-card,
  .report-row-head {
    flex-direction: column;
    align-items: stretch;
  }

  .welcome-user {
    align-items: flex-start;
  }

  .form-grid,
  .filter-grid,
  .assistant-form {
    grid-template-columns: 1fr;
  }

  .transaction-side {
    justify-items: start;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 1380px) {
  .premium-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .premium-block-wide {
    grid-column: span 2;
  }

  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-areas:
      "nav hero"
      "nav main"
      "nav rail";
  }

  .right-rail {
    position: static;
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assistant-form {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 980px) {
  .dashboard-command-head,
  .dashboard-command-body {
    flex-direction: column;
  }

  .dashboard-focus-grid,
  .compact-chart-grid,
  .today-command-grid,
  .today-action-grid,
  .today-task-columns,
  .today-routines-panel .form-grid,
  .planning-highlight-grid,
  .simulator-tab-grid,
  .agenda-grid,
  .today-grid,
  .today-lower-grid {
    grid-template-columns: 1fr;
  }

  .health-metrics {
    grid-template-columns: 1fr;
  }

  .premium-lower-grid,
  .premium-block-wide {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .weekly-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-card.settings-about-card,
  .settings-card:last-child {
    grid-column: auto;
  }

  .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .settings-visibility-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100% - 18px, 100%);
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "main"
      "rail";
    gap: 14px;
    padding-top: 74px;
  }

  .mobile-menu-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9900;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
      rgba(12, 17, 31, 0.9);
    box-shadow: 0 18px 44px rgba(6, 10, 22, 0.28);
    backdrop-filter: blur(14px);
  }

  .mobile-menu-toggle svg {
    width: 22px;
    height: 22px;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9840;
    display: block;
    background: rgba(4, 8, 18, 0.58);
    backdrop-filter: blur(8px);
    opacity: 1;
    transition: opacity 180ms ease;
  }

  .mobile-menu-backdrop.hidden {
    display: none;
  }

  .tabs-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 9850;
    width: min(84vw, 340px);
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 20px 16px 16px;
    border-radius: 0 28px 28px 0;
    transform: translateX(calc(-100% - 18px));
    opacity: 0.98;
    transition: transform 240ms ease;
  }

  .app-shell.mobile-menu-open .tabs-nav {
    transform: translateX(0);
  }

  .sidebar-top,
  .sidebar-menu,
  .sidebar-user-card {
    grid-column: 1 / -1;
  }

  .sidebar-label {
    margin: 0;
  }

  .tab-btn {
    text-align: left;
    justify-content: flex-start;
    padding: 10px 11px;
  }

  .sidebar-menu {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sidebar-menu-group {
    padding: 10px;
    border-top: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
  }

  .sidebar-menu-group-primary {
    border: 1px solid rgba(124, 92, 255, 0.2);
  }

  .sidebar-group-label {
    text-align: center;
  }

  .sidebar-caption,
  .sidebar-user-head span {
    display: block;
  }

  .sidebar-settings-btn span {
    display: inline;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .health-status-row {
    align-items: flex-start;
  }

  .assistant-chat-large {
    min-height: 360px;
    max-height: none;
  }

  .premium-score-card {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 14px;
  }

  .tabs-nav {
    grid-template-columns: 1fr;
  }

  .sidebar-menu {
    grid-template-columns: 1fr;
  }

  .sidebar-menu-group {
    grid-template-columns: 1fr;
  }

  .right-rail,
  .dashboard,
  .tab-panel.active {
    gap: 14px;
  }

  .assistant-form {
    grid-template-columns: 1fr;
  }

  .assistant-form-wide {
    grid-template-columns: 1fr;
  }

  .global-search-results {
    position: static;
    margin-top: 10px;
  }

  .favorite-shortcuts-head,
  .favorite-actions-list,
  .favorite-actions-options {
    align-items: stretch;
  }

  .favorite-action-chip,
  .favorite-option {
    width: 100%;
  }

  .today-command-head,
  .today-status-strip,
  .today-command-actions,
  .today-task-form {
    flex-direction: column;
    align-items: stretch;
  }

  .today-task-form {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-shell {
    min-height: auto;
  }

  .dashboard-command-card {
    gap: 22px;
    border-radius: 24px;
  }

  .dashboard-command-head h2 {
    max-width: none;
  }

  .dashboard-command-toolbar,
  .dashboard-command-metrics {
    width: 100%;
  }

  .weekly-summary-grid {
    grid-template-columns: 1fr;
  }

  .settings-profile-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .settings-actions button {
    flex-basis: 100%;
  }

  .quick-action-fab {
    right: 18px;
    bottom: 18px;
  }

  .quick-expense-fab {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 26%),
      linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  }

  .app-shell {
    width: min(100% - 16px, 100%);
    gap: 12px;
    padding-top: 70px;
    padding-bottom: 34px;
  }

  .hero,
  .dashboard,
  .right-rail,
  .tab-panel.active {
    gap: 12px;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .stat-card,
  .premium-block,
  .today-command-panel,
  .dashboard-command-card {
    padding: 16px;
    border-radius: 20px;
  }

  .hero h1,
  .dashboard-command-head h2,
  .today-command-head h2 {
    max-width: none;
    font-size: clamp(1.75rem, 9vw, 2.55rem);
    line-height: 1;
    letter-spacing: -0.035em;
  }

  .panel h2,
  .premium-block-head h2 {
    font-size: 1.2rem;
    line-height: 1.15;
  }

  .hero-text,
  .premium-block-text,
  .today-command-head p,
  .today-signal-card p,
  .stat-subtitle,
  .stack-card p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .panel-header,
  .panel-header-wrap,
  .premium-block-head,
  .hero-topbar,
  .toolbar,
  .today-command-head,
  .dashboard-command-head,
  .dashboard-command-body,
  .today-status-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .toolbar,
  .today-command-actions,
  .settings-actions,
  .form-actions {
    width: 100%;
  }

  .toolbar > *,
  .toolbar button,
  .toolbar label,
  .today-command-actions button,
  .settings-actions button,
  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    max-width: 100%;
  }

  .dashboard-command-metrics,
  .today-command-grid,
  .today-action-grid,
  .today-task-columns,
  .weekly-summary-grid,
  .health-metrics,
  .premium-lower-grid,
  .invisible-spending-grid,
  .habit-cost-grid,
  .filter-grid,
  .settings-grid,
  .module-grid,
  .double-grid,
  .triple-grid,
  .goals-grid,
  .missions-grid,
  .achievements-grid,
  .achievements-summary-grid,
  .annual-summary-grid,
  .planning-highlight-grid,
  .simulator-tab-grid,
  .agenda-grid,
  .compact-chart-grid,
  .dashboard-focus-grid {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .today-mini-card,
  .today-signal-card {
    min-height: auto;
    gap: 10px;
  }

  .stat-card strong,
  .premium-big-number,
  .today-signal-card strong,
  .today-status-strip strong,
  .dashboard-command-metric strong {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
    line-height: 1;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .chart-box {
    min-height: 220px;
    overflow-x: auto;
  }

  .bar-chart {
    min-width: 520px;
  }

  .quick-action-menu {
    width: min(240px, calc(100vw - 36px));
  }

  .skeleton-grid-two,
  .skeleton-grid-three {
    grid-template-columns: 1fr;
  }

  .skeleton-card {
    min-height: 84px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    width: min(100% - 12px, 100%);
    padding-top: 66px;
  }

  .mobile-menu-toggle {
    top: 12px;
    left: 12px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .hero-copy,
  .hero-card,
  .panel,
  .stat-card,
  .premium-block,
  .today-command-panel,
  .dashboard-command-card {
    padding: 14px;
    border-radius: 18px;
  }

  .profile-photo {
    width: 54px;
    height: 54px;
  }

  .welcome-user,
  .sidebar-user-head,
  .agenda-task-card,
  .transaction-item,
  .budget-item,
  .goal-head {
    gap: 10px;
  }

  .hero h1,
  .dashboard-command-head h2,
  .today-command-head h2 {
    font-size: clamp(1.55rem, 10vw, 2.25rem);
  }

  .section-kicker,
  .hero-card-label,
  .stat-label,
  .sidebar-group-label {
    letter-spacing: 0.08em;
    font-size: 0.66rem;
  }

  input,
  select,
  button {
    min-height: 44px;
  }

  .quick-action-fab {
    right: 14px;
    bottom: 14px;
  }

  .quick-expense-fab {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 760px) {
  #tab-today.tab-panel.active {
    gap: 10px;
  }

  #tab-today .today-command-panel {
    gap: 12px;
    padding: 14px;
  }

  #tab-today .today-command-head,
  #tab-today .today-status-strip,
  #tab-today .today-priority-card,
  #tab-today .today-routines-panel {
    display: none;
  }

  #tab-today .today-command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #tab-today .today-signal-card {
    min-height: 116px;
    padding: 14px;
    border-radius: 16px;
  }

  #tab-today .today-signal-card strong {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
  }

  #tab-today .today-signal-card p {
    display: none;
  }

  #tab-today .today-action-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #tab-today .today-alerts-panel,
  #tab-today .today-tasks-panel {
    padding: 14px;
  }

  #tab-today .today-alerts-panel .panel-header,
  #tab-today .today-tasks-panel .panel-header {
    margin-bottom: 10px;
  }

  #tab-today .today-alerts-panel .panel-header h2,
  #tab-today .today-tasks-panel .panel-header h2 {
    font-size: 1.05rem;
  }

  #tab-today .today-alerts-panel .stack-list {
    gap: 0;
  }

  #tab-today .today-alerts-panel .stack-list > *:not(:first-child) {
    display: none;
  }

  #tab-today .today-task-form {
    margin-bottom: 12px;
  }

  #tab-today .today-task-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #tab-today .today-task-columns .stack-list {
    max-height: 210px;
    overflow: auto;
    padding-right: 2px;
  }

  #tab-today .agenda-task-card,
  #tab-today .stack-card {
    padding: 12px;
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  #tab-today .today-command-grid {
    grid-template-columns: 1fr;
  }

  #tab-today .today-signal-card {
    min-height: auto;
  }
}
