:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --panel: #ffffff;
  --panel-strong: #f0f5ef;
  --text: #16211d;
  --muted: #68766e;
  --line: #dce6db;
  --primary: #24584b;
  --primary-strong: #24584b;
  --accent: #d99047;
  --danger: #c75b55;
  --income: #2f7d52;
  --expense: #c75b55;
  --neutral: #3f6470;
  --ivory: #faf8f1;
  --shadow: 0 20px 60px rgba(28, 44, 37, 0.08);
  --shadow-soft: 0 12px 30px rgba(28, 44, 37, 0.06);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101613;
  --panel: #18211d;
  --panel-strong: #202d28;
  --text: #f4f2ea;
  --muted: #a7b4ad;
  --line: #314139;
  --primary: #9ac9b9;
  --primary-strong: #b5ddcf;
  --accent: #e0a65c;
  --danger: #e07a73;
  --income: #81cba1;
  --expense: #e07a73;
  --neutral: #8fc6d4;
  --ivory: #151d19;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 34vw),
    linear-gradient(180deg, color-mix(in srgb, var(--ivory) 78%, var(--bg)), var(--bg) 420px);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(480px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.auth-panel-wide {
  width: min(680px, 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand img,
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.auth-brand span,
.auth-brand strong {
  display: block;
}

.auth-brand span {
  color: var(--muted);
  font-size: 13px;
}

.auth-panel h1,
.view-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.auth-panel p,
.view-title p {
  color: var(--muted);
  margin: 10px 0 0;
}

.auth-options {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.auth-card h2 {
  font-size: 18px;
  margin: 0;
}

.auth-card label {
  display: grid;
  gap: 6px;
}

.auth-card label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .auth-options {
    grid-template-columns: 1fr;
  }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.content {
  padding: 32px clamp(20px, 2vw, 40px);
  min-width: 0;
  width: 100%;
  max-width: none;
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 90%, var(--bg));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 0;
}

.brand-button {
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  justify-content: flex-start;
  padding: 4px;
  text-align: left;
  width: 100%;
}

.brand-button:hover {
  background: var(--panel-strong);
}

.brand strong {
  display: block;
}

.brand > div,
.profile-chip > div {
  min-width: 0;
}

.brand span,
.user-line {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.profile-chip {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  display: flex;
  align-items: center;
  gap: 10px;
}

.household-switch {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.profile-chip strong,
.profile-chip > div span {
  display: block;
}

.profile-chip > div span {
  color: var(--muted);
  font-size: 13px;
}

.brand strong,
.brand span,
.profile-chip strong,
.profile-chip > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--avatar, var(--primary));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-align: center;
}

.nav-links {
  display: grid;
  gap: 14px;
}

.nav-section {
  display: grid;
  gap: 6px;
}

.nav-button,
.icon-button,
.primary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, border 120ms ease;
}

.nav-button {
  width: 100%;
  justify-content: flex-start;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
}

.nav-button.sub {
  min-height: 36px;
  padding-left: 20px;
  font-size: 13px;
}

.nav-button:hover,
.nav-button.active {
  background: var(--panel-strong);
  color: var(--text);
}

.nav-button.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0 10px 2px;
  text-transform: uppercase;
}

.nav-spacer {
  flex: 1;
}

.nav-actions {
  display: grid;
  gap: 10px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.toolbar-title-group {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  min-width: 0;
}

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

.home-hero {
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--panel)), var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 22px;
}

.home-hero h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.home-hero p {
  color: var(--muted);
  margin-top: 8px;
  max-width: 680px;
}

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

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.notification-wrap {
  position: relative;
}

.notification-button {
  position: relative;
}

.notification-button.has-alerts {
  background: color-mix(in srgb, var(--accent) 18%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.notification-button em {
  align-items: center;
  background: var(--danger);
  border: 2px solid var(--panel);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  line-height: 1;
  min-width: 20px;
  padding: 0 5px;
  position: absolute;
  right: -6px;
  top: -6px;
}

.notification-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-width: 340px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(380px, calc(100vw - 32px));
  z-index: 20;
}

.notification-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 6px 6px 8px;
}

.notification-head strong {
  font-size: 15px;
}

.notification-head span,
.notification-item small,
.notification-empty {
  color: var(--muted);
  font-size: 12px;
}

.notification-section {
  display: grid;
  gap: 8px;
}

.notification-section + .notification-section {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 10px;
}

.notification-section-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0 6px;
  text-transform: uppercase;
}

.notification-item {
  align-items: flex-start;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.notification-item:hover {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
}

.notification-item.past {
  opacity: 0.74;
}

.notification-item.past:hover {
  opacity: 1;
}

.notification-item > span {
  align-items: center;
  background: var(--panel);
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.notification-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-item strong,
.notification-item small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-item em {
  color: var(--primary);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  margin-top: 2px;
}

.notification-item.warning > span {
  color: var(--accent);
}

.notification-item.danger > span {
  color: var(--danger);
}

.notification-empty {
  padding: 12px 8px 14px;
}

.landing-user-chip {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 5px 14px 5px 6px;
  text-decoration: none;
}

.landing-user-chip span {
  align-items: center;
  background: var(--primary);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.landing-user-chip strong {
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cards {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

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

.landing-page {
  min-height: 100vh;
}

.landing-nav {
  align-items: center;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  padding: 14px clamp(18px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.landing-brand,
.landing-links,
.landing-actions,
.landing-hero-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.landing-brand {
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.landing-brand img {
  border-radius: 10px;
  height: 38px;
  width: 38px;
}

.landing-links {
  flex: 1;
  justify-content: center;
}

.landing-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.landing-links a:hover {
  color: var(--text);
}

.landing-hero,
.landing-section {
  margin: 0 auto;
  width: min(1120px, calc(100% - 36px));
}

.landing-hero {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  min-height: calc(100vh - 68px);
  padding: 56px 0 42px;
}

.landing-hero.photo-hero {
  border-radius: 0;
  display: grid;
  margin: 0;
  min-height: calc(100vh - 68px);
  overflow: hidden;
  padding: 0 clamp(18px, 6vw, 86px);
  position: relative;
  width: 100%;
}

.landing-hero.photo-hero::after {
  background:
    linear-gradient(90deg, rgba(15, 26, 22, 0.78), rgba(15, 26, 22, 0.45) 46%, rgba(15, 26, 22, 0.08)),
    linear-gradient(180deg, transparent 72%, var(--bg));
  content: "";
  inset: 0;
  position: absolute;
}

.landing-hero.photo-hero > img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.landing-hero.photo-hero .landing-hero-copy {
  color: #fff;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.landing-hero.photo-hero .landing-hero-copy p,
.landing-hero.photo-hero .section-label {
  color: rgba(255, 255, 255, 0.82);
}

.landing-hero.photo-hero .ghost-button {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.landing-hero-copy h1 {
  font-size: clamp(44px, 7vw, 78px);
  line-height: 0.98;
  margin: 10px 0 0;
}

.landing-hero-copy p,
.landing-text,
.landing-section p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.landing-hero-actions {
  margin-top: 28px;
}

.landing-preview {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.preview-bar {
  display: flex;
  gap: 8px;
  padding-bottom: 18px;
}

.preview-bar span {
  background: var(--line);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

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

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

.preview-grid article,
.landing-card,
.module-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.feature-card {
  overflow: hidden;
  padding: 0;
}

.feature-card img {
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  width: 100%;
}

.feature-card strong,
.feature-card p {
  padding-left: 18px;
  padding-right: 18px;
}

.feature-card strong {
  padding-top: 18px;
}

.feature-card p {
  padding-bottom: 20px;
}

.preview-grid strong,
.preview-grid span,
.landing-card strong,
.landing-card p {
  display: block;
}

.preview-grid span {
  color: var(--muted);
  margin-top: 8px;
}

.landing-section {
  padding: 72px 0;
  scroll-margin-top: 86px;
}

.landing-section.split {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.landing-section h2 {
  font-size: clamp(30px, 4vw, 48px);
  margin: 0;
}

.landing-checklist,
.module-roadmap,
.module-list {
  display: grid;
  gap: 10px;
}

.landing-checklist span,
.module-roadmap span,
.module-list span {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.landing-section.cta {
  padding-bottom: 96px;
  text-align: center;
}

.module-hero {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  padding: 24px;
}

.module-hero h2 {
  font-size: clamp(28px, 4vw, 46px);
  margin: 4px 0 0;
}

.module-hero p,
.muted-copy {
  color: var(--muted);
  margin: 8px 0 0;
}

.module-card {
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 10px;
  min-height: 190px;
  text-align: left;
}

.module-card:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  transform: translateY(-1px);
}

.module-icon {
  align-items: center;
  background: var(--primary);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 24px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.module-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-card strong,
.module-card small,
.module-list strong,
.module-list small {
  display: block;
}

.module-card small,
.module-list small {
  color: var(--muted);
  line-height: 1.45;
}

.module-card em {
  color: var(--primary);
  font-style: normal;
  font-weight: 900;
}

.module-table {
  display: grid;
  gap: 10px;
}

.module-row {
  align-items: center;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 150px 150px 42px;
  padding: 12px;
}

.module-row.done {
  opacity: 0.72;
}

.module-row.done strong {
  text-decoration: line-through;
}

.module-row strong,
.module-row small {
  display: block;
}

.module-row small {
  color: var(--muted);
  margin-top: 4px;
}

.module-row label {
  display: grid;
  gap: 4px;
}

.module-row label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-check {
  align-items: center;
  display: inline-flex !important;
  justify-content: center;
}

.module-check input {
  width: 20px;
  height: 20px;
}

.module-row:has(.module-check) {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

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

.checkbox-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px;
}

.checkbox-group legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
}

.checkbox-group label {
  align-items: center;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
}

.checkbox-group input {
  min-height: auto;
  width: auto;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.settings-full {
  grid-column: 1 / -1;
}

.settings-tabs {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px;
}

.settings-tabs button {
  background: transparent;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  min-height: 40px;
  padding: 0 12px;
}

.settings-tabs button.active,
.settings-tabs button:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.panel,
.metric,
.month-card,
.hero-strip,
.month-focus,
.empty-state,
.settings-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.metric {
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.metric span,
.section-label,
label span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
}

.metric.income strong,
.amount.income {
  color: var(--income);
}

.metric.expense strong,
.amount.expense {
  color: var(--expense);
}

.metric.savings strong {
  color: var(--accent);
}

.metric.neutral strong {
  color: var(--neutral);
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
}

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

.section-head h2 {
  margin: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.hero-strip {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 13%, var(--panel)), color-mix(in srgb, var(--accent) 8%, var(--panel)));
}

.settings-hero {
  min-height: 156px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, var(--panel)), color-mix(in srgb, var(--accent) 10%, var(--panel)));
}

.settings-hero h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.settings-hero p {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
}

.settings-hero img {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.profile-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.household-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.profile-card {
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
  display: grid;
  justify-items: start;
  align-content: space-between;
  text-align: left;
}

.profile-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
  background: color-mix(in srgb, var(--primary) 10%, var(--panel));
}

.profile-card strong,
.profile-card em {
  display: block;
}

.profile-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.profile-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 16px;
}

.profile-list,
.profile-create {
  display: grid;
  gap: 12px;
}

.profile-admin-card {
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.profile-admin-card strong,
.profile-admin-card > div span {
  display: block;
}

.profile-admin-card > div span {
  color: var(--muted);
  font-size: 13px;
}

input[type="color"] {
  height: 42px;
  padding: 5px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.profile-create {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
}

.profile-create h3 {
  margin: 0;
}

.category-token-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-token {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-strong);
  color: var(--text);
}

.category-token i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.category-editor,
.category-add-form {
  display: grid;
  gap: 14px;
}

.category-add-form {
  grid-template-columns: minmax(0, 1fr) 120px 150px auto;
  margin-top: 16px;
  align-items: end;
}

.category-edit-list {
  display: grid;
  gap: 12px;
}

.category-edit-card {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--category) 18%, transparent), transparent 64%),
    var(--panel-strong);
  border: 1px solid color-mix(in srgb, var(--category) 32%, var(--line));
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.category-edit-card.dragging {
  opacity: 0.55;
}

.category-edit-card.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.category-edit-card.muted {
  opacity: 0.68;
}

.category-edit-preview {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.category-drag-handle {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: grab;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  line-height: 1;
  width: 30px;
}

.category-drag-handle:active {
  cursor: grabbing;
}

.category-edit-preview span {
  background: var(--category);
  border: 3px solid color-mix(in srgb, #ffffff 70%, var(--category));
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  flex: 0 0 auto;
  height: 30px;
  width: 30px;
}

.category-edit-preview strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-edit-preview em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.category-edit-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 150px 42px;
  gap: 10px;
  align-items: end;
}

.category-edit-fields label,
.category-add-form label {
  min-width: 0;
}

.category-edit-fields .danger-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hero-strip h2,
.empty-state h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.hero-strip p,
.empty-state p,
.month-focus p {
  margin: 8px 0 0;
  color: var(--muted);
}

.month-focus {
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 18px;
  align-items: center;
}

.dashboard-grid {
  align-items: stretch;
}

.chart-card {
  min-height: 330px;
}

.line-chart {
  display: grid;
  gap: 12px;
}

.line-chart svg {
  width: 100%;
  min-height: 220px;
  overflow: visible;
}

.line-chart text {
  fill: var(--muted);
  font-size: 12px;
}

.chart-grid {
  stroke: color-mix(in srgb, var(--line) 70%, transparent);
  stroke-width: 1;
}

.chart-axis {
  stroke: color-mix(in srgb, var(--muted) 34%, transparent);
  stroke-width: 1.5;
}

.chart-point {
  cursor: help;
  outline: none;
  stroke: var(--panel);
  stroke-width: 2;
  transition: r 0.15s ease, stroke-width 0.15s ease;
}

.chart-point:hover,
.chart-point:focus {
  r: 8;
  stroke-width: 3;
}

.chart-legend,
.donut-legend {
  display: grid;
  gap: 8px;
}

.chart-legend {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.chart-legend span,
.donut-legend span {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
}

.chart-legend i,
.donut-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.donut-panel {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 180px minmax(0, 1fr);
}

.donut-chart {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  justify-items: center;
  position: relative;
}

.donut-chart svg {
  height: 100%;
  position: absolute;
  width: 100%;
}

.donut-segment {
  cursor: help;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}

.donut-segment:hover,
.donut-segment:focus {
  opacity: 0.82;
  stroke-width: 46;
}

.donut-chart::after {
  background: var(--panel);
  border-radius: 50%;
  content: "";
  height: 58%;
  position: absolute;
  width: 58%;
}

.donut-chart span {
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  position: relative;
  z-index: 1;
}

.donut-legend div {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.month-focus strong {
  display: block;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.month-focus.positive strong {
  color: var(--income);
}

.month-focus.negative strong {
  color: var(--expense);
}

.focus-split {
  display: grid;
  gap: 10px;
}

.focus-split span {
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  background: var(--panel-strong);
}

.focus-split strong {
  font-size: 18px;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.month-create-form {
  grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 0.8fr) auto;
}

.month-picker-field select {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

.month-suggestion {
  align-self: end;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 42px;
  padding: 8px 12px;
}

.month-suggestion span {
  color: var(--muted);
  font-size: 12px;
}

.month-suggestion strong {
  color: var(--text);
  font-size: 15px;
}

.form-actions,
.item-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.form-actions {
  align-self: end;
}

.row-actions {
  justify-content: flex-end;
}

.item-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 132px;
}

.edit-button {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
  font-size: 16px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text);
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel);
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

select:hover,
input:hover {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

.primary-button {
  padding: 0 16px;
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-strong);
}

.ghost-button,
.icon-button {
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.ghost-button {
  padding: 0 14px;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.danger-button {
  min-width: 42px;
  padding: 0 12px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--line));
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: var(--panel-strong);
}

tr:last-child td {
  border-bottom: 0;
}

.amount {
  font-weight: 800;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 13px;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.month-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.month-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.month-card h3 {
  margin: 0;
}

.month-card header span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.progress-line,
.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-strong);
}

.progress-line span,
.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.progress-line span {
  background: var(--expense);
}

.budget-bar {
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 65%, transparent);
}

.budget-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.budget-bar.over {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
}

.insight-list,
.upcoming-list,
.action-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.compact-list div {
  align-items: center;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
}

.compact-list span {
  color: var(--muted);
  min-width: 0;
}

.compact-list strong {
  white-space: nowrap;
}

.compact-list strong.income {
  color: var(--income);
}

.compact-list strong.expense {
  color: var(--expense);
}

.csv-import-box {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
}

.import-help {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 12px;
  padding: 12px;
}

.notice.danger {
  color: var(--expense);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--danger) 28%, var(--line));
}

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

.budget-alerts,
.budget-editor-list {
  display: grid;
  gap: 10px;
}

.budget-alert,
.budget-editor-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.budget-alert {
  align-items: center;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
}

.budget-alert.warning {
  border-color: color-mix(in srgb, #d4a72c 60%, var(--line));
}

.budget-alert.over,
.budget-editor-row.over {
  border-color: color-mix(in srgb, var(--danger) 62%, var(--line));
  background: color-mix(in srgb, var(--danger) 8%, var(--panel));
}

.budget-editor-row.warning {
  border-color: color-mix(in srgb, #d4a72c 58%, var(--line));
}

.budget-editor-row {
  align-items: center;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 180px);
}

.budget-editor-row > div:first-child span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 4px;
}

.budget-progress {
  background: var(--panel-strong);
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
}

.budget-progress span {
  border-radius: inherit;
  display: block;
  height: 100%;
}

.search-field {
  max-width: 680px;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.integration-page {
  margin: 0 auto;
  max-width: 1480px;
}

.integration-grid {
  align-items: stretch;
}

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

.integration-card p {
  color: var(--muted);
}

.command-snippet {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  margin: 0;
  overflow-x: auto;
  padding: 12px;
}

.command-snippet code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.insight,
.upcoming-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--panel-strong);
}

.insight span,
.upcoming-item span {
  color: var(--muted);
  font-size: 13px;
}

.insight.success {
  border-color: color-mix(in srgb, var(--income) 34%, var(--line));
  background: color-mix(in srgb, var(--income) 10%, var(--panel));
}

.insight.warning {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}

.insight.danger {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--line));
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
}

.upcoming-item {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.upcoming-item b {
  white-space: nowrap;
}

.upcoming-item.income b {
  color: var(--income);
}

.upcoming-item.expense b {
  color: var(--expense);
}

.details-panel {
  padding: 0;
  overflow: hidden;
}

.details-panel summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  min-height: 64px;
  padding: 0 20px;
}

.details-panel summary::-webkit-details-marker {
  display: none;
}

.details-panel summary span {
  font-size: 18px;
  font-weight: 900;
}

.details-panel summary strong {
  color: var(--muted);
  font-size: 13px;
}

.details-panel[open] {
  padding-bottom: 18px;
}

.details-panel[open] .table-wrap,
.details-panel[open] .empty {
  margin: 0 18px;
}

.month-stats {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.month-stats div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.balance-positive {
  color: var(--income);
}

.balance-negative {
  color: var(--expense);
}

.empty {
  color: var(--muted);
  padding: 22px;
  text-align: center;
  background: var(--panel-strong);
  border-radius: 8px;
}

.empty-state {
  padding: 34px;
  display: grid;
  gap: 16px;
  justify-items: start;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-list,
.timeline {
  display: grid;
  gap: 14px;
}

.category-row {
  display: grid;
  gap: 8px;
}

.category-top,
.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.category-top span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.category-top i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.timeline-item {
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 110px minmax(220px, 1fr) minmax(170px, auto);
  align-items: center;
  gap: 14px;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-date {
  color: var(--muted);
  font-size: 13px;
}

.timeline-body {
  min-width: 0;
}

.timeline-edit {
  background: var(--panel-strong);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  grid-template-columns: minmax(150px, 190px) minmax(260px, 1fr) minmax(292px, auto);
  padding: 10px 12px;
}

.timeline-edit-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 190px) minmax(130px, 190px);
  gap: 10px;
}

.timeline-edit-actions {
  display: grid;
  grid-template-columns: minmax(118px, 146px) 42px 42px 42px;
  gap: 8px;
  justify-content: end;
  align-items: center;
}

.timeline-date-input,
.timeline-amount-input {
  min-width: 0;
}

.timeline-date-input {
  font-variant-numeric: tabular-nums;
}

.timeline-edit.income .timeline-edit-fields {
  grid-template-columns: minmax(150px, 1fr);
}

.signed-amount-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: var(--text);
  margin: 0;
}

.signed-amount-field span {
  display: inline-grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
}

.signed-amount-field.expense span {
  color: var(--expense);
}

.signed-amount-field.income span {
  color: var(--income);
}

.icon-submit-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.timeline-body strong,
.timeline-body span {
  display: block;
}

.timeline-body span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.calendar {
  display: grid;
  gap: 10px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}

.calendar-weekdays span {
  min-height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-day {
  min-height: 138px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
}

.calendar-day.muted {
  background: var(--panel-strong);
  opacity: 0.55;
}

.calendar-day.today {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.calendar-day header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.calendar-day header strong {
  font-size: 16px;
}

.calendar-day header span {
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.calendar-events {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.calendar-event {
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.calendar-event > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.calendar-event.income {
  background: color-mix(in srgb, var(--income) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--income) 25%, var(--line));
}

.calendar-event.expense {
  background: color-mix(in srgb, var(--expense) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--expense) 24%, var(--line));
}

.calendar-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.calendar-event strong {
  font-size: 12px;
  white-space: nowrap;
}

.calendar-event.income strong {
  color: var(--income);
}

.calendar-event.expense strong {
  color: var(--expense);
}

.mini-edit-button {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1;
}

.calendar-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}

.notice {
  padding: 12px 14px;
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
  border-radius: 8px;
}

.app-tooltip {
  background: var(--text);
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  color: var(--panel);
  font-size: 13px;
  font-weight: 800;
  left: 0;
  line-height: 1.2;
  max-width: min(260px, calc(100vw - 24px));
  opacity: 0;
  padding: 8px 10px;
  pointer-events: none;
  position: fixed;
  top: 0;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 1000;
}

.app-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.34);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 900;
}

.edit-modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 20px;
  width: min(100%, 520px);
}

.edit-modal .section-head {
  margin-bottom: 2px;
}

.edit-modal .section-head h2 {
  font-size: 22px;
}

.signed-amount-input {
  align-items: center;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
}

.signed-amount-input i {
  color: var(--muted);
  font-size: 20px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.edit-modal.expense .signed-amount-input i {
  color: var(--expense);
}

.edit-modal.income .signed-amount-input i {
  color: var(--income);
}

.edit-modal .signed-amount-field {
  display: grid;
  gap: 6px;
}

.edit-modal .signed-amount-field > span {
  color: var(--text);
  display: block;
  font-size: 13px;
  font-weight: 400;
  place-items: initial;
}

.modal-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  justify-content: end;
  margin-top: 4px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    display: block;
  }

  .content {
    padding: 24px clamp(16px, 3vw, 28px);
  }

  .mobile-menu-button {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .side-nav {
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    height: 100vh;
    max-width: min(360px, calc(100vw - 36px));
    overflow-y: auto;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(110%);
    transition: transform 180ms ease;
    width: min(360px, calc(100vw - 36px));
    z-index: 30;
  }

  .side-nav.open {
    transform: translateX(0);
  }

  .mobile-menu-backdrop {
    background: rgba(12, 20, 17, 0.38);
    border: 0;
    bottom: 0;
    display: block;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 180ms ease;
    z-index: 25;
  }

  .mobile-menu-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

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

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

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

  .month-focus {
    grid-template-columns: 1fr;
  }

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

  .profile-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .content {
    padding: 18px 14px 28px;
  }

  .nav-button {
    min-height: 42px;
  }

  .nav-button.active {
    box-shadow: inset 3px 0 0 var(--primary);
  }

  .toolbar {
    align-items: flex-start;
    gap: 14px;
  }

  .controls {
    width: 100%;
  }

  .toolbar-title-group {
    width: 100%;
  }

  .view-title {
    min-width: 0;
  }

  .view-title h1 {
    font-size: 30px;
  }

  .notification-wrap {
    margin-left: auto;
  }

  .notification-panel {
    right: 0;
    width: calc(100vw - 32px);
  }

  .grid.cards,
  .grid.two,
  .module-grid,
  .module-row,
  .module-row:has(.module-check),
  .preview-grid,
  .landing-card-grid,
  .landing-section.split,
  .month-grid,
  .form-grid,
  .form-grid.compact,
  .csv-import-box,
  .budget-editor-row,
  .budget-alert,
  .category-add-form,
  .settings-tabs {
    grid-template-columns: 1fr;
  }

  .category-edit-fields {
    grid-template-columns: minmax(0, 1fr) 96px 120px 42px;
  }

  .donut-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .donut-chart {
    width: min(220px, 72vw);
  }

  .donut-legend {
    width: 100%;
  }

  .metric strong {
    font-size: 24px;
  }

  .hero-strip,
  .home-hero,
  .module-hero,
  .settings-hero,
  .section-head,
  .category-top {
    align-items: stretch;
    flex-direction: column;
  }

  .home-actions {
    justify-content: stretch;
  }

  .home-actions button {
    width: 100%;
  }

  .timeline-item {
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .timeline-edit {
    grid-template-columns: 1fr;
  }

  .timeline-edit-fields,
  .timeline-edit.income .timeline-edit-fields {
    grid-template-columns: 1fr;
  }

  .timeline-edit-actions {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    justify-content: stretch;
  }

  .item-actions {
    min-width: 94px;
  }

  .hero-strip {
    padding: 18px;
  }

  .calendar {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .calendar-weekdays,
  .calendar-grid {
    min-width: 860px;
  }

  .settings-hero {
    padding: 18px;
  }

  .settings-hero img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  .hero-strip .primary-button,
  .hero-strip .ghost-button,
  .module-hero .ghost-button,
  .empty-state .primary-button {
    width: 100%;
  }

  .landing-nav {
    align-items: stretch;
    flex-direction: column;
    position: static;
  }

  .landing-links,
  .landing-actions,
  .landing-hero-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 34px;
  }

  .section-head span {
    text-align: left;
  }

  .month-focus {
    padding: 18px;
  }

  .month-focus strong {
    font-size: 34px;
  }

  .timeline-date {
    width: auto;
  }
}

.admin-page {
  margin: 0 auto;
  max-width: 1180px;
  min-height: 100vh;
  padding: 34px clamp(18px, 4vw, 48px);
}

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

.admin-kicker {
  color: var(--primary);
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.admin-header h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1;
  margin: 0;
}

.admin-header p {
  color: var(--muted);
  margin: 10px 0 0;
}

.admin-back-link {
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0 16px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.admin-metric,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.admin-metric {
  display: grid;
  gap: 14px;
  min-height: 132px;
  padding: 18px;
}

.admin-metric span,
.admin-user-row span,
.admin-empty {
  color: var(--muted);
}

.admin-metric span {
  font-size: 13px;
  font-weight: 800;
}

.admin-metric strong {
  align-self: end;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
}

.admin-metric-highlight {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.admin-panel {
  min-width: 0;
  padding: 18px;
}

.admin-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-panel h2 {
  font-size: 18px;
  margin: 0;
}

.admin-bars,
.admin-user-list {
  display: grid;
  gap: 12px;
}

.admin-bar-row {
  display: grid;
  gap: 8px;
}

.admin-bar-row > div,
.admin-user-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.admin-bar-row span,
.admin-bar-row strong {
  font-size: 14px;
}

.admin-bar-row meter {
  height: 14px;
  width: 100%;
}

.admin-user-row {
  border-top: 1px solid var(--line);
  min-height: 58px;
  padding-top: 12px;
}

.admin-user-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-user-row > div {
  min-width: 0;
}

.admin-user-row > div:last-child {
  text-align: right;
}

.admin-user-row strong,
.admin-user-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row span {
  font-size: 13px;
}

.admin-empty {
  margin: 0;
}

@media (max-width: 900px) {
  .admin-header,
  .admin-bar-row > div,
  .admin-user-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-back-link {
    width: 100%;
  }

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

  .admin-user-row > div:last-child {
    text-align: left;
  }
}

#app {
  min-height: 100vh;
}

#app input,
#app select,
#app textarea {
  color-scheme: dark;
}

#app select option {
  background: #0f172a;
  color: #f8fafc;
}

#app input[type="file"]::file-selector-button {
  background: #a7f3d0;
  border: 0;
  border-radius: 10px;
  color: #0f172a;
  cursor: pointer;
  font-weight: 900;
  margin-right: 12px;
  padding: 8px 12px;
}

#app ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#app ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

/* Vue redesign fallback styles. The app uses Tailwind-like class names, but this
   local layer keeps the interface usable even when the Tailwind CDN is absent. */
#app,
#app > div {
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 144, 71, 0.16), transparent 34vw),
    linear-gradient(135deg, rgba(36, 88, 75, 0.24), transparent 42vw),
    #0e1512;
  color: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

#app .fixed {
  position: fixed;
}

#app .absolute {
  position: absolute;
}

#app .relative {
  position: relative;
}

#app .sticky {
  position: sticky;
}

#app .inset-0 {
  inset: 0;
}

#app .inset-x-0 {
  left: 0;
  right: 0;
}

#app .top-0 {
  top: 0;
}

#app .bottom-5 {
  bottom: 20px;
}

#app .right-5 {
  right: 20px;
}

#app .z-10 { z-index: 10; }
#app .z-30 { z-index: 30; }
#app .z-40 { z-index: 40; }
#app .z-50 { z-index: 50; }

#app .pointer-events-none {
  pointer-events: none;
}

#app .place-items-center {
  place-items: center;
}

#app .place-items-start {
  place-items: start center;
}

#app .bg-black\/70 {
  background: rgba(0, 0, 0, 0.7);
}

#app .backdrop-blur-sm,
#app .backdrop-blur-xl {
  backdrop-filter: blur(18px);
}

#app aside {
  background: rgba(18, 28, 24, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  bottom: 0;
  box-shadow: 24px 0 70px rgba(0, 0, 0, 0.22);
  left: 0;
  overflow-y: auto;
  position: fixed;
  top: 0;
  width: 288px;
  z-index: 40;
}

