/* ============================================================
   ZIPWEB — auth.css
   Estilos compartidos por login.html y register.html
   ============================================================ */

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/* BACKGROUND GRADIENT */
.abg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 65% 55% at 20% 50%, rgba(255, 92, 0, .12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(255, 138, 0, .08) 0%, transparent 55%);
}

/* AUTH CARD */
.ac {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2.8rem;
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 1;
    box-shadow: 0 40px 80px rgba(0, 0, 0, .55);
}

/* LOGO */
.al {
    text-align: center;
    margin-bottom: 2.5rem;
}

.al a {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--white);
}

.al a span {
    background: linear-gradient(90deg, var(--orange), var(--orange2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* TITLES */
.at {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--white);
    text-align: center;
    margin-bottom: 0.35rem;
}

.as {
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 2.2rem;
}

/* FORM GROUP */
.fg {
    margin-bottom: 1.15rem;
}

.fg label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    margin-bottom: 0.38rem;
}

.fg input {
    width: 100%;
    background: var(--black);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.88rem 1.1rem;
    color: var(--white);
    font-size: 0.93rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.fg input::placeholder {
    color: var(--muted);
}

.fg input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 92, 0, .12);
}

.fgt {
    text-align: right;
    margin-top: -0.5rem;
    margin-bottom: 1.1rem;
}

.fgt a {
    color: var(--muted);
    font-size: 0.78rem;
    text-decoration: none;
}

.fgt a:hover {
    color: var(--orange);
}

/* SUBMIT BUTTON */
.ab {
    width: 100%;
    background: linear-gradient(90deg, var(--orange), var(--orange2));
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: 0 0 28px var(--orange-glow);
    transition: opacity 0.2s, transform 0.2s;
    margin-top: 0.4rem;
}

.ab:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

/* DIVIDER */
.dv {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.7rem 0;
}

.dv::before,
.dv::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.dv span {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* SOCIAL BUTTON */
.socb {
    width: 100%;
    background: var(--dark);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.82rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 0.65rem;
}

.socb:hover {
    border-color: var(--orange);
    background: var(--orange-soft);
}

/* BOTTOM LINKS */
.af2 {
    text-align: center;
    margin-top: 1.8rem;
    font-size: 0.83rem;
    color: var(--muted);
}

.af2 a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 700;
}

.tn {
    text-align: center;
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 1.1rem;
    line-height: 1.6;
}

.tn a {
    color: var(--orange);
    text-decoration: none;
}

.ph2 {
    font-size: 0.73rem;
    color: var(--muted);
    margin-top: 0.28rem;
}

/* NAME ROW (register) */
.nr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media(max-width:400px) {
    .nr {
        grid-template-columns: 1fr;
    }
}

/* ─── MENSAJES DE ERROR Y ÉXITO ─────────────────────────── */
.auth-mensaje {
    display: none;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
    line-height: 1.5;
    animation: fadeIn 0.25s ease;
}

.auth-mensaje.error {
    background: rgba(255, 60, 60, 0.12);
    border: 1px solid rgba(255, 60, 60, 0.35);
    color: #ff6b6b;
}

.auth-mensaje.exito {
    background: rgba(0, 229, 160, 0.1);
    border: 1px solid rgba(0, 229, 160, 0.3);
    color: var(--success);
}

.link-reenviar {
    color: var(--orange);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s;
    word-break: break-word;
}

.link-reenviar:hover {
    opacity: 0.8;
}

/* ─── BOTÓN GOOGLE ──────────────────────────────────────── */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.btn-google svg {
    flex-shrink: 0;
}

/* ─── MODAL ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay[style*="display: block"] {
    display: flex !important;
}

.modal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2.2rem;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-titulo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.modal-sub {
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-card .fg {
    margin-bottom: 1.1rem;
}

.modal-card .ab {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-cerrar {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.8rem;
    transition: border-color 0.2s, color 0.2s;
}

.btn-cerrar:hover {
    border-color: var(--orange);
    color: var(--white);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   RESPONSIVE - AUTH.CSS
   Sistema completo para login y register
   ============================================================ */

/* ─── MOBILE LARGE (≤768px) ──────────────────────────────── */
@media (max-width: 768px) {
    body {
        padding: 1.5rem;
    }

    .ac {
        padding: 2.5rem 2.2rem;
        max-width: 400px;
    }

    .al a {
        font-size: 1.6rem;
    }

    .at {
        font-size: 1.35rem;
    }

    .as {
        font-size: 0.8rem;
        margin-bottom: 1.8rem;
    }

    .fg label {
        font-size: 0.73rem;
    }

    .fg input {
        padding: 0.82rem 1rem;
        font-size: 0.88rem;
    }

    .fgt a {
        font-size: 0.73rem;
    }

    .ab {
        padding: 0.9rem;
        font-size: 0.92rem;
    }

    .dv span {
        font-size: 0.7rem;
    }

    .socb {
        padding: 0.75rem;
        font-size: 0.82rem;
    }

    .af2 {
        font-size: 0.78rem;
    }

    .tn {
        font-size: 0.68rem;
    }

    .ph2 {
        font-size: 0.68rem;
    }
}

