/* ═══════════════════════════════════════════════════════════
   CLEARDEBT PRO — style.css
   Equifax-inspired credit bureau · Borrado de deuda
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Core */
  --bg:         #080D18;
  --surf0:      #0D1421;
  --surf1:      #111C2E;
  --surf2:      #172236;
  --surf3:      #1D2A40;
  --border:     rgba(255,255,255,0.06);
  --border2:    rgba(255,255,255,0.11);

  /* Brand — Equifax red */
  --red:        #C41230;
  --red2:       #E01535;
  --red-bg:     rgba(196,18,48,0.1);
  --red-glow:   rgba(196,18,48,0.2);

  /* Accents */
  --gold:       #E8A020;
  --gold2:      #F5C842;
  --gold-bg:    rgba(232,160,32,0.1);
  --green:      #00A651;
  --green2:     #00C060;
  --green-bg:   rgba(0,166,81,0.1);
  --blue:       #1D6FA4;
  --blue2:      #2E8BC4;
  --blue-bg:    rgba(29,111,164,0.1);
  --orange:     #E07020;
  --orange-bg:  rgba(224,112,32,0.1);
  --gray:       #607080;
  --gray-bg:    rgba(96,112,128,0.1);

  /* Text */
  --text:       #E8EFF8;
  --text2:      #B8C8DC;
  --muted:      #4E6278;
  --dim:        #263040;

  /* Layout */
  --r:          8px;
  --r-sm:       5px;
  --r-lg:       12px;
  --sidebar-w:  230px;
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.6);
  --tr:         0.18s ease;

  /* Bureau colors */
  --eq:  #E31837; /* Equifax */
  --ex:  #702082; /* Experian */
  --tu:  #00558C; /* TransUnion */
  --sn:  #E07820; /* Sentinel */
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  /* Subtle grid texture */
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 40px 40px;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 4px; }
a { color: inherit; text-decoration: none; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surf0);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow: hidden;
}

/* Top accent line */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red2), transparent);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  white-space: nowrap;
}
.logo-mark { flex-shrink: 0; }
.logo-text {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .04em;
  line-height: 1.1;
  color: var(--text);
}
.logo-text span {
  display: block;
  color: var(--red);
  font-size: .52rem;
  font-weight: 600;
  letter-spacing: .18em;
  opacity: .9;
}

/* Bureau trust strip */
.bureau-trust {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 16px;
}
.bureau-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bureau-dot.eq { background: var(--eq); }
.bureau-dot.ex { background: var(--ex); }
.bureau-dot.tu { background: var(--tu); }
.bureau-dot.sn { background: var(--sn); }
.bureau-trust-label {
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
  margin-left: 3px;
}

.nav-sep {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--dim);
  padding: 0 8px;
  margin: 14px 0 4px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  transition: all var(--tr);
  margin-bottom: 1px;
  position: relative;
  white-space: nowrap;
  user-select: none;
}
.nav-item:hover { background: var(--surf2); color: var(--text2); }
.nav-item.active {
  background: var(--red-bg);
  color: var(--red2);
  border-left: 2px solid var(--red);
  padding-left: 8px;
}
.nav-i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  flex-shrink: 0;
  font-style: normal;
}
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: .5rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
}

/* Compliance strip */
.compliance-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: auto 0 14px;
  padding: 9px 10px;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--green);
}
.compliance-icon { font-size: 14px; flex-shrink: 0; }
.compliance-title {
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--green);
  margin-bottom: 1px;
}
.compliance-sub { font-size: .52rem; color: var(--muted); }

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surf2);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--tr);
}
.user-row:hover { background: var(--surf3); }
.user-av {
  width: 30px; height: 30px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--red), #8B0A1E);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  font-family: 'Barlow', sans-serif;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}
