/* inesIA Scraping — sistema de diseño */
@font-face { font-family: "PJS"; src: url("../fonts/pjs-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PJS"; src: url("../fonts/pjs-600.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "PJS"; src: url("../fonts/pjs-800.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }

:root {
  --navy: #0b2c48; --navy-2: #123a5e; --blue: #1455ff; --blue-2: #0f45d6; --blue-soft: #e8efff; --blue-ring: rgba(20, 85, 255, .22); --btn-bg: #1455ff; --btn-bg-hover: #0f45d6;
  --bg: #f4f7fb; --surface: #ffffff; --surface-2: #f8fafd; --line: #e3e9f1; --line-2: #d3dce8;
  --text: #0b2c48; --text-2: #364a63; --muted: #607086; --faint: #8a97a8;
  --ok: #0f8a5f; --ok-soft: #e4f6ee; --warn: #a15c00; --warn-soft: #fff3df; --bad: #c42b2b; --bad-soft: #fde9e9;
  --chart: #1455ff; --chart-track: #e8eef8; --grid: #e9eef5;
  --side: #0b2c48; --side-text: #c9d6e6; --side-muted: #7f97b3; --side-hover: rgba(255, 255, 255, .07); --side-active: rgba(126, 162, 255, .18);
  --radius: 14px; --radius-sm: 9px; --shadow: 0 1px 2px rgba(11, 44, 72, .06), 0 8px 24px -12px rgba(11, 44, 72, .12);
  --shadow-lg: 0 24px 60px -24px rgba(11, 44, 72, .35);
  --font: "PJS", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2b; --surface-2: #0f1828; --line: #1f2b40; --line-2: #2a3953;
  --text: #e8eef8; --text-2: #c3cfdf; --muted: #93a3b8; --faint: #6c7c92;
  --blue: #5a7dff; --blue-2: #7a96ff; --blue-soft: #18264a; --blue-ring: rgba(90, 125, 255, .3); --btn-bg: #3d60f5; --btn-bg-hover: #3557e8;
  --ok: #3ccf91; --ok-soft: #10301f; --warn: #f0b04a; --warn-soft: #33260f; --bad: #ff7b7b; --bad-soft: #3a1717;
  --chart: #5a7dff; --chart-track: #1a2740; --grid: #1c283c;
  --side: #070d18; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #111a2b; --surface-2: #0f1828; --line: #1f2b40; --line-2: #2a3953;
    --text: #e8eef8; --text-2: #c3cfdf; --muted: #93a3b8; --faint: #6c7c92;
    --blue: #5a7dff; --blue-2: #7a96ff; --blue-soft: #18264a; --blue-ring: rgba(90, 125, 255, .3); --btn-bg: #3d60f5; --btn-bg-hover: #3557e8;
    --ok: #3ccf91; --ok-soft: #10301f; --warn: #f0b04a; --warn-soft: #33260f; --bad: #ff7b7b; --bad-soft: #3a1717;
    --chart: #5a7dff; --chart-track: #1a2740; --grid: #1c283c;
    --side: #070d18; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.015em; }
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: .98rem; font-weight: 700; }
p { margin: 0; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.side :focus-visible { outline-color: #9db8ff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .86rem; } .tiny { font-size: .78rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .86em; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.stack > * + * { margin-top: 14px; } .stack-lg > * + * { margin-top: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; color: #fff; }
.brand img { height: 30px; width: auto; }
.brand-tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7ea2ff; border: 1px solid rgba(126, 162, 255, .35); border-radius: 999px; padding: 2px 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-text); font-weight: 600; font-size: .94rem; }
.nav a:hover { background: var(--side-hover); text-decoration: none; color: #fff; }
.nav a[aria-current="page"] { background: var(--side-active); color: #fff; box-shadow: inset 3px 0 0 #7ea2ff; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--side-muted); padding: 0 12px 6px; font-weight: 700; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.me a { color: #fff; font-weight: 700; font-size: .9rem; display: block; }
.me small { color: var(--side-muted); font-size: .76rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #1455ff, #7ea2ff); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.side-actions { display: flex; gap: 6px; }
.side-actions button, .side-actions form { flex: 1; }
.side-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 1px solid rgba(255, 255, 255, .12); color: var(--side-text);
  border-radius: 10px; padding: 8px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.side-btn:hover { background: var(--side-hover); color: #fff; }
.main { min-width: 0; }
.topbar { display: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 30px 32px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head p { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.card-body { padding: 22px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* KPI */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.kpi .label { font-size: .82rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.kpi .ic svg { width: 16px; height: 16px; }
.meter { height: 6px; border-radius: 99px; background: var(--chart-track); overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .6s ease; }
.meter.warn > span { background: var(--warn); } .meter.bad > span { background: var(--bad); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label-text { font-weight: 700; font-size: .88rem; color: var(--text-2); }
.hint { font-size: .8rem; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], input[type=date], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 42px; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-ring); }
input[aria-invalid=true] { border-color: var(--bad); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px); background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input-lg { font-size: 1.05rem !important; min-height: 50px !important; padding: 12px 14px !important; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .92rem; border-radius: 10px;
  padding: 10px 16px; min-height: 42px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: #fff; box-shadow: 0 6px 16px -8px var(--btn-bg); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .84rem; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1rem; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-icon { width: 34px; min-height: 34px; padding: 0; border-radius: 8px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.toggle:hover { border-color: var(--line-2); }
.toggle input { appearance: none; width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; flex: none; margin: 1px 0 0; cursor: pointer; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.toggle input:checked { background: var(--blue); }
.toggle input:checked::after { transform: translateX(16px); }
.toggle b { display: block; font-size: .9rem; }
.toggle span { font-size: .8rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: center; font-size: .9rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding-top: 6px; }

/* Selector con búsqueda (localidades) */

/* ---------- Avisos ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .92rem; border: 1px solid transparent; }
.alert svg { margin-top: 2px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.alert-info { background: var(--blue-soft); color: var(--text); border-color: color-mix(in srgb, var(--blue) 20%, transparent); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 90; max-width: 380px; animation: up .3s ease; box-shadow: var(--shadow-lg); }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }

/* ---------- Insignias ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td .strong { font-weight: 700; color: var(--text); }
.cell-sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.empty { padding: 48px 22px; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--line-2); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.filters input, .filters select { min-height: 38px; padding: 7px 12px; width: auto; }
.filters input[type=search] { min-width: 240px; flex: 1; }
.filters select { padding-right: 34px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; font-size: .84rem; }
.seg a[aria-current=true] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); text-decoration: none; }

/* ---------- Búsqueda principal ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 30px; color: #fff;
  background: radial-gradient(1200px 300px at 100% 0, rgba(126, 162, 255, .35), transparent 60%), linear-gradient(135deg, #0b2c48 0%, #123a5e 55%, #1455ff 160%); }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; background: url("../img/mark-light.svg") no-repeat center/contain; opacity: .07; }
.hero h1 { color: #fff; font-size: 1.9rem; }
.hero p { color: #c9d6e6; margin-top: 8px; max-width: 640px; }

/* Progreso en vivo */

/* ---------- Gráficos ---------- */
:root[data-theme="dark"] .tip { background: #233150; }

/* ---------- Ajustes ---------- */
.settings { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.snav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.snav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: .9rem; }
.snav a:hover { background: var(--surface-2); text-decoration: none; }
.snav a[aria-current=page] { background: var(--blue-soft); color: var(--blue); }
.section-title { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.section-title .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.section-title p { color: var(--muted); font-size: .9rem; margin-top: 3px; }

/* Diálogo (catálogo de modelos) */

/* ---------- Acceso ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: radial-gradient(900px 400px at 0 100%, rgba(20, 85, 255, .45), transparent 60%), linear-gradient(160deg, #0b2c48, #071a2c); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; top: 20%; width: 460px; height: 460px; background: url("../img/mark-light.svg") no-repeat center/contain; opacity: .06; }
.auth-side h2 { font-size: 2.1rem; font-weight: 800; line-height: 1.15; max-width: 460px; }
.auth-side p { color: #c9d6e6; max-width: 440px; margin-top: 14px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: #e6edf7; font-weight: 600; }
.auth-points svg { color: #7ea2ff; }
.auth-main { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.6rem; }
.auth-card .lead { color: var(--muted); margin: 8px 0 24px; }
.otp { letter-spacing: .4em; text-align: center; font-size: 1.4rem !important; font-weight: 800; }
.qr { background: #fff; border-radius: 12px; padding: 10px; display: inline-block; border: 1px solid var(--line); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, monospace; }
.codes span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .split, .settings { grid-template-columns: minmax(0, 1fr); }
  .snav { position: static; flex-direction: row; overflow-x: auto; }
  .snav a { white-space: nowrap; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60; transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(7, 18, 33, .5); z-index: 50; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--side); position: sticky; top: 0; z-index: 40; }
  .topbar img { height: 26px; }
  .topbar button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .wrap { padding: 20px 20px 48px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 24px; } .hero h1 { font-size: 1.5rem; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .filters input[type=search] { min-width: 100%; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; } .kpi .value { font-size: 1.35rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .side, .topbar, .btn, .filters, .pager { display: none !important; } .shell { display: block; } .card { box-shadow: none; } }
.mt { margin-top: 22px; } .mt-sm { margin-top: 10px; }
:root[data-theme="dark"] .logo-dark-swap { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-dark-swap { filter: brightness(0) invert(1); } }
.hero .eyebrow { color: #7ea2ff; }
.inline { display: inline; }

[hidden] { display: none !important; }
a.live-card { display: block; color: var(--text); text-decoration: none; }
a.live-card:hover { border-color: var(--blue); text-decoration: none; }
@media (max-width: 640px) {
}

@media (max-width: 860px) {
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.cards td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 92px 1fr; gap: 8px; text-align: left !important; }
  table.cards td::before { content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding-top: 3px; }
  table.cards td:first-child { display: block; padding-bottom: 6px; }
  table.cards td:first-child::before { display: none; }
  table.cards tbody tr:hover td { background: none; }
}
.notify-btn { margin-top: 10px; }
select.input-lg { padding-right: 38px !important; text-overflow: ellipsis; }

/* ---------- Tablet horizontal y portátil pequeño: barra lateral de iconos ---------- */
@media (min-width: 861px) and (max-width: 1280px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); }
  .side { padding: 18px 10px; align-items: center; }
  .brand { padding: 4px 0; }
  .brand .brand-full { display: none; } .brand .brand-mark { display: block; }
  .brand-tag, .nav-label, .nav a span, .me > span:last-child, .side-btn span { display: none; }
  .nav a { justify-content: center; padding: 12px; }
  .nav a svg { width: 20px; height: 20px; }
  .me { padding: 6px; background: none; justify-content: center; }
  .side-actions { flex-direction: column; width: 100%; }
  .side-btn { padding: 10px; }
  .wrap { padding: 26px 24px 56px; }
}
/* ---------- Tablet (641-1100): la columna lateral de la portada se reparte en dos ---------- */
@media (min-width: 641px) and (max-width: 1100px) {
}
/* ---------- Tablet vertical: tarjetas de negocio en dos columnas ---------- */
@media (min-width: 641px) and (max-width: 860px) {
  table.cards tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
  table.cards tr { border-right: 1px solid var(--line); }
  table.cards tr:nth-child(2n) { border-right: 0; }
}
/* ---------- Móvil ---------- */
@media (max-width: 640px) {
  .wrap { padding: 16px 14px 40px; }
  .g2, .g3, .form-grid, .search-main { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 20px; border-radius: 16px; } .hero h1 { font-size: 1.32rem; }
  .page-head { align-items: flex-start; } .page-head h1 { font-size: 1.35rem; }
  .page-head > .row, .page-head > a.btn { width: 100%; }
  .page-head > .row > *, .page-head > .row form, .page-head > .row form .btn { flex: 1 1 auto; }
  .card-head, .card-body, .card-pad { padding: 16px; }
  .filters { padding: 12px 16px; } .filters select, .filters .btn { flex: 1 1 45%; }
  .pager { padding: 12px 16px; flex-direction: column; gap: 8px; }
  .form-actions { justify-content: stretch; } .form-actions .btn { flex: 1; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  .seg { width: 100%; } .seg a { flex: 1; text-align: center; }
}
/* Zonas táctiles cómodas */
@media (pointer: coarse) {
  .check { min-height: 40px; }
  .btn-sm { min-height: 40px; } .btn-icon { width: 40px; min-height: 40px; }
  .card-head > a.small { padding: 8px 0; }
}

.show-m, .brand-mark { display: none; }
@media (max-width: 860px) {
  .hide-m { display: none !important; } .show-m { display: inline; }
  table.cards td.actions { display: flex; flex-wrap: wrap; gap: 8px; }
  table.cards td.actions::before { display: none; }
  table.cards td > select, table.cards td > input { width: 100%; }
}
.mono { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  table.cards td > form[id] { display: none; }  /* formularios contenedores (form="…"): no ocupan celda */
  .snav { scrollbar-width: thin; mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

.price-row { gap: 10px 14px; align-items: center; }
.price-row label { display: inline-flex; align-items: center; gap: 6px; }
.price-row input.price { width: 92px; min-height: 36px; padding: 6px 10px; }
table.cards select, .table-wrap td select { min-width: 11rem; }

.seg-n { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--chart-track); font-size: .74rem; font-variant-numeric: tabular-nums; }
.seg a[aria-current=true] .seg-n { background: var(--blue-soft); color: var(--blue); }
.filters .btn { min-height: 38px; }
@media (max-width: 640px) { .seg a { padding: 6px 6px; font-size: .8rem; white-space: nowrap; } .seg-n { margin-left: 2px; min-width: 18px; padding: 0 4px; } }

.nowrap-wrap { text-wrap: balance; }
@media (pointer: coarse) { .check input { width: 22px; height: 22px; } }


/* ---------- inesIA Cuenta ---------- */
.nav-group + .nav-group { margin-top: 16px; }
.brand-tag.cuenta { color: #b9ccff; }
.topbar .brand-tag { margin-left: 8px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.svc { display: flex; flex-direction: column; padding: 22px; gap: 14px; position: relative; overflow: hidden; }
.svc::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--blue), #7ea2ff); opacity: 0; }
.svc.on::before { opacity: 1; }
.svc-top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.svc-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: none; }
.svc-ic svg { width: 24px; height: 24px; }
.svc h2 { font-size: 1.15rem; }
.svc .tagline { color: var(--muted); font-size: .9rem; }
.svc-meta { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; color: var(--text-2); padding-top: 12px; border-top: 1px dashed var(--line); }
.svc-meta > div { display: flex; justify-content: space-between; gap: 10px; }
.svc-meta b { font-variant-numeric: tabular-nums; }
.svc-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.svc-actions .btn { flex: 1; }
.svc-actions form { flex: 1 1 100%; display: flex; }
.svc-actions:has(form) > .btn { flex: 1 1 100%; }
.st-trial { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.st-active { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.st-past_due { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.st-off, .st-closed { background: var(--surface-2); color: var(--muted); }
.st-suspended { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.welcome .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eaf0ff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.access-grid .field > label { font-size: .8rem; }
.member { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who actions" "access access"; gap: 14px 18px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.member .who { grid-area: who; } .member > form, .member > .access-grid, .member > .muted { grid-area: access; } .member-actions { grid-area: actions; }
.member:last-child { border-bottom: 0; }
.member .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.member .who > span:last-child { min-width: 0; }
.member .who b { display: block; overflow: hidden; text-overflow: ellipsis; }
.member .avatar { background: linear-gradient(135deg, var(--navy-2), var(--blue)); }
.member-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.seat { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.seat.full { color: var(--warn); font-weight: 700; }
.contract { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.contract + .contract { margin-top: 14px; }
.contract-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.contract-head .t { display: flex; gap: 12px; align-items: center; font-weight: 800; }
.contract-head .svc-ic { width: 36px; height: 36px; border-radius: 10px; }
.contract-head .svc-ic svg { width: 18px; height: 18px; }
.contract-body { padding: 16px 18px; }
.limits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.limits-grid input { min-height: 38px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; }
.plan.hl { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
.plan.off { opacity: .7; }
.plan summary { list-style: none; cursor: pointer; padding: 16px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.plan summary::-webkit-details-marker { display: none; }
.plan .price { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.plan .plan-body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 16px; }
.plan .chev { transition: transform .2s; color: var(--muted); }
.plan[open] .chev { transform: rotate(180deg); }
.feat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.feat-list li { display: flex; gap: 8px; align-items: center; }
.feat-list .yes svg { color: var(--ok); }
.feat-list .no { color: var(--faint); }
.feat-list svg { width: 15px; height: 15px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0; min-width: 0; }
legend { font-weight: 800; font-size: .86rem; padding: 0 6px; color: var(--text-2); }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: 6px; cursor: pointer; border-radius: 8px; }
.pw button:hover { color: var(--text); background: var(--surface-2); }
.auth-card .foot { margin-top: 22px; font-size: .9rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.auth-card .chip-svc { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); font-weight: 700; font-size: .84rem; margin-bottom: 14px; }
.auth-back { position: absolute; top: 18px; right: 22px; font-size: .88rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.auth-main { position: relative; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 22px; border-bottom: 1px dashed var(--line); font-size: .86rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--faint); font-variant-numeric: tabular-nums; }
.svc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.svc-stats div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.svc-stats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.svc-stats span { font-size: .74rem; color: var(--muted); }
.notice-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.inline { display: inline; }
details.box > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.box > summary::-webkit-details-marker { display: none; }
details.box[open] > summary .chev { transform: rotate(180deg); }
@media (max-width: 860px) {
  .member { grid-template-columns: 1fr; grid-template-areas: "who" "access" "actions"; gap: 12px; }
  .member-actions { justify-content: flex-start; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .svc-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .svc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 8px; } }
.nav-out { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--side-muted); font-weight: 600; font-size: .88rem; }
.nav-out:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.me-name { color: #fff; font-weight: 700; font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
@media (min-width: 861px) and (max-width: 1280px) {
  .nav-out span { display: none; }
  .nav-out { justify-content: center; padding: 12px; width: 100%; }
  .nav-group { width: 100%; }
  .nav-group + .nav-group { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; }
  .side-foot { width: 100%; align-items: center; }
  .side-actions form, .side-actions button { width: 100%; }
}

.sr-only:focus { position: fixed; z-index: 100; top: 10px; left: 10px; width: auto; height: auto; clip: auto; padding: 10px 14px; background: var(--surface); color: var(--blue); border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 700; }
.toast-x { background: none; border: 0; color: inherit; padding: 2px; margin: -2px -4px 0 4px; cursor: pointer; border-radius: 6px; opacity: .75; }
.toast-x:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.toast-x svg { width: 16px; height: 16px; margin: 0; }
table.cards td .badge { justify-self: start; }
.st-expired, .st-cancelled { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.bad { color: var(--bad); }
@media (max-width: 860px) {
  .side { visibility: hidden; transition: transform .25s, visibility 0s .25s; }
  body.nav-open .side { visibility: visible; transition: transform .25s; }
}

/* ---------- Pagos ---------- */
.period-switch { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.seg-opt { cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; gap: 6px; align-items: center; padding: 8px 16px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg-opt span small { font-weight: 600; color: var(--ok); }
.seg-opt input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.plan-option { position: relative; display: block; cursor: pointer; }
.plan-option > input { position: absolute; opacity: 0; pointer-events: none; }
.plan-option-body { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 18px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.plan-option.hl .plan-option-body { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); }
.plan-option > input:checked + .plan-option-body { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
.plan-option > input:focus-visible + .plan-option-body { outline: 2px solid var(--blue); outline-offset: 2px; }
.plan-title { font-size: 1.05rem; }
.price-line b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.price-line small { color: var(--muted); }
form:has(input[name=period][value=month]:checked) [data-period=year], form:has(input[name=period][value=year]:checked) [data-period=month] { display: none; }
.pay-methods { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.svc-ic.ok { background: var(--ok-soft); color: var(--ok); }
.svc-ic.bad { background: var(--bad-soft); color: var(--bad); }
.pay-paid { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pay-review, .pay-pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pay-denied { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pay-cancelled, .pay-refunded { background: var(--surface-2); color: var(--muted); }
.vf-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.vf-pending, .vf-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.vf-rejected { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.vf-superseded { background: var(--surface-2); color: var(--muted); }
.totals { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.credit { color: var(--ok); font-weight: 700; }
.decl { padding-left: 18px; display: grid; gap: 8px; margin: 12px 0; }
input[type=file] { font: inherit; font-size: .9rem; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.mode-switch { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-opt { cursor: pointer; display: flex; }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt > span { flex: 1; display: grid; gap: 4px; align-content: start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.mode-opt small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.mode-opt small.warn-text { color: var(--warn); font-weight: 600; }
.mode-opt input:checked + span { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
.mode-opt input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 820px) { .mode-switch { grid-template-columns: minmax(0, 1fr); } }
.mode-opt.is-off { cursor: not-allowed; } .mode-opt.is-off > span { opacity: .78; background: var(--surface-2); }
form.refund { display: inline-flex; gap: 6px; align-items: center; } .input-sm { width: 96px; padding: 6px 8px; font-size: .85rem; }
/* Marca de un servicio en el acceso (PosicionIA desde posicionia.app) */
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; color: #fff; }
.auth-brand b { color: #7ea2ff; font-weight: 800; }
.auth-brand small { font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: #7ea2ff; border: 1px solid rgba(126, 162, 255, .35); border-radius: 99px; padding: 2px 8px; }
.auth-brand-card { color: var(--text); font-size: 1.3rem; }
.auth-brand-card b { color: var(--blue); }
