/* ─────────────────────────────────────────────────────────────────────────────
   GESTOR DE TARJETAS — Fintech / Trading UI Theme
   Aesthetic: Bloomberg terminal meets modern fintech dashboard
   Palette: Deep navy #1A1A2E + neon yellow #E8FF47 + clean grey #F0F0F6
   Fonts: Bebas Neue (display) + JetBrains Mono (data) + Plus Jakarta Sans (UI)
───────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:wght@300;400;500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ─── TOKENS ─── */
:root {
  --accent: #1A1A2E;
  --accent-hi: #252545;
  --accent-mid: #2e2e52;
  --accent2: #E8FF47;
  --accent2-dim: #c8dc2a;
  --accent2-pale: rgba(232, 255, 71, .10);
  --accent2-glow: rgba(232, 255, 71, .25);

  --card-bg: #FFFFFF;
  --body-bg: #F0F0F6;
  --td-alt: #F8F8FC;
  --label-color: #888888;
  --card-border: rgba(0, 0, 0, 0.07);
  --th-bg: #1A1A2E;
  --th-text: #E8FF47;
  --total-bg: #1A1A2E;
  --total-text: #E8FF47;
  --hover-row: #EBEBF7;
  --edit-row: #FFFFF0;
  --update-row: #F4F4FA;

  --pos: #10B981;
  --neg: #EF4444;
  --pos-pale: rgba(16, 185, 129, .10);
  --neg-pale: rgba(239, 68, 68, .10);

  --ink: #111122;
  --ink-mid: #444466;
  --ink-dim: #888899;

  --display: 'Bebas Neue', 'Arial Black', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Plus Jakarta Sans', sans-serif;

  --r: 4px;
  --r-lg: 6px;
  --r-xl: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-sm: 0 1px 4px rgba(26, 26, 46, .06), 0 2px 12px rgba(26, 26, 46, .04);
  --shadow-md: 0 4px 16px rgba(26, 26, 46, .10), 0 1px 4px rgba(26, 26, 46, .06);
  --shadow-lg: 0 8px 32px rgba(26, 26, 46, .14), 0 2px 8px rgba(26, 26, 46, .06);
}

/* ─── THEMES ─── */
[data-theme="light"] {
  --accent: #1A1A2E;
  --accent-hi: #252545;
  --accent-mid: #2e2e52;
  --accent2: #1A1A2E;
  --accent2-dim: #252545;
  --accent2-pale: rgba(26, 26, 46, .08);
  --accent2-glow: rgba(26, 26, 46, .15);
  --card-bg: #FFFFFF;
  --body-bg: #F0F0F6;
  --td-alt: #F8F8FC;
  --label-color: #888888;
  --card-border: rgba(0, 0, 0, 0.10);
  --th-bg: #1A1A2E;
  --th-text: #FFFFFF;
  --total-bg: #1A1A2E;
  --total-text: #FFFFFF;
  --hover-row: #EBEBF7;
  --ink: #111122;
  --ink-mid: #444466;
  --ink-dim: #888899;
}

[data-theme="midnight"] {
  --accent: #0a0e27;
  --accent-hi: #0d1235;
  --accent-mid: #111840;
  --accent2: #00e5ff;
  --accent2-dim: #00b8cc;
  --accent2-pale: rgba(0, 229, 255, .10);
  --accent2-glow: rgba(0, 229, 255, .25);
  --card-bg: #0f1428;
  --body-bg: #080b1a;
  --td-alt: #111830;
  --label-color: #4a5580;
  --card-border: rgba(0, 229, 255, 0.10);
  --th-bg: #0a0e27;
  --th-text: #00e5ff;
  --total-bg: #0a0e27;
  --total-text: #00e5ff;
  --hover-row: #111830;
  --ink: #e0eeff;
  --ink-mid: #8899cc;
  --ink-dim: #445577;
}

