/* ============================================================
   SniperBuscas — clone estático
   Tokens exatos extraídos do CSS original (:root capturado
   em c217504d…css durante a engenharia reversa)
   ============================================================ */

:root {
  /* cores originais */
  --background: #0a0a0f;
  --foreground: #ececf1;
  --surface: #14141c;
  --surface-2: #1b1b25;
  --card: #14141c;
  --card-foreground: #ececf1;
  --popover: #1b1b25;
  --primary: #2563eb;            /* --hd-acento-azul */
  --primary-foreground: #fff;
  --acento-soft: #60a5fa;
  --muted: #1b1b25;
  --muted-foreground: #8b8b98;
  --accent: #22222e;
  --destructive: #ef4444;
  --success: #22c55e;
  --warn: #eab308;
  --info: #38bdf8;
  --border: #26262f;
  --input: #26262f;
  --radius: .375rem;
  --sidebar: #0e0e14;
  --sidebar-foreground: #ececf1;
  --sidebar-border: #26262f;
  --sidebar-accent: #1b1b25;

  /* cores por categoria (originais) */
  --cat-pessoas: var(--primary);
  --cat-contatos: #38bdf8;
  --cat-empresas: #e9a23b;
  --cat-veicular: #2dd4bf;
  --cat-enderecos: #22c55e;
  --cat-digital: #818cf8;
  --cat-saude: #fb7185;
  --cat-leads: #eab308;

  /* faixas de score (originais --hd-score-1..5) */
  --score-1: #ef4444;
  --score-2: #f97316;
  --score-3: #eab308;
  --score-4: #38bdf8;
  --score-5: #22c55e;

  --font-sans: "Barlow Semi Condensed", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --shadow-pop: 0 12px 40px rgba(0, 0, 0, .5);
}

[data-theme="light"] {
  --background: #f5f5f8;
  --foreground: #17171d;
  --surface: #ffffff;
  --surface-2: #efeff4;
  --card: #ffffff;
  --popover: #ffffff;
  --muted: #efeff4;
  --muted-foreground: #5b5b66;
  --accent: #e9e9f0;
  --border: #dcdce4;
  --input: #dcdce4;
  --sidebar: #ffffff;
  --sidebar-foreground: #17171d;
  --sidebar-border: #dcdce4;
  --sidebar-accent: #efeff4;
  --shadow-pop: 0 12px 40px rgba(20, 20, 40, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
::selection { background: rgba(37, 99, 235, .35); }

/* ---------- scrollbar ---------- */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid var(--background); }
*::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 960px) {
  .login-wrap { grid-template-columns: 1.1fr 1fr; }
}
.login-hero {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(37, 99, 235, .22), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(45, 212, 191, .10), transparent 60%),
    var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  position: relative;
  overflow: hidden;
}
@media (min-width: 960px) { .login-hero { display: flex; } }
.login-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: .25;
  mask-image: radial-gradient(700px 500px at 60% 40%, #000 30%, transparent 75%);
}
.login-hero h2 {
  position: relative;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
.login-hero h2 em { font-style: normal; color: var(--primary); }
.login-hero p { position: relative; color: var(--muted-foreground); font-size: 16px; max-width: 420px; margin: 0; }
.login-hero .hero-foot { position: relative; display: flex; gap: 22px; color: var(--muted-foreground); font-size: 12.5px; }
.login-hero .hero-foot b { display: block; color: var(--foreground); font-family: var(--font-mono); font-size: 18px; }

.login-side { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 34px 30px 26px;
  box-shadow: var(--shadow-pop);
}
.login-card .brand-line { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-card h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
.login-card .sub { color: var(--muted-foreground); margin: 0 0 24px; font-size: 13.5px; }
.login-card .foot-links {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-foreground);
}
.login-card .foot-links a:hover { color: var(--foreground); }

/* ============================================================
   FORMS
   ============================================================ */
.field { margin-bottom: 15px; }
.field label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 6px;
}
.input, select.input {
  width: 100%;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .22); }
