/* SDG8 · Listas Restrictivas */
:root {
  --night: #070b14;
  --ink: #0b1220;
  --ink-2: #111a2e;
  --ink-line: rgba(255, 255, 255, .08);
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #e6e8ee;
  --line-2: #eef0f4;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --gold: #f5b700;
  --gold-2: #ffc933;
  --gold-soft: #fff6d6;
  --gold-ink: #6b4e00;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --red-line: #fecaca;
  --amber: #d97706;
  --amber-soft: #fff7ed;
  --amber-line: #fed7aa;
  --yellow: #a16207;
  --yellow-soft: #fefce8;
  --yellow-line: #fde68a;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --green-line: #bbf7d0;
  --blue: #2563eb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -20px rgba(2, 6, 23, .35);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: .92em; letter-spacing: .01em; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ Login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--night);
  color: #e5e7eb;
  position: relative;
  overflow: hidden;
  padding: 32px 16px 90px;
}
.login::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 380px at 50% 18%, rgba(245, 183, 0, .13), transparent 70%),
    radial-gradient(900px 600px at 50% 120%, rgba(37, 99, 235, .10), transparent 70%);
  pointer-events: none;
}
.login::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 400px; animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.login-logo { display: block; width: 190px; margin: 0 auto 34px; }
.login-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  border: 1px solid var(--ink-line);
  border-radius: 20px;
  padding: 34px 32px 30px;
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.login-card h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.login-card p.sub { margin: 0 0 26px; color: #94a3b8; font-size: 13.5px; }
.lfield { margin-bottom: 16px; }
.lfield label { display: block; font-size: 12px; font-weight: 600; color: #cbd5e1; margin-bottom: 7px; letter-spacing: .01em; }
.linput { position: relative; }
.linput svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #64748b; width: 17px; height: 17px; }
.linput input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 42px;
  background: rgba(2, 6, 23, .55);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  color: #f8fafc;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.linput input::placeholder { color: #475569; }
.linput input:focus { border-color: rgba(245, 183, 0, .7); box-shadow: 0 0 0 4px rgba(245, 183, 0, .12); background: rgba(2, 6, 23, .75); }
.linput .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #64748b; padding: 8px; border-radius: 8px; cursor: pointer; display: grid; }
.linput .eye svg.i { position: static; transform: none; }
.linput .eye:hover { color: #cbd5e1; }
.btn-gold {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1300;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 10px 24px -10px rgba(245, 183, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .12s, box-shadow .2s, filter .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-gold:hover { filter: brightness(1.04); box-shadow: 0 14px 28px -10px rgba(245, 183, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-gold:active { transform: translateY(1px); }
.btn-gold[disabled] { opacity: .7; cursor: progress; }
.login-err {
  display: none;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(220, 38, 38, .12);
  border: 1px solid rgba(248, 113, 113, .25);
  color: #fecaca;
  font-size: 13px;
}
.login-err.show { display: flex; gap: 8px; align-items: center; animation: shake .35s; }
.login-secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 20px; color: #64748b; font-size: 12px; }
.login-foot { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #475569; font-size: 12px; z-index: 1; }
.login-foot .lists { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.login-foot .lists span { border: 1px solid rgba(255, 255, 255, .07); border-radius: 999px; padding: 3px 10px; color: #64748b; font-size: 11px; letter-spacing: .03em; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }

/* ------------------------------------------------------------------ Shell */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  background: var(--ink);
  color: #cbd5e1;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid #0f1729;
}
.side-logo { padding: 26px 22px 22px; }
.side-logo img { width: 128px; display: block; }
.side-logo small { display: block; margin-top: 10px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #64748b; font-weight: 600; }
.nav { padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav .label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #475569; font-weight: 700; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #94a3b8;
  font-weight: 500;
  font-size: 13.5px;
  position: relative;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .04); color: #e2e8f0; }
.nav a.active { background: rgba(245, 183, 0, .1); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.nav a.active svg.i { color: var(--gold); }
.side-status {
  margin: auto 14px 12px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--ink-line);
  font-size: 12px;
}
.side-status .row { display: flex; align-items: center; gap: 8px; color: #e2e8f0; font-weight: 600; }
.side-status p { margin: 6px 0 0; color: #64748b; line-height: 1.45; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); flex: none; }
.dot.warn { background: var(--gold); box-shadow: 0 0 0 3px rgba(245, 183, 0, .15); }
.dot.err { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.dot.run { background: var(--gold); animation: pulse 1.2s infinite; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 14px 16px 18px; border-top: 1px solid var(--ink-line); }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #f5b700, #b88400); color: #1a1300; font-weight: 800; display: grid; place-items: center; font-size: 13px; flex: none; }
.side-user .who { min-width: 0; flex: 1; }
.side-user .who b { display: block; color: #e2e8f0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 11.5px; color: #64748b; }
.icon-btn { background: none; border: 0; color: #64748b; padding: 7px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: #e2e8f0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 68px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 32px;
  background: rgba(244, 245, 248, .82);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.top h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.crumb { font-size: 12px; color: var(--muted); }
.top .spacer { flex: 1; }
.top-search {
  display: flex; align-items: center; gap: 8px;
  width: 300px; height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  color: var(--faint);
  cursor: text;
  box-shadow: var(--shadow-sm);
}
.top-search input { border: 0; outline: 0; flex: 1; background: transparent; color: var(--text); min-width: 0; }
.top-search { padding-right: 4px; }
.top-search-btn { border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 12px; height: 30px; padding: 0 12px; border-radius: 7px; cursor: pointer; }
.top-search-btn:hover { background: #1b2540; }
.kbd { font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); background: var(--surface-2); }
.menu-btn { display: none; }

.page { padding: 8px 32px 40px; max-width: 1360px; width: 100%; margin: 0 auto; animation: fade .25s ease both; }
.footer { margin-top: auto; padding: 20px 32px 26px; color: var(--faint); font-size: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line-2); }
.footer b { color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600; font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: #d5d9e2; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #1b2540; }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: #e5a900; color: #1a1300; box-shadow: 0 6px 16px -8px rgba(245, 183, 0, .7); }
.btn.gold:hover { filter: brightness(1.03); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(15, 23, 42, .05); }
.btn.danger { color: var(--red); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------------ Cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card-h .sub { font-size: 12.5px; color: var(--muted); }
.card-h .spacer { flex: 1; }
.card-b { padding: 18px 22px 22px; }
.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }
.mt-l { margin-top: 26px; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 26px 0 12px; }
.section-title h3 { margin: 0; font-size: 15px; font-weight: 700; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink);
  color: #e2e8f0;
  padding: 28px 30px;
  display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap;
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(520px 260px at 92% 0%, rgba(245, 183, 0, .2), transparent 70%),
              radial-gradient(400px 260px at 0% 120%, rgba(37, 99, 235, .16), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; right: -40px; bottom: -60px; width: 340px; height: 340px;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 28px 28px; transform: rotate(12deg);
  mask-image: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%);
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.hero h1 { margin: 6px 0 6px; font-size: 26px; letter-spacing: -.025em; color: #fff; font-weight: 750; }
.hero p { margin: 0; color: #94a3b8; max-width: 620px; }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn:not(.gold) { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #e2e8f0; box-shadow: none; }
.hero .btn:not(.gold):hover { background: rgba(255, 255, 255, .1); }
.hero-meta { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.hero-meta div { font-size: 12px; color: #64748b; }
.hero-meta b { display: block; color: #f1f5f9; font-size: 14px; font-weight: 650; margin-top: 2px; }

/* KPI */
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .k-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line-2); }
.kpi .k-val { font-size: 30px; font-weight: 750; letter-spacing: -.03em; margin-top: 10px; line-height: 1.1; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.kpi .bar { height: 4px; border-radius: 4px; background: var(--line-2); margin-top: 12px; overflow: hidden; }
.kpi .bar i { display: block; height: 100%; border-radius: 4px; }
.kpi.red .k-ico { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.kpi.red .k-val { color: var(--red); }
.kpi.amber .k-ico { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.kpi.amber .k-val { color: var(--amber); }
.kpi.yellow .k-ico { background: var(--yellow-soft); color: var(--yellow); border-color: var(--yellow-line); }
.kpi.yellow .k-val { color: var(--yellow); }
.kpi.green .k-ico { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.kpi.green .k-val { color: var(--green); }
.kpi.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.dark .k-label, .kpi.dark .k-foot { color: #94a3b8; }
.kpi.dark .k-ico { background: rgba(245, 183, 0, .12); color: var(--gold); border-color: rgba(245, 183, 0, .2); }
.kpi.dark .bar { background: rgba(255, 255, 255, .08); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ALERTA { background: var(--red); color: #fff; border-color: #b91c1c; }
.badge.ALERTA::before { background: #fff; }
.badge.ADVERTENCIA { background: var(--amber-soft); color: #b45309; border-color: var(--amber-line); }
.badge.REVISAR { background: var(--yellow-soft); color: var(--yellow); border-color: var(--yellow-line); }
.badge.NA { background: var(--surface-2); color: var(--faint); border-color: var(--line-2); font-weight: 600; }
.badge.NA::before { display: none; }
.badge.OK { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text-2); }
.chip.gold { background: var(--gold-soft); border-color: #f8e3a0; color: var(--gold-ink); }
.chip.dark { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: #e2e8f0; }
.cell-na { color: var(--faint); font-weight: 600; font-size: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.t th {
  text-align: left; font-weight: 600; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 11px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
table.t th:first-child { padding-left: 22px; }
table.t th:last-child { padding-right: 22px; }
table.t td { padding: 12px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t td:first-child { padding-left: 22px; }
table.t td:last-child { padding-right: 22px; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover { background: #fafbfc; }
table.t .c { text-align: center; }
table.t .r { text-align: right; }
.ent { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ent-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); flex: none; }
.ent b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; max-width: 340px; overflow: hidden; line-height: 1.35; }
.ent span { font-size: 12px; color: var(--muted); }
tr.row-ALERTA td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.row-ADVERTENCIA td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
tr.row-REVISAR td:first-child { box-shadow: inset 3px 0 0 #eab308; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; margin: 0 auto 12px; color: var(--faint); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-size: 14.5px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--line); }
.seg button .n { font-size: 11px; background: var(--line-2); color: var(--muted); padding: 0 6px; border-radius: 6px; }
.seg button.on .n { background: var(--ink); color: #fff; }
.search-in { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--faint); min-width: 240px; }
.search-in input { border: 0; outline: 0; background: transparent; color: var(--text); flex: 1; min-width: 0; }
.search-in:focus-within { border-color: #c7cdd8; box-shadow: 0 0 0 3px rgba(15, 23, 42, .05); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  height: 42px; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
textarea.input { height: auto; min-height: 200px; padding: 12px 13px; resize: vertical; line-height: 1.6; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(245, 183, 0, .15); }

/* Analysis form */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 24px 26px; border-bottom: 1px solid var(--line-2); }
.step:last-child { border-bottom: 0; }
.step-n { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--gold); font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.step h4 { margin: 4px 0 2px; font-size: 15px; font-weight: 700; }
.step p.d { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.months button {
  height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  font-weight: 600; font-size: 13px; color: var(--text-2); transition: all .12s;
}
.months button:hover { border-color: #cfd5df; background: var(--surface-2); }
.months button.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(245, 183, 0, .35); }
.period-row { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.period-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--gold-soft); border: 1px solid #f8e3a0; color: var(--gold-ink); font-weight: 700; }
.tabs { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tabs button { border: 0; background: transparent; height: 34px; padding: 0 14px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--line); }
.drop {
  border: 1.5px dashed #cdd3de;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfd, #f6f7fa);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--gold); background: #fffdf5; }
.drop .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 12px; background: var(--ink); color: var(--gold); box-shadow: 0 10px 24px -12px rgba(11, 18, 32, .6); }
.drop b { display: block; font-size: 15px; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 13px; }
.formats { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.file-pill { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.file-pill .fi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.file-pill .fi.doc { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.file-pill b { display: block; }
.file-pill .grow { flex: 1; min-width: 0; }
.tips h4 { margin: 0 0 10px; font-size: 14px; }
.tips ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tips li { display: flex; gap: 10px; font-size: 13px; color: var(--text-2); }
.tips li svg.i { color: var(--green); margin-top: 2px; }
.sample { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 12px; margin-top: 14px; }
.sample div { display: grid; grid-template-columns: 1.6fr 1fr; border-bottom: 1px solid var(--line-2); }
.sample div:last-child { border-bottom: 0; }
.sample span { padding: 6px 10px; }
.sample .h { background: var(--surface-2); font-weight: 700; color: var(--muted); }
.sample .sec span { font-weight: 700; background: #fffdf5; grid-column: 1 / -1; }

/* Processing overlay */
.overlay { position: fixed; inset: 0; background: rgba(7, 11, 20, .72); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; animation: fade .2s; padding: 16px; }
.proc { width: 100%; max-width: 440px; background: var(--ink); color: #e2e8f0; border-radius: 20px; padding: 30px; border: 1px solid var(--ink-line); box-shadow: var(--shadow-lg); }
.proc h3 { margin: 0 0 4px; color: #fff; font-size: 18px; }
.proc p { margin: 0 0 22px; color: #94a3b8; font-size: 13px; }
.proc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.proc li { display: flex; align-items: center; gap: 12px; color: #64748b; font-size: 13.5px; transition: color .2s; }
.proc li .st { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #334155; display: grid; place-items: center; flex: none; }
.proc li.doing { color: #fff; }
.proc li.doing .st { border-color: var(--gold); color: var(--gold); }
.proc li.done { color: #cbd5e1; }
.proc li.done .st { background: var(--gold); border-color: var(--gold); color: #1a1300; }
.proc .track { height: 4px; background: rgba(255, 255, 255, .08); border-radius: 4px; margin-top: 24px; overflow: hidden; }
.proc .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #ffd966); border-radius: 4px; transition: width .5s ease; }

/* Result header */
.res-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.res-head .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.verdict { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.verdict .vi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.verdict b { display: block; color: #fff; font-size: 15px; }
.verdict span { color: #94a3b8; font-size: 12.5px; }

/* Charts */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut .center b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.donut .center span { font-size: 11.5px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 170px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .v { margin-left: auto; font-weight: 700; }
.legend .p { color: var(--faint); font-size: 12px; width: 44px; text-align: right; }
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar .lbl { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.hbar .lbl span { color: var(--text-2); font-weight: 600; }
.hbar .lbl b { font-weight: 700; }
.hbar .tr { height: 8px; background: var(--line-2); border-radius: 6px; overflow: hidden; display: flex; }
.hbar .tr i { display: block; height: 100%; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.fact span { display: block; font-size: 12px; color: var(--muted); }
.fact b { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.vbars { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.vbar .stack { width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; overflow: hidden; display: flex; flex-direction: column-reverse; background: var(--line-2); min-height: 4px; }
.vbar .stack i { display: block; width: 100%; }
.vbar span { font-size: 11.5px; color: var(--muted); }
.vbar b { font-size: 12px; }

/* Explicación de hallazgos */
.ent span.why { display: block; font-size: 12px; font-weight: 600; margin: 1px 0 1px; }
.why.ALERTA { color: #b91c1c; }
.why.ADVERTENCIA { color: #b45309; }
.why.REVISAR { color: #854d0e; }
.why.NA { color: var(--muted); font-weight: 500; }
.whybox { border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); }
.whybox b { color: var(--text); }
.whybox.ALERTA { background: #fef2f2; border-color: var(--red-line); }
.whybox.ADVERTENCIA { background: var(--amber-soft); border-color: var(--amber-line); }
.whybox.REVISAR { background: var(--yellow-soft); border-color: var(--yellow-line); }
.whybox .verify { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.whybox .verify a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Modal ancho y CSF */
.modal.wide { max-width: 680px; }
.modal.wide .modal-b { max-height: min(68vh, 640px); overflow-y: auto; }
.csf-drop { border: 1.5px dashed #d8c58a; background: #fffdf5; border-radius: 12px; padding: 14px; }
.form-sec { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700;
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.input.filled { background: #f0fdf4; border-color: #bbf7d0; }

/* Dashboard filters */
.dash-filters { padding: 16px 20px 18px; }
.df-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.df-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.df-title span { font-size: 13px; }
.df-grid { display: grid; grid-template-columns: 1.6fr 1.3fr 1fr 1fr 1fr 1.3fr; gap: 12px; }
.client-banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap;
  border-left: 4px solid var(--gold); }
.client-banner .grow { flex: 1; min-width: 220px; }
.client-banner b { font-size: 17px; letter-spacing: -.01em; display: block; }
.cb-ico { width: 48px; height: 48px; border-radius: 12px; background: var(--ink); color: var(--gold); display: grid;
  place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.eyebrow-dark { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); font-weight: 700; }
.df-grid .input { height: 42px; }
.vbar { cursor: pointer; border-radius: 8px; padding: 4px 0; transition: background .15s; }
.vbar:hover { background: var(--surface-2); }
.vbar.sel { background: var(--gold-soft); box-shadow: inset 0 0 0 1px #f8e3a0; }
.vbar.sel span { color: var(--gold-ink); font-weight: 700; }
.selbar { display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: #fef2f2; border-bottom: 1px solid var(--red-line); color: #991b1b; font-size: 13px; font-weight: 600; }
table.t td .mono, table.t td .chip { white-space: nowrap; }
table.t td:has(> .chip.gold) { white-space: nowrap; }
input.chk { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }
@media (max-width: 1180px) { .df-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .df-grid { grid-template-columns: minmax(0, 1fr); } }

/* Lists status */
.src { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.src:last-child { border-bottom: 0; }
.src .si { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); }
.src .si.g69 { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.src .si.gofac { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.src .si.gotra { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.src .grow { flex: 1; min-width: 0; }
.src b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src small { color: var(--muted); font-size: 12px; }
.src .cnt { text-align: right; }
.src .cnt b { font-size: 14px; }
.delta { font-size: 11.5px; font-weight: 700; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.next-upd { display: flex; gap: 14px; align-items: center; }
.cal { width: 58px; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--line); flex: none; box-shadow: var(--shadow-sm); }
.cal span { display: block; background: var(--ink); color: var(--gold); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; padding: 3px 0; text-transform: uppercase; }
.cal b { display: block; font-size: 24px; font-weight: 800; padding: 4px 0 6px; }

.src-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.src-card .head { display: flex; gap: 12px; align-items: flex-start; }
.src-card h4 { margin: 0; font-size: 14px; font-weight: 700; }
.src-card p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.src-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.src-card .stats div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 10px; }
.src-card .stats span { display: block; font-size: 11px; color: var(--muted); }
.src-card .stats b { font-size: 14px; }
.src-card .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: auto; flex-wrap: wrap; }

/* Drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(7, 11, 20, .4); z-index: 60; animation: fade .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--surface); z-index: 61; display: flex; flex-direction: column;
  box-shadow: -30px 0 60px -20px rgba(2, 6, 23, .35);
  animation: slide .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-h { padding: 22px 24px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.drawer-h h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.015em; }
.drawer-b { padding: 20px 24px 30px; overflow-y: auto; flex: 1; }
.lists-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.lists-row div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.lists-row span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.match { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.match.ALERTA { border-color: var(--red-line); background: linear-gradient(180deg, #fff, #fffafa); }
.match.ADVERTENCIA { border-color: var(--amber-line); }
.match.REVISAR { border-color: var(--yellow-line); }
.match .mh { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
.match .mn { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 12.5px; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; word-break: break-word; }
.score { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.score .tr { width: 64px; height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.score .tr i { display: block; height: 100%; border-radius: 4px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(7, 11, 20, .55); backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 440px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
.modal-h { padding: 22px 24px 4px; }
.modal-h h3 { margin: 0; font-size: 17px; }
.modal-h p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal-b { padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 8px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }

/* Toast */
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--ink); color: #e2e8f0; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; font-size: 13.5px; max-width: 380px; animation: rise .3s; border: 1px solid var(--ink-line); }
.toast.err svg.i { color: #f87171; }
.toast.ok svg.i { color: #4ade80; }

/* Quick search */
.qs-hero { text-align: center; padding: 34px 20px 8px; }
.qs-hero h1 { font-size: 26px; letter-spacing: -.025em; margin: 0 0 6px; }
.qs-hero p { color: var(--muted); margin: 0 0 22px; }
.qs-box { max-width: 760px; margin: 0 auto; }
.qs-input { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 8px 0 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.qs-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(245, 183, 0, .14), var(--shadow); }
.qs-input input { flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; min-width: 0; }
.qs-input svg.i { color: var(--faint); }
.qs-more { display: flex; justify-content: center; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.linkish { background: none; border: 0; color: var(--text-2); font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.qs-res { max-width: 980px; margin: 26px auto 0; display: flex; flex-direction: column; gap: 14px; }
.qcard { padding: 18px 20px; }
.qcard .top-line { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.qcard .groups { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.qcard .groups div { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); }

.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid #f8e3a0; color: var(--gold-ink); font-size: 13px; align-items: flex-start; }
.notice.blue { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

/* Responsive */
@media (max-width: 1180px) {
  .g-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; z-index: 70; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: grid; color: var(--text); }
  .top { padding: 0 16px; }
  .top-search { display: none; }
  .page { padding: 8px 16px 32px; }
  .footer { padding: 18px 16px; }
  .g-4, .g-3, .g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .g-5, .g-4, .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 22px; }
  .hero h1 { font-size: 21px; }
  .months { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { grid-template-columns: 1fr; padding: 20px; }
  .lists-row { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv span { margin-top: 6px; }
  .login-card { padding: 28px 22px; }
  .top .btn.gold span { display: none; }
  .facts { grid-template-columns: 1fr; }
}
@media print {
  .side, .top, .toolbar, .btn, .footer { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
}