.user-info { flex: 1; min-width: 0; }
.user-nm { font-size: .75rem; font-weight: 600; color: var(--text); }
.user-pl {
  display: flex; align-items: center; gap: 4px;
  font-size: .58rem; color: var(--gold);
}
.plan-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.user-online { color: var(--green); font-size: 8px; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   MAIN
══════════════════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 24px 28px;
  max-width: calc(100vw - var(--sidebar-w));
  overflow-x: hidden;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.bc-root { color: var(--muted); }
.bc-sep  { color: var(--dim); }
.bc-current { color: var(--red); }
.page-h {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1;
}
.page-h em { color: var(--red); font-style: normal; }
.page-sub { font-size: .68rem; color: var(--muted); margin-top: 4px; }
.topbar-r { display: flex; gap: 8px; align-items: center; }

.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--gold-bg);
  border: 1px solid rgba(232,160,32,0.25);
  border-radius: 4px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold);
}
.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.8); }
}

.icon-btn {
  width: 34px; height: 34px;
  background: var(--surf1);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; position: relative;
  transition: var(--tr);
  color: var(--muted);
}
.icon-btn:hover { background: var(--surf2); color: var(--text); }
.notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--surf1);
}

.btn-primary {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
}
.btn-primary:hover { background: var(--red2); transform: translateY(-1px); box-shadow: 0 4px 16px var(--red-glow); }

/* ── PROGRESS ── */
.prog-bar {
  background: var(--surf0);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.prog-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 66%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}
