@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --bg: #06111D;
  --panel: #08131F;
  --panel-2: #08131F;
  --panel-3: #172A47;
  --border: #183044;
  --border-soft: rgba(24, 48, 68, 0.75);
  --green: #20E87B;
  --green-2: #1ED168;
  --green-dim: rgba(32, 232, 123, 0.1);
  --amber: #F5B942;
  --amber-dim: rgba(245, 185, 66, 0.1);
  --red: #FF5263;
  --red-dim: rgba(255, 82, 99, 0.1);
  --info: #22A7F0;
  --neutral: #8DA1B5;
  --cyan: #22A7F0;
  --blue: #206BFF;
  --blue-2: #22A7F0;
  --blue-dim: rgba(34, 167, 240, 0.12);
  --text-title: #F4F8FF;
  --text: #C9D6E8;
  --text-count: #8DA1B5;
  --font: 'Inter', 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow: 0 12px 32px rgba(2, 8, 18, 0.55), 0 0 0 1px rgba(24, 48, 68, 0.35);
  --glow: 0 0 26px rgba(32, 232, 123, 0.13);
  --glow-blue: 0 0 26px rgba(34, 167, 240, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(32, 107, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 107, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(39, 169, 255, 0.3); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1B2F52; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #27406B; }

.app-shell { display: flex; min-height: 100vh; opacity: 0; transition: opacity 0.5s ease; }
.app-shell.unlocked { opacity: 1; }

/* ============ SIDEBAR ============ */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background-color: #08131F;
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; }

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #07100B;
  font-weight: 900;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name { font-weight: 800; font-size: 13px; letter-spacing: 0.08em; color: var(--text-title); }
.brand-sub { font-size: 11px; color: var(--text-count); }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  color: var(--text-count);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: all 0.16s ease;
}

.nav-item:hover { color: var(--text-title); background: var(--panel-2); cursor: grab; }
.nav-item:active { cursor: grabbing; }
.nav-item.dragging { opacity: 0.45; border: 1px dashed rgba(34, 167, 240, 0.6); }

.nav-item.active {
  color: var(--text-title);
  background: var(--blue-dim);
  border: 1px solid rgba(32, 107, 255, 0.35);
  box-shadow: 0 0 18px rgba(32, 107, 255, 0.16), inset 3px 0 0 var(--blue);
}

.nav-icon { display: flex; align-items: center; }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-foot { margin-top: auto; }

.lock-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-count);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--panel-2);
}

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: dot-pulse 1.6s ease-in-out infinite; }
@keyframes dot-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ============ MAIN / TOPBAR ============ */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background-color: #08131F;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-title); }
.topbar-title p { font-size: 12.5px; color: var(--text-count); margin-top: 2px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.month-picker { display: flex; align-items: center; gap: 8px; }
.ps-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-count); }

select {
  background: var(--panel-2);
  color: var(--text-title);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
select:focus { border-color: var(--green); }

.btn-add {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 6px 18px -6px rgba(32, 107, 255, 0.5);
}
.btn-add:hover { filter: brightness(1.12); box-shadow: 0 8px 24px -6px rgba(32, 107, 255, 0.6); }

.icon-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-count);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
}
.icon-btn:hover { color: var(--cyan); border-color: rgba(39, 169, 255, 0.4); }

.notify-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); opacity: 0; }
.notify-dot.ping { animation: dot-pulse 0.9s ease; }

.content { padding: 24px 28px 60px; }

/* ============ HERO CARD ============ */
.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background:
    radial-gradient(900px 240px at 12% -10%, rgba(32, 232, 123, 0.05), transparent 60%),
    radial-gradient(700px 200px at 88% -20%, rgba(34, 167, 240, 0.07), transparent 60%),
    linear-gradient(120deg, #0B1722, #08131F);
  border: 1px solid #173247;
  border-radius: 20px;
  padding: 30px 34px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glow), var(--shadow);
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  opacity: 0.55;
  background: linear-gradient(90deg, var(--green), var(--cyan) 60%, transparent);
}

.hero-left { position: relative; flex: 1; min-width: 280px; z-index: 1; }
.hero-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-count); text-transform: uppercase; }
.hero-value { font-size: clamp(48px, 7vw, 74px); font-weight: 900; letter-spacing: -0.03em; color: var(--green); line-height: 1.05; margin: 8px 0 10px; text-shadow: 0 0 30px rgba(37, 231, 122, 0.25); }
.hero-curve { position: absolute; right: 0; bottom: 0; left: 0; width: 100%; height: 130px; pointer-events: none; opacity: 0.45; }
.hero-growth { font-size: 14px; font-weight: 700; }
.hero-growth.up { color: var(--green); }
.hero-growth.down { color: var(--amber); }

