/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap');

/* ===== VARIABLES GLOBALES ===== */
:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3a56d4;
    --secondary: #25c6f7;
    --accent: #4cc9f0;
    --success: #06d6a0;
    --warning: #ffbe0b;
    --error: #ef476f;
    --dark: #1a2634;
    --light: #f8f9fa;
    --gray: #6c757d;
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --neon-shadow: 0 0 10px rgba(67, 97, 238, 0.5), 0 0 20px rgba(76, 201, 240, 0.3);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    margin:0;
    padding:0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(10deg,#0c4571,#3577a9);
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background-image: url('/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;  /* La imagen permanece fija al hacer scroll */
    min-height: 100vh;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra el contenido dentro del contenedor */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== NOTIFICACIONES TOAST ===== */
#toast{
    position:fixed;
    top:20px;
    right:20px;
    z-index:9999;
}

.toast{
    min-width:250px;
    margin-bottom:10px;
    padding:14px 18px;
    border-radius:8px;
    color:white;
    font-weight:500;
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
    animation:slideIn 0.4s ease, fadeOut 0.4s ease 3.6s;
}

.toast.success{
    background:#28a745;
}

.toast.error{
    background:#dc3545;
}

.toast.info{
    background:#007bff;
}

@keyframes slideIn{
    from{
        transform:translateX(100%);
        opacity:0;
    }
    to{
        transform:translateX(0);
        opacity:1;
    }
}

@keyframes fadeOut{
    to{
        opacity:0;
        transform:translateX(100%);
    }
}

/* ===== FORMULARIO PRINCIPAL ===== */
form {
    background: rgba(255, 255, 255, 0.7);
    padding:40px;
    width:400px;
    border-radius:7px;
    box-shadow:0 10px 30px rgba(0,0,0,0.2);
    text-align:center;
    align-items:center;
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#logo1 {
    display: block;
    margin: 0 auto 25px auto;
    width: 140px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    animation: logoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#logo_principal {
    display: block;
    margin: 0 auto 25px auto;
    width: 200px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
    animation: logoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    80% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#titulo_principal {
    text-align: center;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

#subtitulos {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}


#titulo1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 8px;
    color: #0c4571;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
    letter-spacing: -0.5px;
}

#titulo2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 8px;
    color: #0c4571;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
    letter-spacing: -0.5px;
}

form p {
    text-align: center;
    color: #0c4571;
    margin-bottom: 25px;
    font-size: 1rem;
    font-weight: 400;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ===== CAMPOS DEL FORMULARIO ===== */
/* Labels */
label{
    display:block;
    text-align:left;
    margin-top:15px;
    font-weight:600;
    color:#0c4571;
}

/* Inputs */
input[type="text"],
input[type="password"]{
    width:100%;
    padding:10px;
    margin-top:5px;
    background-color: #ffffff;
    border-radius:6px;
    border:1px solid #ccc;
    font-size:14px;
    transition:all 0.3s ease;
}

/* Focus en inputs */
input[type="text"]:focus,
input[type="password"]:focus{
    border-color:#4facfe;
    outline:none;
    box-shadow:0 0 5px rgba(79,172,254,0.4);
}

/* Botón */
input[type="submit"]{
    width:100%;
    margin-top:20px;
    padding:12px;
    border:none;
    border-radius:6px;
    background:linear-gradient(135deg,#4facfe,#00c6ff);
    color:white;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:all 0.3s ease;
}

/* Hover botón */
input[type="submit"]:hover{
    transform:translateY(-2px);
    box-shadow:0 5px 15px rgba(0,0,0,0.2);
}

/* ===== MODO OSCURO ===== */
@media (prefers-color-scheme: dark) {
    body {
        background-image: url('/fondoB.jpg');
    }
    
    form {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #titulo1 {
        background: linear-gradient(135deg, #ffffff, #e0e7ff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        }

        #titulo2 {
        background: linear-gradient(135deg, #ffffff, #e0e7ff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        }

    form p {
        color: #49a1fa;
        }

    label {
        color: #49a1fa;
        }
    
    .toast {
        background: rgba(30, 41, 59, 0.95);
        backdrop-filter: blur(20px);
    }
    
    .toast-title {
        color: #f1f5f9;
    }
    
    .toast-message {
        color: #cbd5e1;
    }
    
    .toast-close {
        color: #94a3b8;
    }
    
    .toast-close:hover {
        color: #f1f5f9;
    }

     #logo1 {
        content: url('/logoB.png'); /* Tu logo para modo oscuro */
    }

    input[type="text"],
    input[type="password"] {
        color: rgb(168, 168, 168);
        background-color: #082337;
        }   

    input[type="text"]::placeholder,
    input[type="password"]::placeholder {
        color: rgba(255, 255, 255, 0.6);
        }
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 480px) {
    form {
        padding: 30px 20px;
    }
    
    #titulo1 {
        font-size: 1.8rem;
    }
    
    .toast-container {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
    
    .toast {
        max-width: none;
    }
    
    #logo1 {
        width: 100px;
    }
}


/* Estilo general para los botones */
input.linea {
    cursor: pointer;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 8px;
    border: 2px solid var(--text); /* usa variable de color */
    background: #3692f3;
    color: white;
    transition: all 0.2s ease;
}

/* Hover / foco */
input.linea:hover,
input.linea:focus {
    background: #86b4e4;
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Diferenciar botón "Salir" si quieres */
input.linea[type="button"] {
    border-color: #e74c3c;
    color: #ffffff;
}

input.linea[type="button"]:hover {
    background: #e74c3c;
    color: #fff;
}

.botones{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:20px;
}

/* Enlace de olvidé contraseña */
.forgot-password {
    text-align: center;
    margin: 5px 0 15px 0;
}

.forgot-password a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: #333;
    text-decoration: underline;
}

/* Enlace de volver */
.volver {
    text-align: center;
    margin: 5px 0 15px 0;
}

.volver a {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.volver a:hover {
    color: #333;
    text-decoration: underline;
}