/* ============================================
   LOGIN / REGISTRO - pantalla dividida
   ============================================ */

body.auth {
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8fafc;
    color: #334155;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

.auth h1, .auth h2 {
    font-family: 'Unbounded', 'Segoe UI', sans-serif;
    border: none;
    padding: 0;
}

.auth a { text-decoration: none; }
.auth a:hover { text-decoration: none; }

/* ---------- Panel decorativo ---------- */
.auth-visual {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 56px;
    background: linear-gradient(160deg, #0b1220 0%, #16233f 100%);
    color: #ffffff;
}

.auth-visual svg.formas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-visual .mensaje { position: relative; max-width: 420px; }

.auth-visual .mensaje h2 {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 14px;
    color: #ffffff;
}

.auth-visual .mensaje p { margin: 0; color: #94a3b8; }

/* ---------- Panel del formulario ---------- */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-caja { width: 100%; max-width: 400px; }

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    color: #0f172a;
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.auth-logo svg { width: 36px; height: 36px; flex-shrink: 0; }

.auth-caja h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 6px;
    color: #2563eb;
}

.auth-sub { margin: 0 0 30px; color: #64748b; }

/* ---------- Avisos ---------- */
.aviso {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
    margin-bottom: 22px;
}

.aviso-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.aviso-ok    { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ---------- Formulario ---------- */
.auth form {
    background: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    max-width: none;
}

.auth label {
    display: block;
    margin-bottom: 22px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #334155;
}

.auth input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 2px;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 400;
    color: #0f172a;
}

.auth input:focus {
    outline: none;
    border-bottom-color: #2563eb;
    box-shadow: none;
}

.auth-acciones {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 10px;
}

.auth .btn-enviar {
    margin: 0;
    padding: 12px 26px;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.auth .btn-enviar:hover { background: #1e40af; }

.auth .enlace-sec {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #2563eb;
}

.auth .volver {
    display: block;
    margin-top: 34px;
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
}

.auth .volver:hover { color: #2563eb; }

/* ---------- Móvil ---------- */
@media (max-width: 800px) {
    body.auth { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
}

/* ---------- Registro: formulario más ancho y panel azul ---------- */
.auth-caja.ancha { max-width: 520px; }

.auth-visual.azul {
    background: linear-gradient(160deg, #2563eb 0%, #0ea5e9 100%);
}

.auth-visual.azul svg.formas g { stroke: rgba(255, 255, 255, 0.28); }
.auth-visual.azul .mensaje p { color: #e0f2fe; }

.auth .fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.auth .ayuda {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #94a3b8;
}

.auth select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 2px;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
    letter-spacing: normal;
    text-transform: none;
    font-weight: 400;
    color: #0f172a;
}

.auth select:focus { outline: none; border-bottom-color: #2563eb; }

.auth input[type="file"] {
    border-bottom: none;
    padding: 8px 0;
    font-size: 0.9rem;
}

.auth input[type="color"] {
    width: 80px;
    height: 42px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
}

@media (max-width: 800px) {
    .auth .fila { grid-template-columns: 1fr; }
}

/* ---------- Altura completa de la ventana ---------- */
body.auth { grid-template-rows: minmax(100vh, auto); }
.auth-visual { min-height: 100vh; }


/* ---------- Campo de contraseña con ojo ---------- */
.auth .campo-pass { position: relative; }

.auth .campo-pass input { padding-right: 38px; }

.auth .ojo {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    padding: 6px;
    width: auto;
    border: none;
    border-radius: 6px;
    background: none;
    box-shadow: none;
    color: #94a3b8;
    cursor: pointer;
    line-height: 0;
}

.auth .ojo:hover,
.auth .ojo.activo { background: none; color: #2563eb; }

.auth .ojo svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* La raya cruzada solo aparece cuando la contraseña está visible */
.auth .ojo .tachado { display: none; }
.auth .ojo.activo .tachado { display: block; }


/* ---------- Enlace "¿Olvidaste tu contraseña?" ---------- */
.auth .olvido {
    display: block;
    margin: -10px 0 24px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

.auth .olvido:hover { text-decoration: underline; }
/* Casilla de aceptación de condiciones en el registro */
.auth .acepto { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.88em; line-height: 1.45; margin: 4px 0 0; }
.auth .acepto input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: #2563eb; }
.auth .acepto a { color: #2563eb; text-decoration: underline; }

/* ---------- Recuérdame + ¿Olvidaste tu contraseña? ---------- */
.auth .fila-recordar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -10px 0 24px; }
.auth .fila-recordar .olvido { margin: 0; }
.auth .recordar { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 0.85rem; margin: 0; cursor: pointer; text-transform: none; letter-spacing: normal; color: #475569; }
.auth .recordar input { width: 17px; height: 17px; margin: 0; padding: 0; accent-color: #2563eb; flex-shrink: 0; }

/* ---------- Continuar con Google ---------- */
.auth .separador { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: #94a3b8; font-size: .85em; }
.auth .separador::before, .auth .separador::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }
.auth .btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box;
    padding: 12px 16px; border: 1px solid #dadce0; border-radius: 10px; background: #fff; color: #1f2937;
    font-weight: 600; text-decoration: none; transition: background .15s, box-shadow .15s;
}
.auth .btn-google:hover { background: #f8fafc; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.auth .btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }
.auth .nota-google { font-size: .8em; color: #64748b; text-align: center; margin: 10px 0 0; }
.auth .nota-google a { color: #2563eb; }