.hero-meta { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-meta svg { display: block; }
.meta-ring-text { position: absolute; text-align: center; }
.meta-label { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-count); }
.meta-pct { font-size: 30px; font-weight: 900; color: var(--green); text-shadow: 0 0 20px rgba(37, 231, 122, 0.4); }
.meta-sub { font-size: 10px; color: var(--text-count); max-width: 120px; margin: 2px auto 0; }

/* ============ MINI CARDS ============ */
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }

.mini-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mini-card:hover { border-color: #22435F; }

.mini-card.green { border-left: 3px solid var(--green); }
.mini-card.amber { border-left: 3px solid var(--amber); }
.mini-card.red { border-left: 3px solid var(--red); }

.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-count); text-transform: uppercase; }
.mini-icon { display: flex; color: var(--text-count); cursor: pointer; transition: transform 0.2s ease, opacity 0.2s ease; }
.mini-icon:hover { transform: scale(1.18); opacity: 1; }
.mini-icon .ico { width: 18px; height: 18px; }
.mini-card.green .mini-icon { color: var(--green); }
.mini-card.amber .mini-icon { color: var(--amber); }
.mini-card.red .mini-icon { color: var(--red); }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.quick-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.quick-card:hover { transform: translateY(-2px); border-color: #22435F; }
.quick-card[data-quick="pago"] { border-left: 3px solid var(--info); }
.quick-card[data-quick="brecha"] { border-left: 3px solid var(--amber); }
.quick-card[data-quick="septiembre"] { border-left: 3px solid var(--red); }
.quick-card[data-quick="fugas"] { border-left: 3px solid var(--green); }
.quick-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-count); }
.quick-value { font-size: 24px; font-weight: 900; font-family: var(--font-mono); color: var(--text-title); }
.quick-sub { font-size: 12.5px; color: var(--text-count); }
@media (max-width: 900px) { .quick-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: 1fr; } }

.mini-value { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; color: var(--text-title); }
.mini-card.green .mini-value { color: var(--green); }
.mini-card.amber .mini-value { color: var(--amber); }
.mini-card.red .mini-value { color: var(--red); }

.mini-sub { font-size: 12px; color: var(--text-count); margin-top: 5px; }

/* ============ MID GRID ============ */
.mid-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; align-items: stretch; }
.mid-grid > .panel { min-height: 100%; }

.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.panel:hover { border-color: #22435F; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { font-size: 16.5px; font-weight: 800; color: var(--text-title); }
.legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-count); }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.lg-dot.inc { background: var(--green); }
.lg-dot.exp { background: var(--amber); }
.legend-sub { font-size: 12.5px; color: var(--text-count); }
.chart-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-count); font-weight: 600; margin: 2px 0 14px; }
.mini-var { font-size: 12.5px; font-weight: 800; font-family: var(--font-mono); margin: 2px 0 6px; }
.mini-var.up { color: var(--green); }
.mini-var.down { color: var(--amber); }
.vbar-chart {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 150px;
  margin-bottom: 18px;
  padding: 0 8px;
}
.vbar-wrap { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; flex: 1; gap: 6px; min-width: 0; }
.vbar-val { font-size: 12px; font-weight: 800; font-family: var(--font-mono); color: var(--text-title); white-space: nowrap; }
.vbar { width: 100%; max-width: 74px; min-height: 6px; border-radius: 8px 8px 4px 4px; transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.vbar-label { font-size: 11px; color: var(--text-count); font-weight: 700; white-space: nowrap; }
.sync-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.sync-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-title); font-weight: 700; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: dot-pulse 2.2s ease infinite; }
.sync-time { font-size: 11px; color: var(--text-count); margin-top: 4px; font-family: var(--font-mono); }

.chart-body { min-height: 120px; }
.desglose-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.desglose-total b { font-family: var(--font-mono); font-size: 18px; font-weight: 900; }
.desglose-total.up { background: rgba(37, 231, 122, 0.1); border: 1px solid rgba(37, 231, 122, 0.3); }
.desglose-total.up b { color: var(--green); }
.desglose-total.down { background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.3); }
.desglose-total.down b { color: var(--red); }

/* ============ WEEK ACTIONS ============ */
.week-actions { display: flex; flex-direction: column; gap: 10px; }

