@font-face {
    font-family: 'LEGAFONT-Bold';
    src: url('/fuentes/LEGAFONT-700-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'LEGAFONT-Regular';
    src: url('/fuentes/LEGAFONT-400-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'LEGAFONT-Light';
    src: url('/fuentes/LEGAFONT-300-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Manrope-Regular';
    src: url('/fuentes/Manrope-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Manrope-Bold';
    src: url('/fuentes/Manrope-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

* {
    margin: 0;
    box-sizing: border-box;
    font-family: 'Manrope-Regular', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'LEGAFONT-Bold', sans-serif;
}

body {
    background-color: #090f12;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: #0b0f13;
    position: relative;
    min-height: 100vh;
    margin: 0;
    margin-left: 10vw;
    animation: fadeInBackground 1s ease forwards;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    border: none !important;
    outline: none !important;
}

body.loaded {
    opacity: 1;
}

@keyframes fadeInBackground {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate {
    opacity: 0;
    transform: translateY(-2vh);
    animation: fadeInFromTop 0.5s ease forwards;
}

@keyframes fadeInFromTop {
    to { opacity: 1; transform: translateY(0); }
}

:root {
    --primary-color: #D4AF37;
    --text-dark: #2C3E50;
    --text-light: #FFFFFF;
    --background-dark: rgba(0, 0, 0, 0.8);
    --border-dark: rgba(255, 255, 255, 0.2);
    --gradient-blue: linear-gradient(to right, rgba(0, 153, 255, 0.3), rgba(0, 153, 255, 0.1));
}

.transform-scale-hover:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.transform-lift-hover:hover {
    transform: translateY(-0.2vh);
    transition: transform 0.2s ease;
}

.color-primary-hover:hover {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.header {
    display: flex;
    align-items: center;
    height: 80px;
    background: linear-gradient(to bottom, #090f12 60%, rgba(9, 15, 18, 0) 100%);
    padding: 10px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1003;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1007;
}

.hamburger {
    display: block;
    width: 24px;
    height: 16px;
    position: relative;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    left: 0;
    transition: background-color 0.3s ease;
}

.hamburger::before { top: 0; }
.hamburger span { top: 50%; transform: translateY(-50%); }
.hamburger::after { bottom: 0; }

.menu-btn:hover .hamburger::before,
.menu-btn:hover .hamburger::after,
.menu-btn:hover .hamburger span {
    background-color: var(--primary-color);
}

.header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 85px;
    width: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1008;
    top: 0%;
    filter: brightness(1);
}

.header-logo:hover {
    transform: translateX(-50%) scale(1.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1005;
    margin-left: auto;
}

.search-btn, .user-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 17px;
    position: relative;
    transition: right 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1006;
}

.header-icon {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: transform 0.5s ease, filter 0.3s ease;
}

.search-btn:hover .search-icon {
    transform: rotate(360deg) scale(1.2);
    filter: invert(70%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
}

.user-btn:hover .off-icon {
    animation: swing 0.6s infinite alternate ease-in-out;
    filter: invert(70%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(120%) contrast(90%);
}

@keyframes swing {
    0% { transform: rotate(15deg); }
    100% { transform: rotate(-15deg); }
}

.search-wrapper {
    position: relative;
    display: inline-block;
}

#search-bar {
    display: none;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    padding: 8px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-size: clamp(14px, 1.2vw, 16px);
    outline: none;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1004;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#search-bar.active,
#search-suggestions.active {
    display: block;
    width: 260px;
}

#search-bar::placeholder {
    color: #7F8C8D;
}

#search-suggestions {
    display: none;
    position: absolute;
    right: 60px;
    top: calc(100% + 8px);
    width: 260px;
    max-height: 200px;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1200;
    pointer-events: auto;
}

.empleados-search-bar {
    display: block;
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    padding: 10px 10px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    color: var(--text-light);
    font-size: clamp(14px, 1.2vw, 16px);
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1004;
    transition: box-shadow 0.3s ease;
}

.empleados-search-bar:focus {
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
    border-color: var(--text-light);
}

.empleados-search-bar::placeholder {
    color: #7F8C8D;
}

.empleados-search-suggestions {
    display: none;
    position: absolute;
    left: 40px;
    top: 100%;
    width: 280px;
    max-height: 240px;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1005;
    animation: slideDown 0.3s ease forwards;
}

.empleados-search-suggestions.active {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-suggestions .suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    font-size: clamp(14px, 1.2vw, 15px);
    cursor: pointer;
    border-bottom: 1px solid var(--border-dark);
    transition: background-color 0.2s ease;
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestions .suggestion-item:hover,
.search-suggestions .suggestion-item.selected {
    background-color: rgba(212, 175, 55, 0.3);
}

.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #090f12;
}

.menu-text {
    display: block;
    text-align: center;
    font-family: 'LEGAFONT-Bold', sans-serif;
}

.not-finished {
    display: block;
    color: var(--primary-color);
    font-size: clamp(8px, 0.8vw, 10px);
    font-weight: 400;
    margin-top: 2px;
    text-align: center;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -20vw;
    width: 20vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border-right: 0.1vw solid var(--primary-color);
    padding: 2vw;
    z-index: 1020;
    transition: left 0.3s ease;
    pointer-events: auto;
    font-family: 'LEGAFONT-Bold', sans-serif;
}

.sidebar.active {
    left: 0;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5vw 0;
    margin: 0;
    border-bottom: 0.2vw solid var(--primary-color);
}

.sidebar-logo .logo {
    transform: translateX(13px);
    width: 90%;
    max-width: 150px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}
/* FORZAR TAMAÑO DE LA FLECHA DEL SIDEBAR (igual que en las otras páginas) */
.external-link-icon {
    width: 16px !important;
    height: 16px !important;
    margin-left: 5px;
    vertical-align: middle;
    transform: rotate(180deg);
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

/* Evitar que se agrande al hover del enlace */
.sidebar-menu a:hover .external-link-icon {
    transform: rotate(180deg) scale(1) !important;
}


@keyframes pulse {
    0% { transform: translateX(13px) scale(1); }
    50% { transform: translateX(13px) scale(1.08); }
    100% { transform: translateX(13px) scale(1); }
}

@keyframes wiggle {
    0% { transform: translateX(2px) rotate(0deg) scale(1); }
    25% { transform: translateX(2px) rotate(5deg) scale(1.05); }
    50% { transform: translateX(2px) rotate(0deg) scale(1); }
    75% { transform: translateX(2px) rotate(-5deg) scale(1.05); }
    100% { transform: translateX(2px) rotate(0deg) scale(1); }
}

.sidebar-menu {
    padding: 0;
    margin: 2vw 0 0 0;
    margin-top: 20px;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vw;
}

.sidebar-menu li {
    width: 100%;
    text-align: center;
}

.sidebar-menu li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8vw;
    transition: transform 0.3s ease;
    color: var(--text-light);
    text-decoration: none;
    font-size: clamp(0.8rem, 1vw, 1rem);
    font-family: 'LEGAFONT-Bold', sans-serif;
}

.sidebar-menu li a:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

.sidebar-menu .menu-logo {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 4px;
    background-color: var(--text-light);
}

.carousel {
    position: fixed;
    top: 5px;
    left: 5px;
    width: calc(100% - 10px);
    height: calc(100vh - 10px);
    overflow: hidden;
    z-index: -1;
    box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.8);
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    filter: brightness(60%) contrast(110%);
    box-shadow: inset 0 0 15vw 6vw rgba(0, 0, 0, 0.9);
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.carousel-item.active {
    opacity: 0.8;
    z-index: 2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.email-container {
    position: absolute;
    right: 10vw;
    top: 20vh;
    width: 22vw;
    min-width: 320px;
    height: auto;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1015;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-email-text {
    color: var(--text-light);
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 500;
    text-align: center;
    word-break: break-all;
}

.calendar-container {
    position: fixed;
    top: 20vh;
    left: 10vw;
    transform: none;
    width: 30vw;
    height: 68vh;
    min-width: 400px;
    max-width: 600px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1015;
    overflow: auto;
}

.calendar-container::after {
    content: 'No se pudo cargar el calendario. Por favor, intenta de nuevo más tarde.';
    display: none;
    color: var(--text-light);
    font-size: clamp(12px, 1.2vw, 14px);
    text-align: center;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1017;
}

.calendar-container iframe:not([src])::after {
    display: block;
}

.calendar-title {
    color: var(--primary-color);
    font-size: clamp(16px, 1.5vw, 18px);
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.center-container {
    position: fixed;
    top: 12vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    z-index: 1010;
}

.qr-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.qr-container a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.qr-label {
    color: var(--text-light);
    font-size: clamp(10px, 1.2vw, 12px);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.qr-container a:hover .qr-label {
    color: var(--primary-color);
}

.qr-code {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background-color: var(--text-light);
    padding: 4px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.qr-code:hover {
    transform: scale(1.1);
    border-color: var(--text-light);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.wifi-container {
    width: 100%;
    max-width: 400px;
}

.wifi-table {
    width: 100%;
    table-layout: auto;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-collapse: collapse;
}

.wifi-table th,
.wifi-table td {
    padding: 6px 8px;
    color: var(--text-light);
    font-size: clamp(10px, 1vw, 11px);
    text-align: left;
    border-bottom: 1px solid var(--border-dark);
    min-width: 40px;
}

.wifi-table th {
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    background: #0d0d0d;
}

.wifi-table td {
    font-weight: 400;
}

.wifi-row:hover {
    background-color: rgba(212, 175, 55, 0.3);
}

/* === ANIMACIÓN BOTÓN WIFI === */
.show-password {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(0) invert(1);
}

.show-password:hover {
    transform: scale(1.2);
    filter: invert(70%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
}

.show-password.visible {
    filter: invert(70%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
    animation: pulse 0.6s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}
/* === OJO ANIMADO WIFI (SVG + CSS) === */
.wifi-eye-container {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wifi-eye-container input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    cursor: pointer;
}

.wifi-eye {
    position: absolute;
    width: 100%;
    height: 100%;
    fill: #ffffff;
    transition: fill 0.3s ease;
    animation: eye-appear 0.5s ease-out forwards;
}

.wifi-eye-slash {
    position: absolute;
    width: 100%;
    height: 100%;
    fill: #d4af37;
    display: none;
    animation: eye-appear 0.5s ease-out forwards;
}

.wifi-eye-container input:checked ~ .wifi-eye {
    display: none;
}

.wifi-eye-container input:checked ~ .wifi-eye-slash {
    display: block;
}

.wifi-eye-container:hover .wifi-eye,
.wifi-eye-container:hover .wifi-eye-slash {
    fill: #d4af37;
    transform: scale(1.15);
    transition: fill 0.3s ease, transform 0.2s ease;
}

@keyframes eye-appear {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
.note {
    font-size: clamp(8px, 0.8vw, 9px);
    color: var(--primary-color);
    font-style: italic;
}

.match-container {
    width: 100%;
    max-width: 390px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
    z-index: 1010;
}

.match-details-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.match-arrow {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: clamp(14px, 1.3vw, 16px);
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.3s ease, background 0.3s ease;
}

.match-arrow:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.match-details {
    text-align: center;
    width: 100%;
    padding: 8px 0;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 40%;
}

.team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.team span {
    color: var(--text-light);
    font-size: clamp(9px, 0.9vw, 11px);
    font-weight: 500;
}

.match-time {
    color: var(--primary-color);
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 4px;
}

.match-date {
    color: var(--text-light);
    font-size: clamp(9px, 0.9vw, 11px);
    font-weight: 400;
    margin-bottom: 6px;
}

.match-center {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-dark);
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.2s ease;
}

.match-center:hover {
    background: var(--text-light);
    transform: translateY(-2px);
}

.match-notice {
    display: block;
    color: var(--primary-color);
    font-size: clamp(9px, 0.8vw, 11px);
    font-weight: 400;
    text-align: center;
    margin-bottom: 6px;
}
/* === ESTADIO DEL PARTIDO === */
.stadium-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.stadium-image {
    display: none;
    width: 200px !important;   /* DOBLE DE GRANDE */
    height: 140px !important;  /* DOBLE DE GRANDE */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    border: 2px solid var(--primary-color);
}

/* Responsive: más pequeño en móviles */
@media (max-width: 768px) {
    .stadium-image {
        width: 140px !important;
        height: 100px !important;
    }
}

@media (max-width: 480px) {
    .stadium-image {
        width: 120px !important;
        height: 85px !important;
    }
}

.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background: radial-gradient(
        circle at center,
        rgba(26, 26, 26, 0.9) 30%,
        rgba(13, 13, 13, 0.7) 60%,
        rgba(13, 13, 13, 0) 85%
    );
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    margin: 0 auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.8s ease forwards;
    z-index: 1025;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: radial-gradient(
        circle at center,
        rgba(26, 26, 26, 0.5) 20%,
        transparent 70%
    );
    z-index: -1;
    border-radius: 20px;
    filter: blur(3px);
}

.login-logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-box {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(13, 13, 13, 0.8));
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 2.5rem;
    width: 100%;
    max-width: 350px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.login-box h2 {
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-box p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.g_id_signin {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.g_id_signin:hover {
    transform: scale(1.15);
}

.error-message {
    color: #ff4d4d;
    font-size: 0.9rem;
    margin-top: 1rem;
    background: rgba(255, 77, 77, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

body.login-page {
    margin-left: 0;
}

.overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: transparent;
}

.employees-page {
    min-height: 100vh;
    display: flex;
    padding: 80px 20px 20px 270px;
}

.employees-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-left: 250px;
    margin-top: 2%;
}

#loading-message {
    color: var(--primary-color);
    font-size: clamp(16px, 1.2vw, 18px);
    text-align: center;
}

.department-column {
    position: fixed;
    top: 80px;
    left: 0;
    width: 250px;
    height: calc(100vh - 80px);
    background: #090f12;
    border-right: 2px solid var(--primary-color);
    padding: 20px;
    z-index: 1010;
    overflow-y: auto;
}

#department-list {
    list-style: none;
}

.department-item {
    padding: 10px;
    color: var(--text-light);
    font-size: clamp(14px, 1.2vw, 15px);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    background: transparent !important;
}

.department-item.active {
    background: transparent !important;
}

.subdepartment-item {
    padding: 8px 10px 8px 20px;
    color: var(--text-light);
    font-size: clamp(13px, 1.1vw, 14px);
    font-weight: 400;
    cursor: pointer;
    transition: color 0.3s ease, opacity 0.5s ease;
    background: transparent !important;
}

.subdepartment-item.active {
    color: var(--primary-color);
    background: transparent !important;
}

.department-item:hover, .subdepartment-item:hover {
    color: var(--primary-color);
}

.departments-btn {
    display: none;
}

#employee-container {
    width: 100%;
}

.employee-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px 0;
}

.employee-item {
    background: #1a202c;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.employee-item.special-employee {
    border-color: #0055D4;
}

.employee-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.employee-item h3 {
    color: var(--text-light);
    font-size: clamp(14px, 1.2vw, 15px);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.employee-item p {
    color: #e2e8f0;
    font-size: clamp(12px, 1.2vw, 13px);
    margin: 5px 0;
}

.employee-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.employee-item a:hover {
    text-decoration: underline;
}

.employee-image-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background-color: #e6e6e6;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.employee-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.department-column::-webkit-scrollbar,
#employee-container::-webkit-scrollbar {
    width: 6px;
}

.department-column::-webkit-scrollbar-thumb,
#employee-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.department-column::-webkit-scrollbar-track,
#employee-container::-webkit-scrollbar-track {
    background: #090f12;
}

.department-column,
#employee-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #090f12;
}

.social-icons {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.social-links {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.social-icon {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

.departments-toggle {
    width: 100%;
    text-align: center;
}

#departments-toggle {
    display: block;
    padding: 0.8vw;
    color: var(--text-light);
    text-decoration: none;
    font-size: clamp(0.8rem, 1vw, 1rem);
    transition: transform 0.3s ease, color 0.3s ease;
}

#departments-toggle:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

.departments-list {
    margin-top: 0.5vw;
    padding-left: 1vw;
    list-style: none;
}

.departments-list li {
    text-align: center;
}

.departments-list li a {
    display: block;
    padding: 0.4vw;
    color: var(--text-light);
    text-decoration: none;
    font-size: clamp(0.7rem, 0.9vw, 0.9rem);
    transition: transform 0.3s ease, color 0.3s ease;
}

.departments-list li a:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.news-container {
    position: absolute;
    top: 16vh;
    left: calc(55% + 320px);
    width: 25vw;
    max-width: 350px;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: auto;
}

.news-title {
    color: var(--primary-color);
    font-size: clamp(16px, 1.5vw, 18px);
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
}

#add-news-btn {
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    width: 100%;
    font-size: clamp(12px, 1.2vw, 14px);
    transition: background 0.3s ease, transform 0.2s ease;
}

#add-news-btn:hover {
    background: var(--text-light);
    transform: scale(1.05);
}

#news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    position: relative;
}

.news-item h4 {
    color: var(--text-light);
    font-size: clamp(14px, 1.2vw, 16px);
    margin-bottom: 5px;
}

.news-item p {
    color: var(--text-light);
    font-size: clamp(12px, 1.1vw, 14px);
}

.news-item img {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 5px;
}

.delete-news-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4d4d;
    color: var(--text-light);
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: clamp(10px, 0.9vw, 12px);
    transition: background 0.3s ease;
}

.delete-news-btn:hover {
    background: #cc0000;
}

#news-form {
    position: absolute;
    top: calc(16vh + 110px + 10px);
    left: calc(55% + 320px);
    width: 25vw;
    max-width: 350px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(13, 13, 13, 0.9));
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    z-index: 1020;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#news-form h4 {
    color: var(--primary-color);
    font-size: clamp(13px, 1.2vw, 14px);
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
}

#news-form label {
    color: var(--text-light);
    font-size: clamp(10px, 0.9vw, 11px);
    font-weight: 500;
    display: block;
    margin-top: 6px;
}

#news-form input,
#news-form textarea,
#news-form select {
    width: 100%;
    padding: 6px;
    margin-top: 3px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: #090f12;
    color: var(--text-light);
    font-size: clamp(10px, 0.9vw, 11px);
    font-weight: 400;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#news-form input:focus,
#news-form textarea:focus,
#news-form select:focus {
    border-color: var(--text-light);
    box-shadow: 0 0 4px rgba(212, 175, 55, 0.5);
    outline: none;
}

#news-form input[type="file"] {
    padding: 2px;
    background: transparent;
    border: none;
    font-size: clamp(9px, 0.8vw, 10px);
}

#news-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #090f12 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8"><polygon fill="%23D4AF37" points="0,0 8,0 4,8"/></svg>') no-repeat right 6px center;
    background-size: 8px;
    padding-right: 20px;
}

#news-form textarea {
    resize: vertical;
    min-height: 50px;
    max-height: 100px;
}

#news-form button {
    margin-top: 8px;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(10px, 0.9vw, 11px);
    font-weight: 500;
    width: 48%;
    margin-left: 1%;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

#news-form button[type="submit"] {
    background: var(--primary-color);
    color: var(--text-dark);
}

