﻿/* ==========================================================
   LOGIN THANKSGIVING - versión mejorada
   Mismos nombres de clases que tu HTML actual.
   Opcional: fuente Fraunces para el título (si no carga,
   usa Georgia automáticamente).
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

:root {
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --gold: #f0b85c;
    --gold-soft: #ffd89a;
    --amber: #e08a24;
    --walnut-900: #2a1305;
    --walnut-800: #3a1c08;
    --walnut-700: #4a260d;
    --cream: #fff3dc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Fondo Thanksgiving */
    background: linear-gradient(rgba(35, 17, 3, 0.20), rgba(35, 17, 3, 0.45)), url('../../../assets/Imgs/Thanksgiving/thanksgiving-bg.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Navbar superior ---------- */
.navbar-info {
    background: transparent;
    border-bottom: none;
    padding: 0.75rem 2rem;
    box-shadow: none;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 10;
}

    .navbar-info .left-content {
        justify-self: start;
    }

.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

    .center-content img {
        height: 55px;
        width: auto;
        object-fit: contain;
        margin-left: -5px;
        filter: drop-shadow(0 0 12px rgba(255, 170, 35, 0.9));
    }

/* Logo ERP: ahora sobre una "pastilla" crema para que el azul se lea bien */
.logoERP {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    background: rgba(255, 243, 220, 0.93);
    border: 1px solid rgba(240, 184, 92, 0.7);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(35, 17, 3, 0.45), 0 0 14px rgba(255, 170, 35, 0.35);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

    .logoERP:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(35, 17, 3, 0.5), 0 0 20px rgba(255, 170, 35, 0.55);
    }

    .logoERP img {
        height: 38px;
        object-fit: contain;
        display: block;
    }

/* ---------- Calabazas sobre la puerta ---------- */
.door-pumpkin-container {
    position: absolute;
    top: 15px;
    left: 48%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
}

    .door-pumpkin-container img {
        height: 100px;
        width: auto;
        object-fit: contain;
        filter: drop-shadow(0 0 12px rgba(255, 170, 35, 0.9));
    }

/* ---------- Navbar secundaria ---------- */
.navbar {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.loginheadertittle {
    display: inline-block;
    margin-left: 0;
    padding: 4px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--gold-soft);
    background: rgba(42, 19, 5, 0.62);
    border: 1px solid rgba(240, 184, 92, 0.45);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* ---------- Contenedor principal ---------- */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    position: relative;
    z-index: 5;
}

/* ==========================================================
   TARJETA DE LOGIN
   Letrero de madera de granja: nogal oscuro, doble marco
   dorado y costura punteada en el borde interior.
   ========================================================== */
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin-left: -28px;
    padding: 2.8rem 2.5rem 2.2rem;
    background: radial-gradient(120% 80% at 50% 0%, rgba(96, 52, 18, 0.95) 0%, rgba(58, 28, 8, 0.96) 55%, rgba(38, 17, 5, 0.97) 100%);
    border: 1px solid rgba(240, 184, 92, 0.65);
    border-radius: 18px;
    box-shadow: 0 0 0 6px rgba(42, 19, 5, 0.55), /* marco exterior */
    0 0 0 7px rgba(240, 184, 92, 0.28), /* filo dorado del marco */
    0 0 50px rgba(255, 166, 43, 0.30), /* luz cálida */
    0 30px 60px rgba(0, 0, 0, 0.75), /* sombra */
    inset 0 1px 0 rgba(255, 225, 170, 0.20); /* brillo superior */
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
    z-index: 10;
}

    /* Costura punteada interior */
    .login-card::after {
        content: "";
        position: absolute;
        inset: 9px;
        border: 1px dashed rgba(240, 184, 92, 0.30);
        border-radius: 12px;
        pointer-events: none;
    }

    /* Cinta dorada superior */
    .login-card::before {
        content: "🍂  Happy Thanksgiving  🌽";
        position: absolute;
        top: -18px;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        padding: 6px 20px;
        font-family: var(--serif);
        font-style: italic;
        font-weight: 600;
        font-size: 0.9rem;
        letter-spacing: 0.02em;
        color: var(--walnut-800);
        background: linear-gradient(180deg, #f9d27c 0%, #e4962f 100%);
        border: 1px solid #fff0c4;
        border-radius: 999px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 190, 70, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
        z-index: 2;
    }

/* Animación de entrada */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Título */
.login-card h2 {
    text-align: center;
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--gold-soft);
    margin-bottom: 1.8rem;
    text-shadow: 0 2px 0 rgba(42, 19, 5, 0.9), 0 0 22px rgba(255, 166, 43, 0.45);
}

    /* Separador bajo el título */
    .login-card h2::after {
        content: "";
        display: block;
        width: 84px;
        height: 2px;
        margin: 0.8rem auto 0;
        background: linear-gradient(90deg, transparent, var(--gold), transparent);
    }

