/*
 * sgs-transfer — Design System Premium SGS
 * Rebranded from sgs-factura (indigo accent #6366f1 dark / #4f46e5 light).
 * Dark-first, dual theme, Inter, premium WeTransfer-style public send.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ══════════════════════════════════════════════════════════════
   TOKENS — Dark (default)
   ══════════════════════════════════════════════════════════════ */
:root, [data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-tertiary: #242836;
  --bg-card: #1e2230;
  --bg-card-hover: #262b3a;
  --border-color: #2d3348;
  --border-subtle: rgba(255,255,255,.04);
  --text-primary: #e8eaf0;
  --text-secondary: #9ca3b8;
  --text-muted: #6b7394;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-muted: rgba(99,102,241,.12);
  --accent-glow: rgba(99,102,241,.25);
  --grad: linear-gradient(135deg, #6366f1 0%, #a855f7 52%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(236,72,153,.14));
  --success: #22c55e; --success-muted: rgba(34,197,94,.12);
  --warning: #f59e0b; --warning-muted: rgba(245,158,11,.12);
  --danger: #ef4444;  --danger-muted: rgba(239,68,68,.12);
  --info: #3b82f6;    --info-muted: rgba(59,130,246,.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.45);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  /* Compat aliases */
  --bg: var(--bg-primary); --bg2: var(--bg-secondary); --surface: var(--bg-tertiary);
  --text: var(--text-primary); --dim: var(--text-secondary); --border: var(--border-color);
  --err: var(--danger); --ok: var(--success); --warn: var(--warning);
}

/* ══════════════════════════════════════════════════════════════
   TOKENS — Light
   ══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-primary: #f4f6f9;
  --bg-secondary: #ffffff;
  --bg-tertiary: #edf0f5;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --border-color: #dfe3eb;
  --border-subtle: rgba(0,0,0,.04);
  --text-primary: #1a2332;
  --text-secondary: #4a5568;
  --text-muted: #8492a6;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-muted: rgba(79,70,229,.08);
  --accent-glow: rgba(79,70,229,.18);
  --grad: linear-gradient(135deg, #4f46e5 0%, #9333ea 52%, #db2777 100%);
  --grad-soft: linear-gradient(135deg, rgba(79,70,229,.12), rgba(219,39,119,.10));
  --success: #16a34a; --success-muted: rgba(22,163,74,.08);
  --warning: #d97706; --warning-muted: rgba(217,119,6,.08);
  --danger: #dc2626;  --danger-muted: rgba(220,38,38,.08);
  --info: #2563eb;    --info-muted: rgba(37,99,235,.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
}

/* ══════════════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
input, select, textarea, button, table { font-family: inherit; }
input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  background: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-primary);
  border-radius: var(--radius-sm); padding: .5rem .65rem; font-size: .8rem; width: 100%;
  box-sizing: border-box; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
::selection { background: var(--accent-muted); color: var(--accent); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

a, button, input, select, textarea, .card { transition: all .15s ease; }
.hidden { display: none !important; }
code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 4px; font-size: .82rem; }
[data-theme="light"] code { background: rgba(0,0,0,.06); }

/* ── Layout ────────────────────────────────────────────────── */
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.grow { flex: 1; }

/* ── App shell / topbar / content ──────────────────────────── */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-primary); }
.topbar {
  display: flex; align-items: center; gap: .9rem;
  height: 56px; padding: 0 1.5rem;
  background: var(--bg-secondary); border-bottom: 1px solid var(--border-color);
  position: sticky; top: 0; z-index: 100;
}
.topbar .brand {
  display: flex; align-items: center; gap: .55rem;
  font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em;
}
.topbar .brand i { font-size: 1.4rem; color: var(--accent); }
.topbar .brand b { color: var(--accent); font-weight: 800; }
.topbar nav { display: flex; align-items: center; gap: .25rem; }
.topbar nav a, .topbar .nav-link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .75rem; border-radius: 8px; cursor: pointer;
  font-size: .8rem; font-weight: 600; color: var(--text-secondary);
  text-decoration: none; transition: all .15s;
}
.topbar nav a:hover, .topbar .nav-link:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.topbar nav a.active, .topbar .nav-link.active { background: var(--accent-muted); color: var(--accent); }
.content { padding: 1.25rem 1.5rem; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent-muted); box-shadow: var(--shadow-md); }

