/* Nattia Shield — panel de revisión. Sistema de diseño propio, sin dependencias ni fuentes externas. */
:root {
  --bg: #f3f5fb; --surface: #ffffff; --surface-2: #f7f9fe; --ink: #0e1630; --muted: #5a6580; --faint: #8a94ad; --line: #e3e8f3;
  --brand: #3b6bff; --brand-2: #8b4dff; --grad: linear-gradient(135deg, #3b82ff 0%, #8b4dff 100%);
  --red: #e5384f; --red-soft: #fdebee; --amber: #d98400; --amber-soft: #fff3dc; --green: #0f9d63; --green-soft: #e3f7ec; --blue-soft: #e8efff; --violet-soft: #f0e8ff;
  --side-a: #0c1230; --side-b: #151d4a; --side-ink: #c8d0ec; --side-active: rgba(255, 255, 255, .12);
  --shadow: 0 1px 2px rgba(14, 22, 48, .05), 0 8px 24px -12px rgba(14, 22, 48, .14);
  --shadow-lg: 0 24px 60px -20px rgba(14, 22, 48, .35);
  --radius: 14px; --ring-track: #e6ebf6;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #080c1a; --surface: #101733; --surface-2: #0c1229; --ink: #e9edfb; --muted: #9aa5c4; --faint: #6c7898; --line: #1f2a4d;
  --brand: #6b92ff; --brand-2: #a37bff;
  --red: #ff6b81; --red-soft: #3a1823; --amber: #ffb347; --amber-soft: #3a2a10; --green: #3fd391; --green-soft: #0f2e22; --blue-soft: #16264f; --violet-soft: #2a1d52;
  --side-a: #060a18; --side-b: #0d1431; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .6); --ring-track: #1d2850;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #080c1a; --surface: #101733; --surface-2: #0c1229; --ink: #e9edfb; --muted: #9aa5c4; --faint: #6c7898; --line: #1f2a4d;
    --brand: #6b92ff; --brand-2: #a37bff;
    --red: #ff6b81; --red-soft: #3a1823; --amber: #ffb347; --amber-soft: #3a2a10; --green: #3fd391; --green-soft: #0f2e22; --blue-soft: #16264f; --violet-soft: #2a1d52;
    --side-a: #060a18; --side-b: #0d1431; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .6); --ring-track: #1d2850;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; font: 14px/1.5 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; } h2 { font-size: 15px; font-weight: 650; } h3 { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
code, pre, .mono { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.lg { width: 22px; height: 22px; } svg.i.sm { width: 14px; height: 14px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; margin: 0 auto 12px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes drift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.rise { animation: rise .35s ease both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- estructura ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; padding: 18px 12px 14px; color: var(--side-ink); background: linear-gradient(180deg, var(--side-a), var(--side-b)); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 4px 12px rgba(80, 100, 255, .55)); }
.brand b { display: block; font-size: 15px; letter-spacing: .01em; line-height: 1.1; } .brand small { color: var(--side-ink); font-size: 11px; opacity: .75; }
.nav-title { padding: 14px 12px 6px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .55; }
.nav { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--side-ink); font-weight: 500; text-decoration: none !important; position: relative; transition: background .15s, color .15s; }
.nav:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav.active { background: var(--side-active); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nav.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; text-align: center; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--red); color: #fff; line-height: 20px; }
.side .grow { flex: 1; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 10px; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #fff; }
.avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; text-transform: uppercase; }
.user-card .who { min-width: 0; line-height: 1.25; } .user-card .who b { display: block; overflow: hidden; text-overflow: ellipsis; } .user-card .who span { font-size: 11px; opacity: .7; }
.user-card .icon-btn { margin-left: auto; color: var(--side-ink); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.search-trigger { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--faint); cursor: pointer; font: inherit; text-align: left; }
.search-trigger:hover { border-color: var(--brand); } .search-trigger span { flex: 1; }
kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font: 600 11px/1.5 var(--font); }
.topbar .sp { flex: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--ink); }
.main { padding: 26px 28px 80px; width: 100%; max-width: 1440px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; gap: 4px; }
  .side .brand { padding: 0 8px 0 4px; } .side .brand small, .nav-title, .user-card .who, .side .grow { display: none; }
  .nav { padding: 7px 10px; } .nav.active::before { display: none; } .user-card { margin: 0 0 0 auto; padding: 4px; background: none; }
  .topbar { padding: 10px 14px; } .main { padding: 18px 14px 80px; }
}