#app aside > div {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  padding: 20px;
}

#app aside img {
  border-radius: 14px;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

#app aside nav {
  display: grid;
  gap: 14px;
}

#app .nav-group {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 8px;
  padding: 0;
}

#app .nav-group-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0;
  padding: 0 10px;
  text-transform: uppercase;
}

#app aside button,
#app button {
  align-items: center;
  border-radius: 14px;
  min-height: 42px;
}

#app aside nav button {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: #cbd5e1;
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

#app aside nav button:hover,
#app aside nav button.bg-emerald-300 {
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  border-color: rgba(167, 243, 208, 0.65);
  color: #062016;
}

#app .nav-home {
  margin-bottom: 4px;
}

#app .module-toggle {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

#app .module-toggle i {
  display: grid;
  font-style: normal;
  height: 24px;
  margin-left: auto;
  place-items: center;
  width: 24px;
}

#app .module-toggle-active {
  border-color: rgba(167, 243, 208, 0.36);
  box-shadow: inset 3px 0 0 #a7f3d0;
}

#app .nav-submenu {
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  gap: 7px;
  margin-left: 18px;
  padding-left: 12px;
}

#app .nav-subitem {
  min-height: 38px;
}

#app .nav-utilities {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 14px;
}

#app .hub-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#app .hub-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  display: grid;
  gap: 18px;
  min-height: 260px;
  padding: 22px;
}

#app .hub-card-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

#app .hub-card-top > span {
  display: grid;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  font-size: 26px;
  height: 56px;
  place-items: center;
  width: 56px;
}

#app .hub-card h4 {
  font-size: 24px;
  line-height: 1.1;
  margin: 0;
}

#app .hub-card p {
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

#app .hub-card-stat {
  align-self: end;
  background: rgba(15, 23, 42, 0.36);
  border-radius: 18px;
  padding: 14px;
}

#app .hub-card-stat small {
  color: #94a3b8;
  display: block;
  font-size: 12px;
}

#app .hub-card-stat strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

#app main {
  margin-left: 288px;
  min-height: 100vh;
}

#app main > header {
  backdrop-filter: blur(18px);
  background: rgba(14, 21, 18, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 30;
}

#app main > header > div,
#app .flex {
  display: flex;
}

#app main > header > div {
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  padding: 0 32px;
}

#app .header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

#app .header-month-row {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-left: 14px;
  min-width: 0;
}

#app .header-primary-action {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 42px;
  white-space: nowrap;
}

#app main > header button[aria-label="Ouvrir le menu"] {
  color: #f8fafc;
}

#app .mobile-menu-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#app .mobile-menu-bars span {
  background: #15803d;
  border-radius: 999px;
  display: block;
  height: 3px;
  width: 22px;
}

#app .theme-icon-button {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  height: 42px;
  justify-content: center;
  min-height: 42px;
  padding: 0;
  width: 42px;
}

#app .theme-icon-button span {
  line-height: 1;
}

#app .month-toolbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 6px;
}

#app .month-current-control,
#app .month-create-form {
  align-items: center;
  background: rgba(2, 6, 23, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: flex;
  gap: 8px;
  min-width: 0;
  padding: 6px;
}

#app .month-current-control > span,
#app .month-create-form > span {
  color: #94a3b8;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 4px;
  text-transform: uppercase;
}

#app .month-current-select {
  background: rgba(2, 6, 23, 0.42);
  border-color: rgba(255, 255, 255, 0.08);
  font-weight: 500;
  min-height: 36px;
  min-width: 132px;
  padding: 7px 10px;
  width: 132px;
}

#app .month-create-form {
  margin: 0;
}

#app .month-create-toggle {
  align-items: center;
  background: rgba(36, 88, 75, 0.72);
  border: 1px solid rgba(167, 243, 208, 0.18);
  border-radius: 14px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  justify-content: center;
  min-height: 36px;
  padding: 7px 12px;
  white-space: nowrap;
}

#app .month-create-form > div {
  align-items: center;
  display: flex;
  gap: 6px;
}

#app .month-create-form select {
  background: rgba(2, 6, 23, 0.42);
  border-color: rgba(255, 255, 255, 0.08);
  font-weight: 500;
  min-height: 36px;
  padding: 7px 10px;
}

#app .month-create-form select:first-child {
  min-width: 108px;
  width: 108px;
}

#app .month-create-form select:nth-child(2) {
  min-width: 78px;
  width: 78px;
}

#app .month-create-form button {
  background: #24584b;
  border-color: rgba(167, 243, 208, 0.22);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 7px 12px;
  padding-bottom: 7px;
  padding-top: 7px;
}

#app .notification-wrap {
  position: relative;
  z-index: 80;
}

#app .notification-button {
  justify-content: center;
  min-width: 44px;
  position: relative;
}

#app .notification-button.has-alerts {
  background: rgba(217, 144, 71, 0.16);
  border-color: rgba(217, 144, 71, 0.42);
  color: #fde68a;
}

#app .notification-button em {
  align-items: center;
  background: #ef4444;
  border: 2px solid #121c18;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  height: 20px;
  justify-content: center;
  line-height: 1;
  min-width: 20px;
  padding: 0 5px;
  position: absolute;
  right: -7px;
  top: -7px;
}

#app .notification-panel {
  background: #121c18;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  display: grid;
  gap: 10px;
  max-height: min(620px, calc(100vh - 96px));
  min-width: 360px;
  overflow-y: auto;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(420px, calc(100vw - 32px));
  z-index: 120;
}

#app .notification-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 6px 6px 8px;
}

#app .notification-head span,
#app .notification-item small,
#app .notification-empty {
  color: #94a3b8;
  font-size: 12px;
}

#app .notification-section {
  display: grid;
  gap: 8px;
}

#app .notification-section + .notification-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 10px;
}

#app .notification-section-title {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0 6px;
  text-transform: uppercase;
}

#app .notification-item {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #f8fafc;
  display: grid;
  gap: 10px;
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 0;
  padding: 10px;
  text-align: left;
  width: 100%;
}

#app .notification-item-main {
  align-items: flex-start;
  background: transparent;
  color: inherit;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: 32px minmax(0, 1fr);
  padding: 0;
  text-align: left;
  width: 100%;
}

#app .notification-item.past {
  grid-template-columns: 1fr 28px;
  position: relative;
}

#app .notification-dismiss {
  align-items: center;
  align-self: start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #cbd5e1;
  display: inline-flex;
  font-size: 16px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 28px;
}

#app .notification-dismiss:hover {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.3);
  color: #fecdd3;
}

#app .notification-item:hover {
  border-color: rgba(167, 243, 208, 0.36);
}

#app .notification-item.past {
  opacity: 0.72;
}

#app .notification-item > span,
#app .notification-item-main > span {
  align-items: center;
  background: rgba(15, 23, 42, 0.42);
  border-radius: 10px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

#app .notification-item div,
#app .notification-item-main div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#app .notification-item strong,
#app .notification-item small,
#app .notification-item-main strong,
#app .notification-item-main small {
  overflow: hidden;
  text-overflow: ellipsis;
}

#app .notification-item em {
  color: #a7f3d0;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  margin-top: 2px;
}

#app .notification-item.warning > span {
  color: #fbbf24;
}

#app .notification-item.danger > span {
  color: #fb7185;
}

#app .notification-empty {
  padding: 12px 8px 14px;
}

#app main > div {
  padding: 32px;
}

#app .grid {
  display: grid;
}

#app .hidden {
  display: none;
}

#app .gap-2 { gap: 8px; }
#app .gap-3 { gap: 12px; }
#app .gap-4 { gap: 16px; }
#app .gap-5 { gap: 20px; }
#app .gap-6 { gap: 24px; }

#app section,
#app article,
#app form,
#app .bg-white\/\[0\.05\],
#app .bg-white\/\[0\.04\] {
  border-radius: 24px;
}

#app article,
#app form,
#app section.rounded-3xl,
#app .bg-white\/\[0\.05\] {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#app .bg-white\/\[0\.04\] {
  background: rgba(255, 255, 255, 0.04);
}

#app .p-2 { padding: 8px; }
#app .p-3 { padding: 12px; }
#app .p-4 { padding: 16px; }
#app .p-5 { padding: 20px; }
#app .p-6 { padding: 24px; }
#app .p-8 { padding: 32px; }
#app .px-2 { padding-left: 8px; padding-right: 8px; }
#app .px-3 { padding-left: 12px; padding-right: 12px; }
#app .px-4 { padding-left: 16px; padding-right: 16px; }
#app .px-5 { padding-left: 20px; padding-right: 20px; }
#app .py-1 { padding-top: 4px; padding-bottom: 4px; }
#app .py-2 { padding-top: 8px; padding-bottom: 8px; }
#app .py-3 { padding-top: 12px; padding-bottom: 12px; }
#app .pt-24 { padding-top: 96px; }

#app h1,
#app h2,
#app h3,
#app h4,
#app strong {
  color: #f8fafc;
}

#app h3 {
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1;
  margin: 0;
}

#app .text-xl { font-size: 20px; }
#app .text-2xl { font-size: 24px; }
#app .text-3xl { font-size: 30px; }
#app .text-4xl { font-size: 40px; }
#app .text-sm { font-size: 14px; }
#app .text-xs { font-size: 12px; }
#app .font-bold,
#app .font-black,
#app .font-extrabold {
  font-weight: 650;
}

#app .font-bold {
  font-weight: 600;
}

#app .font-black,
#app .font-extrabold {
  font-weight: 700;
}

#app h1,
#app h2,
#app h3,
#app h4,
#app strong,
#app b {
  font-weight: 700;
}

#app .text-slate-400,
#app .text-slate-500 {
  color: #94a3b8;
}

#app .text-emerald-300 {
  color: #a7f3d0;
}

#app .text-rose-300,
#app .text-rose-200 {
  color: #fda4af;
}

#app .bg-emerald-300 {
  background: #a7f3d0;
  color: #0f172a;
}

#app button,
#app input,
#app select {
  border: 1px solid rgba(255, 255, 255, 0.1);
  font: inherit;
}

#app button {
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 14px;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, filter 140ms ease;
}

#app button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(167, 243, 208, 0.28);
  color: #ffffff;
}

#app button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#app button.bg-emerald-300,
#app .bg-emerald-300 {
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  border-color: rgba(167, 243, 208, 0.65);
  color: #062016;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.18);
}

#app button.bg-emerald-300:hover {
  background: linear-gradient(135deg, #bbf7d0, #86efac);
  color: #04150f;
}

#app button.text-rose-200,
#app button[class*="rose"] {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(253, 164, 175, 0.26);
  color: #fecdd3;
}

#app button.text-rose-200:hover,
#app button[class*="rose"]:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(253, 164, 175, 0.42);
  color: #ffe4e6;
}

#app button.text-emerald-300,
#app button[class*="emerald"]:not(.bg-emerald-300) {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(167, 243, 208, 0.22);
  color: #a7f3d0;
}

#app button.text-emerald-300:hover,
#app button[class*="emerald"]:not(.bg-emerald-300):hover {
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
}

#app button.text-emerald-300,
#app button[class*="emerald"]:not(.bg-emerald-300) {
  background: #176b58;
  border-color: #176b58;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(23, 107, 88, 0.16);
}

#app button.text-emerald-300:hover,
#app button[class*="emerald"]:not(.bg-emerald-300):hover {
  background: #115545;
  border-color: #115545;
  color: #ffffff;
}

#app input,
#app select {
  background: rgba(2, 6, 23, 0.6);
  border-radius: 14px;
  color: #f8fafc;
  min-height: 42px;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

#app input:focus,
#app select:focus {
  border-color: #a7f3d0;
  box-shadow: 0 0 0 3px rgba(167, 243, 208, 0.14);
}

#app table {
  border-collapse: collapse;
  width: 100%;
}

#app .text-right {
  text-align: right;
}

#app .text-left {
  text-align: left;
}

#app .text-center {
  text-align: center;
}

#app th,
#app td {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 16px;
}

#app th {
  color: #94a3b8;
  font-size: 13px;
  text-transform: uppercase;
}

#app .border-white\/10 {
  border-color: rgba(255, 255, 255, 0.1);
}

#app .text-slate-300 {
  color: #cbd5e1;
}

#app .text-white {
  color: #ffffff;
}

#app .overflow-hidden {
  overflow: hidden;
}

#app .overflow-auto {
  overflow: auto;
}

#app .rounded-xl { border-radius: 12px; }
#app .rounded-2xl { border-radius: 16px; }
#app .rounded-3xl,
#app .rounded-\[2rem\] { border-radius: 24px; }

#app .shadow-2xl {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

#app .items-center { align-items: center; }
#app .items-start { align-items: flex-start; }
#app .justify-between { justify-content: space-between; }
#app .justify-center { justify-content: center; }
#app .flex-wrap { flex-wrap: wrap; }
#app .min-w-0 { min-width: 0; }
#app .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .mt-1 { margin-top: 4px; }
#app .mt-3 { margin-top: 12px; }
#app .mt-4 { margin-top: 16px; }
#app .mt-6 { margin-top: 24px; }
#app .mb-4 { margin-bottom: 16px; }
#app .mb-5 { margin-bottom: 20px; }
#app .ml-auto,
#app .mt-auto { margin-top: auto; }

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

#app .max-h-72 {
  max-height: 18rem;
}

#app .max-w-2xl {
  max-width: 42rem;
}

#app .max-w-xl {
  max-width: 36rem;
}

#app .max-w-2xl,
#app .max-w-xl {
  width: 100%;
}

#app .h-2 { height: 8px; }
#app .h-3 { height: 12px; }
#app .h-4 { height: 16px; }
#app .h-5 { height: 20px; }
#app .h-10 { height: 40px; }
#app .w-4 { width: 16px; }
#app .w-5 { width: 20px; }
#app .w-10 { width: 40px; }
#app .w-full { width: 100%; }
#app .min-h-screen { min-height: 100vh; }
#app .block { display: block; }
#app .inline-block { display: inline-block; }

#app .opacity-0 {
  opacity: 1;
}

#app .line-through {
  text-decoration: line-through;
}

#app .uppercase {
  text-transform: uppercase;
}

#app .tracking-wide,
#app .tracking-\[0\.18em\],
#app .tracking-\[0\.2em\] {
  letter-spacing: 0.12em;
}

#app .cursor-pointer {
  cursor: pointer;
}

#app .annual-bars {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  min-height: 250px;
}

#app .annual-bar-group {
  align-items: center;
  display: grid;
  gap: 10px;
  min-width: 0;
}

#app .annual-bar-pair {
  align-items: end;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  display: flex;
  gap: 5px;
  height: 190px;
  justify-content: center;
  padding: 10px;
}

#app .annual-bar {
  border-radius: 999px 999px 8px 8px;
  display: block;
  min-height: 8px;
  width: 12px;
}

#app .annual-bar.income {
  background: linear-gradient(180deg, #a7f3d0, #10b981);
}

#app .annual-bar.expense {
  background: linear-gradient(180deg, #fda4af, #f43f5e);
}

#app .annual-bar-group strong {
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
}

#app .annual-line-chart {
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 100% 40px, 52px 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  display: block;
  height: clamp(220px, 30vw, 280px);
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

#app .chart-grid-line {
  stroke: rgba(148, 163, 184, 0.16);
  stroke-width: 1;
}

#app .chart-zero {
  stroke: rgba(148, 163, 184, 0.42);
  stroke-dasharray: 6 8;
}

#app .chart-line {
  fill: none;
  stroke: #a7f3d0;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  filter: drop-shadow(0 10px 16px rgba(16, 185, 129, 0.28));
}

#app .chart-line-income {
  stroke: #34d399;
}

#app .chart-line-expense {
  stroke: #fb7185;
  filter: drop-shadow(0 10px 16px rgba(244, 63, 94, 0.22));
}

#app .chart-line-savings {
  stroke: #38bdf8;
  filter: drop-shadow(0 10px 16px rgba(56, 189, 248, 0.22));
}

#app .chart-dot {
  cursor: pointer;
  fill: #0f172a;
  pointer-events: all;
  stroke: #a7f3d0;
  stroke-width: 4;
}

#app .chart-dot-income {
  stroke: #34d399;
}

#app .chart-dot-expense {
  stroke: #fb7185;
}

#app .chart-dot-savings {
  stroke: #38bdf8;
}

#app .annual-insights {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

#app .annual-insight {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  min-width: 0;
  padding: 12px;
}

#app .annual-insight span,
#app .annual-insight small {
  color: #94a3b8;
  display: block;
  font-size: 12px;
}

#app .annual-insight strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

#app .annual-insight small {
  margin-top: 4px;
}

#app .monthly-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

#app .monthly-layout {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

#app .monthly-panel {
  min-width: 0;
}

#app .monthly-expense-card {
  position: relative;
}

#app .monthly-expense-card::before {
  border-radius: 999px;
  content: "";
  height: 34px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 4px;
}

#app .monthly-expense-card.recurring::before {
  background: #f59e0b;
}

#app .monthly-expense-card.recurring.income::before {
  background: #34d399;
}

#app .monthly-expense-card.overview::before {
  background: #3b82f6;
}

#app .monthly-expense-card.one-off::before {
  background: #fb7185;
}

#app .monthly-recurring-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px;
}

#app .monthly-recurring-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#app .monthly-recurring-head span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#app .monthly-recurring-head strong {
  font-size: 14px;
  white-space: nowrap;
}

#app .monthly-side-row.recurring-row {
  padding: 9px 11px;
}

#app .monthly-side-row.recurring-row.income {
  border-left: 3px solid #34d399;
}

#app .monthly-side-row.recurring-row.expense {
  border-left: 3px solid #fb7185;
}

#app .monthly-side-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px 12px;
}

#app .monthly-side-row.planning-row {
  grid-template-columns: 92px minmax(0, 1fr) auto;
}

#app .planning-date {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

#app .planning-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

#app .planning-meta b {
  white-space: nowrap;
}

#app .monthly-side-row.planning-row.recurring::before,
#app .monthly-side-row.planning-row.one-off::before {
  content: "";
}

#app .monthly-side-row strong,
#app .monthly-side-row span {
  display: block;
}

#app .monthly-side-row span {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 2px;
}

#app .monthly-side-row b {
  color: #fda4af;
  font-size: 13px;
}

#app .monthly-expense-card.income .monthly-side-row b {
  color: #86efac;
}

#app .monthly-expense-card.overview strong {
  white-space: nowrap;
}

#app .monthly-journal-list {
  max-height: min(54vh, 620px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

#app .monthly-journal-item {
  position: relative;
}

#app .monthly-journal-item {
  grid-template-columns: 88px minmax(0, 1fr) auto;
  padding: 10px 12px 10px 16px;
}

#app .monthly-journal-item button {
  min-height: 32px;
  padding: 6px 9px;
}

#app .monthly-journal-item::before {
  border-radius: 999px;
  bottom: 10px;
  content: "";
  left: 0;
  position: absolute;
  top: 10px;
  width: 4px;
}

#app .monthly-journal-item.income::before {
  background: #34d399;
}

#app .monthly-journal-item.expense::before {
  background: #fb7185;
}

#app .monthly-table-wrap {
  max-height: none;
  overflow: auto;
}

#app .monthly-table {
  table-layout: fixed;
}

#app .monthly-table-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 4px;
}

#app .monthly-table-sub {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

#app .monthly-table th,
#app .monthly-table td {
  padding: 10px 12px;
  vertical-align: top;
}

#app .monthly-table th:nth-child(1),
#app .monthly-table td:nth-child(1) {
  width: 96px;
}

#app .monthly-table th:nth-child(3),
#app .monthly-table td:nth-child(3) {
  width: 92px;
}

#app .monthly-table th:nth-child(4),
#app .monthly-table td:nth-child(4) {
  width: 140px;
}

#app .monthly-table th:nth-child(5),
#app .monthly-table td:nth-child(5) {
  width: 116px;
}

#app .monthly-table th:nth-child(6),
#app .monthly-table td:nth-child(6) {
  width: 208px;
}

#app .monthly-table-label {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .monthly-table-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

#app .monthly-table-actions button {
  flex: 0 0 auto;
}

#app .delete-action {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.42);
  color: #fecdd3;
}

#app .delete-action:hover {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.42);
  color: #fecdd3;
  filter: none;
}

#app .action-income {
  background: rgba(20, 116, 95, 0.12);
  border: 1px solid rgba(20, 116, 95, 0.32);
  color: #14745f;
}

#app .action-income:hover {
  background: rgba(20, 116, 95, 0.18);
  border-color: rgba(20, 116, 95, 0.48);
  color: #0f5f4d;
}

#app .action-expense {
  background: rgba(194, 65, 93, 0.92);
  border: 1px solid rgba(194, 65, 93, 0.92);
  color: #ffffff;
}

#app .action-expense:hover {
  background: rgba(170, 47, 78, 0.98);
  border-color: rgba(170, 47, 78, 0.98);
  color: #ffffff;
}

#app .badge-income,
#app .badge-expense {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

#app .badge-income {
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
}

#app .badge-expense {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
}

#app .rounded-lg {
  border-radius: 10px;
}

#app .ml-2 {
  margin-left: 8px;
}

#app .chart-tooltip {
  background: #101c18;
  border: 1px solid rgba(167, 243, 208, 0.35);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  max-width: 260px;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  white-space: pre-line;
  z-index: 9999;
}

#app [data-theme="light"] {
  background:
    linear-gradient(135deg, rgba(231, 239, 236, 0.92), rgba(246, 248, 250, 0.96)),
    #edf2f1;
  color: #13201c;
}

#app [data-theme="light"] aside {
  background: #f8faf9;
  border-right-color: #b8c6c1;
  box-shadow: 10px 0 30px rgba(28, 45, 39, 0.06);
}

#app [data-theme="light"] main > header {
  background: rgba(248, 250, 249, 0.94);
  border-bottom-color: #b8c6c1;
  box-shadow: 0 12px 28px rgba(28, 45, 39, 0.06);
}

#app [data-theme="light"] article,
#app [data-theme="light"] form,
#app [data-theme="light"] section.rounded-3xl,
#app [data-theme="light"] .bg-white\/\[0\.05\],
#app [data-theme="light"] .bg-white\/\[0\.04\],
#app [data-theme="light"] .hub-card {
  background: #ffffff;
  border-color: #aebdb8;
  box-shadow: 0 10px 24px rgba(28, 45, 39, 0.06);
}

#app [data-theme="light"] h1,
#app [data-theme="light"] h2,
#app [data-theme="light"] h3,
#app [data-theme="light"] h4,
#app [data-theme="light"] strong {
  color: #16211d;
}

#app [data-theme="light"] .text-slate-400,
#app [data-theme="light"] .text-slate-500,
#app [data-theme="light"] .text-slate-300 {
  color: #52645d;
}

#app [data-theme="light"] .text-emerald-300 {
  color: #14745f;
}

#app [data-theme="light"] p.text-emerald-300,
#app [data-theme="light"] .uppercase.text-emerald-300 {
  color: #24584b;
}

#app [data-theme="light"] th,
#app [data-theme="light"] td {
  border-top-color: #c7d1cd;
}

#app [data-theme="light"] thead {
  background: #eef3f1;
  color: #4a5d55;
}

#app [data-theme="light"] input,
#app [data-theme="light"] select {
  background: #ffffff;
  border-color: #aebdb8;
  color: #16211d;
}

#app [data-theme="light"] .month-current-control,
#app [data-theme="light"] .month-create-form {
  background: #ffffff;
  border-color: #c0ccc8;
}

#app [data-theme="light"] .month-current-control > span,
#app [data-theme="light"] .month-create-form > span {
  color: #52645d;
}

#app [data-theme="light"] .month-toolbar {
  background: #eef3f1;
  border-color: #c0ccc8;
}

#app [data-theme="light"] .month-current-select {
  background: #ffffff;
  border-color: #c0ccc8;
}

#app [data-theme="light"] .month-create-form select {
  background: #ffffff;
  border-color: #c0ccc8;
}

#app [data-theme="light"] .month-create-toggle {
  background: #24584b;
  border-color: rgba(36, 88, 75, 0.35);
  color: #ffffff;
}

#app [data-theme="light"] .theme-icon-button {
  background: #ffffff;
  border-color: #aebdb8;
  color: #24584b;
}

#app [data-theme="light"] main > header button[aria-label="Ouvrir le menu"] {
  color: #24584b;
}

#app [data-theme="light"] .month-create-form button {
  background: #24584b;
  border-color: rgba(36, 88, 75, 0.45);
  color: #ffffff;
}

#app [data-theme="light"] .notification-button.has-alerts {
  background: rgba(217, 144, 71, 0.16);
  border-color: rgba(184, 104, 35, 0.4);
  color: #7c3f12;
}

#app [data-theme="light"] .notification-button em {
  border-color: #f8faf9;
}

#app [data-theme="light"] .notification-panel {
  background: #ffffff;
  border-color: #aebdb8;
  box-shadow: 0 18px 48px rgba(28, 45, 39, 0.14);
}

#app [data-theme="light"] .notification-item {
  background: #f7faf9;
  border-color: #c0ccc8;
  color: #16211d;
}

#app [data-theme="light"] .notification-item > span {
  background: #eef3f1;
}

#app [data-theme="light"] .notification-item-main > span {
  background: #eef3f1;
}

#app [data-theme="light"] .notification-dismiss {
  background: #eef3f1;
  border-color: #c0ccc8;
  color: #52645d;
}

#app [data-theme="light"] .notification-section + .notification-section {
  border-top-color: #c0ccc8;
}

#app [data-theme="light"] .notification-item em {
  color: #24584b;
}

#app [data-theme="light"] button {
  background: #f2f6f4;
  border-color: #aebdb8;
  color: #1d2e28;
}

#app [data-theme="light"] button:hover {
  background: #e5eeeb;
  border-color: #789089;
}

#app [data-theme="light"] button.bg-emerald-300,
#app [data-theme="light"] .bg-emerald-300 {
  background: linear-gradient(135deg, #24584b, #2f7d67);
  border-color: rgba(36, 88, 75, 0.45);
  color: #ffffff;
}

#app [data-theme="light"] aside nav button {
  background: #eef3f1;
  border-color: #c0ccc8;
  color: #2f453d;
}

#app [data-theme="light"] aside nav button:hover,
#app [data-theme="light"] aside nav button.bg-emerald-300 {
  background: linear-gradient(135deg, #24584b, #2f7d67);
  color: #ffffff;
}

#app [data-theme="light"] .module-toggle {
  background: #e8efec;
  border-color: #b8c6c1;
  color: #16211d;
}

#app [data-theme="light"] .module-toggle-active {
  border-color: rgba(36, 88, 75, 0.36);
  box-shadow: inset 3px 0 0 #24584b;
}

#app [data-theme="light"] .nav-submenu {
  border-left-color: #c0ccc8;
}

#app [data-theme="light"] .nav-utilities {
  border-top-color: #c0ccc8;
}

#app [data-theme="light"] .hub-card-top > span,
#app [data-theme="light"] .hub-card-stat {
  background: #eef3f1;
}

#app [data-theme="light"] .nav-group-label {
  color: #7b8a82;
}

#app [data-theme="light"] .annual-bar-pair,
#app [data-theme="light"] .annual-line-chart {
  background-color: #f7faf9;
  border-color: #aebdb8;
}

#app [data-theme="light"] .chart-zero {
  stroke: rgba(100, 116, 139, 0.42);
}

#app [data-theme="light"] .chart-grid-line {
  stroke: rgba(100, 116, 139, 0.18);
}

#app [data-theme="light"] .chart-line {
  stroke: #24584b;
}

#app [data-theme="light"] .chart-dot {
  fill: #ffffff;
  stroke: #24584b;
}

#app [data-theme="light"] .monthly-table-sub {
  color: #718077;
}

#app [data-theme="light"] .monthly-layout > div > .rounded-3xl {
  background: #eef4f2;
  border-color: #9fb2ab;
}

#app [data-theme="light"] .monthly-journal-item {
  background: #ffffff;
  border: 1px solid #b7c7c1;
  box-shadow: 0 8px 20px rgba(28, 45, 39, 0.08);
}

#app [data-theme="light"] .monthly-journal-item:nth-child(even) {
  background: #f5faf8;
}

#app [data-theme="light"] .monthly-journal-item.income {
  border-left-color: #147c5c;
}

#app [data-theme="light"] .monthly-journal-item.expense {
  border-left-color: #c2415d;
}

#app [data-theme="light"] .monthly-journal-item.income::before {
  background: #147c5c;
}

#app [data-theme="light"] .monthly-journal-item.expense::before {
  background: #c2415d;
}

#app [data-theme="light"] .monthly-journal-item strong {
  color: #17251f;
}

#app [data-theme="light"] .monthly-journal-item .text-slate-500 {
  color: #536861;
}

#app [data-theme="light"] .monthly-expense-card {
  background: #ffffff;
  border-color: #aebdb8;
}

#app [data-theme="light"] .monthly-expense-card.recurring {
  background: #fffaf0;
  border-color: #d9b76b;
}

#app [data-theme="light"] .monthly-expense-card.recurring.income {
  background: #effaf4;
  border-color: #92d2ac;
}

#app [data-theme="light"] .monthly-expense-card.overview {
  background: #eff4ff;
  border-color: #a9bff0;
}

#app [data-theme="light"] .monthly-expense-card.one-off {
  background: #fff7f8;
  border-color: #d7a3ad;
}

#app [data-theme="light"] .monthly-side-row {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(126, 145, 137, 0.34);
}

#app [data-theme="light"] .monthly-side-row.planning-row {
  background: #ffffff;
  border-color: #b7c7c1;
}

#app [data-theme="light"] .monthly-side-row.planning-row.income {
  border-left-color: #147c5c;
}

#app [data-theme="light"] .monthly-side-row.planning-row.expense {
  border-left-color: #c2415d;
}

#app [data-theme="light"] .monthly-side-row span {
  color: #536861;
}

#app [data-theme="light"] .monthly-side-row b {
  color: #9f2f2f;
}

