/* A-lega CRM · sistema visual "rigor editorial y fintech" (memoria técnica T34) */
@font-face { font-family: Geist; src: url(/fuentes/Geist-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url(/fuentes/GeistMono-Variable.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #F8F8F6; --panel: #FFFFFF; --line: #E7E6E1; --line2: #D5D4CD;
  --ink: #111827; --ink2: #374151; --mute: #6B7280;
  --acc: #1A6B45; --acc2: color-mix(in srgb, var(--acc) 82%, #000); --accs: color-mix(in srgb, var(--acc) 9%, #fff);
  --red: #9A3412; --reds: #FBF0EA; --amb: #854D0E; --ambs: #FAF4E4;
  --azul: #1E3A5F; --azul-borde: color-mix(in srgb, #1E3A5F 30%, transparent); --azul-fondo: color-mix(in srgb, #1E3A5F 6%, #fff);
  --sobre-acc: #fff; --sobre-ink: #fff;
  color-scheme: light;
}
/* Tema: data-tema="claro" | "oscuro" | "sistema" en <html> (Mi cuenta). */
:root[data-tema=oscuro] {
  --bg: #0E100F; --panel: #141715; --line: #252926; --line2: #323732;
  --ink: #E8EAE6; --ink2: #C8CCC6; --mute: #9AA19B;
  --acc: color-mix(in srgb, #1A6B45 52%, #fff); --acc2: color-mix(in srgb, #1A6B45 40%, #fff); --accs: color-mix(in srgb, #1A6B45 24%, #141715);
  --red: #EFA488; --reds: #2F1E18; --amb: #E3C27C; --ambs: #2B2416;
  --azul: #9DB8D9; --azul-borde: #34465E; --azul-fondo: #17202B; --sobre-acc: #0E100F; --sobre-ink: #0E100F;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema=claro]) {
    --bg: #0E100F; --panel: #141715; --line: #252926; --line2: #323732;
    --ink: #E8EAE6; --ink2: #C8CCC6; --mute: #9AA19B;
    --acc: color-mix(in srgb, #1A6B45 52%, #fff); --acc2: color-mix(in srgb, #1A6B45 40%, #fff); --accs: color-mix(in srgb, #1A6B45 24%, #141715);
    --red: #EFA488; --reds: #2F1E18; --amb: #E3C27C; --ambs: #2B2416;
    --azul: #9DB8D9; --azul-borde: #34465E; --azul-fondo: #17202B; --sobre-acc: #0E100F; --sobre-ink: #0E100F;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 Geist, system-ui, sans-serif; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -.025em; font-weight: 600; }
a { color: var(--acc); }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; }
.mute { color: var(--mute); }

/* Controles */
label { display: block; font-weight: 500; margin: 0 0 14px; }
input[type=email], input[type=password], input[type=text] {
  display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 12px;
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 6px;
}
input:focus, .boton:focus-visible, a:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 6px;
  border: 1px solid var(--line2); background: var(--panel); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.boton:hover { background: var(--bg); }
.boton.pri { width: 100%; min-height: 46px; margin-top: 8px; background: var(--acc); border-color: var(--acc); color: #fff; }
.boton.pri:hover { background: var(--acc2); }
.aviso { padding: 10px 12px; border-radius: 6px; margin: 0 0 16px; border: 1px solid; }
.aviso.error { background: var(--reds); color: var(--red); border-color: color-mix(in srgb, var(--red) 25%, transparent); }
.aviso.ok { background: var(--accs); color: var(--acc); border-color: color-mix(in srgb, var(--acc) 25%, transparent); }

/* Acceso */
.acceso-marco { min-height: 100vh; display: flex; flex-wrap: wrap; }
.acceso-marca { flex: 1 1 420px; background: var(--acc); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.acceso-marca h1 { font-size: 44px; line-height: 1.05; margin: 0; max-width: 520px; }
.acceso-marca p { font-size: 16px; opacity: .9; margin: 16px 0 0; }
.acceso-pie { font-size: 13px !important; }
.acceso-form { flex: 1 1 420px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--panel); }
.caja { width: 100%; max-width: 380px; }
.caja h2 { font-size: 26px; margin: 0 0 4px; }
.caja > p { margin: 0 0 22px; }
.marca { display: flex; align-items: center; gap: 10px; }
.marca-a { width: 36px; height: 36px; border-radius: 8px; background: #fff; color: #1A6B45; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.marca-txt { font-weight: 650; font-size: 20px; line-height: 1; }
.secreto { font-family: "Geist Mono", monospace; font-size: 17px; letter-spacing: .06em; padding: 12px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); word-break: break-all; margin: 8px 0 16px; }
.codigos { columns: 2; font-family: "Geist Mono", monospace; font-size: 15px; padding: 12px 16px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); margin: 8px 0 16px; }
.enlaces { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 13px; }

/* Interna */
.app { min-height: 100vh; display: flex; flex-wrap: wrap; }
.lateral { flex: 1 1 220px; max-width: 240px; padding: 20px 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.marca-peq { padding: 2px 10px 20px; }
.marca-peq .marca-a { width: 28px; height: 28px; font-size: 14px; background: var(--acc); color: var(--sobre-acc); border-radius: 6px; }
.marca-peq .marca-txt { font-size: 16px; display: flex; flex-direction: column; gap: 3px; }
.marca-peq small { font-size: 11.5px; font-weight: 400; color: var(--mute); }
.nav { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink2); text-decoration: none; font-weight: 500; border: 1px solid transparent; }
.nav.on { background: var(--panel); color: var(--acc); border-color: var(--line); font-weight: 600; }
.nav.off { color: var(--mute); opacity: .6; }
.lateral-pie { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.yo { display: flex; gap: 10px; align-items: center; padding: 6px; margin: 0 -6px; border-radius: 6px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.yo:hover { background: var(--panel); }
.yo.on { background: var(--panel); border-color: var(--line); }
.yo > span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.yo-nombre { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yo small { font-size: 11.5px; color: var(--mute); }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center;
  background: var(--accs); color: var(--acc); font-weight: 600; font-size: 12.5px; border: 1px solid var(--line); }
.avatar.grande { width: 88px; height: 88px; font-size: 30px; }
.principal { flex: 999 1 560px; min-width: 0; padding: 28px 40px 56px; background: var(--panel); }
.cabecera { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.cabecera h1 { font-size: 26px; margin: 0; }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.datos > div { padding: 16px 20px; border-left: 1px solid var(--line); margin-left: -1px; }
.datos .lbl { font-size: 11px; color: var(--mute); font-weight: 500; text-transform: uppercase; letter-spacing: .07em; }
.datos .val { font-size: 18px; font-weight: 600; margin-top: 6px; }

/* Alta del 2FA: QR y clave manual */
.qr-caja { display: flex; justify-content: center; padding: 14px; margin: 8px 0 14px; border: 1px solid var(--line2); border-radius: 6px; background: #fff; }
.qr { width: 216px; height: 216px; display: block; }
.manual { margin: 0 0 18px; }
.manual summary { cursor: pointer; font-size: 13.5px; color: var(--ink2); }
.manual summary:hover { color: var(--ink); }
.pequeno { font-size: 12.5px; }
.separado { margin-top: 22px; }

/* ── Fase 2: casos ─────────────────────────────────────────────── */
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 14px; margin: 0 0 12px; }
.h2-sec { margin: 36px 0 12px; }
.h3-sec { margin-top: 22px; }
.sub { font-size: 12.5px; color: var(--mute); margin-top: 2px; }
.der { text-align: right; }
.rojo { color: var(--red); } .ambar { color: var(--amb); }
.cuenta { margin-left: 6px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--acc); color: #fff; }
.cabecera.fila { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.cabecera p { margin: 6px 0 0; }
.migas { font-size: 13px; color: var(--mute); margin-bottom: 14px; }
.migas a { color: var(--mute); text-decoration: none; } .migas a:hover { color: var(--ink); }
.ref { font-family: "Geist Mono", ui-monospace, monospace; font-size: 13px; font-weight: 500; color: var(--ink); text-decoration: none; }
a.ref:hover { color: var(--acc); text-decoration: underline; }
.leyenda { font-size: 12px; margin-top: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Botones */
.boton.acc { background: var(--acc); border-color: var(--acc); color: #fff; }
.boton.acc:hover { background: var(--acc2); }
.boton.peq { min-height: 32px; padding: 0 12px; font-size: 13px; }
.boton.peligro { color: var(--red); }
.boton[disabled] { opacity: .5; cursor: not-allowed; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 32px; }
.kpis > * { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border-left: 1px solid var(--line); margin-left: -1px; color: inherit; text-decoration: none; }
.kpis > a:hover { background: var(--bg); }
.kpis .lbl, .lbl { font-size: 11px; color: var(--mute); font-weight: 500; text-transform: uppercase; letter-spacing: .07em; }
.kpis .val { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.bloque-tit { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* Tablas */
.tabla-marco { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-size: 11px; font-weight: 500; color: var(--mute); text-transform: uppercase; letter-spacing: .07em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
.tabla td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.vacio { border: 1px dashed var(--line2); border-radius: 8px; padding: 28px; text-align: center; color: var(--mute); }
.vacio strong { color: var(--ink); }

/* Chips de estado y plazo */
.chip { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line2); color: var(--ink2); background: var(--panel); white-space: nowrap; }
.chip.f1, .chip.f2 { border-color: var(--azul-borde); color: var(--azul); background: var(--azul-fondo); }
.chip.f3, .chip.f4 { border-color: color-mix(in srgb, var(--acc) 30%, transparent); color: var(--acc); background: var(--accs); }
.chip.f5 { background: var(--acc); border-color: var(--acc); color: #fff; }
.chip.fin { color: var(--mute); }
.chip.rojo { border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); background: var(--reds); }
.plazo { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.plazo.verde { color: var(--acc); } .plazo.ambar { color: var(--amb); } .plazo.rojo { color: var(--red); }
.plazo.vencido { color: var(--sobre-ink); background: var(--ink); padding: 1px 7px; border-radius: 4px; }
.plazo.sin { color: var(--mute); font-weight: 500; }
.imp { font-family: "Geist Mono", monospace; font-size: 12.5px; font-weight: 600; color: var(--acc); letter-spacing: .02em; }
.imp-off { color: var(--line2); }

/* Salud */
.salud { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; }
.salud li { display: grid; grid-template-columns: 14px 200px 1fr; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.salud li:last-child { border-bottom: 0; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.punto.ok { background: var(--acc); } .punto.mal { background: var(--red); } .punto.pend { background: var(--amb); }

/* Lista de casos */
.barra { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.barra-der { display: flex; gap: 10px; align-items: center; }
.pestanas { display: flex; gap: 2px; flex-wrap: wrap; }
.pest { padding: 6px 11px; border-radius: 6px; color: var(--ink2); text-decoration: none; font-size: 13.5px; font-weight: 500; border: 1px solid transparent; }
.pest:hover { background: var(--bg); }
.pest.on { background: var(--bg); border-color: var(--line); color: var(--ink); }
.buscar input { height: 34px; width: 260px; padding: 0 10px; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; }
.conmutador { display: inline-flex; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
.conmutador a { padding: 6px 12px; font-size: 13px; color: var(--ink2); text-decoration: none; }
.conmutador a.on { background: var(--bg); color: var(--ink); font-weight: 600; }
.conmutador a + a { border-left: 1px solid var(--line2); }

/* Tablero */
.tablero { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.columna { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 120px; }
.columna h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink2); margin: 2px 4px 10px; }
.tarjeta { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; color: inherit; text-decoration: none; }
.tarjeta:hover { border-color: var(--line2); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.tarjeta-sup, .tarjeta-inf { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.tarjeta-cli { font-weight: 600; margin: 6px 0 0; }
.tarjeta-inf { margin-top: 8px; }

/* Formularios */
.formulario fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px 4px; margin: 0 0 18px; }
.formulario legend { padding: 0 6px; font-weight: 600; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
select, textarea, input[type=date], input[type=search] { font: inherit; color: var(--ink); }
select, input[type=date] { display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 10px; background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; }
textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; resize: vertical; }
.compacto label { font-size: 13px; }
.compacto input[type=text], .compacto select, .compacto input[type=date] { height: 38px; }
.ayuda { display: block; font-size: 12px; font-weight: 400; color: var(--mute); margin-top: 4px; }
.obl { font-size: 11px; font-weight: 400; color: var(--mute); }
.acciones { display: flex; justify-content: flex-end; gap: 10px; }
.en-linea { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.en-linea select, .en-linea input[type=text] { width: auto; height: 32px; margin: 0; font-size: 13px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 6px; background: var(--panel); color: var(--ink); }
input.corto { max-width: 160px; }
.aviso.ambar { background: var(--ambs); color: var(--amb); border-color: color-mix(in srgb, var(--amb) 25%, transparent); }
.aviso ul { margin: 0; padding-left: 18px; }
.aviso .en-linea { margin-top: 10px; }

/* Ficha */
.ficha-cab { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 20px; }
.ficha-cab h1 { font-size: 26px; margin: 8px 0 2px; }
.ficha-cab p { margin: 0; }
.ficha-ref { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ficha-ref .mono { font-size: 14px; font-weight: 600; }
.plazo-caja { display: grid; grid-template-columns: auto auto; gap: 10px 28px; align-content: start; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--line2); border-radius: 6px; min-width: 300px; }
.plazo-caja.verde { border-left-color: var(--acc); } .plazo-caja.ambar { border-left-color: var(--amb); } .plazo-caja.rojo { border-left-color: var(--red); } .plazo-caja.vencido { border-left-color: var(--ink); }
.plazo-caja .val { font-weight: 600; margin-top: 2px; }
.plazo-cuenta { grid-column: 1 / -1; }
.plazo-nota { grid-column: 1 / -1; font-size: 12px; color: var(--mute); max-width: 340px; }
.plazo-err { color: var(--red); font-size: 13px; max-width: 320px; margin-top: 4px; }
.progreso { display: flex; list-style: none; padding: 0; margin: 0 0 20px; counter-reset: paso; }
.progreso li { flex: 1; font-size: 12px; color: var(--mute); padding-top: 9px; border-top: 3px solid var(--line); margin-right: 4px; }
.progreso li.hecho { border-top-color: var(--acc); color: var(--ink2); }
.progreso li.ahora { border-top-color: var(--acc); color: var(--acc); font-weight: 600; }
.siguiente { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 24px; background: var(--bg); }
.siguiente > .lbl { margin-bottom: 10px; }
.paso { margin: 0; }
.paso.bloqueado { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.falta { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: var(--amb); }
.paso-det > summary { list-style: none; display: inline-flex; }
.paso-det > summary::-webkit-details-marker { display: none; }
.paso-det[open] > summary { margin-bottom: 12px; }
.paso-det form { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; max-width: 640px; }
.mas { margin-top: 12px; }
.mas > summary { cursor: pointer; font-size: 13px; color: var(--ink2); }
.mas-lista { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 12px; }
.paso-fin { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink2); margin-bottom: 24px; }
.sub-pest { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 20px; }
.dos-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; }
.dl { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: 8px 12px; margin: 0; }
.dl dt { color: var(--mute); font-size: 13px; }
.dl dd { margin: 0; }
.texto-cli { margin: 0; color: var(--ink2); }
.notas { list-style: none; padding: 0; margin: 14px 0 0; }
.notas li { padding: 10px 0; border-top: 1px solid var(--line); }
.nota-cab { font-size: 13px; }
.nota-txt { margin-top: 4px; color: var(--ink2); }
.nota-form .en-linea { justify-content: flex-end; margin-top: 8px; }
.tiempo { list-style: none; padding: 0 0 0 18px; margin: 0; border-left: 2px solid var(--line); }
.tiempo li { position: relative; padding: 0 0 16px 6px; }
.tiempo li::before { content: ""; position: absolute; left: -24px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--panel); border: 2px solid var(--acc); }
.t-nota { margin-top: 4px; padding: 8px 10px; border-radius: 6px; background: var(--bg); color: var(--ink2); font-size: 13.5px; }
.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.checklist li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.checklist li.si span:first-child { color: var(--acc); font-weight: 700; }
.checklist li.no { color: var(--ink2); }

@media (max-width: 760px) {
  .principal { padding: 20px 16px 40px; }
  .lateral { max-width: none; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .lateral-pie { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; }
  .buscar input { width: 100%; }
  .salud li { grid-template-columns: 14px 1fr; } .salud li > :last-child { grid-column: 2; }
  .plazo-caja { min-width: 0; width: 100%; }
}

.plazo .ico { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.plazo.ambar .ico { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.plazo.rojo .ico { background: currentColor; }
.plazo.vencido .ico { border-radius: 1px; background: currentColor; }
.plazo.sin .ico { display: none; }
.leyenda .plazo { font-weight: 500; }
.tablero { grid-template-columns: repeat(6, minmax(160px, 1fr)); }
.tarjeta .chip { white-space: normal; }
.boton.acc, .boton.pri, .cuenta, .chip.f5, .acceso-marca { color: var(--sobre-acc); }

.ref { white-space: nowrap; }
.apod { margin: 8px 0 4px 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.casilla { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13px; margin: 0; }
.casilla input { margin-top: 3px; accent-color: var(--acc); }

/* ── Mi cuenta ─────────────────────────────────────────────────── */
.cuenta-cab { display: flex; gap: 18px; align-items: center; }
.cuenta-cab h1 { margin: 0; }
.cuenta-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.cuenta-rejilla .panel { margin: 0; }
.foto-fila { display: flex; gap: 18px; align-items: flex-start; }
.foto-fila .en-linea { margin-top: 10px; }
input[type=file] { display: block; margin-top: 8px; font: inherit; font-size: 13px; color: var(--ink2); }
input[type=file]::file-selector-button { font: inherit; font-weight: 500; margin-right: 10px; padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink); cursor: pointer; }
.temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tema-op { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 10px; border: 1px solid var(--line2); border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; }
.tema-op:has(input:checked) { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.tema-op input { position: absolute; opacity: 0; }
.tema-op:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }
.tema-muestra { display: flex; height: 44px; border-radius: 5px; overflow: hidden; border: 1px solid var(--line2); }
.tema-muestra span { flex: 1; }
.tema-claro .tema-muestra span { background: #F8F8F6; } .tema-claro .tema-muestra span + span { background: #fff; }
.tema-oscuro .tema-muestra span { background: #0E100F; } .tema-oscuro .tema-muestra span + span { background: #141715; }
.tema-sistema .tema-muestra span { background: #F8F8F6; } .tema-sistema .tema-muestra span + span { background: #141715; }
.sesiones { list-style: none; padding: 0; margin: 0 0 12px; }
.sesiones li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sesiones li:last-child { border-bottom: 0; }
.plazo.llamada { color: var(--azul); }
.plazo.llamada::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Arreglos de Mi cuenta en pantallas anchas */
.cuenta-rejilla > .panel, .dos-col > .panel { min-width: 0; }
.foto-fila { flex-wrap: wrap; }
.foto-fila > div { flex: 1 1 220px; min-width: 0; }
input[type=file] { max-width: 100%; }
.dl dd { min-width: 0; overflow-wrap: anywhere; }
.tema-op { min-width: 0; }
/* Leyenda de plazos: sin cajas, todos iguales */
.leyenda .plazo.vencido { background: none; color: var(--ink); padding: 0; }

/* Estado del sistema */
.estado { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.estado-item { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: var(--panel); }
.estado-item.mal { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: var(--reds); }
.estado-cab { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.estado-val { font-size: 15px; font-weight: 600; }
.estado-enlace { font-size: 12.5px; margin-top: 2px; text-decoration: none; }
a.estado-enlace:hover { text-decoration: underline; }

/* Registro */
.cadena { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); }
.cadena.ok { color: var(--acc); background: var(--accs); }
.cadena.mal { color: var(--red); background: var(--reds); }
.filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.filtros label { font-size: 12.5px; margin: 0; }
.filtros select, .filtros input { height: 36px; margin-top: 4px; font-size: 13px; }
.filtros input[type=text] { display: block; width: 100%; padding: 0 10px; border: 1px solid var(--line2); border-radius: 6px; background: var(--panel); color: var(--ink); }
.filtros-botones { display: flex; gap: 8px; }
.filtros-botones .boton { min-height: 36px; }
.tabla.registro td { font-size: 13px; }
.tabla.registro .detalle { max-width: 420px; overflow-wrap: anywhere; }
.tabla.registro tr.alerta td { background: color-mix(in srgb, var(--red) 6%, transparent); }
.tabla.registro tr.alerta strong { color: var(--red); }
.nowrap { white-space: nowrap; }
.paginar { display: flex; justify-content: center; margin: 14px 0; }

/* Emails del caso */
.correos { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; }
.correos li { border-bottom: 1px solid var(--line); }
.correos li:last-child { border-bottom: 0; }
.correos summary { cursor: pointer; padding: 12px 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.correo-cuerpo { padding: 0 16px 14px 32px; }
.correo-cuerpo pre { white-space: pre-wrap; font: 13.5px/1.55 Geist, system-ui, sans-serif; color: var(--ink2); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin: 8px 0; }
.enlace-encargo { margin: 14px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.enlace-encargo input.enlace { width: 100%; height: 38px; margin: 0 0 10px; font-size: 12.5px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); color: var(--ink); }
.rgpd { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.rgpd form { margin: 0; }
