/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ============================================
   FONDO CON IMAGEN Y OVERLAY
   ============================================ */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.auth-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.75) 0%,
        rgba(168, 230, 207, 0.4) 50%,
        rgba(26, 26, 26, 0.7) 100%
    );
    backdrop-filter: blur(3px);
}

/* ============================================
   BOTON VOLVER
   ============================================ */
.back-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    transition: 0.3s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(168, 230, 207, 0.3);
    transform: translateX(-3px);
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */
.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
    z-index: 5;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TARJETA DEL FORMULARIO
   ============================================ */
.auth-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================
   LOGO
   ============================================ */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 65px;
    width: auto;
}

/* ============================================
   TABS LOGIN / REGISTRO
   ============================================ */
.auth-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s ease;
}

.tab-btn.active {
    background: #A8E6CF;
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(168, 230, 207, 0.3);
}

.tab-btn:hover:not(.active) {
    color: #333;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.auth-form.hidden {
    display: none;
}

/* Grupo de input */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group > i {
    position: absolute;
    left: 1rem;
    color: #1a1a1a;
    font-size: 0.95rem;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #1a1a1a;
    font-size: 0.95rem;
    font-family: inherit;
    transition: 0.3s ease;
    outline: none;
}

.input-group input::placeholder {
    color: rgba(26, 26, 26, 0.5);
}

.input-group input:focus {
    border-color: #A8E6CF;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(168, 230, 207, 0.15);
}

.input-group input:focus + .toggle-password,
.input-group input:focus ~ i:first-child {
    color: #A8E6CF;
}

/* Botón mostrar/ocultar contraseña */
.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #A8E6CF;
}

/* ============================================
   LINK OLVIDÉ CONTRASEÑA
   ============================================ */
.forgot-link {
    text-align: right;
    color: #1a1a1a;
    font-size: 0.85rem;
    text-decoration: none;
    transition: 0.3s ease;
    margin-top: -0.4rem;
}

.forgot-link:hover {
    color: #A8E6CF;
}

/* ============================================
   BOTÓN SUBMIT
   ============================================ */
.auth-submit {
    width: 100%;
    padding: 0.95rem;
    background: #A8E6CF;
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: 0.3s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.5px;
}

.auth-submit:hover {
    background: #8dd4b6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 230, 207, 0.35);
}

.auth-submit:active {
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-logo img {
        height: 50px;
    }

    .back-btn {
        top: 1rem;
        left: 1rem;
    }
}
