/* ============================================================
   registro.css — Alta de alumnos (paleta Comunidad Undelta)
   ============================================================ */
:root {
    --sage:#8f9d68; --olive:#3f4a29; --navy:#2a2f3d; --navy-2:#343b4c;
    --lime:#a4c23a; --lime-2:#b7d24c; --cream:#ece4d1; --cream-2:#ddd2b8;
    --blue:#2f5f8a; --ink:#262a33; --ink-soft:#5c6470;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh; background: var(--sage);
    display: flex; align-items: center; justify-content: center;
    padding: 28px 18px; overflow-x: hidden;
}
body::before, body::after {
    content: ""; position: fixed; border-radius: 50%; pointer-events: none;
}
body::before { top: -170px; left: -150px; width: 420px; height: 420px;
    background: var(--olive); box-shadow: 0 0 0 36px rgba(63,74,41,.45); }
body::after { right: -160px; bottom: -190px; width: 400px; height: 400px;
    background: var(--navy); opacity: .9; }

.reg-wrap { position: relative; z-index: 1; width: 100%; max-width: 540px; }

.reg-card {
    background: var(--cream); border: 1px solid var(--cream-2);
    border-radius: 20px; padding: 34px 32px;
    box-shadow: 0 24px 60px rgba(38,42,51,.3);
}
.reg-head { margin-bottom: 22px; }
.reg-logo { width: 140px; height: auto; margin-bottom: 18px; }
.reg-head h1 { font-family: 'Poppins', sans-serif; font-size: 26px; color: var(--navy); }
.reg-head p { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

.reg-form { display: flex; flex-direction: column; gap: 15px; }
.row { display: flex; gap: 14px; }
.row .field { flex: 1; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
    font-size: 11px; font-weight: 600; letter-spacing: 1px;
    text-transform: uppercase; color: var(--ink-soft);
}
.field-loc { color: var(--blue); }
.field input, .field select {
    width: 100%; padding: 12px 13px; border-radius: 10px;
    border: 1px solid var(--cream-2); background: #fff;
    color: var(--ink); font-size: 14px; font-family: inherit; outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
    border-color: var(--lime); box-shadow: 0 0 0 3px rgba(164,194,58,.28);
}
.field select:disabled { background: #f1eee3; color: #a7a392; cursor: not-allowed; }
.field input::placeholder { color: #a7a392; }

.reg-btn {
    position: relative; margin-top: 6px; padding: 14px;
    border: none; border-radius: 10px; cursor: pointer;
    background: var(--lime); color: var(--navy);
    font-size: 15px; font-weight: 700; letter-spacing: .5px;
    box-shadow: 0 8px 20px rgba(164,194,58,.4);
    transition: background .2s, transform .15s, box-shadow .2s;
}
.reg-btn:hover { background: var(--lime-2); transform: translateY(-1px); }
.reg-btn:active { transform: translateY(0); }
.reg-btn:disabled { cursor: wait; filter: brightness(.95); }

.btn-loader {
    display: none; width: 17px; height: 17px; margin: 0 auto;
    border: 2px solid rgba(42,47,61,.35); border-top-color: var(--navy);
    border-radius: 50%; animation: spin .7s linear infinite;
}
.reg-btn.loading .btn-text { display: none; }
.reg-btn.loading .btn-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.reg-msg { min-height: 18px; font-size: 13px; text-align: center; }
.reg-msg.ok { color: #4e5f28; font-weight: 600; }
.reg-msg.error { color: #c0492f; }

.reg-foot { text-align: center; font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.reg-foot a { color: var(--blue); font-weight: 600; text-decoration: none; }
.reg-foot a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .reg-card { padding: 26px 20px; }
    .row { flex-direction: column; gap: 15px; }
}

/* --- Optimización de animaciones (móvil) --- */
button, a, select, input { touch-action: manipulation; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ============================================================
   Overlay de éxito: "Cuenta creada con éxito" (check animado)
   ============================================================ */
.reg-exito {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}
.reg-exito.show { opacity: 1; visibility: visible; pointer-events: auto; }

.reg-exito-card {
    text-align: center;
    transform: scale(.92);
    transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.reg-exito.show .reg-exito-card { transform: scale(1); }

.reg-check { width: 108px; height: 108px; }
.reg-check-circle {
    stroke: #6b8e23;
    stroke-width: 3;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}
.reg-check-tick {
    stroke: #6b8e23;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}
.reg-exito.show .reg-check-circle { animation: regCircle .55s ease forwards; }
.reg-exito.show .reg-check-tick   { animation: regTick .35s .5s ease forwards; }
@keyframes regCircle { to { stroke-dashoffset: 0; } }
@keyframes regTick   { to { stroke-dashoffset: 0; } }

.reg-exito-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px; font-weight: 800; color: #2a2f3d;
    margin-top: 20px;
}
.reg-exito-sub { font-size: 15px; color: #6b7280; margin-top: 6px; }

@media (max-width: 480px) {
    .reg-check { width: 92px; height: 92px; }
    .reg-exito-title { font-size: 21px; }
}
