/* =====================================================================
   Tinku · panel, acceso y registro. Se carga después de app.css, corp.css y qr.css.
   Claro y sobrio: papel frío, tinta azul noche, cobalto como color de acción y coral
   solo para la promoción. Bordes finos, sombras suaves, títulos en Bricolage Grotesque.
   ===================================================================== */
html:root, html:root[data-theme="light"] {
    color-scheme: light;
    --cobalt: #2347F5; --cobalt-d: #1A36C4; --cobalt-s: #E9EDFF; --coral: #FF6B4A; --coral-s: #FFEDE8; --night: #121A33;
    --bg: #F4F6FA; --bg-2: #EDF0F6; --surface: #FFFFFF; --surface-2: #F8F9FC; --surface-3: #EEF1F7;
    --ink: #121A33; --text-2: #3D4766; --muted: #5F6984; --line: #E3E7EF; --line-2: #CDD3E0; --line-hover: #AEB6C9;
    --acc: #2347F5; --acc-2: #4F6BFF; --acc-soft: #E9EDFF; --acc-line: #CBD4FF; --on-acc: #FFFFFF;
    --ok: #12804F; --ok-soft: #E3F5EC; --warn: #9A5B00; --warn-soft: #FFF2D9; --warn-line: #F3D29A; --err: #C42B3C; --err-soft: #FDE8EB; --err-line: var(--err-line);
    --shadow: 0 1px 2px rgba(18, 26, 51, .05), 0 6px 18px -10px rgba(18, 26, 51, .14); --shadow-lg: 0 24px 60px -24px rgba(18, 26, 51, .32);
    --font-d: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif; --font: 'Hanken Grotesk', system-ui, sans-serif;
    --r: 14px; --r-sm: 10px; --ease: cubic-bezier(.2, .8, .2, 1);
}
html:root[data-theme="dark"] {
    color-scheme: dark;
    --cobalt: #5A77FF; --cobalt-d: #9DB0FF; --cobalt-s: rgba(90, 119, 255, .16); --coral: #FF7A5C; --coral-s: rgba(255, 122, 92, .14); --night: #1E2852;
    --bg: #0A0F1F; --bg-2: #0D1328; --surface: #111832; --surface-2: #151D3B; --surface-3: #1C2547;
    --ink: #EEF1FA; --text-2: #BAC3DD; --muted: #8C96B6; --line: #232D52; --line-2: #33406E; --line-hover: #4A5890;
    --acc: #5A77FF; --acc-2: #8197FF; --acc-soft: rgba(90, 119, 255, .16); --acc-line: rgba(90, 119, 255, .4); --on-acc: #FFFFFF;
    --ok: #4CD394; --ok-soft: rgba(76, 211, 148, .13); --warn: #F5B754; --warn-soft: rgba(245, 183, 84, .13); --warn-line: rgba(245, 183, 84, .4); --err: #FF7A8A; --err-soft: rgba(255, 122, 138, .13); --err-line: rgba(255, 122, 138, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px -12px rgba(0, 0, 0, .7); --shadow-lg: 0 28px 70px -26px rgba(0, 0, 0, .85);
    --font-d: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif; --font: 'Hanken Grotesk', system-ui, sans-serif;
    --r: 14px; --r-sm: 10px; --ease: cubic-bezier(.2, .8, .2, 1);
}body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14.5px; transition: background-color .35s var(--ease), color .35s var(--ease); }
h1, h2, h3 { letter-spacing: -.01em; }
.theme button[aria-pressed="true"] { background: var(--cobalt-s); color: var(--cobalt-d); }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
::selection { background: var(--cobalt-s); }

