﻿:root {
    --primary-color: #46d72d;
    --primary-dark: #3ac634;
    --primary-light: rgba(70, 215, 45, 0.1);
    --black-bg: #000000;
    --white-text: #ffffff;
    --gray-text: #aaaaaa;
    --input-bg: #f0f6ff;
    --border-radius: 10px;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--white-text);
    overflow-x: hidden;
    position: relative;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: url('/assets/background/background_login.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

/* ========== ESTRUCTURA PRINCIPAL ========== */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    padding: 15px 30px;
    width: 100%;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding-top: 5vh;
    flex-grow: 1;
}

.login-container {
    width: 100%;
    max-width: 550px;
    padding: 25px; 
    background-color: transparent; 
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: 15px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    margin-top: -80px; 
    border: 1px solid var(--primary-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== LOGO ========== */
.logo {
    max-width: 250px; 
    margin-bottom: -2px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

    .logo:hover {
        transform: scale(1.03);
    }

/* ========== BOTONES ========== */
.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px 10px 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 14px;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    letter-spacing: 0.5px;
    border: none;
    outline: none;
}

.back-button .action-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    color: black;
    position: relative;
    overflow: hidden;
}

    .back-button .action-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, 0.3), transparent );
        transition: 0.5s;
    }

    .back-button .action-button:hover::before {
        left: 100%;
    }

.language-button .action-button {
    background-color: var(--primary-color); 
    color: black;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.action-button:active {
    transform: translateY(0);
}

.action-button i.bi {
    font-size: 16px;
    transition: transform var(--transition-speed) ease;
}

.action-button:hover i.bi {
    transform: translateX(-3px);
}

/* ========== FORMULARIO ========== */
.form-control {
    font-size: 1.1rem;
    padding: 14px 20px;
    border-radius: var(--border-radius);
    border: none;
    margin-bottom: 20px;
    width: 100%;
    background-color: var(--input-bg);
    text-align: center;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

    .form-control:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(70, 215, 45, 0.3);
        background-color: #fff;
    }

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.password-wrapper {
    position: relative;
}

    .password-wrapper .form-control {
        padding-right: 50px;
    }

.btn-toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-80%);
    background: none;
    border: none;
    color: #555;
    font-size: 25px;
    cursor: pointer;
    z-index: 2;
}

    .btn-toggle-password:hover {
        color: var(--primary-color);
    }

/* ========== BOTÓN LOGIN ========== */
.btn-login {
    background-color: var(--primary-color);
    color: var(--white-text);
    padding: 15px;
    width: 100%;
    font-size: 1.2rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-login:hover {
        background-color: var(--primary-dark);
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    }

    .btn-login:active {
        transform: translateY(-1px);
    }

/* ========== ENLACES AUTH ========== */
.auth-links-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px; 
    padding: 15px 0; 
    border-top: 1px solid rgba(70, 215, 45, 0.3);
    border-bottom: 1px solid rgba(70, 215, 45, 0.3);
    position: relative;
}

    .auth-links-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(70, 215, 45, 0.03) 0%, rgba(0,0,0,0) 50%);
        pointer-events: none;
    }

.auth-link-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-speed) ease;
    padding: 8px 12px;
    border-radius: 8px;
}

    .auth-link-wrapper:hover {
        transform: translateY(-2px);
        background-color: rgba(70, 215, 45, 0.05);
    }

.auth-link-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(70, 215, 45, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 30px;
}

.auth-link-content {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.auth-link-label {
    font-size: 14px;
    color: var(--white-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: all var(--transition-speed) ease;
}

    .auth-link:hover {
        color: var(--white-text);
    }

    .auth-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 1px;
        bottom: -2px;
        left: 0;
        background-color: var(--primary-color);
        transition: width var(--transition-speed) ease;
    }

    .auth-link:hover::after {
        width: 100%;
    }

.auth-link-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(70, 215, 45, 0.4), transparent);
}

/* ========== VALIDACIÓN ========== */
.text-danger {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: -15px;
    margin-bottom: 15px;
    display: block;
    text-align: center;
}
/* ========== RESPONSIVE ========== */

/* Pantallas pequeñas (móviles) */
@media (max-width: 767.98px) {
    .top-bar {
        padding: 10px 15px;
        flex-direction: row; /* Cambiado a fila */
        justify-content: space-between; /* Distribución equitativa */
        align-items: center; /* Centrado vertical */
        flex-wrap: nowrap; /* Evita saltos de línea */
        gap: 10px;
    }

    .login-wrapper {
        padding-top: 3vh;
        align-items: center;
    }

    .login-container {
        margin: 10px;
        padding: 25px 20px;
    }

    .logo {
        max-width: 180px;
        margin-bottom: 15px;
    }

    .auth-links-container {
        flex-direction: column;
        gap: 10px;
    }

    .auth-link-divider {
        width: 80%;
        height: 1px;
        margin: 10px auto;
    }
}

/* Pantallas medianas (tablets) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .top-bar {
        padding: 12px 20px; /* Aumentado el padding */
    }

    .login-wrapper {
        padding-top: 8vh;
    }

    .login-container {
        padding: 35px 30px;
    }
}

/* Pantallas grandes (desktops) */
@media (min-width: 992px) {
    .top-bar {
        padding: 15px 25px; /* Más espacio en desktop */
    }

    .login-wrapper {
        padding-top: 10vh;
    }
}

/* Orientación landscape para móviles */
@media (max-height: 576px) and (orientation: landscape) {
    .top-bar {
        padding: 8px 12px; 
    }

    .login-wrapper {
        padding-top: 2vh;
        align-items: flex-start;
    }

    .login-container {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .logo {
        max-width: 160px;
        margin-bottom: 10px;
    }
}

/* Ajuste adicional para botones muy pequeños */
@media (max-width: 400px) {
    .top-bar {
        padding: 8px 10px;
        gap: 5px;
    }

    .action-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}