/* ---------- Formulario ---------- */
.form-group {
    margin-bottom: 1.15rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.35rem;
        color: #f4d7a8;
        font-weight: 600;
        font-size: 0.85rem;
        letter-spacing: 0.01em;
    }

/* Inputs */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-icon {
    position: absolute;
    left: 1rem;
    color: #d9923a;
    z-index: 1;
    pointer-events: none;
    transition: color 0.25s ease;
}

.input-group:focus-within .input-group-icon {
    color: #ffd37f;
}

.input-group-icon.clickable {
    pointer-events: auto;
    cursor: pointer;
}

    .input-group-icon.clickable:hover {
        color: #ffbd59;
    }

.form-control {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.9rem;
    font-size: 0.95rem;
    color: #fff7e8;
    background: rgba(26, 12, 3, 0.78);
    border: 1.5px solid rgba(190, 128, 60, 0.60);
    border-radius: 10px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

    .form-control:hover {
        border-color: rgba(230, 160, 70, 0.85);
    }

    .form-control:focus {
        outline: none;
        border-color: #f4ad42;
        background: rgba(48, 24, 8, 0.92);
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(244, 173, 66, 0.20), 0 0 18px rgba(255, 166, 43, 0.28);
    }

    .form-control::placeholder {
        color: #b98650;
    }

    /* Evita el fondo blanco/azul del autocompletado del navegador */
    .form-control:-webkit-autofill,
    .form-control:-webkit-autofill:focus {
        -webkit-text-fill-color: #fff7e8;
        caret-color: #fff7e8;
        -webkit-box-shadow: 0 0 0 1000px #2c1507 inset;
        border-color: #f4ad42;
    }

/* Recuperar contraseña */
.forgot-password {
    display: inline-block;
    float: right;
    margin-top: 0.45rem;
    color: #ffc46b;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

    .forgot-password:hover,
    .forgot-password:focus-visible {
        color: #ffe3ad;
        border-bottom-color: rgba(255, 227, 173, 0.7);
        outline: none;
    }

/* Botón Login: texto oscuro sobre dorado para mejor contraste */
.btn-login {
    position: relative;
    overflow: hidden;
    clear: both;
    width: 100%;
    margin-top: 2.4rem;
    padding: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--walnut-900);
    background: linear-gradient(180deg, #fad07a 0%, #e8962a 55%, #cf7a1c 100%);
    border: 1px solid #ffe3a6;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(230, 154, 45, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

    /* Destello que cruza el botón al pasar el mouse */
    .btn-login::after {
        content: "";
        position: absolute;
        top: 0;
        left: -80%;
        width: 50%;
        height: 100%;
        background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
        transform: skewX(-20deg);
        pointer-events: none;
    }

    .btn-login:hover {
        transform: translateY(-2px);
        filter: brightness(1.06);
        box-shadow: 0 8px 28px rgba(240, 160, 50, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    }

        .btn-login:hover::after {
            left: 130%;
            transition: left 0.7s ease;
        }

    .btn-login:active {
        transform: translateY(0);
        filter: brightness(0.97);
    }

    .btn-login:focus-visible {
        outline: 3px solid rgba(255, 227, 173, 0.9);
        outline-offset: 3px;
    }

/* ---------- Footer ---------- */
.footer {
    background: linear-gradient(180deg, rgba(58, 28, 8, 0.88), rgba(36, 16, 4, 0.94));
    color: #efca94;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    border-top: 1px solid rgba(240, 184, 92, 0.75);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    z-index: 10;
}

/* ---------- Mensajes ---------- */
.error-message,
.success-message {
    padding: 9px 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.82rem;
}

.error-message {
    background: rgba(78, 26, 11, 0.9);
    color: #ffb199;
    border-left: 3px solid #e0603c;
}

    .error-message.show {
        display: flex;
        align-items: center;
        gap: 10px;
        animation: shake 0.5s ease;
    }

.success-message {
    background: rgba(24, 53, 28, 0.92);
    color: #c4eeb1;
    border-left: 3px solid #83b85c;
}

    .success-message.show {
        display: flex;
        align-items: center;
        gap: 10px;
    }

/* En tu CSS original faltaba esta animación */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-5px);
    }

    40%, 80% {
        transform: translateX(5px);
    }
}

/* ==========================================================
   HOJAS CAYENDO (opcional)
   Requiere este bloque en el HTML, justo después de <body>:
   <div class="leaves" aria-hidden="true">
       <span>🍂</span><span>🍁</span><span>🍂</span><span>🍁</span>
       <span>🍂</span><span>🍁</span><span>🍂</span>
   </div>
   ========================================================== */
.leaves {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4; /* detrás de la tarjeta, encima del fondo */
}

    .leaves span {
        position: absolute;
        top: -10vh;
        opacity: 0;
        font-size: 1.4rem;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
        animation: leafFall 16s linear infinite;
    }

        .leaves span:nth-child(1) {
            left: 8%;
            font-size: 1.2rem;
            animation-duration: 17s;
            animation-delay: 0s;
        }

        .leaves span:nth-child(2) {
            left: 22%;
            font-size: 1.6rem;
            animation-duration: 21s;
            animation-delay: 4s;
        }

        .leaves span:nth-child(3) {
            left: 38%;
            font-size: 1.1rem;
            animation-duration: 15s;
            animation-delay: 9s;
        }

        .leaves span:nth-child(4) {
            left: 55%;
            font-size: 1.5rem;
            animation-duration: 19s;
            animation-delay: 2s;
        }

        .leaves span:nth-child(5) {
            left: 70%;
            font-size: 1.2rem;
            animation-duration: 23s;
            animation-delay: 7s;
        }

        .leaves span:nth-child(6) {
            left: 84%;
            font-size: 1.7rem;
            animation-duration: 18s;
            animation-delay: 11s;
        }

        .leaves span:nth-child(7) {
            left: 93%;
            font-size: 1.3rem;
            animation-duration: 20s;
            animation-delay: 5s;
        }

@keyframes leafFall {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(0deg);
    }

    8% {
        opacity: 0.9;
    }

    25% {
        transform: translate(45px, 28vh) rotate(130deg);
    }

    50% {
        transform: translate(-25px, 58vh) rotate(260deg);
    }

    75% {
        transform: translate(40px, 86vh) rotate(400deg);
    }

    92% {
        opacity: 0.9;
    }

    100% {
        opacity: 0;
        transform: translate(-10px, 118vh) rotate(520deg);
    }
}

/* Respeta a quien desactiva animaciones en su sistema */
@media (prefers-reduced-motion: reduce) {
    .leaves {
        display: none;
    }

    .login-card,
    .error-message.show {
        animation: none;
    }

    .btn-login,
    .btn-login::after,
    .logoERP {
        transition: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .login-card {
        margin-left: 0;
        max-width: 380px;
        padding: 2.6rem 1.6rem 2rem;
    }

    .navbar-info,
    .navbar {
        padding: 0.75rem 1rem;
    }

    .door-pumpkin-container {
        left: 50%;
    }
}

@media (max-width: 480px) {
    .login-card {
        max-width: 100%;
    }

        .login-card::before {
            font-size: 0.8rem;
            padding: 5px 14px;
        }

        .login-card h2 {
            font-size: 1.7rem;
        }

    .center-content img {
        height: 45px;
    }

    .logoERP img {
        height: 30px;
    }

    .door-pumpkin-container img {
        height: 50px;
    }
}