.wa-item {
  display: flex;
  gap: 11px;
  align-items: center;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.wa-item:hover { border-color: rgba(39, 169, 255, 0.4); box-shadow: var(--glow-blue); transform: translateX(3px); }
.wa-item > div { flex: 1; min-width: 0; }
.wa-arrow { color: var(--text-count); font-size: 15px; opacity: 0; transition: all 0.18s ease; }
.wa-item:hover .wa-arrow { opacity: 1; color: var(--cyan); }
.wa-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.wa-item.red .wa-icon { background: var(--red-dim); color: var(--red); }
.wa-item.green .wa-icon { background: var(--green-dim); color: var(--green); }
.wa-item.amber .wa-icon { background: var(--amber-dim); color: var(--amber); }
.wa-title { font-size: 13px; font-weight: 700; color: var(--text-title); }
.wa-sub { font-size: 11.5px; color: var(--text-count); margin-top: 2px; }

/* ============ BOTTOM GRID ============ */
.bottom-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }

.table-scroll { overflow: auto; max-height: 520px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }

.tbl thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  color: var(--text-count);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.tbl tbody tr:hover { background: rgba(32, 107, 255, 0.08); }
.tbl .amt-inc { color: var(--green); font-family: var(--font-mono); font-weight: 700; }
.tbl .amt-exp { color: var(--amber); font-family: var(--font-mono); font-weight: 700; }
.tbl .cell-title { color: var(--text-title); font-weight: 600; }
.tbl-sm { font-size: 13.5px; }
.tbl-sm thead th { font-size: 11.5px; }
.tbl-sm tbody td { padding: 9px 12px; }

.assets-panel { display: flex; flex-direction: column; justify-content: center; }
.assets-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.mov-panel { margin-bottom: 0; }
.table-scroll-mov { max-height: 72vh; overflow: auto; }
.mov-note { color: var(--text-count); font-style: italic; }

/* ============ GASTOS POR DÍA ============ */
.day-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.day-form input[type="date"],
.day-form input[type="text"],
.day-form input[type="number"] {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-title);
  outline: none;
}
.day-form input[type="date"]:focus,
.day-form input[type="text"]:focus,
.day-form input[type="number"]:focus { border-color: var(--green); }
.day-form input[type="text"] { flex: 1; min-width: 200px; }
.day-form textarea {
  flex: 1;
  min-width: 260px;
  min-height: 66px;
  background: #08131F;
  color: var(--text-title);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}
.day-form textarea:focus { border-color: var(--green); }
.day-form textarea::placeholder { color: var(--text-count); }
.day-form select {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-title);
  outline: none;
}
.day-form input::placeholder { color: var(--text-count); }

/* ============ AVANCE DE PAGOS ============ */
.pay-progress { width: 110px; height: 7px; background: var(--panel-3); border-radius: 6px; overflow: hidden; margin-bottom: 5px; }
.pay-bar { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green-2), var(--green)); }
.pay-meta { font-size: 12px; color: var(--text-count); margin-bottom: 6px; }
.pay-quota-big {
  display: inline-block;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--green);
  font-family: var(--font-mono);
  line-height: 1.05;
  margin-bottom: 6px;
}
.pay-quota-big.sm { font-size: 20px; margin-bottom: 2px; }

/* ============ INGRESOS — DESGLOSE COMPLETO ============ */
.ing-detail { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.ing-card {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px;
}
.ing-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ing-title { font-size: 19px; font-weight: 800; color: var(--text-title); }
.ing-roas {
  background: rgba(37, 231, 122, 0.12);
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
  padding: 5px 12px;
  border-radius: 999px;
}
.ing-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.ing-metric {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ing-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-count); }
.ing-value { font-size: 22px; font-weight: 900; font-family: var(--font-mono); }
.ing-value.up { color: var(--green); }
.ing-value.down { color: var(--red); }
.ing-highlight {
  background: rgba(255, 176, 32, 0.08);
  border-left: 3px solid var(--amber);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 14px;
}
.ing-card .tbl-sm { margin-top: 4px; }
.pay-btn {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(37, 231, 122, 0.3);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pay-btn:hover { background: var(--green); color: #07100B; }
.assets-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-count); text-transform: uppercase; }
.assets-value { font-size: 44px; font-weight: 900; letter-spacing: -0.02em; color: var(--green); margin: 8px 0 4px; }
.assets-sub { font-size: 12px; color: var(--text-count); }
.assets-bars { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.ab-row { display: flex; flex-direction: column; gap: 5px; }
.ab-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-count); }
.ab-track { height: 7px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.ab-fill { height: 100%; border-radius: 6px; background: var(--green); }

/* ============ META CARDS ============ */
.meta-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.meta-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.meta-card h4 { font-size: 13px; font-weight: 800; color: var(--text-title); margin-bottom: 8px; }
.meta-card .mc-value { font-size: 26px; font-weight: 900; color: var(--green); }
.meta-card .mc-sub { font-size: 12px; color: var(--text-count); margin-top: 5px; }
.meta-card .mc-progress { height: 8px; background: var(--panel-3); border-radius: 6px; margin-top: 12px; overflow: hidden; }
.meta-card .mc-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--green-2), var(--green)); }