/* ── Login ─────────────────────────────────────────────────── */
.login-wrap {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse at 30% 50%, var(--accent-glow) 0%, transparent 60%);
}
.login-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
}
.login-header {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; margin-bottom: .5rem;
}
.login-header i { font-size: 1.8rem; color: var(--accent); }
.login-sub { text-align: center; color: var(--text-muted); font-size: .82rem; margin-bottom: 1.5rem; }
.login-card label { display: block; font-size: .78rem; font-weight: 600; color: var(--text-muted); margin-bottom: .3rem; margin-top: .8rem; }
.login-card input {
  width: 100%; padding: .65rem .85rem; background: var(--bg-tertiary);
  border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: .9rem; outline: none;
}
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted); }
.error-msg { color: var(--danger); font-size: .78rem; min-height: 1.2em; margin: .5rem 0; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem;
  border-radius: 8px; font-weight: 600; font-size: .82rem; cursor: pointer;
  border: none; transition: all .15s; color: var(--text-primary);
  background: var(--bg-tertiary);
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn-accent { background: var(--grad); color: #fff; background-size: 140% 140%; box-shadow: 0 6px 18px var(--accent-glow); }
.btn-accent:hover:not(:disabled) { background-position: 100% 0; box-shadow: 0 10px 26px var(--accent-glow); filter: none; }
.btn-ghost { background: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-sm { padding: .3rem .6rem; font-size: .72rem; }
.full { width: 100%; justify-content: center; margin-top: 1rem; padding: .7rem; font-size: .9rem; }

/* ── Tables + badges ───────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
table th {
  padding: .55rem .7rem; text-align: left; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color); font-weight: 700; white-space: nowrap;
}
table td { padding: .5rem .7rem; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
table tr:hover td { background: var(--accent-muted); }
.mono { font-family: ui-monospace, 'Cascadia Code', monospace; }
.right { text-align: right; }

.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .55rem;
  border-radius: 20px; font-size: .68rem; font-weight: 700;
  background: var(--bg-tertiary); color: var(--text-muted);
}
.badge-success { background: var(--success-muted); color: var(--success); }
.badge-info    { background: var(--accent-muted);  color: var(--accent); }
.badge-muted   { background: var(--bg-tertiary);   color: var(--text-muted); }
.badge-danger  { background: var(--danger-muted);  color: var(--danger); }

/* ── Section / form helpers ────────────────────────────────── */
.section-head {
  display: flex; align-items: center; gap: .5rem;
  font-size: .95rem; font-weight: 700; margin-bottom: .75rem;
}
.section-head i { color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: .75rem; }
.form-field label { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .04em; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: .5rem .7rem; background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: 8px; color: var(--text-primary); font-size: .82rem; outline: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted);
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: fadeIn .15s ease;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: slideUp .2s ease;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border-color);
  font-size: 1rem; font-weight: 700;
}
.modal-head .close { cursor: pointer; color: var(--text-muted); font-size: 1.3rem; line-height: 1; }
.modal-head .close:hover { color: var(--text-primary); }
.modal-body { padding: 1.25rem 1.5rem; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: .6rem;
  padding: 1rem 1.5rem; border-top: 1px solid var(--border-color);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════════════════════════════════
   ENVÍO PÚBLICO — premium WeTransfer-style
   ══════════════════════════════════════════════════════════════ */
/* ── Stage: split-screen "Aurora" ───────────────────────────── */
body.send-page { min-height: 100vh; background: var(--bg-primary); }
.stage { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; width: 100%; }

/* Panel de marca con aurora animada */
.brand-panel {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 3.25rem 3.5rem; color: #fff; background: #07060f;
}
.brand-panel::before, .brand-panel::after {
  content: ""; position: absolute; z-index: -2; border-radius: 50%; filter: blur(72px);
}
.brand-panel::before {
  width: 62vmax; height: 62vmax; top: -22%; left: -16%; opacity: .85;
  background: radial-gradient(circle at 32% 32%, #7c3aed, transparent 60%),
              radial-gradient(circle at 70% 62%, #4f46e5, transparent 60%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.brand-panel::after {
  width: 52vmax; height: 52vmax; bottom: -24%; right: -12%; opacity: .8;
  background: radial-gradient(circle at 50% 50%, #db2777, transparent 60%),
              radial-gradient(circle at 28% 72%, #0891b2, transparent 55%);
  animation: drift2 27s ease-in-out infinite alternate;
}
.brand-panel .grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(7%,5%) scale(1.16); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-6%,-7%) scale(1.12); } }

.bp-mark { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; }
.bp-mark .chip { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(255,255,255,.13); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 1.25rem; }
.bp-hero h1 { font-size: clamp(2rem, 3.2vw, 2.9rem); line-height: 1.06; font-weight: 800; letter-spacing: -.035em; margin: 0 0 .9rem; }
.bp-hero p { font-size: 1rem; line-height: 1.55; color: rgba(255,255,255,.74); max-width: 32ch; }
.bp-hero .accentword { background: linear-gradient(90deg, #c4b5fd, #f5d0fe, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.bp-feats { display: flex; flex-wrap: wrap; gap: .5rem; }
.bp-feats span { font-size: .74rem; font-weight: 600; color: rgba(255,255,255,.85);
  padding: .4rem .75rem; border-radius: 99px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14); display: inline-flex; align-items: center; gap: .35rem; }
.bp-feats i { font-size: .95rem; opacity: .9; }
.bp-foot { display: flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 600;
  color: rgba(255,255,255,.5); letter-spacing: .02em; }
.bp-foot i { font-size: .95rem; }

/* Panel del formulario */
.form-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--bg-primary); }
.send-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); width: 100%; max-width: 430px;
  padding: 1.9rem; box-shadow: var(--shadow-lg);
}
.card-head { margin-bottom: 1.35rem; }
.card-head h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.send-card .send-tag { color: var(--text-muted); font-size: .82rem; margin-top: .25rem; }