#app [data-theme="light"] .monthly-expense-card.income .monthly-side-row b {
  color: #147c5c;
}

#app [data-theme="light"] .monthly-recurring-group {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(126, 145, 137, 0.2);
}

#app [data-theme="light"] .monthly-recurring-head span {
  color: #536861;
}

#app [data-theme="light"] .monthly-table tbody tr {
  background: #ffffff;
}

#app [data-theme="light"] .monthly-table tbody tr:nth-child(even) {
  background: #f5faf8;
}

#app [data-theme="light"] .badge-income {
  background: rgba(36, 88, 75, 0.12);
  color: #24584b;
}

#app [data-theme="light"] .badge-expense {
  background: rgba(190, 80, 71, 0.12);
  color: #9f2f2f;
}

#app [data-theme="light"] .monthly-budget-card,
#app [data-theme="light"] .monthly-table-wrap {
  border-color: #aebdb8;
}

#app [data-theme="light"] .monthly-summary-grid > article,
#app [data-theme="light"] .monthly-layout > div,
#app [data-theme="light"] .annual-line-chart,
#app [data-theme="light"] .annual-bar-pair,
#app [data-theme="light"] .annual-insight {
  box-shadow: 0 10px 24px rgba(28, 45, 39, 0.06);
}

#app [data-theme="light"] .annual-insight {
  background: #f7faf9;
  border-color: #aebdb8;
}

#app [data-theme="light"] .monthly-table tr + tr td {
  border-top-color: #c7d1cd;
}

#app [data-theme="light"] .monthly-table-actions button:last-child {
  background: rgba(194, 65, 93, 0.14);
  border-color: rgba(194, 65, 93, 0.38);
  color: #9f2f2f;
}

#app [data-theme="light"] .monthly-table-actions button:last-child:hover {
  background: rgba(194, 65, 93, 0.2);
}

#app [data-theme="light"] .delete-action {
  background: rgba(194, 65, 93, 0.14);
  border-color: rgba(194, 65, 93, 0.38);
  color: #9f2f2f;
}

#app [data-theme="light"] .delete-action:hover {
  background: rgba(194, 65, 93, 0.14);
  border-color: rgba(194, 65, 93, 0.38);
  color: #9f2f2f;
  filter: none;
}

#app [data-theme="light"] .action-income {
  background: rgba(20, 116, 95, 0.12);
  border-color: rgba(20, 116, 95, 0.32);
  color: #14745f;
}

#app [data-theme="light"] .action-income:hover {
  background: rgba(20, 116, 95, 0.18);
  border-color: rgba(20, 116, 95, 0.48);
  color: #0f5f4d;
}

#app [data-theme="light"] .action-expense {
  background: rgba(194, 65, 93, 0.92);
  border-color: rgba(194, 65, 93, 0.92);
  color: #ffffff;
}

#app [data-theme="light"] .action-expense:hover {
  background: rgba(170, 47, 78, 0.98);
  border-color: rgba(170, 47, 78, 0.98);
  color: #ffffff;
}

#app [data-theme="light"] .chart-line-income {
  stroke: #147c5c;
}

#app [data-theme="light"] .chart-line-expense {
  stroke: #c2415d;
}

#app [data-theme="light"] .chart-line-savings {
  stroke: #1887c7;
}

#app [data-theme="light"] .chart-tooltip {
  background: #17251f;
  border-color: #789089;
  color: #ffffff;
}

@media (min-width: 1024px) {
  #app .lg\:hidden {
    display: none;
  }

  #app .lg\:translate-x-0 {
    transform: translateX(0);
  }
}

@media (min-width: 768px) {
  #app .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #app .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  #app .xl\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #app .xl\:grid-cols-\[1fr_0\.9fr\] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }
}

@media (max-width: 1023px) {
  #app aside {
    transform: translateX(-100%);
  }

  #app aside.translate-x-0 {
    transform: translateX(0);
  }

  #app main {
    margin-left: 0;
  }

  #app main > header > div,
  #app main > div {
    padding-left: 18px;
    padding-right: 18px;
  }

  #app main > header > div {
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  #app .header-actions {
    justify-content: flex-end;
    margin-left: auto;
    width: auto;
  }

  #app .header-primary-action {
    min-width: 150px;
  }

  #app .header-month-row {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  #app .month-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
  }

  #app .month-current-control,
  #app .month-create-form {
    align-items: stretch;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 6px;
  }

  #app .month-current-control > span,
  #app .month-create-form > span {
    padding-left: 2px;
    white-space: normal;
  }

  #app .month-create-form > div {
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 88px;
    width: 100%;
  }

  #app .month-create-toggle {
    flex: 1 1 auto;
  }

  #app .month-current-select,
  #app .month-create-form select {
    max-width: 100%;
    min-width: 0;
  }

  #app .month-create-form button {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
  }

  #app .monthly-layout {
    grid-template-columns: 1fr;
  }

  #app .monthly-journal-list,
  #app .monthly-table-wrap {
    max-height: none;
  }
}

/* Authentication ---------------------------------------------------------- */
.cb-auth-shell {
  --auth-bg: #fbfaf6;
  --auth-surface: #ffffff;
  --auth-surface-soft: #f5f7f4;
  --auth-text: #14231e;
  --auth-muted: #68746f;
  --auth-line: #dfe6e1;
  --auth-line-strong: #cbd8d1;
  --auth-green: #08785f;
  --auth-green-deep: #075543;
  --auth-green-soft: #e9f4ef;
  --auth-danger: #b83e49;
  --auth-danger-soft: #fff1f2;
  --auth-success: #116b53;
  --auth-success-soft: #edf8f2;
  background:
    radial-gradient(circle at 16% 108%, rgba(168, 213, 195, 0.26) 0 11%, transparent 11.2%),
    radial-gradient(circle at 47% 0%, rgba(179, 221, 204, 0.18), transparent 28%),
    var(--auth-bg);
  color: var(--auth-text);
  display: grid;
  grid-template-columns: minmax(430px, 1.08fr) minmax(500px, 0.92fr);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.cb-auth-shell::before {
  border: 1px solid rgba(8, 120, 95, 0.09);
  border-radius: 50%;
  content: "";
  height: 480px;
  left: 38%;
  position: absolute;
  top: -290px;
  width: 480px;
}

.cb-auth-shell::after {
  background-image: radial-gradient(circle, rgba(8, 120, 95, 0.24) 1.5px, transparent 1.7px);
  background-size: 22px 22px;
  bottom: 56px;
  content: "";
  height: 118px;
  left: 38px;
  opacity: 0.7;
  position: absolute;
  width: 170px;
}

.cb-auth-editorial,
.cb-auth-workspace {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.cb-auth-editorial {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 5vw, 82px) clamp(44px, 6.4vw, 108px);
}

.cb-auth-brand {
  align-items: center;
  color: var(--auth-green-deep);
  display: inline-flex;
  gap: 13px;
  left: clamp(44px, 6.4vw, 108px);
  position: absolute;
  text-decoration: none;
  top: clamp(28px, 5vw, 72px);
}

.cb-auth-brand img,
.cb-auth-mobile-brand img {
  border-radius: 13px;
  height: 48px;
  object-fit: cover;
  width: 48px;
}

.cb-auth-brand span,
.cb-auth-mobile-brand span {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cb-auth-editorial-copy {
  margin-top: 34px;
  max-width: 660px;
}

.cb-auth-eyebrow {
  color: var(--auth-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 22px;
  text-transform: uppercase;
}

.cb-auth-editorial h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 5.2vw, 88px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.94;
  margin: 0;
}

.cb-auth-editorial h1 em {
  color: var(--auth-green);
  font-style: normal;
}

.cb-auth-lead {
  color: #53635d;
  font-size: clamp(18px, 1.7vw, 25px);
  line-height: 1.55;
  margin: 28px 0 0;
  max-width: 560px;
}

.cb-auth-benefits {
  display: flex;
  gap: clamp(22px, 3vw, 48px);
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
}

.cb-auth-benefits li {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: 0;
}

.cb-auth-benefits li > span {
  align-items: center;
  background: var(--auth-green-soft);
  border-radius: 50%;
  color: var(--auth-green);
  display: inline-flex;
  flex: 0 0 auto;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.cb-auth-benefits strong {
  font-size: 13px;
  line-height: 1.35;
  max-width: 86px;
}

.cb-auth-editorial-note {
  bottom: 30px;
  color: var(--auth-muted);
  font-size: 12px;
  left: clamp(44px, 6.4vw, 108px);
  margin: 0;
  position: absolute;
}

.cb-auth-workspace {
  align-items: center;
  background: rgba(255, 255, 255, 0.46);
  border-left: 1px solid rgba(203, 216, 209, 0.64);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px clamp(32px, 5vw, 78px);
}

.cb-auth-mobile-brand {
  align-items: center;
  color: var(--auth-green-deep);
  display: none;
  gap: 11px;
}

.cb-auth-card {
  background: color-mix(in srgb, var(--auth-surface) 96%, transparent);
  border: 1px solid var(--auth-line);
  border-radius: 20px;
  box-shadow: 0 24px 68px rgba(28, 54, 44, 0.11), 0 2px 10px rgba(28, 54, 44, 0.04);
  max-width: 520px;
  overflow: hidden;
  width: 100%;
}

.cb-auth-tabs {
  background: var(--auth-surface-soft);
  border-bottom: 1px solid var(--auth-line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 10px 10px 0;
}

.cb-auth-tabs a {
  align-items: center;
  border-bottom: 2px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--auth-muted);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.cb-auth-tabs a:hover {
  background: color-mix(in srgb, var(--auth-surface) 72%, transparent);
  color: var(--auth-text);
}

.cb-auth-tabs a[aria-selected="true"] {
  background: var(--auth-surface);
  border-bottom-color: var(--auth-green);
  color: var(--auth-green-deep);
}

.cb-auth-panel {
  padding: 31px 38px 26px;
}

.cb-auth-panel[hidden] {
  display: none;
}

.cb-auth-heading {
  align-items: center;
  display: flex;
  gap: 13px;
  margin-bottom: 25px;
}

.cb-auth-heading-icon {
  align-items: center;
  background: var(--auth-green-soft);
  border-radius: 12px;
  color: var(--auth-green);
  display: inline-flex;
  flex: 0 0 auto;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.cb-auth-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}

.cb-auth-heading p {
  color: var(--auth-muted);
  font-size: 13px;
  margin: 5px 0 0;
}

.cb-auth-alert {
  align-items: flex-start;
  border: 1px solid;
  border-radius: 11px;
  display: flex;
  font-size: 13px;
  gap: 9px;
  line-height: 1.45;
  margin: -4px 0 18px;
  padding: 11px 12px;
}

.cb-auth-alert svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.cb-auth-alert-error {
  background: var(--auth-danger-soft);
  border-color: color-mix(in srgb, var(--auth-danger) 30%, transparent);
  color: var(--auth-danger);
}

.cb-auth-alert-success {
  background: var(--auth-success-soft);
  border-color: color-mix(in srgb, var(--auth-success) 28%, transparent);
  color: var(--auth-success);
}

.cb-auth-form {
  display: grid;
  gap: 17px;
}

.cb-auth-field {
  display: grid;
  gap: 7px;
}

.cb-auth-field > label {
  color: #3f4e48;
  font-size: 12px;
  font-weight: 750;
}

.cb-auth-input-wrap {
  position: relative;
}

.cb-auth-input-wrap input {
  background: var(--auth-surface);
  border: 1px solid var(--auth-line-strong);
  border-radius: 10px;
  color: var(--auth-text);
  font-size: 14px;
  height: 50px;
  outline: none;
  padding: 0 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  width: 100%;
}

.cb-auth-input-wrap input[type="password"],
.cb-auth-input-wrap input[type="text"]:has(+ .cb-auth-password-toggle) {
  padding-right: 48px;
}

.cb-auth-input-wrap input::placeholder {
  color: #9aa59f;
}

.cb-auth-input-wrap input:hover {
  border-color: #a9bbb2;
}

.cb-auth-input-wrap input:focus {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-green) 16%, transparent);
}

.cb-auth-input-wrap input[aria-invalid="true"] {
  border-color: var(--auth-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-danger) 10%, transparent);
}

.cb-auth-password-toggle {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  color: var(--auth-muted);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 5px;
  top: 5px;
  width: 40px;
}

.cb-auth-password-toggle:hover {
  background: var(--auth-green-soft);
  color: var(--auth-green);
}

.cb-auth-password-toggle .cb-auth-eye-closed,
.cb-auth-password-toggle[aria-pressed="true"] .cb-auth-eye-open {
  display: none;
}

.cb-auth-password-toggle[aria-pressed="true"] .cb-auth-eye-closed {
  display: block;
}

.cb-auth-field-error,
.cb-auth-field-hint {
  font-size: 11px;
  line-height: 1.35;
  margin: -2px 0 0;
  min-height: 0;
}

.cb-auth-field-error:empty {
  display: none;
}

.cb-auth-field-error {
  color: var(--auth-danger);
}

.cb-auth-field-hint {
  color: var(--auth-muted);
}

.cb-auth-form-options {
  align-items: center;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
}

.cb-auth-form-options a,
.cb-auth-switch a {
  color: var(--auth-green);
  font-weight: 700;
  text-underline-offset: 3px;
}

.cb-auth-checkbox {
  align-items: center;
  display: flex;
  gap: 8px;
}

.cb-auth-checkbox input {
  accent-color: var(--auth-green);
  height: 17px;
  width: 17px;
}

.cb-auth-submit {
  align-items: center;
  background: linear-gradient(135deg, #098169, #075f4c);
  border-radius: 10px;
  box-shadow: 0 7px 18px rgba(8, 120, 95, 0.19);
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  margin-top: 3px;
  min-height: 50px;
  padding: 0 18px;
  transition: box-shadow 150ms ease, filter 150ms ease, transform 150ms ease;
  width: 100%;
}

.cb-auth-submit:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(8, 120, 95, 0.25);
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.cb-auth-submit:disabled {
  background: #9bb0a8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.68;
}

.cb-auth-submit-loading {
  align-items: center;
  display: none;
  gap: 9px;
}

.cb-auth-submit.is-loading .cb-auth-submit-label {
  display: none;
}

.cb-auth-submit.is-loading .cb-auth-submit-loading {
  display: inline-flex;
}

.cb-auth-spinner {
  animation: cb-auth-spin 700ms linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  border-top-color: #fff;
  height: 17px;
  width: 17px;
}

@keyframes cb-auth-spin {
  to { transform: rotate(360deg); }
}

.cb-auth-live {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.cb-auth-switch {
  border-top: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: 12px;
  margin: 23px 0 0;
  padding-top: 19px;
  text-align: center;
}

.cb-auth-secure {
  align-items: center;
  border-top: 1px solid var(--auth-line);
  color: var(--auth-muted);
  display: flex;
  font-size: 11px;
  gap: 7px;
  justify-content: center;
  min-height: 52px;
}

.cb-auth-privacy {
  color: var(--auth-muted);
  font-size: 10px;
  line-height: 1.5;
  margin: 18px 0 0;
  max-width: 430px;
  text-align: center;
}

.cb-auth-shell :is(a, button, input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--auth-green) 35%, transparent);
  outline-offset: 2px;
}

html[data-app-theme="dark"] .cb-auth-shell {
  --auth-bg: #101713;
  --auth-surface: #18211d;
  --auth-surface-soft: #202b26;
  --auth-text: #f3f5f1;
  --auth-muted: #a6b2ac;
  --auth-line: #304039;
  --auth-line-strong: #3b4d45;
  --auth-green: #70c4aa;
  --auth-green-deep: #a7dccb;
  --auth-green-soft: rgba(80, 177, 147, 0.14);
  --auth-danger: #f18a91;
  --auth-danger-soft: rgba(184, 62, 73, 0.13);
  --auth-success: #83d0b6;
  --auth-success-soft: rgba(17, 107, 83, 0.16);
  background:
    radial-gradient(circle at 16% 108%, rgba(39, 105, 84, 0.26) 0 11%, transparent 11.2%),
    radial-gradient(circle at 47% 0%, rgba(51, 130, 105, 0.15), transparent 28%),
    var(--auth-bg);
}

html[data-app-theme="dark"] {
  color-scheme: dark;
}

html[data-app-theme="dark"] .cb-auth-workspace {
  background: rgba(8, 13, 11, 0.2);
  border-left-color: var(--auth-line);
}

html[data-app-theme="dark"] .cb-auth-lead,
html[data-app-theme="dark"] .cb-auth-field > label {
  color: #bdc8c2;
}

@media (max-width: 1180px) {
  .cb-auth-shell {
    grid-template-columns: minmax(390px, 0.85fr) minmax(480px, 1.15fr);
  }

  .cb-auth-editorial {
    padding-inline: 48px;
  }

  .cb-auth-brand,
  .cb-auth-editorial-note {
    left: 48px;
  }

  .cb-auth-benefits {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 34px;
  }

  .cb-auth-benefits strong {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .cb-auth-shell {
    display: block;
    min-height: 100vh;
    overflow: auto;
  }

  .cb-auth-editorial {
    display: none;
  }

  .cb-auth-workspace {
    border-left: 0;
    min-height: 100vh;
    padding: 32px 24px;
  }

  .cb-auth-mobile-brand {
    display: flex;
    margin-bottom: 25px;
  }
}

@media (max-width: 560px) {
  .cb-auth-shell::after {
    display: none;
  }

  .cb-auth-workspace {
    align-items: stretch;
    justify-content: flex-start;
    padding: 22px 14px 28px;
  }

  .cb-auth-mobile-brand {
    padding-left: 5px;
  }

  .cb-auth-mobile-brand img {
    height: 40px;
    width: 40px;
  }

  .cb-auth-mobile-brand span {
    font-size: 16px;
  }

  .cb-auth-card {
    border-radius: 16px;
    max-width: none;
  }

  .cb-auth-tabs {
    padding: 7px 7px 0;
  }

  .cb-auth-tabs a {
    font-size: 13px;
    min-height: 46px;
    padding-inline: 8px;
  }

  .cb-auth-panel {
    padding: 25px 20px 22px;
  }

  .cb-auth-heading {
    align-items: flex-start;
  }

  .cb-auth-heading-icon {
    height: 42px;
    width: 42px;
  }

  .cb-auth-heading h2 {
    font-size: 23px;
  }

  .cb-auth-input-wrap input,
  .cb-auth-submit {
    min-height: 52px;
  }

  .cb-auth-password-toggle {
    height: 42px;
  }

  .cb-auth-privacy {
    margin-inline: auto;
    padding-inline: 10px;
  }
}

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

@media (max-width: 520px) {
  #app .header-actions {
    align-items: stretch;
    gap: 8px;
    order: 3;
    width: 100%;
  }

  #app .notification-wrap,
  #app .theme-icon-button {
    flex: 0 0 42px;
  }

  #app .header-primary-action {
    flex: 1 1 0;
    max-width: none;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
    white-space: normal;
  }

  #app .header-month-row,
  #app .month-toolbar {
    align-items: stretch;
    width: 100%;
  }

  #app .header-month-row {
    order: 4;
  }

  #app .month-current-select,
  #app .month-create-form {
    flex: 1 1 100%;
  }

  #app .month-create-form select:first-child {
    width: auto;
  }

  #app .month-create-form select:nth-child(2) {
    width: 88px;
  }

  #app .month-create-form button {
    white-space: nowrap;
  }

  #app .annual-insights {
    grid-template-columns: 1fr;
  }

  #app .annual-line-chart {
    height: 220px;
  }
}

@media (max-width: 780px) {
  #app .notification-wrap {
    margin-left: 0;
    position: static;
  }

  #app .notification-panel {
    left: 16px;
    max-height: calc(100vh - 96px);
    min-width: 0;
    position: fixed;
    right: 16px;
    top: 76px;
    width: auto;
    z-index: 140;
  }
}

#app .notification-button em,
#app .notification-section-title,
#app .notification-item em,
#app .monthly-table-label,
#app .badge-income,
#app .badge-expense,
#app .action-income,
#app .action-expense,
#app .delete-action,
#app button,
#app th {
  font-weight: 650;
}

#app .text-3xl,
#app .text-4xl,
#app .sm\:text-6xl {
  font-weight: 700;
}

#app .project-hero,
#app .project-detail-head,
#app .project-panel,
#app .project-kpi,
#app .project-card,
#app .project-empty,
#app .project-wizard {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: var(--shadow-soft);
}

#app [data-theme="dark"] .project-hero,
#app [data-theme="dark"] .project-detail-head,
#app [data-theme="dark"] .project-panel,
#app [data-theme="dark"] .project-kpi,
#app [data-theme="dark"] .project-card,
#app [data-theme="dark"] .project-empty,
#app [data-theme="dark"] .project-wizard {
  border-color: rgba(255, 255, 255, 0.1);
}

#app .project-hero {
  align-items: end;
  border-radius: 24px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  position: relative;
}

#app .project-hero::after {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 26%, transparent), color-mix(in srgb, var(--accent) 16%, transparent));
  content: "";
  inset: auto -8% -40% 42%;
  min-height: 190px;
  position: absolute;
  transform: rotate(-8deg);
}

#app .project-hero > * {
  position: relative;
  z-index: 1;
}

#app .project-eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

#app .project-hero h3,
#app .project-detail-head h3,
#app .project-wizard h3 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.96;
  margin: 0;
}

#app .project-hero p,
#app .project-detail-head span {
  color: var(--muted);
  max-width: 760px;
}

#app .project-kpi {
  border-radius: 18px;
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 18px;
}

#app .project-kpi span,
#app .project-kpi small,
#app .project-card p,
#app .project-card footer,
#app .project-empty p,
#app .project-panel p {
  color: var(--muted);
}

#app .project-kpi strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

#app .project-filters {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(130px, 180px)) auto;
}

#app .project-input,
#app .project-form-grid input,
#app .project-form-grid select,
#app .project-form-grid textarea,
#app .project-wizard input,
#app .project-wizard select,
#app .project-wizard textarea {
  -webkit-appearance: none;
  appearance: none;
  background: var(--panel);
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  min-height: 42px;
  min-width: 0;
  opacity: 1;
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

#app .project-form-grid input,
#app .project-form-grid select {
  height: 44px;
}

#app .project-form-grid textarea {
  min-height: 88px;
}

#app .project-input:hover,
#app .project-form-grid input:hover,
#app .project-form-grid select:hover,
#app .project-form-grid textarea:hover,
#app .project-wizard input:hover,
#app .project-wizard select:hover,
#app .project-wizard textarea:hover {
  border-color: rgba(15, 23, 42, 0.22);
}

#app .project-input:focus,
#app .project-form-grid input:focus,
#app .project-form-grid select:focus,
#app .project-form-grid textarea:focus,
#app .project-wizard input:focus,
#app .project-wizard select:focus,
#app .project-wizard textarea:focus {
  border-color: rgba(15, 23, 42, 0.34);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.06);
}

#app [data-theme="dark"] .project-input,
#app [data-theme="dark"] .project-form-grid input,
#app [data-theme="dark"] .project-form-grid select,
#app [data-theme="dark"] .project-form-grid textarea,
#app [data-theme="dark"] .project-wizard input,
#app [data-theme="dark"] .project-wizard select,
#app [data-theme="dark"] .project-wizard textarea {
  border-color: rgba(255, 255, 255, 0.12);
}

#app [data-theme="dark"] .project-input:hover,
#app [data-theme="dark"] .project-form-grid input:hover,
#app [data-theme="dark"] .project-form-grid select:hover,
#app [data-theme="dark"] .project-form-grid textarea:hover,
#app [data-theme="dark"] .project-wizard input:hover,
#app [data-theme="dark"] .project-wizard select:hover,
#app [data-theme="dark"] .project-wizard textarea:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

#app [data-theme="dark"] .project-input:focus,
#app [data-theme="dark"] .project-form-grid input:focus,
#app [data-theme="dark"] .project-form-grid select:focus,
#app [data-theme="dark"] .project-form-grid textarea:focus,
#app [data-theme="dark"] .project-wizard input:focus,
#app [data-theme="dark"] .project-wizard select:focus,
#app [data-theme="dark"] .project-wizard textarea:focus {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

#app .project-input::placeholder,
#app .project-form-grid input::placeholder,
#app .project-form-grid textarea::placeholder,
#app .project-wizard input::placeholder,
#app .project-wizard textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 55%, var(--text));
  -webkit-text-fill-color: color-mix(in srgb, var(--muted) 55%, var(--text));
  opacity: 1;
}

#app [data-theme="dark"] .project-input::placeholder,
#app [data-theme="dark"] .project-form-grid input::placeholder,
#app [data-theme="dark"] .project-form-grid textarea::placeholder,
#app [data-theme="dark"] .project-wizard input::placeholder,
#app [data-theme="dark"] .project-wizard textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 76%, var(--text));
  -webkit-text-fill-color: color-mix(in srgb, var(--muted) 76%, var(--text));
}

#app .project-wizard input[type="date"],
#app .project-form-grid input[type="date"] {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  color-scheme: dark;
  opacity: 1;
}

#app .project-wizard input[type="date"]::-webkit-datetime-edit,
#app .project-wizard input[type="date"]::-webkit-datetime-edit-fields-wrapper,
#app .project-wizard input[type="date"]::-webkit-datetime-edit-text,
#app .project-wizard input[type="date"]::-webkit-datetime-edit-month-field,
#app .project-wizard input[type="date"]::-webkit-datetime-edit-day-field,
#app .project-wizard input[type="date"]::-webkit-datetime-edit-year-field,
#app .project-form-grid input[type="date"]::-webkit-datetime-edit,
#app .project-form-grid input[type="date"]::-webkit-datetime-edit-fields-wrapper,
#app .project-form-grid input[type="date"]::-webkit-datetime-edit-text,
#app .project-form-grid input[type="date"]::-webkit-datetime-edit-month-field,
#app .project-form-grid input[type="date"]::-webkit-datetime-edit-day-field,
#app .project-form-grid input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  opacity: 1;
}

#app .project-toggle {
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: inline-flex;
  padding: 3px;
}

#app .project-toggle button,
#app .project-tabs button,
#app .project-steps button {
  background: transparent;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 800;
  padding: 9px 12px;
}

#app .project-toggle button.active,
#app .project-tabs button.active,
#app .project-steps button.active {
  background: var(--primary);
  color: var(--bg);
}

#app .project-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

#app .project-card {
  border-radius: 22px;
  cursor: pointer;
  display: grid;
  gap: 14px;
  padding: 18px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

#app .project-card:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
  transform: translateY(-2px);
}

#app .project-card-top,
#app .project-detail-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

#app .project-card-top span {
  background: color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 12px;
  display: grid;
  height: 44px;
  place-items: center;
  width: 44px;
}

#app .project-card-top em {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 36%, transparent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 9px;
}

#app .project-card-actions,
#app .project-detail-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

#app .project-card-actions button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 13px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  padding: 0;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  width: 28px;
}

#app .project-danger-button {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--danger) 42%, transparent);
  border-radius: 12px;
  color: var(--danger);
  font-weight: 900;
  padding: 10px 14px;
}

#app .project-danger-button:hover,
#app .project-card-actions button:hover {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

#app .project-card-actions button:hover {
  border-color: color-mix(in srgb, var(--danger) 26%, transparent);
  color: var(--danger);
}

#app .project-card h4 {
  font-size: 24px;
  line-height: 1.05;
  margin: 0;
}

#app .project-progress {
  background: color-mix(in srgb, var(--line) 42%, transparent);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

#app .project-progress.large {
  height: 12px;
}

#app .project-progress span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 3px;
}

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

#app .project-card-metrics div {
  background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
  border-radius: 12px;
  padding: 10px;
}

#app .project-card-metrics small,
#app .project-card-metrics strong {
  display: block;
}

#app .project-card footer,
#app .project-row,
#app .project-loan-card,
#app .project-timeline-row {
  align-items: center;
  border-top: 1px solid color-mix(in srgb, var(--line) 54%, transparent);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 12px;
}

#app .project-table-wrap {
  overflow-x: auto;
}

#app .project-table {
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 860px;
  width: 100%;
}

#app .project-table th {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
}

#app .project-table td {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding: 12px;
}

#app .project-table tr {
  cursor: pointer;
}

#app .project-empty,
#app .project-empty-inline {
  border-radius: 18px;
  padding: 24px;
  text-align: center;
}

#app .project-empty button {
  background: var(--primary);
  border-radius: 12px;
  color: var(--bg);
  font-weight: 900;
  margin-top: 12px;
  padding: 10px 14px;
}

#app .project-detail-head,
#app .project-panel {
  border-radius: 20px;
  padding: 18px;
}

#app .project-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#app .project-overview-grid,
#app .project-analytics-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .project-panel.wide,
#app .project-form-grid .wide,
#app .project-form-grid.wizard .wide {
  grid-column: 1 / -1;
}

#app .project-panel h4 {
  font-size: 20px;
  margin: 0 0 14px;
}

#app .project-form-grid {
  align-items: end;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: 8px;
}

#app [data-theme="dark"] .project-form-grid {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

#app .project-form-grid button {
  background: #111827;
  border: 1px solid #111827;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  height: 44px;
  min-height: 44px;
  padding: 10px 14px;
}

#app .project-form-grid button:hover {
  background: #0f172a;
  border-color: #0f172a;
}

#app [data-theme="dark"] .project-form-grid button {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg);
}

#app [data-theme="dark"] .project-form-grid button:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

#app .project-form-grid.loan {
  align-items: center;
  gap: 8px;
  grid-template-columns:
    minmax(130px, 1.25fr)
    minmax(100px, 0.9fr)
    minmax(118px, 1fr)
    minmax(108px, 0.9fr)
    minmax(132px, 1.05fr)
    minmax(90px, 0.75fr)
    minmax(94px, 0.78fr);
  overflow: visible;
  padding: 10px;
}

#app .project-form-grid.loan input,
#app .project-form-grid.loan select,
#app .project-form-grid.loan button {
  border-color: rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  box-shadow: none;
  font-size: 13px;
  height: 42px;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
  width: 100%;
}