/* ============ TOOLTIP / TO-TOP ============ */
.chart-tip {
  position: fixed;
  z-index: 1000;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-title);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  max-width: 260px;
}
.chart-tip.visible { opacity: 1; transform: none; }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-count);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 900;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--green); border-color: rgba(37, 231, 122, 0.4); }

/* ============ TOAST ============ */
.toast-wrap { position: fixed; top: 74px; right: 22px; z-index: 1500; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel-2);
  color: var(--text-title);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  padding: 13px 18px;
  width: 300px;
  max-width: calc(100vw - 44px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.3s ease;
}
.toast.out { opacity: 0; transform: translateX(24px); transition: all 0.3s ease; }
.toast-title { font-weight: 800; font-size: 13px; margin-bottom: 3px; }
.toast-msg { font-size: 12.5px; color: var(--text-count); line-height: 1.45; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ============ CHAT AGENTE ============ */
.agent-chat { position: fixed; right: 22px; bottom: 22px; z-index: 1400; }
.agent-fab {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #07100B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(37, 231, 122, 0.5);
  transition: transform 0.18s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.agent-fab:hover { transform: scale(1.06); }
.agent-fab .ico { width: 28px; height: 28px; }
.agent-fab .brain { width: 32px; height: 32px; }
.brain-nodes circle { fill: #D9FFF0; }
.brain-orbit { transform-origin: 12px 12px; }
.brain-orbit.o1 { animation: brain-spin 3.2s linear infinite; }
.brain-orbit.o2 { animation: brain-spin 4.6s linear infinite reverse; }
.brain-orbit.o3 { animation: brain-spin 2.4s linear infinite; }
.brain-dot { fill: #fff; filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.9)); }
@keyframes brain-spin { to { transform: rotate(360deg); } }
.agent-fab::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 20px;
  border: 2px solid rgba(32, 232, 123, 0.55);
  animation: fab-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes fab-pulse { 0% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.agent-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 360px;
  max-width: calc(100vw - 44px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(2, 8, 18, 0.6), var(--glow-blue);
  display: none;
  overflow: hidden;
  flex-direction: column;
}
.agent-panel.open { display: flex; }
.agent-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.agent-title { font-weight: 800; font-size: 13.5px; color: var(--text-title); }
.agent-close { background: none; border: none; color: var(--text-count); font-size: 20px; cursor: pointer; }
.agent-close:hover { color: var(--red); }
.agent-body { height: 250px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.agent-msg { max-width: 85%; padding: 9px 13px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.agent-msg.bot { background: var(--panel-2); border: 1px solid var(--border-soft); color: var(--text); align-self: flex-start; }
.agent-msg.user { background: var(--green); color: #07100B; font-weight: 600; align-self: flex-end; }
.agent-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px; border-top: 1px solid var(--border); }
.agent-chip { font-size: 12px; font-weight: 700; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: all 0.15s ease; }
.agent-chip:hover { border-color: var(--green); color: var(--green); }
.agent-input-row { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--panel); }
.agent-input-row input { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; font-family: var(--font); font-size: 13px; background: var(--panel-2); color: var(--text-title); outline: none; }
.agent-input-row input:focus { border-color: var(--green); }
.agent-send { background: var(--green); border: none; color: #07100B; border-radius: 10px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.agent-send .ico { width: 17px; height: 17px; }

/* ============ GATE ============ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(700px 400px at 50% 40%, rgba(39, 169, 255, 0.08), transparent 70%), var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate-card {
  width: 380px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 32px 28px;
  text-align: center;
  box-shadow: var(--shadow), var(--glow-blue);
}
.gate-lock { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 22px -8px rgba(32, 107, 255, 0.6); }
.gate-lock .ico { width: 26px; height: 26px; }
.gate-card h2 { font-size: 20px; font-weight: 800; color: var(--text-title); }
.gate-card .sub { font-size: 14px; color: var(--text-count); margin: 10px 0 20px; line-height: 1.55; }
.gate-input { position: relative; margin-bottom: 14px; }
.gate-input input { width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 46px 13px 16px; color: var(--text-title); font-family: var(--font-mono); font-size: 18px; letter-spacing: 0.3em; text-align: center; outline: none; }
.gate-input input[type="email"] { font-family: var(--font); font-size: 15px; letter-spacing: normal; text-align: left; }
.gate-input input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(39, 169, 255, 0.15); }
.gate-input .eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-count); cursor: pointer; padding: 4px; display: flex; }
.gate-input .eye .ico { width: 18px; height: 18px; }
.gate-input .eye .eye-on { display: block; }
.gate-input .eye.off .eye-on { display: none; }
.gate-input .eye .eye-off { display: none; }
.gate-input .eye.off .eye-off { display: block; }
.gate-btn { width: 100%; background: linear-gradient(135deg, var(--blue), var(--blue-2)); border: none; border-radius: 12px; padding: 14px; color: #fff; font-family: var(--font); font-weight: 800; font-size: 14px; cursor: pointer; transition: all 0.18s ease; box-shadow: 0 8px 22px -8px rgba(32, 107, 255, 0.55); }
.gate-btn:hover { filter: brightness(1.12); }
.gate-error { color: var(--red); font-size: 12.5px; margin-top: 12px; min-height: 16px; }
.gate-shake { animation: gate-shake 0.4s ease; }
@keyframes gate-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ============ DEUDAS / PULSO FINANCIERO ============ */
.debt-alert-banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #0B1722;
  border: 1px solid #173247;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.pulso-title { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--text-count); text-transform: uppercase; margin-bottom: 10px; }
.pulso-block {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(24, 48, 68, 0.35);
  border: 1px solid #173247;
}
.pulso-block.pos { border-left: 3px solid var(--green); }
.pulso-block.pos .pulso-dot { color: var(--green); }
.pulso-block.act { border-left: 3px solid var(--amber); }
.pulso-block.act .pulso-dot { color: var(--amber); }
.pulso-block.crit { border-left: 3px solid var(--red); }
.pulso-block.crit .pulso-dot { color: var(--red); }
.pulso-dot { font-size: 15px; line-height: 1; flex-shrink: 0; }
.pulso-block b { color: var(--text-title); }
.usd-mini { font-size: 12px; color: var(--text-count); font-weight: 600; }

/* ============ CATEGORY BARS ============ */
.cat-bars { display: flex; flex-direction: column; gap: 13px; }
.cat-row { display: flex; flex-direction: column; gap: 5px; }
.cat-head { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--text); font-weight: 600; }
.cat-track { height: 8px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.cat-fill { height: 100%; border-radius: 6px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }

.view { display: none; }
.view.active { display: block; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .mid-grid, .bottom-grid { grid-template-columns: 1fr; }
}

.menu-btn { display: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; z-index: 60; }
.side-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
}
.side-backdrop.show { display: block; }

@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open { transform: none; }
  .main-area { width: 100%; }
  .topbar { flex-wrap: wrap; padding: 14px 16px; }
  .content { padding: 16px; }
  .mini-cards, .meta-cards { grid-template-columns: 1fr; }
  .hero-card { padding: 24px; }
}

@media (max-width: 560px) {
  .topbar-title h1 { font-size: 17px; }
  .hero-value { font-size: 38px; }
  .mini-cards { gap: 12px; }
  .assets-strip { grid-template-columns: 1fr; }
  .agent-fab { width: 62px; height: 62px; border-radius: 18px; right: 14px; bottom: 18px; }
  .agent-chat { right: 14px; bottom: 18px; }
  .agent-panel { position: fixed; left: 10px; right: 10px; bottom: 86px; width: auto; max-width: none; }
  .agent-body { height: 46vh; }
  .sidebar { width: 82%; max-width: 320px; }
}

.mov-sentinel { height: 8px; }

/* ============ MODAL MES ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 18, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 660px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  padding: 22px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-count);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { color: var(--text-title); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { font-size: 20px; font-weight: 800; color: var(--text-title); }
.modal-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.row-click { cursor: pointer; }
.row-click:hover td { background: var(--panel-2); }
.ico-info {
  width: 16px;
  height: 16px;
  color: var(--green);
  margin-left: 5px;
  vertical-align: -2px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.ico-info:hover { transform: scale(1.25); }
.cards-graph { display: flex; flex-direction: column; gap: 14px; }

/* ============ PUNTOS ANCLA ============ */
.ancla-hero { margin-bottom: 16px; }
.ancla-sep {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(255, 176, 32, 0.08));
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ancla-sep-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 900; letter-spacing: 0.04em; color: var(--red); font-size: 14.5px; }
.ancla-sep-text { font-size: 15px; line-height: 1.5; color: var(--text); }
.ancla-sep-action { font-size: 14px; line-height: 1.45; color: var(--text); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 10px 12px; }
.ancla-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ancla-card {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ancla-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ancla-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 231, 122, 0.14);
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.ancla-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 1px solid;
  border-radius: 999px;
  padding: 3px 10px;
}
.ancla-title { font-size: 16px; font-weight: 800; color: var(--text-title); line-height: 1.3; }
.ancla-desc { font-size: 13.5px; line-height: 1.55; color: var(--text); }
.ancla-action {
  margin-top: 2px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  padding: 8px 10px;
}
.ancla-plan { display: flex; flex-direction: column; gap: 10px; }
.ancla-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14.5px;
  color: var(--text);
}
.ancla-item input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--green); cursor: pointer; }
.ancla-item em { font-style: normal; margin-left: 8px; }

