/* Estándar visual compartido con MCP Dokploy (eCortesCL): tokens de ecortes.cl (Manrope + DM Mono, tinta y verde marca),
   tema claro/oscuro automático, barra lateral oscura, tarjetas redondeadas y héroes con cuadrícula. */
:root {
  --ink: #0c110e; --ink-raised: #121a15; --ink-soft: #1a251e;
  --on-dark: #e9eee7; --on-dark-muted: #a3afa5; --line-dark: rgba(224, 238, 226, 0.14);
  --bg: #f3f6f4; --surface: #ffffff; --surface-2: #f7f9f8; --text: #14201a; --muted: #55655b; --line: #e0e8e2;
  --brand: #00dc82; --brand-bright: #3ff0a0; --brand-deep: #00a566; --brand-text: #00753f; --brand-soft: rgba(0, 220, 130, 0.12); --on-brand: #0c110e;
  --info: #3b4fb8; --info-soft: #eef1ff; --warn: #9a5b00; --warn-soft: #fff1dc; --danger: #c4372a; --danger-soft: #fdecea; --code-bg: #eef3f0;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(12, 17, 14, 0.04), 0 12px 32px -12px rgba(12, 17, 14, 0.16);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c110e; --surface: #121a15; --surface-2: #16201a; --text: #e9eee7; --muted: #a3afa5; --line: rgba(224, 238, 226, 0.12);
    --brand-text: #3ff0a0; --brand-soft: rgba(0, 220, 130, 0.14);
    --info: #8aa4ff; --info-soft: rgba(138, 164, 255, 0.14); --warn: #ffb454; --warn-soft: rgba(255, 180, 84, 0.14);
    --danger: #ff7a6e; --danger-soft: rgba(255, 122, 110, 0.14); --code-bg: #0f1712; --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-text); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 6px; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin: 0; letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -0.01em; font-weight: 750; }
h3 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 12px; }
em { font-style: normal; color: var(--brand-text); }
.accent { color: var(--brand-text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { color: var(--muted); font-size: 17px; max-width: 640px; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; line-height: 1.1; color: var(--on-dark); }
.brand-name span { color: var(--brand); }
.brand-by { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--on-dark-muted); letter-spacing: 0.02em; margin-top: 2px; }

/* ---------- Estructura de la aplicación (barra lateral) ---------- */
.layout { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar { background: radial-gradient(120% 60% at 0% 0%, rgba(0, 220, 130, 0.14), transparent 60%), var(--ink); color: var(--on-dark);
  padding: 22px 14px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line-dark); }
.brand-link { display: block; padding: 0 8px 22px; text-decoration: none; }
.brand-link:hover { text-decoration: none; }
.nav-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-dark-muted); padding: 14px 12px 6px; opacity: 0.8; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--on-dark-muted); font-weight: 600; font-size: 14.5px; position: relative; }
.nav a:hover { background: var(--ink-soft); color: var(--on-dark); text-decoration: none; }
.nav a.active { background: rgba(0, 220, 130, 0.1); color: var(--brand); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sidebar-footer { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line-dark); font-size: 13px; color: var(--on-dark-muted); }
.sidebar-footer .email { color: var(--on-dark); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer form { margin: 0; }
.sidebar-footer .by { display: flex; align-items: center; gap: 8px; margin-top: 14px; opacity: 0.75; }
.sidebar-footer .by img { height: 18px; width: auto; }
.main { padding: 32px 40px 56px; min-width: 0; max-width: 1320px; }
.topbar { display: none; }
.menu-toggle { display: none; }
.backdrop { display: none; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 30; transform: translateX(-100%); transition: transform 0.2s ease; }
  #menu:checked ~ .layout .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.4); }
  #menu:checked ~ .layout .backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 25; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line-dark); }
  .topbar .icon-btn { color: var(--on-dark); border-color: var(--line-dark); background: transparent; }
  .main { padding: 22px 16px 44px; }
}

