﻿/* =========================================
   1. CONFIGURACIÓN GLOBAL (EFECTO APP)
   ========================================= */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.background-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

    .background-wrapper::-webkit-scrollbar {
        display: none;
    }

.background-wrapper {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.login-content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   2. TARJETA DE LOGIN
   ========================================= */
.login-card {
    background: rgba(250, 250, 250, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================
   3. BOTONES Y TEXTOS
   ========================================= */
.btn-azul {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
    border: none;
}

    .btn-azul:hover {
        background-color: #0b5ed7;
        color: white;
    }

.footer-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.fileText {
    color: dodgerblue;
}

.managerText {
    color: darkorange;
}

/* =========================================
   4. BOTÓN DE AYUDA (FIXED)
   ========================================= */
.help-button-fixed {
    position: fixed !important;
    top: 0;
    right: 0;
    margin: 1.5rem;
    /* CORRECCIÓN: Z-Index 1030 para que el Offcanvas (1045) lo tape */
    z-index: 1030;
}

@keyframes radar-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
        border-color: #ffc107;
        color: #ffc107;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: scale(1);
        border-color: white;
        color: white;
    }
}

.btn-attention {
    animation: radar-pulse 2s infinite;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* =========================================
   5. OFFCANVAS
   ========================================= */
.offcanvas-glass {
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(15px);
    color: white;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.link-item {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .link-item:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
        color: #ffc107;
        transform: translateX(5px);
    }

/* =========================================
   6. RESPONSIVIDAD Y MODO COMPACTO (CRUCIAL)
   ========================================= */

.logo-responsive {
    max-height: 140px;
    transition: all 0.3s ease;
    /* Margen por defecto para pantallas ALTAS (Monitores PC) */
    margin-top: 5vh;
}

/* --- REGLA MAESTRA PARA LAPTOPS Y PANTALLAS CHATAS --- */
/* Se activa si el alto de la pantalla es menor a 850px */
@media (max-height: 850px) {

    /* 1. Logo pequeño y SIN mucho margen para que quepa todo */
    .logo-responsive {
        max-height: 80px !important;
        margin-top: 1rem !important; /* Margen mínimo necesario */
        margin-bottom: 0.5rem !important;
    }

    /* 2. Reducir tamaño de títulos */
    h1.fs-2 {
        font-size: 1.5rem !important;
    }

    .text-center.mb-4 {
        margin-bottom: 0.5rem !important;
    }

    /* 3. Comprimir la tarjeta */
    .login-card .card-body {
        padding: 1.5rem !important;
    }

    /* 4. Inputs compactos */
    .form-floating.mb-3 {
        margin-bottom: 0.5rem !important;
    }

    .form-floating.mb-4 {
        margin-bottom: 0.8rem !important;
    }

    .form-control {
        height: 3rem !important;
        min-height: 3rem !important;
    }

    .form-floating > label {
        padding: 0.5rem 0.75rem !important;
    }

    /* 5. Footer pegadito */
    .footer-text {
        margin-top: 0.5rem !important;
        padding-bottom: 0 !important;
    }

    /* Botón ayuda un poco más chico */
    .help-button-fixed {
        margin: 0.5rem;
        transform: scale(0.85);
    }
}

@media (max-width: 576px) {
    .logo-responsive {
        max-height: 60px !important;
        margin-top: 1rem !important;
    }

    .help-button-fixed {
        display: none;
    }
}
