:root {
  --ink: #1f2a44; --muted: #646e7f; --line: #dce1e8; --light: #f4f7fb;
  --cream: #f2e5cf; --blue: #2378b0; --deep: #176b87; --navy: #17324c;
  --green: #20834b; --green-bg: #e8f6ee; --red: #b3383d; --red-bg: #fdeced; --yellow: #f1c40f;
  color: var(--ink); background: var(--light);
  font: 400 16px/1.5 Nunito, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--light); }
h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #59a5db; outline-offset: 2px; }

.auth { display: grid; grid-template-columns: minmax(320px, 44%) 1fr; min-height: 100vh; }
.auth-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 44px clamp(28px, 4vw, 64px); background: var(--navy); color: #eaf3fa; }
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand::before { width: 520px; height: 520px; right: -220px; bottom: -200px; background: radial-gradient(circle, #2378b055 0%, transparent 70%); }
.auth-brand::after { width: 260px; height: 260px; left: -90px; top: 38%; background: radial-gradient(circle, #f1c40f22 0%, transparent 70%); }
.brand-lockup { position: relative; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 600 1.25rem/1.1 Fredoka, Nunito, sans-serif; }
.brand-lockup img { width: 52px; height: 52px; object-fit: contain; padding: 6px; border-radius: 14px; background: var(--cream); }
.brand-lockup small { display: block; font: 600 .74rem/1.3 Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #9fc3dd; margin-top: 3px; }
.brand-copy { position: relative; max-width: 460px; }
.brand-copy .eyebrow { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px; background: #ffffff14; color: #ffe27a; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.brand-copy h2 { font: 600 clamp(1.9rem, 3.2vw, 2.7rem)/1.1 Fredoka, Nunito, sans-serif; color: #fff; }
.brand-copy h2 em { font-style: normal; color: #ffe27a; }
.brand-copy p { margin-top: 14px; color: #c7dbea; font-size: 1.02rem; }
.perks { position: relative; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.perks li { display: flex; gap: 12px; align-items: flex-start; color: #dceaf4; font-size: .95rem; }
.perks b { color: #fff; }
.perk-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #ffffff12; color: #ffe27a; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.auth-main { display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: min(100%, 440px); }
.auth-card.wide { width: min(100%, 620px); }
.auth-card h1 { font: 600 clamp(1.7rem, 3vw, 2.1rem)/1.15 Fredoka, Nunito, sans-serif; color: var(--ink); }
.auth-card .lead { margin: 8px 0 26px; color: var(--muted); }
.form { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--ink); }
.field small { font-weight: 600; color: var(--muted); font-size: .8rem; }
.input-wrap { position: relative; }
.input { width: 100%; height: 50px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px #2378b01f; }
.input[aria-invalid="true"] { border-color: var(--red); }
.input-wrap .input { padding-right: 52px; }
.reveal { position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 800; }
.reveal:hover { background: var(--light); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .88rem; }
.row a { font-weight: 700; text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 800; font-size: 1rem; text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #1d6a9c; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: #b9c3cf; }
.btn-block { width: 100%; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-mark { width: 20px; height: 20px; }
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: .9rem; font-weight: 600; }
.alert.error { background: var(--red-bg); color: var(--red); }
.alert.success { background: var(--green-bg); color: var(--green); }
.alert.info { background: #eaf3fb; color: #24547f; }
.join-cta { margin-top: 28px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; gap: 14px; }
.join-cta .perk-icon { background: #fff6d6; color: #a57900; }
.join-cta div { flex: 1; font-size: .9rem; color: var(--muted); }
.join-cta strong { display: block; color: var(--ink); font-size: .98rem; }
.join-cta a { font-weight: 800; text-decoration: none; white-space: nowrap; }
.back { display: inline-flex; margin-top: 22px; color: var(--muted); font-size: .86rem; font-weight: 700; text-decoration: none; }

.steps { display: flex; gap: 8px; margin-bottom: 22px; }
.step { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); color: var(--muted); font-size: .86rem; font-weight: 800; }
.step span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--light); font-size: .8rem; }
.step.active { border-color: var(--blue); color: var(--ink); }
.step.active span { background: var(--blue); color: #fff; }
.step.done span { background: var(--green); color: #fff; }
.section-label { margin-top: 4px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--deep); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--ink); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); flex: none; }
.strength { display: flex; gap: 6px; }
.strength i { flex: 1; height: 5px; border-radius: 4px; background: var(--line); }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--red); }
.strength[data-level="2"] i:nth-child(-n+2) { background: #e0a400; }
.strength[data-level="3"] i:nth-child(-n+3) { background: var(--green); }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: .84rem; color: var(--muted); font-weight: 600; }
.rules li::before { content: "○ "; }
.rules li.ok { color: var(--green); }
.rules li.ok::before { content: "✓ "; }
.actions { display: flex; gap: 12px; margin-top: 6px; }
.actions .btn { flex: 1; }
.done-card { text-align: center; display: grid; justify-items: center; gap: 12px; }
.done-card .badge { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.done-card .badge .icon { width: 34px; height: 34px; }
.done-card p { color: var(--muted); max-width: 380px; }

@media (min-width: 861px) { .auth-brand { position: sticky; top: 0; height: 100vh; } }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 26px 20px 28px; gap: 22px; }
  .brand-copy h2 { font-size: 1.6rem; }
  .brand-copy p { font-size: .95rem; }
  .perks { display: none; }
  .auth-main { padding: 28px 16px 40px; place-items: start center; }
}
@media (max-width: 520px) {
  .grid-2 { grid-template-columns: 1fr; }
  .join-cta { flex-wrap: wrap; }
  .steps .step b { display: none; }
}

/* Inicio de administración: Sistema / Web */
.home { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(circle at 85% -10%, #2378b01c, transparent 45%), var(--light); }
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px clamp(16px, 4vw, 48px); }
.brand-lockup.dark { color: var(--ink); }
.brand-lockup.dark small { color: var(--muted); }
.home-top .btn { height: 42px; font-size: .9rem; }
.home-main { flex: 1; width: min(100% - 32px, 980px); margin: 0 auto; padding: 4vh 0 48px; }
.home-main h1 { font: 600 clamp(1.8rem, 4vw, 2.6rem)/1.1 Fredoka, Nunito, sans-serif; }
.home-main .lead { margin: 8px 0 30px; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 30px; border-radius: 22px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.home-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px #17324c55; text-decoration: none; }
.home-card.system:hover { border-color: #6243d6; }
.home-card.web:hover { border-color: var(--blue); }
.home-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; }
.home-icon .icon { width: 28px; height: 28px; }
.system .home-icon { background: #eee9ff; color: #6243d6; }
.web .home-icon { background: #e4f0f9; color: var(--blue); }
.home-card h2 { margin-top: 6px; font: 600 1.7rem/1.1 Fredoka, Nunito, sans-serif; }
.home-card p { color: var(--muted); }
.home-card ul { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; font-weight: 700; font-size: .93rem; }
.home-card li::before { content: "•"; margin-right: 8px; color: var(--line); }
.system li::before { color: #6243d6; }
.web li::before { color: var(--blue); }
.home-go { margin-top: auto; padding-top: 10px; font-weight: 800; }
.system .home-go { color: #6243d6; }
.web .home-go { color: var(--blue); }
@media (max-width: 700px) { .home-grid { grid-template-columns: 1fr; } .home-card { padding: 22px; } }

/* Páginas legales */
.legal { width: min(100% - 32px, 760px); margin: 0 auto; padding: 10px 0 60px; }
.legal h1 { font: 600 clamp(1.7rem, 3.4vw, 2.3rem)/1.15 Fredoka, Nunito, sans-serif; }
.legal .lead { margin: 6px 0 24px; color: var(--muted); }
.legal h2 { margin: 26px 0 8px; font: 600 1.2rem/1.3 Fredoka, Nunito, sans-serif; color: var(--deep); }
.legal p, .legal li { color: #34405a; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.muted-note { margin-top: 28px !important; padding: 12px 14px; border-radius: 12px; background: #fff6d6; color: #7a5a00 !important; font-weight: 700; font-size: .9rem; }
