/* --- LAYOUT GENERAL --- */
.auth-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 80px; /* Espacio para el header fijo */
}

/* --- SECCIÓN IZQUIERDA (IMAGEN) --- */
.auth-left {
    flex: 1.2; 
    position: relative;
    background: url("../uploads/Fondos/fondoregistro.jpg") center/cover no-repeat;
    overflow: hidden;
}

.auth-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom right, 
        rgba(0,0,0,0.6), 
        rgba(0,0,0,0.3)
    );
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
}

.auth-overlay h1 {
    font-size: 56px;
    line-height: 1.1;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.auth-overlay span {
    color: var(--color-principal);
}

.auth-overlay p {
    font-size: 20px;
    font-weight: 300;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* --- SECCIÓN DERECHA (FORMULARIO) --- */
.auth-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    padding: 40px;
    position: relative;
}

.auth-box {
    width: 100%;
    max-width: 420px; /* Un poco más ancho para comodidad */
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-box h2 {
    font-size: 32px;
    margin-bottom: 8px;
    color: #111;
}

.auth-box p {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

/* --- FORMULARIO & INPUTS FLOTANTES --- */

.auth-box form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 14px 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fdfdfd;
    outline: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

/* Label flotante */
.form-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 15px;
    background: transparent;
    padding: 0 4px;
}

/* Estado Focus/Valid */
.form-group input:focus,
.form-group input:not(:placeholder-shown) {
    border-color: var(--color-principal);
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: var(--color-principal);
    background: #fff; /* Tapa la línea del borde superior */
    font-weight: 600;
}

/* Fila doble (Nombre/Apellido) */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Checkbox */
.auth-check {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    margin-top: 5px;
    cursor: pointer;
    line-height: 1.4;
}

.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-principal);
    cursor: pointer;
}

.auth-check a {
    color: var(--color-principal);
    font-weight: 600;
    text-decoration: underline;
}

/* Botón Submit */
.btn-auth {
    margin-top: 10px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 50px;
    background: var(--color-principal);
    color: #000;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196,163,47,0.3);
}

.btn-auth:hover {
    background: var(--color-secundario);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196,163,47,0.4);
}

/* Links (Ya tienes cuenta?) */
.auth-links {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-links a {
    color: var(--color-principal);
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* --- MODALES (Términos / Alertas) --- */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 18px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    text-align: center;
}

.modal-box h3 {
    font-size: 22px;
    color: #111;
    margin-bottom: 15px;
}

.modal-box p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-box button {
    border: none;
    background: #111;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-box button:hover {
    transform: scale(1.05);
    background: var(--color-principal);
    color: #000;
}

/* Alertas flotantes (Errores de login) */
.auth-alert {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.auth-alert.show {
    opacity: 1;
    transform: translateY(0);
}

.auth-alert.error { background: #e74c3c; }
.auth-alert.success { background: #27ae60; }

/* --- RESPONSIVE --- */

@media (max-width: 900px) {
    .auth-layout {
        flex-direction: column; /* Columna única */
    }

    .auth-left {
        display: none; /* Ocultar imagen en tablets/móviles */
    }

    .auth-right {
        padding: 60px 20px;
        align-items: flex-start; /* Alinear arriba para que no quede centrado si es corto */
    }

    .auth-box {
        margin: 0 auto; /* Centrar caja horizontalmente */
    }
}

@media (max-width: 480px) {
    .auth-row {
        grid-template-columns: 1fr; /* Inputs uno debajo del otro */
    }

    .auth-box h2 {
        font-size: 26px;
    }
}