#news-form button[type="submit"]:hover {
    background: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.3);
}

#news-form button[type="button"] {
    background: #555;
    color: var(--text-light);
}

#news-form button[type="button"]:hover {
    background: #777;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.identity-page {
    min-height: 100vh;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: #090f12;
    box-sizing: border-box;
}

.identity-page header.header {
    background: #090f12;
    border-bottom: 4px solid var(--primary-color) !important;
    z-index: 1004;
    height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.identity-header {
    background: #090f12;
    border-bottom: 4px solid var(--primary-color);
}

.identity-gallery {
    max-width: 1000px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
    margin-left: 5vw;
    padding: 20px 0;
    box-sizing: border-box;
    margin-right: 15%;
}

.gallery-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    justify-items: center;
    align-items: center;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
}

.gallery-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    transition: transform 0.3s ease, filter 0.3s ease;
    background: #21242985;
}

.positive-background .gallery-image {
    filter: brightness(1.2);
    background: #21242985;
}

.gallery-image:hover {
    transform: scale(1.05);
    filter: brightness(1.3);
}

.gallery-item p {
    color: var(--text-light);
    font-size: clamp(12px, 1.1vw, 13px);
    margin-top: 8px;
    margin-bottom: 8px;
}

.download-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.download-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
}

.download-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.download-btn:hover .download-icon {
    filter: invert(70%) sepia(60%) saturate(600%) hue-rotate(20deg) brightness(95%) contrast(90%);
}

