/* ==========================================================================
   Evaluación de Desempeño · EML — sistema de diseño
   Paleta de marca: navy #061D70 · azul #2B3BB1 · ámbar #F9A12F / #F88B15
   ========================================================================== */

:root {
  --navy: #061D70; --navy-2: #142F92; --blue: #2B3BB1; --blue-2: #334FDA;
  --amber: #F88B15; --amber-2: #F9A12F; --sun: #FFC45F; --cream: #F6EECC;

  --bg: #F2F5FB; --surface: #FFFFFF; --surface-2: #F7F9FE; --surface-3: #EDF1FB;
  --ink: #0E1B4D; --ink-2: #26346B; --muted: #5C6B8A; --line: #E1E6F3; --line-2: #CDD5EA;
  --primary: #061D70; --primary-hover: #0C2A96; --on-primary: #FFFFFF;
  --link: #2B3BB1; --focus: rgba(43,59,177,.35);
  --ok: #15803D; --ok-bg: #DCFCE7; --warn: #92400E; --warn-bg: #FEF3C7; --bad: #B91C1C; --bad-bg: #FEE2E2; --info: #1D4ED8; --info-bg: #E0E9FF;

  --l0: #F6EECC; --l1: #FFC45F; --l2: #F9A12F; --l3: #F88B15; --l4: #334FDA; --l5: #061D70;
  --l0-ink: #5C4A00; --l1-ink: #3B2A00; --l2-ink: #3B2000; --l3-ink: #3B1C00; --l4-ink: #fff; --l5-ink: #fff;
  --t-excepcional: #061D70; --t-bueno: #334FDA; --t-desarrollo: #F9A12F; --t-plan: #C0392B;
  --t-excepcional-ink: #fff; --t-bueno-ink: #fff; --t-desarrollo-ink: #3B2000; --t-plan-ink: #fff;

  --radius: 14px; --radius-sm: 10px; --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(6,29,112,.06), 0 1px 8px rgba(6,29,112,.05);
  --shadow: 0 2px 6px rgba(6,29,112,.06), 0 10px 30px rgba(6,29,112,.08);
  --shadow-lg: 0 20px 60px rgba(6,29,112,.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080E21; --surface: #101933; --surface-2: #15204A; --surface-3: #1B2858;
    --ink: #EEF1FB; --ink-2: #C9D1F0; --muted: #9AA6CC; --line: #25305E; --line-2: #34427A;
    --primary: #4C5EF2; --primary-hover: #6577FF; --on-primary: #fff;
    --link: #9FB0FF; --focus: rgba(120,140,255,.45);
    --ok: #86EFAC; --ok-bg: rgba(34,197,94,.16); --warn: #FCD34D; --warn-bg: rgba(245,158,11,.16);
    --bad: #FCA5A5; --bad-bg: rgba(239,68,68,.18); --info: #A5B8FF; --info-bg: rgba(76,94,242,.2);
    --t-excepcional: #4C5EF2; --t-bueno: #5C7BFF; --t-plan: #E5604F;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080E21; --surface: #101933; --surface-2: #15204A; --surface-3: #1B2858;
  --ink: #EEF1FB; --ink-2: #C9D1F0; --muted: #9AA6CC; --line: #25305E; --line-2: #34427A;
  --primary: #4C5EF2; --primary-hover: #6577FF; --on-primary: #fff;
  --link: #9FB0FF; --focus: rgba(120,140,255,.45);
  --ok: #86EFAC; --ok-bg: rgba(34,197,94,.16); --warn: #FCD34D; --warn-bg: rgba(245,158,11,.16);
  --bad: #FCA5A5; --bad-bg: rgba(239,68,68,.18); --info: #A5B8FF; --info-bg: rgba(76,94,242,.2);
  --t-excepcional: #4C5EF2; --t-bueno: #5C7BFF; --t-plan: #E5604F;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0; }
a { color: var(--link); }
button { font: inherit; cursor: pointer; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); letter-spacing: .08em; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.center { text-align: center; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.start { align-items: flex-start; } .row.end { align-items: flex-end; } .row.between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; } .mt-l { margin-top: 24px; } .mb { margin-bottom: 14px; }
.hide { display: none !important; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.lg { width: 24px; height: 24px; } .icon.sm { width: 15px; height: 15px; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 16px; font-weight: 600; font-size: 14px; line-height: 1.2; text-decoration: none; transition: background .15s, transform .05s, box-shadow .15s, border-color .15s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 2px 8px rgba(6,29,112,.25); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-amber { background: var(--amber); color: #2B1500; } .btn-amber:hover:not(:disabled) { background: var(--amber-2); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); } .btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--ink-2); } .btn-ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); } .btn-danger:hover:not(:disabled) { background: var(--bad-bg); }
.btn-danger-solid { background: #C0392B; color: #fff; } .btn-danger-solid:hover:not(:disabled) { background: #A93226; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; } .btn-lg { padding: 14px 22px; font-size: 15.5px; border-radius: 12px; }
.btn-icon { padding: 8px; aspect-ratio: 1; } .btn-block { width: 100%; }
.spin { animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* ---------- formularios ---------- */
label, .label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
input, select, textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px var(--focus); }
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=number] { font-variant-numeric: tabular-nums; }
.field { min-width: 0; } .field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field.invalid input, .field.invalid textarea, input.invalid, textarea.invalid { border-color: var(--bad); }
.input-icon { position: relative; } .input-icon > .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon > input { padding-left: 38px; }
.cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- tarjetas / insignias ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; } .card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.card + .card, .card + .stack, .stack + .card { margin-top: 14px; }
.grid > .card, .stack > .card, .row > .card, .grid > a.card { margin-top: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); } .b-warn { background: var(--warn-bg); color: var(--warn); } .b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); } .b-muted { background: var(--surface-3); color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.band { display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.band.excepcional { background: var(--t-excepcional); color: var(--t-excepcional-ink); } .band.bueno { background: var(--t-bueno); color: var(--t-bueno-ink); }
.band.desarrollo { background: var(--t-desarrollo); color: var(--t-desarrollo-ink); } .band.plan { background: var(--t-plan); color: var(--t-plan-ink); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; border: 1px solid transparent; }
.alert .icon { margin-top: 2px; }
.alert.info { background: var(--info-bg); color: var(--info); } .alert.warn { background: var(--warn-bg); color: var(--warn); } .alert.bad { background: var(--bad-bg); color: var(--bad); } .alert.ok { background: var(--ok-bg); color: var(--ok); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.chip:hover { background: var(--surface-3); } .chip.on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; min-width: 70px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-2), var(--blue)); border-radius: 99px; transition: width .35s ease; }
.progress.ok > span { background: linear-gradient(90deg, #22C55E, #15803D); } .progress.amber > span { background: linear-gradient(90deg, var(--amber-2), var(--amber)); }

/* ---------- tablas (se vuelven tarjetas en móvil) ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 12px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; } .tbl tbody tr:hover { background: var(--surface-2); } .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.first { min-width: 170px; }
.tbl .name { font-weight: 600; } .tbl .sub { font-size: 12px; color: var(--muted); }
.tbl .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 760px) {
  .tbl.resp thead { display: none; }
  .tbl.resp, .tbl.resp tbody, .tbl.resp tr, .tbl.resp td { display: block; width: 100%; }
  .tbl.resp tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.resp td { border: 0; padding: 4px 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: right; }
  .tbl.resp td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; text-align: left; flex: none; }
  .tbl.resp td.first { display: block; text-align: left; padding-bottom: 8px; } .tbl.resp td.first::before, .tbl.resp td.nolabel::before { display: none; }
  .tbl.resp td.acts-cell { justify-content: flex-end; padding-top: 8px; }
}

/* ---------- pestañas ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { text-decoration: none; border: 0; background: none; padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); } .tab.on { color: var(--link); border-bottom-color: var(--blue-2); }

/* ---------- estado vacío / carga ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty svg.art { width: 120px; height: 90px; margin-bottom: 8px; } .empty h3 { color: var(--ink); margin-bottom: 6px; } .empty p { max-width: 380px; margin: 0 auto 14px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--line) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-page { display: grid; place-items: center; min-height: 60vh; color: var(--muted); gap: 10px; text-align: center; }
.loader { width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--blue-2); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- modal / toast ---------- */
.modal-ov { position: fixed; inset: 0; background: rgba(6,16,60,.55); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .18s; border: 1px solid var(--line); }
.modal.wide { max-width: 640px; }
.modal-head { padding: 20px 22px 6px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.modal-body { padding: 8px 22px 18px; overflow-y: auto; } .modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; margin-bottom: 6px; }
.ico.warn { background: var(--warn-bg); color: var(--warn); } .ico.bad { background: var(--bad-bg); color: var(--bad); } .ico.info { background: var(--info-bg); color: var(--info); } .ico.ok { background: var(--ok-bg); color: var(--ok); }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; width: min(92vw, 440px); pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: pop .2s; pointer-events: auto; }
.toast.err { background: #B42318; } .toast.ok { background: #166534; } .toast code { font-family: var(--font-mono); font-size: 11.5px; opacity: .85; }

/* ---------- acceso (landing) ---------- */
.landing { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.landing-hero { position: relative; overflow: hidden; color: #fff; padding: 48px clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  background: radial-gradient(1200px 600px at 10% -10%, #2B3BB1 0%, transparent 60%), linear-gradient(155deg, #061D70 0%, #0A2790 55%, #142F92 100%); }
.landing-hero .net { position: absolute; right: -150px; bottom: -110px; width: 520px; opacity: .32; pointer-events: none; }
.landing-hero .logo { height: 56px; width: auto; max-width: 200px; position: relative; }
.landing-hero h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; line-height: 1.08; position: relative; }
.landing-hero h1 em { font-style: normal; color: var(--sun); }
.landing-hero .lead { margin-top: 16px; font-size: 16.5px; color: rgba(255,255,255,.86); max-width: 460px; position: relative; }
.feats { display: grid; gap: 14px; position: relative; max-width: 460px; }
.feat { display: flex; gap: 14px; align-items: flex-start; } .feat .ico { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.12); display: grid; place-items: center; color: var(--sun); flex: none; }
.feat b { display: block; font-size: 14.5px; } .feat span { font-size: 13px; color: rgba(255,255,255,.75); }
.landing-main { display: grid; place-items: center; padding: 32px 20px; position: relative; }
.access-card { width: 100%; max-width: 440px; }
.access-card .logo-m { display: none; height: 44px; margin-bottom: 18px; }
.access-card h2 { font-size: 26px; font-weight: 800; } .access-card .lead { color: var(--muted); margin: 8px 0 22px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp input { text-align: center; font-family: var(--font-mono); font-size: 24px; font-weight: 500; padding: 14px 0; text-transform: uppercase; border-width: 2px; border-radius: 12px; letter-spacing: 0; }
.otp input:not(:placeholder-shown) { border-color: var(--blue-2); background: var(--surface-3); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 22px 0 14px; } .divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.corner { position: absolute; top: 16px; right: 16px; }
@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; } .landing-hero { padding: 26px 22px 30px; gap: 18px; } .landing-hero .feats, .landing-hero .net { display: none; }
  .landing-hero h1 { font-size: 26px; } .landing-hero .lead { font-size: 14.5px; margin-top: 10px; } .landing-hero .logo { height: 44px; }
  .landing-main { padding: 22px 16px 36px; align-items: start; }
}
@media (max-width: 380px) { .otp { gap: 6px; } .otp input { font-size: 20px; } }

/* ---------- estructura del panel ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #061D70 0%, #0A2488 100%); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .logo { height: 46px; width: auto; align-self: flex-start; margin: 2px 8px 22px; }
.nav-i { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; font-size: 14.5px; border: 0; background: none; width: 100%; text-align: left; }
.nav-i:hover { background: rgba(255,255,255,.09); color: #fff; } .nav-i.on { background: rgba(255,255,255,.16); color: #fff; box-shadow: inset 3px 0 0 var(--amber-2); }
.sidebar .spacer { flex: 1; }
.me { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.08); margin-top: 8px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--amber-2); color: #2B1500; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); flex: none; }
.me b { display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .me span { font-size: 11.5px; opacity: .7; }
.main { min-width: 0; } .page { max-width: 1180px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 36px) 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; font-weight: 800; } .page-head p { color: var(--muted); margin-top: 4px; }
.topbar-m { display: none; background: linear-gradient(135deg, #061D70, #142F92); color: #fff; padding: 12px 16px; align-items: center; justify-content: space-between; gap: 10px; }
.topbar-m .logo { height: 34px; width: auto; }
.nav-m { display: none; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; } .sidebar { display: none; } .topbar-m { display: flex; }
  .nav-m { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .nav-m::-webkit-scrollbar { display: none; }
  .nav-m a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--ink-2); background: var(--surface-3); white-space: nowrap; }
  .nav-m a.on { background: var(--primary); color: var(--on-primary); }
  .page { padding-top: 20px; } .page-head h1 { font-size: 23px; }
}
.stat { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat b { font-family: var(--font-display); font-size: 26px; display: block; line-height: 1; } .stat span { font-size: 12.5px; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1 1 240px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; border: 0; background: none; padding: 0; margin-bottom: 10px; } .crumb:hover { color: var(--link); }
.codebox { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-3); border: 1px dashed var(--line-2); border-radius: 10px; padding: 4px 6px 4px 12px; font-family: var(--font-mono); font-size: 14px; letter-spacing: .12em; font-weight: 500; }
.alerts { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.alert-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); text-align: left; }
.alert-tag.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- vista pública con encabezado (evaluador / colaborador) ---------- */
.pub-top { background: linear-gradient(135deg, #061D70, #142F92); color: #fff; }
.pub-top .in { max-width: 920px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pub-top .logo { height: 36px; width: auto; }
.pub-wrap { max-width: 920px; margin: 0 auto; padding: 22px 16px 120px; }
.hero-card { background: linear-gradient(135deg, #061D70 0%, #142F92 100%); color: #fff; border-radius: var(--radius-lg); padding: 26px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(249,161,47,.35), transparent 70%); }
.hero-card h1 { font-size: 26px; font-weight: 800; position: relative; } .hero-card .sub { opacity: .85; margin-top: 4px; position: relative; }
.hero-card .pill { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); color: #fff; position: relative; }
.hero-card .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- formulario de evaluación ---------- */
.group-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--link); }
.group-title::after { content: ''; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.ind-card { padding: 20px; margin-bottom: 14px; border-left: 4px solid var(--line-2); transition: border-color .2s; scroll-margin-top: 16px; }
.ind-card.done { border-left-color: #22C55E; } .ind-card.missing { border-left-color: var(--amber); }
.ind-head { display: flex; gap: 12px; align-items: flex-start; }
.ind-num { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; font-family: var(--font-display); }
.ind-card.done .ind-num { background: var(--ok-bg); color: var(--ok); }
.ind-head h3 { font-size: 16px; flex: 1; } .ind-desc { color: var(--muted); font-size: 13.5px; margin: 10px 0; white-space: pre-line; }
.meta-box { background: var(--info-bg); color: var(--ink-2); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin: 10px 0 14px; white-space: pre-line; border: 1px solid color-mix(in srgb, var(--blue-2) 25%, transparent); }
.meta-box b { color: var(--link); display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.scale button { border: 2px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 10px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .1s, box-shadow .15s, background .15s, border-color .15s; min-height: 64px; }
.scale button b { font-family: var(--font-display); font-size: 20px; line-height: 1; } .scale button span { font-size: 10.5px; color: var(--muted); line-height: 1.15; text-align: center; padding: 0 2px; }
.scale button:hover { border-color: var(--muted); transform: translateY(-1px); }
.scale button.on { border-color: transparent; box-shadow: 0 6px 16px rgba(6,29,112,.25); transform: translateY(-2px); } .scale button.on span { color: inherit; opacity: .9; }
.scale button.on.lv0 { background: var(--l0); color: var(--l0-ink); } .scale button.on.lv1 { background: var(--l1); color: var(--l1-ink); } .scale button.on.lv2 { background: var(--l2); color: var(--l2-ink); }
.scale button.on.lv3 { background: var(--l3); color: var(--l3-ink); } .scale button.on.lv4 { background: var(--l4); color: var(--l4-ink); } .scale button.on.lv5 { background: var(--l5); color: var(--l5-ink); }
:root[data-theme="dark"] .scale button.on.lv5 { background: #3A4CE0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .scale button.on.lv5 { background: #3A4CE0; } }
.lvl-desc { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; border-left: 5px solid; background: var(--surface-2); white-space: pre-line; animation: fade .2s; }
.lvl-desc b { display: block; margin-bottom: 2px; }
.lvl-desc.lv0 { border-color: var(--l0); } .lvl-desc.lv1 { border-color: var(--l1); } .lvl-desc.lv2 { border-color: var(--l2); } .lvl-desc.lv3 { border-color: var(--l3); } .lvl-desc.lv4 { border-color: var(--l4); } .lvl-desc.lv5 { border-color: var(--l5); }
.req { color: var(--bad); }
.eval-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(6,29,112,.12); }
.eval-bar .in { max-width: 920px; margin: 0 auto; padding: 12px 16px; display: flex; gap: 16px; align-items: center; }
.eval-bar .prog { flex: 1; min-width: 0; } .eval-bar .prog .t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
@media (max-width: 560px) {
  .scale { gap: 4px; } .scale button { padding: 8px 0 6px; min-height: 56px; } .scale button span { font-size: 9px; } .scale button b { font-size: 17px; }
  .eval-bar .in { gap: 10px; padding: 10px 12px; } .eval-bar .btn { padding: 10px 12px; } .hero-card h1 { font-size: 22px; } .ind-card { padding: 16px 14px; }
}
.done-art { width: 92px; height: 92px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; animation: pop .4s; }
.done-art svg { width: 46px; height: 46px; }

/* ---------- informe / resultados ---------- */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px; margin-bottom: 18px; }
.rep-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 3px solid var(--primary); flex-wrap: wrap; }
.rep-head .logo { height: 46px; width: auto; } .rep-head .t { text-align: right; } .rep-head h2 { font-size: 20px; color: var(--ink); } .rep-head .t span { font-size: 12.5px; color: var(--muted); }
.rep-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 22px; margin-bottom: 20px; }
.rep-info div { font-size: 13px; } .rep-info dt, .rep-info .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; display: block; }
.rep-info .v { font-weight: 600; }
.score { display: flex; gap: 26px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 22px; flex-wrap: wrap; }
.gauge { position: relative; width: 132px; height: 132px; flex: none; } .gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .track { stroke: var(--line); } .gauge .val { transition: stroke-dashoffset .8s ease; }
.gauge .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1; }
.gauge .num small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); margin-top: 3px; font-family: var(--font); }
.gauge.excepcional .val { stroke: var(--t-excepcional); } .gauge.bueno .val { stroke: var(--t-bueno); } .gauge.desarrollo .val { stroke: var(--t-desarrollo); } .gauge.plan .val { stroke: var(--t-plan); } .gauge.none .val { stroke: var(--line-2); }
.rep-sec { margin-top: 22px; break-inside: avoid; } .rep-sec h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--link); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.rep-sec ul { margin: 0; padding-left: 20px; } .rep-sec li { margin-bottom: 6px; font-size: 13.5px; white-space: pre-line; }
.ind-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ind-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.ind-tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; } .ind-tbl tr { break-inside: avoid; }
.ind-tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 90px; margin-top: 5px; } .mini-bar span { display: block; height: 100%; background: var(--blue-2); border-radius: 99px; }
.detalle-eval { margin-top: 6px; display: none; } .show-detalle .detalle-eval { display: block; }
.detalle-eval div { font-size: 12px; color: var(--ink-2); padding: 5px 8px; background: var(--surface-2); border-radius: 7px; margin-top: 4px; border-left: 3px solid var(--line-2); white-space: pre-line; }
.detalle-eval b { color: var(--ink); }
.firma { margin-top: 12px; display: flex; gap: 40px; flex-wrap: wrap; } .firma .l { border-top: 1px solid var(--ink-2); padding-top: 6px; min-width: 220px; font-size: 12.5px; }
.rep-foot { margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 600px) { .report { padding: 18px 14px; } .rep-head .t { text-align: left; } .ind-tbl th:nth-child(2), .ind-tbl td:nth-child(2) { display: none; } .score { gap: 16px; padding: 16px; } }