[data-theme="forest"] {
  --accent: #0d1f0f;
  --accent-hi: #102614;
  --accent-mid: #143019;
  --accent2: #a3ff47;
  --accent2-dim: #82cc2a;
  --accent2-pale: rgba(163, 255, 71, .10);
  --accent2-glow: rgba(163, 255, 71, .25);
  --card-bg: #111e13;
  --body-bg: #0a140b;
  --td-alt: #141f16;
  --label-color: #3d5e42;
  --card-border: rgba(163, 255, 71, 0.10);
  --th-bg: #0d1f0f;
  --th-text: #a3ff47;
  --total-bg: #0d1f0f;
  --total-text: #a3ff47;
  --hover-row: #141f16;
  --ink: #e0ffe5;
  --ink-mid: #7aaa80;
  --ink-dim: #3d5e42;
}

[data-theme="violet"] {
  --accent: #1a0a2e;
  --accent-hi: #220d3a;
  --accent-mid: #2a1045;
  --accent2: #ff47d4;
  --accent2-dim: #cc2aaa;
  --accent2-pale: rgba(255, 71, 212, .10);
  --accent2-glow: rgba(255, 71, 212, .25);
  --card-bg: #1e0f30;
  --body-bg: #130820;
  --td-alt: #221238;
  --label-color: #6a4080;
  --card-border: rgba(255, 71, 212, 0.10);
  --th-bg: #1a0a2e;
  --th-text: #ff47d4;
  --total-bg: #1a0a2e;
  --total-text: #ff47d4;
  --hover-row: #221238;
  --ink: #f5e0ff;
  --ink-mid: #bb88dd;
  --ink-dim: #6a4080;
}

/* ─── RESET ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── BODY ─── */
body {
  background: var(--body-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ─── LAYOUT ─── */
.container {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0 2rem;
}

@keyframes enterPage {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── TOPBAR ─── */
.header {
  background: var(--accent);
  padding: 1.4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(26, 26, 46, .35);
}

.header h1 {
  font-size: 1.5rem;
}

/* neon bottom border */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent2);
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--accent2);
  letter-spacing: .06em;
  line-height: 1;
}

h1 span {
  color: rgba(255, 255, 255, .55);
  font-size: .75em;
  letter-spacing: .12em;
}

.header-badge {
  font-family: var(--mono);
  font-size: .53rem;
  letter-spacing: .18em;
  color: var(--accent);
  background: var(--accent2);
  padding: .28rem .75rem;
  border-radius: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─── PAGE BODY PADDING ─── */
.container>*:not(.header) {
  padding-left: 0rem;
  padding-right: 0rem;
}

/* ─── RECOMMENDATION PANEL ─── */
#todayCard {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
  margin-left: 1rem;
  margin-right: 1rem;
  min-height: 110px;
}

/* ── Welcome state (no cards yet) ── */
#todayCard.welcome {
  display: block;
}

.rec-welcome {
  background: var(--accent);
  border-radius: var(--r-xl);
  padding: 2rem 2.5rem;
  color: rgba(255, 255, 255, .55);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rec-welcome::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent2);
}

.rec-welcome-title {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: .1em;
  color: var(--accent2);
  margin-bottom: .5rem;
}

/* ── Main card (tarjeta recomendada) ── */
.rec-main {
  background: var(--accent);
  border-radius: var(--r-xl);
  padding: 1.4rem 2.2rem;
  position: relative;
  overflow: hidden;
  min-height: 130px;
  display: flex;
  align-items: center;
}

/* left neon bar */
.rec-main::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent2);
  border-radius: var(--r-xl) 0 0 var(--r-xl);
}