.pdf-link {
    display: block;
    margin-top: 30px;
    color: var(--primary-color);
    font-size: clamp(14px, 1.2vw, 16px);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.pdf-link:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--text-light);
    transform: scale(1.05);
}

@media (min-width: 769px) {
    .calendar-container {
        left: 20%;
        transform: translateX(-50%);
        top: 15vh;
        width: 30vw;
        min-width: 400px;
        max-width: 600px;
        height: 68vh;
    }
    .email-container {
        right: 10vw;
        top: 20vh;
        width: 22vw;
        min-width: 320px;
    }
    .qr-container {
        flex-direction: row;
        gap: 1.5vw;
        align-items: center;
        justify-content: center;
    }
    .qr-label {
        font-size: clamp(0.6rem, 1vw, 0.8rem);
        white-space: nowrap;
        text-align: center;
    }
    .qr-code {
        width: 8vw;
        height: 8vw;
        min-width: 60px;
        min-height: 60px;
        border: 0.2vw solid var(--primary-color);
        border-radius: 0.8vw;
        padding: 0.4vw;
    }
    .wifi-container {
        width: 25vw;
        max-width: 400px;
    }
    .wifi-table th,
    .wifi-table td {
        padding: 6px 8px;
        font-size: clamp(10px, 1vw, 11px);
    }
    .show-password {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
    }
    .center-container {
        height: 50vh;
        max-height: 500px;
        left: 50.5%;
        gap: 25px;
    }
    .news-container {
        left: 61%;
        width: 30vw;
        max-width: 500px;
        top: 15vh;
    }
    #news-form {
        left: 15%;
        width: 25vw;
        max-width: 350px;
        top: 12vh;
        margin-top: 0;
    }
    .note {
        font-size: clamp(0.5rem, 0.8vw, 0.6rem);
    }
    .match-container {
        width: 100%;
        max-width: 400px;
    }
    .stadium-container img {
        max-width: 50% !important;
        height: auto !important;
    }
    .match-arrow {
        font-size: clamp(18px, 1.6vw, 20px);
        padding: 5px 12px;
    }
    .match-league {
        font-size: clamp(14px, 1.3vw, 16px);
        margin-bottom: 10px;
    }
    .team {
        width: 35%;
        gap: 8px;
    }
    .team-logo {
        width: 60px;
        height: 60px;
    }
    .team span {
        font-size: clamp(12px, 1.1vw, 14px);
    }
    .match-time {
        font-size: clamp(16px, 1.5vw, 18px);
        padding: 6px 12px;
    }
    .match-date {
        font-size: clamp(12px, 1.1vw, 14px);
        margin-bottom: 10px;
    }
    .match-center {
        font-size: clamp(14px, 1.3vw, 16px);
        padding: 10px 15px;
    }
    .login-container {
        margin-top: 6vh;
    }
    .login-box {
        padding: 3vw;
        max-width: 40vw;
        margin-top: 40px;
    }
    .login-box h2 {
        font-size: clamp(1.2rem, 2vw, 1.5rem);
    }
    .form-group label {
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
    .form-group input {
        padding: 1vw;
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
    .login-button {
        padding: 1.2vw;
        font-size: clamp(0.8rem, 1.4vw, 1rem);
    }
    .error-message {
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
    .employees-page {
        padding: 6vh 2vw;
    }
    .employee-list {
        grid-template-columns: repeat(auto-fit, minmax(20vw, 1fr));
        gap: 2vw;
    }
    .employee-item {
        padding: 1.5vw;
    }
    .employee-item h3 {
        font-size: clamp(0.8rem, 1.4vw, 1rem);
    }
    .employee-item p {
        font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    }
    .sidebar {
        width: 15vw;
        left: -15vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar-logo .logo {
        width: 80%;
        max-width: 130px;
        margin: 0;
    }
    .sidebar-menu {
        margin-top: 20px;
        gap: 1.2vw;
    }
    .sidebar-menu li a {
        padding: 0.8vw;
        font-size: clamp(0.8rem, 1vw, 1rem);
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar-menu .menu-logo {
        width: 40px;
        height: 40px;
    }
    .header-icon {
        width: 26px;
        height: 26px;
    }
    .social-icons {
        bottom: 20px;
        gap: 15px;
    }
    .social-icon {
        width: 30px;
        height: 30px;
    }
    #search-bar.active,
    #search-suggestions.active {
        width: 260px;
    }
    #search-suggestions {
        right: 60px;
        width: 260px;
        max-height: 200px;
        font-size: clamp(14px, 1.2vw, 16px);
    }
    .empleados-search-bar {
        width: 280px;
    }
    .empleados-search-suggestions {
        width: 280px;
        max-height: 240px;
        font-size: clamp(14px, 1.2vw, 15px);
    }
    .empleados-user-btn {
        margin-left: 290px;
    }
    .news-page .center-container {
        max-width: 600px;
        gap: 30px;
    }
    .news-page .news-container {
        max-width: 600px;
        overflow: visible;
    }
    .news-page #news-form {
        max-width: 350px;
        margin: 10px 0;
        left: 15%;
        top: 12vh;
    }
}

@media (max-width: 768px) {
    body {
        background-size: cover;
        background-position: center bottom;
        margin-left: 0;
    }
    .header {
        padding: 10px;
        height: 60px;
    }
    .header-logo {
        width: 40px;
        height: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1008;
        filter: brightness(1);
    }
    .header-icon {
        width: 20px;
        height: 20px;
    }
    .menu-btn, .search-btn, .user-btn {
        padding: 10px;
    }
    #search-bar {
        right: 50px;
        padding: 6px;
        font-size: 14px;
    }
    #search-bar.active,
    #search-suggestions.active {
        width: 100%;
        max-width: 200px;
    }
    #search-suggestions {
        right: 10px;
        width: 200px;
        max-height: 180px;
        font-size: 14px;
        top: calc(100% + 5px);
        z-index: 1100;
    }
    .search-btn {
        right: 10px !important;
    }
    .empleados-search-bar {
        display: none;
        position: absolute;
        right: 50px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        padding: 6px;
        border: 2px solid var(--primary-color);
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.9);
        color: var(--text-dark);
        font-size: 14px;
        outline: none;
        transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1004;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }
    .empleados-search-bar.active {
        display: block;
        width: 100%;
        max-width: 200px;
    }
    .empleados-search-suggestions {
        right: 10px;
        left: auto;
        width: 200px;
        max-height: 180px;
        font-size: 14px;
    }
    .empleados-search-suggestions.active {
        display: block;
    }
    .empleados-user-btn {
        margin-left: 0;
    }
    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 250px;
        height: 100%;
        z-index: 1100;
        background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
        padding: 10px;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar.active {
        display: block;
        left: 0;
    }
    .sidebar-logo .logo {
        max-width: 100px;
    }
    .sidebar-menu {
        margin-top: 15px;
        gap: 10px;
    }
    .sidebar-menu li a {
        padding: 8px;
        font-size: 14px;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar-menu .menu-logo {
        width: 35px;
        height: 35px;
    }
    .social-icons {
        bottom: 15px;
        gap: 12px;
    }
    .social-icon {
        width: 28px;
        height: 28px;
    }
    .carousel {
        height: 200px;
    }
    .calendar-container {
        position: relative;
        margin: 15px auto;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 500px;
        height: 350px;
        min-width: 0;
    }
    .calendar-container iframe {
        height: 100%;
    }
    .email-container {
        position: relative;
        margin: 15px auto;
        margin-right: 7%;
        width: 90%;
        max-width: 400px;
        min-width: 0;
    }
    .user-email-text {
        font-size: 14px;
    }
    .center-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 15px auto;
        width: 90%;
        max-width: 500px;
        gap: 20px;
    }
    .news-container {
        position: relative;
        width: 90%;
        max-width: 500px;
        margin: 15px auto;
        top: auto;
        left: auto;
    }
    #news-form {
        position: relative;
        width: 90%;
        max-width: 500px;
        margin: 0 auto 10px;
        top: auto;
        left: auto;
    }
    .qr-container, .wifi-container, .match-container {
        width: 90%;
        margin-bottom: 15px;
    }
    .qr-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        width: 100%;
        max-width: 90%;
        margin-top: 0;
    }
    .qr-link {
        width: auto;
        text-align: center;
    }
    .qr-code {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        border-width: 1.5px;
    }
    .qr-label {
        font-size: 12px;
        white-space: nowrap;
    }
    .wifi-table {
        font-size: 12px;
    }
    .wifi-table th, .wifi-table td {
        padding: 3px 5px;
        font-size: 12px;
    }
    .show-password {
        width: 20px;
        height: 20px;
    }
    .note {
        font-size: 10px;
    }
    .match-container {
        width: 100%;
        max-width: 390px;
    }
    .match-details-wrapper {
        flex-direction: column;
        gap: 6px;
    }
    .match-arrow {
        font-size: clamp(12px, 1.2vw, 14px);
        padding: 4px 6px;
    }
    .team {
        width: 40%;
        gap: 3px;
    }
    .team-logo {
        width: 30px;
        height: 30px;
    }
    .team span {
        font-size: clamp(8px, 0.7vw, 10px);
    }
    .match-time {
        font-size: clamp(11px, 1vw, 13px);
        padding: 3px 6px;
    }
    .match-date {
        font-size: clamp(8px, 0.8vw, 10px);
        margin-bottom: 5px;
    }
    .match-center {
        font-size: clamp(10px, 0.9vw, 11px);
        padding: 4px 6px;
    }
    .login-container {
        margin-top: 60px;
        gap: 15px;
    }
    .login-box {
        padding: 20px;
        max-width: 300px;
        margin-top: 20px;
    }
    .login-box h2 {
        font-size: 20px;
    }
    .form-group label {
        font-size: 12px;
    }
    .form-group input {
        padding: 6px;
        font-size: 12px;
    }
    .login-button {
        padding: 8px;
        font-size: 12px;
    }
    .error-message {
        font-size: 12px;
    }
    .employees-container {
        margin-left: 0;
        gap: 10px;
        max-width: 90%;
    }
    .department-column {
        display: none;
        position: fixed;
        left: -250px;
        width: 250px;
        height: 100%;
        background: #090f12;
        border-right: 2px solid var(--primary-color);
        padding: 20px;
        z-index: 1100;
        top: 0;
        transition: left 0.3s ease;
    }
    .department-column.active {
        display: block;
        left: 0;
    }
    .department-item {
        font-size: 13px;
        padding: 8px;
    }
    .subdepartment-item {
        padding: 6px 8px 6px 15px;
        font-size: clamp(12px, 1vw, 13px);
    }
    .departments-btn {
        display: block;
        background: var(--primary-color);
        color: var(--text-dark);
        border: none;
        padding: 10px 15px;
        font-size: 16px;
        cursor: pointer;
        border-radius: 5px;
        margin: 10px auto;
        text-align: center;
        z-index: 1000;
    }
    .departments-btn:hover {
        background: var(--text-light);
    }
    .employee-list {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 0;
    }
    .employee-item {
        padding: 12px;
    }
    .employee-image-container {
        width: 100px;
        height: 100px;
    }
    .employee-item h3 {
        font-size: 15px;
    }
    .employee-item p {
        font-size: 12px;
    }
    .empleados-user-btn {
        margin-left: 0;
    }
    .news-page .center-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 15px auto;
        width: 90%;
        max-width: 500px;
        gap: 20px;
    }
    .news-page .news-container {
        width: 90%;
        max-width: 500px;
        margin: 15px auto;
        overflow: visible;
    }
    .news-page #news-form {
        width: 90%;
        max-width: 500px;
        margin: 10px auto;
        top: auto;
        left: auto;
    }
}

