*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0a0f; --bg-2: #12121a; --bg-3: #1a1a2e;
  --surface: rgba(255,255,255,0.03); --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08); --border-2: rgba(255,255,255,0.15);
  --text: #f0f0f5; --text-dim: #9a9ab0; --text-dimmer: #66667a;
  --accent-1: #00f0ff; --accent-3: #a855f7; --ok: #00ff88; --warn: #ffdd00; --bad: #ff5a6e;
  --grad-1: linear-gradient(135deg, #00f0ff, #a855f7);
  --radius: 16px; --radius-sm: 10px;
  --font-display: 'Syne', sans-serif; --font-body: 'Space Grotesk', sans-serif;
}
html { color-scheme: dark; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent-1); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; }
.small { font-size: 0.75rem; word-break: break-all; }
.muted { color: var(--text-dim); }
.hint { color: var(--text-dim); font-size: 0.85rem; margin-top: 8px; }
.bad { color: var(--bad); }
[hidden] { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: rgba(10,10,15,0.8); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; letter-spacing: 0.04em; }
.brand-mark { background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topnav a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; }
.topnav a:hover { color: var(--text); }
.quota { font-size: 0.8rem; color: var(--text-dimmer); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 16px 64px; flex: 1; }
.foot { text-align: center; color: var(--text-dimmer); font-size: 0.8rem; padding: 24px 16px; border-top: 1px solid var(--border); }
.foot a { color: var(--text-dim); }

h1, h2 { font-family: var(--font-display); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; margin-bottom: 10px; }
h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin: 18px 0 8px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 100px; border: 1px solid transparent; background: var(--grad-1); color: #000; font: 600 0.9rem var(--font-body); cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent-1); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* acceso */
.auth-card { max-width: 560px; margin: 24px auto; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 24px; padding: 32px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 6px; background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--text-dim); margin-bottom: 20px; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { flex: 1; min-width: 120px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-dim); font: 500 0.85rem var(--font-body); cursor: pointer; }
.tab.active { color: var(--text); border-color: var(--accent-1); background: var(--surface-2); }
.form { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-dim); }
input, select { background: var(--bg); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); font: 0.95rem var(--font-body); }
input:focus, select:focus { outline: 2px solid var(--accent-1); outline-offset: 1px; }
.msg { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* pasos */
.steps { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.step .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad-1); color: #000; font-size: 0.8rem; margin-right: 6px; }
.drop { border: 2px dashed var(--border-2); border-radius: var(--radius); padding: 32px 16px; text-align: center; cursor: pointer; color: var(--text); transition: border-color 0.2s; }
.drop:hover, .drop.over { border-color: var(--accent-1); }
.preview { width: 100%; max-height: 360px; background: #000; border-radius: var(--radius-sm); margin: 10px 0; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.range input[type=range] { padding: 0; accent-color: var(--accent-1); }
.range output { color: var(--text); font-weight: 600; }
.selection { margin-top: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 0.9rem; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--text); font-size: 0.9rem; margin-bottom: 14px; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.progress { position: relative; height: 26px; background: var(--surface-2); border-radius: 100px; overflow: hidden; margin-top: 14px; }
.progress .bar { position: absolute; inset: 0 auto 0 0; background: var(--grad-1); transition: width 0.3s; }
.progress .label { position: relative; display: block; text-align: center; line-height: 26px; font-size: 0.8rem; mix-blend-mode: difference; }

/* lista */
.job-list { display: flex; flex-direction: column; gap: 8px; }
.job { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.job:hover { border-color: var(--border-2); }
.st { font-size: 0.75rem; padding: 3px 10px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border-2); justify-self: start; }
.st-done, .st-active { color: var(--ok); border-color: rgba(0,255,136,0.4); }
.st-error, .st-rejected, .st-suspended { color: var(--bad); border-color: rgba(255,90,110,0.4); }
.st-processing, .st-queued, .st-collecting, .st-uploading, .st-pending, .st-approved { color: var(--warn); border-color: rgba(255,221,0,0.35); }
.back { display: inline-block; margin-bottom: 16px; color: var(--text-dim); text-decoration: none; }

/* resultado */
.person { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.person-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.person-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; }
.pill { font-size: 0.75rem; padding: 3px 10px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border-2); }
.pill-real { border-color: rgba(0,240,255,0.4); color: var(--accent-1); }
.kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.kv dt { color: var(--text-dim); }
.kv dd { text-align: right; }
.conf { font-size: 0.7rem; padding: 1px 6px; border-radius: 6px; margin-left: 4px; white-space: nowrap; }
.conf-alta { background: rgba(0,255,136,0.12); color: var(--ok); }
.conf-media { background: rgba(255,221,0,0.12); color: var(--warn); }
.conf-baja { background: rgba(255,90,110,0.12); color: var(--bad); }
.marks { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; }
.mark { padding: 10px 12px; background: var(--surface-2); border-left: 3px solid var(--accent-3); border-radius: 6px; }
.person-face { align-self: start; }
.no-face { aspect-ratio: 5 / 6; display: grid; place-items: center; text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text-dim); }

/* persianilla */
.revealer { position: relative; aspect-ratio: 5 / 6; border-radius: var(--radius-sm); overflow: hidden; cursor: ew-resize; user-select: none; touch-action: pan-y; background: #000; }
.revealer:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; }
.revealer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.rv-curtain { position: absolute; inset: 0; }
.rv-handle { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent-1); box-shadow: 0 0 12px var(--accent-1); pointer-events: none; }
.rv-handle span { position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent-1); }
.rv-handle span::before { content: "‹ ›"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.75rem; color: var(--accent-1); }
.rv-tag { position: absolute; bottom: 8px; font-size: 0.68rem; padding: 3px 8px; border-radius: 6px; background: rgba(0,0,0,0.7); pointer-events: none; }
.rv-tag-l { left: 8px; }
.rv-tag-r { right: 8px; }

/* admin */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--text-dim); font-weight: 500; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions select { padding: 5px 8px; font-size: 0.8rem; }

@media (max-width: 760px) {
  .grid2, .range, .kvs { grid-template-columns: 1fr; }
  .person { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; }
  .auth-card { padding: 22px 16px; }
  .panel { padding: 18px 16px; }
}