.input::placeholder { color: var(--muted-foreground); opacity: .65; }
.input.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.input-wrap { position: relative; }
.input-wrap .peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted-foreground); padding: 6px;
}
.input-wrap .peek:hover { color: var(--foreground); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600; font-size: 14px;
  padding: 10px 16px;
  transition: filter .12s, background .12s, border-color .12s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.12); }
.btn-ghost {
  background: transparent; color: var(--foreground); border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--accent); }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; color: var(--primary); font-size: 13px; padding: 0; }
.linkish:hover { text-decoration: underline; }

/* PoW status */
.pow-box {
  margin-top: 14px;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12.5px;
  display: none;
}
.pow-box.on { display: block; }
.pow-box .row1 { display: flex; align-items: center; gap: 10px; color: var(--foreground); font-weight: 500; }
.pow-token {
  margin-top: 10px;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.5;
  color: var(--muted-foreground);
  background: var(--surface-2);
  border-radius: 6px; padding: 8px 10px;
  word-break: break-all; white-space: pre-wrap;
}
.pow-ok { color: var(--success); font-weight: 600; }
.step-list { margin: 10px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); }
.step-list li { padding: 2.5px 0; opacity: .4; transition: opacity .2s; }
.step-list li.on { opacity: 1; color: var(--foreground); }
.step-list li.done { opacity: .8; color: var(--success); }

/* spinner crosshair */
.xspinner { width: 18px; height: 18px; animation: xsrot 1.1s linear infinite; position: relative; flex: none; }
@keyframes xsrot { to { transform: rotate(360deg); } }
.xspinner::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--primary);
}

/* ============================================================
   SHELL / SIDEBAR
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 268px; flex: none;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  z-index: 40;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--sidebar-border);
}
.side-brand .wordmark { font-weight: 700; font-size: 15px; letter-spacing: .06em; }
.side-brand .wordmark span { color: var(--primary); }
.side-brand small { display: block; font-size: 10px; color: var(--muted-foreground); letter-spacing: .04em; font-weight: 500; }

.nav { padding: 10px 10px 20px; flex: 1; }
.nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: 0; background: none;
  color: var(--muted-foreground);
  font-size: 13.5px; font-weight: 500; text-align: left;
  padding: 7px 10px;
  border-radius: 5px;
  transition: background .1s, color .1s;
}
.nav-item:hover { background: var(--sidebar-accent); color: var(--sidebar-foreground); }
.nav-item.active {
  background: rgba(37, 99, 235, .13);
  color: var(--foreground);
  box-shadow: inset 2px 0 0 var(--primary);
}
[data-theme="light"] .nav-item.active { box-shadow: inset 2px 0 0 var(--primary); }
.nav-item svg { flex: none; opacity: .9; }
.nav-item .count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0 6px; line-height: 15px;
}
.nav-item .chev { margin-left: auto; transition: transform .15s; }
.nav-item.expanded .chev { transform: rotate(90deg); }
.cat-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.nav-sub { overflow: hidden; }
.nav-sub .nav-item { font-size: 12.5px; padding: 5.5px 10px 5.5px 27px; color: var(--muted-foreground); }
.nav-sub .nav-item:hover { color: var(--foreground); }
.nav-sub .nav-item.active { color: var(--primary); box-shadow: none; background: var(--sidebar-accent); }
.side-foot { border-top: 1px solid var(--sidebar-border); padding: 12px 16px; font-size: 11px; color: var(--muted-foreground); }
.side-foot .quota-line { font-family: var(--font-mono); font-size: 10.5px; margin-top: 4px; opacity: .8; }

/* ============================================================
   MAIN / TOPBAR
   ============================================================ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 20px;
  background: color-mix(in srgb, var(--background) 78%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; }
.crumbs { font-size: 12.5px; color: var(--muted-foreground); display: flex; gap: 6px; align-items: center; }
.crumbs b { color: var(--foreground); font-weight: 600; }
.topbar .spacer { flex: 1; }
.btn-search {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted-foreground); border-radius: var(--radius);
  padding: 6.5px 10px; font-size: 13px;
}
.btn-search:hover { color: var(--foreground); border-color: var(--muted-foreground); }
.btn-search kbd {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; color: var(--muted-foreground);
}
.icon-btn {
  position: relative;
  background: none; border: 1px solid transparent; color: var(--muted-foreground);
  border-radius: var(--radius); padding: 7px;
}
.icon-btn:hover { background: var(--accent); color: var(--foreground); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--destructive); border: 1.5px solid var(--background);
}
.user-chip {
  display: flex; align-items: center; gap: 9px;
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  padding: 4px 8px 4px 4px;
}
.user-chip:hover { background: var(--accent); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--acento-soft));
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  flex: none;
}
.user-chip .who { text-align: left; line-height: 1.15; }
.user-chip .who b { display: block; font-size: 12.5px; font-weight: 600; }
.user-chip .who span { display: block; font-size: 10.5px; font-family: var(--font-mono); color: var(--muted-foreground); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 230px;
  background: var(--popover); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-pop);
  padding: 8px; z-index: 50;
}
.user-menu .head { padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-menu .head b { font-size: 13.5px; display: block; }
.user-menu .head span { font-size: 11px; font-family: var(--font-mono); color: var(--muted-foreground); }
.user-menu .mi {
  display: flex; align-items: center; gap: 9px;
  width: 100%; border: 0; background: none; color: var(--foreground);
  font-size: 13px; padding: 7.5px 10px; border-radius: 6px; text-align: left;
}
.user-menu .mi:hover { background: var(--accent); }
.user-menu .mi.danger { color: var(--destructive); }

/* ============================================================
   VIEW / DASHBOARD
   ============================================================ */
