/* Quadrator · estilos (v2 · azul) */
:root {
  --paper: #f3f6fc;          /* fondo */
  --paper-2: #e8eef9;        /* superficies hundidas */
  --card: #ffffff;
  --ink: #0f1b33;
  --ink-2: #44526e;
  --ink-3: #7c89a3;
  --line: #e3e9f4;
  --brand: #2563eb;
  --brand-2: #4f46e5;
  --brand-3: #06b6d4;
  --brand-ink: #ffffff;
  --brand-soft: #e3ecfe;
  --grad: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 52%, #0ea5e9 100%);
  --grad-soft: linear-gradient(135deg, #eef4ff 0%, #f1efff 55%, #e9f9fd 100%);
  --ok: #059669;
  --ok-soft: #dcfaee;
  --warn: #d97706;
  --warn-soft: #fff1d6;
  --bad: #e11d48;
  --bad-soft: #ffe4ea;
  --info: #2563eb;
  --info-soft: #e3ecfe;
  --violet: #7c3aed;
  --violet-soft: #efe7ff;
  --mute-soft: #edf1f8;
  --shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 8px 24px rgba(37, 99, 235, .07);
  --shadow-lg: 0 18px 40px -12px rgba(37, 70, 200, .45);
  --radius: 20px;
  --mono: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 72px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a1020; --paper-2: #121a2e; --card: #131c31; --ink: #eaf0ff; --ink-2: #b4c0da; --ink-3: #7d8aa6;
    --line: #223050; --brand: #5b8cff; --brand-2: #8b7bff; --brand-3: #22d3ee; --brand-soft: #1a2950;
    --grad: linear-gradient(135deg, #1e40af 0%, #4338ca 52%, #0e7490 100%);
    --grad-soft: linear-gradient(135deg, #14203d 0%, #1b1a3d 55%, #0f2731 100%);
    --ok: #34d399; --ok-soft: #0f2e25; --warn: #fbbf24; --warn-soft: #33270d; --bad: #fb7185; --bad-soft: #3a1420;
    --info: #7aa2ff; --info-soft: #172548; --violet: #a78bfa; --violet-soft: #241a45; --mute-soft: #1a2338;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-lg: 0 18px 40px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a1020; --paper-2: #121a2e; --card: #131c31; --ink: #eaf0ff; --ink-2: #b4c0da; --ink-3: #7d8aa6;
  --line: #223050; --brand: #5b8cff; --brand-2: #8b7bff; --brand-3: #22d3ee; --brand-soft: #1a2950;
  --grad: linear-gradient(135deg, #1e40af 0%, #4338ca 52%, #0e7490 100%);
  --grad-soft: linear-gradient(135deg, #14203d 0%, #1b1a3d 55%, #0f2731 100%);
  --ok: #34d399; --ok-soft: #0f2e25; --warn: #fbbf24; --warn-soft: #33270d; --bad: #fb7185; --bad-soft: #3a1420;
  --info: #7aa2ff; --info-soft: #172548; --violet: #a78bfa; --violet-soft: #241a45; --mute-soft: #1a2338;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 18px 40px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  overflow-x: hidden;
}
/* resplandor azul de fondo */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 420px at -10% -8%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 65%),
    radial-gradient(700px 380px at 110% 0%, color-mix(in srgb, var(--brand-3) 16%, transparent), transparent 60%),
    radial-gradient(800px 500px at 50% 110%, color-mix(in srgb, var(--brand-2) 10%, transparent), transparent 60%);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
.mono, .num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos { color: var(--ok); } .neg { color: var(--bad); }

/* ─── layout ─── */
.app { max-width: 760px; margin: 0 auto; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.035em; font-size: 20px; }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 4px 8px rgba(37, 99, 235, .3)); }
.sorteo-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 12px; font-size: 14px; font-weight: 700; cursor: pointer; max-width: 40vw; box-shadow: var(--shadow);
}
.sorteo-btn svg:first-child { color: var(--brand); }
.sorteo-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); flex: none;
  display: grid; place-items: center; cursor: pointer; color: var(--brand); box-shadow: var(--shadow); text-decoration: none;
}
.help-btn svg { width: 20px; height: 20px; }
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px color-mix(in srgb, var(--brand) 35%, transparent); }
.view { padding: 8px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 36px); animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h1 { font-size: 28px; letter-spacing: -.035em; margin: 8px 0 14px; font-weight: 800; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 26px 4px 10px; font-weight: 800; }
h3 { font-size: 17px; margin: 0; font-weight: 800; letter-spacing: -.02em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ─── nav flotante ─── */
.nav {
  position: fixed; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 30;
  display: flex; justify-content: center; pointer-events: none;
}
.nav-inner {
  display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 560px; height: var(--nav-h);
  background: color-mix(in srgb, var(--card) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 12px 32px -10px rgba(15, 27, 51, .25); pointer-events: auto;
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); text-decoration: none; font-size: 11px; font-weight: 700; position: relative;
}
.nav a svg { width: 24px; height: 24px; transition: transform .15s; }
.nav a.on { color: var(--brand); }
.nav a.on svg { transform: translateY(-1px); }
.nav a.on::after { content: ""; position: absolute; bottom: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--grad); }
.nav a.on span { display: none; }
.nav .dot { position: absolute; top: 10px; left: calc(50% + 7px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--card); }
.nav .fab-wrap { display: grid; place-items: center; }
.fab {
  width: 58px; height: 58px; border-radius: 20px; border: 0; cursor: pointer;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-lg); transform: translateY(-14px); transition: transform .15s;
}
.fab:active { transform: translateY(-12px) scale(.96); }
.fab svg { width: 28px; height: 28px; stroke-width: 2.5; }