/* radial glow detrás de la imagen */
.rec-main::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(232, 255, 71, .12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* bloque de texto */
.rec-main-content {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  position: relative;
  z-index: 1;
  padding-right: 140px;
  min-width: 0;
  flex: 1;
}

.rec-main-label {
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .18em;
  color: rgba(232, 255, 71, .5);
  text-transform: uppercase;
}

.rec-main-name {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: .06em;
  color: var(--accent2);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-main-sub {
  font-family: var(--sans);
  font-size: .75rem;
  color: rgba(255, 255, 255, .4);
  font-weight: 300;
}

/* imagen absolutamente posicionada a la derecha, centrada */
.rec-main-img {
  position: absolute;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 110px;
  height: 70px;
  object-fit: contain;
  border-radius: var(--r);
  border: 0.5px solid;
  z-index: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

/* ── Metrics 2x2 grid ── */
.rec-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.rec-metric {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  min-height: 120px;
}

.rec-metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* top accent line — navy by default, neon on hover */
.rec-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.2rem;
  right: 1.2rem;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
  transition: background .2s;
}

.rec-metric:hover::before {
  background: var(--accent2);
}

.rec-metric-label {
  font-family: var(--mono);
  font-size: .70rem;
  letter-spacing: .15em;
  color: var(--label-color);
  text-transform: uppercase;
}

.rec-metric-value {
  font-family: var(--display);
  font-size: 6.5rem;
  letter-spacing: .04em;
  color: var(--accent);
  line-height: 1;
}

.rec-metric-value.highlight {
  color: var(--pos);
}

.rec-metric-sub {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--label-color);
  margin-top: .25rem;
}

/* ─── TH ADD BUTTON ─── */
.th-with-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.th-add-btn {
  background: var(--accent2);
  color: var(--accent);
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, transform .12s, box-shadow .15s;
}

.th-add-btn:hover {
  background: #f5ff70;
  box-shadow: 0 0 8px var(--accent2-glow);
  transform: scale(1.1);
}

/* ─── FORM MODAL GRID ─── */
.fmodal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: .75rem;
}

.fmodal-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.fmodal-group--full {
  grid-column: span 2;
}

.fmodal-label {
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .14em;
  color: var(--label-color);
  text-transform: uppercase;
}

.fmodal-input {
  background: var(--body-bg);
  border: 1.5px solid rgba(26, 26, 46, .15);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .82rem;
  padding: .65rem .85rem;
  border-radius: var(--r);
  width: 100%;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}

.fmodal-input::placeholder {
  color: var(--label-color);
  opacity: .6;
}

.fmodal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 2px 0 0 var(--accent2-dim);
  background: #fff;
}

.fmodal-input option {
  background: #fff;
}

/* keep generic input/select for any other use */
input,
select {
  background: #ffffff;
  border: 1.5px solid rgba(26, 26, 46, .15);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .8rem;
  padding: .6rem .85rem;
  border-radius: var(--r);
  width: 100%;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}

input::placeholder {
  color: var(--label-color);
  opacity: .7;
}

input:focus,
select:focus {
  background: #fff;
  border-color: var(--accent);
  border-bottom-color: var(--accent2-dim);
  box-shadow: 0 2px 0 0 var(--accent2-dim);
}

select option {
  background: #fff;
}

/* ─── PRIMARY BUTTON ─── */
.primary-btn {
  background: var(--accent);
  border: none;
  color: var(--accent2);
  font-family: var(--sans);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .68rem 1.8rem;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .18s, box-shadow .18s, transform .12s;
  white-space: nowrap;
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* neon shimmer on hover */
.primary-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(232, 255, 71, .18) 60%, transparent 80%);
  transform: translateX(-100%);
  transition: transform .4s var(--ease);
}

.primary-btn:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 0 2px var(--accent2), var(--shadow-md);
  transform: translateY(-1px);
}

.primary-btn:hover::after {
  transform: translateX(100%);
}

.primary-btn:active {
  transform: translateY(0);
}

/* ─── SUMMARY TABLE ─── */
.summary-table-wrapper {
  margin: 0 1rem 1.5rem;
  animation: enterPage .6s .2s var(--ease) both;
}

.summary-table {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}

.summary-table-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .85rem 1.1rem;
  border-right: 1px solid var(--card-border);
  position: relative;
}