.view { padding: 26px 30px 70px; max-width: 1240px; width: 100%; margin: 0 auto; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.h1 { font-size: 27px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.h1-sub { margin: 6px 0 0; color: var(--muted-foreground); font-size: 13.5px; max-width: 560px; }
.h1-sub b { color: var(--foreground); font-weight: 600; }
.quota-stats {
  display: flex; gap: 26px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 3px); padding: 14px 20px;
}
.quota-stats dt { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.quota-stats dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: 21px; font-weight: 600; }
.quota-stats dd small { font-family: var(--font-sans); font-size: 11px; font-weight: 400; color: var(--muted-foreground); margin-left: 4px; }
.quota-bar { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 7px; overflow: hidden; max-width: 160px; }
.quota-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }

.sec-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 26px 0 12px;
}
.sec-title:first-of-type { margin-top: 0; }
.sec-title .cat-dot { width: 8px; height: 8px; }
.sec-title .n { font-family: var(--font-mono); font-size: 10px; border: 1px solid var(--border); border-radius: 99px; padding: 0 6px; line-height: 15px; font-weight: 500; letter-spacing: 0; }

.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 10px; }
.mod-card {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 3px);
  padding: 13px 14px; text-align: left;
  color: var(--foreground);
  transition: border-color .12s, transform .12s, background .12s;
}
.mod-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.mod-card .t { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.mod-card .t svg { color: var(--muted-foreground); flex: none; }
.mod-card .d { color: var(--muted-foreground); font-size: 12px; line-height: 1.4; }
.mod-card .tag { margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted-foreground); opacity: .7; }

/* ============================================================
   CONSULTA (parâmetros + resultado)
   ============================================================ */
.consulta-head { margin-bottom: 20px; }
.consulta-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .consulta-layout { grid-template-columns: 1fr; } }
.param-card, .result-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 3px);
  padding: 18px;
}
.param-card .cap, .result-card .cap {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-foreground); margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.param-meta { margin-top: 14px; font-size: 11.5px; color: var(--muted-foreground); display: grid; gap: 5px; }
.param-meta div { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; }
.param-meta b { color: var(--foreground); font-weight: 500; }