#app .project-form-grid.loan input,
#app .project-form-grid.loan select {
  background: var(--panel);
}

#app .project-form-grid.loan input::placeholder {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .project-form-grid.loan button {
  min-width: 0;
}

#app .project-form-grid.loan .loan-advanced {
  grid-column: 1 / -1;
  padding: 1px 2px 0;
}

#app .project-form-grid.loan .loan-advanced summary {
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style-position: inside;
  padding: 7px 2px 3px;
}

#app .project-form-grid.loan .loan-advanced summary span {
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
}

#app .project-form-grid.loan .loan-advanced-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  padding-top: 8px;
}

@media (max-width: 920px) {
  #app .project-form-grid.loan {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .project-form-grid.loan .loan-advanced-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #app .project-form-grid.loan,
  #app .project-form-grid.loan .loan-advanced-fields {
    grid-template-columns: 1fr;
  }
}

#app .project-link {
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  margin-left: 8px;
}

#app .project-loan-card {
  padding: 12px 0;
}

#app .project-line-chart {
  background: color-mix(in srgb, var(--panel-strong) 55%, transparent);
  border-radius: 14px;
  height: 220px;
  width: 100%;
}

#app .project-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

#app .project-line.remaining,
#app .project-line.capital {
  stroke: var(--primary);
}

#app .project-line.interest {
  stroke: var(--accent);
}

#app .project-line.insurance {
  stroke: var(--neutral);
}

#app .project-chart-bar {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
}

#app .project-chart-bar span,
#app .project-chart-bar strong {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

#app .project-chart-bar i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

#app .project-chart-bar em,
#app .project-dual-bars span,
#app .project-dual-bars em {
  border-radius: 999px;
  display: block;
  height: 8px;
}

#app .project-dual-bars {
  background: color-mix(in srgb, var(--line) 40%, transparent);
  border-radius: 999px;
  display: grid;
  gap: 8px;
  padding: 4px;
}

#app .project-dual-bars span {
  background: color-mix(in srgb, var(--accent) 46%, transparent);
}

#app .project-dual-bars em {
  background: var(--primary);
}

#app .project-timeline-row {
  justify-content: flex-start;
  padding: 10px 0 0;
}

#app .project-timeline-row > span {
  background: var(--primary);
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

#app .project-timeline-row small,
#app .project-note span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

#app .project-note {
  background: color-mix(in srgb, var(--panel-strong) 65%, transparent);
  border-radius: 14px;
  margin-top: 12px;
  padding: 14px;
}

#app .project-wizard {
  border-radius: 24px;
  max-height: calc(100vh - 32px);
  max-width: 920px;
  overflow: auto;
  padding: 20px;
  width: min(920px, 100%);
}

#app .project-wizard-head,
#app .project-wizard-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

#app .project-wizard-head button {
  background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
  border-radius: 12px;
  color: var(--text);
  font-size: 22px;
  height: 42px;
  width: 42px;
}

#app .project-steps {
  display: flex;
  gap: 8px;
  margin: 18px 0;
}

#app .project-wizard label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

#app .project-wizard-actions {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

#app .real-estate-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#app .real-estate-kpi-grid .project-kpi {
  align-content: start;
  gap: 10px;
  min-height: 154px;
  min-width: 0;
  overflow: hidden;
  padding: 18px 20px;
}

#app .real-estate-kpi-grid .project-kpi strong {
  display: block;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.08;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#app .real-estate-kpi-grid .project-kpi span {
  line-height: 1.25;
}

#app .real-estate-kpi-grid .project-kpi small {
  line-height: 1.3;
}

@media (max-width: 1280px) {
  #app .real-estate-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #app .real-estate-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .real-estate-kpi-grid .project-kpi strong {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  #app .real-estate-kpi-grid {
    grid-template-columns: 1fr;
  }
}

#app .project-kpi.accent {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 24%, var(--panel)), var(--panel));
}

#app .project-fast-read {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .project-panel.strong {
  border-color: rgba(15, 23, 42, 0.18);
}

#app .project-answer {
  align-items: center;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 0;
}

#app .project-answer span {
  color: var(--muted);
}

#app .project-fee-row {
  align-items: center;
  min-height: 72px;
}

#app .project-fee-info {
  display: grid;
  gap: 8px;
}

#app .project-fee-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#app .project-fee-meta span {
  background: rgba(15, 23, 42, 0.055);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding: 5px 8px;
}

#app .project-fee-meta .status-confirmed {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

#app .project-fee-meta .status-paid {
  background: rgba(5, 150, 105, 0.1);
  color: #047857;
}

#app .project-fee-amount {
  align-items: flex-end;
  display: grid;
  gap: 4px;
  justify-items: end;
}

@media (max-width: 560px) {
  #app .project-fee-row {
    align-items: start;
    flex-direction: column;
  }

  #app .project-fee-amount {
    justify-items: start;
  }
}

#app .project-action {
  align-items: center;
  background: var(--panel);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 14px;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 12px;
  text-align: left;
  width: 100%;
}

#app .project-action small,
#app .project-action em {
  color: var(--muted);
  display: block;
  font-style: normal;
}

#app .project-warning {
  border-radius: 12px;
  margin-top: 8px;
  padding: 10px 12px;
}

#app .project-warning.info {
  background: rgba(59, 130, 246, 0.10);
}

#app .project-warning.warning {
  background: rgba(217, 144, 71, 0.16);
}

#app .project-wizard-progress {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

#app .project-wizard-progress span,
#app .checklist-progress {
  background: rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

#app .project-wizard-progress i,
#app .checklist-progress span {
  background: var(--primary);
  border-radius: inherit;
  display: block;
  height: 100%;
}

#app .project-steps {
  flex-wrap: wrap;
}

#app .project-steps button.done:not(.active) {
  color: var(--primary);
}

#app .project-wizard-copy {
  background: rgba(15, 23, 42, 0.035);
  border-radius: 16px;
  margin-bottom: 14px;
  padding: 14px;
}

#app .project-wizard-copy h4 {
  margin: 0 0 4px;
}

#app .project-wizard-copy p,
#app .project-wizard-copy small {
  color: var(--muted);
}

#app .project-advanced {
  background: rgba(15, 23, 42, 0.035);
  border-radius: 14px;
  padding: 12px;
}

#app .project-advanced summary {
  cursor: pointer;
  font-weight: 900;
}

#app .project-mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#app .project-mini-list span,
#app .scenario-badges span {
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

#app .project-doc-picker {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

#app .project-doc-picker button {
  background: var(--panel);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  color: var(--text);
  font-weight: 900;
  padding: 14px;
}

#app .project-doc-picker button.active {
  background: var(--primary);
  color: var(--bg);
}

#app .project-final-summary,
#app .scenario-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

#app .project-final-summary article,
#app .scenario-card {
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 14px;
}

#app .project-final-summary span,
#app .project-threshold {
  color: var(--muted);
  display: grid;
  gap: 6px;
}

#app .real-estate-timeline {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 16px;
}

#app .timeline-step {
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: 18px minmax(0, 1fr);
  padding: 12px;
}

#app .timeline-dot {
  background: var(--muted);
  border-radius: 999px;
  height: 14px;
  margin-top: 4px;
  width: 14px;
}

#app .timeline-step.done .timeline-dot {
  background: var(--income);
}

#app .timeline-step.doing .timeline-dot {
  background: var(--accent);
}

#app .timeline-step.late .timeline-dot {
  background: var(--danger);
}

#app .timeline-step input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 900;
  min-width: 0;
  width: 100%;
}

#app .timeline-controls {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr auto;
  margin-top: 8px;
}

#app .timeline-controls input,
#app .timeline-controls button {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 6px;
}

#app .project-check-item {
  align-items: center;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 22px minmax(0, 1fr);
  min-width: 0;
  padding: 13px 2px;
}

#app .project-check-item:first-of-type {
  margin-top: 12px;
}

#app .project-check-item input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--panel);
  border: 1.5px solid rgba(15, 23, 42, 0.28);
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  height: 22px;
  margin: 0;
  min-height: 22px;
  padding: 0;
  position: relative;
  width: 22px;
}

#app .project-check-item input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

#app .project-check-item input[type="checkbox"]:checked::after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  height: 9px;
  left: 7px;
  position: absolute;
  top: 3px;
  transform: rotate(45deg);
  width: 5px;
}

#app .project-check-item > span {
  color: var(--text);
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

#app .project-check-item .done {
  color: var(--muted);
  text-decoration: line-through;
}

#app .scenario-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

#app .scenario-head button {
  background: transparent;
  color: var(--muted);
  font-size: 18px;
}

#app .scenario-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

#app .cashflow-bars {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(12, minmax(58px, 1fr));
  overflow-x: auto;
  padding-top: 16px;
}

#app .cashflow-bars article {
  display: grid;
  gap: 8px;
  justify-items: center;
}

#app .cashflow-bars article.alert strong {
  color: var(--danger);
}

#app .cashflow-bars div {
  align-items: end;
  display: flex;
  gap: 3px;
  height: 130px;
}

#app .cashflow-bars i,
#app .cashflow-bars em {
  border-radius: 999px 999px 0 0;
  display: block;
  width: 12px;
}

#app .cashflow-bars i {
  background: var(--primary);
}

#app .cashflow-bars em {
  background: var(--accent);
}

@media (max-width: 760px) {
  #app .project-fast-read {
    grid-template-columns: 1fr;
  }

  #app .real-estate-timeline {
    grid-template-columns: 1fr;
  }

  #app .timeline-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  #app .project-filters,
  #app .project-overview-grid,
  #app .project-analytics-grid {
    grid-template-columns: 1fr;
  }

  #app .project-hero,
  #app .project-detail-head {
    align-items: stretch;
    flex-direction: column;
  }
}

#app [data-theme="light"] button.text-emerald-300,
html[data-app-theme="light"] #app button.text-emerald-300 {
  background: #176b58;
  border-color: #176b58;
  color: #ffffff;
}

#app [data-theme="light"] button.text-emerald-300:hover,
html[data-app-theme="light"] #app button.text-emerald-300:hover {
  background: #115545;
  border-color: #115545;
  color: #ffffff;
}

/* Clair Budget design system -------------------------------------------------
   Shared tokens and primitives used by the monthly and annual dashboards. */
#app {
  --cb-bg: #0d1512;
  --cb-surface: #15201c;
  --cb-surface-subtle: #1a2722;
  --cb-text: #f8faf9;
  --cb-muted: #9ba9a3;
  --cb-line: rgba(255, 255, 255, 0.1);
  --cb-line-strong: rgba(255, 255, 255, 0.16);
  --cb-green: #35a789;
  --cb-green-strong: #0b745c;
  --cb-green-deep: #075d4b;
  --cb-green-soft: rgba(53, 167, 137, 0.14);
  --cb-rose: #f04464;
  --cb-rose-soft: rgba(240, 68, 100, 0.14);
  --cb-amber: #c99b2f;
  --cb-amber-soft: rgba(221, 172, 53, 0.16);
  --cb-blue: #3479ee;
  --cb-blue-soft: rgba(52, 121, 238, 0.14);
  --cb-radius-sm: 9px;
  --cb-radius-md: 13px;
  --cb-radius-lg: 17px;
  --cb-space-1: 4px;
  --cb-space-2: 8px;
  --cb-space-3: 12px;
  --cb-space-4: 16px;
  --cb-space-5: 20px;
  --cb-space-6: 24px;
  --cb-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  --cb-shadow-soft: 0 5px 18px rgba(0, 0, 0, 0.12);
}

#app [data-theme="light"] {
  --cb-bg: #fbfcfc;
  --cb-surface: #ffffff;
  --cb-surface-subtle: #f7faf9;
  --cb-text: #111827;
  --cb-muted: #657083;
  --cb-line: #e2e7e7;
  --cb-line-strong: #d5dddd;
  --cb-green: #16836a;
  --cb-green-strong: #08785f;
  --cb-green-deep: #075f4c;
  --cb-green-soft: #e5f5ef;
  --cb-rose: #e92d50;
  --cb-rose-soft: #fdecef;
  --cb-amber: #b18419;
  --cb-amber-soft: #fff5d9;
  --cb-blue: #2563df;
  --cb-blue-soft: #eaf0ff;
  --cb-shadow: 0 8px 24px rgba(20, 42, 35, 0.055);
  --cb-shadow-soft: 0 3px 12px rgba(20, 42, 35, 0.06);
  background: var(--cb-bg);
  color: var(--cb-text);
}

#app .ui-icon {
  display: block;
  flex: 0 0 auto;
}

#app .cb-sidebar {
  background: var(--cb-surface);
  border-right: 1px solid var(--cb-line);
  box-shadow: none;
  color: var(--cb-text);
  overflow-x: hidden;
  width: 248px;
}

#app .cb-sidebar > div {
  gap: 0;
  min-height: 100%;
  padding: 18px;
}

#app .cb-brand,
#app [data-theme="light"] .cb-brand {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--cb-green-deep);
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  min-height: 38px;
  padding: 2px 10px;
  text-transform: uppercase;
  width: 100%;
}

#app .cb-brand:hover,
#app [data-theme="light"] .cb-brand:hover {
  background: transparent;
  border: 0;
  color: var(--cb-green-strong);
}

#app .cb-brand-mark {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

#app .cb-brand strong {
  color: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

#app .cb-household-card {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: var(--cb-radius-md);
  box-shadow: var(--cb-shadow-soft);
  display: flex;
  gap: 12px;
  margin-top: 14px;
  min-height: 78px;
  padding: 12px;
}

#app .cb-household-card img {
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(16, 76, 60, 0.09);
  height: 42px;
  width: 42px;
}

#app .cb-household-card strong,
#app .cb-household-card span {
  display: block;
}

#app .cb-household-card strong {
  color: var(--cb-text);
  font-size: 14px;
}

#app .cb-household-card span {
  color: var(--cb-muted);
  font-size: 12px;
  margin-top: 4px;
}

#app .cb-navigation {
  gap: 8px;
  margin-top: 27px;
}

#app .cb-sidebar .nav-group {
  gap: 4px;
}

#app .cb-sidebar .nav-home,
#app .cb-sidebar .nav-subitem,
#app [data-theme="light"] .cb-sidebar .nav-home,
#app [data-theme="light"] .cb-sidebar .nav-subitem {
  background: transparent;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  gap: 12px;
  min-height: 38px;
  padding: 8px 11px;
}

#app .cb-sidebar .nav-home:hover,
#app .cb-sidebar .nav-subitem:hover,
#app [data-theme="light"] .cb-sidebar .nav-home:hover,
#app [data-theme="light"] .cb-sidebar .nav-subitem:hover {
  background: var(--cb-surface-subtle);
  color: var(--cb-green-deep);
}

#app .cb-sidebar .nav-home.bg-emerald-300,
#app .cb-sidebar .nav-subitem.bg-emerald-300,
#app [data-theme="light"] .cb-sidebar .nav-home.bg-emerald-300,
#app [data-theme="light"] .cb-sidebar .nav-subitem.bg-emerald-300 {
  background: linear-gradient(90deg, var(--cb-green-soft), rgba(229, 245, 239, 0.35));
  border-right: 2px solid var(--cb-green-strong);
  color: var(--cb-green-deep);
  font-weight: 700;
}

#app [data-theme="dark"] .cb-sidebar .nav-home,
#app [data-theme="dark"] .cb-sidebar .nav-subitem {
  color: #cbd5e1;
}

#app [data-theme="dark"] .cb-sidebar .nav-home.bg-emerald-300,
#app [data-theme="dark"] .cb-sidebar .nav-subitem.bg-emerald-300 {
  background: rgba(53, 167, 137, 0.16);
  color: #b9f3df;
}

#app .cb-sidebar .module-toggle,
#app [data-theme="light"] .cb-sidebar .module-toggle {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--cb-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  min-height: 32px;
  padding: 7px 8px;
  text-transform: uppercase;
}

#app .cb-sidebar .module-toggle:hover,
#app [data-theme="light"] .cb-sidebar .module-toggle:hover {
  background: transparent;
  border: 0;
  color: var(--cb-green-deep);
}

#app .cb-sidebar .module-toggle-active {
  border: 0;
  box-shadow: none;
}

#app .module-chevron {
  margin-left: auto;
  transition: transform 160ms ease;
}

#app .module-chevron.is-open {
  transform: rotate(180deg);
}

#app .cb-sidebar .nav-submenu {
  border: 0;
  gap: 2px;
  margin: 0;
  padding: 0;
}

#app .cb-sidebar .nav-utilities {
  border-top: 1px solid var(--cb-line);
  margin-top: 8px;
  padding-top: 13px;
}

#app .cb-sidebar .nav-group-label {
  color: var(--cb-muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.09em;
  padding: 0 8px 4px;
}

#app .cb-account-card,
#app [data-theme="light"] .cb-account-card {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: var(--cb-radius-md);
  box-shadow: var(--cb-shadow-soft);
  color: var(--cb-text);
  display: grid;
  gap: 10px;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  min-height: 78px;
  padding: 10px 12px;
  text-align: left;
  width: 100%;
}

#app .cb-mobile-month-selector {
  display: none;
}

#app .cb-account-card:hover,
#app [data-theme="light"] .cb-account-card:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line-strong);
  color: var(--cb-text);
}

#app .cb-account-avatar {
  align-items: center;
  background: linear-gradient(135deg, #11866b, #075b49);
  border-radius: 10px;
  box-shadow: 0 5px 12px rgba(8, 120, 95, 0.2);
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 750;
  height: 36px;
  justify-content: center;
  width: 36px;
}

#app .cb-account-copy {
  display: block;
  min-width: 0;
}

#app .cb-account-copy small,
#app .cb-account-copy strong,
#app .cb-account-copy em {
  display: block;
  font-style: normal;
}

#app .cb-account-copy small {
  color: var(--cb-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#app .cb-account-copy strong {
  color: var(--cb-text);
  font-size: 12px;
  margin-top: 2px;
}

#app .cb-account-copy em {
  color: var(--cb-green);
  font-size: 9px;
  margin-top: 4px;
}

#app .cb-account-copy i {
  background: var(--cb-green);
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  margin-left: 3px;
  width: 7px;
}

#app .cb-sidebar {
  overflow: visible;
}

#app .cb-account-slot,
#app .cb-account-menu-wrap {
  position: relative;
  z-index: 65;
}

#app .cb-account-card {
  cursor: pointer;
}

#app .cb-account-card:focus-visible,
#app .cb-account-menu :is(a, button):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cb-green) 32%, transparent);
  outline-offset: 2px;
}

#app .cb-account-chevron {
  transition: transform 160ms ease;
}

#app .cb-account-chevron.is-open {
  transform: rotate(180deg);
}

#app .cb-account-menu {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 15px;
  bottom: calc(100% + 11px);
  box-shadow: 0 18px 46px rgba(20, 42, 35, 0.2);
  color: var(--cb-text);
  left: 0;
  overflow: hidden;
  position: absolute;
  width: min(288px, calc(100vw - 32px));
  z-index: 80;
}

#app .cb-account-menu::after {
  background: var(--cb-surface);
  border-bottom: 1px solid var(--cb-line-strong);
  border-right: 1px solid var(--cb-line-strong);
  bottom: -6px;
  content: "";
  height: 12px;
  left: 24px;
  position: absolute;
  transform: rotate(45deg);
  width: 12px;
}

#app .cb-account-menu-head {
  align-items: center;
  display: grid;
  gap: 11px;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 17px 17px 14px;
}

#app .cb-account-menu-avatar {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 50%;
  color: var(--cb-green-deep);
  display: inline-flex;
  font-size: 16px;
  font-weight: 750;
  height: 42px;
  justify-content: center;
  width: 42px;
}

#app .cb-account-menu-head > span:last-child,
#app .cb-account-menu-head strong,
#app .cb-account-menu-head small {
  display: block;
  min-width: 0;
}

#app .cb-account-menu-head strong {
  color: var(--cb-text);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .cb-account-menu-head small {
  color: var(--cb-muted);
  font-size: 11px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .cb-account-menu-items,
#app .cb-account-menu-logout {
  border-top: 1px solid var(--cb-line);
  display: grid;
  gap: 3px;
  padding: 8px;
}

#app .cb-account-menu :is(a, button) {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--cb-text);
  display: flex;
  font-size: 12px;
  font-weight: 600;
  gap: 10px;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 10px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

#app .cb-account-menu :is(a, button):hover {
  background: var(--cb-surface-subtle);
  color: var(--cb-green-deep);
}

#app .cb-account-menu-logout a {
  color: var(--cb-rose);
}

#app .cb-account-menu-logout a:hover {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app [data-theme="dark"] .cb-account-menu {
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
}

#app .cb-sidebar-backdrop {
  background: rgba(15, 23, 42, 0.38);
  border: 0;
  border-radius: 0;
  inset: 0;
  min-height: 100vh;
  padding: 0;
  position: fixed;
  width: 100%;
  z-index: 35;
}

#app main {
  background: var(--cb-bg);
  margin-left: 248px;
}

#app main > header {
  background: color-mix(in srgb, var(--cb-surface) 94%, transparent);
  border-bottom: 1px solid var(--cb-line);
  box-shadow: none;
}

#app main > header > div {
  min-height: 65px;
  padding: 0 27px;
}

#app .header-context {
  display: none;
}

#app .header-context.is-visible {
  display: block;
}

#app .header-context.is-visible p {
  display: none;
}

#app .header-context.is-visible h2 {
  color: var(--cb-text);
  font-size: 13px;
  margin: 0;
}

#app .header-actions {
  gap: 8px;
  margin-left: auto;
  order: 1;
}

#app .header-month-row {
  margin-left: 18px;
  order: 2;
}

#app .notification-button,
#app .theme-icon-button,
#app .month-step,
#app [data-theme="light"] .notification-button,
#app [data-theme="light"] .theme-icon-button,
#app [data-theme="light"] .month-step {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 11px;
  box-shadow: none;
  color: var(--cb-text);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  width: 40px;
}

#app .notification-button:hover,
#app .theme-icon-button:hover,
#app .month-step:hover,
#app [data-theme="light"] .notification-button:hover,
#app [data-theme="light"] .theme-icon-button:hover,
#app [data-theme="light"] .month-step:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .header-primary-action,
#app [data-theme="light"] .header-primary-action {
  align-items: center;
  background: linear-gradient(135deg, #078469, #086852);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 5px 12px rgba(8, 120, 95, 0.18);
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
}

#app .header-primary-action:hover,
#app [data-theme="light"] .header-primary-action:hover {
  background: linear-gradient(135deg, #08765f, #075845);
  border: 0;
  color: #fff;
}

#app .month-toolbar,
#app [data-theme="light"] .month-toolbar {
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 5px;
  padding: 0;
}

#app .month-current-control,
#app [data-theme="light"] .month-current-control {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 11px;
  display: flex;
  gap: 5px;
  height: 40px;
  padding: 0 10px 0 2px;
}

#app .month-current-select,
#app [data-theme="light"] .month-current-select {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--cb-text);
  font-size: 13px;
  font-weight: 650;
  min-height: 36px;
  min-width: 128px;
  padding: 7px 10px;
  width: 128px;
}

#app .month-current-select:focus {
  box-shadow: none;
}

#app .month-create-toggle,
#app [data-theme="light"] .month-create-toggle {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 11px;
  color: var(--cb-green-deep);
  font-size: 12px;
  font-weight: 650;
  min-height: 40px;
  padding: 0 17px;
}

#app .month-create-toggle:hover,
#app [data-theme="light"] .month-create-toggle:hover {
  background: var(--cb-green-soft);
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .month-create-form {
  left: auto;
  position: absolute;
  right: 24px;
  top: 58px;
  z-index: 100;
}

#app main > div {
  margin: 0 auto;
  max-width: 1450px;
  padding: 28px 36px 34px;
}

#app .cb-page {
  display: grid;
  gap: 18px;
}

#app .cb-page-heading {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: block;
  padding: 0 0 2px;
}

#app .cb-page-heading .cb-eyebrow {
  color: var(--cb-green-deep);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.17em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

#app .cb-page-heading h3,
#app [data-theme="light"] .cb-page-heading h3 {
  color: var(--cb-text);
  font-size: clamp(34px, 3.2vw, 46px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
}

#app .cb-page-heading > p:not(.cb-eyebrow),
#app .cb-page-heading > div > p:not(.cb-eyebrow) {
  color: var(--cb-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 9px 0 0;
  max-width: 670px;
}

#app .cb-page-heading-inline {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
}

#app .cb-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

#app .cb-button,
#app [data-theme="light"] .cb-button {
  align-items: center;
  border-radius: 9px;
  box-shadow: none;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
}

#app .cb-button-primary,
#app [data-theme="light"] .cb-button-primary {
  background: linear-gradient(135deg, #078469, #086852);
  border: 1px solid #08755d;
  color: #fff;
}

#app .cb-button-primary:hover,
#app [data-theme="light"] .cb-button-primary:hover {
  background: #086852;
  border-color: #086852;
  color: #fff;
}

#app .cb-button-secondary,
#app .cb-button-ghost,
#app [data-theme="light"] .cb-button-secondary,
#app [data-theme="light"] .cb-button-ghost {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  color: var(--cb-text);
}

#app .cb-button-secondary:hover,
#app .cb-button-ghost:hover,
#app [data-theme="light"] .cb-button-secondary:hover,
#app [data-theme="light"] .cb-button-ghost:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .cb-card,
#app [data-theme="light"] .cb-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
}

#app .cb-balance-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 0.9fr 1.15fr 1.15fr;
  min-height: 120px;
  padding: 20px 24px;
}

#app .cb-balance-main span,
#app .cb-balance-main strong {
  display: block;
}

#app .cb-balance-main > span {
  color: var(--cb-text);
  font-size: 14px;
  font-weight: 600;
}

#app .cb-balance-main strong {
  font-size: 27px;
  letter-spacing: -0.02em;
  margin-top: 12px;
}

#app .is-positive {
  color: var(--cb-green-deep) !important;
}

#app .is-negative {
  color: var(--cb-rose) !important;
}

#app .cb-balance-detail {
  align-items: center;
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-md);
  display: flex;
  gap: 16px;
  min-height: 76px;
  padding: 14px 18px;
  position: relative;
}

#app .cb-balance-detail + .cb-balance-detail::before {
  background: var(--cb-line);
  content: "";
  height: 30px;
  left: -10px;
  position: absolute;
  width: 1px;
}

#app .cb-balance-detail small,
#app .cb-balance-detail strong {
  display: block;
}

#app .cb-balance-detail small {
  color: var(--cb-muted);
  font-size: 12px;
}

#app .cb-balance-detail strong {
  font-size: 16px;
  margin-top: 5px;
}

#app .cb-balance-detail.is-income strong,
#app .cb-balance-detail.is-income .cb-icon-box {
  color: var(--cb-green-deep);
}

#app .cb-balance-detail.is-expense strong,
#app .cb-balance-detail.is-expense .cb-icon-box {
  color: var(--cb-rose);
}

#app .cb-icon-box {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 11px;
  color: var(--cb-green-deep);
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  width: 44px;
}

#app .cb-balance-detail.is-expense .cb-icon-box,
#app .tone-rose {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .tone-green {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .tone-amber {
  background: var(--cb-amber-soft);
  color: var(--cb-amber);
}

#app .tone-blue {
  background: var(--cb-blue-soft);
  color: var(--cb-blue);
}

#app .cb-stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#app .cb-stat {
  align-items: center;
  display: flex;
  gap: 15px;
  min-height: 105px;
  min-width: 0;
  padding: 17px 19px;
}

#app .cb-stat-copy,
#app .cb-stat-copy small,
#app .cb-stat-copy strong,
#app .cb-stat-copy em {
  display: block;
  min-width: 0;
}

#app .cb-stat-copy small {
  color: var(--cb-muted);
  font-size: 11px;
}

#app .cb-stat-copy strong {
  color: var(--cb-text);
  font-size: clamp(17px, 1.6vw, 21px);
  letter-spacing: -0.015em;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

#app .cb-stat-copy em {
  color: var(--cb-muted);
  font-size: 11px;
  font-style: normal;
  margin-top: 5px;
}

#app .cb-dashboard-grid,
#app .cb-annual-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-panel {
  min-height: 390px;
  min-width: 0;
  padding: 18px;
}

#app .cb-panel-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 15px;
}

#app .cb-panel-head h3,
#app [data-theme="light"] .cb-panel-head h3 {
  color: var(--cb-text);
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
}

#app .cb-panel-head p {
  color: var(--cb-muted);
  font-size: 11px;
  margin: 4px 0 0;
}

#app .cb-panel-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#app .cb-badge {
  background: var(--cb-green-soft);
  border: 0;
  border-radius: 999px;
  color: var(--cb-green-deep);
  display: inline-flex;
  font-size: 9px;
  font-weight: 650;
  padding: 5px 9px;
}

#app .cb-select-button,
#app [data-theme="light"] .cb-select-button {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 8px;
  color: var(--cb-text);
  display: inline-flex;
  font-size: 10px;
  gap: 7px;
  min-height: 29px;
  padding: 0 10px;
}

#app .cb-link-button,
#app [data-theme="light"] .cb-link-button {
  background: transparent;
  border: 0;
  color: var(--cb-green-deep);
  font-size: 11px;
  min-height: auto;
  padding: 4px 0;
}

#app .cb-budget-list {
  display: grid;
  gap: 18px;
  padding: 12px 2px;
}

#app .cb-budget-row > div:first-child {
  align-items: center;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
}

#app .cb-budget-row small {
  color: var(--cb-muted);
  font-size: inherit;
}

#app .cb-progress {
  background: var(--cb-surface-subtle);
  border-radius: 999px;
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
}

#app .cb-progress > span {
  border-radius: inherit;
  display: block;
  height: 100%;
}

#app .cb-empty-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  padding: 30px 20px;
  text-align: center;
}

#app .cb-empty-visual {
  align-items: center;
  background: linear-gradient(180deg, #dff3eb, #a9dfc9);
  border-radius: 13px;
  color: var(--cb-green-deep);
  display: inline-flex;
  height: 70px;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  width: 92px;
}