@media (max-width: 600px) {
    body {
        margin-left: 0;
    }
    .header {
        padding: 6px 10px;
        height: 60px;
    }
    .header-logo {
        height: 60px;
    }
    .header-icon {
        width: 24px;
        height: 24px;
    }
    .sidebar {
        width: 40vw;
        left: -40vw;
        display: none;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar.active {
        display: block;
        left: 0;
    }
    .sidebar-logo .logo {
        max-width: 100px;
    }
    .sidebar-menu li a {
        font-size: clamp(0.7rem, 0.9vw, 0.85rem);
        padding: 0.5vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .calendar-container {
        margin: 10px auto;
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        max-width: 450px;
        height: 350px;
    }
    .email-container {
        margin: 10px auto;
        margin-right: 5%;
        max-width: 340px;
    }
    .center-container {
        margin: 320px auto 15px auto;
        margin-right: 5%;
        gap: 20px;
    }
    .news-container {
        margin: 15px auto;
        width: 95%;
        max-width: 450px;
    }
    #news-form {
        margin: 0 auto 10px;
        width: 95%;
        max-width: 450px;
    }
    .qr-container {
        gap: 10px;
        margin-top: 0;
    }
    .qr-code {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        border-width: 1.5px;
    }
    .qr-label {
        font-size: 10px;
        white-space: nowrap;
    }
    .wifi-table th,
    .wifi-table td {
        font-size: clamp(7px, 0.8vw, 9px);
        padding: 3px 5px;
    }
    .show-password {
        width: 20px;
        height: 20px;
    }
    .match-container {
        width: 100%;
        max-width: 300px;
    }
    .match-arrow {
        font-size: clamp(12px, 1.3vw, 14px);
    }
    .team-logo {
        width: 35px;
        height: 35px;
    }
    .team span {
        font-size: clamp(9px, 0.8vw, 11px);
    }
    .match-time {
        font-size: clamp(12px, 1.1vw, 14px);
    }
    .match-date {
        font-size: 10px;
        margin-bottom: 6px;
    }
    .match-center {
        font-size: 11px;
        padding: 5px 8px;
    }
    .login-container {
        margin-top: 60px;
        gap: 15px;
    }
    .login-box {
        max-width: 300px;
        padding: 15px;
    }
    .login-box h2 {
        font-size: 18px;
    }
    .form-group label {
        font-size: 11px;
    }
    .form-group input {
        padding: 5px;
        font-size: 11px;
    }
    .login-button {
        padding: 7px;
        font-size: 11px;
    }
    .error-message {
        font-size: 11px;
    }
    .employees-container {
        max-width: 95%;
    }
    .employee-item h3 {
        font-size: 14px;
    }
    .employee-item p {
        font-size: 11px;
    }
    .department-column {
        width: 180px;
        left: -180px;
    }
    .department-item {
        font-size: 12px;
        padding: 6px;
    }
    .subdepartment-item {
        padding: 5px 6px 5px 12px;
        font-size: clamp(11px, 0.9vw, 12px);
    }
    .departments-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    .social-icons {
        gap: 10px;
    }
    .social-icon {
        width: 25px;
        height: 25px;
    }
    .employee-image-container {
        width: 80px;
        height: 80px;
    }
    .news-page .center-container {
        margin: 15px auto;
        width: 95%;
        max-width: 450px;
    }
    .news-page .news-container {
        width: 95%;
        max-width: 450px;
        margin: 15px auto;
        overflow: visible;
    }
    .news-page #news-form {
        width: 95%;
        max-width: 450px;
        margin: 10px auto;
        top: auto;
        left: auto;
    }
}

