:root {
    --bg: #FFF9F0;
    --card: #FFFFFF;
    --ink: #1B1A2E;
    --muted: #6B6879;
    --line: #ECE6DC;
    --brand: #3257D5;
    --brand-soft: #3257D51A;
    --coral: #FF765E;
    --ok: #15965A;
    --ok-soft: #15965A1A;
    --warn: #C77700;
    --warn-soft: #F5A6231F;
    --bad: #D83A3A;
    --bad-soft: #D83A3A1A;
    --shadow: 0 1px 2px rgba(27, 26, 46, .05), 0 8px 24px rgba(27, 26, 46, .06);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #12111C; --card: #1C1B2A; --ink: #F4F1EA; --muted: #A09DB0; --line: #2C2A3D;
        --brand: #6E8BEB; --brand-soft: #6E8BEB22; --ok: #3CC488; --ok-soft: #3CC48822;
        --warn: #F5B544; --warn-soft: #F5B54422; --bad: #F26B6B; --bad-soft: #F26B6B22;
        --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
    }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Plus Jakarta Sans', system-ui, Segoe UI, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
.boot { padding: 48px 16px; text-align: center; color: var(--muted); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; padding-bottom: 48px; }

/* Login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 28px 22px; box-shadow: var(--shadow); }
.logo { font-weight: 800; font-size: 26px; letter-spacing: .5px; color: var(--brand); }
.logo small { font-size: 13px; font-weight: 700; color: var(--coral); margin-left: 6px; letter-spacing: 0; }
.logo { display: inline-flex; align-items: flex-end; gap: 2px; line-height: 1; }
.logo .logo-svg { height: 34px; width: auto; display: block; }
.logo small { margin-bottom: 3px; font-weight: 800; letter-spacing: .6px; }
.logo.sm .logo-svg { height: 24px; }
.logo.sm small { font-size: 11px; margin-bottom: 1px; }
.login h1 { font-size: 18px; margin: 14px 0 4px; }
.login p { color: var(--muted); font-size: 14px; margin: 0 0 18px; line-height: 1.45; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 14px; font-size: 16px; outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 14px; cursor: pointer; }
.btn:hover { border-color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { width: 100%; height: 48px; margin-top: 18px; font-size: 15px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
.err { color: var(--bad); font-size: 14px; margin-top: 12px; min-height: 18px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 16px; line-height: 1.5; }

/* Encabezado y pestañas */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.biz { font-size: 20px; font-weight: 800; margin: 2px 0 0; }
.sub { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 6px; background: var(--card); padding: 4px; border-radius: 14px; box-shadow: var(--shadow); margin: 16px 0; width: max-content; max-width: 100%; }
.tab { border: 0; background: transparent; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; }
.tab.on { background: var(--brand); color: #fff; }

/* Tarjetas */
.grid { display: grid; gap: 12px; }
.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g2 { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.kpi.hero { grid-column: 1 / -1; background: var(--brand); color: #fff; }
.kpi.hero .l { color: #ffffffcc; }
.kpi.hero .v { font-size: 36px; }
.split { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: #ffffffd9; font-variant-numeric: tabular-nums; }
.split b { color: #fff; }

/* Cajas */
.caja { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.caja:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dot.off { background: var(--muted); opacity: .5; }
.dot.lost { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.caja .n { font-weight: 700; }
.caja .d { font-size: 12.5px; color: var(--muted); }
.caja .m { margin-left: auto; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tablas */
.tw { overflow-x: auto; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.muted { color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
.rank { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.rank .i { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank .q { font-weight: 800; font-variant-numeric: tabular-nums; }

/* Filtros */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
@media (min-width: 760px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; } }
.filters label { margin-top: 0; }
.filters .input { height: 42px; font-size: 14px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.code { font-family: Consolas, monospace; font-weight: 800; letter-spacing: 2px; color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Pago del plan */
.ok-msg { color: var(--ok); background: var(--ok-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.card .err { margin-top: 10px; min-height: 0; }
.ok-txt { color: var(--ok); font-size: 13px; font-weight: 700; margin-top: 2px; }

/* Elegí tu plan */
.plan-wrap { margin-top: 12px; padding: 24px 18px; }
@media (min-width: 760px) { .plan-wrap { padding: 32px 32px 26px; } }
.plan-head { text-align: center; margin-bottom: 18px; }
.plan-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.plan-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.plan-head .estado { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 14px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700; }
.plan-head .estado.warn { background: var(--warn-soft); color: var(--warn); }
.seg-wrap { display: flex; justify-content: center; margin-bottom: 22px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { border: 0; background: transparent; padding: 9px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 26, 46, .12); }
.planes { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 760px; margin: 0 auto; }
@media (min-width: 640px) { .planes { grid-template-columns: 1fr 1fr; } }
.plan-card { position: relative; display: flex; flex-direction: column; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 22px 20px 20px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.plan-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.plan-card.on { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 12px 30px rgba(50, 87, 213, .14); }
.plan-card .radio { position: absolute; top: 20px; right: 18px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; }
.plan-card.on .radio { background: var(--brand); border-color: var(--brand); }
.plan-card.plus { background: linear-gradient(160deg, var(--brand-soft), transparent 55%), var(--card); }
.plan-ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; padding: 5px 12px; border-radius: 999px; background: linear-gradient(90deg, var(--coral), #FF9A5E); color: #fff; box-shadow: 0 4px 12px rgba(255, 118, 94, .35); }
.plan-badge { align-self: flex-start; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); margin-bottom: 8px; }
.plan-name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; padding-right: 30px; }
.plan-name b { background: linear-gradient(90deg, var(--brand), var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-tag { color: var(--muted); font-size: 13px; margin-top: 2px; }
.plan-price { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 14px 0 16px; font-variant-numeric: tabular-nums; line-height: 1; }
.plan-price span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.plan-card ul { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 14px; }
.plan-card li { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
.plan-card li::before { content: '✓'; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.plan-card li.extra { font-weight: 700; }
.plan-card li.extra::before { background: var(--brand-soft); color: var(--brand); }
.plan-opts { max-width: 760px; margin: 20px auto 0; background: var(--bg); border-radius: 16px; padding: 4px 16px; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14.5px; flex-wrap: wrap; }
.stepper-row:last-child { border-bottom: 0; }
.stepper-row small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.stepper-row .input { background: var(--card); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; font-size: 20px; font-weight: 700; cursor: pointer; line-height: 1; color: var(--brand); }
.stepper button:hover:not(:disabled) { background: var(--brand-soft); }
.stepper button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.stepper b { min-width: 34px; text-align: center; font-size: 17px; font-variant-numeric: tabular-nums; }
.plan-total { max-width: 760px; margin: 18px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: 18px; background: var(--ink); color: var(--card); }
.plan-total .lbl { font-size: 13px; opacity: .7; }
.plan-total .v { font-size: 32px; font-weight: 800; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.plan-total .v span { font-size: 14px; font-weight: 600; opacity: .7; letter-spacing: 0; }
.plan-total .ok-txt { color: #5BE3A4; }
.plan-total .hint2 { font-size: 12.5px; opacity: .7; margin-top: 2px; }
.btn-big { height: 54px; padding: 0 32px; font-size: 16px; border-radius: 14px; box-shadow: 0 8px 20px rgba(50, 87, 213, .35); }
.btn-big:disabled { box-shadow: none; }
@media (max-width: 480px) { .btn-big { width: 100%; } }
.plan-foot { max-width: 760px; margin: 14px auto 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 12.5px; text-align: center; }
.plan-foot a { color: var(--muted); }
.plan-foot .lock::before { content: '🔒 '; }
.plan-wrap .ok-msg, .plan-wrap .err { max-width: 760px; margin: 14px auto 0; }

