﻿/* ============================================
           🎄 CHRISTMAS MODE - Cambiar a false para desactivar
           ============================================ */
:root {
    --christmas-mode: 1; /* 1 = activado, 0 = desactivado */
}

* {
    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;
    background: linear-gradient( 135deg, #1a472a 0%, #2d5f3f 25%, #0f3460 50%, #1e5f8c 75%, #4a90b5 100% );
    position: relative;
    overflow-x: hidden;
}

/* ============================================
           🎄 ANIMACIONES NAVIDEÑAS
           ============================================ */

/* Copos de nieve cayendo */
.christmas-snowflake {
    position: fixed;
    top: -10px;
    opacity: calc(0.9 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: snowFall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

    .christmas-snowflake:nth-child(1) {
        left: 5%;
        animation-duration: 10s;
        animation-delay: 0s;
        font-size: 1.5rem;
    }

    .christmas-snowflake:nth-child(2) {
        left: 12%;
        animation-duration: 12s;
        animation-delay: 2s;
        font-size: 2rem;
    }

    .christmas-snowflake:nth-child(3) {
        left: 20%;
        animation-duration: 14s;
        animation-delay: 4s;
        font-size: 1.8rem;
    }

    .christmas-snowflake:nth-child(4) {
        left: 30%;
        animation-duration: 11s;
        animation-delay: 1s;
        font-size: 1.6rem;
    }

    .christmas-snowflake:nth-child(5) {
        left: 40%;
        animation-duration: 13s;
        animation-delay: 3s;
        font-size: 2.2rem;
    }

    .christmas-snowflake:nth-child(6) {
        left: 50%;
        animation-duration: 15s;
        animation-delay: 5s;
        font-size: 1.9rem;
    }

    .christmas-snowflake:nth-child(7) {
        left: 60%;
        animation-duration: 12s;
        animation-delay: 2.5s;
        font-size: 1.7rem;
    }

    .christmas-snowflake:nth-child(8) {
        left: 70%;
        animation-duration: 10s;
        animation-delay: 1.5s;
        font-size: 2.1rem;
    }

    .christmas-snowflake:nth-child(9) {
        left: 78%;
        animation-duration: 13s;
        animation-delay: 3.5s;
        font-size: 1.8rem;
    }

    .christmas-snowflake:nth-child(10) {
        left: 85%;
        animation-duration: 11s;
        animation-delay: 0.5s;
        font-size: 2rem;
    }

    .christmas-snowflake:nth-child(11) {
        left: 92%;
        animation-duration: 14s;
        animation-delay: 4.5s;
        font-size: 1.6rem;
    }

    .christmas-snowflake:nth-child(12) {
        left: 97%;
        animation-duration: 12s;
        animation-delay: 2.8s;
        font-size: 1.9rem;
    }

@keyframes snowFall {
    0% {
        transform: translateY(-10px) translateX(0) rotate(0deg);
        opacity: calc(0 * var(--christmas-mode));
    }

    10% {
        opacity: calc(1 * var(--christmas-mode));
    }

    90% {
        opacity: calc(1 * var(--christmas-mode));
    }

    100% {
        transform: translateY(100vh) translateX(100px) rotate(360deg);
        opacity: calc(0 * var(--christmas-mode));
    }
}

/* Santa Claus volando */
.christmas-santa {
    position: fixed;
    font-size: 4rem;
    opacity: calc(0.9 * var(--christmas-mode));
    pointer-events: none;
    z-index: 2;
    animation: santaFly 25s linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.santa-1 {
    top: 15%;
    animation-delay: 0s;
}

.santa-2 {
    top: 60%;
    animation-delay: 12.5s;
}

@keyframes santaFly {
    0% {
        left: -10%;
        transform: scaleX(1) translateY(0);
    }

    25% {
        transform: scaleX(1) translateY(-10px);
    }

    50% {
        transform: scaleX(1) translateY(0);
    }

    75% {
        transform: scaleX(1) translateY(-10px);
    }

    100% {
        left: 110%;
        transform: scaleX(1) translateY(0);
    }
}

/* Rodolfo el reno */
.christmas-reindeer {
    position: fixed;
    font-size: 3.5rem;
    opacity: calc(0.85 * var(--christmas-mode));
    pointer-events: none;
    z-index: 2;
    animation: reindeerRun 22s linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.reindeer-1 {
    top: 25%;
    animation-delay: 5s;
}

.reindeer-2 {
    bottom: 20%;
    animation-delay: 16s;
}

@keyframes reindeerRun {
    0% {
        left: -10%;
        transform: scaleX(1) translateY(0);
    }

    48% {
        transform: scaleX(1) translateY(-8px);
    }

    50% {
        transform: scaleX(1) translateY(0);
    }

    100% {
        left: 110%;
        transform: scaleX(1) translateY(0);
    }
}

/* Árboles de Navidad */
.christmas-tree {
    position: fixed;
    font-size: 4rem;
    opacity: calc(0.8 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: treeSway 6s ease-in-out infinite;
}

.tree-1 {
    bottom: 5%;
    left: 8%;
    animation-delay: 0s;
}

.tree-2 {
    bottom: 8%;
    right: 8%;
    animation-delay: 3s;
}

@keyframes treeSway {
    0%, 100% {
        transform: rotate(-3deg) scale(1);
    }

    50% {
        transform: rotate(3deg) scale(1.05);
    }
}

/* Muñecos de nieve */
.christmas-snowman {
    position: fixed;
    font-size: 3.5rem;
    opacity: calc(0.85 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: snowmanWiggle 4s ease-in-out infinite;
}

.snowman-1 {
    bottom: 12%;
    left: 18%;
    animation-delay: 0s;
}

.snowman-2 {
    bottom: 15%;
    right: 18%;
    animation-delay: 2s;
}

@keyframes snowmanWiggle {
    0%, 100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* Galletas de jengibre */
.christmas-gingerbread {
    position: fixed;
    font-size: 2.5rem;
    opacity: calc(0.8 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: gingerbreadSpin 15s linear infinite;
}

.gingerbread-1 {
    top: 30%;
    left: 10%;
    animation-delay: 0s;
}

.gingerbread-2 {
    bottom: 35%;
    right: 10%;
    animation-delay: 7.5s;
}

@keyframes gingerbreadSpin {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: calc(0 * var(--christmas-mode));
    }

    10% {
        opacity: calc(1 * var(--christmas-mode));
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    90% {
        opacity: calc(1 * var(--christmas-mode));
    }

    100% {
        transform: rotate(360deg) scale(1);
        opacity: calc(0 * var(--christmas-mode));
    }
}

/* Regalos */
.christmas-gift {
    position: fixed;
    font-size: 2.8rem;
    opacity: calc(0.8 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: giftBounce 3s ease-in-out infinite;
}

.gift-1 {
    top: 40%;
    left: 15%;
    animation-delay: 0s;
}

.gift-2 {
    bottom: 40%;
    right: 15%;
    animation-delay: 1.5s;
}

@keyframes giftBounce {
    0%, 100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

/* Estrellas brillantes */
.christmas-star {
    position: fixed;
    font-size: 2rem;
    opacity: calc(0.9 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: starTwinkle 2s ease-in-out infinite;
}

.star-1 {
    top: 10%;
    left: 25%;
    animation-delay: 0s;
}

.star-2 {
    top: 20%;
    right: 25%;
    animation-delay: 1s;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: calc(0.4 * var(--christmas-mode));
        transform: scale(0.8);
    }

    50% {
        opacity: calc(1 * var(--christmas-mode));
        transform: scale(1.2);
    }
}

/* Campanas */
.christmas-bell {
    position: fixed;
    font-size: 2.5rem;
    opacity: calc(0.75 * var(--christmas-mode));
    pointer-events: none;
    z-index: 1;
    animation: bellRing 2s ease-in-out infinite;
}

.bell-1 {
    top: 35%;
    right: 22%;
    animation-delay: 0s;
}

.bell-2 {
    bottom: 45%;
    left: 22%;
    animation-delay: 1s;
}

@keyframes bellRing {
    0%, 100% {
        transform: rotate(-15deg);
    }

    25% {
        transform: rotate(15deg);
    }

    50% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

/* Efecto de brillo navideño en el card */
.login-card {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 calc(40px * var(--christmas-mode)) rgba(220, 20, 60, 0.4), 0 0 calc(60px * var(--christmas-mode)) rgba(34, 139, 34, 0.3);
    border: 2px solid rgba(255, 215, 0, calc(0.3 * var(--christmas-mode)));
}

/* Navbar superior */
.navbar-info {
    background: linear-gradient(135deg, #165e3f 0%, #1a472a 100%);
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #c41e3a;
}

.logoERP img {
    height: 50px;
    object-fit: contain;
    filter: brightness(1.2);
}

/* Navbar secundaria */
.navbar {
    background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border-bottom: 2px solid #ffd700;
}

.loginheadertittle {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Contenedor principal */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Card de login */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.4s ease-out;
    position: relative;
    z-index: 10;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    text-align: center;
    background: linear-gradient(135deg, #c41e3a 0%, #228b22 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-size: 1.875rem;
    font-weight: 700;
}

/* Formulario */
.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        color: #555;
        font-weight: 500;
        font-size: 0.9rem;
    }

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-icon {
    position: absolute;
    left: 1rem;
    color: #165e3f;
    z-index: 1;
    pointer-events: none;
}

    .input-group-icon.clickable {
        pointer-events: auto;
        cursor: pointer;
        transition: color 0.3s ease;
    }

        .input-group-icon.clickable:hover {
            color: #c41e3a;
        }

.form-control {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

    .form-control:focus {
        outline: none;
        border-color: #165e3f;
        background: white;
        box-shadow: 0 0 0 3px rgba(22, 94, 63, 0.1);
    }

    .form-control::placeholder {
        color: #adb5bd;
    }

/* Link de contraseña olvidada */
.forgot-password {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    color: #c41e3a;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: #165e3f;
    }

/* Botón de login */
.btn-login {
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #c41e3a 0%, #228b22 50%, #165e3f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(196, 30, 58, 0.4);
        background: linear-gradient(135deg, #a01729 0%, #1a6e3a 50%, #0f3d28 100%);
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* Footer */
.footer {
    background: linear-gradient(135deg, #165e3f 0%, #1a472a 100%);
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    border-top: 2px solid #c41e3a;
}

/* Mensajes */
.error-message {
    background: #fff5f5;
    color: #c53030;
    padding: 12px 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
    font-size: 0.9rem;
    border-left: 4px solid #f56565;
}

    .error-message.show {
        display: block;
        animation: shake 0.5s ease;
    }

    .error-message i {
        font-size: 20px;
        color: #eb3b5a;
    }

.success-message {
    background: #f0fff4;
    color: #165e3f;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
    font-size: 0.9rem;
    border-left: 4px solid #228b22;
    animation: slideIn 0.5s ease;
}

    .success-message.show {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .success-message i {
        font-size: 20px;
        color: #228b22;
    }

/* Responsivo */
@media (max-width: 768px) {
    .navbar-info,
    .navbar {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .loginheadertittle {
        font-size: 1rem;
    }

    .christmas-santa,
    .christmas-reindeer {
        font-size: 3rem;
    }

    .christmas-tree {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
    }

        .login-card h2 {
            font-size: 1.5rem;
        }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
