@import url('https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap');

:root {
  /* Base navy "Black but blue" (ref: My Campus Fund) */
  --bg: #0a0d16;
  --bg-2: #0f1320;
  --panel: rgba(18, 23, 40, 0.72);
  --panel-solid: #14192a;
  --panel-2: rgba(24, 30, 52, 0.6);
  --panel-3: #161c2e;

  /* Acentos cyan + verde (los nombres -gold se conservan para no reescribir todo el markup) */
  --cyan: #09dcea;
  --cyan-br: #14f5f1;
  --green: #14c157;
  --green-br: #00ff57;
  --blue: #3563e0;

  --gold: #16d98d;          /* acento primario (verde-teal) */
  --gold-2: #7cf0c4;        /* claro */
  --gold-deep: #0ad2ce;     /* cyan, cierre de gradientes */
  --gold-line: rgba(9, 220, 234, 0.22);
  --gold-line-strong: rgba(9, 220, 234, 0.45);
  --gold-glow: rgba(10, 210, 206, 0.30);

  --text: #ffffff;
  --text-soft: #c1ced6;
  --muted: #8a97a6;
  --muted-2: #5e6b7c;
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.10);

  --pos: #14c157;
  --pos-soft: rgba(20, 193, 87, 0.14);
  --neg: #f23844;
  --neg-soft: rgba(242, 56, 68, 0.12);
  --danger: #f23844;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, 0.85);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1300px 800px at 80% -15%, rgba(9, 220, 234, 0.10), transparent 55%),
    radial-gradient(1000px 600px at -8% 4%, rgba(20, 193, 87, 0.06), transparent 52%),
    radial-gradient(1000px 1000px at 50% 130%, rgba(53, 99, 224, 0.12), transparent 60%),
    radial-gradient(140% 120% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.55) 100%),
    var(--bg);
  color: var(--text);
  font-family: "Play", "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.1px;
  min-height: 100vh;
  position: relative;
}
/* Hilo de oro superior + grano sutil para textura "cara" */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 100;
  background: linear-gradient(90deg, transparent, var(--cyan) 25%, var(--green) 50%, var(--cyan) 75%, transparent);
  opacity: 0.8;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 26px 56px; position: relative; z-index: 1; }

/* ---------- Video de fondo ---------- */
.bg-video { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-video video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%; width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: saturate(.7) brightness(.4);
}
/* Capa oscura para que el contenido siga legible sobre el video */
.bg-video-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(140% 120% at 50% 40%, transparent 50%, rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(rgba(10, 12, 18, 0.85), rgba(10, 12, 18, 0.85));
}

