/* Identidad visual del despacho (ilcabogados.es): azul marino, dorado, fondo crema, Playfair Display + Inter. */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-style: normal; font-display: swap; src: url("/static/fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-style: normal; font-display: swap; src: url("/static/fonts/playfair-display-latin-700-normal.woff2") format("woff2"); }

:root {
  --navy: #1a2744; --navy-2: #243562; --navy-3: #2f4378;
  --gold: #c9a84c; --gold-dark: #8a6d1d; --gold-light: #e8d49e;
  --white: #ffffff; --off: #f7f7f5; --gray: #eef0f4; --line: #dfe3ea;
  --text: #2c3345; --muted: #5f6885; --focus: #1d4ed8;
  --n-irrelevante-bg: #e5e7eb; --n-irrelevante-fg: #1f2937;
  --n-bajo-bg: #d1fae5; --n-bajo-fg: #064e3b;
  --n-medio-bg: #fef3c7; --n-medio-fg: #78350f;
  --n-alto-bg: #ffd9b3; --n-alto-fg: #7c2d12;
  --n-muy-alto-bg: #fecaca; --n-muy-alto-fg: #7f1d1d;
  --ok: #0b6b3a; --danger: #a11d1d;
  --radius: 12px; --shadow: 0 4px 24px rgba(26, 39, 68, .10); --shadow-lg: 0 14px 40px rgba(26, 39, 68, .18);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--sans); background: var(--off); color: var(--text); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 50; font-weight: 600; }