/* Dropzone with big + circle */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: .65rem; text-align: center;
  border: 2px dashed var(--border-color); border-radius: var(--radius-lg);
  padding: 2rem 1.25rem; cursor: pointer;
  background: var(--bg-tertiary); color: var(--text-secondary);
  transition: border-color .2s, background .2s, transform .15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-muted); }
.dropzone.over {
  border-color: var(--accent); background: var(--accent-muted);
  transform: scale(1.01); box-shadow: 0 0 0 4px var(--accent-glow);
}
.dz-plus {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 2rem; font-weight: 300;
  box-shadow: 0 10px 26px var(--accent-glow); transition: transform .2s, box-shadow .2s;
}
.dropzone:hover .dz-plus, .dropzone.over .dz-plus { transform: translateY(-2px) scale(1.05); }
.dropzone .dz-title { font-weight: 700; color: var(--text-primary); font-size: .9rem; }
.dropzone .dz-hint { font-size: .74rem; color: var(--text-muted); }

/* File rows */
.file-list { margin: 1rem 0; display: flex; flex-direction: column; gap: .4rem; max-height: 220px; overflow-y: auto; }
.file-row {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .65rem; border-radius: var(--radius-sm);
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
}
.file-ic {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent-muted); color: var(--accent); font-size: 1.1rem;
}
.file-row .file-meta { flex: 1; min-width: 0; }
.file-row .file-name { font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-row .file-size { font-size: .7rem; color: var(--text-muted); }
.file-row .file-x { cursor: pointer; color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }
.file-row .file-x:hover { color: var(--danger); }

/* Progress bar with accent gradient */
.progress {
  width: 100%; height: 8px; border-radius: 99px; overflow: hidden;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  margin: 1rem 0 .25rem;
}
.progress > i {
  position: relative; display: block; height: 100%; width: 0%;
  background: var(--grad); border-radius: 99px; transition: width .25s ease; overflow: hidden;
}
.progress > i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }
.progress-label { text-align: center; font-size: .74rem; color: var(--text-muted); margin-bottom: .5rem; }