/* ---------- Logos de fondo (marca de agua) ---------- */
.bg-logos { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
/* Marca de agua: monocromo dorado, muy sutil, difuminado y sangrando por bordes */
.bgl {
  position: absolute; display: block;
  filter: grayscale(1) sepia(1) saturate(2.2) brightness(.6) blur(.4px);
}
.bgl-btc    { top: -4%;  right: -3%; width: 320px; opacity: .06; transform: rotate(-10deg); }
.bgl-usdt   { top: 44%;  left: -4%;  width: 250px; opacity: .05; transform: rotate(8deg); }
.bgl-gold   { bottom: -6%; left: 3%;  width: 400px; opacity: .07; transform: rotate(-4deg); }
.bgl-nasdaq { bottom: 8%; right: -4%; width: 440px; opacity: .055; }
@media (max-width: 820px) {
  .bgl-btc { width: 200px; } .bgl-usdt { width: 160px; }
  .bgl-gold { width: 260px; } .bgl-nasdaq { width: 300px; }
}

/* ---------- Header ---------- */
header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; padding-bottom: 24px; margin-bottom: 26px; flex-wrap: wrap;
  border-bottom: 1px solid var(--gold-line);
}
.brand { display: flex; align-items: center; gap: 17px; }
.logo {
  font-size: 28px; line-height: 1;
  width: 58px; height: 58px; display: grid; place-items: center;
  background: linear-gradient(155deg, #1d222e, #0d1016);
  border: 1px solid var(--gold-line-strong); border-radius: 17px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(0,0,0,.4), 0 0 24px -6px var(--gold-glow);
  position: relative; overflow: hidden;
}
.logo img { width: 72%; height: 72%; object-fit: contain; position: relative; z-index: 1; }
.logo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(130deg, transparent 30%, rgba(255,255,255,.14) 48%, transparent 60%);
  transform: translateX(-120%); animation: sheen 6s ease-in-out infinite;
}
@keyframes sheen { 0%,70% { transform: translateX(-120%);} 85%,100% { transform: translateX(120%);} }
h1 {
  font-size: 25px; font-weight: 700; letter-spacing: 0.4px;
  background: linear-gradient(92deg, #ffffff 10%, var(--gold-2) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); font-size: 12.5px; letter-spacing: .3px; text-transform: uppercase; }
.sub b { color: var(--gold-2); font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.header-actions { display: flex; align-items: center; gap: 13px; }

/* Bloque de patrimonio (estilo "private banking") */
.balance {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  padding-right: 24px; border-right: 1px solid var(--gold-line);
}
.balance-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--muted); font-weight: 600; }
.balance-value {
  font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1.15;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(92deg, #ffffff 15%, var(--gold-2) 70%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.balance-sub { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.balance-acct { font-size: 11.5px; color: var(--muted); letter-spacing: .3px; font-variant-numeric: tabular-nums; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pos-soft); color: var(--pos);
  border: 1px solid rgba(61, 220, 151, 0.32); border-radius: 999px;
  padding: 8px 15px; font-size: 12.5px; font-weight: 600; letter-spacing: .2px;
  backdrop-filter: blur(6px);
}
.status-pill.paused { background: rgba(9, 220, 234,.1); color: var(--gold-2); border-color: var(--gold-line); }
.status-pill.paused .dot { background: var(--gold); animation: none; }

.acct-select {
  background: var(--panel-3); color: var(--text); border: 1px solid var(--gold-line);
  border-radius: 999px; padding: 8px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; max-width: 220px; transition: border-color .15s;
}
.acct-select:hover { border-color: var(--gold-line-strong); }
.acct-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(9, 220, 234,.14); }

.status-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pos);
  box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,220,151,.5);} 70% { box-shadow: 0 0 0 8px rgba(61,220,151,0);} 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0);}
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, #0ad2ce, #14c156);
  color: #04241b; border: none;
  padding: 11px 20px; border-radius: 999px; font-size: 14px;
  cursor: pointer; font-weight: 700; letter-spacing: 0.3px;
  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
  box-shadow: 0 8px 22px -10px var(--gold-glow), 0 1px 0 rgba(255,255,255,.25) inset;
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%);
  transform: translateX(-130%); transition: transform .6s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -10px var(--gold-glow), 0 1px 0 rgba(255,255,255,.3) inset; filter: brightness(1.03); }
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: rgba(255,255,255,.02); border: 1px solid var(--gold-line); color: var(--text); box-shadow: none; }
.btn.ghost:hover { border-color: var(--gold-line-strong); color: var(--gold-2); }
.btn.danger { background: linear-gradient(180deg, #ff8a6b, var(--danger)); color: #fff; box-shadow: 0 8px 22px -10px rgba(242, 56, 68,.5); }
.btn.small { padding: 9px 14px; font-size: 13px; }
button:disabled { opacity: .4; cursor: not-allowed; transform: none !important; filter: grayscale(.4); }
button:disabled::after { display: none; }

/* ---------- Status card (bloqueo + violaciones, limpio) ---------- */
.status-card {
  background: var(--panel); border: 1px solid var(--border-2);
  border-radius: var(--radius); margin-bottom: 18px; overflow: hidden;
  box-shadow: var(--shadow-card); backdrop-filter: blur(12px);
}
.status-card.locked { border-color: rgba(242, 56, 68,.32); }
.status-card.locked .status-main { background: linear-gradient(100deg, rgba(242, 56, 68,.10), transparent 70%); }
.status-main { display: flex; align-items: center; gap: 14px; padding: 16px 20px; }
.status-ico { font-size: 22px; line-height: 1; }
.status-text { flex: 1; min-width: 0; }
.status-title { font-weight: 700; font-size: 15px; color: #ffd0bf; letter-spacing: .2px; }
.status-desc { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.status-when { text-align: right; line-height: 1.15; }
.status-when .status-h { display: block; font-weight: 700; font-size: 17px; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.status-when .status-d { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.status-rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.status-card.warn .status-rules { border-top: none; }
.status-rules li {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 20px;
  font-size: 13px; border-bottom: 1px solid var(--border-soft);
}
.status-rules li:last-child { border-bottom: none; }
.status-rules li b {
  flex: 0 0 auto; min-width: 150px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.status-rules li.lock b { color: #ff9a80; }
.status-rules li.warn b { color: var(--gold-2); }
.status-rules li span { color: var(--text-soft); }
@media (max-width: 600px) {
  .status-rules li { flex-direction: column; gap: 2px; }
  .status-rules li b { min-width: 0; }
}

/* ---------- Phrase ---------- */
.phrase {
  background: linear-gradient(100deg, var(--panel-2), rgba(20,24,33,.4));
  border: 1px solid var(--border); border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm); padding: 15px 20px; margin-bottom: 24px;
  font-style: italic; color: var(--text-soft); font-size: 15px; backdrop-filter: blur(8px);
}

/* ---------- Grid + cards ---------- */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.kpis { grid-template-columns: repeat(4, 1fr); }
.periods { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border-2); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px) saturate(120%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
/* Filete de oro superior en las tarjetas */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line-strong) 30%, var(--gold-line-strong) 70%, transparent);
}
.kpis .card::before, .periods .card::before {
  height: 2px; background: linear-gradient(90deg, var(--gold), transparent 75%); opacity: .6;
}
.kpis .card:hover, .periods .card:hover {
  transform: translateY(-4px); border-color: var(--gold-line-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(9, 220, 234,.1), 0 0 30px -10px var(--gold-glow);
}

.kpi-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600; }
.kpi { font-size: 33px; font-weight: 700; margin: 10px 0 3px; letter-spacing: -0.6px; font-variant-numeric: tabular-nums; }
/* El KPI principal (Net Profit) en oro cuando es la 1a tarjeta */
.kpis .card:first-child .kpi {
  background: linear-gradient(92deg, var(--gold-2), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kpis .card:first-child .kpi.neg {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--neg);
}
.kpi-sub { color: var(--muted); font-size: 13px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.lock-card .lock-form { display: flex; gap: 9px; margin-top: 13px; align-items: center; }
select {
  background: var(--panel-3); color: var(--text); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 14px; cursor: pointer;
  transition: border-color .15s;
}
select:focus, input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(9, 220, 234,.14); }

/* ---------- Section headings ---------- */
.card h2 {
  font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; letter-spacing: 0.3px;
}
section.card { margin-bottom: 16px; }

/* ---------- Notify ---------- */
.notify-head, .coach-head, .equity-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.badge {
  display: inline-block; background: rgba(9, 220, 234,.1); border: 1px solid var(--gold-line);
  border-radius: 8px; padding: 3px 10px; margin-right: 6px; font-size: 12px; color: var(--gold-2); font-weight: 600;
}
.badge.pending { background: rgba(242, 56, 68,.1); border-color: rgba(242, 56, 68,.3); color: #ff9a80; }

/* Cuentas enlazadas (fondeo) */
.linked-form { display: grid; grid-template-columns: 1.2fr .8fr 1.2fr 1.2fr auto; gap: 12px 14px; align-items: end; margin: 6px 0 16px; }
.linked-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.linked-form input, .linked-form select {
  background: var(--panel-3); color: var(--text); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 14px;
}
.linked-form button { white-space: nowrap; }
.linked-table { margin-top: 6px; }
.linked-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.linked-actions form { display: inline; }
@media (max-width: 820px) { .linked-form { grid-template-columns: 1fr 1fr; } }

/* ---------- Equity ---------- */
.equity-head { align-items: baseline; }
.equity-stats { display: flex; gap: 20px; align-items: baseline; font-size: 14px; flex-wrap: wrap; }
.equity-stats b { font-variant-numeric: tabular-nums; color: #fff; }
.equity-chart {
  display: block; width: 100%; height: 260px; color: var(--pos);
  filter: drop-shadow(0 8px 18px rgba(61,220,151,.2));
}
.equity-chart.down { color: var(--neg); filter: drop-shadow(0 8px 18px rgba(255,107,107,.2)); }
.equity-axis { display: flex; justify-content: space-between; margin-top: 9px; font-size: 12px; }

/* ---------- Coach ---------- */
.coach .insight {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 22px; margin-top: 8px;
}
.coach .insight h3 { color: var(--gold-2); font-size: 15px; margin: 18px 0 7px; }
.coach .insight p { margin: 9px 0; color: var(--text-soft); }
.coach .insight ul { margin: 9px 0 9px 22px; color: var(--text-soft); }
.coach .insight li { margin: 4px 0; }
.coach .insight strong { color: #fff; }
.insight-meta { margin-top: 11px; font-size: 12px; }
code { background: var(--panel-3); padding: 2px 7px; border-radius: 6px; font-size: 13px; color: var(--gold-2); }

/* ---------- Plan form ---------- */
.plan h2 { margin-bottom: 0; }
.plan-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 18px; align-items: end; border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
fieldset.plan-fields[disabled] { opacity: .5; }
.plan-form label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.plan-form label .hint { text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 400; }
.plan-form input[type="number"], .plan-form select {
  background: var(--panel-3); color: var(--text); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; width: 100%;
  font-variant-numeric: tabular-nums; transition: border-color .15s;
}
.plan-form .checkbox { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 500; }
.plan-form .checkbox input { width: 18px; height: 18px; accent-color: var(--gold); }
.plan-form button { grid-column: 1 / -1; justify-self: start; margin-top: 6px; }
.session-now { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.session-now b { color: var(--gold-2); }

/* ---------- Journal por día (estilo registro) ---------- */
.jday { margin-bottom: 16px; }
.jday-head {
  display: flex; align-items: baseline; gap: 14px; padding: 8px 12px;
  background: linear-gradient(90deg, rgba(9, 220, 234,.08), transparent);
  border-left: 2px solid var(--gold); border-radius: 8px; margin-bottom: 4px;
}
.jday-date { font-weight: 700; font-size: 14px; letter-spacing: .3px; }
.jday-pnl { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.jday-meta { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.jrow {
  display: grid;
  grid-template-columns: 110px 1fr 54px 46px 1.2fr 64px 66px minmax(78px,auto) 50px 26px;
  gap: 10px; align-items: center; padding: 9px 12px;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.jpct { font-variant-numeric: tabular-nums; font-size: 12.5px; text-align: right; }
.jdur { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.jbadge { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-align: center; letter-spacing: .4px; }
.jbadge.win { background: var(--pos-soft); color: var(--pos); }
.jbadge.loss { background: var(--neg-soft); color: var(--neg); }
.jbadge.be { background: var(--panel-3); color: var(--muted); }
.jrow:hover { background: rgba(255,255,255,.025); }
.jtime { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.jsym { font-weight: 600; }
.jside { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-align: center; letter-spacing: .5px; }
.jside.buy { background: var(--pos-soft); color: var(--pos); }
.jside.sell { background: var(--neg-soft); color: var(--neg); }
.jvol { color: var(--muted); font-variant-numeric: tabular-nums; }
.jprice { color: var(--text-soft); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.jpnl { text-align: right; font-weight: 700; }
.jnote-btn { background: none; border: none; cursor: pointer; font-size: 15px; opacity: .55; transition: opacity .15s; }
.jnote-btn:hover { opacity: 1; }
.jrow.win { box-shadow: inset 3px 0 0 var(--pos); }
.jrow.loss { box-shadow: inset 3px 0 0 var(--neg); }
.jnote { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; padding: 2px 0 2px 4px; border-left: 2px solid var(--gold-line); }
.jnote b { color: var(--gold-2); }

/* ---------- Análisis del journal (KPIs + score) ---------- */
.jstats-body { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.jscore { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jscore .radar { width: 150px; height: 150px; }
.jscore-num { text-align: center; line-height: 1; }
.jscore-num b { font-size: 26px; font-weight: 750;
  background: linear-gradient(92deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.jscore-num span { color: var(--muted); font-size: 13px; }
.jscore-num small { display: block; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.jkpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; flex: 1; min-width: 280px; }
.jkpi { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.jkpi-label { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.jkpi-val { display: block; font-size: 21px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.jkpi-val .pos { color: var(--pos); } .jkpi-val .neg { color: var(--neg); }
.jkpi-val span { font-size: 15px; margin-right: 8px; }
.jkpi-sub { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Gráficos del journal ---------- */
.jcharts { display: grid; grid-template-columns: 2fr 2fr 3fr; gap: 20px; }
.jchart-block h3 { font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.jchart-block h3 span { font-variant-numeric: tabular-nums; }
.jchart { display: block; width: 100%; height: 150px; color: var(--pos); }
.jchart.down { color: var(--neg); }
.jbars { display: block; width: 100%; height: 150px; }
.jbars rect.up { fill: var(--pos); } .jbars rect.down { fill: var(--neg); }
@media (max-width: 820px) { .jcharts { grid-template-columns: 1fr; } }

/* ---------- Calendario de P&L ---------- */
.jcal-grid { display: flex; flex-direction: column; gap: 6px; }
.jcal-row { display: grid; grid-template-columns: repeat(7, 1fr) 1.1fr; gap: 6px; }
.jcal-head-row .lbl { text-align: center; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; padding: 4px 0; }
.jcal-cell {
  position: relative; min-height: 62px; border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 8px; background: var(--panel-2);
  display: flex; flex-direction: column; gap: 2px;
}
.jcal-cell.lbl { min-height: 0; border: none; background: none; padding: 4px 0; }
.jcal-cell.out { opacity: .35; }
.jcal-cell.pos { background: rgba(61,220,151,.12); border-color: rgba(61,220,151,.3); }
.jcal-cell.neg { background: rgba(255,107,107,.12); border-color: rgba(255,107,107,.3); }
.jcal-num { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.jcal-pnl { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.jcal-cell.pos .jcal-pnl { color: var(--pos); }
.jcal-cell.neg .jcal-pnl { color: var(--neg); }
.jcal-n { color: var(--muted); font-size: 10.5px; }
.jcal-cell.week { background: linear-gradient(160deg, rgba(9, 220, 234,.08), transparent); border-color: var(--gold-line); justify-content: center; align-items: flex-end; }
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-arrow {
  color: var(--gold-2); text-decoration: none; font-size: 13px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--gold-line); border-radius: 8px; transition: all .15s;
}
.cal-arrow:hover { border-color: var(--gold); background: rgba(9, 220, 234,.1); }
@media (max-width: 600px) {
  .jcal-cell { min-height: 48px; padding: 4px; }
  .jcal-pnl { font-size: 11px; }
}
@media (max-width: 820px) {
  .jrow { grid-template-columns: 1fr auto auto auto; gap: 8px; }
  .jrow .jtime, .jrow .jprice, .jrow .jvol, .jrow .jpct, .jrow .jdur { display: none; }
}

/* ---------- Journal table ---------- */
.journal h2 { margin-bottom: 16px; }
.muted { color: var(--muted); font-weight: 400; font-size: 13px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 13px; border-bottom: 1px solid var(--border); }
thead th { color: var(--muted); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(9, 220, 234,.04); }
tbody tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
tr.win td:first-child { box-shadow: inset 3px 0 0 var(--pos); }
tr.loss td:first-child { box-shadow: inset 3px 0 0 var(--neg); }
.empty { text-align: center; color: var(--muted); padding: 30px; }

footer { color: var(--muted-2); font-size: 11.5px; text-align: center; margin-top: 36px; letter-spacing: .4px; text-transform: uppercase; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1f2636; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* ---------- Menu de navegacion (pestañas) ---------- */
.mainnav {
  position: sticky; top: 12px; z-index: 20;
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 22px 0 26px; padding: 7px;
  background: linear-gradient(155deg, rgba(29,34,46,.92), rgba(13,16,22,.92));
  border: 1px solid var(--gold-line-strong); border-radius: 16px;
  box-shadow: var(--shadow-card), 0 0 24px -8px var(--gold-glow);
  backdrop-filter: blur(10px);
}
.navlink {
  position: relative; flex: 1 1 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: var(--text-soft);
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .2px;
  cursor: pointer; white-space: nowrap;
  transition: color .18s, background .18s, border-color .18s, transform .12s;
}
.navlink .navico { font-size: 15px; line-height: 1; filter: grayscale(.25); opacity: .85; }
.navlink:hover { color: var(--gold-2); border-color: var(--gold-line); background: rgba(255,255,255,.03); }
.navlink.active {
  color: #1a1205;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  border-color: var(--gold-line-strong);
  box-shadow: 0 8px 20px -10px var(--gold-glow), 0 1px 0 rgba(255,255,255,.3) inset;
}
.navlink.active .navico { filter: none; opacity: 1; }
[data-section][hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .kpis, .periods { grid-template-columns: repeat(2, 1fr); }
  .plan-form { grid-template-columns: repeat(2, 1fr); }
  .wrap { padding: 28px 16px 44px; }
}
@media (max-width: 480px) {
  .kpis, .periods, .plan-form { grid-template-columns: 1fr; }
  header { flex-direction: column; align-items: flex-start; }
  .header-right { width: 100%; justify-content: space-between; }
  .balance { align-items: flex-start; border-right: none; padding-right: 0; }
  .mainnav { gap: 4px; padding: 5px; }
  .navlink { padding: 9px 10px; font-size: 12px; flex-basis: calc(50% - 4px); }
}

/* ===== Cerebro de coaching ===== */
.brain-scores { display: flex; gap: 8px; align-items: center; }
.brain-sub { margin: 18px 0 8px; font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); }
.brain-patterns { list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px; }
.brain-patterns .pat { padding: 10px 12px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-soft); line-height: 1.5; }
.brain-patterns .pat.risk { border-color: rgba(255, 107, 107, 0.35);
  background: var(--neg-soft); }
.brain-patterns .pat.warn { border-color: rgba(9, 220, 234, 0.3); }
.brain-patterns .pat.good { border-color: rgba(61, 220, 151, 0.3);
  background: var(--pos-soft); }
.pat-badge { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-right: 8px; white-space: nowrap; }
.trend { display: flex; gap: 3px; align-items: flex-end; height: 64px;
  padding: 8px 4px 0; }
.trend-day { display: flex; gap: 1px; align-items: flex-end; height: 100%;
  flex: 1 1 auto; max-width: 26px; }
.trend-bar { width: 50%; border-radius: 2px 2px 0 0; min-height: 2px; }
.trend-bar.score { background: linear-gradient(180deg, var(--gold-2), var(--gold-deep)); }
.trend-bar.disc { background: var(--pos); opacity: 0.75; }
.brain-profile { margin-top: 14px; }
.brain-profile summary { cursor: pointer; color: var(--gold);
  font-size: 13.5px; padding: 6px 0; }
.brain-profile .insight { margin-top: 8px; }
.insight-feedback { display: flex; gap: 12px; align-items: center;
  margin-top: 10px; }
.insight-feedback form { display: flex; gap: 8px; }
.btn.ghost { background: transparent; border: 1px solid var(--border-2);
  color: var(--muted); }

/* ===== Chat de psicologia ===== */
.psy-chat { display: flex; flex-direction: column; gap: 10px; margin: 14px 0;
  max-height: 420px; overflow-y: auto; padding-right: 6px; }
.psy-msg { display: flex; flex-direction: column; max-width: 85%; }
.psy-msg.user { align-self: flex-end; align-items: flex-end; }
.psy-msg.assistant { align-self: flex-start; align-items: flex-start; }
.psy-bubble { padding: 10px 14px; border-radius: 14px; font-size: 13.5px;
  line-height: 1.55; color: var(--text-soft); }
.psy-msg.user .psy-bubble { background: var(--panel-3);
  border: 1px solid var(--gold-line); border-bottom-right-radius: 4px; }
.psy-msg.assistant .psy-bubble { background: var(--panel-2);
  border: 1px solid var(--border-2); border-bottom-left-radius: 4px; }
.psy-bubble p { margin: 0 0 6px; } .psy-bubble p:last-child { margin: 0; }
.psy-bubble ul { margin: 4px 0; padding-left: 18px; }
.psy-time { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.psy-form { display: flex; gap: 8px; margin-top: 10px; }
.psy-form input[type="text"] { flex: 1; background: var(--panel-2);
  border: 1px solid var(--border-2); border-radius: 12px; padding: 10px 14px;
  color: var(--text); font-size: 13.5px; outline: none; }
.psy-form input[type="text"]:focus { border-color: var(--gold-line-strong); }

/* ===== Gestion de cuentas / zona peligrosa ===== */
.danger-zone { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.danger-zone summary { cursor: pointer; color: var(--neg); font-size: 13px; padding: 4px 0; }
.danger-zone .psy-form input[type="text"] { max-width: 220px; }