.summary-table-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: .8rem;
  right: .8rem;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.summary-table-item:last-child {
  border-right: none;
}

.summary-table-label {
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .13em;
  color: var(--label-color);
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-table-label2 {
  font-family: var(--mono);
  font-size: .55rem;
}

.summary-table-value {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: .03em;
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-table-value.warn {
  color: var(--neg);
}

.summary-table-value.accent-pos {
  color: var(--pos);
}

@media (max-width: 600px) {
  .summary-table {
    grid-template-columns: 1fr 1fr;
  }

  .summary-table-item:nth-child(2) {
    border-right: none;
  }

  .summary-table-item:nth-child(1),
  .summary-table-item:nth-child(2) {
    border-bottom: 1px solid var(--card-border);
  }
}

/* ─── TABLE WRAPPER ─── */
.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(8 * 41px); /* 5 rows */
  border-radius: var(--r-xl);
  border: 1px solid var(--card-border);
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
  animation: enterPage .6s .25s var(--ease) both;
  padding-left: 0rem;
  margin-left: 1rem;
  margin-right: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
  background: var(--card-bg);
  table-layout: fixed;
}

/* 4 column widths */
th:nth-child(1) {
  width: 40%;
}

th:nth-child(2) {
  width: 22%;
}

th:nth-child(3) {
  width: 19%;
}

th:nth-child(4) {
  width: 19%;
}

/* clickable row cursor */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--hover-row) !important;
}

/* ─── MODAL ─── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 20, .65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 64px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.2);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn .22s var(--ease) both;
}

.modal-box--wide {
  max-width: 600px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  background: var(--accent);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 2px solid var(--accent2);
}

.modal-title {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: .06em;
  color: var(--accent2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.modal-close {
  background: rgba(255, 221, 71, 0.267);
  border: 1px solid rgba(255, 71, 71, 0.027);
  color: rgba(232, 255, 71, .7);
  font-size: .8rem;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.modal-close:hover {
  background: rgba(232, 255, 71, .1);
  color: var(--accent2);
  border-color: var(--accent2);
}

.modal-body {
  padding: 1rem 1.2rem;
  overflow-y: auto;
}

/* ── Métricas principales ── */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}

