/* SocialShield Awareness Trainer — Dark mode */
:root {
  --bg: #0b1020;
  --bg-2: #11182c;
  --surface: #151d33;
  --surface-2: #1b2540;
  --border: #26324f;
  --text: #e6ebf5;
  --muted: #8d9ab5;
  --accent: #4f8cff;
  --accent-2: #7c5cff;
  --best: #22c55e;
  --safe: #f59e0b;
  --bad: #ef4444;
  --flag: #ff4d6d;
  --phishing: #4f8cff;
  --smishing: #a855f7;
  --vishing: #f97316;
  --whatsapp: #25d366;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2550 0%, transparent 60%), var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .86em; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
h1, h2, h3 { line-height: 1.25; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar & navegación ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px; border-bottom: 1px solid var(--border); background: rgba(11, 16, 32, .85);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { font-size: 28px; }
.sim-tag { font-size: .75rem; color: var(--safe); }
.who { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 999px; font-size: .82rem; }

.modules { display: flex; gap: 8px; padding: 14px 24px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.mod-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px;
}
.mod-btn small { background: var(--surface-2); border-radius: 999px; padding: 0 8px; color: var(--muted); }
.mod-btn:hover { border-color: var(--accent); }
.mod-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.mod-btn.active small { background: rgba(255, 255, 255, .2); color: #fff; }
.mod-full { margin-left: auto; border-color: var(--accent-2); }

main { max-width: 1320px; margin: 0 auto; padding: 24px; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px; }

/* ---------- Bienvenida ---------- */
.welcome h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 8px 0; }
.lead { color: #c4cde0; max-width: 820px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 24px 0; }
.card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card span { color: var(--muted); font-size: .9rem; }
.card em { color: var(--accent); font-style: normal; font-size: .85rem; margin-top: auto; }
.card-icon { font-size: 30px; }
.card-full { border-color: var(--accent-2); background: linear-gradient(135deg, #1f1a44, var(--surface)); }
.welcome-tip { color: var(--muted); }

/* ---------- Escenario ---------- */
.progress-wrap { margin-bottom: 16px; }
.progress-label { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }

.stage-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
.panel { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 4px; }
.brief, .decide, .feedback { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.brief-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.tag-phishing { border-color: var(--phishing); color: var(--phishing); }
.tag-smishing { border-color: var(--smishing); color: var(--smishing); }
.tag-vishing { border-color: var(--vishing); color: var(--vishing); }
.tag-whatsapp { border-color: var(--whatsapp); color: var(--whatsapp); }
.context { font-size: 1rem; margin: 12px 0 8px; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }
.decide h2 { margin: 0 0 12px; font-size: 1.05rem; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.action-btn {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; transition: border-color .15s, background .15s;
}
.action-btn:hover:not(:disabled) { border-color: var(--accent); background: #213058; }
.action-btn:disabled { opacity: .55; }
.action-btn.chosen { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 140, 255, .35); }
.action-key { flex: 0 0 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-2); font-weight: 700; color: var(--accent); }

/* ---------- Feedback forense ---------- */
.feedback h3 { font-size: .98rem; margin: 18px 0 6px; }
.verdict { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid; }
.verdict-icon { font-size: 28px; }
.verdict strong { display: block; font-size: 1.08rem; }
.verdict .pts { font-size: .85rem; color: var(--muted); }
.v-best { border-color: var(--best); background: rgba(34, 197, 94, .1); }
.v-safe { border-color: var(--safe); background: rgba(245, 158, 11, .1); }
.v-compromised { border-color: var(--bad); background: rgba(239, 68, 68, .12); }
.technique { font-size: .9rem; }
.chosen-feedback { background: var(--bg-2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; }
.flags { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.flags li { display: flex; gap: 10px; padding: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid transparent; transition: border-color .15s; }
.flags li:hover { border-color: var(--flag); }
.flags p { margin: 2px 0 0; color: #c4cde0; font-size: .88rem; }
.flag-num { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--flag); color: #fff; font-weight: 700; font-size: .8rem; }
.protocol { margin: 16px 0; padding: 12px 14px; border-radius: 10px; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .4); }
.protocol h3 { margin-top: 0; }
.protocol ul { margin: 0 0 8px; padding-left: 20px; }

/* Red flags sobre el artefacto */
.rf { outline: 2px dashed var(--flag) !important; outline-offset: 2px; position: relative; background-color: rgba(255, 77, 109, .1); border-radius: 4px; }
.rf-focus { outline: 3px solid var(--flag) !important; background-color: rgba(255, 77, 109, .28) !important; }
.rf-marker {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; vertical-align: middle;
  border-radius: 50%; border: 0; background: var(--flag); color: #fff; font: 700 11px/1 system-ui, sans-serif;
  box-shadow: 0 0 0 3px rgba(255, 77, 109, .3); animation: pop .3s ease-out;
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #fff; padding: 11px 18px; border-radius: 10px; font-weight: 600; }
.btn-ghost { background: transparent; border: 1px solid var(--border); padding: 9px 16px; border-radius: 10px; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-mini { background: rgba(255, 255, 255, .12); border: 0; border-radius: 8px; padding: 3px 8px; font-size: .75rem; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--border); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); z-index: 50; max-width: 90vw; }

/* ---------- Tooltip de enlaces ---------- */
.mlink, .mcta, .qr, .wa-link { position: relative; }
.tip {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 10; min-width: 260px; max-width: 420px;
  background: #0a0f1d; color: var(--text); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px;
  box-shadow: var(--shadow); font-size: .8rem; line-height: 1.4; text-align: left; font-weight: 400;
  opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .12s, transform .12s;
}
.tip-label { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.tip code { color: #ffd479; }
.mlink:hover .tip, .mlink:focus .tip, .mlink.pinned .tip,
.mcta:hover .tip, .mcta:focus .tip, .mcta.pinned .tip,
.qr:hover .tip, .qr:focus .tip, .qr.pinned .tip,
.wa-link:hover .tip, .wa-link:focus .tip, .wa-link.pinned .tip { opacity: 1; transform: none; }

/* ---------- Mock: cliente de correo ---------- */
.mock { border-radius: var(--radius); box-shadow: var(--shadow); }
.mail { background: #f4f6fb; color: #1d2433; overflow: visible; border: 1px solid var(--border); }
.mail-appbar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: #1f3b73; color: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.mail-app-title { font-weight: 600; }
.mail-search { margin-left: auto; background: rgba(255, 255, 255, .15); padding: 4px 14px; border-radius: 6px; font-size: .85rem; }
.mail-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: 520px; }
.mail-folders { background: #e8ecf5; padding: 12px 8px; font-size: .86rem; border-radius: 0 0 0 var(--radius); }
.folder { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 6px; color: #3b4660; }
.folder.active { background: #d3dcf0; font-weight: 600; color: #1f3b73; }
.mail-msg { padding: 16px 22px 40px; position: relative; }
.ext-banner { background: #fff4d6; border: 1px solid #f2c94c; color: #6b4e00; padding: 7px 10px; border-radius: 6px; font-size: .8rem; margin-bottom: 12px; }
.mail-subject { font-size: 1.2rem; margin: 0 0 12px; color: #111827; }
.mail-from { display: flex; gap: 10px; align-items: center; }
.mail-from .avatar { width: 40px; height: 40px; border-radius: 50%; background: #1f3b73; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.from-lines { flex: 1; min-width: 0; }
.from-addr { color: #4b5563; word-break: break-all; }
.mail-from .muted, .mail .muted { color: #6b7280; }
.mail-date { white-space: nowrap; }
.mail-tools { margin: 12px 0 6px; }
.mail .btn-ghost { border-color: #b8c3dc; color: #1f3b73; background: #fff; }
.mail-headers { background: #0f1629; color: #d6deef; border-radius: 8px; padding: 10px 12px; font: .78rem/1.5 ui-monospace, Consolas, monospace; margin: 6px 0 10px; }
.mail-headers-title { color: #8d9ab5; margin-bottom: 6px; font-family: system-ui, sans-serif; }
.hdr-line { padding: 2px 4px; word-break: break-all; }
.hdr-k { color: #7fb0ff; }
.mail-body { border-top: 1px solid #dde3ee; margin-top: 10px; padding-top: 6px; color: #1f2937; }
.mail-sig { white-space: pre-line; color: #6b7280; font-size: .88rem; border-top: 1px dashed #d1d8e6; padding-top: 8px; }
.mlink { color: #1a56db; text-decoration: underline; cursor: pointer; }
.cta-wrap { margin: 18px 0; }
.mcta { display: inline-block; background: #0f6cbd; color: #fff; padding: 10px 22px; border-radius: 4px; text-decoration: none; font-weight: 600; cursor: pointer; }
.qr-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 12px 0; }
.qr { display: inline-block; cursor: pointer; border-radius: 6px; }
.qr-svg { width: 150px; height: 150px; display: block; border: 1px solid #cbd5e1; border-radius: 6px; }
.qr-note { color: #9ca3af; font-size: .72rem; }
.mail-status {
  position: absolute; left: 0; bottom: 0; max-width: 100%; background: #e5e7eb; color: #374151; font-size: .75rem;
  padding: 2px 8px; border-radius: 0 6px 0 var(--radius); font-family: ui-monospace, Consolas, monospace; word-break: break-all;
}
.mail-status:empty { display: none; }
.mail .rf { background-color: rgba(255, 77, 109, .14); }
.mail .mcta.rf { background-color: #0f6cbd; }
.phone-overlay { transition: transform .25s, opacity .25s; cursor: pointer; }
.phone-overlay.minimized { transform: translateY(calc(-100% + 34px)); opacity: .55; }

/* ---------- Mock: teléfono ---------- */
.phone-wrap { display: flex; justify-content: center; box-shadow: none; }
.phone {
  position: relative; width: 370px; max-width: 100%; height: 720px; border-radius: 44px; padding: 14px;
  background: #05070d; border: 2px solid #2a3350; box-shadow: var(--shadow), inset 0 0 0 6px #10131d;
  display: flex; flex-direction: column;
}
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: #000; border-radius: 20px; z-index: 5; }
.phone-status { display: flex; justify-content: space-between; padding: 8px 24px 6px; font-size: .78rem; font-weight: 600; }
.phone-screen { position: relative; flex: 1; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; background: #000; }
.phone-overlay { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 8; }
.phone-overlay:empty { display: none; }

/* SMS */
.sms .phone-screen { background: #000; }
.sms-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #111; border-bottom: 1px solid #222; }
.back { font-size: 26px; color: #0a84ff; line-height: 1; }
.sms-avatar { width: 36px; height: 36px; border-radius: 50%; background: #5b6476; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.sms-hinfo { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sms-hicons { color: #0a84ff; }
.sms-thread { flex: 1; overflow-y: auto; padding: 10px 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.sms-date { text-align: center; color: #8e8e93; font-size: .72rem; margin: 10px 0 2px; }
.sms-row { display: flex; flex-direction: column; }
.sms-row.out { align-items: flex-end; }
.sms-bubble { max-width: 84%; padding: 8px 12px; border-radius: 18px; font-size: .9rem; position: relative; }
.sms-bubble.in { background: #26262a; border-bottom-left-radius: 6px; }
.sms-bubble.out { background: #0a84ff; border-bottom-right-radius: 6px; }
.sms-link { color: #5eb1ff; text-decoration: underline; word-break: break-all; }
.sms-time { display: block; text-align: right; font-size: .66rem; color: #9a9aa0; margin-top: 2px; }
.bubble-tools { margin-top: 6px; }
.link-inspector { margin-top: 6px; max-width: 92%; background: #10182b; border: 1px solid #2b3a5e; border-radius: 12px; padding: 10px; font-size: .78rem; }
.li-title { font-weight: 600; margin-bottom: 6px; color: #9cc1ff; }
.li-hops { margin: 0 0 8px; padding-left: 18px; }
.li-hops li { margin-bottom: 4px; }
.li-hops span { display: block; }
.og-card { background: #1b2540; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.og-domain { color: #8d9ab5; font-size: .7rem; text-transform: uppercase; }
.li-risk { margin-top: 6px; color: #ffb4b4; }
.sms-input, .wa-input { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #111; }
.fake-input { flex: 1; background: #1c1c1e; color: #8e8e93; border-radius: 18px; padding: 7px 14px; font-size: .85rem; }

/* Llamada */
.call .phone-screen { background: linear-gradient(180deg, #1d2b4a 0%, #0b0f1a 100%); }
.call-screen { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 34px 16px 22px; gap: 8px; text-align: center; }
.call-label { color: #c7d2e8; font-size: .9rem; }
.caller { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.call-avatar { width: 96px; height: 96px; border-radius: 50%; background: #3a4a70; display: grid; place-items: center; font-size: 2rem; font-weight: 700; }
.caller.small { flex-direction: row; gap: 10px; margin-top: 0; flex-wrap: wrap; justify-content: center; }
.caller.small .call-avatar { width: 42px; height: 42px; font-size: 1rem; }
.caller-name { font-size: 1.5rem; font-weight: 600; }
.caller.small .caller-name { font-size: 1.05rem; }
.caller-number { color: #c7d2e8; }
.caller.small .caller-number { font-size: .85rem; width: 100%; }
.call-buttons { margin-top: auto; display: flex; justify-content: space-around; width: 100%; }
.cb { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; }
.round { width: 66px; height: 66px; border-radius: 50%; border: 0; font-size: 28px; color: #fff; }
.round.accept { background: #30d158; }
.round.decline { background: #ff453a; transform: rotate(135deg); }
.round.ringing { animation: ring 1.2s infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, .6); } 50% { box-shadow: 0 0 0 16px rgba(48, 209, 88, 0); } }
.call-timer { color: #c7d2e8; font-size: .85rem; }
.transcript-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #8d9ab5; margin-top: 6px; }
.transcript { width: 100%; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 4px; }
.tl { background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 8px 10px; animation: fadein .35s; }
.tl.you { background: rgba(10, 132, 255, .22); align-self: flex-end; max-width: 80%; }
.tl-who { font-size: .7rem; color: #8d9ab5; }
.tl p { margin: 2px 0 0; font-size: .86rem; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.call-ctls { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.call-ctl { background: rgba(255, 255, 255, .1); border: 0; border-radius: 999px; padding: 5px 10px; font-size: .75rem; }
.call-ctl[aria-pressed="true"] { background: #0a84ff; }
.round.hang { width: 56px; height: 56px; font-size: 22px; margin-top: 6px; }
.call-screen.ended .round.hang { opacity: .4; }

.mfa-push, .otp-notif {
  background: rgba(30, 34, 48, .97); border: 1px solid #3a4566; border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6); animation: slidein .35s ease-out; color: #fff; cursor: default;
}
@keyframes slidein { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.mfa-push.bump { animation: bump .35s; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
.mfa-app { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.mfa-app .muted { margin-left: auto; }
.mfa-icon { width: 24px; height: 24px; border-radius: 6px; background: #0a84ff; display: grid; place-items: center; font-size: 13px; }
.mfa-title { font-weight: 700; margin: 8px 0 6px; }
.mfa-detail { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: .8rem; }
.mfa-detail dt { color: #8d9ab5; }
.mfa-detail dd { margin: 0; word-break: break-all; }
.mfa-counter { font-size: .78rem; color: #ffb020; margin: 8px 0; }
.mfa-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mfa-buttons button { border: 0; border-radius: 10px; padding: 9px; font-weight: 700; }
.mfa-deny { background: #3a3f52; }
.mfa-approve { background: #30d158; color: #062b12 !important; }
.otp-notif p { margin: 6px 0 0; font-size: .85rem; }

/* WhatsApp */
.wa .phone-screen { background: #0b141a; }
.wa-header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #1f2c34; cursor: pointer; text-align: left; }
.wa-back { font-size: 26px; color: #aebac1; line-height: 1; }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; position: relative; overflow: hidden; font-size: .9rem; }
.wa-avatar.big { width: 92px; height: 92px; font-size: 2rem; margin: 0 auto; }
.av-logo { font-size: 1.2rem; }
.av-photo { background: #2b6cb0; }
.av-photo-head { position: absolute; width: 40%; height: 40%; border-radius: 50%; background: #f1c9a5; top: 18%; left: 30%; }
.av-photo-body { position: absolute; width: 80%; height: 45%; border-radius: 50% 50% 0 0; background: #1a202c; bottom: -8%; left: 10%; }
.wa-hinfo { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.wa-name-row { display: flex; align-items: center; gap: 4px; }
.wa-name { font-weight: 600; color: #e9edef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-verified { background: #25d366; color: #0b141a; border-radius: 50%; width: 15px; height: 15px; font-size: 10px; display: grid; place-items: center; }
.wa-sub { display: flex; gap: 6px; flex-wrap: wrap; font-size: .72rem; color: #8696a0; }
.wa-phone { color: #aebac1; }
.wa-biz { background: rgba(255, 255, 255, .08); border-radius: 4px; padding: 0 5px; color: #aebac1; }
.wa-status { font-size: .72rem; color: #8696a0; }
.wa-status.typing { color: #25d366; }
.wa-icons { color: #aebac1; font-size: .85rem; white-space: nowrap; }
.wa-chat {
  flex: 1; overflow-y: auto; padding: 8px 10px 14px; display: flex; flex-direction: column; gap: 4px;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 18px 18px;
}
.wa-e2e { background: #182229; color: #ffd279; font-size: .7rem; text-align: center; border-radius: 8px; padding: 6px 10px; margin: 6px 8px; }
.wa-unknown { background: #182229; border-radius: 10px; padding: 10px; text-align: center; font-size: .78rem; color: #aebac1; margin: 4px 8px; }
.wa-unknown-num { color: #e9edef; font-weight: 600; margin: 4px 0; }
.wa-unknown-btns { display: flex; justify-content: center; gap: 24px; color: #00a884; font-weight: 600; margin-top: 4px; }
.wa-unknown-btns span:first-child { color: #f15c6d; }
.wa-date { align-self: center; background: #182229; color: #8696a0; font-size: .68rem; border-radius: 6px; padding: 3px 10px; margin: 8px 0 4px; }
.wa-row { display: flex; animation: fadein .3s; }
.wa-row.out { justify-content: flex-end; }
.wa-bubble { max-width: 86%; padding: 6px 8px 4px; border-radius: 8px; font-size: .86rem; color: #e9edef; position: relative; }
.wa-bubble.in { background: #202c33; border-top-left-radius: 0; }
.wa-bubble.out { background: #005c4b; border-top-right-radius: 0; }
.wa-text { white-space: pre-wrap; word-break: break-word; }
.wa-link { color: #53bdeb; text-decoration: underline; cursor: pointer; }
.wa-meta { float: right; margin: 6px 0 0 10px; font-size: .64rem; color: #8696a0; display: inline-flex; gap: 3px; align-items: center; }
.wa-checks { color: #8696a0; letter-spacing: -3px; }
.wa-checks.read { color: #53bdeb; }
.wa-og { background: #1a2329; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.wa-og-img { height: 90px; display: grid; place-items: center; font-size: 2.2rem; background: linear-gradient(135deg, #0f5132, #25d366); }
.wa-og-body { padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; font-size: .78rem; }
.wa-og-body span { color: #aebac1; }
.wa-og-body small { color: #8696a0; }
.wa-doc { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .2); border-radius: 6px; padding: 8px; min-width: 220px; }
.wa-doc-ico { width: 34px; height: 40px; border-radius: 4px; background: #c0392b; display: grid; place-items: center; font-size: .62rem; font-weight: 800; flex: none; }
.wa-doc-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-doc-name { word-break: break-all; font-size: .82rem; }
.wa-doc-info small { color: #8696a0; font-size: .7rem; }
.wa-doc-dl { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #8696a0; display: grid; place-items: center; color: #aebac1; flex: none; }
.wa-img { height: 150px; border-radius: 6px; margin-bottom: 6px; background: #f4f1ea; color: #333; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wa-img i { display: block; height: 7px; background: #d8d2c4; border-radius: 3px; }
.wa-img i:nth-child(3) { width: 70%; }
.inv-title { font-weight: 800; letter-spacing: .1em; font-size: .8rem; }
.inv-total { margin-top: auto; align-self: flex-end; font-weight: 800; color: #b91c1c; }
.wa-profile { position: absolute; inset: 0; background: #111b21; z-index: 7; padding: 30px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.wa-profile-close { position: absolute; top: 10px; left: 12px; background: none; border: 0; font-size: 1.2rem; color: #aebac1; }
.wa-p-name { font-size: 1.25rem; font-weight: 600; }
.wa-p-phone { color: #aebac1; }
.wa-p-biz, .wa-p-about { background: #182229; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.wa-p-actions { display: flex; flex-direction: column; gap: 8px; color: #f15c6d; text-align: left; padding: 10px; background: #182229; border-radius: 10px; }
.wa-input { background: #0b141a; }
.wa-input .fake-input { background: #1f2c34; color: #e9edef; }
.wa-mic { width: 40px; height: 40px; border-radius: 50%; background: #00a884; display: grid; place-items: center; }

/* ---------- Resumen ---------- */
.summary { max-width: 820px; margin: 0 auto; text-align: center; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; margin: 18px auto; display: grid; place-content: center; border: 10px solid var(--surface-2); }
.score-ring strong { font-size: 2.8rem; line-height: 1; }
.score-ring.good { border-color: var(--best); }
.score-ring.mid { border-color: var(--safe); }
.score-ring.bad { border-color: var(--bad); }
.sum-vectors { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 20px 0; text-align: left; }
.sum-vec { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--best)); }
.sum-list { list-style: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.sum-list li { background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; padding: 8px 12px; }
.sum-list .o-best { border-left-color: var(--best); }
.sum-list .o-safe { border-left-color: var(--safe); }
.sum-list .o-compromised { border-left-color: var(--bad); }
.sum-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* ---------- Dashboard ---------- */
.dash { max-width: 1320px; margin: 0 auto; padding: 24px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dash-tools select, .dash-tools input, .login input {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit;
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 18px 0; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.kpi strong { display: block; font-size: 1.8rem; }
.kpi span { color: var(--muted); font-size: .85rem; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 16px; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.box h2 { margin: 0 0 12px; font-size: 1.05rem; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; white-space: nowrap; }
.chart-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; margin-bottom: 10px; }
.chart-row svg { width: 100%; height: 22px; border-radius: 6px; background: var(--surface-2); }
.chart-inline { display: block; margin: 0; min-width: 120px; }
.wa-link .tip { min-width: 200px; max-width: 250px; }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg-best { background: var(--best); } .lg-safe { background: var(--safe); } .lg-bad { background: var(--bad); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; }
.pill.best { background: rgba(34, 197, 94, .18); color: #7ee2a2; }
.pill.safe { background: rgba(245, 158, 11, .18); color: #fcd37a; }
.pill.compromised { background: rgba(239, 68, 68, .18); color: #fca5a5; }
.warn { background: rgba(245, 158, 11, .12); border: 1px solid var(--safe); color: #fcd37a; padding: 10px 14px; border-radius: 10px; margin: 12px 0; }
.error { background: rgba(239, 68, 68, .12); border: 1px solid var(--bad); color: #fca5a5; padding: 10px 14px; border-radius: 10px; }
.login { max-width: 380px; margin: 10vh auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.empty { color: var(--muted); text-align: center; padding: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .stage-grid { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; overflow: visible; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  main, .dash { padding: 14px; }
  .topbar, .modules { padding: 10px 14px; }
  .mod-full { margin-left: 0; }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-folders { display: none; }
  .mail-msg { padding: 14px 14px 40px; }
  .phone { height: 640px; border-radius: 34px; padding: 10px; }
  .tip { min-width: 200px; max-width: 78vw; }
  .chart-row { grid-template-columns: 80px 1fr 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