/* Voucher field */
.voucher-field { position: relative; margin-bottom: 1rem; }
.voucher-field label { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .04em; }
.voucher-field input {
  width: 100%; padding: .65rem 2.2rem .65rem .85rem;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: 8px; color: var(--text-primary); font-size: .9rem;
  font-family: ui-monospace, 'Cascadia Code', monospace; letter-spacing: .02em; outline: none;
  text-transform: uppercase;
}
.voucher-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted); }

/* Voucher validation state */
.vstate {
  position: absolute; right: .7rem; bottom: .65rem; font-size: 1.2rem; line-height: 1;
  display: none;
}
.vstate.ok  { display: block; color: var(--success); }
.vstate.bad { display: block; color: var(--danger); }
.voucher-field .vmsg { font-size: .72rem; margin-top: .35rem; min-height: 1em; }
.voucher-field .vmsg.ok  { color: var(--success); }
.voucher-field .vmsg.bad { color: var(--danger); }

/* Success state */
.success { text-align: center; padding: .5rem 0; animation: slideUp .25s ease; }
.success .success-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; border-radius: 50%; margin-bottom: .85rem;
  background: var(--grad); color: #fff; font-size: 2.5rem;
  box-shadow: 0 12px 30px var(--accent-glow);
  animation: pop .4s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .3rem; }
.success p { color: var(--text-muted); font-size: .82rem; margin-bottom: 1rem; }

/* Link box (share url) */
.linkbox {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .55rem .55rem .85rem; border-radius: 8px;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  margin-bottom: .75rem;
}
.linkbox input {
  flex: 1; border: none; background: transparent; padding: 0; color: var(--text-primary);
  font-size: .8rem; font-family: ui-monospace, 'Cascadia Code', monospace; outline: none;
}
.linkbox .btn { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */
#toasts { position: fixed; top: 68px; right: 1rem; z-index: 99999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: .55rem;
  padding: .65rem 1rem .65rem .8rem; border-radius: 10px;
  font-size: .8rem; font-weight: 600; color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  max-width: 340px; min-width: 200px; pointer-events: auto;
  opacity: 0; transform: translateX(48px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast i { font-size: 1.1rem; flex-shrink: 0; }
.toast span { flex: 1; line-height: 1.35; }
.toast.ok   { background: var(--success); }
.toast.err  { background: var(--danger); }
.toast.nfo  { background: var(--accent); }
.toast.warn { background: var(--warning); color: #1a1a1a; }
.toast.warn i { color: #1a1a1a; }

/* ── Empty state ───────────────────────────────────────────── */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty i { font-size: 2.5rem; margin-bottom: .4rem; display: block; opacity: .3; }

/* ── Opción "borrar al descargar" (envío) ──────────────────── */
.burn-opt {
  display: flex; align-items: flex-start; gap: .6rem;
  margin: .9rem 0 .2rem; padding: .7rem .8rem;
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); cursor: pointer; transition: border-color .15s, background .15s;
}
.burn-opt:hover { border-color: var(--accent-muted); }
.burn-opt input { width: 16px; height: 16px; margin-top: .15rem; accent-color: var(--accent); cursor: pointer; flex: none; }
.burn-opt > span { font-size: .82rem; font-weight: 600; color: var(--text-primary); display: flex; flex-direction: column; gap: .15rem; }
.burn-opt > span i { color: var(--accent); }
.burn-opt small { font-weight: 400; color: var(--text-muted); font-size: .72rem; }
.burn-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-muted); }

/* Campos de correo (envío) */
.mail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .9rem; }
.mail-field label { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
/* "requerido" en su propia línea → ambos labels miden 2 líneas y los inputs se alinean. */
.mail-field .opt,
.mail-field .req { display: block; font-weight: 600; text-transform: none; letter-spacing: 0; }
.mail-field .opt { font-weight: 400; color: var(--text-muted); }
.mail-field .req { color: var(--accent); }
@media (max-width: 520px) { .mail-fields { grid-template-columns: 1fr; } }

/* Aviso de burn en la página de descarga */
.burn-warn {
  display: flex; align-items: center; gap: .55rem;
  background: var(--warning-muted); border: 1px solid var(--warning);
  color: var(--warning); border-radius: var(--radius-md);
  padding: .65rem .8rem; font-size: .78rem; font-weight: 600; margin-bottom: .9rem;
}

/* ── Ilustración + animaciones del panel de marca ───────────── */
.bp-art {
  position: absolute; right: 5%; bottom: 9%; width: min(48%, 330px);
  z-index: -1; pointer-events: none;
  animation: floatY 7s ease-in-out infinite;
}
.bp-art svg { width: 100%; height: auto; filter: drop-shadow(0 26px 44px rgba(0,0,0,.5)); }
@keyframes floatY { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(-1.4deg); } }