.modal-metric {
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: .7rem .8rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.modal-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: .6rem;
  right: .6rem;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.modal-metric-label {
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .1em;
  color: var(--label-color);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-metric-value {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: .03em;
  color: var(--accent);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-metric-value.accent {
  color: var(--pos);
}

.modal-metric-value.warn {
  color: var(--neg);
}

/* ── Info secundaria ── */
.modal-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  overflow: hidden;
  margin-top: .6rem;
}

.modal-secondary-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .55rem .8rem;
  border-right: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.modal-secondary-item:nth-child(2n) {
  border-right: none;
}

.modal-secondary-item:nth-last-child(-n+2) {
  border-bottom: none;
}

/* 10 items = 5 rows — last row needs special handling if odd */
.modal-secondary-item:last-child:nth-child(odd) {
  grid-column: span 2;
  border-right: none;
}

.modal-secondary-label {
  font-family: var(--mono);
  font-size: .60rem;
  letter-spacing: .1em;
  color: var(--label-color);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-secondary-value {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  color: var(--ink-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-secondary-value.warn {
  color: var(--neg);
}

.modal-secondary-value.accent-pos {
  color: var(--pos);
}

/* ── Botones de acción ── */
.modal-actions {
  display: flex;
  gap: .6rem;
  padding: .85rem 1.2rem 1.2rem;
  border-top: 1px solid var(--card-border);
  margin-top: .6rem;
}

.modal-edit-btn,
.modal-delete-btn {
  flex: 1;
  padding: .6rem .8rem;
  border-radius: var(--r);
  font-family: var(--sans);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  border: none;
}

.modal-edit-btn {
  background: var(--accent);
  color: var(--accent2);
}

.modal-edit-btn:hover {
  background: var(--accent-hi);
  box-shadow: 0 0 12px var(--accent2-glow);
}

.modal-delete-btn {
  background: var(--neg-pale);
  color: var(--neg);
  border: 1px solid rgba(239, 68, 68, .25);
}

.modal-delete-btn:hover {
  background: var(--neg);
  color: #fff;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .modal-overlay {
    padding: .75rem;
  }

  .modal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-metric-value {
    font-size: 1rem;
  }
}

/* ─── THEAD ─── */
thead tr {
  background: var(--th-bg);
}

th {
  padding: .9rem 1.1rem;
  text-align: left;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .16em;
  color: var(--th-text);
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
  border-right: 1px solid rgba(232, 255, 71, .08);
}

th:last-child {
  border-right: none;
}

th:first-child {
  padding-left: 1.6rem;
}

td:first-child {
  padding-left: 1.6rem;
}

/* ─── TBODY ─── */
tbody tr {
  border-bottom: 1px solid var(--card-border);
  transition: background .1s;
}

tbody tr:nth-child(even) {
  background: var(--td-alt);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--hover-row);
}

td {
  padding: .82rem 1.1rem;
  color: var(--ink-mid);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: .78rem;
  border-right: 1px solid var(--card-border);
}

td:last-child {
  border-right: none;
}

td:first-child {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

td.num {
  font-family: var(--mono);
  font-size: .80rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

td.numLimit {
  font-family: var(--mono);
  font-size: .80rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0px;
}

td.accent {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--pos);
  font-weight: 500;
}

td.warn {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--neg);
}

/* ─── ICON BUTTONS ─── */
.icon-btn {
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .04em;
  padding: .3rem .7rem;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
}

.icon-btn:first-child:hover {
  background: var(--accent);
  color: var(--accent2);
  border-color: var(--accent);
}

.icon-btn:last-child:hover {
  background: var(--neg-pale);
  color: var(--neg);
  border-color: var(--neg);
}

/* ─── CALENDAR SECTION ─── */
.timeline-title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  margin-left: 1rem;
  overflow-y: auto;
}

/* legend strip above calendar */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  margin-bottom: 1rem;
  margin-left: 1rem;
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--ink-mid);
  letter-spacing: .04em;
  white-space: nowrap;
}

.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* calendar wrapper */
#timeline {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: enterPage .6s .3s var(--ease) both;
  margin-left: 1rem;
  margin-right: 1rem;
}

/* day-of-week header */
.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--accent);
  border-bottom: 2px solid var(--accent2);
}

.cal-dow {
  padding: .55rem 0;
  text-align: center;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .12em;
  color: rgba(232, 255, 71, .6);
  text-transform: uppercase;
}

/* grid of day cells */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--card-border);
  table-layout: fixed;
  width: 100%;
}

.cal-day {
  background: var(--card-bg);
  min-height: 72px;
  width: 100%;
  min-width: 0;
  /* prevent grid blowout */
  padding: .45rem .5rem .4rem;
  position: relative;
  transition: background .12s;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  overflow: hidden;
  /* clip anything that overflows */
}

.cal-day:hover {
  background: var(--hover-row);
}

/* today highlight */
.cal-day.today {
  background: #fffff0;
  box-shadow: inset 0 0 0 2px var(--accent2-dim);
}

.cal-day.today .cal-day-num {
  background: var(--accent);
  color: var(--accent2);
  border-radius: 3px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* day number */
.cal-day-num {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  color: var(--ink-dim);
  line-height: 1;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* empty cells (before month starts) */
.cal-day.empty {
  background: #f8f8fc;
  cursor: default;
}

/* card chip inside day */
.cal-chip {
  font-family: var(--sans);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: .18rem .4rem;
  border-radius: 3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  /* fill cell, never exceed it */
  max-width: 100%;
  min-width: 0;
  display: block;
  line-height: 1.4;
  box-sizing: border-box;
}

/* cut day marker */
.cal-cut {
  font-family: var(--mono);
  font-size: .52rem;
  letter-spacing: .06em;
  color: var(--neg);
  margin-top: auto;
  padding-top: .1rem;
  display: flex;
  align-items: center;
  gap: .2rem;
}

.cal-cut::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--neg);
  border-radius: 50%;
  flex-shrink: 0;
}

