/* =====================================================================
   Impulsa — hoja de estilos
   Mobile first · modo claro/oscuro · sin dependencias externas
   ===================================================================== */

@font-face { font-family: "Jakarta"; font-weight: 400; font-display: swap; src: url("../fonts/jakarta-400.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 500; font-display: swap; src: url("../fonts/jakarta-500.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 600; font-display: swap; src: url("../fonts/jakarta-600.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 700; font-display: swap; src: url("../fonts/jakarta-700.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 800; font-display: swap; src: url("../fonts/jakarta-800.woff2") format("woff2"); }

/* ------------------------------------------------------------- tokens */
:root {
  --font: "Jakarta", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;

  --bg: #f6f5fb;
  --bg-soft: #efedf8;
  --surface: #ffffff;
  --surface-2: #f8f7fd;
  --border: #e7e4f2;
  --border-strong: #d6d1ea;
  --text: #15132b;
  --text-2: #3d3a5c;
  --muted: #6e6a8a;
  --faint: #a29fbb;

  --primary: #6b46ff;
  --primary-hover: #5a33f5;
  --primary-ink: #ffffff;
  --primary-soft: #efeaff;
  --primary-soft-ink: #4b2bd6;
  --accent: #ff4f8b;
  --grad: linear-gradient(135deg, #6b46ff 0%, #b04cff 52%, #ff4f8b 100%);
  --grad-soft: linear-gradient(135deg, #f1ecff 0%, #fbeaff 55%, #ffe9f1 100%);

  --ok: #12a150;        --ok-soft: #e4f7ec;      --ok-ink: #0b6b35;
  --warn: #d97706;      --warn-soft: #fff3df;    --warn-ink: #8a4a03;
  --info: #2f6bff;      --info-soft: #e7efff;    --info-ink: #1d48b8;
  --bad: #e5354f;       --bad-soft: #ffe8ec;     --bad-ink: #a51c31;
  --partial: #9b51e0;   --partial-soft: #f3e9ff; --partial-ink: #6a2aa8;
  --muted-soft: #efeef5;

  --yape: #742284;
  --plin: #00a19b;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(23, 18, 66, .06);
  --shadow: 0 1px 2px rgba(23, 18, 66, .05), 0 8px 24px -10px rgba(23, 18, 66, .14);
  --shadow-lg: 0 24px 60px -20px rgba(55, 30, 160, .35);
  --ring: 0 0 0 4px rgba(107, 70, 255, .18);

  --sidebar: 264px;
  --topbar: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0c17; --bg-soft: #13121f; --surface: #171627; --surface-2: #1d1c30;
    --border: #2a2840; --border-strong: #3a3757; --text: #f0eefb; --text-2: #cfcbe6;
    --muted: #a19dbd; --faint: #6f6b8c;
    --primary: #8566ff; --primary-hover: #9779ff; --primary-soft: #251f4a; --primary-soft-ink: #c3b4ff;
    --grad-soft: linear-gradient(135deg, #1f1a40 0%, #2a1a3d 55%, #331a2a 100%);
    --ok-soft: #10301f; --ok-ink: #6fe0a0; --warn-soft: #36260b; --warn-ink: #ffc46b;
    --info-soft: #14244a; --info-ink: #8db0ff; --bad-soft: #3a1520; --bad-ink: #ff94a5;
    --partial-soft: #2c1844; --partial-ink: #d3a8ff; --muted-soft: #23223a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0c17; --bg-soft: #13121f; --surface: #171627; --surface-2: #1d1c30;
  --border: #2a2840; --border-strong: #3a3757; --text: #f0eefb; --text-2: #cfcbe6;
  --muted: #a19dbd; --faint: #6f6b8c;
  --primary: #8566ff; --primary-hover: #9779ff; --primary-soft: #251f4a; --primary-soft-ink: #c3b4ff;
  --grad-soft: linear-gradient(135deg, #1f1a40 0%, #2a1a3d 55%, #331a2a 100%);
  --ok-soft: #10301f; --ok-ink: #6fe0a0; --warn-soft: #36260b; --warn-ink: #ffc46b;
  --info-soft: #14244a; --info-ink: #8db0ff; --bad-soft: #3a1520; --bad-ink: #ff94a5;
  --partial-soft: #2c1844; --partial-ink: #d3a8ff; --muted-soft: #23223a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }
::selection { background: rgba(107, 70, 255, .22); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.bi { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.brand-fallback { display: inline-grid; place-items: center; width: 1.2em; height: 1.2em; border-radius: 6px; background: var(--muted-soft); font-weight: 800; font-size: .8em; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pre-line { white-space: pre-line; }

/* ------------------------------------------------------------- layout helpers */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .container { padding: 0 24px; }
}
.spacer { flex: 1; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 36px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }

/* ------------------------------------------------------------- botones */
.btn {
  --b-bg: var(--surface); --b-ink: var(--text); --b-border: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--b-border);
  background: var(--b-bg); color: var(--b-ink); font: 700 .95rem/1 var(--font);
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { --b-bg: var(--primary); --b-ink: var(--primary-ink); --b-border: transparent; box-shadow: 0 6px 16px -8px rgba(107,70,255,.8); }
.btn-primary:hover { --b-bg: var(--primary-hover); }
.btn-grad { --b-bg: var(--grad); --b-ink: #fff; --b-border: transparent; background: var(--grad); box-shadow: 0 10px 24px -10px rgba(176,76,255,.75); }
.btn-grad:hover { filter: brightness(1.06); }
.btn-soft { --b-bg: var(--primary-soft); --b-ink: var(--primary-soft-ink); --b-border: transparent; }
.btn-soft:hover { filter: brightness(.97); }
.btn-ghost { --b-bg: transparent; --b-border: transparent; --b-ink: var(--text-2); }
.btn-ghost:hover { --b-bg: var(--surface-2); }
.btn-danger { --b-bg: var(--bad-soft); --b-ink: var(--bad-ink); --b-border: transparent; }
.btn-danger:hover { --b-bg: var(--bad); --b-ink: #fff; }
.btn-ok { --b-bg: var(--ok); --b-ink: #fff; --b-border: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 10px; gap: 6px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 34px; min-width: 34px; }
.btn .spin { display: none; }
.btn.is-loading .spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------- tarjetas */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
@media (min-width: 720px) { .card-pad { padding: 24px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 18px; }
@media (min-width: 720px) { .card-head { padding: 18px 24px; } .card-body { padding: 24px; } }
.card-foot { padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-grad { background: var(--grad); color: #fff; border: 0; box-shadow: var(--shadow-lg); }
.card-soft { background: var(--grad-soft); border-color: transparent; }
.card-link { display: block; color: inherit; text-decoration: none !important; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }

.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.02rem; font-weight: 800; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-soft-ink); font-weight: 800; font-size: .85rem; flex: none; }
.step-num.done { background: var(--ok); color: #fff; }

/* ------------------------------------------------------------- formularios */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: .9rem; color: var(--text-2); }
.hint { font-size: .82rem; color: var(--muted); }
.hint.ok { color: var(--ok-ink); }
.hint.bad { color: var(--bad-ink); }
.hint.warn { color: var(--warn-ink); }
.input, .select, .textarea, input:not([type]), input[type="tel"], input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 500 1rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 110px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a86a8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input.is-ok { border-color: var(--ok); }
input.is-bad, textarea.is-bad { border-color: var(--bad); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--primary); -webkit-appearance: auto; appearance: auto; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 1px; flex: none; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .prefix, .input-group .suffix { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 700; position: absolute; top: 0; bottom: 0; pointer-events: none; }
.input-group .prefix { left: 2px; }
.input-group .suffix { right: 2px; }
.input-group .prefix + input { padding-left: 42px; }
.input-group input:has(+ .suffix) { padding-right: 48px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* ------------------------------------------------------------- insignias y avisos */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--muted-soft); color: var(--text-2); white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.info { background: var(--info-soft); color: var(--info-ink); }
.badge.bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge.partial { background: var(--partial-soft); color: var(--partial-ink); }
.badge.primary { background: var(--primary-soft); color: var(--primary-soft-ink); }
.badge.grad { background: var(--grad); color: #fff; }
.badge.info .dot, .badge.warn .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--info-soft); color: var(--info-ink); font-weight: 600; font-size: .92rem; }
.alert .i { margin-top: 2px; }
.alert p:last-child { margin-bottom: 0; }
.alert.ok { background: var(--ok-soft); color: var(--ok-ink); }
.alert.warn { background: var(--warn-soft); color: var(--warn-ink); }
.alert.bad { background: var(--bad-soft); color: var(--bad-ink); }
.alert.plain { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); font-weight: 500; }
.alert .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .7; }

.flash-stack { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 90; width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.flash-stack .alert { pointer-events: auto; box-shadow: var(--shadow-lg); animation: drop .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }

/* ------------------------------------------------------------- tablas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 719px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .table.responsive td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: .8rem; text-align: left; }
  .table.responsive td.num { justify-content: space-between; }
  .table.responsive td.full { display: block; text-align: left; }
  .table.responsive td.full::before { display: block; margin-bottom: 2px; }
}

/* ------------------------------------------------------------- estado vacío */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; background: var(--grad-soft); color: var(--primary); }
.empty .empty-icon .i { width: 30px; height: 30px; }
.empty h3 { color: var(--text); }

/* ------------------------------------------------------------- progreso */
.progress { height: 8px; border-radius: 99px; background: var(--muted-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .4s ease; }
.progress.ok > span { background: var(--ok); }
.progress.bad > span { background: var(--bad); }
.progress.partial > span { background: var(--partial); }

/* ------------------------------------------------------------- chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { height: 6px; }
.chips::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 9px; }
.chip { --c: var(--primary); display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2); font: 700 .9rem/1 var(--font); cursor: pointer; white-space: nowrap; scroll-snap-align: start; transition: all .15s; }
.chip .bi { color: var(--c); width: 18px; height: 18px; }
.chip:hover { border-color: var(--c); }
.chip.active { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 8px 18px -10px var(--c); }
.chip.active .bi { color: #fff; }
.chip .n { font-size: .74rem; opacity: .7; font-weight: 700; }
.chip-sm { height: 34px; padding: 0 12px; font-size: .84rem; }
.chip.dark-brand.active { color: #fff; }
:root[data-theme="dark"] .chip[data-dark] { --c: #ffffff !important; }
:root[data-theme="dark"] .chip[data-dark].active { color: #111; }
:root[data-theme="dark"] .chip[data-dark].active .bi { color: #111; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip[data-dark] { --c: #ffffff !important; }
  :root:not([data-theme="light"]) .chip[data-dark].active { color: #111; }
  :root:not([data-theme="light"]) .chip[data-dark].active .bi { color: #111; }
}

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--muted-soft); gap: 2px; flex-wrap: wrap; }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: .86rem; color: var(--muted); border: 0; background: none; cursor: pointer; text-decoration: none; }
.seg a.active, .seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg .count { background: var(--primary); }

/* ------------------------------------------------------------- iconos de plataforma */
.pf { --c: #64748b; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); flex: none; }
.pf .bi { width: 20px; height: 20px; }
.pf-sm { width: 30px; height: 30px; border-radius: 9px; }
.pf-sm .bi { width: 16px; height: 16px; }
.pf[data-dark] { --c: #15132b; }
:root[data-theme="dark"] .pf[data-dark] { --c: #f0eefb !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pf[data-dark] { --c: #f0eefb !important; } }

/* =====================================================================
   APP (con sesión)
   ===================================================================== */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 60;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .25s ease;
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.scrim { position: fixed; inset: 0; background: rgba(13, 10, 35, .45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; pointer-events: auto; }
.sidebar-top { padding: 18px 16px 10px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; color: var(--text); text-decoration: none !important; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px -8px rgba(176,76,255,.9); flex: none; }
.logo-mark .i { width: 20px; height: 20px; stroke-width: 2.6; }

.wallet-card { margin: 8px 12px 6px; padding: 16px; border-radius: 18px; background: var(--grad); color: #fff; position: relative; overflow: hidden; }
.wallet-card::after { content: ""; position: absolute; right: -30px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.14); }
.wallet-card .lbl { font-size: .78rem; opacity: .85; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.wallet-card .amt { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.wallet-card .btn { --b-bg: rgba(255,255,255,.95); --b-ink: #4b2bd6; --b-border: transparent; position: relative; z-index: 1; }
.wallet-card .btn:hover { --b-bg: #fff; }

.nav { padding: 8px 10px 16px; overflow-y: auto; flex: 1; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 800; padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: .93rem; text-decoration: none !important; transition: background .12s, color .12s; }
.nav a .i { color: var(--muted); width: 20px; height: 20px; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary-soft-ink); }
.nav a.active .i { color: var(--primary); }
.nav a .count { margin-left: auto; }
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--grad-soft); color: var(--primary-soft-ink); display: grid; place-items: center; font-weight: 800; flex: none; text-transform: uppercase; }

.main { min-width: 0; padding-bottom: 92px; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar); display: flex; align-items: center; gap: 10px; padding: 0 12px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .page-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 800; color: var(--text); text-decoration: none !important; font-variant-numeric: tabular-nums; }
.balance-chip .plus { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; }
.balance-chip .plus .i { width: 16px; height: 16px; stroke-width: 3; }
.content { padding: 16px 12px 24px; max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font: 700 .68rem/1 var(--font); text-decoration: none !important; border: 0; background: none; cursor: pointer; position: relative; }
.tabbar .i { width: 22px; height: 22px; }
.tabbar a.active { color: var(--primary); }
.tabbar .fab { margin-top: -22px; }
.tabbar .fab span.fab-circle { width: 52px; height: 52px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(176,76,255,.9); }
.tabbar .fab .i { width: 24px; height: 24px; stroke-width: 2.4; }
.tabbar .count { position: absolute; top: 0; right: 22%; }

@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .scrim { display: none; }
  .main { margin-left: var(--sidebar); padding-bottom: 40px; }
  .tabbar, .only-mobile { display: none !important; }
  .topbar { padding: 0 28px; }
  .content { padding: 22px 28px 40px; }
}
@media (max-width: 1023px) { .only-desktop { display: none !important; } }

/* ------------------------------------------------------------- nuevo pedido */
.order-layout { display: grid; gap: 18px; }
@media (min-width: 1100px) { .order-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .order-summary { position: sticky; top: calc(var(--topbar) + 14px); } }
.announce { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--border); }
.announce .i { color: var(--primary); width: 22px; height: 22px; margin-top: 1px; }

.search-box { position: relative; }
.search-box .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-box input { padding-left: 42px; }

.svc-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding: 2px; margin: -2px; scrollbar-width: thin; }
.svc { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s, background .15s; }
.svc:hover { border-color: var(--border-strong); background: var(--surface-2); }
.svc.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.svc .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; margin-top: 2px; display: grid; place-items: center; transition: all .15s; }
.svc.selected .radio { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 4px var(--surface); }
.svc-main { flex: 1; min-width: 0; }
.svc-name { font-weight: 700; line-height: 1.35; }
.svc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.svc-price { text-align: right; flex: none; }
.svc-price .p { font-weight: 800; font-size: 1.02rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.svc-price .u { font-size: .74rem; color: var(--muted); }
.svc-id { font-size: .72rem; color: var(--faint); font-weight: 700; }

.qty-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.qty-quick button { height: 34px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font: 700 .84rem var(--font); color: var(--text-2); cursor: pointer; }
.qty-quick button:hover, .qty-quick button.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .93rem; }
.summary-row .k { color: var(--muted); }
.summary-row .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; margin-top: 6px; border-top: 1px dashed var(--border-strong); }
.summary-total .v { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.desc-box { font-size: .9rem; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; white-space: pre-line; }
.mobile-cta { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 44; padding: 10px 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.mobile-cta .t { font-size: .74rem; color: var(--muted); font-weight: 700; }
.mobile-cta .v { font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 1100px) { .mobile-cta { display: none; } }
@media (max-width: 1099px) { .has-mobile-cta { padding-bottom: 80px; } }

/* ------------------------------------------------------------- pedidos */
.order-card { padding: 16px; }
.order-card + .order-card { border-top: 1px solid var(--border); }
.order-top { display: flex; gap: 12px; align-items: flex-start; }
.order-title { font-weight: 700; line-height: 1.35; }
.order-sub { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.link-pill { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: .84rem; min-width: 0; }
.link-pill a { color: var(--text-2); min-width: 0; }
.order-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; margin-top: 12px; }
@media (min-width: 720px) { .order-stats { grid-template-columns: repeat(4, 1fr); } }
.order-stats .k { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.order-stats .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ------------------------------------------------------------- recargas */
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.method { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; transition: all .15s; }
.method input { position: absolute; opacity: 0; }
.method .mlogo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .9rem; }
.method .mname { font-weight: 800; }
.method .mdesc { font-size: .78rem; color: var(--muted); }
.method:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.method:has(input:focus-visible) { box-shadow: var(--ring); }
.pay-box { border-radius: 18px; padding: 20px; background: var(--grad-soft); border: 1px solid var(--border); }
.pay-amount { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.copy-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.copy-line .v { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.steps-list li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps-list li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .8rem; }
.qr { width: 180px; height: 180px; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--border); object-fit: contain; }

/* ------------------------------------------------------------- estadísticas */
.stat { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); min-width: 0; }
.stat .k { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.stat .k .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat .k .ic .i { width: 16px; height: 16px; }
.stat .v { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .d { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.stat.ok .k .ic { background: var(--ok-soft); color: var(--ok); }
.stat.warn .k .ic { background: var(--warn-soft); color: var(--warn); }
.stat.info .k .ic { background: var(--info-soft); color: var(--info); }
.stat.bad .k .ic { background: var(--bad-soft); color: var(--bad); }

.todo { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: inherit; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.todo:hover { border-color: var(--primary); transform: translateX(2px); }
.todo .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--warn-soft); color: var(--warn); }
.todo.ok .ic { background: var(--ok-soft); color: var(--ok); }
.todo.bad .ic { background: var(--bad-soft); color: var(--bad); }
.todo .t { font-weight: 700; }
.todo .s { font-size: .82rem; color: var(--muted); }
.todo .go { margin-left: auto; color: var(--faint); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.bars .bar .col { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: var(--grad); min-height: 3px; position: relative; }
.bars .bar .col.profit { background: var(--ok); opacity: .9; }
.bars .bar .lbl { font-size: .66rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.bars .bar:hover .col { filter: brightness(1.1); }
.bars .bar .tip { font-size: .66rem; font-weight: 800; color: var(--text-2); white-space: nowrap; }
@media (max-width: 719px) { .bars .bar .tip { display: none; } .bars .bar:nth-child(odd) .lbl { visibility: hidden; } }

/* ------------------------------------------------------------- tickets */
.thread { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 86%; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); white-space: pre-line; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; border-color: transparent; border-bottom-right-radius: 6px; }
.bubble.them { border-bottom-left-radius: 6px; }
.bubble .who { font-size: .74rem; font-weight: 700; opacity: .75; margin-bottom: 4px; }

/* ------------------------------------------------------------- API docs */
.codeblock { position: relative; white-space: pre; background: #15132b; color: #e6e3ff; border-radius: 14px; padding: 16px; overflow-x: auto; font: 500 .84rem/1.6 var(--mono); }
.codeblock .k { color: #ff9ec2; } .codeblock .s { color: #a5f3c4; } .codeblock .c { color: #8c88b0; }
.codeblock .copy-btn { position: absolute; top: 10px; right: 10px; }
.key-box { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); font-family: var(--mono); font-size: .92rem; overflow-wrap: anywhere; }

/* ------------------------------------------------------------- paginación */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .88rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none !important; }
.pager .cur { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ------------------------------------------------------------- diálogo */
dialog { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(460px, calc(100% - 24px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(13, 10, 35, .55); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.dialog-body { padding: 24px; }
.dialog-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); margin-bottom: 14px; }
.dialog-icon .i { width: 26px; height: 26px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 24px; flex-wrap: wrap; }

/* ------------------------------------------------------------- botón WhatsApp */
.wa-float { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 42; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 26px -8px rgba(37,211,102,.75); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float .bi { width: 28px; height: 28px; }
.public .wa-float { bottom: 20px; }
@media (min-width: 1024px) { .wa-float { bottom: 24px; right: 24px; } }
.has-mobile-cta ~ .wa-float { bottom: calc(150px + env(safe-area-inset-bottom)); }

/* =====================================================================
   PÁGINAS PÚBLICAS
   ===================================================================== */
.public { background: var(--bg); }
.pnav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; }
.pnav.scrolled { border-bottom-color: var(--border); }
.pnav .container { height: 68px; display: flex; align-items: center; gap: 12px; }
.pnav-links { display: none; gap: 4px; margin-left: 18px; }
.pnav-links a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; text-decoration: none !important; }
.pnav-links a:hover { background: var(--surface); }
@media (min-width: 860px) { .pnav-links { display: flex; } }

.hero { position: relative; overflow: hidden; padding: 36px 0 56px; }
.hero::before { content: ""; position: absolute; width: 720px; height: 720px; right: -260px; top: -320px; background: radial-gradient(closest-side, rgba(176,76,255,.28), transparent); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 560px; height: 560px; left: -240px; bottom: -300px; background: radial-gradient(closest-side, rgba(255,79,139,.18), transparent); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 64px 0 88px; } .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: .84rem; color: var(--text-2); box-shadow: var(--shadow-sm); }
.eyebrow .badge { height: 22px; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.7rem); line-height: 1.05; letter-spacing: -.04em; margin: 18px 0 16px; }
.hero .lead { font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--muted); max-width: 560px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .i { color: var(--ok); }

.mock { position: relative; max-width: 420px; margin: 0 auto; width: 100%; }
.mock-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 20px; }
.mock-float { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .86rem; animation: float 5s ease-in-out infinite; }
.mock-float.a { top: -18px; right: -6px; }
.mock-float.b { bottom: -34px; right: 18px; animation-delay: -2.5s; }
.mock { padding-bottom: 28px; }
.mock-card { position: relative; z-index: 1; }
.mock-float { z-index: 2; }
@media (min-width: 960px) { .mock-float.a { right: -40px; } .mock-float.b { right: auto; left: -46px; bottom: -40px; } }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .mock-float, .badge .dot { animation: none; } }

.pstrip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pstrip a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; color: var(--text-2); text-decoration: none !important; transition: transform .15s, border-color .15s; }
.pstrip a:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.psection { padding: 56px 0; }
.psection.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.psection-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.psection-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); letter-spacing: -.035em; }
.psection-head p { color: var(--muted); font-size: 1.05rem; }
.kicker { display: inline-block; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }

.how { display: grid; gap: 16px; }
@media (min-width: 860px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how-step { padding: 26px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); position: relative; }
.how-step .n { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 16px; box-shadow: 0 10px 20px -10px rgba(176,76,255,.9); }
.psection.alt .how-step { background: var(--bg); }

.feature { display: flex; gap: 14px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); flex: none; }
.feature .ic .i { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 4px; }
.feature p { color: var(--muted); margin: 0; font-size: .93rem; }

.price-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); transition: transform .15s, box-shadow .15s; }
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.price-card .p { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.price-card .p small { font-size: .82rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }

.faq { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 18px; transition: border-color .15s; }
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; }

.cta-band { border-radius: 28px; padding: 40px 24px; background: var(--grad); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); letter-spacing: -.03em; }
.cta-band p { opacity: .9; font-size: 1.05rem; }
.cta-band .btn { --b-bg: #fff; --b-ink: #4b2bd6; --b-border: transparent; }

.pfooter { padding: 40px 0 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.pfooter-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .pfooter-grid { grid-template-columns: 2fr 1fr 1fr; } }
.pfooter a { color: var(--text-2); }
.pfooter h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.pfooter ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* ------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: grid; }
@media (min-width: 960px) { .auth-wrap { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; position: relative; overflow: hidden; background: var(--grad); color: #fff; padding: 48px; }
@media (min-width: 960px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-side::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: rgba(255,255,255,.1); right: -180px; bottom: -200px; }
.auth-side h2 { font-size: 2.3rem; letter-spacing: -.04em; line-height: 1.1; max-width: 440px; }
.auth-side .logo { color: #fff; }
.auth-side .logo-mark { background: rgba(255,255,255,.2); box-shadow: none; }
.auth-points { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.auth-points div { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.auth-points .i { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.18); }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 28px 18px; }
.auth-box { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-box h1 { font-size: 1.9rem; letter-spacing: -.035em; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-wrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------- admin */
.admin-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; background: #15132b; color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .04em; }
:root[data-theme="dark"] .admin-tag { background: #fff; color: #15132b; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field.grow { flex: 3; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .92rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.inline-form { display: inline; }
.table input.inline-price { width: 110px; min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.svc-off td { opacity: .55; }
.sticky-actions { position: sticky; bottom: 76px; z-index: 30; }
@media (min-width: 1024px) { .sticky-actions { bottom: 16px; } }
.tag-loss { color: var(--bad-ink); font-weight: 800; font-size: .76rem; }

/* ------------------------------------------------------------- error */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.error-code { font-size: 5rem; font-weight: 800; letter-spacing: -.06em; line-height: 1; }

/* ------------------------------------------------------------- utilidades de animación */
.fade-in { animation: fadein .35s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------- tema: ícono sol/luna */
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: inline-block; }
:root[data-theme="dark"] .theme-moon { display: none; }
.pw-wrap [data-toggle-pw].on { color: var(--primary); }
.btn.copied { --b-bg: var(--ok-soft); --b-ink: var(--ok-ink); }

/* ------------------------------------------------------------- columnas principal + lateral */
.grid-side { display: grid; gap: 16px; align-items: start; }
@media (min-width: 960px) { .grid-side { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); } }

/* ------------------------------------------------------------- las grillas nunca desbordan */
.grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-side > *, .order-layout > * { min-width: 0; }
.bars .bar .lbl { font-size: .62rem; }
@media (max-width: 1279px) { .bars .bar:nth-child(even) .lbl { visibility: hidden; } .bars .bar .tip { display: none; } }

@media (min-width: 1024px) and (max-width: 1099px) {
  .mobile-cta { left: var(--sidebar); bottom: 0; padding: 12px 28px; }
  .has-mobile-cta ~ .wa-float { bottom: 96px; }
}
.sr-only { top: 0; left: 0; }

/* ------------------------------------------------------------- ajustes para celular */
.balance-chip { white-space: nowrap; flex: none; }
.topbar .page-title { min-width: 0; }
@media (max-width: 719px) {
  .balance-chip { height: 36px; padding: 0 4px 0 12px; font-size: .9rem; gap: 6px; }
  .balance-chip .plus { width: 26px; height: 26px; }
  .topbar { gap: 6px; padding: 0 8px; }
  .topbar .btn-icon { width: 36px; min-width: 36px; }
}
.chips { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent); padding-right: 28px; }
.chips::-webkit-scrollbar { display: none; }
@media (max-width: 1099px) {
  .svc-list { max-height: none; overflow: visible; }
  .mobile-cta { left: 10px; right: 10px; bottom: calc(90px + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); }
  .has-mobile-cta { padding-bottom: 110px; }
}
@media (max-width: 959px) { .mock-float.a { top: -34px; right: 6px; } .mock { margin-top: 28px; } }
.seg label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: .86rem; color: var(--muted); cursor: pointer; }
.seg label.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg label:has(input:focus-visible) { box-shadow: var(--ring); }

/* ------------------------------------------------------------- campanita */
.bell { position: relative; }
.bell .count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; font-size: .66rem; padding: 0 5px; }
.notif { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none !important; transition: background .12s; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); }
.notif .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--info-soft); color: var(--info); }
.notif.ok .ic { background: var(--ok-soft); color: var(--ok); }
.notif.warn .ic { background: var(--warn-soft); color: var(--warn); }
.notif.bad .ic { background: var(--bad-soft); color: var(--bad); }
.notif.unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.notif .t { font-weight: 700; }
.notif .b { color: var(--text-2); font-size: .9rem; }
.notif .w { font-size: .76rem; color: var(--muted); margin-top: 2px; }
.dot-new { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.level-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.level-row:last-child { border-bottom: 0; }
.level-row.me { background: var(--primary-soft); border-radius: 12px; padding: 12px; margin: 0 -12px; border-bottom-color: transparent; }
.level-row .em { font-size: 1.4rem; text-align: center; }
.pf .bi.big { width: 30px; height: 30px; }
.install-card { margin: 10px 12px 4px; padding: 12px 14px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--border); display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .88rem; color: var(--text); cursor: pointer; width: calc(100% - 24px); font-family: inherit; text-align: left; }
.install-card .i { color: var(--primary); width: 22px; height: 22px; }