.skip:focus { top: 8px; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
a { color: var(--navy-3); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Barra superior ---------- */
.announce { background: var(--gold); color: var(--navy); font-size: .82rem; font-weight: 600; text-align: center; padding: 8px 16px; letter-spacing: .01em; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { height: 52px; width: auto; display: block; }
.brand .tit { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.1; border-left: 2px solid var(--gold); padding-left: 12px; }
.brand .tit small { display: block; font-family: var(--sans); font-weight: 500; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.spacer { flex: 1; }
.user { display: flex; align-items: center; gap: 12px; font-size: .84rem; color: var(--muted); }
.user .who { text-align: right; line-height: 1.25; }
.user .who b { display: block; color: var(--navy); font-weight: 600; }

/* ---------- Botones ---------- */
.btn { font: inherit; font-weight: 600; border-radius: 9px; padding: 10px 18px; cursor: pointer; border: 1.5px solid var(--gold); background: var(--gold); color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { background: #d4b55a; box-shadow: 0 6px 18px rgba(201, 168, 76, .35); transform: translateY(-1px); }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.navy:hover { background: var(--navy-2); box-shadow: 0 6px 18px rgba(26, 39, 68, .3); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.btn.ghost:hover { background: var(--gray); box-shadow: none; transform: none; }
.btn.on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn.on-dark:hover { background: rgba(255, 255, 255, .12); box-shadow: none; }
.btn.small { padding: 6px 13px; font-size: .84rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Héroe ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 420px at 85% -10%, rgba(201, 168, 76, .22), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.hero::after { content: "§"; position: absolute; right: 4%; top: -38px; font-family: var(--serif); font-size: 340px; line-height: 1; color: rgba(255, 255, 255, .05); pointer-events: none; }
.hero-in { position: relative; max-width: 1200px; margin: 0 auto; padding: 38px 24px 34px; }
.hero h1 { color: #fff; margin-bottom: 10px; }
.hero p { color: rgba(255, 255, 255, .82); max-width: 640px; margin: 0; }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; background: var(--gold); color: var(--navy); padding: 6px 14px; border-radius: 99px; margin-bottom: 14px; }
.pill.soft { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); letter-spacing: .06em; text-transform: none; font-weight: 600; padding: 4px 12px; margin: 0 8px 0 0; }
.crumb { color: var(--gold-light); text-decoration: none; font-size: .86rem; font-weight: 600; display: inline-block; margin-bottom: 12px; }
.crumb:hover { text-decoration: underline; }
.hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 26px; }
.hk { border: 1px solid rgba(201, 168, 76, .45); background: rgba(255, 255, 255, .06); border-radius: var(--radius); padding: 14px 18px; backdrop-filter: blur(2px); }
.hk .v { font-family: var(--serif); font-size: 2.1rem; font-weight: 700; color: var(--gold); line-height: 1; }
.hk .l { font-size: .8rem; color: rgba(255, 255, 255, .8); margin-top: 6px; }
.hk.warn .v { color: #ffb4a8; }

/* ---------- Estructura ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 28px 24px 70px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card > h2 { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--gold-light); }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.g2 > .card { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .v { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.kpi .l { font-size: .8rem; color: var(--muted); }
.kpi.alert { border-left-color: #d64545; } .kpi.alert .v { color: var(--danger); }
.hint { font-size: .82rem; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.err { color: var(--danger); font-weight: 600; margin-top: 10px; }

/* ---------- Pestañas del cliente ---------- */
.subnav { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 68px; z-index: 10; }
.subnav-in { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.subnav button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 14px 16px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.subnav button:hover { color: var(--navy); }
.subnav button[aria-current="page"] { color: var(--navy); border-bottom-color: var(--gold); }
.subnav .num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--gray); color: var(--navy); font-size: .7rem; margin-right: 7px; }
.subnav button[aria-current="page"] .num { background: var(--gold); }

/* ---------- Área de clientes ---------- */
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.search { flex: 1; min-width: 240px; position: relative; }
.search input { width: 100%; font: inherit; padding: 12px 14px 12px 42px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); color: var(--text); }
.search input:focus { border-color: var(--gold); outline-offset: 0; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); font-size: 1.3rem; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--white); color: var(--navy); padding: 7px 14px; border-radius: 99px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.cc { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .16s, box-shadow .16s, border-color .16s; }
.cc:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.cc-top { position: relative; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); height: 74px; }
.cc-top::after { content: "§"; position: absolute; right: 14px; top: -14px; font-family: var(--serif); font-size: 110px; color: rgba(255, 255, 255, .07); line-height: 1; }
.cc-badge { position: absolute; right: 14px; top: 14px; }
.avatar { position: absolute; left: 20px; bottom: -28px; width: 62px; height: 62px; border-radius: 50%; background: var(--gold); color: var(--navy); border: 4px solid var(--white); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.cc-body { padding: 38px 22px 14px; flex: 1; }
.cc-body h3 { font-size: 1.2rem; margin-bottom: 4px; }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.tag { font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--gray); color: var(--navy); }
.tag.gold { background: var(--gold-light); color: #5a4510; }
.cc-act { font-size: .86rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.cc-stats { display: flex; gap: 16px; margin: 12px 0 12px; font-size: .8rem; color: var(--muted); }
.cc-stats b { color: var(--navy); font-size: 1rem; display: block; line-height: 1.1; }
.stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--gray); }
.stack i { display: block; height: 100%; }
.stack-leg { display: flex; gap: 12px; font-size: .72rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.stack-leg span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; background: var(--c); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--off); font-size: .82rem; }
.cc-foot { flex-wrap: wrap; }
.cc-foot .go, .cc-foot .hint { white-space: nowrap; }
.cc-foot .go { font-weight: 700; color: var(--navy); }
.cc:hover .go { color: var(--gold-dark); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

/* ---------- Mapa de calor y gráficos ---------- */
.heat { border-collapse: separate; border-spacing: 5px; width: 100%; table-layout: fixed; }
.heat th { font-size: .72rem; font-weight: 600; color: var(--muted); padding: 2px; text-align: center; }
.heat th.rowh { text-align: right; padding-right: 8px; width: 92px; }
.heat td { height: 56px; text-align: center; font-size: 1.3rem; font-weight: 700; border-radius: 9px; }
.heat caption { text-align: left; font-weight: 600; padding-bottom: 8px; font-size: .86rem; color: var(--muted); }
.axis { font-size: .75rem; color: var(--muted); text-align: center; margin-top: 4px; }
.nv-irrelevante { background: var(--n-irrelevante-bg); color: var(--n-irrelevante-fg); }
.nv-bajo { background: var(--n-bajo-bg); color: var(--n-bajo-fg); }
.nv-medio { background: var(--n-medio-bg); color: var(--n-medio-fg); }
.nv-alto { background: var(--n-alto-bg); color: var(--n-alto-fg); }
.nv-muy-alto { background: var(--n-muy-alto-bg); color: var(--n-muy-alto-fg); }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { background: var(--white); border: 0; padding: 7px 14px; color: var(--muted); cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; font-size: .85rem; }
.bar-track { display: grid; gap: 4px; }
.bar { height: 14px; border-radius: 4px; min-width: 2px; }
.bar.inh { background: #98a1b8; } .bar.res { background: var(--navy); }
.bar-line { display: flex; align-items: center; gap: 8px; }
.bar-line .bar { flex: 0 0 auto; }
.bar-n { font-size: .74rem; color: var(--muted); min-width: 16px; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Tablas y datos ---------- */
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th { text-align: left; padding: 10px 12px; background: var(--navy); color: #fff; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
table.data th:first-child { border-top-left-radius: 8px; } table.data th:last-child { border-top-right-radius: 8px; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:hover { background: #fbfaf5; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge.est-recibida { background: var(--n-medio-bg); color: var(--n-medio-fg); }
.badge.est-admitida, .badge.est-remitida { background: var(--n-bajo-bg); color: var(--n-bajo-fg); }
.badge.est-inadmitida, .badge.est-derivada { background: var(--n-irrelevante-bg); color: var(--n-irrelevante-fg); }
.badge.est-resuelta { background: var(--gray); color: var(--muted); }
.badge.venc { background: var(--n-muy-alto-bg); color: var(--n-muy-alto-fg); }
.badge.ok { background: var(--n-bajo-bg); color: var(--n-bajo-fg); } .badge.draft { background: var(--gold-light); color: #5a4510; }
dl.ficha { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 8px 18px; margin: 0; }
dl.ficha dt { font-weight: 600; color: var(--muted); font-size: .86rem; } dl.ficha dd { margin: 0; overflow-wrap: anywhere; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, input, textarea, select { font: inherit; color: var(--text); background: var(--white); border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.filters select { min-width: 190px; }
label { display: block; font-weight: 600; margin: 14px 0 5px; font-size: .9rem; color: var(--navy); }
input, textarea { width: 100%; } textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); outline-offset: 0; }
.progress { height: 10px; background: var(--gray); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #e0c26e); }

/* ---------- Documentos y canal ---------- */
.doc { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc:first-of-type { border-top: 0; }
.doc .n { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--gold-dark); width: 46px; }
.doc .t { flex: 1; min-width: 220px; }
.doc .t small { display: block; color: var(--muted); }
.msg { border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--gray); max-width: 88%; }
.msg.informante { background: var(--n-medio-bg); color: var(--n-medio-fg); }
.msg.responsable { margin-left: auto; background: #e3ebfb; color: var(--navy); }
.msg small { display: block; opacity: .75; margin-bottom: 2px; }
.secreto { background: #fff8e1; color: #5a4510; border: 2px dashed var(--gold); border-radius: 12px; padding: 18px; margin-top: 14px; }
.secreto code { display: block; font-size: 1.3rem; letter-spacing: .08em; font-weight: 700; margin: 4px 0 10px; word-break: break-all; color: var(--navy); }
.contenido { white-space: pre-wrap; background: var(--gray); border-radius: 10px; padding: 12px 14px; }
.callout { background: #fff8e1; border-left: 4px solid var(--gold); border-radius: 8px; padding: 12px 16px; font-size: .9rem; }
.assure { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 18px 0 22px; }
.assure div { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 10px; padding: 12px 14px; font-size: .86rem; box-shadow: var(--shadow); }
.assure b { display: block; color: var(--navy); font-family: var(--serif); font-size: 1rem; }
.pub { max-width: 820px; margin: 0 auto; padding: 28px 24px 70px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60; font-weight: 500; }
.foot { text-align: center; font-size: .78rem; color: var(--muted); padding: 22px 16px 34px; border-top: 3px solid var(--gold-light); background: var(--white); }
@media (max-width: 720px) {
  .topbar-in { padding: 6px 14px; gap: 10px; } .brand img { height: 42px; } .brand .tit small { display: none; }
  .topbar-in { flex-wrap: wrap; } .user { width: 100%; flex-wrap: wrap; gap: 8px; } .user-links { flex-wrap: wrap; } .user .btn { white-space: nowrap; }
  .user .who { display: none; } .wrap { padding: 20px 14px 60px; } .hero-in { padding: 26px 16px 24px; } .hero::after { font-size: 220px; }
  .heat td { height: 44px; font-size: 1.05rem; } .heat th.rowh { width: 62px; font-size: .66rem; }
  .g2 { grid-template-columns: 1fr; } .subnav { top: 62px; } dl.ficha { grid-template-columns: 1fr; gap: 2px; } dl.ficha dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }


/* ---------- Editor del expediente ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; width: 100%; overflow-x: auto; }
.stepper li { flex: 1 1 auto; }
.step { width: 100%; display: flex; align-items: center; gap: 8px; background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 13px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.step .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gray); color: var(--navy); font-size: .76rem; flex: 0 0 auto; }
.step.on { color: var(--navy); border-bottom-color: var(--gold); } .step.on .n { background: var(--gold); }
.step.done .n { background: var(--n-bajo-bg); color: var(--n-bajo-fg); }
.ed-cuerpo h2 { border-bottom: 2px solid var(--gold-light); padding-bottom: 8px; margin-bottom: 12px; }
.ed-sub { margin: 22px 0 10px; color: var(--navy); }
.field { margin: 0 0 4px; } .field label, label.lbl { margin-top: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; margin-bottom: 6px; }
.checks { display: grid; gap: 8px; margin: 14px 0; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; margin: 0; cursor: pointer; color: var(--text); }
label.check input { width: auto; margin-top: 3px; accent-color: var(--navy); }
.ed-lista { margin: 6px 0 0; padding-left: 20px; } .ed-lista li { margin: 3px 0; }
.err-box { border-left-color: #d64545; background: #fdecec; color: #5c1818; }
.okmsg { color: var(--ok); font-weight: 600; }
.ed-barra { position: sticky; bottom: 0; z-index: 9; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 18px; margin-top: 18px; background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -6px 24px rgba(26, 39, 68, .12); backdrop-filter: blur(4px); }
.ed-barra-der { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ed-tabla td { padding: 6px 8px; } .ed-tabla input[type="text"], .ed-tabla input[type="email"] { min-width: 150px; }
.ed-tabla td.ctr { text-align: center; } .ed-tabla input[type="radio"], .ed-tabla input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--navy); }
.ed-area { background: var(--off); box-shadow: none; }
.ed-dos { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.ed-principal { min-width: 0; } .ed-principal select, .ed-delito select { max-width: 100%; }
.ed-delito { overflow-wrap: anywhere; }
.ed-lateral { display: grid; gap: 6px; position: sticky; top: 130px; }
.lat { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer; }
.lat.on { border-color: var(--gold); background: #fffaf0; } .lat small { color: var(--muted); font-weight: 700; } .lat small.okc { color: var(--ok); }
.ed-delito { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin: 0 0 12px; }
.ed-delito[open] { border-color: var(--gold-light); box-shadow: var(--shadow); padding-bottom: 14px; }
.ed-delito summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer; padding: 13px 0; list-style: none; }
.ed-delito summary::-webkit-details-marker { display: none; }
.ed-d-t { display: grid; } .ed-d-t b { color: var(--navy); font-family: var(--serif); font-size: 1.02rem; }
.ed-propuestas table.data td:first-child { min-width: 0; width: 34px; }
.ed-propuestas table.data td.ed-prop-accion { min-width: 280px; }
.ed-bloque { margin: 14px 0 0; padding-top: 10px; border-top: 2px solid var(--gold-light); font-family: var(--serif, inherit); font-size: .95rem; color: var(--navy); }
.ed-bloque small { font-weight: 400; }
.ed-act { margin: 0 0 8px; padding-left: 20px; font-size: .86rem; color: var(--muted); }
.ed-q { border: 0; border-top: 1px dashed var(--line); margin: 0; padding: 12px 0 8px; min-width: 0; }
.ed-q legend { font-weight: 600; font-size: .92rem; padding: 0 0 8px; }
.ed-escala { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-op { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 99px; cursor: pointer; font-size: .84rem; background: var(--white); }
.ed-op:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.ed-op input { width: auto; accent-color: var(--gold); margin: 0; }
.ed-resultado { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-ctl { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); }
.ed-ctl select { width: auto; min-width: 150px; } .ed-ctl-card { background: var(--white); }
.ed-nuevo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .ed-nuevo input { flex: 1; min-width: 200px; } .ed-nuevo select { width: auto; }
@media (max-width: 960px) { .ed-dos { grid-template-columns: minmax(0, 1fr); } .ed-lateral { position: static; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .step .t { display: none; } .step.on .t { display: inline; } }

.field select, .form-grid select { width: 100%; }


/* ---------- Zona de configuración ---------- */
.user-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cfg { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.cfg-nav { display: grid; gap: 8px; position: sticky; top: 90px; }
.cfg-nav button { text-align: left; background: var(--white); border: 1.5px solid var(--line); border-left: 4px solid transparent; border-radius: 10px; padding: 11px 14px; font: inherit; cursor: pointer; color: var(--text); display: grid; gap: 2px; }
.cfg-nav button b { color: var(--navy); font-family: var(--serif); font-size: 1rem; } .cfg-nav button small { color: var(--muted); font-size: .76rem; line-height: 1.3; }
.cfg-nav button[aria-current="page"] { border-left-color: var(--gold); background: #fffaf0; box-shadow: var(--shadow); } .cfg-nav button:hover { border-color: var(--gold-light); }
.cfg-cuerpo { min-width: 0; }
dialog.modal { border: 0; border-radius: 16px; padding: 24px 26px 20px; width: min(560px, calc(100vw - 28px)); box-shadow: var(--shadow-lg); border-top: 5px solid var(--gold); color: var(--text); }
dialog.modal::backdrop { background: rgba(26, 39, 68, .55); backdrop-filter: blur(2px); }
.modal h2 { margin-bottom: 10px; } .modal-cuerpo { max-height: 62vh; overflow: auto; padding: 2px; }
.modal-acc { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.modal .secreto { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.modal .secreto code { margin: 0; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .86em; background: var(--gray); padding: 1px 6px; border-radius: 5px; }
input[type="file"] { padding: 9px; background: var(--white); }
@media (max-width: 900px) { .cfg { grid-template-columns: minmax(0, 1fr); } .cfg-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }

/* verificación en dos pasos */
.qr { width: 200px; height: 200px; border: 1px solid var(--line, #e3e3df); border-radius: 10px; padding: 6px; background: #fff; }
.codigos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.codigos code { background: var(--off); border-radius: 8px; padding: 8px 10px; text-align: center; letter-spacing: .06em; font-size: .95rem; }
.pasos { padding-left: 20px; margin: 0 0 12px; }

/* actividad y checklist */
.ed-grupo { border: 1px solid var(--line); border-radius: 10px; padding: 6px 16px 12px; margin: 0 0 14px; background: var(--white); }
.ed-grupo legend { font-weight: 700; color: var(--navy); padding: 0 8px; }
.ed-preg { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--gray); }
.ed-preg:last-child { border-bottom: 0; }
.ed-preg label { flex: 1; font-weight: 500; margin: 0; }
.ed-preg select { width: 150px; flex: none; }
.ed-evid { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px 26px; }
.ed-evid input[type=text] { flex: 1; min-width: 220px; }
.ck-area { margin: 14px 0 6px; }
.ck-area .row { justify-content: flex-start; gap: 10px; margin-bottom: 6px; }
.ctl-verificado { color: #047857; font-size: 1.1rem; } .ctl-implantado { color: #b45309; font-size: 1.1rem; } .ctl-pendiente { color: #6b7280; font-size: 1.1rem; }
@media (max-width: 640px) { .ed-preg { flex-direction: column; align-items: stretch; } .ed-preg select { width: 100%; } }

/* firmas y verificación */
.doc-firmas { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px 54px; font-size: .85rem; }
.ok-box { border-left-color: #059669; background: #e8f7f0; color: #064e3b; }
@media (max-width: 640px) { .doc-firmas { margin-left: 0; } }

/* alertas y evidencias */
.lista-alertas { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 8px; }
.lista-alertas li { display: flex; gap: 10px; align-items: baseline; }
.lista-alertas a { color: var(--text); text-decoration: none; } .lista-alertas a:hover { text-decoration: underline; }
.alertas .badge { flex: none; }
.archivo { display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }
table.data td.nw { white-space: nowrap; }
td.col-archivos { min-width: 190px; }
.archivo button:first-child { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.col-archivos .btn { white-space: nowrap; }

table.data td:first-child { min-width: 150px; }

/* logotipo del cliente */
.hero-logo { position: absolute; right: 24px; top: 28px; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .22); max-width: 220px; }
.hero-logo img { display: block; max-width: 190px; max-height: 70px; width: auto; height: auto; }
.avatar.avatar-logo { background: #fff; width: 84px; height: 62px; border-radius: 12px; border: 4px solid var(--white); overflow: hidden; display: grid; place-items: center; padding: 3px; }
.avatar-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.dropzone { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border: 2px dashed var(--line); border-radius: 12px; background: var(--off); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible, .dropzone.sobre { border-color: var(--gold); background: #fffaf0; outline: none; }
.dropzone.sobre { box-shadow: inset 0 0 0 3px rgba(201, 168, 76, .35); }
.dz-img { max-width: 160px; max-height: 64px; width: auto; height: auto; background: #fff; border-radius: 8px; padding: 6px 8px; border: 1px solid var(--line); }
.dz-icono { font-size: 2rem; color: var(--gold); width: 64px; text-align: center; }
.cab-previa { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line); border-bottom: 3px solid var(--line); border-radius: 8px; padding: 12px 20px; max-width: 560px; }
.cab-previa img { height: 40px; width: auto; max-width: 46%; object-fit: contain; }
.cab-previa .der { margin-left: auto; }
@media (max-width: 640px) { .hero-logo { position: static; display: inline-block; margin-top: 10px; } .dropzone { flex-direction: column; text-align: center; } }

/* gestión continua */
.gauge { width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: radial-gradient(closest-side, #fff 76%, transparent 78% 100%), conic-gradient(var(--gold) calc(var(--p, 0) * 1%), var(--gray) 0); }
.gauge b { font-family: var(--serif); font-size: 1.4rem; color: var(--navy); line-height: 1; } .gauge small { font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.gauge.small { width: 64px; height: 64px; } .gauge.small b { font-size: 1rem; }
tr.archivada td { opacity: .55; }
.chips { flex-wrap: wrap; }
details > summary { cursor: pointer; }
.ed-masivo { margin: 8px 0 14px; padding: 8px 12px; border: 1px dashed var(--line, #c9ced8); border-radius: 8px; }
.ed-masivo > summary { cursor: pointer; font-weight: 600; }
.ed-masivo .btn { margin-top: 8px; }

/* pantalla de acceso partida (misma línea que el gestor y la plataforma de protección de datos del despacho) */
body.acceso .announce, body.acceso .topbar, body.acceso .foot { display: none; }
.acc-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--off); }
.acc-izq { background: var(--navy); color: #fff; padding: 48px 50px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; }
.acc-izq::after { content: "§"; position: absolute; right: -30px; bottom: -150px; font-family: var(--serif); font-size: 780px; line-height: 1;
  color: rgba(255,255,255,.055); pointer-events: none; }
.acc-marca { display: flex; align-items: center; gap: 18px; }
.acc-marca .logo { width: 78px; height: 78px; background: #fff; border-radius: 14px; display: grid; place-items: center; padding: 8px; flex: none; }
.acc-marca .logo img { max-width: 100%; max-height: 100%; }
.acc-marca .txt { border-left: 2px solid var(--gold); padding-left: 18px; }
.acc-marca .txt b { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 700; }
.acc-marca .txt span { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #c9d1e6; }
.acc-lema .etiqueta { display: inline-block; background: var(--gold); color: var(--navy); font-weight: 800; font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; padding: 8px 14px; border-radius: 99px; margin-bottom: 20px; }
.acc-lema h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.12; max-width: 14em; margin: 0 0 14px; }
.acc-lema p { color: #c9d1e6; max-width: 30em; margin: 0; }
.acc-der { display: grid; place-items: center; padding: 40px 28px; }
.acc-form { width: 100%; max-width: 400px; }
.acc-form h1 { font-size: 2.1rem; margin-bottom: .3rem; }
.acc-form .sub { color: var(--muted); margin: 0 0 26px; }
.acc-form label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy); margin: 18px 0 7px; }
.acc-form input { width: 100%; font: inherit; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; }
.acc-form input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(26,39,68,.12); }
.acc-campo-clave { position: relative; }
.acc-campo-clave input { padding-right: 46px; }
.acc-ojo { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--muted);
  padding: 8px; border-radius: 8px; display: grid; }
.acc-ojo:hover { color: var(--navy); }
.acc-entrar { width: 100%; margin-top: 22px; border: 0; border-radius: 11px; padding: 14px; font: inherit; font-weight: 700; font-size: 1rem;
  background: var(--gold); color: #fff; cursor: pointer; display: flex; gap: 10px; justify-content: center; align-items: center; }
.acc-entrar:hover { background: var(--gold-dark); }
.acc-entrar:disabled { opacity: .65; cursor: wait; }
.acc-form .err { color: var(--danger); font-weight: 600; margin: 14px 0 0; }
.acc-seguro { display: flex; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.acc-seguro svg { flex: none; color: var(--gold-dark); margin-top: 2px; }
.acc-seguro b { color: var(--gold-dark); }
.acc-pie { margin-top: 26px; font-size: .8rem; color: #8b93ab; }
@media (max-width: 860px) {
  .acc-split { grid-template-columns: 1fr; }
  .acc-izq { padding: 26px 24px; gap: 28px; }
  .acc-izq::after { font-size: 380px; bottom: -80px; }
  .acc-lema h2 { font-size: 1.6rem; }
}