/* card color palette — more varied than before */
.color1 {
  background: #1a1a2e;
}

.color2 {
  background: #2d6a4f;
}

.color3 {
  background: #7b2d8b;
}

.color4 {
  background: #c25b00;
}

.color5 {
  background: #1565c0;
}

.color6 {
  background: #6d3b00;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--body-bg);
}

::-webkit-scrollbar-thumb {
  background: rgba(26, 26, 46, .25);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  .container>*:not(.header) {
    padding-left: 0rem;
    padding-right: 0rem;
  }

  .header {
    padding: 1.2rem 1.5rem;
  }

  .form-card {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .form-wrapper.open {
    max-height: 600px;
  }

  .summary {
    grid-template-columns: 1fr 1fr;
  }

}


@media (max-width: 700px) {
  .container>*:not(.header) {
    padding-left: 0rem;
    padding-right: 0rem;
  }

  .header {
    padding: 1rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .form-card {
    grid-template-columns: 1fr 1fr;
    padding: 1.2rem;
  }

  .form-wrapper.open {
    max-height: 800px;
  }

  .summary {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }

  .summary-value {
    font-size: 1.8rem;
  }

  #timeline {
    flex-direction: column;
  }

  .segment {
    border-right: none;
    border-bottom: 1px solid rgba(232, 255, 71, .12);
  }

  .rec-metric-value {
    font-size: 6.5rem;
  }
}

@media (max-width: 400px) {
  .summary {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.3rem;
  }
}

/* ─── IMAGE PICKER ─── */
.img-picker {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.img-picker-preview {
  width: 80px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--body-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-picker-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-picker-search {
  flex: 1;
  position: relative;
}

.img-picker-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-md);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.img-picker-results.open {
  display: block;
}

.img-picker-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .75rem;
  cursor: pointer;
  transition: background .12s;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--ink);
}

.img-picker-option:hover {
  background: var(--hover-row);
}

.img-picker-option img {
  width: 48px;
  height: 30px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}

/* ─── CARD IMAGE IN TABLE ─── */
.td-card-name {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
}

.td-card-img {
  width: 44px;
  height: 28px;
  object-fit: cover;
  border-radius: 3px;
  border: 0.5px solid var(--card-border);
  flex-shrink: 0;
  background: var(--body-bg);
}

.td-card-name span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink);
}

/* ─── CARD IMAGE IN REC-MAIN ─── */
/* ─── CARD IMAGE IN MODAL HEADER ─── */
.modal-title-with-img {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.modal-header-img {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .15);
  flex-shrink: 0;
}

.modal-title-with-img span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── PRIVACY TOAST ─── */
.privacy-toast {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, calc(100vw - 2rem));
  background: var(--accent);
  border: 1px solid var(--accent2);
  border-radius: var(--r-xl);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
  transition: top .45s var(--ease);
}

.privacy-toast.show {
  top: 1.5rem;
}

.privacy-toast-icon {
  font-size: 1.2rem;
  color: var(--accent2);
  flex-shrink: 0;
  margin-top: .1rem;
}

.privacy-toast-text {
  font-family: var(--sans);
  font-size: .75rem;
  color: rgba(255, 255, 255, .75);
  line-height: 1.55;
  flex: 1;
}

.privacy-toast-text strong {
  display: block;
  color: var(--accent2);
  font-size: .78rem;
  margin-bottom: .2rem;
  letter-spacing: .02em;
}

.privacy-toast-text em {
  font-style: normal;
  color: rgba(232, 255, 71, .7);
  font-size: .7rem;
}

.privacy-toast-close {
  background: none;
  border: 1px solid rgba(232, 255, 71, .25);
  color: rgba(232, 255, 71, .6);
  font-size: .7rem;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}

