﻿:root {
    --primary: #1f6f50;
    --card-light: rgba(255,255,255,0.48);
    --card-dark: rgba(30,30,40,0.25);
    --text-dark: #ffffff;
}

/* ====== BACKGROUND CON IMAGEN ====== */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Segoe UI';
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Solo propiedades individuales */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    transition: background-image 0.6s ease-in-out;
}

    /* Overlay más suave */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient( 135deg, rgba(180,0,80,0.20), rgba(31,111,80,0.20) );
    z-index: 0;
}

.main-content {
    padding-top: 80px;
    padding-bottom: 80px;
}

.login-container {
    width: 95%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ====== CARD ====== */
.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 120px 40px 40px 40px; /* ⬅️ más espacio arriba */
    border-radius: 25px;
    background: var(--card-light);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 25px 60px rgba(0,0,0,.4);
    text-align: center;
    transition: 0.4s ease;
    overflow: visible; /* ⬅️ IMPORTANTE */
}


.dark-mode .login-card {
    background: var(--card-dark);
    color: var(--text-dark);
}

/* ====== LOGO FLOTANTE ====== */
.logo {
    width: 220px; /* puedes ajustar */
    height: auto;
    position: absolute; /* ⬅️ clave */
    top: -50px; /* controla cuánto sobresale */
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    background: none;
    padding: 0;
    box-shadow: none;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.35));
    z-index: 10;
}


/* ====== INPUTS FLOATING ====== */
.input-group {
    position: relative;
    margin: 25px 0;
}

.input {
    width: 100%;
    padding: 12px 5px;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    outline: none;
    font-size: 16px;
    color: white;
}

.input-group label {
    position: absolute;
    left: 5px;
    top: 12px;
    color: rgba(255,255,255,0.7);
    transition: 0.3s ease;
    pointer-events: none;
}

/* Floating label */
.input:focus + label,
.input:not(:placeholder-shown) + label {
    top: -12px;
    font-size: 12px;
    color: #ffffff;
}

/* ====== BOTÓN ====== */
/*.btn {
    background: var(--primary);
    border: none;
    padding: 12px;
    width: 100%;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s ease;
}

    .btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0,0,0,.4);
    }*/

/* ====== SPINNER ====== */
.spinner {
    display: none;
    margin: 15px auto;
    width: 30px;
    height: 30px;
    border: 4px solid rgba(255,255,255,0.5);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 480px) {
    .login-card {
        padding: 100px 25px 30px 25px;
    }

    .logo {
        width: 150px;
        top: -55px;
    }
}


/* TITULOS */
.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #941845;
    margin-top: 20px;
    margin-bottom: 5px;
}

.subtitle {
    color: #111111;
    margin-bottom: 30px;
}

/* INPUTS */ 
.custom-input {
    position: relative;
    margin-bottom: 20px;
}

.form-control-custom {
    width: 100%;
    height: 50px;
    padding: 0 45px;
    border-radius: 12px;
    border: none;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    outline: none;
    font-size: 16px;
}

.custom-input i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 18px;
}

    .custom-input i.bi-person,
    .custom-input i.bi-lock {
        left: 15px;
    }

.toggle-password {
    right: 15px;
    cursor: pointer;
}

/* BOTON */
.btn-login {
    width: 100%;
    height: 50px;
    border-radius: 30px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    /* Nuevo degradado verde corporativo */
    background: linear-gradient(135deg, #1f6f50, #2e8b57);
    box-shadow: 0 8px 20px rgba(31,111,80,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(31,111,80,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Desktop */
@media (min-width: 992px) {
    .btn-login {
        max-width: 360px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .btn-login {
        width: 100%;
    }
}

#toast-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
}

.toast-top-full-width {
    width: 100% !important;
}


/* ===== ERROR ELEGANTE ===== */

.login-error {
    display: block;
    margin-top: 5px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(255, 193, 7, .4);
    border: 1px solid rgba(188, 141, 7, 0);
    color:darkred;
    font-size: 14px;
    text-align: center;
    backdrop-filter: blur(6px);
    animation: fadeError .8s ease;
}

@keyframes fadeError {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}