/* ---------- Cabecera de página ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 10px 0 0; max-width: 680px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-text); margin: 0 0 12px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- Héroe oscuro (como ecortes.cl) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 18px; padding: 30px 32px; margin-bottom: 20px; color: var(--on-dark);
  background: radial-gradient(60% 90% at 100% 0%, rgba(0, 220, 130, 0.22), transparent 60%), linear-gradient(rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 34px 34px, var(--ink); border: 1px solid var(--line-dark); }
.hero h1 { color: #fff; max-width: 760px; }
.hero h1 em, .hero h1 .accent { color: var(--brand); }
.hero p { color: var(--on-dark-muted); max-width: 640px; margin-top: 12px; }
.hero .eyebrow { color: var(--brand); }
.hero .pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-dark); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; color: var(--on-dark); margin-bottom: 18px; }
.hero .pill b { background: var(--brand); color: var(--on-brand); border-radius: 999px; padding: 2px 9px; font-size: 11px; font-family: var(--mono); font-weight: 500; }
.hero .copy input { background: rgba(255, 255, 255, 0.04); border-color: var(--line-dark); color: var(--on-dark); }
.hero .btn:not(.primary) { background: transparent; border-color: var(--line-dark); color: var(--on-dark); }
.hero .btn:not(.primary):hover { background: rgba(255, 255, 255, 0.06); }
.hero-actions, .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; align-items: center; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-text); }
.hero .link-arrow { color: var(--on-dark); }

/* ---------- Tarjetas y rejillas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card p + p { margin-top: 10px; }
.card.dark { background: var(--ink); border-color: var(--line-dark); color: var(--on-dark); box-shadow: none; }
.card.dark p, .card.dark .muted { color: var(--on-dark-muted); }
.card .n { font: 500 12px var(--mono); color: var(--brand-text); letter-spacing: .08em; }
.card h3 { font-size: 16px; margin: 6px 0 6px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title h2 { margin: 0; }
.icon-square { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); flex: none; }
.icon-square.brand { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.grid2, .grid3, .grid4 { display: grid; gap: 18px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1150px) { .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } .grid4 { gap: 12px; } }

/* secciones apiladas */
.bloque { margin-top: 28px; }
.bloque:first-child { margin-top: 0; }
.bloque > h2, .bloque > h3:first-child { margin-top: 0; }
.panelg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-top: 20px; box-shadow: var(--shadow); }
.panelg h3 { margin: 0 0 8px; font-size: 17px; }
.panelg > p { margin: 10px 0 0; color: var(--muted); }
.panelg > form { display: grid; gap: 22px; margin-top: 20px; }
.panelg > form + form { margin-top: 14px; }
details.panelg summary { cursor: pointer; padding: 2px 0; }
details.panelg[open] summary { margin-bottom: 12px; }
details.panelg > form { display: grid; gap: 20px; margin-top: 16px; }

/* indicadores (KPI) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0 0 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.kpi .v { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.kpi .v small { font: 500 13px var(--mono); color: var(--muted); letter-spacing: 0; }
.kpi .t { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 8px 24px -10px rgba(0, 220, 130, 0.7); }
.btn.primary:hover { background: var(--brand-bright); border-color: var(--brand-bright); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 9px; min-height: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.acciones form { margin: 0; }

/* ---------- Formularios ---------- */
label { display: grid; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--text); }
input, select, textarea { width: 100%; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2300a566' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select option { background: var(--surface); color: var(--text); }
form.campos { display: grid; gap: 16px; max-width: 460px; margin-top: 16px; }
.formg { display: grid; gap: 20px 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; }
.formg > button, .panelg form > button { justify-self: start; }
.formg label.ancho, .formg .ancho { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; color: var(--text); min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; accent-color: var(--brand-deep); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand-deep); }
.aviso { font-size: 14px; color: var(--muted); border-left: 3px solid var(--brand); padding: 2px 0 2px 12px; margin-top: 14px; }
progress { width: 100%; height: 10px; accent-color: var(--brand-deep); }