/* ============ NOTAS ============ */
.notas-list { display: flex; flex-wrap: wrap; gap: 16px 14px; align-items: flex-start; }
.nota-item {
  width: 250px;
  min-height: 130px;
  position: relative;
  border-radius: 4px;
  padding: 22px 16px 14px;
  box-shadow: 0 10px 24px rgba(2, 8, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.nota-item:hover { transform: rotate(0deg) translateY(-4px); z-index: 5; box-shadow: 0 16px 34px rgba(2, 8, 18, 0.65); }
.nota-item::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 78px;
  height: 20px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.nota-item.c0 { background: linear-gradient(170deg, #FFF9B1, #FFEF7A); transform: rotate(-0.8deg); }
.nota-item.c1 { background: linear-gradient(170deg, #D9F6E1, #C3EFCF); transform: rotate(0.7deg); }
.nota-item.c2 { background: linear-gradient(170deg, #D9E9FF, #C2DDFF); transform: rotate(-0.5deg); }
.nota-item.c3 { background: linear-gradient(170deg, #FFE0E6, #FFCDD6); transform: rotate(0.9deg); }
.nota-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.nota-text { font-size: 14px; line-height: 1.5; color: #1F2937; word-break: break-word; white-space: pre-wrap; }
.nota-del {
  background: none;
  border: none;
  color: rgba(31, 41, 55, 0.45);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.nota-del:hover { color: var(--red); }
.nota-meta { font-size: 11px; color: rgba(31, 41, 55, 0.6); margin-top: 12px; font-family: var(--font-mono); }
.nota-extract {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #14532D;
  background: rgba(255, 255, 255, 0.55);
  border-left: 2px solid #16A34A;
  border-radius: 6px;
  padding: 5px 8px;
}
/* ============ POMODORO / FOCO ============ */
.nota-focus {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: #0B1722;
  border: 1px solid #173247;
  border-left: 3px solid #F5B942;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 16px;
}
.nota-focus.hidden { display: none; }
.nota-focus b { color: var(--text-title); }
.nf-active { color: var(--amber); font-weight: 700; }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.nt-timer {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(31, 41, 55, 0.25);
  background: rgba(255, 255, 255, 0.55);
  color: #1F2937;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  transition: all 0.15s ease;
}
.nt-timer:hover { transform: scale(1.08); border-color: #1F2937; }
.nt-timer.on { background: #FF5263; color: #fff; border-color: #FF5263; animation: dot-pulse 1.2s ease-in-out infinite; }
.nota-item.timer-on { box-shadow: 0 0 0 2px rgba(245, 185, 66, 0.55), 0 14px 30px rgba(2, 8, 18, 0.6); }
/* ============ INICIO · PROYECTOS ============ */
.proy-moti {
  background:
    radial-gradient(700px 200px at 8% -30%, rgba(32, 232, 123, 0.08), transparent 60%),
    linear-gradient(120deg, #0B1722, #08131F);
  border: 1px solid #173247;
  border-left: 3px solid var(--green);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.proy-moti-title { font-size: 20px; font-weight: 900; color: var(--text-title); letter-spacing: -0.01em; margin-bottom: 6px; }
.proy-moti-sub { font-size: 13.5px; color: var(--text); line-height: 1.55; margin-top: 3px; }
.proy-moti-sub b { color: var(--text-title); }
.proy-moti-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: var(--amber);
  border: 1px solid rgba(245, 185, 66, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 6px;
  vertical-align: middle;
}
.proy-head-right { display: flex; align-items: center; gap: 6px; }
.proy-prio {
  background: #08131F;
  border: 1px solid var(--border);
  color: var(--text-title);
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  max-width: 150px;
}
.proy-prio:focus { border-color: var(--cyan); }
.proy-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.proy-tab {
  background: #08131F;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}
.proy-tab:hover { border-color: #22435F; }
.proy-tab.active { background: var(--blue-dim); border-color: rgba(34, 167, 240, 0.4); color: var(--text-title); }
.proy-sub.hidden { display: none; }
.proy-inactivos.hidden { display: none; }

.proy-daily-bar { margin-bottom: 16px; }
.proy-db {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  background: #0B1722;
  border: 1px solid #173247;
  border-radius: 16px;
  padding: 16px 18px;
}
.proy-db > div { display: flex; flex-direction: column; gap: 2px; }
.proy-db-l { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-count); }
.proy-db b { font-size: 17px; font-family: var(--font-mono); color: var(--text-title); }

.proy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.proy-card {
  background: linear-gradient(180deg, #0B1722, #08131F);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.proy-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proy-name { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.proy-name b { color: var(--text-title); }
.proy-sema { font-size: 18px; }
.proy-del { background: none; border: none; color: var(--text-count); font-size: 19px; cursor: pointer; line-height: 1; padding: 0 4px; }
.proy-del:hover { color: var(--red); }
.proy-objetivo { font-size: 13px; color: var(--text-count); line-height: 1.45; }
.proy-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.proy-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(24, 48, 68, 0.4);
}
.proy-stats { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.proy-stats > div { display: flex; flex-direction: column; gap: 1px; background: rgba(24, 48, 68, 0.3); border-radius: 10px; padding: 8px 10px; }
.proy-st-l { font-size: 9.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-count); }
.proy-stats > div > span:last-child { font-size: 14px; font-weight: 800; font-family: var(--font-mono); color: var(--text-title); }
.proy-progress { height: 9px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.proy-bar { height: 100%; border-radius: 6px; transition: width 0.4s ease; }
.proy-info { font-size: 12.5px; color: var(--text-count); line-height: 1.5; }
.proy-accion { font-size: 12.5px; color: var(--cyan); background: rgba(34, 167, 240, 0.08); border-left: 2px solid var(--cyan); border-radius: 6px; padding: 6px 10px; }
.proy-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.proy-focus.on { background: linear-gradient(135deg, #FF5263, #b3323f); box-shadow: 0 6px 18px -6px rgba(255, 82, 99, 0.5); }
.proy-q {
  background: #08131F;
  border: 1px solid var(--border);
  color: var(--text-title);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.proy-q:hover { border-color: var(--green); color: var(--green); }
.proy-nota-row { display: flex; gap: 8px; }
.proy-nota-inp {
  flex: 1;
  background: #08131F;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--text-title);
  font-size: 13px;
  outline: none;
}
.proy-nota-inp:focus { border-color: var(--green); }
.proy-nota-btn {
  background: var(--blue-dim);
  border: 1px solid rgba(34, 167, 240, 0.4);
  color: var(--text-title);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}
.proy-nota-btn:hover { border-color: var(--cyan); }
.proy-hist { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(24, 48, 68, 0.6); padding-top: 8px; }
.proy-hist-item { font-size: 12px; color: var(--text-count); display: flex; justify-content: space-between; gap: 8px; }
.proy-hist-item em { color: var(--text); font-style: normal; }

.proy-daily-row { display: grid; grid-template-columns: auto 1fr 120px 44px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid rgba(24, 48, 68, 0.5); }
.proy-daily-sema { font-size: 20px; }
.proy-daily-info b { color: var(--text-title); font-size: 14px; }
.proy-daily-meta { font-size: 12px; color: var(--text-count); }
.proy-daily-bar { height: 8px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.proy-daily-pct { text-align: right; font-family: var(--font-mono); font-weight: 800; }
.proy-streak-big { font-size: 20px; color: var(--text-title); font-weight: 800; margin-bottom: 12px; }
.proy-streak-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.proy-streak-day {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-dim);
  border: 1px solid rgba(32, 232, 123, 0.35);
  color: var(--green);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.nota-empty { font-size: 14.5px; color: var(--text-count); text-align: center; padding: 26px 0; width: 100%; }

/* ============ GRÁFICO DE TIEMPO ============ */
.time-graph { display: flex; flex-direction: column; gap: 10px; }
.tg-total { font-size: 13px; color: var(--text-count); margin-bottom: 4px; }
.tg-total b { color: var(--text-title); }
.tg-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px 12px; align-items: center; }
.tg-name { font-size: 13.5px; font-weight: 700; color: var(--text-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-h { font-family: var(--font-mono); font-size: 13px; color: var(--text); font-weight: 700; }
.tg-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #08131F;
  color: var(--text-title);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}
.tg-btn:hover { border-color: var(--green); }
.tg-bar-wrap { grid-column: 1 / -1; height: 10px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.tg-bar { height: 100%; border-radius: 6px; transition: width 0.3s ease; }

/* ============ FECHAS DE PAGO ============ */
.fechas-prox { margin-bottom: 4px; }

/* ============ ANALISIS DE AHORROS ============ */
.personal-charts { margin-top: 18px; }
.pc-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-count); font-weight: 700; margin-bottom: 8px; }
.pc-pair { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; max-width: 74px; justify-content: center; }
.pc-pair .vbar { width: 16px; max-width: none; min-height: 3px; }
.pc-fin-title { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: var(--text-count); text-transform: uppercase; margin: 18px 0 6px; }
.pc-line { width: 100%; height: 130px; display: block; }
.pc-dots { display: flex; justify-content: space-between; margin-top: 4px; }
.pc-dot-label { font-size: 10px; color: var(--text-count); font-family: var(--font-mono); white-space: nowrap; }

/* ============ MAPA MENTAL ============ */
.mindmap { overflow: auto; }
.mindmap-svg { width: 100%; max-width: 940px; height: auto; display: block; margin: 0 auto; }
.mm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--text); }
.mm-leg { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.mm-note { color: var(--text-count); font-weight: 600; width: 100%; }
.nota-ia {
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(37, 231, 122, 0.1), rgba(37, 231, 122, 0.04));
  border: 1px solid rgba(37, 231, 122, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}
.nota-ia.hidden { display: none; }
.ia-main { margin-bottom: 8px; }
.ia-ctx {
  font-size: 13px;
  color: var(--text-count);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.5;
}

.debt-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-donut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text); }
.sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.chart-bars { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .debt-charts { grid-template-columns: 1fr; } }

/* ============ REPORTES — DESGLOSE ============ */
.reporte-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.rk-card {
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rk-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-count); }
.rk-value { font-size: 20px; font-weight: 900; font-family: var(--font-mono); color: var(--text-title); }
.rk-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
}
.rk-badge.ok { background: rgba(37, 231, 122, 0.14); color: var(--green); }
.rk-badge.bad { background: rgba(255, 107, 107, 0.14); color: var(--red); }
.reportes-detail { display: flex; flex-direction: column; gap: 18px; }

/* ============ METAS — DESGLOSE ============ */
.metas-detail { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.meta-hero {
  background: linear-gradient(135deg, rgba(37, 231, 122, 0.12), rgba(37, 231, 122, 0.04));
  border: 1px solid rgba(37, 231, 122, 0.25);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meta-hero-num { font-size: 48px; font-weight: 900; color: var(--green); letter-spacing: -0.03em; }
.meta-hero-bar { height: 14px; background: var(--panel-3); border-radius: 8px; overflow: hidden; }
.meta-hero-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--green-2), var(--green)); }
.meta-hero-row { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; color: var(--text); }
.meta-hero-row span { color: var(--text-count); }
.meta-hero-row b { font-family: var(--font-mono); font-weight: 800; color: var(--text-title); }
.meta-columns { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.meta-sum { display: flex; flex-direction: column; gap: 12px; }
.meta-sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--text); border-bottom: 1px dashed var(--border-soft); padding-bottom: 8px; }
.meta-sum-row b { font-family: var(--font-mono); font-weight: 800; color: var(--text-title); }
.meta-note {
  background: rgba(255, 176, 32, 0.08);
  border-left: 3px solid var(--amber);
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  margin-top: 6px;
}
@media (max-width: 900px) { .meta-columns { grid-template-columns: 1fr; } }

/* ============ NEGOCIO — DÍA DE PAGO ============ */
.dia-pago { color: var(--green); font-weight: 700; white-space: nowrap; }
.negocio-alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
}
.negocio-alert.warn { background: rgba(255, 107, 107, 0.12); border: 1px solid rgba(255, 107, 107, 0.4); color: var(--red); }
.negocio-alert.ok { background: rgba(37, 231, 122, 0.1); border: 1px solid rgba(37, 231, 122, 0.3); color: var(--green); }
.negocio-graph { display: flex; flex-direction: column; gap: 12px; }
.nb-row { display: flex; flex-direction: column; gap: 5px; }
.nb-head { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--text); font-weight: 600; }
.nb-days {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 2px 10px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
}
.nb-sub { font-size: 12px; color: var(--text-count); }
.nb-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-count);
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 4px;
  flex-wrap: wrap;
}

/* ============ ALERTAS DE SECCIÓN ============ */
.sec-alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 16px;
}
.sec-alert.warn { background: rgba(245, 185, 66, 0.1); border: 1px solid rgba(245, 185, 66, 0.4); color: var(--amber); }
.sec-alert.ok { background: rgba(32, 232, 123, 0.08); border: 1px solid rgba(32, 232, 123, 0.28); color: var(--green); }