.prog-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.prog-label {
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--muted);
}
.prog-pct-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .65rem;
  color: var(--gold);
  font-weight: 500;
}
.prog-track-outer {
  height: 4px;
  background: var(--surf3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 18px;
}
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
  transition: width 1s ease;
}
.steps {
  display: flex;
  align-items: center;
}
.step-unit { display: flex; align-items: center; gap: 8px; }
.step-circ {
  width: 24px; height: 24px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 800;
  font-family: 'Barlow', sans-serif;
  flex-shrink: 0;
  transition: all .4s;
}
.step-circ.done { background: var(--green); color: #fff; }
.step-circ.now  { background: var(--red); color: #fff; box-shadow: 0 0 0 3px var(--red-bg); }
.step-circ.wait { background: var(--surf3); color: var(--muted); border: 1px solid var(--border2); }
.step-name { font-size: .72rem; font-weight: 600; color: var(--text2); }
.step-lbl  { font-size: .58rem; color: var(--muted); margin-top: 1px; }
.step-lbl.now-l  { color: var(--red); }
.step-lbl.done-l { color: var(--green); }
.step-line {
  flex: 1;
  height: 1px;
  background: var(--border2);
  margin: 0 14px;
  position: relative;
}
.step-line.done   { background: var(--green); }
.step-line.active { background: linear-gradient(90deg, var(--green), var(--border2)); }

/* ── STAT CARDS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat-c {
  background: var(--surf0);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform var(--tr), box-shadow var(--tr);
}
.stat-c:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-c::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.gold-c::after  { background: var(--gold); }
.red-c::after   { background: var(--red); }
.green-c::after { background: var(--green); }
.blue-c::after  { background: var(--blue2); }
.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.stat-lbl {
  font-size: .54rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--muted);
}
.stat-trend {
  font-family: 'IBM Plex Mono', monospace;
  font-size: .6rem;
  font-weight: 700;
}
.stat-trend.up { color: var(--green); }
.stat-trend.dn { color: var(--red); }
.stat-badge-sm {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 2px 6px;
  border-radius: 3px;
}
.stat-badge-sm.alert { background: var(--red-bg); color: var(--red); }
.stat-badge-sm.ok    { background: var(--green-bg); color: var(--green); }
.stat-badge-sm.info  { background: var(--blue-bg); color: var(--blue2); }
.stat-val {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 4px;
}
.gv  { color: var(--gold); }
.rv  { color: var(--red); }
.grv { color: var(--green); }
.bv  { color: var(--blue2); }
.stat-sub { font-size: .62rem; color: var(--muted); }
.stat-bar-wrap { margin-top: 10px; }
.stat-bar-track {
  height: 3px;
  background: var(--surf3);
  border-radius: 2px;
  overflow: hidden;
}
.stat-bar-fill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.gold-fill { background: linear-gradient(90deg, var(--gold), var(--gold2)); }

/* ══════════════════════════════════════════════════════════
   DNI SECTION
══════════════════════════════════════════════════════════ */
.dni-section { margin-bottom: 18px; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.section-eyebrow {
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--red);
  margin-bottom: 4px;
}
.ct {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}
.section-sub { font-size: .68rem; color: var(--muted); margin-top: 3px; }

/* Bureau chips */
.bureau-chips { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.bureau-chip-sm {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .08em;
  font-family: 'IBM Plex Mono', monospace;
}
.eq-sm { background: rgba(227,24,55,.12); color: #E31837; border: 1px solid rgba(227,24,55,.25); }
.ex-sm { background: rgba(112,32,130,.12); color: #9B4DC0; border: 1px solid rgba(112,32,130,.25); }
.tu-sm { background: rgba(0,85,140,.12);  color: #2E8BC4; border: 1px solid rgba(0,85,140,.25); }
.sn-sm { background: rgba(224,120,32,.12);color: var(--sn); border: 1px solid rgba(224,120,32,.25); }

/* Search bar */
.search-bar {
  background: var(--surf0);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 14px 16px;
  transition: border-color var(--tr);
}
.search-bar:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 0;
}
.search-icon-wrap {
  padding: 0 12px;
  color: var(--muted);
  font-size: 15px;
  flex-shrink: 0;
}
.dni-field { flex: 1; }
.dni-field input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 4px;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .06em;
}
.dni-field input::placeholder { color: var(--dim); font-family: 'IBM Plex Sans', sans-serif; font-size: .82rem; letter-spacing: 0; font-weight: 400; }
.search-divider { width: 1px; height: 28px; background: var(--border2); margin: 0 12px; flex-shrink: 0; }
.btn-search {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .06em;
  cursor: pointer;
  transition: var(--tr);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-search:hover:not(:disabled) { background: var(--red2); box-shadow: 0 4px 14px var(--red-glow); }
.btn-search:disabled { opacity: .4; cursor: not-allowed; }

.search-hints {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: .62rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.hint-item { display: flex; align-items: center; gap: 4px; }
.hint-label {
  background: var(--surf2);
  color: var(--text2);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .06em;
  font-family: 'IBM Plex Mono', monospace;
}
.hint-sep { color: var(--dim); }
.search-counter { margin-left: auto; color: var(--gold); font-family: 'IBM Plex Mono', monospace; font-size: .6rem; }

/* Result area */
.result-area { margin-top: 14px; }

.spin-wrap {
  display: none; padding: 28px; text-align: center;
  color: var(--muted); font-size: .78rem;
}
.spin-wrap.show { display: block; }
.spinner {
  width: 26px; height: 26px;
  border: 2px solid var(--border2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.err-box {
  display: none;
  background: var(--red-bg);
  border: 1px solid rgba(196,18,48,.2);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  color: var(--red);
  font-size: .78rem;
}
.err-box.show { display: block; }

.result-box {
  display: none;
  background: var(--surf0);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 18px;
  animation: fadeUp .3s ease;
}
.result-box.show { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Person wrap */
.person-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: start;
}
.person-photo-box { position: relative; flex-shrink: 0; }
.person-photo {
  width: 76px; height: 96px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 2px solid var(--red);
  display: block;
}
.person-photo-placeholder {
  width: 76px; height: 96px;
  border-radius: var(--r-sm);
  background: var(--surf2);
  border: 1px dashed var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.photo-badge {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  background: var(--green);
  color: #fff;
  font-size: .48rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: .08em;
  font-family: 'IBM Plex Mono', monospace;
}
.person-name-big {
  font-family: 'Barlow', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}
.person-dni-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--red-bg);
  color: var(--red);
  font-size: .6rem; font-weight: 700;
  padding: 3px 9px;
  border-radius: 3px;
  letter-spacing: .06em;
  margin-bottom: 12px;
  font-family: 'IBM Plex Mono', monospace;
  border: 1px solid rgba(196,18,48,.2);
}
.fields-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fld-lbl {
  font-size: .52rem; color: var(--muted);
  letter-spacing: .1em; font-weight: 700; margin-bottom: 2px;
}
.fld-val { font-size: .76rem; font-weight: 500; color: var(--text2); }

/* RUC panel */
.ruc-panel {
  background: var(--surf1);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  min-width: 160px;
  border-top: 2px solid var(--blue2);
}
.rp-title {
  font-size: .52rem; letter-spacing: .14em; font-weight: 700;
  color: var(--blue2); margin-bottom: 10px;
}
.rp-row { margin-bottom: 8px; }
.rp-row:last-child { margin-bottom: 0; }
.rp-lbl { font-size: .52rem; color: var(--muted); font-weight: 700; letter-spacing: .08em; margin-bottom: 2px; }
.rp-val { font-size: .78rem; font-weight: 600; }
.rp-val.ruc-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; color: var(--blue2); font-size: .84rem; }
.rp-no-ruc { text-align: center; padding: 10px; color: var(--dim); font-size: .68rem; }

/* ══════════════════════════════════════════════════════════
   INFOCORP TABLE
══════════════════════════════════════════════════════════ */
.report-section { margin-bottom: 18px; }
.ic-table-wrap {
  background: var(--surf0);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  overflow: hidden;
}
.ic-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(180deg, var(--surf1) 0%, transparent 100%);
}
.ic-head-eyebrow {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--red);
  margin-bottom: 3px;
}
.ic-head-sub { font-size: .62rem; color: var(--muted); margin-top: 3px; }
.ic-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: var(--surf2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  font-size: .62rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: var(--tr);
  text-decoration: none;
}
.btn-admin:hover { background: var(--surf3); color: var(--text); }

/* Empty state */
.ic-empty-state {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.ies-icon { font-size: 36px; margin-bottom: 12px; opacity: .5; }
.ies-title {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text2);
  margin-bottom: 5px;
}
.ies-sub { font-size: .72rem; color: var(--muted); }

.ic-table-scroll { overflow-x: auto; }
.ic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .72rem;
  min-width: 700px;
}
.ic-table thead th {
  background: var(--surf1);
  padding: 8px 10px;
  text-align: left;
  font-size: .52rem;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}
.th-num { width: 36px; }
.ic-table thead th.tc { text-align: center; }
.ic-table thead th.tr { text-align: right; }
.ic-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ic-table tbody tr:last-child td { border-bottom: none; }
.ic-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.ic-table tfoot td { padding: 10px; background: var(--surf1); }

.doc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .62rem; font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 2px;
}
.doc-tag.dni-t { background: rgba(29,111,164,.12); color: var(--blue2); border-left: 2px solid var(--blue2); }
.doc-tag.ruc-t { background: var(--orange-bg); color: var(--orange); border-left: 2px solid var(--orange); }
.nom-person { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.monto-val { font-family: 'IBM Plex Mono', monospace; font-weight: 700; }
.note-val  { font-family: 'IBM Plex Mono', monospace; font-weight: 700; }

/* Bureau pills */
.bureau-pills { display: flex; gap: 3px; flex-wrap: wrap; }
.bpill {
  font-size: .5rem; font-weight: 700; letter-spacing: .06em;
  padding: 1px 5px; border-radius: 2px;
  font-family: 'IBM Plex Mono', monospace;
}
.bpill.sent { background: rgba(224,120,32,.12); color: var(--sn); }
.bpill.equi { background: rgba(227,24,55,.12);  color: #E31837; }
.bpill.expr { background: rgba(112,32,130,.12); color: #9B4DC0; }
.bpill.tran { background: rgba(0,85,140,.12);   color: #2E8BC4; }

/* Index badge */
.idx-badge {
  width: 20px; height: 20px;
  border-radius: 3px;
  background: var(--surf2);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
}

/* ── SEMÁFORO ── */
.semaforo-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surf1);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--gray);
  margin-bottom: 14px;
}
.semaforo-rojo { border-left-color: var(--red); }
.sem-lamp {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.sem-red    { background: var(--red);   color: var(--red); }
.sem-yellow { background: var(--gold);  color: var(--gold); }
.sem-green  { background: var(--green); color: var(--green); }
.sem-gray   { background: var(--gray);  color: var(--gray); }
.sem-content { flex: 1; }
.sem-label { font-size: .7rem; font-weight: 700; }
.sem-desc  { font-size: .62rem; color: var(--muted); margin-top: 1px; }
.sem-urgente {
  font-size: .52rem; font-weight: 800; letter-spacing: .12em;
  color: var(--red); background: var(--red-bg);
  padding: 2px 7px; border-radius: 3px;
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
}
.sem-txt-val { font-size: .65rem; font-weight: 700; }

/* Status pills */
.spill {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: .58rem; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
}
.sp-r  { background: var(--red-bg);    color: var(--red); }
.sp-g  { background: var(--green-bg);  color: var(--green); }
.sp-o  { background: var(--orange-bg); color: var(--orange); }
.sp-y  { background: var(--gold-bg);   color: var(--gold); }
.sp-gy { background: var(--gray-bg);   color: var(--gray); }

/* ══════════════════════════════════════════════════════════
   CONTENT GRID
══════════════════════════════════════════════════════════ */
.content-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.col-r { display: flex; flex-direction: column; gap: 16px; }

/* ── CARD ── */
.card {
  background: var(--surf0);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border2), transparent);
}
.ch {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}
.card-eyebrow {
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--red);
  margin-bottom: 3px;
}
.cbadge {
  font-size: .54rem; font-weight: 700;
  padding: 3px 8px; border-radius: 3px; letter-spacing: .08em;
  font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}
.cba-g  { background: var(--gold-bg);  color: var(--gold); }
.cba-gr { background: var(--green-bg); color: var(--green); }
.cba-r  { background: var(--red-bg);   color: var(--red); }
.cba-b  { background: var(--blue-bg);  color: var(--blue2); }
.cba-gy { background: var(--gray-bg);  color: var(--gray); }

/* ── GAUGE ── */
.score-row {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.gauge-wrap { position: relative; width: 86px; height: 86px; flex-shrink: 0; }
.gauge-wrap svg { width: 86px; height: 86px; }
.gauge-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.g-num {
  font-family: 'Barlow', sans-serif;
  font-weight: 800; font-size: 1.4rem; line-height: 1;
  color: var(--gold);
}
.g-lbl {
  font-size: .48rem; letter-spacing: .14em;
  color: var(--muted); font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
}
.score-grade {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.grade-label {
  font-size: .52rem; font-weight: 700;
  letter-spacing: .1em; color: var(--muted);
}
.grade-value {
  font-family: 'Barlow', sans-serif;
  font-weight: 800; font-size: .88rem;
  color: var(--gold);
  letter-spacing: .04em;
}
.score-meta p { font-size: .7rem; color: var(--muted); line-height: 1.5; }
.score-meta strong { color: var(--green); }
.score-bar { margin-top: 10px; }
.sb-track {
  height: 4px; border-radius: 2px;
  background: var(--surf3); overflow: hidden;
}
.sb-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green));
  position: relative; transition: width .8s ease;
}
.sb-ptr {
  position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--gold);
  box-shadow: 0 0 5px var(--gold);
}
.sb-range {
  display: flex; justify-content: space-between;
  font-size: .54rem; color: var(--dim); margin-top: 4px;
  font-family: 'IBM Plex Mono', monospace;
}