/* interruptor (switch) */
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; background: var(--surface-2); cursor: pointer; }
.interruptor + .interruptor { margin-top: -10px; }
.interruptor > span { display: grid; gap: 4px; font-weight: 400; font-size: 15px; line-height: 1.45; }
.interruptor b { font-size: 16px; font-weight: 700; color: var(--text); }
.interruptor .d { color: var(--muted); font-size: 14px; }
.interruptor input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; min-height: 0; border-radius: 14px; background: #b8c4bc; position: relative; cursor: pointer; transition: background .15s; margin: 0; padding: 0; border: 0; }
.interruptor input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interruptor input[type=checkbox]:checked { background: var(--brand-deep); }
.interruptor input[type=checkbox]:checked::after { transform: translateX(20px); }
.interruptor input[type=checkbox]:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* opciones excluyentes en tarjetas */
fieldset.opciones { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
fieldset.opciones legend { padding: 0; margin-bottom: 10px; font-size: 13.5px; font-weight: 700; }
label.opcion { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-2); cursor: pointer; font-weight: 400; font-size: 15px; color: var(--text); }
label.opcion input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-content: center; cursor: pointer; }
label.opcion input::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-deep); transform: scale(0); transition: transform .12s; }
label.opcion input:checked { border-color: var(--brand-deep); }
label.opcion input:checked::after { transform: scale(1); }
label.opcion:has(input:checked) { border-color: var(--brand-deep); box-shadow: 0 0 0 1px var(--brand-deep) inset; background: var(--brand-soft); }
label.opcion span { display: grid; gap: 3px; }
label.opcion b { font-weight: 700; }
label.opcion small { color: var(--muted); font-size: 14px; line-height: 1.4; }
label.opcion.peligro:has(input:checked) { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn) inset; background: var(--warn-soft); }

/* ---------- Tablas, insignias y avisos ---------- */
table.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tabla th { text-align: left; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 12px; border-bottom: 1px solid var(--line); }
table.tabla td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tabla tr:last-child td { border-bottom: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; text-transform: none; letter-spacing: 0; margin-left: 6px; font-family: var(--sans); }
.badge.ok { background: var(--brand-soft); color: var(--brand-text); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.off { background: var(--surface-2); color: var(--muted); }
.estado-ok { color: var(--brand-text); font-weight: 700; } .estado-error { color: var(--danger); font-weight: 700; } .estado-aviso { color: var(--warn); font-weight: 700; }
.flash { padding: 12px 15px; border-radius: var(--radius-sm); margin: 0 0 18px; font-size: 14px; font-weight: 600; }
.flash.ok { background: var(--brand-soft); color: var(--brand-text); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.flash a { text-decoration: underline; }

/* ---------- Navegación por pestañas ---------- */
nav.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 24px; padding: 0; overflow-x: auto; }
nav.tabs a { padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; }
nav.tabs a:hover { color: var(--text); text-decoration: none; }
nav.tabs a.activa { color: var(--brand-text); border-bottom-color: var(--brand); }

/* ---------- Cuentas del SII y conexión ---------- */
.cuenta { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; align-items: start; }
.cuenta .rut { font: 500 18px var(--mono); color: var(--text); }
details.clave { grid-column: 1 / -1; }
details.clave summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--muted); }
.copy, .codebox { display: flex; gap: 8px; align-items: stretch; }
.codebox { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; align-items: center; overflow-x: auto; }
.codebox code { flex: 1; white-space: nowrap; background: transparent; padding: 0; color: var(--brand-text); }
.copy input { font-family: var(--mono); font-size: 13.5px; }
.pasos { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.pasos li { margin-bottom: 8px; }
.pasos li::marker { color: var(--brand-text); font-family: var(--mono); }
.pasos b { color: var(--text); }
.lista { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.lista.ejemplos li { color: var(--text); }
.lista.ejemplos li::marker { color: var(--brand-text); }

/* ---------- Plan y primeros pasos ---------- */
.plan-banner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 20px 32px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow); }
.plan-banner.lleno { border-color: var(--warn); }
.plan-banner h2 { margin: 2px 0 4px; font-size: 26px; letter-spacing: -0.02em; }
.plan-banner p { margin: 0; }
.pb-uso p { margin-bottom: 8px; color: var(--text); }
.pb-accion { display: grid; gap: 8px; justify-items: stretch; text-align: center; }
.pasos-iniciales { margin-bottom: 20px; border: 1px solid var(--brand-deep); background: var(--brand-soft); border-radius: var(--radius); padding: 24px 26px; }
.pasos-iniciales h2 { margin: 2px 0 16px; font-size: 20px; }
.pasos-iniciales ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.paso { display: flex; gap: 16px; align-items: flex-start; }
.paso .num { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--brand-deep); display: grid; place-content: center; font: 700 14px var(--mono); color: var(--brand-text); }
.paso.hecho .num { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.paso.hecho { opacity: .65; }
.paso b { font-size: 16px; }
.paso p { margin: 4px 0 10px; color: var(--muted); font-size: 15px; max-width: 62ch; }
.plan-card { display: grid; gap: 8px; align-content: start; }
.plan-card.actual { border-color: var(--brand-deep); box-shadow: 0 0 0 1px var(--brand-deep) inset; }
.indice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.indice a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; color: var(--text); background: var(--surface); }
.indice a:hover { border-color: var(--brand); color: var(--brand-text); text-decoration: none; }
.guia-tema { scroll-margin-top: 20px; }
.guia-tema h3 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.02em; }
.guia-tema .grid2 { margin-top: 14px; }
.preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #0c110e; margin-top: 18px; }
.legal h2 { margin-bottom: 4px; font-size: 24px; } .legal h3 { margin: 22px 0 4px; font-size: 17px; } .legal p { color: var(--muted); }