/* ---------- componentes base ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h .hint { color: var(--faint); font-size: 12px; }
.grid { display: grid; gap: 16px; } .stack-gap > * + * { margin-top: 16px; }
/* Separación vertical uniforme entre los bloques de una página (antes las tarjetas y rejillas se tocaban) */
.main > .grid, .main > .card, .main > .callout, .main > details { margin-bottom: 16px; }
.main > :last-child { margin-bottom: 0; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: stretch; }
.g-main > .card { display: flex; flex-direction: column; }
.g-main .donut-wrap { flex: 1; justify-content: center; align-content: center; }
@media (max-width: 1100px) { .g-main { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .g-2 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.tight { gap: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 600 13px/1.4 var(--font); cursor: pointer; transition: transform .1s, border-color .15s, box-shadow .15s, background .15s; text-decoration: none !important; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--brand); box-shadow: 0 2px 10px -4px color-mix(in srgb, var(--brand) 60%, transparent); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ghost { background: transparent; } .btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; } .btn.lg { padding: 11px 20px; font-size: 14px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; max-width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; accent-color: var(--brand); }
textarea { width: 100%; resize: vertical; }
label.field { display: grid; gap: 5px; margin-bottom: 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
label.field input, label.field select, label.field textarea { font-weight: 400; font-size: 14px; }
.switch { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; color: var(--muted); font: 600 12.5px var(--font); cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-weight: 650; font-size: 12px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-phishing, .b-confirmed { background: var(--red-soft); color: var(--red); } .b-suspicious { background: var(--amber-soft); color: var(--amber); } .b-low { background: var(--green-soft); color: var(--green); }
.b-new { background: var(--blue-soft); color: var(--brand); } .b-false_positive, .b-role, .b-off { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.b-new.hot::before { animation: pulse 1.6s infinite; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
th.sort { cursor: pointer; user-select: none; } th.sort:hover { color: var(--ink); }
tbody tr { transition: background .12s; } tbody tr.click { cursor: pointer; } tbody tr.click:hover, tbody tr.sel { background: color-mix(in srgb, var(--brand) 7%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
td.wrap { overflow-wrap: anywhere; } .table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.cell-2 b { display: block; font-weight: 600; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cell-2 span { color: var(--muted); font-size: 12px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 46px 20px; color: var(--muted); text-align: center; } .empty svg { width: 54px; height: 54px; color: var(--faint); opacity: .8; } .empty b { color: var(--ink); font-size: 15px; }

/* ---------- KPIs, anillos y gráficos ---------- */
.kpi { display: flex; gap: 14px; align-items: center; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--tint, var(--blue-soft)); opacity: .55; }
.kpi .ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--tint, var(--blue-soft)); color: var(--ink-c, var(--brand)); position: relative; z-index: 1; }
.kpi .ico svg { width: 22px; height: 22px; }
.kpi .t { position: relative; z-index: 1; min-width: 0; } .kpi .n { font-size: 28px; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12.5px; } .kpi .s { color: var(--faint); font-size: 11.5px; }
.t-red { --tint: var(--red-soft); --ink-c: var(--red); } .t-amber { --tint: var(--amber-soft); --ink-c: var(--amber); } .t-green { --tint: var(--green-soft); --ink-c: var(--green); } .t-violet { --tint: var(--violet-soft); --ink-c: var(--brand-2); }
.kpi.alert .n { color: var(--red); }

.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; } .ring .trk { stroke: var(--ring-track); fill: none; } .ring .val { fill: none; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1); }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; line-height: 1.05; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring .num small { display: block; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 2px; }
.v-phishing .val { stroke: var(--red); } .v-suspicious .val { stroke: var(--amber); } .v-low .val { stroke: var(--green); }
.v-phishing .num { color: var(--red); } .v-suspicious .num { color: var(--amber); } .v-low .num { color: var(--green); }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: url(#barGrad); transition: opacity .15s; } .chart .bar:hover { opacity: .75; }
.chart .grid-l { stroke: var(--line); stroke-dasharray: 3 4; } .chart text { fill: var(--faint); font-size: 10px; font-family: var(--font); }
.chart .area { fill: url(#areaGrad); } .chart .line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.stackbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--ring-track); }
.stackbar > div { transition: width .8s cubic-bezier(.2, .8, .2, 1); } .s-phishing { background: var(--red); } .s-suspicious { background: var(--amber); } .s-low { background: var(--green); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); } .legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat .hl { font-size: 10px; color: var(--faint); } .heat .hh { font-size: 9px; color: var(--faint); text-align: center; }
.hc { aspect-ratio: 1; border-radius: 4px; background: var(--ring-track); } .hc.l1 { background: color-mix(in srgb, var(--brand) 28%, var(--ring-track)); } .hc.l2 { background: color-mix(in srgb, var(--brand) 55%, var(--ring-track)); } .hc.l3 { background: color-mix(in srgb, var(--brand) 80%, var(--ring-track)); } .hc.l4 { background: var(--brand); }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 44px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.bar-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bar-row .mt { height: 7px; border-radius: 99px; background: var(--ring-track); overflow: hidden; } .bar-row .mt > div { height: 100%; border-radius: 99px; background: var(--grad); } .bar-row .pc { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* campañas */
.camp { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; } .camp:last-child { border-bottom: 0; } .camp:hover .camp-v { color: var(--brand); }
.camp .cn { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-weight: 750; font-size: 17px; }
.camp .camp-v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; } .camp .camp-k { color: var(--muted); font-size: 12px; }

/* ---------- detalle del reporte ---------- */
.hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hero .info { flex: 1; min-width: 240px; }
.hero h1 { overflow-wrap: anywhere; } .hero .meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.action-bar { position: sticky; bottom: 14px; z-index: 10; margin-top: 16px; padding: 10px 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.envelope { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.envelope .er { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); } .envelope .er:last-child { border-bottom: 0; }
.envelope .er span { color: var(--faint); font-size: 12px; padding-top: 1px; } .envelope .er div { overflow-wrap: anywhere; }
.finding { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); } .finding:last-child { border-bottom: 0; }
.fpts { width: 52px; height: 34px; display: grid; place-items: center; border-radius: 9px; font-weight: 750; font-variant-numeric: tabular-nums; background: var(--red-soft); color: var(--red); }
.fpts.neg { background: var(--green-soft); color: var(--green); } .fpts.zero { background: var(--surface-2); color: var(--muted); }
.finding .ft { font-weight: 600; } .finding .fd { margin-top: 3px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.fam { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; vertical-align: 1px; background: var(--blue-soft); color: var(--brand); }
.fam.f-Identidad { background: var(--violet-soft); color: var(--brand-2); } .fam.f-Enlaces { background: var(--red-soft); color: var(--red); } .fam.f-Adjuntos { background: var(--amber-soft); color: var(--amber); } .fam.f-Texto { background: var(--green-soft); color: var(--green); } .fam.f-Reputación { background: var(--red-soft); color: var(--red); } .fam.f-Atenuantes { background: var(--green-soft); color: var(--green); }
.share { height: 5px; margin-top: 8px; border-radius: 99px; background: var(--ring-track); overflow: hidden; } .share > div { height: 100%; border-radius: 99px; background: var(--red); opacity: .7; }
.ioc { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .ioc:last-child { border-bottom: 0; } .ioc .k { color: var(--muted); font-size: 12px; } .ioc code { overflow-wrap: anywhere; }
.defang { color: var(--red); }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); } .tl li { position: relative; padding: 0 0 14px 14px; } .tl li::before { content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); } .tl li.red::before { border-color: var(--red); } .tl li.green::before { border-color: var(--green); }
.tl .w { color: var(--faint); font-size: 12px; }
.note { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; } .note .who { font-size: 12px; color: var(--faint); margin-bottom: 2px; }
pre.block { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow: auto; background: var(--surface-2); border: 1px solid var(--line); padding: 12px; border-radius: 10px; margin: 8px 0 0; }
details { margin-top: 10px; } summary { cursor: pointer; color: var(--muted); font-weight: 650; padding: 4px 0; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; align-items: flex-start; } .callout.warn { background: var(--amber-soft); color: var(--amber); } .callout.info { background: var(--blue-soft); color: var(--brand); } .callout.bad { background: var(--red-soft); color: var(--red); } .callout > div { color: var(--ink); }
.rel { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; } .rel:last-child { border-bottom: 0; } .rel:hover b { color: var(--brand); }
.rel .rs { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 750; font-size: 13px; } .rel b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs.v-phishing { background: var(--red-soft); color: var(--red); } .rs.v-suspicious { background: var(--amber-soft); color: var(--amber); } .rs.v-low { background: var(--green-soft); color: var(--green); }

/* ---------- modo revisión ---------- */
.triage { max-width: 920px; margin: 0 auto; }
.tri-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; } .tri-prog { flex: 1; height: 8px; border-radius: 99px; background: var(--ring-track); overflow: hidden; } .tri-prog > div { height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s ease; }
.tri-card { animation: rise .25s ease both; } .tri-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; } .tri-actions .btn { padding: 14px; font-size: 14px; flex-direction: column; gap: 2px; } .tri-actions kbd { margin-top: 2px; background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .3); color: inherit; }
.tri-actions .btn:not(.danger):not(.ok) kbd { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.done { display: grid; justify-items: center; gap: 10px; padding: 60px 20px; text-align: center; } .done h2 { font-size: 22px; } canvas.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* ---------- paleta de comandos y diálogos ---------- */
.pal-back { position: fixed; inset: 0; z-index: 80; display: grid; align-items: start; justify-items: center; padding-top: 12vh; background: rgba(6, 10, 25, .55); backdrop-filter: blur(3px); animation: rise .15s ease both; }
.pal { width: min(620px, calc(100% - 28px)); border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--faint); } .pal-in input { flex: 1; border: 0; background: transparent; font-size: 16px; padding: 0; box-shadow: none !important; }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 8px; } .pal-sec { padding: 8px 10px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); } .pal-item.active { background: color-mix(in srgb, var(--brand) 13%, transparent); } .pal-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pal-item .h { color: var(--faint); font-size: 12px; }
.pal-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; background: var(--surface-2); }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--surface); color: var(--ink); max-width: 460px; width: calc(100% - 32px); box-shadow: var(--shadow-lg); } dialog::backdrop { background: rgba(6, 10, 25, .55); backdrop-filter: blur(3px); }
dialog h2 { margin-bottom: 10px; font-size: 17px; } dialog p { margin-bottom: 16px; color: var(--muted); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; margin-bottom: 16px; }
#toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 100; max-width: 400px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: rise .25s ease both; } .toast.ok svg { color: var(--green); } .toast.err svg { color: var(--red); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); }
.login-hero { position: relative; overflow: hidden; display: grid; align-content: center; gap: 22px; padding: 56px; color: #fff; background: linear-gradient(120deg, #0b1230, #1b2a7a, #5a2fd1, #1b2a7a); background-size: 300% 300%; animation: drift 18s ease infinite; }
.login-hero::before, .login-hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; } .login-hero::before { width: 360px; height: 360px; left: -80px; top: -80px; background: #3b82ff; } .login-hero::after { width: 320px; height: 320px; right: -60px; bottom: -60px; background: #b04dff; }
.login-hero > * { position: relative; z-index: 1; } .login-hero img { width: 92px; height: 92px; animation: floaty 6s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.login-hero h1 { font-size: 38px; line-height: 1.1; letter-spacing: -.02em; } .login-hero p { max-width: 460px; font-size: 16px; opacity: .85; }
.login-hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; } .login-hero li { display: flex; gap: 12px; align-items: center; opacity: .92; } .login-hero li svg { padding: 6px; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .14); }
.login-side { display: grid; place-items: center; padding: 32px; } .login-card { width: 100%; max-width: 380px; animation: rise .45s ease both; } .login-card h2 { font-size: 24px; margin-bottom: 4px; letter-spacing: -.01em; } .login-card .muted { margin-bottom: 22px; }
.err { min-height: 20px; color: var(--red); font-size: 13px; margin-bottom: 8px; }
@media (max-width: 860px) { .login-page { grid-template-columns: 1fr; } .login-hero { display: none; } }
.rule-fam { margin: 22px 0 6px; display: flex; align-items: center; gap: 10px; } .rule-fam::after { content: ""; flex: 1; height: 1px; background: var(--line); }
td.num input { width: 74px; }

/* ---------- donut y retoques ---------- */
.donut { transform: rotate(-90deg); display: block; }
.donut circle { fill: none; transition: stroke-dasharray .8s ease; }
.donut .sg-track { stroke: var(--ring-track); } .donut .sg-phishing { stroke: var(--red); } .donut .sg-suspicious { stroke: var(--amber); } .donut .sg-low { stroke: var(--green); }
.donut-c { position: relative; display: inline-grid; place-items: center; }
.donut-t { position: absolute; display: grid; text-align: center; line-height: 1.1; } .donut-t b { font-size: 26px; font-weight: 750; } .donut-t span { font-size: 11px; color: var(--muted); }
.cell-risk { display: flex; align-items: center; gap: 10px; }
.tag { display: inline-block; padding: 0 7px; border-radius: 6px; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.spacer { flex: 1; }
.kbd-hint { color: var(--faint); font-size: 12px; }
.file-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); transition: border-color .15s, background .15s; }
.file-drop.over { border-color: var(--brand); background: var(--blue-soft); }
.stat-pill { display: inline-flex; gap: 6px; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut-wrap .legend { flex-direction: column; gap: 8px; }
.stack-gap > * + * { margin-top: 16px; }
.big { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