#app .cb-empty-visual::before {
  background: var(--cb-surface);
  border: 1px solid #9bcdbb;
  border-radius: 6px;
  content: "";
  height: 34px;
  left: 12px;
  position: absolute;
  top: -9px;
  width: 66px;
}

#app .cb-empty-visual .ui-icon {
  position: relative;
  z-index: 1;
}

#app .cb-empty-state > strong {
  color: var(--cb-text);
  font-size: 14px;
}

#app .cb-empty-state p {
  color: var(--cb-muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px auto 17px;
  max-width: 300px;
}

#app .cb-empty-state-compact {
  min-height: 235px;
  padding: 20px;
}

#app .cb-empty-state-compact .cb-empty-visual {
  height: 58px;
  margin-bottom: 14px;
  width: 76px;
}

#app .cb-transaction-list {
  display: grid;
  gap: 5px;
}

#app .cb-transaction-row,
#app [data-theme="light"] .cb-transaction-row {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: 11px;
  box-shadow: var(--cb-shadow-soft);
  color: var(--cb-text);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) auto 14px;
  min-height: 43px;
  padding: 5px 9px 5px 6px;
  text-align: left;
  width: 100%;
}

#app .cb-transaction-row:hover,
#app [data-theme="light"] .cb-transaction-row:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line-strong);
  color: var(--cb-text);
}

#app .cb-transaction-icon {
  align-items: center;
  background: var(--cb-rose-soft);
  border-radius: 9px;
  color: var(--cb-rose);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

#app .cb-transaction-icon.is-income {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .cb-transaction-copy {
  min-width: 0;
}

#app .cb-transaction-copy strong,
#app .cb-transaction-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .cb-transaction-copy strong {
  color: var(--cb-text);
  font-size: 11px;
}

#app .cb-transaction-copy small {
  color: var(--cb-muted);
  font-size: 9px;
  margin-top: 2px;
}

#app .cb-transaction-amount {
  font-size: 11px;
  white-space: nowrap;
}

#app .cb-transaction-amount.is-income {
  color: var(--cb-green-deep);
}

#app .cb-transaction-amount.is-expense {
  color: var(--cb-text);
}

#app .cb-row-chevron {
  color: #96a3ac;
}

#app .cb-panel-footer-link,
#app [data-theme="light"] .cb-panel-footer-link {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--cb-green-deep);
  display: inline-flex;
  font-size: 11px;
  gap: 8px;
  margin-top: 15px;
  min-height: 28px;
  padding: 0;
}

#app .cb-panel-footer-link .ui-icon {
  transform: rotate(45deg);
}

#app .cb-chart-panel {
  min-height: 430px;
}

#app .cb-annual-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#app .cb-year-picker {
  align-items: center;
  display: flex;
  gap: 5px;
}

#app .cb-year-picker > button,
#app [data-theme="light"] .cb-year-picker > button {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 9px;
  color: var(--cb-text);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  width: 38px;
}

#app .cb-year-picker label {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 9px;
  display: flex;
  height: 40px;
  padding: 0 5px 0 11px;
}

#app .cb-year-picker label > span {
  color: var(--cb-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#app .cb-year-picker select,
#app [data-theme="light"] .cb-year-picker select {
  background: transparent;
  border: 0;
  color: var(--cb-text);
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 5px 8px;
  width: 76px;
}

#app .cb-annual-dashboard-grid {
  align-items: stretch;
  display: grid;
  gap: 15px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
}

#app .cb-annual-left-column {
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto;
  min-width: 0;
}

#app .cb-annual-flow-panel,
#app .cb-annual-finance-panel,
#app .cb-annual-results-panel {
  min-width: 0;
}

#app .cb-annual-flow-panel {
  min-height: 435px;
  padding: 16px;
}

#app .cb-annual-finance-panel {
  min-height: 100%;
  padding: 16px;
}

#app .cb-annual-results-panel {
  min-height: 220px;
  padding: 15px 16px 9px;
}

#app .cb-panel-head-wrap {
  flex-wrap: wrap;
}

#app .cb-annual-panel-tools {
  align-items: center;
  display: flex;
  gap: 10px;
}

#app .cb-currency-toggle,
#app .cb-more-button {
  align-items: center;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 8px;
  color: var(--cb-green-deep);
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  height: 32px;
  justify-content: center;
  width: 32px;
}

#app .cb-more-button {
  background: transparent;
  border-color: transparent;
  color: var(--cb-text);
  letter-spacing: 0.08em;
  transform: rotate(90deg);
}

#app .cb-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#app .cb-chart-legend span {
  align-items: center;
  color: var(--cb-muted);
  display: inline-flex;
  font-size: 9px;
  gap: 5px;
}

#app .cb-chart-legend i {
  background: currentColor;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

#app .cb-chart-legend .is-income { color: var(--cb-green); }
#app .cb-chart-legend .is-expense { color: var(--cb-rose); }
#app .cb-chart-legend .is-savings { color: var(--cb-blue); }

#app .cb-annual-message {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 9px;
  color: var(--cb-green-deep);
  display: flex;
  font-size: 10px;
  gap: 12px;
  line-height: 1.4;
  margin-top: 12px;
  min-height: 46px;
  padding: 10px 14px;
}

#app .cb-annual-message.is-negative {
  background: var(--cb-rose-soft);
  color: var(--cb-rose) !important;
}

#app .cb-annual-results-list {
  border-top: 1px solid var(--cb-line);
}

#app .cb-annual-result-row,
#app [data-theme="light"] .cb-annual-result-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--cb-line);
  border-radius: 0;
  color: var(--cb-text);
  display: grid;
  font-size: 10px;
  gap: 10px;
  grid-template-columns: minmax(110px, 1fr) minmax(85px, auto) 78px 16px;
  min-height: 32px;
  padding: 5px 2px;
  text-align: left;
  width: 100%;
}

#app .cb-annual-result-row:hover,
#app [data-theme="light"] .cb-annual-result-row:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line);
  color: var(--cb-text);
}

#app .cb-annual-result-row strong {
  font-size: 11px;
  text-align: right;
}

#app .cb-annual-result-row em {
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 650;
  justify-self: end;
  padding: 4px 9px;
  text-align: center;
}

#app .cb-annual-result-row em.is-surplus {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .cb-annual-result-row em.is-deficit {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-annual-result-row em.is-balanced {
  background: var(--cb-surface-subtle);
  color: var(--cb-muted);
}

#app .cb-annual-result-row.is-untracked {
  color: var(--cb-muted);
}

#app .cb-annual-result-row.is-untracked strong {
  color: var(--cb-muted) !important;
}

#app .cb-annual-result-row em.is-untracked {
  background: var(--cb-surface-subtle);
  color: var(--cb-muted);
}

#app .cb-annual-results-footer,
#app [data-theme="light"] .cb-annual-results-footer {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--cb-green-deep);
  display: flex;
  font-size: 9px;
  gap: 8px;
  justify-content: center;
  margin: 5px auto 0;
  min-height: 26px;
  padding: 2px 8px;
}

#app .cb-annual-results-footer .ui-icon {
  transition: transform 160ms ease;
}

#app .cb-annual-results-footer .ui-icon.is-expanded {
  transform: rotate(180deg);
}

#app .cb-annual-results-empty {
  color: var(--cb-muted);
  font-size: 11px;
  padding: 44px 12px;
  text-align: center;
}

#app .cb-annual-line-wrap {
  min-width: 0;
}

#app .cb-line-month-labels {
  display: flex;
  justify-content: space-between;
  padding: 7px 11px 0 25px;
}

#app .cb-line-month-labels span {
  color: var(--cb-text);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

#app .cb-annual-month-list {
  display: grid;
  gap: 1px;
  margin-top: 14px;
}

#app .cb-annual-month-list > div {
  align-items: center;
  border-top: 1px solid var(--cb-line);
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  padding: 9px 2px;
}

#app [data-theme="light"] .annual-bar-pair,
#app [data-theme="light"] .annual-line-chart {
  background-color: var(--cb-surface-subtle);
  border-color: var(--cb-line);
  box-shadow: none;
}

#app .annual-bars {
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 49px, var(--cb-line) 50px);
  gap: 5px;
  grid-template-columns: repeat(12, minmax(28px, 1fr));
  min-height: 278px;
  overflow: hidden;
}

#app .annual-bar-pair {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed #aebbc2;
  border-radius: 0;
  gap: 3px;
  height: 245px;
  padding: 8px 2px 0;
  position: relative;
}

#app [data-theme="light"] .annual-bar-pair {
  background: transparent;
  border-color: #aebbc2;
  box-shadow: none;
}

#app .annual-bar {
  border-radius: 4px 4px 0 0;
  width: 7px;
}

#app .annual-bar.savings {
  background: linear-gradient(180deg, #7ab5ff, #2d7ef2);
}

#app .annual-bar-group {
  gap: 7px;
}

#app .annual-bar-group.is-empty .annual-bar-pair {
  border: 1px dashed #c4ced3;
  border-bottom-style: dashed;
  border-radius: 6px 6px 0 0;
  height: 96px;
  margin-top: auto;
  opacity: 0.85;
  width: 22px;
}

#app [data-theme="light"] .annual-bar-group.is-empty .annual-bar-pair {
  background: transparent;
  border-color: #c4ced3;
}

#app .annual-bar-group.is-empty .annual-bar {
  display: none;
}

#app .annual-insights {
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

#app .cb-annual-finance-panel .annual-line-chart {
  height: 250px;
}

#app .cb-annual-finance-panel .chart-line {
  filter: none;
  stroke-width: 2.5;
}

#app .cb-annual-finance-panel .chart-dot {
  stroke-width: 2.5;
}

#app .annual-insight,
#app [data-theme="light"] .annual-insight {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line);
  border-radius: 10px;
  box-shadow: none;
  align-items: center;
  display: flex;
  gap: 11px;
  min-height: 92px;
  padding: 12px;
}

#app .annual-insight .cb-icon-box {
  align-items: center;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

#app .annual-insight .cb-icon-box.tone-green {
  color: var(--cb-green-deep);
}

#app .annual-insight .cb-icon-box.tone-rose {
  color: var(--cb-rose);
}

#app .cb-annual-insight-copy {
  min-width: 0;
}

#app .annual-insight .cb-annual-insight-copy small,
#app .annual-insight .cb-annual-insight-copy strong,
#app .annual-insight .cb-annual-insight-copy em {
  display: block;
  font-style: normal;
}

#app .annual-insight .cb-annual-insight-copy small,
#app .annual-insight .cb-annual-insight-copy em {
  color: var(--cb-muted);
  font-size: 9px;
}

#app .annual-insight .cb-annual-insight-copy strong {
  font-size: 15px;
  margin-top: 5px;
}

#app .annual-insight .cb-annual-insight-copy em {
  margin-top: 4px;
}

@media (max-width: 1200px) {
  #app .cb-annual-dashboard-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-annual-finance-panel {
    min-height: 540px;
  }
}

@media (max-width: 1260px) {
  #app .cb-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .cb-dashboard-grid,
  #app .cb-annual-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-panel {
    min-height: 360px;
  }

  #app .cb-balance-card {
    grid-template-columns: 0.75fr 1fr 1fr;
  }
}

@media (max-width: 1023px) {
  #app .cb-sidebar {
    transform: translateX(-100%);
  }

  #app .cb-sidebar.translate-x-0 {
    transform: translateX(0);
  }

  #app .cb-mobile-month-selector {
    background: var(--cb-surface-subtle);
    border: 1px solid var(--cb-line);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    margin: 0 12px 14px;
    padding: 11px 12px;
  }

  #app .cb-mobile-month-selector > span:first-child {
    align-items: center;
    color: var(--cb-muted);
    display: flex;
    font-size: 10px;
    font-weight: 700;
    gap: 7px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  #app .cb-mobile-month-field {
    align-items: center;
    background: var(--cb-surface);
    border: 1px solid var(--cb-line-strong);
    border-radius: 9px;
    color: var(--cb-green-deep);
    display: flex;
    min-height: 42px;
    padding: 0 10px;
  }

  #app .cb-mobile-month-field select {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--cb-text);
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 700;
    min-width: 0;
    outline: 0;
    padding: 8px 4px;
  }

  #app .cb-mobile-month-field .ui-icon {
    flex: 0 0 auto;
    pointer-events: none;
  }

  #app main {
    margin-left: 0;
  }

  #app main > header > div {
    flex-wrap: nowrap;
    min-height: 64px;
    padding: 10px 18px;
  }

  #app .header-context {
    display: block;
    margin-left: 10px;
  }

  #app .header-context p {
    display: none;
  }

  #app .header-context h2 {
    color: var(--cb-text);
    font-size: 15px;
    white-space: nowrap;
  }

  #app .header-month-row {
    flex: 0 1 auto;
    margin-left: 12px;
    order: 2;
    width: auto;
  }

  #app .month-toolbar {
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
  }

  #app .month-current-control {
    align-items: center;
    flex: none;
    flex-direction: row;
  }

  #app .month-create-form {
    align-items: stretch;
    right: 16px;
    top: 58px;
    width: min(330px, calc(100vw - 32px));
  }

  #app main > div {
    padding: 25px 24px 32px;
  }
}

@media (max-width: 640px) {
  #app main > header > div {
    flex-wrap: nowrap;
    min-height: 60px;
    padding: 8px 12px;
  }

  #app .header-context,
  #app .header-context.is-visible,
  #app .header-month-row,
  #app .header-primary-action {
    display: none;
  }

  #app .header-actions {
    gap: 7px;
    margin-left: auto;
    order: 1;
    width: auto;
  }

  #app .notification-wrap,
  #app .theme-icon-button {
    flex: 0 0 40px;
  }

  #app .notification-button,
  #app .theme-icon-button {
    height: 40px;
    min-height: 40px;
    width: 40px;
  }
}

@media (max-width: 800px) {
  #app main > header > div {
    flex-wrap: wrap;
  }

  #app .header-actions {
    margin-left: auto;
  }

  #app .header-month-row {
    flex: 1 1 100%;
    margin: 8px 0 0;
  }

  #app .month-toolbar {
    width: 100%;
  }

  #app .month-current-control {
    flex: 1 1 auto;
  }

  #app .month-current-select {
    min-width: 0;
    width: 100%;
  }

  #app .cb-balance-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .cb-balance-main {
    grid-column: 1 / -1;
  }

  #app .cb-balance-main strong {
    margin-top: 6px;
  }

  #app .cb-balance-detail + .cb-balance-detail::before {
    display: none;
  }

  #app .cb-page-heading-inline {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  #app .annual-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #app main > header > div {
    gap: 8px;
    padding: 9px 12px;
  }

  #app .header-context {
    display: none;
  }

  #app .header-context.is-visible {
    display: none;
  }

  #app .header-actions {
    gap: 6px;
    order: 1;
    width: auto;
  }

  #app .notification-wrap,
  #app .theme-icon-button {
    flex: 0 0 38px;
  }

  #app .notification-button,
  #app .theme-icon-button {
    height: 38px;
    min-height: 38px;
    width: 38px;
  }

  #app .header-primary-action {
    flex: 0 1 auto;
    font-size: 0;
    min-height: 38px;
    min-width: 42px;
    padding: 0 12px;
  }

  #app .header-primary-action .ui-icon {
    height: 19px;
    width: 19px;
  }

  #app .header-month-row {
    order: 2;
  }

  #app .month-create-toggle {
    font-size: 0;
    min-width: 40px;
    padding: 0 10px;
  }

  #app .month-create-toggle::after {
    content: "+";
    font-size: 20px;
  }

  #app main > div {
    padding: 21px 14px 28px;
  }

  #app .cb-page {
    gap: 14px;
  }

  #app .cb-page-heading h3,
  #app [data-theme="light"] .cb-page-heading h3 {
    font-size: 34px;
  }

  #app .cb-page-heading > p:not(.cb-eyebrow),
  #app .cb-page-heading > div > p:not(.cb-eyebrow) {
    font-size: 12px;
  }

  #app .cb-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 18px;
  }

  #app .cb-page-actions .cb-button:first-child {
    grid-column: 1 / -1;
  }

  #app .cb-balance-card,
  #app .cb-stats-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-balance-card {
    gap: 10px;
    padding: 17px;
  }

  #app .cb-balance-detail {
    min-height: 68px;
  }

  #app .cb-stat {
    min-height: 88px;
  }

  #app .cb-panel {
    min-height: 0;
    padding: 15px;
  }

  #app .cb-panel-head {
    align-items: flex-start;
  }

  #app .cb-empty-state {
    min-height: 280px;
    padding-left: 10px;
    padding-right: 10px;
  }

  #app .cb-transaction-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  #app .cb-row-chevron {
    display: none;
  }

  #app .cb-transaction-amount {
    font-size: 10px;
  }

  #app .annual-insights {
    grid-template-columns: 1fr;
  }
}

/* Monthly operations -------------------------------------------------------- */
#app .cb-monthly-page {
  gap: 20px;
}

#app .cb-monthly-heading {
  align-items: center;
}

#app .cb-monthly-heading h3,
#app [data-theme="light"] .cb-monthly-heading h3 {
  font-size: clamp(26px, 2.5vw, 34px);
  letter-spacing: -0.025em;
}

#app .cb-monthly-heading > div > p {
  font-size: 14px;
  margin-top: 7px;
}

#app .cb-monthly-actions {
  display: flex;
  gap: 10px;
}

#app .cb-monthly-income-action,
#app [data-theme="light"] .cb-monthly-income-action {
  background: var(--cb-surface);
  border: 1px solid var(--cb-green);
  color: var(--cb-green-deep);
  min-width: 116px;
}

#app .cb-monthly-income-action:hover,
#app [data-theme="light"] .cb-monthly-income-action:hover {
  background: var(--cb-green-soft);
  border-color: var(--cb-green-deep);
  color: var(--cb-green-deep);
}

#app .cb-monthly-expense-action,
#app [data-theme="light"] .cb-monthly-expense-action {
  background: linear-gradient(135deg, #ef4762, #d92f4d);
  border: 1px solid #db3853;
  box-shadow: 0 5px 13px rgba(217, 47, 77, 0.16);
  color: #ffffff;
  min-width: 116px;
}

#app .cb-monthly-expense-action:hover,
#app [data-theme="light"] .cb-monthly-expense-action:hover {
  background: #d92f4d;
  border-color: #ca2945;
  color: #ffffff;
}

#app .cb-monthly-kpi-grid {
  gap: 16px;
}

#app .cb-monthly-kpi {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 112px;
  overflow: hidden;
  padding: 18px 17px 22px;
  position: relative;
}

#app .cb-monthly-kpi .cb-icon-box {
  height: 48px;
  width: 48px;
}

#app .tone-neutral {
  background: #edf1f4;
  color: #526678;
}

#app [data-theme="dark"] .tone-neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #c5d0d8;
}

#app .cb-monthly-kpi-copy small,
#app .cb-monthly-kpi-copy strong {
  display: block;
}

#app .cb-monthly-kpi-copy small {
  color: var(--cb-muted);
  font-size: 11px;
}

#app .cb-monthly-kpi-copy strong {
  color: var(--cb-text);
  font-size: clamp(19px, 1.8vw, 23px);
  letter-spacing: -0.015em;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

#app .cb-monthly-kpi.is-income .cb-monthly-kpi-copy strong {
  color: var(--cb-green-deep);
}

#app .cb-monthly-kpi.is-expense .cb-monthly-kpi-copy strong {
  color: var(--cb-rose);
}

#app .cb-monthly-kpi > i {
  background: var(--cb-line-strong);
  bottom: 14px;
  height: 2px;
  left: 17px;
  position: absolute;
  right: 17px;
}

#app .cb-monthly-kpi > i::before {
  background: #8191a0;
  content: "";
  display: block;
  height: 100%;
  width: 32%;
}

#app .cb-monthly-kpi.is-income > i::before { background: var(--cb-green); }
#app .cb-monthly-kpi.is-expense > i::before { background: var(--cb-rose); }

#app .cb-monthly-section,
#app [data-theme="light"] .cb-monthly-section {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  padding: 18px;
}

#app .cb-monthly-section-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 15px;
}

#app .cb-monthly-section-head > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#app .cb-monthly-section-head h3,
#app [data-theme="light"] .cb-monthly-section-head h3 {
  color: var(--cb-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

#app .cb-monthly-section-head > span {
  color: var(--cb-muted);
  font-size: 11px;
}

#app .cb-monthly-section-head > strong {
  font-size: 15px;
}

#app .cb-monthly-recurring-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-recurring-card,
#app [data-theme="light"] .cb-recurring-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 12px;
  box-shadow: none;
  min-width: 0;
  overflow: hidden;
}

#app .cb-recurring-card.is-income {
  border-color: color-mix(in srgb, var(--cb-green) 34%, var(--cb-line));
}

#app .cb-recurring-card.is-expense {
  border-color: color-mix(in srgb, var(--cb-rose) 30%, var(--cb-line));
}

#app .cb-recurring-card > header {
  align-items: center;
  background: var(--cb-surface-subtle);
  border-bottom: 1px solid var(--cb-line);
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  padding: 9px 14px;
}

#app .cb-recurring-card > header strong,
#app .cb-recurring-card > header b {
  font-size: 12px;
}

#app .cb-recurring-card.is-income > header b,
#app .cb-recurring-card.is-income .cb-recurring-row > b {
  color: var(--cb-green-deep);
}

#app .cb-recurring-card.is-expense > header b,
#app .cb-recurring-card.is-expense .cb-recurring-row > b {
  color: var(--cb-rose);
}

#app .cb-recurring-list {
  display: grid;
  gap: 1px;
  max-height: 190px;
  overflow-y: auto;
}

#app .cb-recurring-row {
  align-items: center;
  border-top: 1px solid var(--cb-line);
  display: grid;
  gap: 11px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 56px;
  padding: 8px 13px;
}

#app .cb-recurring-row:first-child {
  border-top: 0;
}

#app .cb-recurring-row .cb-icon-box {
  height: 34px;
  width: 34px;
}

#app .cb-recurring-row > span:nth-child(2) {
  min-width: 0;
}

#app .cb-recurring-row > span:nth-child(2) strong,
#app .cb-recurring-row > span:nth-child(2) small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .cb-recurring-row > span:nth-child(2) strong,
#app .cb-recurring-row > b {
  font-size: 11px;
}

#app .cb-recurring-row > span:nth-child(2) small {
  color: var(--cb-muted);
  font-size: 9px;
  margin-top: 3px;
}

#app .cb-recurring-empty {
  align-items: center;
  color: var(--cb-muted);
  display: flex;
  font-size: 11px;
  gap: 14px;
  min-height: 80px;
  padding: 15px;
}

#app .cb-recurring-empty .cb-icon-box {
  height: 40px;
  width: 40px;
}

#app .cb-operation-list {
  border: 1px solid var(--cb-line);
  border-radius: 12px;
  overflow: hidden;
}

#app .cb-operation-row,
#app [data-theme="light"] .cb-operation-row {
  align-items: center;
  background: var(--cb-surface);
  border: 0;
  border-bottom: 1px solid var(--cb-line);
  border-left: 3px solid var(--cb-rose);
  border-radius: 0;
  box-shadow: none;
  color: var(--cb-text);
  display: grid;
  gap: 13px;
  grid-template-columns: 67px 38px minmax(0, 1fr) auto 84px;
  min-height: 58px;
  padding: 7px 13px 7px 0;
}

#app .cb-operation-row:last-child {
  border-bottom: 0;
}

#app .cb-operation-row.is-income {
  border-left-color: var(--cb-green);
}

#app .cb-operation-date {
  align-items: center;
  align-self: stretch;
  border-right: 1px solid var(--cb-line);
  display: flex;
  flex-direction: column;
  font-style: normal;
  justify-content: center;
  text-align: center;
}

#app .cb-operation-date strong,
#app .cb-operation-date span {
  display: block;
}

#app .cb-operation-date strong {
  color: var(--cb-text);
  font-size: 13px;
}

#app .cb-operation-date span {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 3px;
  white-space: nowrap;
}

#app .cb-operation-icon {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

#app .cb-operation-icon.tone-green {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .cb-operation-icon.tone-rose {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-operation-copy {
  min-width: 0;
}

#app .cb-operation-copy strong,
#app .cb-operation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .cb-operation-copy strong {
  color: var(--cb-text);
  font-size: 12px;
}

#app .cb-operation-copy small {
  color: var(--cb-muted);
  font-size: 10px;
  margin-top: 4px;
}

#app .cb-operation-amount {
  font-size: 13px;
  white-space: nowrap;
}

#app .cb-operation-edit,
#app .cb-table-edit,
#app [data-theme="light"] .cb-operation-edit,
#app [data-theme="light"] .cb-table-edit {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 7px;
  color: #315449;
  font-size: 9px;
  min-height: 31px;
  padding: 5px 12px;
}

#app .cb-operation-edit:hover,
#app .cb-table-edit:hover,
#app [data-theme="light"] .cb-operation-edit:hover,
#app [data-theme="light"] .cb-table-edit:hover {
  background: var(--cb-green-soft);
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .cb-monthly-list-toggle,
#app [data-theme="light"] .cb-monthly-list-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--cb-green-deep);
  display: flex;
  font-size: 10px;
  gap: 8px;
  justify-content: center;
  margin: 8px auto 0;
  min-height: 28px;
  padding: 3px 10px;
}

#app .cb-monthly-list-toggle .ui-icon {
  transition: transform 160ms ease;
}

#app .cb-monthly-list-toggle .ui-icon.is-expanded {
  transform: rotate(180deg);
}

#app .cb-monthly-empty {
  align-items: center;
  color: var(--cb-muted);
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 28px;
  text-align: center;
}

#app .cb-monthly-empty > strong {
  color: var(--cb-text);
  font-size: 13px;
  margin-top: 12px;
}

#app .cb-monthly-empty p {
  font-size: 10px;
  margin: 7px 0 0;
}

#app .cb-monthly-details-section {
  padding: 0;
  overflow: hidden;
}

#app .cb-monthly-details-section > .cb-monthly-section-head {
  margin: 0;
  padding: 17px 18px 13px;
}

#app .cb-monthly-table-scroll {
  overflow-x: auto;
}

#app .cb-monthly-table {
  border-collapse: collapse;
  min-width: 840px;
  table-layout: fixed;
  width: 100%;
}

#app .cb-monthly-table th,
#app .cb-monthly-table td {
  border: 0;
  border-top: 1px solid var(--cb-line);
  padding: 8px 13px;
  vertical-align: middle;
}

#app .cb-monthly-table th {
  background: var(--cb-surface-subtle);
  color: var(--cb-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

#app .cb-monthly-table td {
  color: var(--cb-muted);
  font-size: 9px;
}

#app .cb-monthly-table tbody tr {
  background: var(--cb-surface);
  transition: background 120ms ease;
}

#app .cb-monthly-table tbody tr:hover {
  background: var(--cb-surface-subtle);
}

#app .cb-monthly-table th:nth-child(1),
#app .cb-monthly-table td:nth-child(1) { width: 130px; }
#app .cb-monthly-table th:nth-child(2),
#app .cb-monthly-table td:nth-child(2) { width: 280px; }
#app .cb-monthly-table th:nth-child(3),
#app .cb-monthly-table td:nth-child(3) { width: 105px; }
#app .cb-monthly-table th:nth-child(4),
#app .cb-monthly-table td:nth-child(4) { width: 160px; }
#app .cb-monthly-table th:nth-child(5),
#app .cb-monthly-table td:nth-child(5) { text-align: right; width: 125px; }
#app .cb-monthly-table th:nth-child(6),
#app .cb-monthly-table td:nth-child(6) { text-align: right; width: 175px; }

#app .cb-table-operation {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

#app .cb-table-operation .cb-operation-icon {
  height: 34px;
  width: 34px;
}

#app .cb-table-operation > span:last-child {
  min-width: 0;
}

#app .cb-table-operation strong,
#app .cb-table-operation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app .cb-table-operation strong {
  color: var(--cb-text);
  font-size: 10px;
}

#app .cb-table-operation small {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 3px;
}

#app .cb-type-badge {
  border-radius: 6px;
  display: inline-flex;
  font-size: 8px;
  font-weight: 650;
  padding: 5px 9px;
}

#app .cb-type-badge.is-income {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .cb-type-badge.is-expense {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-table-actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

#app .cb-table-delete,
#app [data-theme="light"] .cb-table-delete {
  background: var(--cb-surface);
  border: 1px solid color-mix(in srgb, var(--cb-rose) 45%, var(--cb-line));
  border-radius: 7px;
  color: var(--cb-rose);
  font-size: 9px;
  min-height: 31px;
  padding: 5px 10px;
}

#app .cb-table-delete:hover,
#app [data-theme="light"] .cb-table-delete:hover {
  background: var(--cb-rose-soft);
  border-color: var(--cb-rose);
  color: var(--cb-rose);
}

#app .cb-monthly-empty-table {
  min-height: 110px;
}

@media (max-width: 900px) {
  #app .cb-monthly-recurring-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-operation-row {
    grid-template-columns: 62px 36px minmax(0, 1fr) auto;
  }

  #app .cb-operation-edit {
    grid-column: 3 / -1;
    justify-self: end;
  }
}

@media (max-width: 560px) {
  #app .cb-monthly-heading {
    align-items: stretch;
  }

  #app .cb-monthly-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  #app .cb-monthly-income-action,
  #app .cb-monthly-expense-action {
    min-width: 0;
  }

  #app .cb-monthly-kpi-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-monthly-kpi {
    min-height: 94px;
  }

  #app .cb-monthly-section {
    padding: 14px;
  }

  #app .cb-monthly-section-head {
    align-items: flex-start;
  }

  #app .cb-operation-row {
    gap: 9px;
    grid-template-columns: 52px 34px minmax(0, 1fr) auto;
    padding-right: 8px;
  }

  #app .cb-operation-date {
    font-size: 9px;
  }

  #app .cb-operation-icon {
    height: 34px;
    width: 34px;
  }

  #app .cb-operation-copy strong {
    font-size: 11px;
  }

  #app .cb-operation-copy small {
    font-size: 8px;
  }

  #app .cb-operation-amount {
    font-size: 11px;
  }

  #app .cb-operation-edit {
    grid-column: 3 / -1;
  }

  #app .cb-monthly-details-section {
    padding: 0;
  }
}