.bp-art .cardTop { animation: floatY 5.5s ease-in-out .4s infinite; transform-origin: center; }
.bp-art .plane { animation: planeFly 8s ease-in-out infinite; transform-origin: center; }
@keyframes planeFly {
  0%,100% { transform: translate(0,0) rotate(0); }
  50% { transform: translate(-10px,-14px) rotate(-6deg); }
}
.bp-art .trail { stroke-dashoffset: 0; animation: dash 1.1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }
.bp-art .spark { animation: twinkle 3s ease-in-out infinite; }
.bp-art .s2 { animation-delay: .8s; }
.bp-art .s3 { animation-delay: 1.6s; }
@keyframes twinkle { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }

/* Entradas escalonadas */
.bp-mark { animation: fadeDown .6s ease both; }
.bp-hero h1 { animation: fadeUp .7s .08s ease both; }
.bp-hero p  { animation: fadeUp .7s .2s ease both; }
.bp-feats span { animation: fadeUp .6s ease both; }
.bp-feats span:nth-child(1){ animation-delay:.30s; }
.bp-feats span:nth-child(2){ animation-delay:.40s; }
.bp-feats span:nth-child(3){ animation-delay:.50s; }
.send-card { animation: cardIn .55s .12s ease both; }
@keyframes fadeUp   { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform:none; } }
@keyframes fadeDown { from { opacity:0; transform: translateY(-12px);} to { opacity:1; transform:none; } }
@keyframes cardIn   { from { opacity:0; transform: translateY(20px) scale(.985);} to { opacity:1; transform:none; } }

@media (prefers-reduced-motion: reduce) {
  .bp-art, .bp-art .cardTop, .bp-art .plane, .bp-art .trail, .bp-art .spark,
  .brand-panel::before, .brand-panel::after,
  .bp-mark, .bp-hero h1, .bp-hero p, .bp-feats span, .send-card { animation: none !important; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 920px) {
  .stage { grid-template-columns: 1fr; }
  .brand-panel {
    min-height: auto; padding: 2.25rem 1.75rem; gap: 1.4rem;
    flex-direction: column; justify-content: flex-start;
  }
  .bp-hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .bp-hero p { font-size: .9rem; }
  .form-panel { padding: 1.75rem 1rem 2.5rem; }
}
@media (max-width: 560px) {
  .brand-panel .bp-feats { display: none; }
  .brand-panel { padding: 1.75rem 1.5rem; }
}
@media (max-width: 768px) {
  .content { padding: .75rem .85rem; }
  .topbar { padding: 0 .85rem; }
  .form-row { grid-template-columns: 1fr; }
  .send-card { padding: 1.4rem; }
}