/* ─── tarjetas ─── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.card.tight { padding: 4px 0; overflow: hidden; }

/* tarjeta principal con degradado */
.ticket {
  position: relative; overflow: hidden; color: #fff;
  background: var(--grad); border-radius: 26px; padding: 20px 20px 18px; box-shadow: var(--shadow-lg);
  isolation: isolate;
}
.ticket::before, .ticket::after {
  content: ""; position: absolute; border-radius: 50%; z-index: -1; pointer-events: none;
}
.ticket::before { width: 260px; height: 260px; right: -90px; top: -110px; background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); }
.ticket::after { width: 220px; height: 220px; left: -80px; bottom: -120px; background: radial-gradient(circle, rgba(34, 211, 238, .45), rgba(34, 211, 238, 0) 70%); }
.ticket-head { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.ticket-head span:last-child { background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px; }
.tline { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.tline .k { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.82); }
.tline .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tline.big { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); }
.tline.big .k { font-size: 15px; color: #fff; font-weight: 700; }
.tline.big .v { font-size: 38px; letter-spacing: -.04em; line-height: 1.05; }
.tline.sub .k, .tline.sub .v { font-size: 13px; color: rgba(255,255,255,.72); font-weight: 600; }
.tline.alert .k, .tline.alert .v { color: #fde68a; }
.progress { height: 10px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; margin: 10px 0 4px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #a7f3d0, #34d399); border-radius: 6px; transition: width .6s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px rgba(52, 211, 153, .6); }

.status {
  display: flex; gap: 14px; align-items: center; border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.status::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.status .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.status .ico svg { width: 22px; height: 22px; }
.status b { display: block; font-size: 16px; letter-spacing: -.01em; }
.status .small { color: var(--ink-2); }
.status.ok::before, .status.ok .ico { background: linear-gradient(135deg, #10b981, #059669); }
.status.bad::before, .status.bad .ico { background: linear-gradient(135deg, #fb7185, #e11d48); }
.status.warn::before, .status.warn .ico { background: linear-gradient(135deg, #fbbf24, #f97316); }
.status.info::before, .status.info .ico { background: linear-gradient(135deg, #60a5fa, #4f46e5); }
.status.ok { background: linear-gradient(90deg, var(--ok-soft), var(--card) 70%); }
.status.bad { background: linear-gradient(90deg, var(--bad-soft), var(--card) 70%); }
.status.warn { background: linear-gradient(90deg, var(--warn-soft), var(--card) 70%); }
.status.info { background: linear-gradient(90deg, var(--info-soft), var(--card) 70%); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.quick button, .quick a, .quick label {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 14px; border-radius: 18px; text-align: center;
  background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s;
}
.quick button:active, .quick a:active, .quick label:active { transform: scale(.97); }
.quick svg { width: 44px; height: 44px; padding: 11px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 6px 14px -4px rgba(37, 99, 235, .55); }
.quick > :nth-child(2) svg { background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: 0 6px 14px -4px rgba(124, 58, 237, .55); }
.quick > :nth-child(3) svg { background: linear-gradient(135deg, #22d3ee, #0891b2); box-shadow: 0 6px 14px -4px rgba(8, 145, 178, .55); }

/* ─── listas ─── */
.list { list-style: none; margin: 0; padding: 0; }
.li {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; cursor: pointer; background: none; width: 100%; text-align: left; border-left: 0; border-right: 0; border-top: 0;
}
.li:last-child { border-bottom: 0; }
.li:active { background: var(--paper-2); }
.li .t { font-weight: 700; }
.li .s { font-size: 13px; color: var(--ink-3); }
.li .amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; letter-spacing: -.02em; }
.tipo-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 15px; }
.tipo-ico svg { width: 20px; height: 20px; }
.t-entrega { background: linear-gradient(135deg, #dbe7ff, #e4defe); color: var(--brand-2); }
.t-cobro { background: linear-gradient(135deg, #d1fae5, #ccfbf1); color: var(--ok); }
.t-devolucion { background: linear-gradient(135deg, #fef3c7, #ffedd5); color: var(--warn); }
.mono-ico { background: var(--grad-soft); color: var(--brand); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-entrega { background: #1d2550; }
  :root:not([data-theme="light"]) .t-cobro { background: #10302a; }
  :root:not([data-theme="light"]) .t-devolucion { background: #33270d; }
}

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.b-cuadrado { background: var(--ok-soft); color: var(--ok); }
.b-pendiente { background: var(--info-soft); color: var(--info); }
.b-descuadre { background: var(--bad-soft); color: var(--bad); }
.b-roto { background: var(--warn-soft); color: var(--warn); }
.b-sin_stila { background: var(--mute-soft); color: var(--ink-2); }
.b-previo { background: var(--mute-soft); color: var(--ink-2); }
.b-mute { background: var(--mute-soft); color: var(--ink-2); }

/* ─── cuadre diario ─── */
.day { padding: 16px; border-bottom: 1px solid var(--line); }
.day:last-child { border-bottom: 0; }
.day-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.day-date { font-weight: 800; letter-spacing: -.01em; }
.day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.day-grid > div { background: var(--paper); border-radius: 14px; padding: 9px 11px; min-width: 0; }
.day-grid .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 800; }
.day-grid .v { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em; }
.day-grid .dif.bad { background: var(--bad-soft); color: var(--bad); }
.day-grid .dif.ok { background: var(--ok-soft); color: var(--ok); }
.day-detail { margin-top: 10px; font-size: 14px; }
.day-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.note { background: var(--warn-soft); border-radius: 12px; padding: 9px 12px; font-size: 14px; margin-top: 10px; }

/* ─── formularios ─── */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 14px; outline: none; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.input.big { font-size: 30px; font-weight: 800; text-align: right; padding: 10px 14px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
textarea.input { min-height: 72px; resize: vertical; }
.money { position: relative; }
.money::after { content: "€"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 700; color: var(--ink-3); pointer-events: none; }
.money .input.big { padding-right: 42px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line); background: var(--card);
  padding: 10px 16px; border-radius: 14px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 15px;
  transition: transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .8); }
.btn.ok { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(5, 150, 105, .9); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; padding: 15px; font-size: 16px; border-radius: 16px; }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper-2); border-radius: 15px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: none; padding: 10px 4px; border-radius: 11px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2); transition: background .15s; }
.seg button.on { background: var(--card); color: var(--brand); box-shadow: var(--shadow); }
.seg.tipo button.on[data-v="entrega"] { background: linear-gradient(135deg, #3b82f6, #4f46e5); color: #fff; }
.seg.tipo button.on[data-v="cobro"] { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.seg.tipo button.on[data-v="devolucion"] { background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1.5px solid var(--line); background: var(--card); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 14px -8px rgba(37, 99, 235, .9); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch input { appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.switch input:checked::after { transform: translateX(20px); }
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search .input { padding-left: 42px; border-radius: 16px; box-shadow: var(--shadow); }

/* ─── hoja modal ─── */
.backdrop { position: fixed; inset: 0; background: rgba(10, 18, 40, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: bd .2s ease; }
@keyframes bd { from { opacity: 0; } }
.sheet {
  background: var(--paper); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -10px 40px rgba(10, 18, 40, .2);
}
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { font-size: 21px; margin-bottom: 14px; }
@media (min-width: 700px) {
  .backdrop { align-items: center; }
  .sheet { border-radius: 28px; }
}
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 28px); transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 16px; font-weight: 700; font-size: 15px;
  box-shadow: 0 12px 30px rgba(10, 18, 40, .3); max-width: calc(100vw - 32px); animation: up .25s ease;
}
.toast.bad { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; }

/* ─── acceso / perfiles ─── */
.gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; text-align: center; position: relative; }
.gate .logo { width: 88px; height: 88px; margin-bottom: 10px; filter: drop-shadow(0 14px 24px rgba(37, 99, 235, .4)); }
.gate h1 { font-size: 36px; margin: 4px 0; }
.gate p { color: var(--ink-2); margin: 0 0 24px; }
.gate form { width: 100%; max-width: 330px; }
.gate-card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 18px; width: 100%; max-width: 420px; margin: 8px 0 24px; }
.profile { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.profile .av { transition: transform .15s; border-radius: 50%; box-shadow: 0 0 0 3px var(--card), 0 10px 24px -6px rgba(37, 99, 235, .45); }
.profile:hover .av { transform: scale(1.06) rotate(-2deg); }
.profile .add { width: 88px; height: 88px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--brand) 50%, transparent); display: grid; place-items: center; color: var(--brand); background: var(--grad-soft); }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 14px 0 22px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-3); transition: all .15s; }
.pin-dots i.on { background: var(--grad); border-color: transparent; transform: scale(1.1); }
.pinpad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; justify-content: center; }
.pinpad button { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 26px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.pinpad button:active { background: var(--brand-soft); }
.pinpad button.ghost { border: 0; background: none; font-size: 15px; box-shadow: none; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ─── avatar builder ─── */
.av-preview { display: flex; justify-content: center; margin: 4px 0 32px; position: relative; }
.av-preview > .av { box-shadow: 0 0 0 4px var(--card), 0 16px 32px -10px rgba(37, 99, 235, .5); border-radius: 50%; }
.av-opts { display: grid; gap: 14px; }
.av-row > span { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 6px; }
.av-row .opts { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.av-row .opts::-webkit-scrollbar { display: none; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--card); cursor: pointer; flex: none; box-shadow: 0 0 0 1px var(--line); }
.sw.on { box-shadow: 0 0 0 2.5px var(--brand); }
.opt { flex: none; width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; padding: 2px; line-height: 0; }
.opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.opt svg { width: 100%; height: 100%; border-radius: 12px; }

/* ─── actividad ─── */
.feed-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .who { font-weight: 800; }
.feed-item .when { font-size: 12px; color: var(--ink-3); }
.feed-day { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); padding: 14px 16px 4px; }

/* ─── varios ─── */
.empty { text-align: center; color: var(--ink-3); padding: 32px 16px; }
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; }
.kv .v { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: right; padding: 6px 4px; font-weight: 800; }
.cmp th:first-child, .cmp td:first-child { text-align: left; }
.cmp td { padding: 9px 4px; border-top: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cmp td:first-child { font-weight: 700; }
.cmp td.d-ok { color: var(--ok); font-weight: 800; } .cmp td.d-bad { color: var(--bad); font-weight: 800; }
.menu .li svg { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.menu .li .mi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.menu .li .mi svg { width: 19px; height: 19px; color: #fff; }
.drop {
  border: 2px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); border-radius: var(--radius); padding: 16px; cursor: pointer;
  background: var(--grad-soft); display: flex; align-items: center; gap: 14px; text-align: left;
}
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop > svg { width: 48px; height: 48px; padding: 12px; border-radius: 15px; color: #fff; background: var(--grad); flex: none; box-shadow: 0 8px 16px -8px rgba(37, 99, 235, .8); }
.hint { background: var(--info-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }
.offline { background: linear-gradient(90deg, #f59e0b, #f97316); color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 4px; }
.picker-list { max-height: 50dvh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.contact-links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* contraseña con botón de ver */
.pw { position: relative; }
.pw .input { padding-right: 50px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }
.pw-eye svg { width: 20px; height: 20px; }
@media (max-width: 400px) { .brand span { display: none; } }

/* ─── ayuda ─── */
.help-hero {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; background: var(--grad); border-radius: 26px; padding: 22px 20px; box-shadow: var(--shadow-lg);
}
.help-hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.3), transparent 70%); z-index: -1; }
.help-hero h1 { margin: 0 0 6px; color: #fff; }
.help-hero p { margin: 0; color: rgba(255,255,255,.88); font-size: 15px; }
.help-hero .search { margin: 16px 0 0; }
.help-hero .search .input { border-color: transparent; }
.topics { display: grid; gap: 10px; margin-top: 16px; }
.topic { scroll-margin-top: 80px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.topic-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; }
.topic-head .ti { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.topic-head .ti svg { width: 21px; height: 21px; }
.topic-head .tt { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.topic-head .ts { font-size: 13px; color: var(--ink-3); }
.topic-head .chev { width: 20px; height: 20px; color: var(--ink-3); transition: transform .2s; flex: none; }
.topic.open .topic-head .chev { transform: rotate(90deg); }
.topic-body { padding: 0 16px 16px; display: none; }
.topic.open .topic-body { display: block; animation: fade .2s ease; }
.topic-body p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; }
.steps { list-style: none; counter-reset: paso; margin: 4px 0 12px; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: paso; position: relative; padding-left: 40px; font-size: 15px; line-height: 1.45; }
.steps li::before {
  content: counter(paso); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--grad);
}
.steps li b { color: var(--ink); }
.tip { display: flex; gap: 10px; background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line)); border-radius: 14px; padding: 10px 12px; font-size: 14px; margin: 10px 0; color: var(--ink-2); }
.tip svg { width: 18px; height: 18px; color: var(--brand); flex: none; margin-top: 2px; }
.legend { display: grid; gap: 8px; margin: 8px 0 12px; }
.legend div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.legend .badge { flex: none; min-width: 112px; justify-content: center; }
.welcome {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--grad-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
}
.welcome .wi { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; flex: none; }
.welcome .wi svg { width: 22px; height: 22px; }
.xbtn { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 4px; line-height: 0; }
.xbtn svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