/* Transaction modal --------------------------------------------------------- */
#app .cb-modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 20, 0.58);
  backdrop-filter: blur(5px);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 100;
}

#app .cb-transaction-modal,
#app [data-theme="light"] .cb-transaction-modal {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(15, 33, 27, 0.22);
  color: var(--cb-text);
  display: flex;
  flex-direction: column;
  margin: 0;
  max-height: min(92vh, 820px);
  max-width: 780px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

#app .cb-transaction-modal.is-income {
  max-width: 680px;
}

#app .cb-modal-header {
  align-items: center;
  border-bottom: 1px solid var(--cb-line);
  display: grid;
  gap: 13px;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  padding: 18px 20px;
}

#app .cb-modal-header > .cb-icon-box {
  height: 44px;
  width: 44px;
}

#app .cb-modal-header h3,
#app [data-theme="light"] .cb-modal-header h3 {
  color: var(--cb-text);
  font-size: 20px;
  font-weight: 740;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
}

#app .cb-modal-header p {
  color: var(--cb-muted);
  font-size: 10px;
  line-height: 1.4;
  margin: 5px 0 0;
}

#app .cb-modal-close,
#app [data-theme="light"] .cb-modal-close {
  align-items: center;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line-strong);
  border-radius: 10px;
  color: var(--cb-text);
  display: inline-flex;
  font-size: 20px;
  height: 38px;
  justify-content: center;
  min-height: 38px;
  padding: 0 0 2px;
  width: 38px;
}

#app .cb-modal-close:hover,
#app [data-theme="light"] .cb-modal-close:hover {
  background: var(--cb-rose-soft);
  border-color: color-mix(in srgb, var(--cb-rose) 34%, var(--cb-line));
  color: var(--cb-rose);
}

#app .cb-modal-body {
  display: grid;
  gap: 13px;
  overflow-y: auto;
  padding: 18px 20px;
  scrollbar-width: thin;
}

#app .cb-modal-section,
#app [data-theme="light"] .cb-modal-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#app .cb-modal-section-muted,
#app [data-theme="light"] .cb-modal-section-muted {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 13px;
  padding: 14px;
}

#app .cb-modal-section-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

#app .cb-modal-section-title strong {
  color: var(--cb-text);
  font-size: 11px;
}

#app .cb-modal-section-title span {
  color: var(--cb-muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#app .cb-transaction-form-grid {
  display: grid;
  gap: 13px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#app .cb-field > span:first-child,
#app .cb-participants-field legend {
  color: #43534d;
  font-size: 10px;
  font-weight: 620;
}

#app [data-theme="dark"] .cb-field > span:first-child,
#app [data-theme="dark"] .cb-participants-field legend {
  color: #bac5c0;
}

#app .cb-field-wide,
#app .cb-participants-field,
#app .cb-planned-field {
  grid-column: 1 / -1;
}

#app .cb-field input,
#app .cb-field select,
#app .cb-field textarea,
#app [data-theme="light"] .cb-field input,
#app [data-theme="light"] .cb-field select,
#app [data-theme="light"] .cb-field textarea {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 9px;
  color: var(--cb-text);
  font-size: 11px;
  min-height: 41px;
  outline: none;
  padding: 9px 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  width: 100%;
}

#app .cb-field textarea,
#app [data-theme="light"] .cb-field textarea {
  min-height: 76px;
  resize: vertical;
}

#app .cb-field input:hover,
#app .cb-field select:hover,
#app .cb-field textarea:hover {
  border-color: color-mix(in srgb, var(--cb-green) 42%, var(--cb-line));
}

#app .cb-field input:focus,
#app .cb-field select:focus,
#app .cb-field textarea:focus {
  border-color: var(--cb-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cb-green) 12%, transparent);
}

#app .cb-transaction-modal.is-expense .cb-field input:focus,
#app .cb-transaction-modal.is-expense .cb-field select:focus,
#app .cb-transaction-modal.is-expense .cb-field textarea:focus {
  border-color: color-mix(in srgb, var(--cb-rose) 65%, var(--cb-green));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cb-rose) 10%, transparent);
}

#app .cb-field input::placeholder,
#app .cb-field textarea::placeholder {
  color: color-mix(in srgb, var(--cb-muted) 70%, transparent);
}

#app [data-theme="light"] .cb-field input,
#app [data-theme="light"] .cb-field select,
#app [data-theme="light"] .cb-field textarea {
  color-scheme: light;
}

#app [data-theme="light"] .cb-field select option {
  background: #ffffff;
  color: #111827;
}

#app .cb-amount-field {
  align-items: center;
  display: flex;
  position: relative;
}

#app .cb-amount-field input {
  padding-right: 36px;
}

#app .cb-amount-field em {
  color: var(--cb-green-deep);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  pointer-events: none;
  position: absolute;
  right: 13px;
}

#app .cb-transaction-modal.is-expense .cb-amount-field em {
  color: var(--cb-rose);
}

#app .cb-planned-field {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 53px;
  padding: 9px 11px;
}

#app .cb-planned-field input,
#app .cb-participants-field input {
  accent-color: var(--cb-green-strong);
  flex: 0 0 auto;
  height: 16px;
  min-height: 16px;
  padding: 0;
  width: 16px;
}

#app .cb-planned-field span,
#app .cb-planned-field strong,
#app .cb-planned-field small {
  display: block;
}

#app .cb-planned-field strong {
  color: var(--cb-text);
  font-size: 10px;
}

#app .cb-planned-field small {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 3px;
}

#app .cb-participants-field {
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  margin: 0;
  padding: 10px;
}

#app .cb-participants-field legend {
  padding: 0 5px;
}

#app .cb-participants-field > div {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-participants-field label {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: 8px;
  color: var(--cb-text);
  display: flex;
  font-size: 9px;
  gap: 8px;
  padding: 8px;
}

#app .cb-modal-footer {
  align-items: center;
  background: var(--cb-surface-subtle);
  border-top: 1px solid var(--cb-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 20px;
}

#app .cb-modal-footer > div {
  display: flex;
  gap: 9px;
}

#app .cb-modal-delete,
#app .cb-modal-cancel,
#app .cb-modal-submit,
#app [data-theme="light"] .cb-modal-delete,
#app [data-theme="light"] .cb-modal-cancel,
#app [data-theme="light"] .cb-modal-submit {
  align-items: center;
  border-radius: 9px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 680;
  gap: 7px;
  justify-content: center;
  min-height: 39px;
  padding: 8px 14px;
}

#app .cb-modal-delete,
#app [data-theme="light"] .cb-modal-delete {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--cb-rose) 42%, var(--cb-line));
  color: var(--cb-rose);
}

#app .cb-modal-delete:hover,
#app [data-theme="light"] .cb-modal-delete:hover {
  background: var(--cb-rose-soft);
  border-color: var(--cb-rose);
  color: var(--cb-rose);
}

#app .cb-modal-cancel,
#app [data-theme="light"] .cb-modal-cancel {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  color: var(--cb-text);
}

#app .cb-modal-cancel:hover,
#app [data-theme="light"] .cb-modal-cancel:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .cb-modal-submit,
#app [data-theme="light"] .cb-modal-submit {
  background: linear-gradient(135deg, #16866d, #0b705a);
  border: 1px solid #0d755e;
  box-shadow: 0 4px 11px rgba(11, 112, 90, 0.15);
  color: #ffffff;
  min-width: 112px;
}

#app .cb-transaction-modal.is-expense .cb-modal-submit,
#app [data-theme="light"] .cb-transaction-modal.is-expense .cb-modal-submit {
  background: linear-gradient(135deg, #ef4762, #d92f4d);
  border-color: #d92f4d;
  box-shadow: 0 4px 11px rgba(217, 47, 77, 0.14);
}

#app .cb-modal-submit:hover,
#app [data-theme="light"] .cb-modal-submit:hover {
  filter: brightness(0.94);
  color: #ffffff;
}

@media (max-width: 640px) {
  #app .cb-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  #app .cb-transaction-modal,
  #app [data-theme="light"] .cb-transaction-modal {
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    max-height: 94vh;
  }

  #app .cb-modal-header {
    gap: 10px;
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    padding: 14px;
  }

  #app .cb-modal-header > .cb-icon-box {
    height: 38px;
    width: 38px;
  }

  #app .cb-modal-header h3 {
    font-size: 17px;
  }

  #app .cb-modal-close {
    height: 34px;
    min-height: 34px;
    width: 34px;
  }

  #app .cb-modal-body {
    padding: 14px;
  }

  #app .cb-transaction-form-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-field-wide,
  #app .cb-participants-field,
  #app .cb-planned-field {
    grid-column: auto;
  }

  #app .cb-participants-field > div {
    grid-template-columns: 1fr;
  }

  #app .cb-modal-footer {
    align-items: stretch;
    padding: 11px 14px max(11px, env(safe-area-inset-bottom));
  }

  #app .cb-modal-footer > div {
    margin-left: auto;
  }

  #app .cb-modal-delete,
  #app .cb-modal-cancel,
  #app .cb-modal-submit {
    padding-left: 11px;
    padding-right: 11px;
  }
}

@media (max-width: 430px) {
  #app .cb-modal-footer {
    flex-wrap: wrap;
  }

  #app .cb-modal-footer > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
    width: 100%;
  }

  #app .cb-modal-delete {
    width: 100%;
  }
}

/* Global search ------------------------------------------------------------- */
#app .cb-search-page {
  gap: 20px;
}

#app .cb-search-panel,
#app [data-theme="light"] .cb-search-panel {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  padding: 24px;
}

#app .cb-search-heading {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

#app .cb-search-heading h3,
#app [data-theme="light"] .cb-search-heading h3 {
  color: var(--cb-text);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

#app .cb-search-heading p {
  color: var(--cb-muted);
  font-size: 12px;
  margin: 9px 0 0;
}

#app .cb-search-reset,
#app [data-theme="light"] .cb-search-reset {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid color-mix(in srgb, var(--cb-green) 50%, var(--cb-line));
  border-radius: 9px;
  color: var(--cb-green-deep);
  display: inline-flex;
  font-size: 11px;
  gap: 8px;
  min-height: 40px;
  padding: 8px 15px;
}

#app .cb-search-reset:hover,
#app [data-theme="light"] .cb-search-reset:hover {
  background: var(--cb-green-soft);
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .cb-search-input {
  align-items: center;
  border: 1px solid var(--cb-line-strong);
  border-radius: 11px;
  color: var(--cb-green-deep);
  display: flex;
  gap: 12px;
  margin-top: 22px;
  min-height: 58px;
  padding: 0 15px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#app .cb-search-input:focus-within {
  border-color: var(--cb-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cb-green) 11%, transparent);
}

#app .cb-search-input input,
#app [data-theme="light"] .cb-search-input input {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--cb-text);
  font-size: 13px;
  min-height: 54px;
  outline: none;
  padding: 8px 0;
  width: 100%;
}

#app .cb-search-input input:focus {
  border: 0;
  box-shadow: none;
}

#app .cb-search-input input::placeholder {
  color: color-mix(in srgb, var(--cb-muted) 65%, transparent);
}

#app .cb-search-filters {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

#app .cb-search-select {
  align-items: center;
  border: 1px solid var(--cb-line-strong);
  border-radius: 10px;
  color: var(--cb-green-deep);
  display: grid;
  gap: 9px;
  grid-template-columns: 22px minmax(0, 1fr) 16px;
  min-height: 52px;
  padding: 0 12px;
  transition: border-color 140ms ease, background 140ms ease;
}

#app .cb-search-select:hover,
#app .cb-search-select:focus-within {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-green);
}

#app .cb-search-select select,
#app [data-theme="light"] .cb-search-select select {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--cb-text);
  font-size: 11px;
  min-height: 48px;
  outline: none;
  padding: 7px 0;
  width: 100%;
}

#app .cb-search-select select:focus {
  border: 0;
  box-shadow: none;
}

#app [data-theme="light"] .cb-search-select select option {
  background: #ffffff;
  color: #111827;
}

#app .cb-search-kpi-grid {
  gap: 16px;
}

#app .cb-search-kpi {
  align-items: center;
  display: grid;
  gap: 15px;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 116px;
  padding: 18px 20px;
}

#app .cb-search-kpi .cb-icon-box {
  border-radius: 50%;
  height: 54px;
  width: 54px;
}

#app .cb-search-kpi > span:last-child,
#app .cb-search-kpi small,
#app .cb-search-kpi strong {
  display: block;
  min-width: 0;
}

#app .cb-search-kpi small {
  color: var(--cb-muted);
  font-size: 11px;
}

#app .cb-search-kpi strong {
  color: var(--cb-text);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

#app .cb-search-results-card,
#app [data-theme="light"] .cb-search-results-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  overflow: hidden;
  padding: 0;
}

#app .cb-search-table-scroll {
  max-height: min(58vh, 660px);
  overflow: auto;
}

#app .cb-search-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 850px;
  table-layout: fixed;
  width: 100%;
}

#app .cb-search-table th,
#app .cb-search-table td {
  border: 0;
  border-bottom: 1px solid var(--cb-line);
  padding: 13px 18px;
  text-align: left;
  vertical-align: middle;
}

#app .cb-search-table th {
  background: color-mix(in srgb, var(--cb-green-soft) 35%, var(--cb-surface));
  color: var(--cb-green-deep);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 2;
}

#app .cb-search-table th button,
#app [data-theme="light"] .cb-search-table th button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  display: inline-flex;
  font-size: inherit;
  gap: 5px;
  min-height: 0;
  padding: 0;
  text-transform: inherit;
}

#app .cb-search-table th button:hover,
#app [data-theme="light"] .cb-search-table th button:hover {
  background: transparent;
  border: 0;
  color: var(--cb-green-strong);
}

#app .cb-search-table td {
  color: var(--cb-text);
  font-size: 10px;
}

#app .cb-search-table tbody tr {
  background: var(--cb-surface);
  transition: background 120ms ease;
}

#app .cb-search-table tbody tr:hover {
  background: var(--cb-surface-subtle);
}

#app .cb-search-table tbody tr:last-child td {
  border-bottom: 0;
}

#app .cb-search-table td strong {
  color: var(--cb-text);
  font-size: 10px;
}

#app .cb-search-table th:nth-child(1),
#app .cb-search-table td:nth-child(1) { width: 125px; }
#app .cb-search-table th:nth-child(2),
#app .cb-search-table td:nth-child(2) { width: 150px; }
#app .cb-search-table th:nth-child(3),
#app .cb-search-table td:nth-child(3) { width: 270px; }
#app .cb-search-table th:nth-child(4),
#app .cb-search-table td:nth-child(4) { width: 155px; }
#app .cb-search-table th:nth-child(5),
#app .cb-search-table td:nth-child(5) { width: 230px; }
#app .cb-search-table th:nth-child(6),
#app .cb-search-table td:nth-child(6) { text-align: right; width: 135px; }

#app .cb-search-table th:nth-child(6) button {
  justify-content: flex-end;
  width: 100%;
}

#app .cb-search-empty {
  align-items: center;
  color: var(--cb-muted);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 35px;
  text-align: center;
}

#app .cb-search-empty strong {
  color: var(--cb-text);
  font-size: 13px;
  margin-top: 13px;
}

#app .cb-search-empty p {
  font-size: 10px;
  margin: 6px 0 0;
}

@media (max-width: 1100px) {
  #app .cb-search-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #app .cb-search-panel {
    padding: 17px;
  }

  #app .cb-search-heading {
    align-items: stretch;
    flex-direction: column;
  }

  #app .cb-search-reset {
    align-self: flex-start;
  }

  #app .cb-search-input {
    margin-top: 17px;
    min-height: 52px;
  }

  #app .cb-search-input input {
    min-height: 48px;
  }

  #app .cb-search-filters {
    grid-template-columns: 1fr;
  }

  #app .cb-search-kpi-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-search-kpi {
    min-height: 94px;
  }
}

/* Projects — decision-focused interface ----------------------------------- */
#app .cb-projects-page,
#app .cb-project-detail-page,
#app .cb-project-overview {
  display: grid;
  gap: 14px;
}

#app .cb-projects-header {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 4px 0 2px;
}

#app .cb-projects-header h3 {
  color: var(--cb-text);
  font-size: clamp(29px, 3.4vw, 42px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

#app .cb-projects-header p:not(.project-eyebrow) {
  color: var(--cb-muted);
  font-size: 12px;
  margin: 8px 0 0;
  max-width: 660px;
}

#app .cb-project-portfolio-grid,
#app .cb-project-primary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#app .cb-project-metric {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  display: flex;
  gap: 15px;
  min-height: 112px;
  min-width: 0;
  padding: 17px 18px;
}

#app .cb-project-metric-icon {
  align-items: center;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 50%;
  color: var(--cb-muted);
  display: inline-flex;
  flex: 0 0 50px;
  height: 50px;
  justify-content: center;
  width: 50px;
}

#app .cb-project-metric-icon.green {
  background: var(--cb-green-soft);
  border-color: color-mix(in srgb, var(--cb-green) 16%, transparent);
  color: var(--cb-green-strong);
}

#app .cb-project-metric-icon.red {
  background: var(--cb-rose-soft);
  border-color: color-mix(in srgb, var(--cb-rose) 14%, transparent);
  color: var(--cb-rose);
}

#app .cb-project-metric-icon.orange {
  background: var(--cb-amber-soft);
  border-color: color-mix(in srgb, var(--cb-amber) 16%, transparent);
  color: var(--cb-amber);
}

#app .cb-project-metric-icon.blue {
  background: var(--cb-blue-soft);
  border-color: color-mix(in srgb, var(--cb-blue) 14%, transparent);
  color: var(--cb-blue);
}

#app .cb-project-metric > div {
  min-width: 0;
}

#app .cb-project-metric small,
#app .cb-project-metric strong,
#app .cb-project-metric p {
  display: block;
}

#app .cb-project-metric small {
  color: var(--cb-muted);
  font-size: 11px;
  font-weight: 550;
  margin-bottom: 5px;
}

#app .cb-project-metric strong {
  color: var(--cb-text);
  font-size: clamp(19px, 2vw, 25px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

#app .cb-project-metric p {
  color: var(--cb-muted);
  font-size: 10px;
  line-height: 1.25;
  margin: 6px 0 0;
}

#app .project-filters.cb-card {
  align-items: center;
  background: var(--cb-surface);
  border-color: var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  gap: 9px;
  padding: 12px;
}

#app .project-filters .project-input,
#app .cb-project-search {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  color: var(--cb-text);
  min-height: 42px;
}

#app .cb-project-search {
  align-items: center;
  display: flex;
  gap: 9px;
  padding: 0 12px;
}

#app .cb-project-search .project-input {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 40px;
  padding: 0;
}

#app .project-toggle {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line);
}

#app .project-toggle button {
  color: var(--cb-muted);
  font-size: 11px;
  min-height: 34px;
}

#app .project-toggle button.active {
  background: var(--cb-surface);
  box-shadow: var(--cb-shadow-soft);
  color: var(--cb-green-deep);
}

#app .project-card {
  background: var(--cb-surface);
  border-color: var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  gap: 12px;
  padding: 18px;
}

#app .project-card:hover {
  background: var(--cb-surface);
  border-color: color-mix(in srgb, var(--cb-green) 42%, var(--cb-line));
  box-shadow: 0 12px 30px rgba(20, 42, 35, 0.09);
}

#app .project-card-top .cb-project-card-icon,
#app .cb-project-empty-icon {
  background: var(--cb-green-soft);
  color: var(--cb-green-strong);
}

#app .project-card-top em {
  background: var(--cb-green-soft);
  border-color: transparent;
  color: var(--cb-green-deep);
  font-size: 10px;
}

#app .project-card h4 {
  color: var(--cb-text);
  font-size: 19px;
}

#app .project-card p,
#app .project-card footer {
  color: var(--cb-muted);
  font-size: 10px;
}

#app .project-progress {
  background: var(--cb-line);
  height: 5px;
}

#app .project-progress span {
  background: var(--cb-green);
}

#app .project-card-metrics div {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  padding: 9px 10px;
}

#app .project-card-metrics small {
  color: var(--cb-muted);
  font-size: 9px;
}

#app .project-card-metrics strong {
  color: var(--cb-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}

#app .project-card footer {
  border-color: var(--cb-line);
  flex-wrap: wrap;
}

#app .project-table-wrap {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
}

#app .project-table {
  border-collapse: collapse;
  border-spacing: 0;
}

#app .project-table th {
  background: var(--cb-surface-subtle);
  border-bottom: 1px solid var(--cb-line);
  color: var(--cb-green-deep);
  font-size: 9px;
  padding: 13px;
}

#app .project-table td {
  background: var(--cb-surface);
  border-color: var(--cb-line);
  color: var(--cb-text);
  font-size: 11px;
  padding: 13px;
}

#app .project-table tbody tr:hover td {
  background: var(--cb-surface-subtle);
}

#app .project-empty.cb-card {
  background: var(--cb-surface);
  border-color: var(--cb-line);
  box-shadow: var(--cb-shadow);
}

#app .cb-project-empty-icon {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  height: 58px;
  justify-content: center;
  margin-bottom: 12px;
  width: 58px;
}

/* Project detail header and navigation */
#app .cb-project-detail-header {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  min-width: 0;
  overflow: hidden;
}

#app .cb-project-detail-main {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 20px 22px 17px;
}

#app .cb-project-back {
  min-width: 100px;
}

#app .cb-project-title {
  min-width: 0;
}

#app .cb-project-title .project-eyebrow {
  color: var(--cb-green-deep);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

#app .cb-project-title h3 {
  color: var(--cb-text);
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.045em;
  line-height: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

#app .cb-project-title > span {
  align-items: center;
  color: var(--cb-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 8px;
  margin-top: 8px;
}

#app .cb-project-title > span strong {
  color: var(--cb-muted);
  font-weight: 600;
}

#app .cb-project-title > span i {
  background: var(--cb-green);
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

#app .project-detail-actions {
  gap: 10px;
}

#app .project-detail-actions .cb-button-primary {
  min-width: 185px;
}

#app .cb-project-delete {
  color: var(--cb-text);
}

#app .cb-project-delete:hover {
  border-color: var(--cb-rose);
  color: var(--cb-rose);
}

#app .cb-project-detail-header .project-tabs {
  border-top: 1px solid var(--cb-line);
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  padding: 0 8px;
  scrollbar-width: thin;
}

#app .cb-project-detail-header .project-tabs button {
  align-items: center;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--cb-muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 11px;
  gap: 8px;
  min-height: 48px;
  padding: 0 15px;
}

#app .cb-project-detail-header .project-tabs button:hover {
  background: var(--cb-surface-subtle);
  color: var(--cb-text);
}

#app .cb-project-detail-header .project-tabs button.active {
  background: transparent;
  border-bottom-color: var(--cb-green);
  color: var(--cb-green-deep);
}

/* Project overview */
#app .cb-project-primary-grid .cb-project-metric {
  min-height: 118px;
}

#app .cb-project-decision-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#app .cb-project-decision {
  min-height: 106px;
}

#app .cb-project-decision.danger {
  border-color: color-mix(in srgb, var(--cb-rose) 25%, var(--cb-line));
}

#app .cb-project-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 9px;
  font-weight: 650;
  padding: 3px 7px;
}

#app .cb-project-status.red {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-project-warning-text {
  color: var(--cb-amber) !important;
  font-weight: 650;
}

#app .cb-project-overview-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

#app .cb-project-detail-page .project-panel {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  color: var(--cb-text);
  padding: 17px 20px;
}

#app .cb-project-detail-page .project-panel h4 {
  color: var(--cb-text);
  font-size: 15px;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

#app .cb-project-key-point {
  align-items: center;
  background: var(--cb-green-soft);
  border: 1px solid color-mix(in srgb, var(--cb-green) 18%, var(--cb-line));
  border-radius: 8px;
  color: var(--cb-green-deep);
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 42px;
  padding: 8px 11px;
}

#app .cb-project-key-point.warning {
  background: var(--cb-amber-soft);
  border-color: color-mix(in srgb, var(--cb-amber) 20%, var(--cb-line));
  color: var(--cb-amber);
}

#app .cb-project-key-point > span {
  align-items: center;
  display: inline-flex;
  flex: 0 0 24px;
  justify-content: center;
}

#app .cb-project-key-point p {
  color: inherit;
  font-size: 10px;
  line-height: 1.35;
  margin: 0;
}

#app .cb-project-summary-row {
  align-items: center;
  border-bottom: 1px solid var(--cb-line);
  display: flex;
  font-size: 11px;
  gap: 16px;
  justify-content: space-between;
  min-height: 37px;
}

#app .cb-project-summary-row:last-child {
  border-bottom: 0;
}

#app .cb-project-summary-row span {
  color: var(--cb-muted);
}

#app .cb-project-summary-row strong {
  color: var(--cb-text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#app .cb-project-summary-row strong.negative {
  color: var(--cb-rose);
}

#app .cb-project-summary-row strong.positive {
  color: var(--cb-green-strong);
}

#app .cb-project-action {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  color: var(--cb-text);
  display: flex;
  gap: 10px;
  margin-top: 7px;
  min-height: 50px;
  padding: 6px 8px;
  text-align: left;
  width: 100%;
}

#app .cb-project-action:hover {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line-strong);
}

#app .cb-project-action-icon {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 50%;
  color: var(--cb-green-strong);
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

#app .cb-project-action-icon.red {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-project-action-icon.orange {
  background: var(--cb-amber-soft);
  color: var(--cb-amber);
}

#app .cb-project-action-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

#app .cb-project-action-copy strong {
  color: var(--cb-text);
  font-size: 11px;
  line-height: 1.25;
}

#app .cb-project-action-copy small {
  color: var(--cb-muted);
  font-size: 9px;
  margin-top: 2px;
}

#app .cb-project-action em {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 8px;
  color: var(--cb-green-deep);
  flex: 0 0 auto;
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
  padding: 7px 12px;
}

#app .cb-project-complete {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 10px;
  color: var(--cb-green-strong);
  display: flex;
  gap: 10px;
  padding: 14px;
}

#app .cb-project-complete span {
  display: grid;
}

#app .cb-project-complete small {
  color: var(--cb-muted);
  font-size: 9px;
}

#app .cb-project-advice {
  align-items: center;
  background: var(--cb-green-soft);
  border: 1px solid color-mix(in srgb, var(--cb-green) 18%, var(--cb-line));
  border-radius: var(--cb-radius-md);
  color: var(--cb-green-deep);
  display: flex;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
}

#app .cb-project-advice.warning {
  background: color-mix(in srgb, var(--cb-green-soft) 70%, var(--cb-amber-soft));
}

#app .cb-project-advice > span {
  align-items: center;
  background: var(--cb-green-strong);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

#app .cb-project-advice p {
  color: inherit;
  flex: 1 1 auto;
  font-size: 10px;
  margin: 0;
}

#app .cb-project-advice button {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  border-radius: 8px;
  color: var(--cb-green-deep);
  font-size: 10px;
  min-height: 32px;
  padding: 0 12px;
}

/* Keep all advanced project views aligned with the same system. */
#app .cb-project-detail-page .project-kpi {
  background: var(--cb-surface);
  border-color: var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  min-height: 105px;
}

#app .cb-project-detail-page .project-kpi span,
#app .cb-project-detail-page .project-kpi small,
#app .cb-project-detail-page .project-panel p {
  color: var(--cb-muted);
}

#app .cb-project-detail-page .project-kpi strong,
#app .cb-project-detail-page .project-row strong {
  color: var(--cb-text);
  font-variant-numeric: tabular-nums;
}

#app .cb-project-detail-page .project-row,
#app .cb-project-detail-page .project-loan-card,
#app .cb-project-detail-page .project-timeline-row {
  border-color: var(--cb-line);
}

#app .cb-project-detail-page .project-form-grid {
  background: var(--cb-surface-subtle);
  border-color: var(--cb-line);
}

#app .cb-project-detail-page .project-form-grid input,
#app .cb-project-detail-page .project-form-grid select,
#app .cb-project-detail-page .project-form-grid textarea,
#app .cb-project-detail-page .project-input {
  background: var(--cb-surface);
  border-color: var(--cb-line-strong);
  color: var(--cb-text);
}

@media (max-width: 1240px) {
  #app .cb-project-portfolio-grid,
  #app .cb-project-primary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .cb-project-detail-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #app .project-detail-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 980px) {
  #app .project-filters.cb-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .cb-project-search {
    grid-column: 1 / -1;
  }

  #app .cb-project-decision-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-project-overview-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  #app .cb-projects-header {
    align-items: stretch;
    flex-direction: column;
  }

  #app .cb-projects-header .cb-button {
    align-self: flex-start;
  }

  #app .cb-project-portfolio-grid,
  #app .cb-project-primary-grid,
  #app .project-filters.cb-card {
    grid-template-columns: 1fr;
  }

  #app .cb-project-search {
    grid-column: auto;
  }

  #app .cb-project-detail-main {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding: 17px;
  }

  #app .cb-project-back {
    justify-self: start;
  }

  #app .project-detail-actions {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr auto;
  }

  #app .project-detail-actions .cb-button-primary {
    min-width: 0;
  }

  #app .cb-project-title h3 {
    font-size: 32px;
  }

  #app .cb-project-detail-header .project-tabs button {
    min-height: 45px;
    padding: 0 12px;
  }

  #app .cb-project-metric {
    min-height: 96px;
  }

  #app .cb-project-metric-icon {
    flex-basis: 44px;
    height: 44px;
    width: 44px;
  }

  #app .cb-project-action em {
    padding: 7px 9px;
  }

  #app .cb-project-advice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  #app .cb-project-advice p {
    flex-basis: calc(100% - 50px);
  }

  #app .cb-project-advice button {
    margin-left: 46px;
  }
}

@media (max-width: 430px) {
  #app .project-detail-actions {
    grid-template-columns: 1fr;
  }

  #app .project-detail-actions .cb-button {
    width: 100%;
  }

  #app .cb-project-summary-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 9px 0;
  }

  #app .cb-project-summary-row strong {
    text-align: left;
  }
}