.privacy-toast-close:hover {
  background: rgba(232, 255, 71, .1);
  color: var(--accent2);
}

/* ─── CONFIRM MESSAGE ─── */
.confirm-msg {
  font-family: var(--sans);
  font-size: .82rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 0 .2rem;
}

.confirm-msg strong {
  color: var(--ink);
  font-weight: 700;
}

.header-left-div {
  display: flex;
  align-items: center;
}

/* ─── NOTIFICATION BELL ─── */
.notif-bell-wrapper {
  position: relative;
}

.notif-bell {
  background: none;
  border: 0px;
  color: var(--accent2);
  width: 34px;
  height: 34px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .15s, border-color .15s;
}

.notif-bell:hover {
  background: rgba(232, 255, 71, .08);
  border-color: var(--accent2);
}

.notif-badge {
  position: absolute;
  top: -0px;
  right: -0px;
  background: var(--neg);
  color: #fff;
  font-family: var(--mono);
  font-size: .5rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--accent);
}

.notif-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  animation: modalIn .2s var(--ease) both;
}

.notif-panel.open {
  display: block;
}

.notif-panel-header {
  background: var(--accent);
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent2);
}

.notif-panel-title {
  font-family: var(--display);
  font-size: .9rem;
  letter-spacing: .1em;
  color: var(--accent2);
}

.notif-panel-close {
  background: none;
  border: none;
  color: rgba(232, 255, 71, .6);
  cursor: pointer;
  font-size: .8rem;
  padding: .2rem;
  transition: color .15s;
}

.notif-panel-close:hover {
  color: var(--accent2);
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--card-border);
  transition: background .12s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--hover-row);
}

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r);
  background: var(--neg-pale);
  color: var(--neg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .99rem;
  flex-shrink: 0;
}

.notif-item-icon.paid {
    background: #10B98122;
    color: #10B981;
}

.notif-item-icon.warn {
  background: rgba(232, 255, 71, .1);
  color: var(--accent2-dim);
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .15rem;
}

.notif-item-desc {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--label-color);
  letter-spacing: .02em;
}

.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--label-color);
  letter-spacing: .06em;
}

/* ─── SUGGESTIONS BUTTON ─── */
.suggestions-btn {
  background: none;
  border: 0px;
  color: var(--ink-mid);
  width: 28px;
  height: 28px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: -2px;
  vertical-align: middle;
  transition: background .15s, border-color .15s;
}

.suggestions-btn:hover {
  background: var(--accent2-pale);
  border-color: var(--accent2);
  color: var(--accent2-dim);
}

.suggestions-badge {
  position: absolute;
  top: -0px;
  right: -3px;
  background: var(--neg);
  color: #fff;
  font-family: var(--mono);
  font-size: .5rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1px solid var(--body-bg);
}

/* ─── SUGGESTION ITEMS ─── */
.suggestion-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 0.5px solid var(--card-border);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.suggestion-item--issue .suggestion-item-icon {
  background: var(--neg-pale);
  color: var(--neg);
}

.suggestion-item--ok .suggestion-item-icon {
  background: var(--pos-pale);
  color: var(--pos);
}

.suggestion-item-text {
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--ink-mid);
  line-height: 1.6;
  flex: 1;
}

.suggestion-item-text strong {
  color: var(--ink);
}

.suggestion-divider {
  height: 1px;
  background: var(--card-border);
  margin: .5rem 0;
}

/* ─── FORM VALIDATION ─── */
.fmodal-input.input-error {
  border-color: var(--neg);
  background: var(--neg-pale);
}

.fmodal-error {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .06em;
  color: var(--neg);
  margin-top: .2rem;
}

/* ─── NOTIF ITEM CLICKABLE ─── */
.notif-item--clickable {
  cursor: pointer;
}

.notif-item--clickable:hover {
  background: var(--hover-row);
}