@media (max-width: 480px) {
    body {
        background-size: cover;
    }
    .header {
        height: 50px;
    }
    .header-logo {
        width: 35px;
        height: auto;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 1008;
        filter: brightness(1);
    }
    .header-icon {
        width: 18px;
        height: 18px;
    }
    .sidebar {
        width: 40vw;
        left: -40vw;
        display: none;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar.active {
        display: block;
        left: 0;
    }
    .sidebar-logo .logo {
        max-width: 100px;
    }
    .sidebar-menu li a {
        font-size: clamp(0.7rem, 0.9vw, 0.85rem);
        padding: 0.5vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .calendar-container {
        margin: 10px auto;
        left: 50%;
        transform: translateX(-50%);
        max-width: 500px;
        height: 300px;
    }
    .email-container {
        margin: 10px auto;
        margin-right: 5%;
        max-width: 340px;
    }
    .center-container {
        margin: 320px auto 15px auto;
        margin-right: 5%;
        gap: 20px;
    }
    .news-container {
        margin: 15px auto;
        width: 95%;
        max-width: 340px;
    }
    #news-form {
        margin: 0auto 10px;
        width: 95%;
        max-width: 340px;
    }
    .qr-container {
        gap: 10px;
        margin-top: 0;
    }
    .qr-code {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        border-width: 1.5px;
    }
    .qr-label {
        font-size: 10px;
        white-space: nowrap;
    }
    .wifi-table th,
    .wifi-table td {
        font-size: 10px;
        padding: 3px 5px;
    }
    .match-container {
        max-width: 260px;
        padding: 6px 6px 3px;
    }
    .match-arrow {
        font-size: 12px;
        padding: 3px 5px;
    }
    .match-league {
        font-size: 10px;
        margin-bottom: 5px;
    }
    .team-logo {
        width: 30px;
        height: 30px;
    }
    .team span {
        font-size: 9px;
    }
    .match-time {
        font-size: 12px;
        padding: 3px 6px;
    }
    .match-date {
        font-size: 9px;
        margin-bottom: 5px;
    }
    .match-center {
        font-size: 10px;
        padding: 4px 6px;
    }
    .login-box {
        max-width: 280px;
        padding: 15px;
    }
    .login-box h2 {
        font-size: 18px;
    }
    .form-group label {
        font-size: 11px;
    }
    .form-group input {
        padding: 5px;
        font-size: 11px;
    }
    .login-button {
        padding: 7px;
        font-size: 11px;
    }
    .error-message {
        font-size: 11px;
    }
    .employees-container {
        max-width: 95%;
    }
    .employee-item h3 {
        font-size: 14px;
    }
    .employee-item p {
        font-size: 11px;
    }
    .department-column {
        width: 180px;
        left: -180px;
    }
    .department-item {
        font-size: 12px;
        padding: 6px;
    }
    .subdepartment-item {
        padding: 5px 6px 5px 12px;
        font-size: clamp(11px, 0.9vw, 12px);
    }
    .departments-btn {
        font-size: 12px;
        padding: 6px 10px;
    }
    .social-icons {
        gap: 10px;
    }
    .social-icon {
        width: 25px;
        height: 25px;
    }
    .employee-image-container {
        width: 80px;
        height: 80px;
    }
    .news-page .center-container {
        margin: 15px auto;
        width: 95%;
        max-width: 340px;
    }
    .news-page .news-container {
        width: 95%;
        max-width: 340px;
        margin: 15px auto;
        overflow: visible;
    }
    .news-page #news-form {
        width: 95%;
        max-width: 340px;
        margin: 10px auto;
        top: auto;
        left: auto;
    }
}
@media (max-width: 360px) {
    .calendar-container {
        margin: 8px auto;
        left: 50%;
        transform: translateX(-50%);
        max-width: 500px;
        height: 250px;
    }
    .email-container {
        margin: 8px auto;
        margin-right: 4%;
        max-width: 300px;
    }
    .center-container {
        margin: 320px auto 15px auto;
        margin-right: 4%;
        gap: 15px;
    }
    .news-container {
        margin: 15px auto;
        width: 95%;
        max-width: 300px;
    }
    #news-form {
        margin: 0 auto 10px;
        width: 95%;
        max-width: 300px;
    }
    .qr-container {
        gap: 8px;
        margin-top: 0;
    }
    .qr-code {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
    }
    .news-page .center-container {
        margin: 15px auto;
        width: 95%;
        max-width: 300px;
    }
    .news-page .news-container {
        width: 95%;
        max-width: 300px;
        margin: 15px auto;
        overflow: visible;
    }
    .news-page #news-form {
        width: 95%;
        max-width: 300px;
        margin: 10px auto;
        top: auto;
        left: auto;
    }
}
@media (min-width: 1367px) and (max-width: 1440px) {
    body {
        margin-left: 8vw;
    }
    .header {
        padding: 12px 25px;
        height: 85px;
    }
    .header-logo {
        height: 85px;
    }
    .header-icon {
        width: 32px;
        height: 32px;
    }
    .sidebar {
        width: 18vw;
        left: -18vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar-logo .logo {
        max-width: 150px;
    }
    .sidebar-menu li a {
        font-size: clamp(0.9rem, 1.1vw, 1.1rem);
        padding: 0.9vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .calendar-container {
        width: 35vw;
        max-width: 650px;
        min-width: 420px;
        height: 65vh;
    }
    .email-container {
        width: 22vw;
        min-width: 340px;
    }
    .center-container {
        height: 50vh;
        max-height: 600px;
        left: 52%;
        gap: 30px;
    }
    .news-container {
        left: calc(52% + 240px);
        width: 25vw;
        max-width: 380px;
        top: 19vh;
    }
    #news-form {
        left: calc(52% + 340px);
        width: 25vw;
        max-width: 380px;
        top: calc(16vh + 110px + 10px);
        margin-top: 0;
    }
    .qr-container {
        max-width: 300px;
        gap: 15px;
    }
    .qr-code {
        width: 8vw;
        height: 8vw;
        min-width: 60px;
        min-height: 60px;
    }
    .qr-label {
        font-size: clamp(11px, 1.2vw, 13px);
    }
    .wifi-container {
        max-width: 420px;
    }
    .wifi-table th,
    .wifi-table td {
        font-size: clamp(11px, 1.1vw, 13px);
        padding: 7px 10px;
    }
    .show-password {
        width: 28px;
        height: 28px;
    }
    .match-container {
        width: 100%;
        max-width: 420px;
    }
    .match-arrow {
        font-size: clamp(18px, 1.7vw, 20px);
    }
    .team-logo {
        width: 55px;
        height: 55px;
    }
    .team span {
        font-size: clamp(12px, 1.1vw, 14px);
    }
    .match-time {
        font-size: clamp(16px, 1.5vw, 18px);
    }
    .match-date {
        font-size: clamp(12px, 1.1vw, 14px);
    }
    .news-page .center-container {
        max-width: 600px;
        gap: 30px;
    }
    .news-page .news-container {
        max-width: 600px;
        overflow: visible;
    }
    .news-page #news-form {
        max-width: 380px;
        margin: 10px 0;
        left: 10px;
        top: 16vh;
    }
}
@media (min-width: 1025px) and (max-width: 1366px) {
    body {
        margin-left: 7vw;
    }
    .header {
        padding: 10px 20px;
        height: 80px;
    }
    .header-logo {
        height: 80px;
    }
    .header-icon {
        width: 30px;
        height: 30px;
    }
    .sidebar {
        width: 20vw;
        left: -20vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar-logo .logo {
        max-width: 140px;
    }
    .sidebar-menu li a {
        font-size: clamp(0.85rem, 1vw, 1rem);
        padding: 0.8vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .calendar-container {
        width: 38vw;
        max-width: 600px;
        min-width: 400px;
        height: 62vh;
    }
    .email-container {
        width: 24vw;
        min-width: 320px;
    }
    .center-container {
        height: 50vh;
        max-height: 550px;
        left: 50%;
        gap: 28px;
    }
    .news-container {
        left: calc(50% + 320px);
        width: 25vw;
        max-width: 360px;
        top: 16vh;
    }
    #news-form {
        left: calc(50% + 320px);
        width: 25vw;
        max-width: 360px;
        top: calc(16vh + 110px + 10px);
        margin-top: 0;
    }
    .qr-container {
        max-width: 300px;
        gap: 15px;
    }
    .qr-code {
        width: 8vw;
        height: 8vw;
        min-width: 60px;
        min-height: 60px;
    }
    .wifi-container {
        max-width: 400px;
    }
    .wifi-table th,
    .wifi-table td {
        font-size: clamp(10px, 1vw, 12px);
    }
    .match-container {
        width: 100%;
        max-width: 400px;
    }
    .match-arrow {
        font-size: clamp(16px, 1.6vw, 18px);
    }
    .team-logo {
        width: 50px;
        height: 50px;
    }
    .news-page .center-container {
        max-width: 550px;
        gap: 28px;
    }
    .news-page .news-container {
        max-width: 550px;
        overflow: visible;
    }
    .news-page #news-form {
        max-width: 360px;
        margin: 10px 0;
        left: 10px;
        top: 16vh;
    }
}
@media (min-width: 801px) and (max-width: 1024px) {
    body {
        margin-left: 5vw;
    }
    .header {
        padding: 8px 15px;
        height: 70px;
    }
    .header-logo {
        height: 70px;
    }
    .header-icon {
        width: 28px;
        height: 28px;
    }
    .sidebar {
        width: 22vw;
        left: -22vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar-logo .logo {
        max-width: 120px;
    }
    .sidebar-menu li a {
        font-size: clamp(0.8rem, 0.9vw, 0.95rem);
        padding: 0.7vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .calendar-container {
        width: 45vw;
        max-width: 550px;
        min-width: 350px;
        height: 60vh;
    }
    .email-container {
        width: 28vw;
        min-width: 280px;
    }
    .center-container {
        left: 50%;
        gap: 25px;
    }
    .news-container {
        left: calc(50% + 300px);
        width: 30vw;
        max-width: 340px;
        top: 16vh;
    }
    #news-form {
        left: calc(50% + 300px);
        width: 30vw;
        max-width: 340px;
        top: calc(16vh + 340px + 10px);
        margin-top: 0;
    }
    .qr-container {
        max-width: 300px;
        gap: 12px;
    }
    .qr-code {
        width: 8vw;
        height: 8vw;
        min-width: 60px;
        min-height: 60px;
    }
    .wifi-container {
        max-width: 350px;
    }
    .wifi-table th,
    .wifi-table td {
        font-size: clamp(9px, 0.9vw, 11px);
        padding: 5px 8px;
    }
    .show-password {
        width: 24px;
        height: 24px;
    }
    .match-container {
        width: 100%;
        max-width: 350px;
    }
    .match-arrow {
        font-size: clamp(14px, 1.5vw, 16px);
    }
    .team-logo {
        width: 45px;
        height: 45px;
    }
    .team span {
        font-size: clamp(10px, 0.9vw, 12px);
    }
    .match-time {
        font-size: clamp(14px, 1.3vw, 16px);
    }
    .news-page .center-container {
        max-width: 500px;
        gap: 25px;
    }
    .news-page .news-container {
        max-width: 500px;
        overflow: visible;
    }
    .news-page #news-form {
        max-width: 340px;
        margin: 10px 0;
        left: 10px;
        top: 16vh;
    }
}
@media (min-width: 601px) and (max-width: 800px) {
    body {
        margin-left: 0;
    }
    .header {
        padding: 8px 12px;
        height: 65px;
    }
    .header-logo {
        height: 65px;
    }
    .header-icon {
        width: 26px;
        height: 26px;
    }
    .sidebar {
        width: 30vw;
        left: -30vw;
        display: none;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .sidebar.active {
        display: block;
        left: 0;
    }
    .sidebar-logo .logo {
        max-width: 110px;
    }
    .sidebar-menu li a {
        font-size: clamp(0.8rem, 1vw, 0.9rem);
        padding: 0.6vw;
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .menu-text {
        font-family: 'LEGAFONT-Bold', sans-serif;
    }
    .calendar-container {
        position: relative;
        margin: 15px auto;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 500px;
        height: 400px;
    }
    .email-container {
        position: relative;
        margin: 15px auto;
        width: 90%;
        max-width: 400px;
        min-width: 250px;
    }
    .center-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 15px auto;
        width: 90%;
        max-width: 500px;
        gap: 20px;
    }
    .news-container {
        position: relative;
        width: 90%;
        max-width: 500px;
        margin: 15px auto;
        top: auto;
        left: auto;
    }
    #news-form {
        position: relative;
        width: 90%;
        max-width: 500px;
        margin: 0 auto 10px;
        top: auto;
        left: auto;
    }
    .qr-container {
        max-width: 300px;
        gap: 12px;
    }
    .qr-code {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
    }
    .wifi-container {
        max-width: 320px;
    }
    .wifi-table th,
    .wifi-table td {
        font-size: clamp(8px, 0.8vw, 10px);
        padding: 4px 6px;
    }
    .show-password {
        width: 22px;
        height: 22px;
    }
    .match-container {
        width: 100%;
        max-width: 320px;
    }
    .match-arrow {
        font-size: clamp(13px, 1.4vw, 15px);
    }
    .team-logo {
        width: 40px;
        height: 40px;
    }
    .news-page .center-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 15px auto;
        width: 90%;
        max-width: 500px;
        gap: 20px;
    }
    .news-page .news-container {
        width: 90%;
        max-width: 500px;
        margin: 15px auto;
        overflow: visible;
    }
    .news-page #news-form {
        width: 90%;
        max-width: 500px;
        margin: 10px auto;
        top: auto;
        left: auto;
    }
}
/* === LUPA GLOBAL - FORZAR QUE FUNCIONE CON TU CSS PESADO === */
#global-search-box,
#global-search-box * {
    all: revert !important;
    box-sizing: border-box !important;
}

#global-search-box {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
}

#global-search-box input {
    display: block !important;
    width: 100% !important;
    padding: 18px 20px !important;
    font-size: 17px !important;
    background: transparent !important;
    color: white !important;
    border: none !important;
    outline: none !important;
}