.empty-state {
  border: 1.5px dashed var(--border);
  border-radius: calc(var(--radius) + 3px);
  padding: 60px 24px;
  text-align: center; color: var(--muted-foreground);
}
.empty-state .big { font-size: 17px; font-weight: 600; color: var(--foreground); margin-bottom: 6px; }
.empty-state p { margin: 0 auto; max-width: 420px; font-size: 13px; }

/* resultado */
.res-head { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 6px; flex-wrap: wrap; }
.res-avatar {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #12305e, var(--primary));
  border: 1px solid var(--border);
  font-weight: 700; font-size: 17px; color: #dbeafe;
  position: relative; overflow: hidden;
}
.res-avatar .cam { position: absolute; bottom: 2px; right: 2px; background: rgba(10,10,15,.7); border-radius: 4px; padding: 1.5px; display: grid; }
.res-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-hero { width: 116px; height: 116px; object-fit: cover; border-radius: 50%; border: 1px solid var(--border); margin-bottom: 14px; }
.meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.meter { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted-foreground); margin-bottom: 6px; }
.meter-top b { font-family: var(--font-mono); font-weight: 600; color: var(--foreground); }
.meter-track { height: 6px; border-radius: 3px; background: var(--surface); overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: 3px; }
/* timeline (linha do tempo de empregos / IRPF) */
.timeline { position: relative; padding-left: 16px; margin-left: 4px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--border); border-radius: 2px; }
.tl-item { position: relative; display: flex; gap: 14px; padding: 4px 0 16px; }
.tl-item::before { content: ''; position: absolute; left: -17px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted-foreground); }
.tl-item.tl-active::before { background: var(--success); border-color: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.tl-date { flex: 0 0 52px; text-align: right; font-family: var(--font-mono); padding-top: 2px; }
.tl-date b { display: block; font-size: 13px; font-weight: 600; }
.tl-date span { font-size: 10.5px; color: var(--muted-foreground); }
.tl-body { min-width: 0; flex: 1; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head .pill { padding: 1px 8px; font-size: 10px; }
.tl-title { font-weight: 600; font-size: 13px; }
.tl-sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); margin-top: 3px; word-break: break-word; }
.tl-kv { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 18px; }
.spark { margin-top: 10px; }
.spark-bars { display: flex; align-items: flex-end; gap: 3px; height: 34px; max-width: 320px; }
.spark-bars i { flex: 1; min-height: 2px; background: color-mix(in srgb, var(--primary) 75%, transparent); border-radius: 2px 2px 0 0; }
.spark-lab { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-foreground); margin-top: 4px; }
.res-id h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: .01em; }
.res-id .sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.res-actions { margin-left: auto; display: flex; gap: 8px; }
.res-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 14px 0 18px; overflow-x: auto; }
.tab {
  border: 0; background: none; color: var(--muted-foreground);
  font-size: 13px; font-weight: 600;
  padding: 9px 13px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--foreground); }
.tab.active { color: var(--foreground); border-bottom-color: var(--primary); }
.tab .tn { font-family: var(--font-mono); font-size: 10px; margin-left: 5px; color: var(--muted-foreground); }