/* ---------- configuración (acordeón de plantillas) ---------- */
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; transition: box-shadow .15s; }
.acc.open { box-shadow: var(--shadow); border-color: var(--line-2); }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; flex-wrap: wrap; user-select: none; width: 100%; background: none; border: 0; text-align: left; }
.acc-head:hover { background: var(--surface-2); } .acc-head .chev { transition: transform .2s; color: var(--muted); } .acc.open .acc-head .chev { transform: rotate(90deg); }
.acc-head .nm { flex: 1 1 220px; font-weight: 700; min-width: 0; } .acc-head .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.acc-body { padding: 4px 18px 20px; border-top: 1px solid var(--line); }
.sem { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.sem::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.sem.ok { background: var(--ok-bg); color: var(--ok); } .sem.warn { background: var(--warn-bg); color: var(--warn); } .sem.bad { background: var(--bad-bg); color: var(--bad); }
.ind-edit { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 10px; background: var(--surface-2); }
.ind-edit > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; gap: 10px; align-items: center; } .ind-edit > summary::-webkit-details-marker { display: none; }
.ind-edit > summary .chev { transition: transform .2s; color: var(--muted); } .ind-edit[open] > summary .chev { transform: rotate(90deg); }
.ind-edit > .in { padding: 4px 14px 16px; }
.lvl-edit { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 12px; padding: 12px 0; border-top: 1px dashed var(--line-2); }
.lvl-edit .n { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); }
.lvl-edit .n.lv0 { background: var(--l0); color: var(--l0-ink); } .lvl-edit .n.lv1 { background: var(--l1); color: var(--l1-ink); } .lvl-edit .n.lv2 { background: var(--l2); color: var(--l2-ink); }
.lvl-edit .n.lv3 { background: var(--l3); color: var(--l3-ink); } .lvl-edit .n.lv4 { background: var(--l4); color: #fff; } .lvl-edit .n.lv5 { background: var(--l5); color: #fff; }
.save-bar { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.dirty-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-size: 12px; font-weight: 700; } .dirty-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.over { background: var(--surface-3); border-color: var(--blue-2); }
pre.code { background: var(--surface-3); border-radius: 10px; padding: 12px; font-size: 12px; overflow-x: auto; margin: 8px 0 0; font-family: var(--font-mono); white-space: pre-wrap; }
.theme-btn { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.theme-btn:hover { background: rgba(255,255,255,.22); } .theme-btn.light { background: var(--surface-3); color: var(--ink-2); } .theme-btn.light:hover { background: var(--line); }
.steps { display: flex; flex-direction: column; gap: 0; margin: 4px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 18px; position: relative; } .step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line-2); }
.step .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 800; flex: none; font-size: 13px; }
.step.done .dot { background: var(--ok-bg); color: var(--ok); } .step.now .dot { background: var(--amber); color: #2B1500; }

/* ---------- impresión (A4) ---------- */
@page { size: A4; margin: 14mm 12mm; }
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #F7F9FE; --surface-3: #EDF1FB; --ink: #0E1B4D; --ink-2: #26346B; --muted: #5C6B8A; --line: #DDE3F3; --line-2: #C3CCE6;
    --link: #2B3BB1; --t-excepcional: #061D70; --t-bueno: #334FDA; --t-plan: #C0392B; color-scheme: light;
  }
  html, body { background: #fff !important; font-size: 11.5px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .sidebar, .topbar-m, .nav-m, .toasts, .eval-bar, .modal-ov, .pub-top { display: none !important; }
  .shell { display: block; } .page { padding: 0; max-width: none; } .pub-wrap { padding: 0; max-width: none; }
  .report { box-shadow: none; border: 0; border-radius: 0; padding: 0; margin: 0; page-break-after: always; break-after: page; }
  .report:last-child { page-break-after: auto; break-after: auto; }
  .card { box-shadow: none; }
  .gauge .val { transition: none; }
}

/* logo a color sobre superficies: en modo oscuro va sobre una pastilla blanca para conservar el contraste */
:root[data-theme="dark"] .logo-chip { background: #fff; padding: 6px 12px; border-radius: 12px; box-sizing: content-box; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-chip { background: #fff; padding: 6px 12px; border-radius: 12px; box-sizing: content-box; } }
@media print { .logo-chip { background: none !important; padding: 0 !important; } }

@media (max-width: 560px) {
  .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; } .stat .ico { width: 38px; height: 38px; } .stat b { font-size: 22px; } .stat span { font-size: 11.5px; }
  .page-head .row, .page-head .btn { width: 100%; } .toolbar .btn { flex: 1; }
}