/* ─── FINANCE MODAL ─── */
.finance-month {
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  margin-bottom: 1rem;
  max-height: calc(5 * 48px); /* ajusta según altura real */
  overflow-y: auto;
}

.finance-month:last-child {
  margin-bottom: 0;
}

.finance-month-header {
  background: var(--accent);
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent2);
}

.finance-month-name {
  font-family: var(--display);
  font-size: .95rem;
  letter-spacing: .1em;
  color: var(--accent2);
}

.finance-month-total {
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 400;
  color: white;
}

.finance-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--card-border);
  transition: background .12s;
}

.finance-entry:last-of-type {
  border-bottom: none;
}

.finance-entry--paid {
  opacity: .6;
}

.finance-entry-name {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
}

.finance-entry-amount {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--ink);
}

.finance-entry-badge {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .08em;
  padding: .2rem .5rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

.finance-entry-badge--paid {
  background: var(--pos-pale);
  color: var(--pos);
}

.finance-entry-badge--pending {
  background: var(--neg-pale);
  color: var(--neg);
}

.finance-month-footer {
  display: flex;
  justify-content: space-between;
  padding: .6rem 1rem;
  background: var(--td-alt);
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--ink-dim);
  letter-spacing: .04em;
}

.finance-empty {
  padding: 1rem;
  text-align: center;
  font-family: var(--mono);
  font-size: .65rem;
  color: var(--label-color);
  letter-spacing: .06em;
}

/* ─── CYCLES LIST ─── */
.cycles-list {
  display: flex;
  flex-direction: column;
}

.cycle-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--card-border);
}

.cycle-item:last-child {
  border-bottom: none;
}

.cycle-item-month {
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink);
  width: 52px;
  flex-shrink: 0;
}

.cycle-item-amount {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--ink);
  flex: 1;
}

/* FOOTER */
.footer {
  background: var(--accent);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(26, 26, 46, .35);
}

/* CONFIG */
.config-btn {
  background: none;
  border: 0px;
  color: var(--ink-dim);
  width: 34px;
  height: 34px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .15s, border-color .15s;
}

.config-btn:hover {
  background: rgba(232, 255, 71, .08);
  border-color: var(--accent2);
}

.footer-btns {
  display: flex;
}

/* ─── CREATOR LINK ─── */
.creator-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.2rem;
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .75rem;
  transition: background .15s, border-color .15s;
}

.creator-link:hover {
  background: var(--accent2-pale);
  border-color: var(--accent2);
  color: var(--accent);
}

.creator-link i {
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── INFO MODAL ─── */
.info-version {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0;
}

.info-section {
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 1.2rem;
}

.info-section:last-child { border-bottom: none; }

.info-section-title {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.info-section-body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.info-section-body p {
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--ink-mid);
  line-height: 1.6;
}

.info-section-body strong {
  color: var(--ink);
}

/* ─── THEME PICKER ─── */
.theme-picker {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s, transform .15s;
}

.theme-option:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.theme-option--active {
  opacity: 1;
}

.theme-preview {
  width: 48px;
  height: 32px;
  border-radius: var(--r);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .15s;
}

.theme-option--active .theme-preview {
  border-color: var(--accent2);
}

.theme-preview-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
}

.theme-option-label {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .08em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.theme-option--active .theme-option-label {
  color: var(--ink);
  font-weight: 600;
}

/* ─── FINANCE CHART ─── */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-top: .75rem;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--ink-dim);
  letter-spacing: .04em;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── FINANCE GRADE ─── */
.finance-grade-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  border-radius: var(--r-xl);
  padding: 1.2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.finance-grade-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent2);
}

.finance-grade-label {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .14em;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  margin-bottom: .3rem;
}

.finance-grade-value {
  font-family: var(--display);
  font-size: 3.5rem;
  line-height: 1;
  letter-spacing: .06em;
}

.finance-grade-desc {
  font-family: var(--sans);
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  margin-top: .3rem;
}

.finance-grade-emoji {
  font-size: 2.5rem;
}