.block { margin-bottom: 22px; }
.block > .bt {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-foreground); margin-bottom: 10px;
}
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 22px; }
.kv { border-bottom: 1px dotted var(--border); padding-bottom: 7px; }
.kv dt { font-size: 11px; color: var(--muted-foreground); letter-spacing: .03em; }
.kv dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.kv dd.mono { font-family: var(--font-mono); font-size: 13px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted-foreground); font-weight: 700;
  padding: 7px 10px; border-bottom: 1px solid var(--border);
}
table.data td { padding: 8.5px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.mono { font-family: var(--font-mono); font-size: 12.5px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 99px; padding: 2px 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  border: 1px solid;
}
.pill.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 12%, transparent); }
.pill.info { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 12%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.pill.mut { color: var(--muted-foreground); border-color: var(--border); background: var(--surface-2); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }

/* score */
.score-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.score-big { font-family: var(--font-mono); font-size: 44px; font-weight: 700; line-height: 1; }
.score-big small { font-size: 15px; color: var(--muted-foreground); font-weight: 400; }
.score-meter { flex: 1; min-width: 200px; }
.score-meter .track {
  height: 9px; border-radius: 6px; position: relative;
  background: linear-gradient(90deg, var(--score-1), var(--score-2), var(--score-3), var(--score-4), var(--score-5));
  opacity: .95;
}
.score-meter .pin {
  position: absolute; top: -4.5px; width: 3px; height: 18px; border-radius: 2px;
  background: var(--foreground); box-shadow: 0 0 0 2px var(--background);
  transform: translateX(-50%);
}
.score-meter .scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--muted-foreground); margin-top: 6px; }

/* grafo de vínculos simples */
.graph-note { font-size: 12.5px; color: var(--muted-foreground); margin-top: 10px; font-family: var(--font-mono); }
.entity-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; margin-bottom: 7px; font-size: 13px;
}
.entity-row .etype {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em;
  border: 1px solid var(--border); border-radius: 4px; padding: 1.5px 6px;
  color: var(--muted-foreground); flex: none;
}
.entity-row .lab { font-weight: 500; }
.entity-row .meta2 { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); }

.meta-strip {
  display: flex; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  margin-top: 8px; padding-top: 12px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted-foreground);
}

/* ============================================================
   PALETTE (Ctrl K)
   ============================================================ */
.palette-back { position: fixed; inset: 0; background: rgba(5, 5, 10, .6); backdrop-filter: blur(3px); z-index: 90; }
.palette {
  position: fixed; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(600px, 92vw);
  background: var(--popover); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  z-index: 91; overflow: hidden;
}
.palette input {
  width: 100%; border: 0; outline: 0; background: transparent;
  color: var(--foreground); font-size: 15px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.plist { max-height: 46vh; overflow-y: auto; padding: 6px; }
.pitem {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; color: var(--foreground);
}
.pitem:hover, .pitem.sel { background: var(--accent); }
.pitem .pgrp { margin-left: auto; font-size: 10px; font-family: var(--font-mono); color: var(--muted-foreground); }
.pempty { padding: 26px; text-align: center; color: var(--muted-foreground); font-size: 13px; }

/* ============================================================
   TOAST / MISC
   ============================================================ */
#toast-root { position: fixed; bottom: 18px; right: 18px; z-index: 120; display: grid; gap: 8px; }
.toast {
  background: var(--popover); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px; padding: 11px 15px;
  font-size: 13px; box-shadow: var(--shadow-pop);
  animation: toastin .18s ease-out;
  max-width: 340px;
}
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.out { opacity: 0; transition: opacity .3s; }

.fade-in { animation: fadein .22s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.page-simple {
  max-width: 640px; margin: 10vh auto 0; text-align: center;
  color: var(--muted-foreground);
}
.page-simple h2 { color: var(--foreground); margin-bottom: 8px; }
.page-simple code { font-family: var(--font-mono); font-size: 11.5px; background: var(--surface-2); padding: 2px 7px; border-radius: 5px; }

.backdrop { display: none; }

/* ============================================================
   RESPONSIVE / PRINT
   ============================================================ */
@media (max-width: 1080px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-102%); transition: transform .2s ease;
    box-shadow: var(--shadow-pop);
  }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-grid; place-items: center; }
  .backdrop.on { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
  .user-chip .who { display: none; }
}
@media print {
  .sidebar, .topbar, .res-actions, .res-tabs, .no-print { display: none !important; }
  .main { margin: 0; }
  .view { padding: 0; max-width: none; }
  body { background: #fff; color: #111; }
  .result-card, .param-card { border-color: #ccc; background: #fff; }
}