/* ─── MOBILE SMALL (≤480px) ──────────────────────────────── */
@media (max-width: 480px) {
    body {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 1.5rem;
        min-height: 100vh;
    }

    .ac {
        padding: 2rem 1.6rem;
        max-width: 100%;
        border-radius: 20px;
    }

    .al {
        margin-bottom: 1.8rem;
        text-align: center;
    }

    .al a {
        font-size: 1.4rem;
    }

    .at {
        font-size: 1.25rem;
        text-align: center;
    }

    .as {
        font-size: 0.75rem;
        margin-bottom: 1.6rem;
        text-align: center;
    }

    .fg {
        margin-bottom: 1rem;
    }

    .fg label {
        font-size: 0.68rem;
        margin-bottom: 0.3rem;
    }

    .fg input {
        padding: 0.75rem 0.9rem;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    .fgt {
        margin-top: -0.4rem;
        margin-bottom: 1rem;
        text-align: left;
    }

    .fgt a {
        font-size: 0.68rem;
        word-break: break-word;
    }

    .ab {
        padding: 0.85rem;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    .socb {
        padding: 0.75rem;
        font-size: 0.8rem;
        border-radius: 8px;
        margin-bottom: 0.6rem;
    }

    .dv {
        margin: 1.5rem 0;
        gap: 0.8rem;
    }

    .dv span {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .af2 {
        font-size: 0.75rem;
        margin-top: 1.6rem;
        text-align: center;
    }

    .tn {
        font-size: 0.68rem;
        margin-top: 1rem;
        line-height: 1.5;
        text-align: center;
    }

    .ph2 {
        font-size: 0.68rem;
        margin-top: 0.3rem;
        word-break: break-word;
    }

    /* Name row en register */
    .nr {
        gap: 0.8rem;
    }

    .nr .fg {
        margin-bottom: 0;
    }

    .nr input {
        padding: 0.75rem 0.9rem;
        font-size: 0.82rem;
    }

    /* Modal */
    .modal-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .modal-card {
        padding: 2rem 1.6rem;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .modal-titulo {
        font-size: 1.1rem;
    }

    .modal-sub {
        font-size: 0.78rem;
        margin-bottom: 1.3rem;
    }

    .modal-card .fg label {
        font-size: 0.68rem;
    }

    .modal-card .fg input {
        padding: 0.7rem 0.85rem;
        font-size: 0.82rem;
    }

    .modal-card .ab {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .btn-cerrar {
        padding: 0.75rem;
        font-size: 0.82rem;
        border-radius: 8px;
    }

    /* Mensajes */
    .auth-mensaje {
        padding: 0.75rem 0.95rem;
        font-size: 0.82rem;
        border-radius: 8px;
    }
}

/* ─── DISPOSITIVOS MUY PEQUEÑOS (≤360px) ─────────────────── */
@media (max-width: 360px) {
    body {
        padding: 0.5rem;
        padding-top: 1.5rem;
    }

    .ac {
        padding: 1.8rem 1.4rem;
    }

    .al a {
        font-size: 1.3rem;
    }

    .at {
        font-size: 1.15rem;
    }

    .as {
        font-size: 0.7rem;
    }

    .fg label {
        font-size: 0.65rem;
    }

    .fg input {
        font-size: 0.78rem;
        padding: 0.7rem 0.85rem;
    }

    .fgt a {
        font-size: 0.65rem;
    }

    .ab {
        font-size: 0.82rem;
        padding: 0.8rem;
    }

    .dv span {
        font-size: 0.6rem;
    }

    .socb {
        font-size: 0.73rem;
        padding: 0.65rem;
    }

    .af2 {
        font-size: 0.68rem;
    }

    .tn {
        font-size: 0.6rem;
    }
}

/* ─── DESKTOP GRANDE (≥1440px) ───────────────────────────── */
@media (min-width: 1440px) {
    .ac {
        max-width: 460px;
        padding: 3.5rem 3rem;
    }

    .al a {
        font-size: 1.85rem;
    }

    .at {
        font-size: 1.55rem;
    }

    .as {
        font-size: 0.9rem;
    }
}

/* ─── CAMPO OBLIGATORIO ──────────────────────────────────── */
.req {
    color: var(--orange);
    margin-left: 2px;
}

/* ─── BOTÓN DESACTIVADO (CARGANDO) ──────────────────────── */
.ab:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ─── MODAL OLVIDÉ CONTRASEÑA ───────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2.2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.modal-titulo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.4rem;
}

.modal-sub {
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-cerrar {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.8rem;
    transition: border-color 0.2s, color 0.2s;
}

.btn-cerrar:hover {
    border-color: var(--orange);
    color: var(--white);
}