/* ==========================================================================
   GOTEO — Cazador de Suscripciones y Cobros Recurrentes (Powered by AQ-INVEST)
   Identidad Visual Propia: Blanco Limpio · Tinta Violeta (#161326) · Coral (#F43F5E) · Violeta (#7C3AED)
   Web Desktop + Mobile PWA Responsive
   ========================================================================== */

:root {
  --bg: #F6F5FB;
  --bg-soft: #ECEAF6;
  --surface: #FFFFFF;
  --plum: #161326;
  --plum-deep: #0E0B1A;
  --coral: #F43F5E;
  --coral-soft: rgba(244, 63, 94, 0.12);
  --violet: #7C3AED;
  --violet-soft: rgba(124, 58, 237, 0.12);
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.12);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.12);
  --ink: #161326;
  --muted: #5C5873;
  --dim: #8D88A6;
  --border: rgba(22, 19, 38, 0.10);
  --border-strong: rgba(22, 19, 38, 0.20);
  --shadow: 0 8px 26px rgba(22, 19, 38, 0.06);
  --radius: 18px;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #0F0D1A;
  --bg-soft: #19162B;
  --surface: #1D1930;
  --plum: #151126;
  --plum-deep: #0A0814;
  --coral: #FB7185;
  --coral-soft: rgba(251, 113, 133, 0.16);
  --violet: #A78BFA;
  --violet-soft: rgba(167, 139, 250, 0.16);
  --green: #34D399;
  --green-soft: rgba(52, 211, 153, 0.16);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.16);
  --ink: #F5F3FF;
  --muted: #A7A2C2;
  --dim: #757094;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, select { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* Onboarding */
.onb-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.14), transparent 45%), radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.14), transparent 45%), var(--bg);
}
.onb-card { width: 100%; max-width: 490px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 30px 26px; box-shadow: var(--shadow); }
.onb-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.onb-brand img { width: 46px; height: 46px; border-radius: 14px; }
.onb-title { font-family: var(--font-display); font-size: 31px; font-weight: 800; margin: 0 0 8px; line-height: 1.1; letter-spacing: -0.03em; }
.onb-sub { font-size: 14px; color: var(--muted); margin: 0 0 20px; line-height: 1.55; }