/* Public landing — Clair Budget 2026 -------------------------------------- */
.cb-landing {
  --landing-bg: #fbfcf9;
  --landing-surface: #ffffff;
  --landing-subtle: #f2f7f3;
  --landing-text: #14211c;
  --landing-muted: #65736c;
  --landing-line: #dfe7e1;
  --landing-green: #086b55;
  --landing-green-dark: #064c3d;
  --landing-green-soft: #e4f3ec;
  --landing-coral: #d94e60;
  --landing-amber: #b47d16;
  --landing-amber-soft: #fff3d3;
  --landing-blue: #3472d6;
  --landing-blue-soft: #eaf1ff;
  background: var(--landing-bg);
  color: var(--landing-text);
  min-height: 100vh;
  max-width: 100vw;
  overflow: hidden;
  width: 100%;
}

.cb-landing a {
  color: inherit;
  text-decoration: none;
}

.cb-landing a:focus-visible,
.cb-landing summary:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(8, 107, 85, 0.22);
  outline-offset: 3px;
}

.cb-landing svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cb-landing-header {
  background: rgba(251, 252, 249, 0.91);
  border-bottom: 1px solid rgba(223, 231, 225, 0.8);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.cb-landing-nav {
  align-items: center;
  display: flex;
  gap: 30px;
  margin: 0 auto;
  max-width: 1480px;
  min-height: 72px;
  padding: 0 30px;
}

.cb-landing-brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
}

.cb-landing-brand img {
  border-radius: 10px;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

.cb-landing-brand span {
  display: grid;
  line-height: 1.08;
}

.cb-landing-brand strong {
  color: var(--landing-text);
  font-size: 14px;
}

.cb-landing-brand small {
  color: var(--landing-muted);
  font-size: 9px;
  font-weight: 600;
  margin-top: 3px;
}

.cb-landing-links {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 24px;
  justify-content: center;
}

.cb-landing-links a,
.cb-landing-login {
  color: var(--landing-muted);
  font-size: 12px;
  font-weight: 650;
  position: relative;
}

.cb-landing-links a::after {
  background: var(--landing-green);
  border-radius: 99px;
  bottom: -9px;
  content: "";
  height: 2px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) scaleX(0);
  transition: transform 150ms ease;
  width: 18px;
}

.cb-landing-links a:hover,
.cb-landing-login:hover {
  color: var(--landing-green-dark);
}

.cb-landing-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.cb-landing-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.cb-landing-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.cb-landing-button svg {
  height: 16px;
  width: 16px;
}

.cb-landing-button.primary {
  background: linear-gradient(135deg, #08745c, #075744);
  border-color: #08634f;
  box-shadow: 0 8px 20px rgba(8, 107, 85, 0.16);
  color: #fff;
}

.cb-landing-button.primary:hover {
  box-shadow: 0 11px 25px rgba(8, 107, 85, 0.23);
  transform: translateY(-1px);
}

.cb-landing-button.secondary {
  background: var(--landing-surface);
  border-color: var(--landing-line);
  color: var(--landing-text);
}

.cb-landing-button.secondary:hover {
  border-color: #a9c4b8;
  color: var(--landing-green-dark);
}

.cb-landing-button.large {
  min-height: 50px;
  padding: 0 21px;
}

.cb-landing-account {
  position: relative;
}

.cb-landing-account summary {
  align-items: center;
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  list-style: none;
  min-height: 42px;
  padding: 5px 9px 5px 5px;
}

.cb-landing-account summary::-webkit-details-marker,
.cb-landing-mobile-menu summary::-webkit-details-marker {
  display: none;
}

.cb-landing-account summary > span,
.cb-landing-account-menu > div > span {
  align-items: center;
  background: var(--landing-green-soft);
  border-radius: 8px;
  color: var(--landing-green);
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.cb-landing-account summary strong {
  font-size: 11px;
}

.cb-landing-account summary svg {
  height: 14px;
  transition: transform 150ms ease;
  width: 14px;
}

.cb-landing-account[open] summary svg {
  transform: rotate(180deg);
}

.cb-landing-account-menu {
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 13px;
  box-shadow: 0 18px 45px rgba(20, 40, 32, 0.14);
  display: grid;
  min-width: 250px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
}

.cb-landing-account-menu > div {
  align-items: center;
  border-bottom: 1px solid var(--landing-line);
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
  padding: 7px 7px 12px;
}

.cb-landing-account-menu > div > span {
  border-radius: 50%;
  height: 38px;
  width: 38px;
}

.cb-landing-account-menu p {
  display: grid;
  margin: 0;
  min-width: 0;
}

.cb-landing-account-menu p strong {
  font-size: 12px;
}

.cb-landing-account-menu p small {
  color: var(--landing-muted);
  font-size: 9px;
  margin-top: 2px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cb-landing-account-menu > a {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: 11px;
  font-weight: 650;
  gap: 9px;
  min-height: 38px;
  padding: 0 9px;
}

.cb-landing-account-menu > a:hover {
  background: var(--landing-subtle);
}

.cb-landing-account-menu > a svg {
  height: 17px;
  width: 17px;
}

.cb-landing-account-menu > a.logout {
  color: var(--landing-coral);
}

.cb-landing-mobile-menu {
  display: none;
  margin-left: auto;
  position: relative;
}

.cb-landing-mobile-menu summary {
  align-items: center;
  border: 1px solid var(--landing-line);
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  gap: 4px;
  height: 40px;
  justify-content: center;
  list-style: none;
  width: 40px;
}

.cb-landing-mobile-menu summary span {
  background: var(--landing-text);
  border-radius: 9px;
  display: block;
  height: 1.5px;
  width: 17px;
}

.cb-landing-mobile-menu > div {
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 13px;
  box-shadow: 0 18px 45px rgba(20, 40, 32, 0.14);
  display: grid;
  min-width: 240px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
}

.cb-landing-mobile-menu > div a {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  padding: 11px 12px;
}

.cb-landing-mobile-menu > div a:hover {
  background: var(--landing-subtle);
}

.cb-landing-mobile-menu > div a.primary {
  background: var(--landing-green);
  color: #fff;
}

.cb-landing-mobile-menu > div a.logout {
  color: var(--landing-coral);
}

/* Hero */
.cb-landing-hero,
.cb-landing-section,
.cb-landing-proof,
.cb-landing-footer {
  margin-left: auto;
  margin-right: auto;
  max-width: 1360px;
  width: calc(100% - 48px);
}

.cb-landing-hero {
  align-items: center;
  display: grid;
  gap: clamp(45px, 7vw, 110px);
  grid-template-columns: minmax(0, 0.92fr) minmax(470px, 1.08fr);
  min-height: 700px;
  padding: 72px 20px 82px;
  position: relative;
}

.cb-landing-hero::before {
  background: radial-gradient(circle, rgba(49, 151, 117, 0.1) 0 1px, transparent 1.5px);
  background-size: 18px 18px;
  content: "";
  height: 150px;
  left: -80px;
  opacity: 0.8;
  position: absolute;
  top: 50px;
  width: 190px;
}

.cb-landing-hero-copy {
  min-width: 0;
  position: relative;
  z-index: 2;
}

.cb-landing-announcement {
  align-items: center;
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 999px;
  color: var(--landing-muted);
  display: inline-flex;
  font-size: 10px;
  font-weight: 650;
  gap: 8px;
  margin-bottom: 28px;
  min-height: 32px;
  padding: 3px 10px 3px 4px;
}

.cb-landing-announcement span {
  background: var(--landing-green-soft);
  border-radius: 999px;
  color: var(--landing-green);
  padding: 6px 9px;
}

.cb-landing-announcement svg {
  height: 13px;
  width: 13px;
}

.cb-landing-eyebrow {
  color: var(--landing-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin: 0 0 11px;
  text-transform: uppercase;
}

.cb-landing-hero h1 {
  color: var(--landing-text);
  font-size: clamp(48px, 5.5vw, 76px);
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.cb-landing-hero h1 em {
  color: var(--landing-green);
  font-style: normal;
}

.cb-landing-lead {
  color: var(--landing-muted);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.62;
  margin: 26px 0 0;
  max-width: 650px;
}

.cb-landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 30px;
}

.cb-landing-reassurance {
  align-items: center;
  color: var(--landing-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
  margin-top: 27px;
}

.cb-landing-reassurance span {
  align-items: center;
  display: inline-flex;
  font-size: 10px;
  font-weight: 650;
  gap: 6px;
}

.cb-landing-reassurance svg {
  color: var(--landing-green);
  height: 15px;
  width: 15px;
}

.cb-landing-hero-visual {
  max-width: 100%;
  min-height: 510px;
  min-width: 0;
  position: relative;
}

.cb-landing-hero-visual::before {
  background: var(--landing-green-soft);
  border-radius: 48% 52% 58% 42%;
  content: "";
  inset: 6% -9% -7% 10%;
  position: absolute;
  transform: rotate(-4deg);
}

.cb-landing-photo-card {
  border: 8px solid var(--landing-surface);
  border-radius: 28px;
  box-shadow: 0 26px 65px rgba(26, 61, 49, 0.15);
  height: 465px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 18px;
  transform: rotate(1.5deg);
  width: 88%;
}

.cb-landing-photo-card::after {
  background: linear-gradient(180deg, transparent 55%, rgba(6, 46, 36, 0.17));
  content: "";
  inset: 0;
  position: absolute;
}

.cb-landing-photo-card img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.cb-landing-float-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(218, 228, 221, 0.9);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(24, 58, 46, 0.14);
  position: absolute;
  z-index: 3;
}

.cb-landing-float-card.balance {
  display: grid;
  left: -8px;
  padding: 15px 18px;
  top: 60px;
}

.cb-landing-float-card.balance > span,
.cb-landing-float-card.balance small,
.cb-landing-float-card.task small,
.cb-landing-float-card.task em,
.cb-landing-float-card.household small {
  color: var(--landing-muted);
  font-size: 9px;
}

.cb-landing-float-card.balance strong {
  color: var(--landing-green);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: 3px;
}

.cb-landing-float-card.balance small {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  margin-top: 7px;
}

.cb-landing-float-card.balance small i {
  background: #25a77c;
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.cb-landing-float-card.task {
  align-items: center;
  bottom: 40px;
  display: flex;
  gap: 10px;
  left: -28px;
  padding: 11px;
  width: 250px;
}

.cb-landing-float-card.task > span {
  align-items: center;
  background: var(--landing-amber-soft);
  border-radius: 10px;
  color: var(--landing-amber);
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
}

.cb-landing-float-card.task svg {
  height: 20px;
  width: 20px;
}

.cb-landing-float-card.task p,
.cb-landing-float-card.household p {
  display: grid;
  margin: 0;
  min-width: 0;
}

.cb-landing-float-card.task strong,
.cb-landing-float-card.household strong {
  font-size: 11px;
  margin: 2px 0;
}

.cb-landing-float-card.task em {
  font-style: normal;
}

.cb-landing-float-card.household {
  align-items: center;
  bottom: -3px;
  display: flex;
  gap: 9px;
  padding: 10px;
  right: 18px;
}

.cb-landing-float-card.household > span {
  align-items: center;
  background: var(--landing-green-soft);
  border-radius: 50%;
  color: var(--landing-green);
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.cb-landing-float-card.household > i {
  background: var(--landing-green-soft);
  border-radius: 999px;
  color: var(--landing-green);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  padding: 4px 7px;
}

.cb-landing-proof {
  align-items: center;
  border-bottom: 1px solid var(--landing-line);
  border-top: 1px solid var(--landing-line);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 18px;
}

.cb-landing-proof > p {
  color: var(--landing-muted);
  font-size: 10px;
  font-weight: 650;
  margin: 0;
}

.cb-landing-proof > div {
  align-items: center;
  display: flex;
  gap: 21px;
}

.cb-landing-proof span {
  color: #809088;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cb-landing-proof i {
  background: var(--landing-line);
  border-radius: 50%;
  height: 4px;
  width: 4px;
}

/* Shared public sections */
.cb-landing-section {
  padding: 108px 20px;
  scroll-margin-top: 74px;
}

.cb-landing-section-head {
  align-items: end;
  display: grid;
  gap: 50px;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.65fr);
  margin-bottom: 48px;
}

.cb-landing-section-head h2,
.cb-household-copy h2,
.cb-security-copy h2,
.cb-final-cta h2 {
  color: var(--landing-text);
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.045em;
  line-height: 1.03;
  margin: 0;
}

.cb-landing-section-head > p,
.cb-household-copy > p:not(.cb-landing-eyebrow) {
  color: var(--landing-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

.cb-landing-section-head.centered {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-left: auto;
  margin-right: auto;
  max-width: 750px;
  text-align: center;
}

.cb-landing-section-head.centered > p {
  max-width: 620px;
}

/* Modules */
.cb-modules {
  position: relative;
}

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

.cb-module-card {
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 265px;
  padding: 22px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.cb-module-card:hover {
  border-color: #b8ccc2;
  box-shadow: 0 15px 35px rgba(25, 59, 47, 0.07);
  transform: translateY(-2px);
}

.cb-module-card.featured {
  display: grid;
  gap: 0;
  grid-column: span 2;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  overflow: hidden;
  padding: 0;
}

.cb-module-visual {
  align-items: center;
  background: linear-gradient(145deg, #dcefe7, #f3f8f4);
  display: flex;
  justify-content: center;
  min-height: 330px;
  overflow: hidden;
  position: relative;
}

.cb-module-visual::before,
.cb-module-visual::after {
  background: rgba(8, 107, 85, 0.08);
  border-radius: 50%;
  content: "";
  height: 230px;
  position: absolute;
  width: 230px;
}

.cb-module-visual::before {
  left: -90px;
  top: -90px;
}

.cb-module-visual::after {
  bottom: -120px;
  right: -60px;
}

.mini-window {
  background: var(--landing-surface);
  border: 1px solid #d8e5de;
  border-radius: 13px;
  box-shadow: 0 20px 38px rgba(17, 77, 57, 0.14);
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, 1fr);
  height: 185px;
  padding: 32px 16px 16px;
  position: relative;
  transform: rotate(-2deg);
  width: 82%;
  z-index: 2;
}

.mini-window::before {
  background: #edf3ef;
  border-radius: 99px;
  box-shadow: 13px 0 #edf3ef, 26px 0 #edf3ef;
  content: "";
  height: 5px;
  left: 14px;
  position: absolute;
  top: 12px;
  width: 5px;
}

.mini-window i {
  background: var(--landing-green-soft);
  border-radius: 7px;
  display: block;
  height: 58px;
}

.mini-window i:nth-child(2) {
  background: #fdebee;
}

.mini-window i:nth-child(3) {
  background: var(--landing-blue-soft);
}

.mini-window b {
  align-self: end;
  background: #e8eeea;
  border-radius: 4px 4px 0 0;
  display: block;
  height: 42px;
}

.mini-window b:nth-of-type(1) { background: #6fc9a8; height: 48px; }
.mini-window b:nth-of-type(2) { background: #f68aa0; height: 31px; }
.mini-window b:nth-of-type(3) { background: #7ba9f6; height: 39px; }

.cb-module-copy {
  align-self: center;
  padding: 28px;
}

.cb-module-icon {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  margin-bottom: 22px;
  width: 46px;
}

.cb-module-icon svg {
  height: 23px;
  width: 23px;
}

.cb-module-icon.green { background: var(--landing-green-soft); color: var(--landing-green); }
.cb-module-icon.amber { background: var(--landing-amber-soft); color: var(--landing-amber); }
.cb-module-icon.blue { background: var(--landing-blue-soft); color: var(--landing-blue); }

.cb-module-status {
  align-items: center;
  display: inline-flex;
  font-size: 8px;
  font-weight: 800;
  gap: 6px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cb-module-status i {
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.cb-module-status.live { color: var(--landing-green); }
.cb-module-status.live i { background: #22a879; box-shadow: 0 0 0 3px var(--landing-green-soft); }
.cb-module-status.progress { color: var(--landing-amber); }
.cb-module-status.progress i { background: #d69a27; box-shadow: 0 0 0 3px var(--landing-amber-soft); }
.cb-module-status.soon { color: var(--landing-blue); }
.cb-module-status.soon i { background: #5a8ee6; box-shadow: 0 0 0 3px var(--landing-blue-soft); }

.cb-module-card h3 {
  color: var(--landing-text);
  font-size: 21px;
  letter-spacing: -0.025em;
  margin: 12px 0 0;
}

.cb-module-card p {
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.58;
  margin: 10px 0 0;
}

.cb-module-card > small {
  color: #87928d;
  font-size: 9px;
  margin-top: auto;
  padding-top: 22px;
}

.cb-module-card ul {
  display: grid;
  gap: 7px;
  list-style: none;
  margin: 16px 0 19px;
  padding: 0;
}

.cb-module-card li {
  color: var(--landing-muted);
  font-size: 10px;
}

.cb-module-card li::before {
  color: var(--landing-green);
  content: "✓";
  font-weight: 800;
  margin-right: 8px;
}

.cb-module-card a {
  align-items: center;
  color: var(--landing-green);
  display: inline-flex;
  font-size: 10px;
  font-weight: 750;
  gap: 4px;
}

.cb-module-card a svg {
  height: 14px;
  width: 14px;
}

/* How it works */
.cb-how {
  border-top: 1px solid var(--landing-line);
}

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

.cb-how-grid article {
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 16px;
  min-height: 250px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.cb-how-grid article > span {
  color: #e5ebe7;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  position: absolute;
  right: 22px;
  top: 20px;
}

.cb-how-icon {
  align-items: center;
  background: var(--landing-green-soft);
  border-radius: 12px;
  color: var(--landing-green);
  display: flex;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.cb-how-icon svg {
  height: 23px;
  width: 23px;
}

.cb-how-grid h3 {
  font-size: 18px;
  margin: 40px 0 0;
}

.cb-how-grid p {
  color: var(--landing-muted);
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0 0;
  max-width: 320px;
}

/* Household */
.cb-household {
  align-items: center;
  display: grid;
  gap: clamp(50px, 8vw, 120px);
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1fr);
}

.cb-household-copy > p:not(.cb-landing-eyebrow) {
  margin-top: 22px;
}

.cb-household-copy > ul {
  display: grid;
  gap: 18px;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.cb-household-copy > ul li {
  align-items: flex-start;
  display: flex;
  gap: 11px;
}

.cb-household-copy > ul li > span {
  align-items: center;
  background: var(--landing-green-soft);
  border-radius: 50%;
  color: var(--landing-green);
  display: flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
}

.cb-household-copy > ul svg {
  height: 15px;
  width: 15px;
}

.cb-household-copy > ul div {
  display: grid;
}

.cb-household-copy > ul strong {
  font-size: 12px;
}

.cb-household-copy > ul small {
  color: var(--landing-muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}

.cb-household-demo {
  background: var(--landing-surface);
  border: 1px solid var(--landing-line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(22, 58, 45, 0.09);
  padding: 20px;
  position: relative;
}

.cb-household-demo::before {
  background: var(--landing-green-soft);
  border-radius: 22px;
  content: "";
  inset: -22px 24px 22px -22px;
  position: absolute;
  transform: rotate(-3deg);
  z-index: -1;
}

.cb-household-top {
  align-items: center;
  border-bottom: 1px solid var(--landing-line);
  display: flex;
  gap: 10px;
  padding-bottom: 16px;
}

.cb-household-top > span {
  align-items: center;
  background: var(--landing-subtle);
  border-radius: 11px;
  display: flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.cb-household-top img {
  border-radius: 7px;
  height: 30px;
  width: 30px;
}

.cb-household-top p {
  display: grid;
  margin: 0;
}

.cb-household-top small,
.cb-household-members article small {
  color: var(--landing-muted);
  font-size: 9px;
}

.cb-household-top strong {
  font-size: 13px;
}

.cb-household-top em {
  background: var(--landing-green-soft);
  border-radius: 999px;
  color: var(--landing-green);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  margin-left: auto;
  padding: 5px 8px;
}

.cb-household-members {
  padding-top: 17px;
}

.cb-household-members > p,
.cb-household-modules > p {
  color: var(--landing-muted);
  font-size: 9px;
  font-weight: 750;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.cb-household-members > p span {
  float: right;
  font-weight: 550;
  text-transform: none;
}

.cb-household-members article {
  align-items: center;
  border: 1px solid var(--landing-line);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  margin-top: 7px;
  min-height: 51px;
  padding: 7px 9px;
}

.cb-household-members article > span {
  align-items: center;
  background: var(--landing-green-soft);
  border-radius: 50%;
  color: var(--landing-green);
  display: flex;
  font-size: 10px;
  font-weight: 750;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.cb-household-members article > span.rose { background: #fcecef; color: #c94a62; }
.cb-household-members article > span.blue { background: var(--landing-blue-soft); color: var(--landing-blue); }

.cb-household-members article div {
  display: grid;
}

.cb-household-members article strong {
  font-size: 10px;
}

.cb-household-members article em {
  color: var(--landing-muted);
  font-size: 8px;
  font-style: normal;
  margin-left: auto;
}

.cb-household-modules {
  border-top: 1px solid var(--landing-line);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
  padding-top: 15px;
}

.cb-household-modules > p {
  flex-basis: 100%;
}

.cb-household-modules > span {
  align-items: center;
  background: var(--landing-subtle);
  border-radius: 8px;
  color: var(--landing-muted);
  display: inline-flex;
  font-size: 8px;
  font-weight: 650;
  gap: 6px;
  padding: 6px 8px;
}

.cb-household-modules i {
  background: #aeb8b3;
  border-radius: 50%;
  height: 5px;
  width: 5px;
}

.cb-household-modules i.green { background: #23a47a; }
.cb-household-modules i.amber { background: #dc9c28; }

/* Security */
.cb-security {
  background: linear-gradient(135deg, #064c3d, #073b31);
  border-radius: 26px;
  color: #fff;
  display: grid;
  gap: 70px;
  grid-template-columns: minmax(0, 0.8fr) minmax(500px, 1.2fr);
  margin-bottom: 40px;
  margin-top: 65px;
  overflow: hidden;
  padding: 62px;
  position: relative;
}

.cb-security::before {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
  height: 420px;
  left: -190px;
  position: absolute;
  top: -210px;
  width: 420px;
}

.cb-security-copy {
  position: relative;
  z-index: 1;
}

.cb-security-copy .cb-landing-eyebrow {
  color: #9bdbc6;
}

.cb-security-copy h2 {
  color: #fff;
}

.cb-security-copy > p:not(.cb-landing-eyebrow) {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.65;
  margin: 21px 0;
}

.cb-security-copy > a {
  align-items: center;
  color: #a7e1ce;
  display: inline-flex;
  font-size: 10px;
  font-weight: 750;
  gap: 5px;
}

.cb-security-copy > a svg {
  height: 14px;
  width: 14px;
}

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

.cb-security-grid article {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  min-height: 155px;
  padding: 20px;
}

.cb-security-grid svg {
  color: #9bdbc6;
  height: 25px;
  width: 25px;
}

.cb-security-grid h3 {
  font-size: 13px;
  margin: 20px 0 0;
}

.cb-security-grid p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  line-height: 1.5;
  margin: 7px 0 0;
}

/* Roadmap */
.cb-roadmap-track {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
}

.cb-roadmap-track::before {
  background: var(--landing-line);
  content: "";
  height: 1px;
  left: 8%;
  position: absolute;
  right: 8%;
  top: 14px;
}

.cb-roadmap-track article {
  display: grid;
  padding: 0 20px;
  position: relative;
}

.cb-roadmap-track article > span {
  align-items: center;
  color: var(--landing-muted);
  display: inline-flex;
  font-size: 8px;
  font-weight: 750;
  gap: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.cb-roadmap-track article > span i {
  background: var(--landing-surface);
  border: 2px solid #b6c1bb;
  border-radius: 50%;
  height: 28px;
  width: 28px;
}

.cb-roadmap-track article.done > span { color: var(--landing-green); }
.cb-roadmap-track article.done > span i { background: var(--landing-green); border: 7px solid var(--landing-green-soft); }
.cb-roadmap-track article.active > span { color: var(--landing-amber); }
.cb-roadmap-track article.active > span i { background: #d49a2f; border: 7px solid var(--landing-amber-soft); }

.cb-roadmap-track strong {
  font-size: 15px;
  margin-top: 24px;
}

.cb-roadmap-track small {
  color: var(--landing-muted);
  font-size: 9px;
  line-height: 1.55;
  margin-top: 7px;
  max-width: 230px;
}

/* Final CTA and footer */
.cb-final-cta {
  align-items: center;
  background: var(--landing-green-soft);
  border: 1px solid #cde6db;
  border-radius: 24px;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 90px;
  overflow: hidden;
  padding: 55px 60px;
  position: relative;
}

.cb-final-cta h2 {
  font-size: clamp(35px, 4vw, 52px);
}

.cb-final-cta > div > p:not(.cb-landing-eyebrow) {
  color: var(--landing-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 18px 0 0;
  max-width: 640px;
}

.cb-final-cta > div > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  margin-top: 25px;
}

.cb-final-cta > div > div > a:not(.cb-landing-button) {
  color: var(--landing-green-dark);
  font-size: 10px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cb-landing-button.light {
  background: var(--landing-surface);
  border-color: #bed8cc;
  box-shadow: 0 9px 24px rgba(8, 92, 72, 0.1);
  color: var(--landing-green-dark);
}

.cb-final-mark {
  align-items: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  display: flex;
  height: 150px;
  justify-content: center;
  position: relative;
  width: 150px;
}

.cb-final-mark::before,
.cb-final-mark::after {
  border: 1px solid rgba(8, 107, 85, 0.12);
  border-radius: 50%;
  content: "";
  position: absolute;
}

.cb-final-mark::before { inset: -25px; }
.cb-final-mark::after { inset: -50px; }

.cb-final-mark img {
  border-radius: 18px;
  height: 80px;
  position: relative;
  width: 80px;
  z-index: 1;
}

.cb-landing-footer {
  align-items: center;
  border-top: 1px solid var(--landing-line);
  display: grid;
  gap: 24px;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  min-height: 110px;
  padding: 25px 18px;
}

.cb-landing-footer > p,
.cb-landing-footer > small {
  color: var(--landing-muted);
  font-size: 9px;
}

.cb-landing-footer nav {
  display: flex;
  gap: 17px;
}

.cb-landing-footer nav a {
  color: var(--landing-muted);
  font-size: 9px;
  font-weight: 650;
}

.cb-landing-footer nav a:hover {
  color: var(--landing-green);
}

@media (max-width: 1180px) {
  .cb-landing-links {
    gap: 15px;
  }

  .cb-landing-links a:nth-last-child(-n + 2) {
    display: none;
  }

  .cb-landing-hero {
    gap: 50px;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  }

  .cb-security {
    gap: 45px;
    padding: 48px;
  }
}

@media (max-width: 980px) {
  .cb-landing-links,
  .cb-landing-actions {
    display: none;
  }

  .cb-landing-mobile-menu {
    display: block;
  }

  .cb-landing-hero {
    gap: 55px;
    grid-template-columns: 1fr;
    padding-top: 60px;
  }

  .cb-landing-hero-copy {
    max-width: 760px;
  }

  .cb-landing-hero-visual {
    margin: 0 auto;
    max-width: 680px;
    width: 100%;
  }

  .cb-landing-proof {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 20px;
    padding-top: 20px;
  }

  .cb-landing-proof > div {
    flex-wrap: wrap;
  }

  .cb-landing-section-head {
    align-items: start;
    gap: 18px;
    grid-template-columns: 1fr;
  }

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

  .cb-module-card.featured {
    grid-column: 1 / -1;
  }

  .cb-household {
    gap: 65px;
    grid-template-columns: 1fr;
  }

  .cb-household-copy {
    max-width: 700px;
  }

  .cb-household-demo {
    justify-self: center;
    max-width: 620px;
    width: 100%;
  }

  .cb-security {
    grid-template-columns: 1fr;
  }

  .cb-security-copy {
    max-width: 620px;
  }

  .cb-roadmap-track {
    gap: 28px 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cb-roadmap-track::before {
    display: none;
  }

  .cb-landing-footer {
    grid-template-columns: auto 1fr auto;
  }

  .cb-landing-footer > p {
    display: none;
  }
}

@media (max-width: 700px) {
  .cb-landing-nav {
    min-height: 64px;
    padding: 0 16px;
  }

  .cb-landing-brand small {
    display: none;
  }

  .cb-landing-hero,
  .cb-landing-section,
  .cb-landing-proof,
  .cb-landing-footer {
    width: calc(100% - 24px);
  }

  .cb-landing-hero {
    min-height: auto;
    padding: 45px 4px 65px;
  }

  .cb-landing-announcement {
    white-space: normal;
  }

  .cb-landing-hero h1 {
    font-size: clamp(40px, 11.5vw, 52px);
    overflow-wrap: anywhere;
  }

  .cb-landing-lead {
    font-size: 15px;
  }

  .cb-landing-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .cb-landing-hero-actions .cb-landing-button {
    width: 100%;
  }

  .cb-landing-reassurance {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .cb-landing-hero-visual {
    min-height: 390px;
    overflow: hidden;
  }

  .cb-landing-photo-card {
    height: 340px;
    width: 94%;
  }

  .cb-landing-float-card.balance {
    left: -2px;
    top: 45px;
  }

  .cb-landing-float-card.balance strong {
    font-size: 17px;
  }

  .cb-landing-float-card.task {
    bottom: 13px;
    left: -4px;
  }

  .cb-landing-float-card.household {
    display: none;
  }

  .cb-landing-proof > div i {
    display: none;
  }

  .cb-landing-proof > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cb-landing-section {
    padding: 78px 4px;
  }

  .cb-landing-section-head h2,
  .cb-household-copy h2,
  .cb-security-copy h2,
  .cb-final-cta h2 {
    font-size: 38px;
  }

  .cb-module-grid,
  .cb-how-grid {
    grid-template-columns: 1fr;
  }

  .cb-module-card.featured {
    grid-template-columns: 1fr;
  }

  .cb-module-visual {
    min-height: 260px;
  }

  .cb-how-grid article {
    min-height: 220px;
  }

  .cb-security {
    border-radius: 20px;
    margin-top: 30px;
    padding: 35px 25px;
  }

  .cb-security-grid {
    grid-template-columns: 1fr;
  }

  .cb-roadmap-track {
    grid-template-columns: 1fr;
  }

  .cb-roadmap-track article {
    border-left: 1px solid var(--landing-line);
    margin-left: 14px;
    padding: 0 0 22px 25px;
  }

  .cb-roadmap-track article > span i {
    left: -15px;
    position: absolute;
    top: 0;
  }

  .cb-roadmap-track strong {
    margin-top: 15px;
  }

  .cb-final-cta {
    grid-template-columns: 1fr;
    margin-bottom: 50px;
    padding: 38px 25px;
  }

  .cb-final-mark {
    display: none;
  }

  .cb-final-cta > div > div {
    align-items: stretch;
    flex-direction: column;
  }

  .cb-landing-footer {
    align-items: flex-start;
    grid-template-columns: 1fr auto;
  }

  .cb-landing-footer nav {
    display: none;
  }
}

@media (max-width: 420px) {
  .cb-landing-brand strong {
    font-size: 12px;
  }

  .cb-landing-photo-card {
    right: -6px;
    width: 98%;
  }

  .cb-landing-float-card.task {
    width: 225px;
  }
}

/* Account and general settings -------------------------------------------- */
#app .cb-settings-page {
  color: var(--cb-text);
  display: grid;
  gap: 18px;
}

#app .cb-settings-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 2px 0 4px;
}

#app .cb-settings-eyebrow {
  color: var(--cb-green-strong);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

#app .cb-settings-heading h3 {
  color: var(--cb-text);
  font-size: clamp(30px, 4vw, 43px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}

#app .cb-settings-heading > div > p:last-child {
  color: var(--cb-muted);
  font-size: 11px;
  margin: 8px 0 0;
}

#app .cb-settings-save-state {
  align-items: center;
  background: var(--cb-green-soft);
  border: 1px solid color-mix(in srgb, var(--cb-green) 15%, var(--cb-line));
  border-radius: 999px;
  color: var(--cb-green-strong);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 650;
  gap: 7px;
  padding: 7px 10px;
}

#app .cb-settings-save-state i {
  background: currentColor;
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

#app .cb-settings-save-state.sync i {
  animation: cb-settings-pulse 900ms ease-in-out infinite;
}

#app .cb-settings-save-state.local {
  background: var(--cb-amber-soft);
  color: var(--cb-amber);
}

@keyframes cb-settings-pulse {
  50% { opacity: 0.25; transform: scale(0.7); }
}

#app .cb-settings-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 224px minmax(0, 1fr);
}

#app .cb-settings-nav {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  position: sticky;
  top: 82px;
  transform: none;
  width: 100%;
}

#app .cb-settings-nav > p {
  color: var(--cb-muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.1em;
  margin: 9px 9px 5px;
  text-transform: uppercase;
}

#app .cb-settings-nav > p:not(:first-child) {
  border-top: 1px solid var(--cb-line);
  margin-top: 10px;
  padding-top: 14px;
}

#app .cb-settings-nav > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--cb-muted);
  display: grid;
  font-size: 10px;
  gap: 8px;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  min-height: 41px;
  min-width: 0;
  padding: 5px 7px;
  text-align: left;
  width: 100%;
}

#app .cb-settings-nav > button > span {
  align-items: center;
  background: var(--cb-surface-subtle);
  border-radius: 8px;
  display: flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

#app .cb-settings-nav > button:hover {
  background: var(--cb-surface-subtle);
  color: var(--cb-text);
}

#app .cb-settings-nav > button.active {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
  font-weight: 700;
}

#app .cb-settings-nav > button.active > span {
  background: var(--cb-surface);
  color: var(--cb-green-strong);
}

#app .cb-settings-nav-help {
  align-items: center;
  background: var(--cb-surface-subtle);
  border-radius: 10px;
  display: flex;
  gap: 9px;
  margin-top: 11px;
  padding: 10px;
}

#app .cb-settings-nav-help > span {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 50%;
  color: var(--cb-green-strong);
  display: flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
}

#app .cb-settings-nav-help p {
  display: grid;
  margin: 0;
}

#app .cb-settings-nav-help strong {
  color: var(--cb-text);
  font-size: 9px;
}

#app .cb-settings-nav-help small {
  color: var(--cb-muted);
  font-size: 8px;
  line-height: 1.35;
  margin-top: 2px;
}

#app .cb-settings-content,
#app .cb-settings-section {
  display: grid;
  gap: 13px;
  min-width: 0;
}

#app .cb-settings-section-title {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 3px 5px;
}

#app .cb-settings-section-title h4 {
  color: var(--cb-text);
  font-size: clamp(23px, 3vw, 31px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}

#app .cb-settings-section-title > div > p:last-child {
  color: var(--cb-muted);
  font-size: 10px;
  margin: 7px 0 0;
  max-width: 610px;
}

#app .cb-settings-count {
  background: var(--cb-green-soft);
  border-radius: 999px;
  color: var(--cb-green-strong);
  font-size: 9px;
  font-weight: 700;
  padding: 6px 9px;
}

#app .cb-account-hero {
  align-items: center;
  background:
    radial-gradient(circle at 87% 20%, color-mix(in srgb, var(--cb-green) 9%, transparent), transparent 25%),
    var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  display: grid;
  gap: 15px;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  min-height: 124px;
  overflow: hidden;
  padding: 20px 23px;
}

#app .cb-account-large-avatar {
  align-items: center;
  background: linear-gradient(135deg, #159174, #075b49);
  border: 5px solid var(--cb-green-soft);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(8, 120, 95, 0.2);
  color: #fff;
  display: flex;
  font-size: 22px;
  font-weight: 750;
  height: 62px;
  justify-content: center;
  width: 62px;
}

#app .cb-account-hero > div:nth-child(2) {
  min-width: 0;
}

#app .cb-account-hero > div:nth-child(2) > small {
  color: var(--cb-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#app .cb-account-hero h4 {
  color: var(--cb-text);
  font-size: 22px;
  letter-spacing: -0.025em;
  margin: 3px 0 0;
}

#app .cb-account-hero > div:nth-child(2) > p {
  color: var(--cb-muted);
  font-size: 10px;
  margin: 3px 0 0;
}

#app .cb-account-hero > div:nth-child(2) > span {
  align-items: center;
  color: var(--cb-green-strong);
  display: inline-flex;
  font-size: 8px;
  font-weight: 650;
  gap: 5px;
  margin-top: 8px;
}

#app .cb-account-hero > div:nth-child(2) > span i,
#app .cb-current-session em i {
  background: var(--cb-green);
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

#app .cb-account-hero-meta {
  display: flex;
  gap: 8px;
}

#app .cb-account-hero-meta > span {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 9px;
  display: grid;
  min-width: 92px;
  padding: 9px 11px;
}

#app .cb-account-hero-meta small {
  color: var(--cb-muted);
  font-size: 8px;
}

#app .cb-account-hero-meta strong {
  color: var(--cb-text);
  font-size: 10px;
  margin-top: 3px;
}

#app .cb-settings-grid {
  display: grid;
  gap: 13px;
}