/* ── DEBT TABLE ── */
.debt-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-top: 4px;
}
.debt-table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px;
  background: var(--surf1);
  border-bottom: 1px solid var(--border);
}
.debt-table-title {
  font-size: .52rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--muted);
}
.debt-count-badge {
  font-size: .54rem; font-weight: 700;
  background: var(--red-bg); color: var(--red);
  padding: 1px 7px; border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
}
.dt { width: 100%; border-collapse: collapse; font-size: .74rem; }
.dt thead th {
  text-align: left; color: var(--muted);
  font-size: .54rem; letter-spacing: .1em; font-weight: 700;
  padding: 7px 12px;
  background: var(--surf1);
  font-family: 'IBM Plex Mono', monospace;
}
.dt thead th:last-child, .dt tbody td:last-child { text-align: right; }
.dt tbody td { padding: 8px 12px; border-top: 1px solid var(--border); }
.entity-row { display: flex; align-items: center; gap: 7px; }
.edot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dam { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: .8rem; }
.dt tfoot td {
  border-top: 1px solid var(--border2);
  padding: 8px 12px;
  background: var(--surf1);
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
}

/* ── ACTIONS ── */
.actions-card .action-btns { display: flex; flex-direction: column; gap: 6px; }
.abtn {
  width: 100%;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: .76rem;
  transition: all var(--tr);
  display: flex; align-items: center; gap: 8px;
  text-align: left;
}
.abtn-primary {
  background: var(--red);
  color: #fff;
  justify-content: space-between;
}
.abtn-primary:hover { background: var(--red2); box-shadow: 0 4px 14px var(--red-glow); }
.abtn-icon { font-size: 13px; flex-shrink: 0; }
.abtn-arrow { margin-left: auto; font-size: .7rem; opacity: .7; }
.abtn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}
.abtn-outline:hover { background: var(--surf1); border-color: var(--border2); color: var(--text); }
.abtn-ghost {
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  justify-content: center;
}
.abtn-ghost:hover { color: var(--red); background: var(--red-bg); }
.action-divider { height: 1px; background: var(--border); margin: 4px 0; }
.legal-note {
  margin-top: 12px;
  padding: 8px 10px;
  background: var(--surf1);
  border-radius: var(--r-sm);
  font-size: .58rem;
  color: var(--dim);
  line-height: 1.5;
  border-left: 2px solid var(--border2);
}