/* Shell */
.frame { display: flex; min-height: 100vh; }
.sidenav {
  width: 260px;
  background: linear-gradient(180deg, var(--plum) 0%, var(--plum-deep) 100%);
  color: #F5F3FF;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
}
.sidenav-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; cursor: pointer; }
.sidenav-brand img { width: 38px; height: 38px; border-radius: 12px; }
.sidenav-brand h1 { font-family: var(--font-display); font-size: 23px; margin: 0; line-height: 1; font-weight: 800; }
.powered { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.72; display: block; margin-top: 3px; }
.powered strong { color: #FB7185; font-weight: 700; }

.nav-list { display: flex; flex-direction: column; gap: 6px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(245, 243, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-btn.on { background: linear-gradient(135deg, rgba(244,63,94,0.24), rgba(124,58,237,0.28)); color: #fff; box-shadow: inset 0 0 0 1px rgba(251,113,133,0.34); }
.nav-btn .ico { font-size: 17px; width: 22px; text-align: center; }

.sidenav-cta { margin-top: 16px; }
.sidenav-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-direction: column; gap: 6px; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 251, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 13px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
[data-theme="dark"] .topbar { background: rgba(15, 13, 26, 0.92); }
.topbar-left { display: flex; align-items: center; gap: 10px; }
.mobile-logo { display: none; width: 32px; height: 32px; border-radius: 9px; }
.page-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
.page-sub { font-size: 12px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.content { width: 100%; max-width: 1060px; margin: 0 auto; padding: 20px 26px 86px; }

/* Hero Shock Card */
.hero-drip {
  background: radial-gradient(circle at top right, rgba(244, 63, 94, 0.34), transparent 52%), radial-gradient(circle at bottom left, rgba(124, 58, 237, 0.32), transparent 50%), linear-gradient(135deg, var(--plum) 0%, var(--plum-deep) 100%);
  color: #F5F3FF;
  border-radius: 22px;
  padding: 24px 26px;
  margin-bottom: 16px;
  box-shadow: 0 18px 40px rgba(22, 19, 38, 0.24);
}
.hero-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #FDA4AF; }
.hero-num { font-family: var(--font-display); font-size: clamp(34px, 5vw, 50px); font-weight: 800; line-height: 1.04; margin: 6px 0 4px; letter-spacing: -0.03em; }
.hero-sub { font-size: 13.5px; color: rgba(245, 243, 255, 0.78); margin-bottom: 18px; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.14); }
.h-box { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.11); border-radius: 13px; padding: 11px 12px; }
.h-box small { display: block; font-size: 11px; color: rgba(245,243,255,0.72); margin-bottom: 2px; }
.h-box strong { font-family: var(--font-display); font-size: 17px; font-weight: 700; display: block; }

/* Quick Catalog Chips */
.cat-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-sub {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .12s, border-color .15s;
}
.quick-sub:hover { transform: translateY(-1px); border-color: var(--coral); }

/* Cards & Grid */
.grid-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid-2 .card, .grid-equal .card { margin-bottom: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.hint { font-size: 12.5px; color: var(--muted); }

/* Buttons & Pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 12px; border: none; font-size: 13.5px; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .12s, opacity .15s; }
.btn:hover { opacity: 0.93; transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-grad { background: linear-gradient(135deg, #F43F5E, #7C3AED); color: #fff; }
.btn-plum { background: var(--plum); color: #fff; }
.btn-soft { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--border); }
.btn-danger { background: var(--coral-soft); color: var(--coral); }
.btn-sm { padding: 7px 11px; font-size: 12px; border-radius: 9px; }
.btn-wide { width: 100%; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.pill.coral { background: var(--coral-soft); color: var(--coral); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.pro { background: linear-gradient(135deg, #F43F5E, #7C3AED); color: #fff; cursor: pointer; border: none; padding: 5px 11px; }

.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; }

/* Segmented & Rows */
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

.item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: none; }
.item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.item-ico { width: 42px; height: 42px; border-radius: 13px; background: var(--bg-soft); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.item-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.item-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.item-right { text-align: right; flex-shrink: 0; }
.item-val { font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.item-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; }
.text-btn { background: none; border: none; color: var(--violet); font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 3px; }
.text-btn.coral { color: var(--coral); }

/* Trim Simulator & Calendar */
.trim-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .15s, background .15s;
}
.trim-row.checked { border-color: var(--coral); background: var(--coral-soft); }
.trim-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.kpi-box small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.kpi-box strong { display: block; font-family: var(--font-display); font-size: 22px; margin-top: 4px; }

.cal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cal-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 13px; padding: 12px; }
.cal-box.spike { border-color: rgba(244, 63, 94, 0.45); background: var(--coral-soft); }

.demo-bar { background: var(--violet-soft); border: 1px solid rgba(124, 58, 237, 0.28); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; flex-wrap: wrap; }
.lock-box { background: var(--bg-soft); border: 1px dashed var(--border-strong); border-radius: 16px; padding: 22px 18px; text-align: center; }

/* Forms & Modals */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.input, .select { width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); font-size: 14px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(14, 11, 26, 0.58); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.modal-card { width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,0.32); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { font-family: var(--font-display); font-size: 22px; margin: 0; }
.close-btn { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--ink); cursor: pointer; font-weight: 700; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.plan-opt { position: relative; border: 2px solid var(--border); background: var(--bg); border-radius: 14px; padding: 14px 12px; text-align: left; cursor: pointer; color: var(--ink); }
.plan-opt.on { border-color: var(--coral); background: var(--coral-soft); }
.plan-ribbon { position: absolute; top: -10px; right: 10px; background: linear-gradient(135deg, #F43F5E, #7C3AED); color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }

.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); grid-template-columns: repeat(4, 1fr); }
.bnav-btn { border: none; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font-size: 11px; font-weight: 700; cursor: pointer; }
.bnav-btn .ico { font-size: 18px; }
.bnav-btn.on { color: var(--coral); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--plum-deep); color: #F5F3FF; padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 700; box-shadow: 0 12px 30px rgba(0,0,0,0.28); max-width: 92vw; text-align: center; }

@media (max-width: 960px) {
  .sidenav { display: none; }
  .mobile-logo { display: block; }
  .bottom-nav { display: grid; }
  .topbar { padding: 12px 16px; }
  .content { padding: 14px 14px 96px; }
  .hero-drip { padding: 20px 18px; }
  .hero-stats, .cal-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-equal, .trim-kpis { grid-template-columns: 1fr; }
  .toast { bottom: 78px; }
}