#app .cb-settings-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-settings-card-wide {
  grid-column: 1 / -1;
}

#app .cb-settings-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  min-width: 0;
  padding: 19px;
}

#app .cb-settings-card > header {
  align-items: center;
  display: flex;
  gap: 11px;
  margin-bottom: 17px;
}

#app .cb-settings-card > header > span {
  align-items: center;
  border-radius: 10px;
  display: flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
}

#app .cb-settings-card .tone-green { background: var(--cb-green-soft); color: var(--cb-green-strong); }
#app .cb-settings-card .tone-blue { background: var(--cb-blue-soft); color: var(--cb-blue); }
#app .cb-settings-card .tone-amber { background: var(--cb-amber-soft); color: var(--cb-amber); }
#app .cb-settings-card .tone-rose { background: var(--cb-rose-soft); color: var(--cb-rose); }
#app .cb-settings-card .tone-purple { background: color-mix(in srgb, var(--cb-blue-soft) 55%, var(--cb-rose-soft)); color: #7857b5; }

#app .cb-settings-card > header h4 {
  color: var(--cb-text);
  font-size: 13px;
  margin: 0;
}

#app .cb-settings-card > header p {
  color: var(--cb-muted);
  font-size: 9px;
  line-height: 1.35;
  margin: 3px 0 0;
}

#app .cb-settings-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 12px;
  padding: 0;
}

#app .cb-settings-add-form {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

#app .cb-settings-form.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-settings-form .wide {
  grid-column: 1 / -1;
}

#app .cb-settings-form label,
#app .cb-settings-add-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#app .cb-settings-form label > span,
#app .cb-settings-add-form label > span {
  color: var(--cb-text);
  font-size: 9px;
  font-weight: 650;
}

#app .cb-settings-form input,
#app .cb-settings-form select,
#app .cb-settings-add-form input,
#app .cb-settings-add-form select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line-strong);
  border-radius: 9px;
  color: var(--cb-text);
  font-size: 10px;
  min-height: 40px;
  min-width: 0;
  outline: none;
  padding: 0 11px;
  width: 100%;
}

#app .cb-settings-form select,
#app .cb-settings-add-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--cb-muted) 50%), linear-gradient(135deg, var(--cb-muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 11px) 17px;
  background-repeat: no-repeat;
  background-size: 4px 4px, 4px 4px;
  padding-right: 28px;
}

#app .cb-settings-form input:focus,
#app .cb-settings-form select:focus,
#app .cb-settings-add-form input:focus,
#app .cb-settings-add-form select:focus,
#app .cb-category-settings-list input:focus,
#app .cb-bank-account-card input:focus {
  border-color: var(--cb-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cb-green) 12%, transparent);
}

#app .cb-settings-form input[readonly] {
  color: var(--cb-muted);
  cursor: not-allowed;
}

#app .cb-password-form {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#app .cb-password-input {
  display: block;
  position: relative;
}

#app .cb-password-input input {
  padding-right: 43px;
}

#app .cb-password-input > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--cb-muted);
  display: flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 4px;
  top: 4px;
  width: 34px;
}

#app .cb-password-input > button:hover {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .cb-password-feedback {
  align-items: center;
  border-radius: 9px;
  display: flex;
  font-size: 11px;
  gap: 7px;
  grid-column: 1 / -1;
  margin: 1px 0 0;
  padding: 9px 11px;
}

#app .cb-password-feedback.error {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-password-feedback.success {
  background: var(--cb-green-soft);
  color: var(--cb-green-deep);
}

#app .cb-password-form .cb-settings-primary {
  grid-column: 1 / -1;
  margin-top: 2px;
}

#app .cb-password-form .cb-settings-primary:disabled {
  cursor: wait;
  opacity: 0.62;
}

#app .cb-settings-form label > small {
  align-items: center;
  color: var(--cb-muted);
  display: inline-flex;
  font-size: 8px;
  gap: 4px;
  line-height: 1.4;
}

#app .cb-settings-form input[type="range"] {
  accent-color: var(--cb-green-strong);
  border: 0;
  box-shadow: none;
  min-height: 20px;
  padding: 0;
}

#app .cb-input-suffix {
  position: relative;
}

#app .cb-input-suffix input {
  padding-right: 50px;
}

#app .cb-input-suffix b {
  color: var(--cb-muted);
  font-size: 9px;
  position: absolute;
  right: 11px;
  top: 14px;
}

#app .cb-settings-primary,
#app .cb-settings-secondary,
#app .cb-settings-danger-outline {
  align-items: center;
  border-radius: 9px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  text-decoration: none;
}

#app .cb-settings-primary {
  background: linear-gradient(135deg, #078469, #086852);
  border: 1px solid #08755d;
  color: #fff;
  justify-self: start;
  margin-top: 14px;
}

#app [data-theme="light"] .cb-settings-primary {
  background: linear-gradient(135deg, #078469, #086852);
  border-color: #08755d;
  color: #fff;
}

#app .cb-settings-form .cb-settings-primary {
  margin-top: 1px;
}

#app .cb-settings-secondary {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line-strong);
  color: var(--cb-text);
}

#app [data-theme="light"] .cb-settings-secondary {
  background: var(--cb-surface);
  border-color: var(--cb-line-strong);
  color: var(--cb-text);
}

#app .cb-settings-secondary:hover {
  border-color: var(--cb-green);
  color: var(--cb-green-deep);
}

#app .cb-settings-danger-outline {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--cb-rose) 28%, var(--cb-line));
  color: var(--cb-rose);
  margin-top: 13px;
}

#app [data-theme="light"] .cb-settings-danger-outline {
  background: transparent;
  border-color: color-mix(in srgb, var(--cb-rose) 28%, var(--cb-line));
  color: var(--cb-rose);
}

#app .cb-theme-choices,
#app .cb-mode-choices {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#app .cb-theme-choices > button,
#app .cb-mode-choices > button {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  color: var(--cb-text);
  display: grid;
  padding: 8px;
  position: relative;
  text-align: left;
}

#app .cb-theme-choices > button.active,
#app .cb-mode-choices > button.active {
  border-color: var(--cb-green);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cb-green) 9%, transparent);
}

#app .cb-theme-choices > button > span {
  border: 1px solid var(--cb-line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: 22px 1fr;
  height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  padding: 5px;
}

#app .cb-theme-choices .light-preview { background: #fff; }
#app .cb-theme-choices .dark-preview { background: #15201c; border-color: #34443d; }
#app .cb-theme-choices > button > span i { background: #e5f5ef; border-radius: 3px; }
#app .cb-theme-choices > button > span b { background: #f0f3f1; border-radius: 3px; }
#app .cb-theme-choices .dark-preview i { background: #26362f; }
#app .cb-theme-choices .dark-preview b { background: #203029; }

#app .cb-theme-choices > button > strong,
#app .cb-mode-choices > button > strong {
  font-size: 9px;
}

#app .cb-theme-choices > button > small,
#app .cb-mode-choices > button > small {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 2px;
}

#app .cb-theme-choices > button > em,
#app .cb-mode-choices > button > em {
  align-items: center;
  background: var(--cb-green);
  border-radius: 50%;
  color: #fff;
  display: none;
  height: 19px;
  justify-content: center;
  position: absolute;
  right: 7px;
  top: 7px;
  width: 19px;
}

#app .cb-theme-choices > button.active > em,
#app .cb-mode-choices > button.active > em {
  display: flex;
}

#app .cb-settings-inline-choice {
  align-items: center;
  border-top: 1px solid var(--cb-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 13px;
}

#app .cb-settings-inline-choice > span {
  display: grid;
}

#app .cb-settings-inline-choice strong,
#app .cb-settings-switch strong {
  color: var(--cb-text);
  font-size: 9px;
}

#app .cb-settings-inline-choice small,
#app .cb-settings-switch small {
  color: var(--cb-muted);
  font-size: 8px;
  line-height: 1.35;
  margin-top: 2px;
}

#app .cb-settings-inline-choice > div {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 8px;
  display: flex;
  padding: 2px;
}

#app .cb-settings-inline-choice button {
  background: transparent;
  border-radius: 6px;
  color: var(--cb-muted);
  font-size: 8px;
  min-height: 27px;
  padding: 0 8px;
}

#app .cb-settings-inline-choice button.active {
  background: var(--cb-surface);
  box-shadow: var(--cb-shadow-soft);
  color: var(--cb-green-deep);
}

#app .cb-settings-switch {
  align-items: center;
  border-top: 1px solid var(--cb-line);
  cursor: pointer;
  display: flex;
  gap: 13px;
  justify-content: space-between;
  min-height: 53px;
  padding: 9px 0;
}

#app .cb-settings-switch > span {
  display: grid;
  min-width: 0;
}

#app .cb-settings-switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

#app .cb-settings-switch > i {
  background: var(--cb-line-strong);
  border-radius: 999px;
  flex: 0 0 34px;
  height: 20px;
  position: relative;
  transition: background 140ms ease;
}

#app .cb-settings-switch > i::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  content: "";
  height: 16px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 140ms ease;
  width: 16px;
}

#app .cb-settings-switch input:checked + i {
  background: var(--cb-green-strong);
}

#app .cb-settings-switch input:checked + i::after {
  transform: translateX(14px);
}

#app .cb-settings-switch input:focus-visible + i {
  outline: 3px solid color-mix(in srgb, var(--cb-green) 25%, transparent);
  outline-offset: 2px;
}

#app .cb-current-session {
  align-items: center;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 9px;
}

#app .cb-current-session > span {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 9px;
  color: var(--cb-green-strong);
  display: flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
}

#app .cb-current-session > div {
  display: grid;
  min-width: 0;
}

#app .cb-current-session strong {
  font-size: 9px;
}

#app .cb-current-session small {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 2px;
}

#app .cb-current-session em {
  align-items: center;
  color: var(--cb-green-strong);
  display: inline-flex;
  font-size: 8px;
  font-style: normal;
  gap: 4px;
  margin-left: auto;
}

#app .cb-security-note {
  align-items: flex-start;
  color: var(--cb-muted);
  display: flex;
  font-size: 8px;
  gap: 7px;
  margin-top: 11px;
}

#app .cb-security-note .ui-icon {
  color: var(--cb-green-strong);
  flex: 0 0 auto;
}

#app .cb-security-note p {
  line-height: 1.45;
  margin: 0;
}

#app .cb-data-summary {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 13px;
}

#app .cb-data-summary span {
  border-right: 1px solid var(--cb-line);
  display: grid;
  padding: 12px;
  text-align: center;
}

#app .cb-data-summary span:last-child {
  border-right: 0;
}

#app .cb-data-summary strong {
  color: var(--cb-text);
  font-size: 15px;
}

#app .cb-data-summary small {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 2px;
}

#app .cb-settings-footnote {
  color: var(--cb-muted);
  font-size: 8px;
  line-height: 1.5;
  margin: 10px 0 0;
}

/* Settings collections */
#app .cb-settings-add-form {
  align-items: end;
  display: grid;
  gap: 9px;
}

#app .cb-settings-add-form.accounts {
  grid-template-columns: 1fr 1fr 80px auto;
}

#app .cb-settings-add-form.categories {
  grid-template-columns: 1fr 80px 150px auto;
}

#app .cb-settings-add-form.recurring {
  grid-template-columns: repeat(6, minmax(90px, 1fr)) auto;
}

#app .cb-settings-add-form .cb-settings-primary {
  margin: 0;
  min-height: 40px;
}

#app .cb-settings-add-form label.color input {
  cursor: pointer;
  padding: 4px;
}

#app .cb-settings-collection-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#app .cb-bank-account-card {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-md);
  box-shadow: var(--cb-shadow-soft);
  display: grid;
  gap: 10px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 12px;
}

#app .cb-bank-account-card > span {
  align-items: center;
  border-radius: 10px;
  color: #fff;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

#app .cb-bank-account-card > div {
  display: grid;
  min-width: 0;
}

#app .cb-bank-account-card input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--cb-text);
  font-size: 10px;
  min-width: 0;
  outline: none;
  padding: 3px 5px;
  width: 100%;
}

#app .cb-bank-account-card input:first-child {
  font-weight: 700;
}

#app .cb-bank-account-card input:last-child {
  color: var(--cb-muted);
  font-size: 8px;
}

#app .cb-bank-account-card button,
#app .cb-bank-account-card em {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 7px;
  color: var(--cb-muted);
  font-size: 8px;
  font-style: normal;
  min-height: 28px;
  padding: 0 8px;
}

#app .cb-bank-account-card.archived {
  opacity: 0.62;
}

#app .cb-category-settings-list,
#app .cb-recurring-settings-list {
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  overflow: hidden;
}

#app .cb-category-settings-list article {
  align-items: center;
  border-bottom: 1px solid var(--cb-line);
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(140px, 1fr) 170px 32px;
  min-height: 57px;
  padding: 8px 12px;
}

#app .cb-category-settings-list article:last-child,
#app .cb-recurring-settings-list article:last-child {
  border-bottom: 0;
}

#app .cb-category-settings-list > article > input[type="color"] {
  background: transparent;
  border: 0;
  cursor: pointer;
  height: 32px;
  padding: 0;
  width: 32px;
}

#app .cb-category-settings-list > article > input:not([type="color"]) {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--cb-text);
  font-size: 10px;
  font-weight: 650;
  min-height: 34px;
  outline: none;
  padding: 0 8px;
}

#app .cb-category-settings-list label {
  align-items: center;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 34px;
  padding: 0 8px;
}

#app .cb-category-settings-list label span,
#app .cb-category-settings-list label b {
  color: var(--cb-muted);
  font-size: 8px;
  font-weight: 550;
}

#app .cb-category-settings-list label input {
  background: transparent;
  border: 0;
  color: var(--cb-text);
  font-size: 9px;
  min-width: 0;
  outline: none;
  padding: 0 6px;
  text-align: right;
}

#app .cb-category-settings-list article > button,
#app .cb-recurring-settings-list article > button.delete {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--cb-muted);
  display: flex;
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}

#app .cb-category-settings-list article > button:hover,
#app .cb-recurring-settings-list article > button.delete:hover {
  background: var(--cb-rose-soft);
  color: var(--cb-rose);
}

#app .cb-recurring-settings-list article {
  align-items: center;
  border-bottom: 1px solid var(--cb-line);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) auto auto 30px;
  min-height: 58px;
  padding: 8px 12px;
}

#app .cb-recurring-settings-list article > span {
  align-items: center;
  border-radius: 9px;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

#app .cb-recurring-settings-list article > span.income { background: var(--cb-green-soft); color: var(--cb-green-strong); }
#app .cb-recurring-settings-list article > span.expense { background: var(--cb-rose-soft); color: var(--cb-rose); }

#app .cb-recurring-settings-list article > div {
  display: grid;
  min-width: 0;
}

#app .cb-recurring-settings-list article > div strong {
  color: var(--cb-text);
  font-size: 10px;
}

#app .cb-recurring-settings-list article > div small {
  color: var(--cb-muted);
  font-size: 8px;
  margin-top: 2px;
}

#app .cb-recurring-settings-list article > b {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#app .cb-recurring-settings-list article > b.income { color: var(--cb-green-strong); }
#app .cb-recurring-settings-list article > b.expense { color: var(--cb-rose); }

#app .cb-mini-toggle {
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 999px;
  color: var(--cb-muted);
  font-size: 8px;
  min-height: 26px;
  padding: 0 8px;
}

#app .cb-mini-toggle.active {
  background: var(--cb-green-soft);
  border-color: transparent;
  color: var(--cb-green-strong);
}

#app .cb-settings-empty {
  align-items: center;
  background: var(--cb-surface);
  border: 1px solid var(--cb-line);
  border-radius: var(--cb-radius-lg);
  color: var(--cb-muted);
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 35px;
  text-align: center;
}

#app .cb-settings-empty > span {
  align-items: center;
  background: var(--cb-green-soft);
  border-radius: 50%;
  color: var(--cb-green-strong);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

#app .cb-settings-empty strong {
  color: var(--cb-text);
  font-size: 11px;
  margin-top: 12px;
}

#app .cb-settings-empty p {
  font-size: 9px;
  line-height: 1.5;
  margin: 5px 0 0;
  max-width: 390px;
}

#app .cb-household-preview {
  align-items: center;
  background: var(--cb-surface-subtle);
  border: 1px solid var(--cb-line);
  border-radius: 10px;
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 9px;
}

#app .cb-household-preview img {
  border-radius: 8px;
  height: 36px;
  width: 36px;
}

#app .cb-household-preview div {
  display: grid;
}

#app .cb-household-preview small {
  color: var(--cb-muted);
  font-size: 8px;
}

#app .cb-household-preview strong {
  color: var(--cb-text);
  font-size: 10px;
}

#app .cb-household-preview em {
  background: var(--cb-green-soft);
  border-radius: 999px;
  color: var(--cb-green-strong);
  font-size: 8px;
  font-style: normal;
  margin-left: auto;
  padding: 5px 7px;
}

#app .cb-mode-choices > button {
  color: var(--cb-green-strong);
  min-height: 118px;
  padding: 14px;
}

#app .cb-mode-choices > button > strong {
  color: var(--cb-text);
  margin-top: 16px;
}

/* Settings typography comfort */
#app .cb-settings-heading > div > p:last-child {
  font-size: 13px;
  line-height: 1.5;
}

#app .cb-settings-eyebrow,
#app .cb-settings-save-state,
#app .cb-settings-count,
#app .cb-settings-nav > p {
  font-size: 10px;
}

#app .cb-settings-nav > button {
  font-size: 12px;
}

#app .cb-settings-nav-help strong,
#app .cb-account-hero-meta strong,
#app .cb-settings-card > header p,
#app .cb-settings-form label > span,
#app .cb-settings-add-form label > span,
#app .cb-theme-choices > button > strong,
#app .cb-mode-choices > button > strong,
#app .cb-settings-inline-choice strong,
#app .cb-settings-switch strong,
#app .cb-current-session strong,
#app .cb-bank-account-card input:last-child,
#app .cb-category-settings-list label input,
#app .cb-category-settings-list label span,
#app .cb-category-settings-list label b,
#app .cb-recurring-settings-list article > div small,
#app .cb-mini-toggle,
#app .cb-household-preview small,
#app .cb-household-preview em {
  font-size: 11px;
}

#app .cb-settings-section-title > div > p:last-child,
#app .cb-account-hero > div:nth-child(2) > p,
#app .cb-settings-form input,
#app .cb-settings-form select,
#app .cb-settings-add-form input,
#app .cb-settings-add-form select,
#app .cb-theme-choices > button > small,
#app .cb-mode-choices > button > small,
#app .cb-settings-inline-choice small,
#app .cb-settings-switch small,
#app .cb-current-session small,
#app .cb-bank-account-card input,
#app .cb-category-settings-list > article > input:not([type="color"]),
#app .cb-recurring-settings-list article > div strong,
#app .cb-recurring-settings-list article > b,
#app .cb-settings-empty p,
#app .cb-household-preview strong {
  font-size: 12px;
}

#app .cb-settings-nav-help small,
#app .cb-account-hero > div:nth-child(2) > small,
#app .cb-account-hero > div:nth-child(2) > span,
#app .cb-account-hero-meta small,
#app .cb-settings-form label > small,
#app .cb-settings-inline-choice button,
#app .cb-current-session em,
#app .cb-security-note,
#app .cb-data-summary small,
#app .cb-settings-footnote,
#app .cb-bank-account-card button,
#app .cb-bank-account-card em {
  font-size: 10px;
}

#app .cb-settings-primary,
#app .cb-settings-secondary,
#app .cb-settings-danger-outline {
  font-size: 11px;
}

/* Persisted display preferences */
#app [data-density="compact"] .cb-card,
#app [data-density="compact"] .cb-settings-card,
#app [data-density="compact"] .cb-project-metric {
  padding-bottom: 14px;
  padding-top: 14px;
}

#app [data-density="compact"] .cb-transaction-row,
#app [data-density="compact"] .cb-operation-row,
#app [data-density="compact"] .cb-search-table td {
  padding-bottom: 7px;
  padding-top: 7px;
}

#app [data-reduced-motion="true"] *,
#app [data-reduced-motion="true"] *::before,
#app [data-reduced-motion="true"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
}

@media (max-width: 1120px) {
  #app .cb-settings-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  #app .cb-settings-grid.two {
    grid-template-columns: 1fr;
  }

  #app .cb-settings-add-form.recurring {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #app .cb-settings-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #app .cb-settings-layout {
    grid-template-columns: 1fr;
  }

  #app .cb-password-form {
    grid-template-columns: 1fr;
  }

  #app .cb-settings-nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 7px;
    position: static;
    transform: none;
  }

  #app .cb-settings-nav > p,
  #app .cb-settings-nav-help,
  #app .cb-settings-nav > button > .ui-icon:last-child {
    display: none;
  }

  #app .cb-settings-nav > button {
    flex: 0 0 auto;
    grid-template-columns: 28px auto;
    min-height: 38px;
    padding-right: 11px;
  }

  #app .cb-settings-nav > button > span {
    height: 28px;
    width: 28px;
  }

  #app .cb-settings-add-form.accounts,
  #app .cb-settings-add-form.categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .cb-settings-add-form .cb-settings-primary {
    justify-self: stretch;
  }
}

@media (max-width: 600px) {
  #app .cb-settings-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  #app .cb-account-hero {
    align-items: start;
    grid-template-columns: 56px minmax(0, 1fr);
    padding: 17px;
  }

  #app .cb-account-large-avatar {
    border-width: 4px;
    font-size: 18px;
    height: 52px;
    width: 52px;
  }

  #app .cb-account-hero-meta {
    grid-column: 1 / -1;
    width: 100%;
  }

  #app .cb-account-hero-meta > span {
    flex: 1 1 0;
  }

  #app .cb-settings-section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  #app .cb-settings-section-title .cb-settings-secondary {
    align-self: flex-start;
  }

  #app .cb-settings-form.grid-two,
  #app .cb-settings-add-form.accounts,
  #app .cb-settings-add-form.categories,
  #app .cb-settings-add-form.recurring,
  #app .cb-settings-collection-grid {
    grid-template-columns: 1fr;
  }

  #app .cb-settings-form .wide {
    grid-column: auto;
  }

  #app .cb-settings-add-form label.color {
    max-width: none;
  }

  #app .cb-category-settings-list article {
    grid-template-columns: 32px minmax(0, 1fr) 30px;
  }

  #app .cb-category-settings-list article label {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  #app .cb-recurring-settings-list article {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  #app .cb-recurring-settings-list article > b {
    grid-column: 2;
    grid-row: 2;
  }

  #app .cb-recurring-settings-list .cb-mini-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  #app .cb-recurring-settings-list article > button.delete {
    grid-column: 3;
    grid-row: 2;
  }

  #app .cb-theme-choices,
  #app .cb-mode-choices {
    grid-template-columns: 1fr;
  }

  #app .cb-current-session {
    align-items: flex-start;
  }

  #app .cb-current-session em {
    display: none;
  }
}