/* ── TIPS ── */
.tip-item {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tip-item:last-child { border-bottom: none; padding-bottom: 0; }
.tip-ic {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.tip-t { font-size: .74rem; font-weight: 600; margin-bottom: 1px; color: var(--text2); }
.tip-d { font-size: .65rem; color: var(--muted); line-height: 1.4; }

/* ── ACTIVITY ── */
.act-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.act-row:last-child { border-bottom: none; }
.act-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.act-txt { flex: 1; font-size: .72rem; color: var(--text2); }
.act-time {
  font-size: .6rem; color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}

/* ══════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  display: flex; flex-direction: column; gap: 7px;
  z-index: 9999;
}
.toast {
  min-width: 250px; max-width: 320px;
  background: var(--surf1);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: .76rem; font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideIn .25s ease;
  display: flex; align-items: center; gap: 9px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--gold); }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(20px); } }
.toast.removing { animation: slideOut .25s ease forwards; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .person-wrap { grid-template-columns: auto 1fr; }
  .ruc-panel { grid-column: 1 / -1; display: flex; gap: 16px; align-items: center; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 54px; }
  .logo-text, .nav-item > span:not(.nav-i), .nav-badge,
  .bureau-trust, .compliance-strip, .user-nm, .user-pl,
  .user-online, .user-info { display: none; }
  .nav-item { justify-content: center; }
  .nav-i { font-size: 16px; }
  .main { padding: 14px 12px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .person-wrap { grid-template-columns: 1fr; }
  .fields-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .stats-row { grid-template-columns: 1fr; }
  .search-bar-inner { flex-direction: column; align-items: stretch; }
  .search-divider { display: none; }
  .btn-search { justify-content: center; }
}