/* ---------- menú lateral ---------- */
.side { background: var(--surface); border-right: 1px solid var(--line); }
.side .brand { border-bottom: 1px solid var(--line); }
.brand img { border-radius: 10px; }
.brand b { font-family: var(--font-d); font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.brand small { color: var(--muted); }
.nav-label { color: var(--muted); font-weight: 600; }
.side nav a { color: var(--text-2); font-weight: 500; }
.side nav a .i { color: var(--muted); }
.side nav a:hover { background: var(--surface-3); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--cobalt-s); color: var(--cobalt-d); font-weight: 650; }
.side nav a[aria-current="page"] .i { color: var(--cobalt); }
.side nav a[aria-current="page"]::before { background: var(--cobalt); }
.side-foot { border-top: 1px solid var(--line); }
.me:hover { background: var(--surface-3); }
.me small { color: var(--muted); }
.avatar { background: var(--night); color: #fff; font-family: var(--font-d); font-weight: 700; }
.quick .btn { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.quick .btn:hover { background: var(--cobalt-d); border-color: var(--cobalt-d); }

/* ---------- barra superior y títulos ---------- */
.topbar { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.page-title h1 { font-family: var(--font-d); font-weight: 700; font-size: clamp(1.5rem, 2.3vw, 1.95rem); line-height: 1.1; letter-spacing: -.025em; }
.page-title p { color: var(--muted); }
h2, h3, .sub, .panel-head h2 { font-family: var(--font-d); font-weight: 650; letter-spacing: -.015em; }

/* ---------- botones ---------- */
.btn { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(18, 26, 51, .05); transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
.btn:hover { border-color: var(--line-hover); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-primary:hover { border-color: var(--cobalt); background: var(--cobalt); color: #fff; }
.btn-primary:hover { border-color: var(--cobalt-d); background: var(--cobalt-d); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-danger { color: var(--err); }
.btn-danger:hover { border-color: var(--err-line); background: var(--err-soft); color: var(--err); }

/* ---------- paneles, tarjetas y campos ---------- */
.panel, .kpi, .qa, .lib-side, .qr-card, .type-card, .plan, .quota, .table-wrap { border: 1px solid var(--line) !important; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.panel-head { border-bottom: 1px solid var(--line); background: transparent; }
.panel-head h2 { font-size: 1.02rem; }
.panel-head h2 .i { color: var(--cobalt); }
.kpi-l { color: var(--muted); }
.kpi-v { font-family: var(--font-d); font-weight: 700; font-size: 1.9rem; letter-spacing: -.03em; }
.kpi.hero { background: var(--night); color: #fff; border-color: var(--night) !important; }
.kpi.hero .kpi-l, .kpi.hero .kpi-h { color: #C3CAE0; }
.field > span, .field label { font-weight: 600; color: var(--ink); }
.field small { color: var(--muted); }
.field input, .field select, .field textarea, .input { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-hover); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(35, 71, 245, .16); background: var(--surface); }
.check input { accent-color: var(--cobalt); }
.hint .i, .quota .i { color: var(--cobalt); }
.quota { background: var(--cobalt-s); border-color: var(--acc-line) !important; box-shadow: none; }
.quota a { color: var(--cobalt-d); font-weight: 650; }
.content p a:not(.btn), .hint a:not(.btn), .field small a, .panel-body > p a:not(.btn) { color: var(--cobalt-d); }
.qr-card a, .qr-card h3, .type-card, .kit-card { color: var(--ink); }
.lib-side { min-width: 0; overflow: hidden; }
.folder { min-width: 0; }
.qr-thumb:has(.qr-folder) { padding-top: 40px; }
.qr-folder { border: 1px solid var(--line); background: rgba(255, 255, 255, .92); color: var(--text-2); font-weight: 600; }

/* ---------- chips, etiquetas, insignias ---------- */
.chip { border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface); }
.chip:hover { border-color: var(--line-hover); color: var(--ink); }
.chip.on { background: var(--night); color: #fff; border-color: var(--night); }
.tag { border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); }
.tag-dyn { border-color: transparent; background: var(--cobalt-s); color: var(--cobalt-d); }
.badge.info { background: var(--cobalt-s); color: var(--cobalt-d); }
.tagchip { border: 1px solid var(--line-2); color: var(--text-2); background: var(--surface); }
.tagchip.on { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.folder { color: var(--text-2); font-weight: 500; }
.folder.on { background: var(--cobalt-s); color: var(--cobalt-d); } .folder.on b, .folder.on .i { color: var(--cobalt-d); }
.folder-new summary { color: var(--cobalt-d); }
.qr-tags i { color: var(--cobalt); }
.scans .i { color: var(--muted); }
.qr-thumb { border-bottom: 1px solid var(--line); background: var(--surface-2); border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; }
.qr-card, .type-card { transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.qr-card:hover, .type-card:hover { border-color: var(--line-hover) !important; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.type-ic { border: 0; background: var(--cobalt-s); color: var(--cobalt); }
.type-cat > .sub { color: var(--ink); font-family: var(--font-d); font-weight: 650; font-size: 1.1rem; }
.step { background: var(--cobalt); color: #fff; border: 0; }
.choice-opt input:checked + * { outline-color: var(--cobalt); }
.choice-opt input:checked + .choice-ic, .choice-opt input:checked + span { border-color: var(--cobalt); background: var(--cobalt-s); }
.meter { border: 0; background: var(--surface-3); } .meter i { background: var(--cobalt); }
.plan.featured, .plan.current { border-color: var(--cobalt) !important; box-shadow: 0 0 0 1px var(--cobalt), var(--shadow); }
.vig { background: var(--cobalt-s); border: 1px solid var(--acc-line); } .vig .i { color: var(--cobalt); }
.vig.over { background: var(--err-soft); border-color: var(--err-line); }
.sched { border: 1px dashed var(--line-2); background: var(--surface-2); }
.preview-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.preview-stage { border: 1px solid var(--line); }

/* ---------- tablas, avisos y estados ---------- */
.table th { background: var(--surface-2); color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 600; }
.table tbody tr:hover { background: var(--surface-2); }
.toast { border: 0; background: var(--night); color: #fff; box-shadow: var(--shadow-lg); }
.toast.ok .i { color: #6EE7B7; }
.toast.err .i { color: #FCA5A5; }
.empty .i { color: var(--cobalt); }

/* ---------- barra inferior en celular ---------- */
.tabbar { background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.tabbar a, .tabbar button { color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--cobalt); font-weight: 650; }
.tabbar .tab-plus .i { background: var(--cobalt); color: #fff; border: 0; box-shadow: 0 6px 16px -6px rgba(35, 71, 245, .6); }

/* ---------- pie con la firma ---------- */
.app-foot { border-top: 1px solid var(--line); color: var(--muted); }
.app-foot a { color: var(--text-2); }

/* ---------- acceso, registro, recuperar ---------- */
.auth { background: var(--bg); }
.auth-logo { border-radius: 16px; }
.auth-card h1 { font-family: var(--font-d); font-weight: 700; font-size: clamp(2rem, 3.6vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; }
.auth-intro { color: var(--text-2); }
.auth-card .btn-primary { min-height: 48px; font-size: 1rem; }
.auth-card a:not(.btn) { color: var(--cobalt-d); font-weight: 600; }
.auth-art { border-left: 1px solid var(--line); background: var(--night); overflow: hidden; }
.auth-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 30%, rgba(35, 71, 245, .55), transparent 70%), radial-gradient(40% 35% at 25% 80%, rgba(255, 107, 74, .28), transparent 70%); pointer-events: none; }
.auth-art::after { display: none; }
.qr-art-code { position: relative; z-index: 1; width: min(300px, 58%); padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .7); opacity: 1; transform: rotate(-3deg); }
.auth-art p { position: relative; z-index: 1; color: #fff; font-family: var(--font-d); font-weight: 700; font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1; letter-spacing: -.03em; }
.auth-art p span { color: #C3CAE0; font: 400 1.05rem/1.5 var(--font); letter-spacing: 0; }
.auth-sign { border-top: 1px solid var(--line); }
.auth-sign a { color: var(--text-2); }

/* aviso: correo sin confirmar */
.verify-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn-soft); color: var(--ink); }
.verify-banner .i { flex-shrink: 0; width: 20px; height: 20px; color: var(--warn); }
.verify-banner span { flex: 1; min-width: 0; font-size: .92rem; }
.verify-banner .btn { flex-shrink: 0; }
@media (max-width: 640px) { .verify-banner { flex-wrap: wrap; } .verify-banner .btn { width: 100%; } }

/* ---------- precio de lanzamiento y pago con número de operación ---------- */
.promo-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 18px; border-radius: 14px; background: var(--night); color: #fff; }
.promo-strip b { display: block; font-size: 1.02rem; }
.promo-strip b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--coral); }
.promo-strip span { color: #C3CAE0; font-size: .9rem; }
.promo-meter { flex: 1; min-width: 140px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.promo-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--coral); }
.pay-wait .panel-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-wait h2 { margin: 0 0 4px; font-size: 1.1rem; }
.pay-wait p { margin: 0; }
.pay-wait form { margin-left: auto; }
.pay-wait-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); }
.plan .price s { color: var(--muted); font-weight: 500; margin-right: 6px; }
.pay-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pay-step { display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pay-step h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1rem; }
.pay-step h3 span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cobalt); color: #fff; font: 700 .85rem var(--font); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg2 label { position: relative; cursor: pointer; }
.seg2 input { position: absolute; opacity: 0; }
.seg2 span { display: block; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-weight: 650; text-align: center; }
.seg2 input:checked + span { border-color: var(--cobalt); background: var(--cobalt-s); color: var(--cobalt-d); box-shadow: 0 0 0 1px var(--cobalt); }
.seg2 input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.pay-total { padding: 12px 14px; border-radius: 12px; background: var(--night); color: #fff; }
.pay-total small { display: block; color: #C3CAE0; font-size: .8rem; }
.pay-total b { display: block; font-family: var(--font-d); font-size: 1.8rem; line-height: 1.1; letter-spacing: -.02em; }
.pay-total span { display: block; color: #FFB4A3; font-size: .8rem; }
.pay-ways { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pay-ways li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.pay-ways b { min-width: 46px; }
.pay-ways .mono { flex: 1; font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; }
.actions form.rechazo { display: inline-flex; gap: 6px; }
.actions form.rechazo input { width: 150px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: .85rem; }
.actions form { display: inline-block; }
@media (max-width: 900px) { .pay-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- estadísticas ---------- */
.page-actions .chips .chip { min-height: 32px; }
.chart-area { padding-top: 6px; }
svg.area { display: block; width: 100%; height: 190px; overflow: visible; }
svg.area .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
svg.area .fill { fill: rgba(35, 71, 245, .08); }
svg.area .line { fill: none; stroke: var(--cobalt); stroke-width: 2.25; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
svg.spark { display: block; width: 96px; height: 26px; }
svg.spark path { fill: none; stroke: var(--cobalt); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
svg.heat { display: block; width: 100%; height: auto; }
svg.heat .hl { fill: var(--muted); font: 600 11px var(--font); }
svg.heat .l0 { fill: var(--surface-3); }
svg.heat .l1 { fill: #CBD4FF; }
svg.heat .l2 { fill: #8FA2FF; }
svg.heat .l3 { fill: #4F6BFF; }
svg.heat .l4 { fill: var(--cobalt-d); }
.hbars li i { background: linear-gradient(90deg, var(--cobalt) var(--w, 0%), var(--surface-3) var(--w, 0%)); }
.two-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.two-bars h3 { margin: 0 0 10px; font-size: .9rem; }
p.hint.center { max-width: 70ch; margin: 18px auto 6px; text-align: center; }
@media (max-width: 560px) { .two-bars { grid-template-columns: 1fr; } svg.spark { width: 64px; } }

/* ---------- kits por rubro ---------- */
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 0 0 22px; padding: 0; list-style: none; }
.kit-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .2s, transform .2s var(--ease); }
.kit-card:hover { border-color: var(--line-hover); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.kit-card b { font-family: var(--font-d); font-size: 1.1rem; font-weight: 650; letter-spacing: -.015em; }
.kit-card small { color: var(--text-2); line-height: 1.45; }
.kit-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.kit-list span { padding: 3px 9px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: .76rem; font-weight: 600; }
.kit-side { display: grid; gap: 18px; }
.kit-items { display: grid; gap: 12px; }
.kit-item { align-items: flex-start; }
.kit-item span { display: grid; gap: 2px; }
.kit-item small { color: var(--muted); font-size: .8rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.swatches legend { margin-bottom: 8px; font-size: .86rem; font-weight: 600; }
.swatch { position: relative; display: grid; justify-items: center; gap: 3px; cursor: pointer; color: var(--text-2); font-size: .72rem; }
.swatch input { position: absolute; opacity: 0; }
.swatch svg { width: 32px; height: 32px; border-radius: 50%; outline: 2px solid transparent; outline-offset: 2px; }
.swatch input:checked + svg { outline-color: var(--cobalt); }
.swatch input:focus-visible + svg { outline: 2px solid var(--cobalt); outline-offset: 4px; }
.kit-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 16px 18px; border: 1px solid var(--acc-line); border-radius: var(--r); background: var(--cobalt-s); color: inherit; text-decoration: none; }
.kit-banner > span:nth-child(2) { display: grid; gap: 3px; flex: 1; }
.kit-banner b { font-weight: 650; }
.kit-banner small { color: var(--text-2); }
.kit-banner .type-ic { background: var(--surface); }
@media (max-width: 640px) { .kit-banner { flex-wrap: wrap; } }

/* ---------- material impreso ---------- */
.print-pick { display: grid; gap: 6px; max-height: 70vh; overflow-y: auto; }
.print-pick h3 { margin: 10px 0 2px; color: var(--muted); font: 600 .8rem var(--font); }
.print-pick h3:first-child { margin-top: 0; }
.print-qr { align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px; }
.print-qr:hover { background: var(--surface-2); }
.print-thumb { flex: none; width: 48px; }
.print-thumb svg { display: block; width: 100%; height: auto; }
.print-qr > span:last-child { display: grid; gap: 2px; min-width: 0; }
.print-qr small { color: var(--muted); font-size: .8rem; }
.print-formats { display: grid; gap: 10px; }
.fmt-opt { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.fmt-opt input { position: absolute; opacity: 0; }
.fmt-opt:has(input:checked) { border-color: var(--cobalt); background: var(--cobalt-s); box-shadow: 0 0 0 1px var(--cobalt); }
.fmt-opt:has(input:checked) .fmt-ic { color: var(--cobalt); }
.fmt-opt:has(input:focus-visible) { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.fmt-ic { flex: none; width: 40px; height: 40px; color: var(--muted); }
.fmt-opt span { display: grid; gap: 3px; }
.fmt-opt small { color: var(--text-2); font-size: .8rem; line-height: 1.4; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* ---------- pago con Culqi ---------- */
.card-pay { display: grid; gap: 8px; }
.card-pay .btn { min-height: 48px; }
.btn.loading { opacity: .7; cursor: progress; }
.card-msg:empty { display: none; }
.card-msg { padding: 10px 12px; border-radius: 10px; background: var(--cobalt-s); color: var(--cobalt-d); font-size: .9rem; }
.card-msg.bad { background: var(--err-soft); color: var(--err); }
.or { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; color: var(--muted); font-size: .82rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.culqi-cfg .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.culqi-help ol { display: grid; gap: 8px; margin: 0 0 14px; padding-left: 20px; color: var(--text-2); font-size: .92rem; }
.culqi-help .hint { margin-top: 10px; }

/* modo oscuro: piezas que siguen en claro (papel, QR) y halos de fondo */
html[data-theme="dark"] .qr-thumb, html[data-theme="dark"] .preview-stage, html[data-theme="dark"] .print-thumb { background-color: #F4F6FA; }
html[data-theme="dark"] .kpi.hero { background: linear-gradient(135deg, #2347F5, #1B6FD6); border-color: transparent !important; }
html[data-theme="dark"] .main { background: radial-gradient(50% 40% at 90% 0%, rgba(90, 119, 255, .12), transparent 70%); }
html[data-theme="dark"] svg.heat .l0 { fill: #1C2547; }
html[data-theme="dark"] .qr-folder { background: rgba(17, 24, 50, .92); }
html[data-theme="dark"] svg.heat .l1 { fill: #26357A; } html[data-theme="dark"] svg.heat .l2 { fill: #3550C0; } html[data-theme="dark"] svg.heat .l3 { fill: #5A77FF; } html[data-theme="dark"] svg.heat .l4 { fill: #A9BAFF; }

/* aviso de cookies con los colores de Tinku en ambos temas */
html .lg-notice.lg-skin-tinku { --n-bg: #FFFFFF; --n-text: #121A33; --n-muted: #3D4766; --n-line: #E3E7EF; --n-acc: #2347F5; --n-on-acc: #FFFFFF; }
html[data-theme="dark"] .lg-notice.lg-skin-tinku { --n-bg: #111832; --n-text: #EEF1FA; --n-muted: #BAC3DD; --n-line: #33406E; --n-acc: #4D6BFF; --n-on-acc: #FFFFFF; }

/* pasarela de pago en desarrollo */
.pay-dev .panel-body { display: flex; align-items: flex-start; gap: 16px; }
.pay-dev h2 { margin: 0 0 6px; font-size: 1.1rem; }
.pay-dev p { max-width: 70ch; color: var(--text-2); }
.pay-dev .hint { margin-top: 8px; }
.pay-dev { border-color: var(--warn-line) !important; background: var(--warn-soft); }

/* funciones Pro bloqueadas en el plan Gratis y aviso de la prueba */
.lock-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px dashed var(--acc-line); border-radius: 14px; background: var(--cobalt-s); }
.lock-card p { margin: 4px 0 10px; color: var(--text-2); font-size: .92rem; }
.lock-ic { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, #3A5BFF, #12B5F0); color: #fff; }
.lock-ic .i { width: 22px; height: 22px; }
.lock-page .panel-body { display: flex; gap: 18px; align-items: flex-start; padding: 28px; }
.lock-page h2 { margin-bottom: 6px; font-size: 1.35rem; }
.lock-page p { max-width: 64ch; color: var(--text-2); }
.lock-list { display: grid; gap: 8px; margin: 16px 0; padding: 0; list-style: none; }
.lock-list li { display: flex; gap: 10px; color: var(--text-2); }
.lock-list .i { color: var(--cobalt); width: 18px; height: 18px; margin-top: 2px; }
.lock-acts { margin-bottom: 8px; }
.trial-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(110deg, #2347F5, #1B6FD6 60%, #12B5F0); color: #fff; text-decoration: none; font-size: .92rem; }
.trial-banner .i { flex-shrink: 0; width: 20px; height: 20px; }
.trial-banner:hover { filter: brightness(1.06); }
@media (max-width: 640px) { .lock-page .panel-body { flex-direction: column; padding: 20px; } }

/* que ninguna tabla o gráfico ensanche la página en celular: se desplazan dentro de su panel */
.main, .content, .content > *, .grid-2 > *, .grid-main > * { min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.app-foot .lg-links, .auth-sign .lg-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.app-foot { text-align: center; }
.usage .over { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); font-size: .9rem; }

/* ---------- barra de desplazamiento con la marca Tinku ---------- */
html { scrollbar-color: #4F6BFF transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: linear-gradient(180deg, #3A5BFF, #2347F5 45%, #12B5F0) padding-box; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #FF6B4A, #2347F5 40%, #12B5F0) padding-box; border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
::selection { background: rgba(35, 71, 245, .22); }

/* ---------- sistema inmersivo: transición entre páginas, entrada escalonada, partículas y brillo ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
body.app { position: relative; isolation: isolate; }
.app-fx { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
body.app::before, body.auth::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background: radial-gradient(45% 40% at 95% 0%, rgba(35, 71, 245, .10), transparent 70%), radial-gradient(35% 35% at 20% 100%, rgba(18, 181, 240, .07), transparent 70%); }
html[data-theme="dark"] body.app::before, html[data-theme="dark"] body.auth::before { background: radial-gradient(45% 40% at 95% 0%, rgba(90, 119, 255, .2), transparent 70%), radial-gradient(35% 35% at 20% 100%, rgba(18, 181, 240, .1), transparent 70%); }
.fx-on .content > * { animation: rise-in .55s var(--ease) both; }
.fx-on .content > *:nth-child(2) { animation-delay: .05s; } .fx-on .content > *:nth-child(3) { animation-delay: .1s; } .fx-on .content > *:nth-child(4) { animation-delay: .15s; } .fx-on .content > *:nth-child(n+5) { animation-delay: .2s; }
.fx-on .kpis > * { animation: rise-in .6s var(--ease) both; }
.fx-on .kpis > *:nth-child(2) { animation-delay: .08s; } .fx-on .kpis > *:nth-child(3) { animation-delay: .16s; } .fx-on .kpis > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
.panel, .kpi, .qr-card, .type-card, .kit-card, .plan, .fmt-opt { position: relative; }
.panel::after, .kpi::after, .qr-card::after, .type-card::after, .kit-card::after, .plan::after, .fmt-opt::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(35, 71, 245, .07), transparent 45%); }
html[data-theme="dark"] .panel::after, html[data-theme="dark"] .kpi::after, html[data-theme="dark"] .qr-card::after, html[data-theme="dark"] .type-card::after, html[data-theme="dark"] .kit-card::after, html[data-theme="dark"] .plan::after, html[data-theme="dark"] .fmt-opt::after { background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(122, 146, 255, .12), transparent 45%); }
.panel:hover::after, .kpi:hover::after, .qr-card:hover::after, .type-card:hover::after, .kit-card:hover::after, .plan:hover::after, .fmt-opt:hover::after { opacity: 1; }
.kpi.hero { background-image: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, 0) 70%); background-size: 250% 100%; animation: sheen 6s ease-in-out infinite; }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.side nav a[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--acc-line); }
.side nav a[aria-current="page"]::before { box-shadow: 0 0 12px 2px rgba(35, 71, 245, .55); }
.quick .btn { background-image: linear-gradient(110deg, #2347F5, #3A5BFF 50%, #1B6FD6); }
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .3) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); pointer-events: none; }
.btn-primary:hover::after { transform: translateX(120%); }
.tabbar .tab-plus .i { animation: pulse-ring 3.2s ease-out infinite; }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(35, 71, 245, .45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(35, 71, 245, 0); } }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .fx-on .content > *, .fx-on .kpis > *, .kpi.hero, .tabbar .tab-plus .i { animation: none !important; }
    .app-fx { display: none; }
}