/* ---------- Cabecera pública y pie ---------- */
.pubbar { background: var(--ink); border-bottom: 1px solid var(--line-dark); }
.pubbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.pubbar nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.pubbar nav a { color: var(--on-dark-muted); font-weight: 600; }
.pubbar nav a:hover { color: var(--on-dark); text-decoration: none; }
.pubbar nav form { margin: 0; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.pubmain { padding: 32px 0 56px; }
footer.pie { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
.main footer.pie { margin-top: 40px; padding: 22px 0 0; }

/* ---------- Pantallas de acceso (dividida) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { position: relative; overflow: hidden; color: var(--on-dark); padding: 40px 56px; display: flex; flex-direction: column;
  background: radial-gradient(70% 60% at 85% 20%, rgba(0, 220, 130, 0.22), transparent 60%), linear-gradient(rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(90deg, rgba(224, 238, 226, 0.05) 1px, transparent 1px) 0 0 / 38px 38px, var(--ink); }
.auth-hero .content { margin: auto 0; max-width: 560px; }
.auth-hero .eyebrow { color: var(--brand); }
.auth-hero h1 { font-size: clamp(32px, 4vw, 52px); color: #fff; letter-spacing: -0.035em; }
.auth-hero h1 .accent { color: var(--brand); }
.auth-hero p { color: var(--on-dark-muted); font-size: 17px; margin-top: 18px; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-dark); font-weight: 600; }
.auth-points li span.d { color: var(--on-dark-muted); font-weight: 400; display: block; font-size: 14px; }
.auth-points .icon-square { width: 34px; height: 34px; border-radius: 10px; background: rgba(0, 220, 130, 0.12); border-color: transparent; color: var(--brand); }
.auth-hero .foot { font-family: var(--mono); font-size: 12px; color: var(--on-dark-muted); display: flex; align-items: center; gap: 10px; }
.auth-hero .foot img { height: 20px; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 30px; }
.auth-card h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 6px; }
.auth-card form.campos { max-width: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px 32px; }
  .auth-hero .content { margin: 28px 0 0; }
  .auth-points, .auth-hero .foot { display: none; }
}
@media (max-width: 760px) { .plan-banner { grid-template-columns: 1fr; padding: 18px; } }
@media (max-width: 560px) {
  .cuenta { grid-template-columns: 1fr; } .acciones { justify-content: flex-start; }
  .panelg { padding: 18px 16px; } .formg { grid-template-columns: 1fr; } .hero { padding: 24px 20px; }
}

/* ajustes finales de la estructura */
.sidebar-footer .btn { background: transparent; border-color: var(--line-dark); color: var(--on-dark); }
.sidebar-footer .btn:hover { background: rgba(255, 255, 255, 0.06); }
main.wrap { padding-top: 32px; padding-bottom: 48px; }
.page-head h1 { word-break: break-word; }
svg { max-width: 100%; }
