:root {
    --primary-color: #003366;
    --secondary-color: #276fb7;
    --admin-color: #1a5a9e;
    --guest-color: #4CAF50;
    --error-color: #dc3545;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --accent-color: #0099cc;
    --highlight-color: #005580;
    --lime-color: #a2ce71;
}

/* Animaciones consolidadas */
@keyframes animateBackground {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shine {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 20px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 40px) scale(0.9);
    }
}

/* Se eliminó la animación animateCircle no utilizada */

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    background-size: 400% 400%;
    animation: animateBackground 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden; /* Permitir scroll vertical pero mantener oculto el horizontal */
}

/* Elementos decorativos */
body::before,
body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: -1;
}

body::before {
    top: -150px;
    right: -50px;
    width: 600px;
    height: 600px;
}

body::after {
    bottom: -150px;
    left: -50px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    width: 100%;
    max-width: 950px;
    animation: fadeInUp 0.8s ease-out forwards;
    border-top: 4px solid var(--lime-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-content {
    display: flex;
    gap: 2rem;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.left-column {
    flex: 3;
    padding-right: 2.5rem;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.left-column::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(0, 0, 0, 0.1),
            transparent);
}

.right-column {
    flex: 2;
    justify-content: center;
    padding-left: 1.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--lime-color), transparent);
    border-radius: 3px;
}

.login-logo {
    width: 140px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* Estilos comunes para secciones */
.company-info,
.system-info {
    padding: 1.2rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    position: relative;
}

.company-info {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(200, 212, 230, 0.148);
}

.system-info {
    background: rgba(163, 207, 113, 0.07);
}

/* Estilos comunes para encabezados */
.company-info h2,
.system-info h3 {
    margin: 0 0 0.8rem 0;
    position: relative;
    display: inline-block;
}

.company-info h2 {
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.system-info h3 {
    color: var(--guest-color);
    font-size: 1.2rem;
}

.company-info h2::after,
.system-info h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    border-radius: 3px;
}

.company-info h2::after {
    background: var(--secondary-color);
}

.system-info h3::after {
    background: var(--guest-color);
}

.company-info p,
.system-info p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
}

.access-title {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    padding: 1rem;
    background: rgba(200, 212, 230, 0.12);
    border-radius: 10px;
}

.access-title h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.access-title h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.access-title p {
    color: var(--text-color);
    font-size: 1rem;
    margin: 0.5rem 0 0;
    font-weight: 500;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border-radius: 10px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: white;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transition: all 0.6s;
}

.login-button:hover::before {
    animation: shine 1.5s infinite;
}

.login-button.admin {
    background: linear-gradient(to right, var(--admin-color), #0c3b75);
    margin-bottom: 1rem;
}

.login-button.admin:hover {
    background: linear-gradient(to right, #0c3b75, var(--admin-color));
    box-shadow: 0 8px 20px rgba(26, 90, 158, 0.4),
        0 2px 8px rgba(26, 90, 158, 0.2);
}

.login-button.guest {
    background: linear-gradient(to right, var(--lime-color), #4f8512);
}

.login-button.guest:hover {
    background: linear-gradient(to right, #4f8512, var(--lime-color));
    box-shadow: 0 8px 20px rgba(137, 196, 68, 0.3),
        0 2px 8px rgba(137, 196, 68, 0.2);
}

.login-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.login-button:active {
    transform: translateY(1px);
}

.icon {
    margin-right: 10px;
    font-size: 1.3rem;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 2px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-color);
    font-weight: 600;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s, transform 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--lime-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(137, 196, 68, 0.2);
}

.back-button {
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    margin-top: 1rem;
    font-weight: 600;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.back-button:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 600;
    animation: fadeInUp 0.5s ease-out;
}

.alert-error {
    background-color: var(--error-color);
    color: white;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes::before,
.floating-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
}

.floating-shapes::before {
    background: var(--accent-color);
    width: 300px;
    height: 300px;
    top: -100px;
    right: 10%;
    animation: float 15s ease-in-out infinite alternate;
    filter: blur(50px);
}

.floating-shapes::after {
    background: var(--lime-color);
    width: 250px;
    height: 250px;
    bottom: -50px;
    left: 10%;
    animation: float 20s ease-in-out infinite alternate-reverse;
    filter: blur(40px);
}

/* Estilos responsivos */
@media (min-width: 1200px) {
    .login-container {
        max-width: 1100px;
    }

    .login-content {
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    .login-container {
        max-width: 700px;
        padding: 2rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .company-info h2 {
        font-size: 1.3rem;
    }

    .system-info h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .login-content {
        flex-direction: column;
    }

    .left-column {
        padding-right: 0;
        border-right: none;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .left-column::after {
        display: none;
    }

    .right-column {
        padding-left: 0;
        padding-top: 1.5rem;
    }

    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    body {
        align-items: flex-start; /* Alinear al inicio en lugar de al centro */
        padding: 1.5rem 0; /* Añadir padding vertical */
        height: auto; /* Permitir que el body crezca según el contenido */
        overflow-y: auto; /* Asegurar que se pueda hacer scroll */
    }
    
    .login-container {
        padding: 1.2rem;
        margin: 0.8rem;
        border-radius: 12px;
        max-height: none; /* Eliminar altura máxima para que se expanda */
        height: auto; /* Altura automática según el contenido */
        margin-top: 1rem;
        margin-bottom: 2rem; /* Espacio al final para mejor experiencia de scroll */
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .company-info,
    .system-info {
        padding: 1rem;
    }

    .company-info h2 {
        font-size: 1.2rem;
    }

    .login-logo {
        width: 120px;
    }

    .login-button {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
        margin: 0.5rem;
    }

    .company-info p,
    .system-info p {
        font-size: 0.9rem;
    }

    .login-header {
        padding-bottom: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .form-group input {
        padding: 0.6rem;
    }

    .floating-shapes::before {
        width: 200px;
        height: 200px;
    }

    .floating-shapes::after {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 380px) {
    body {
        padding: 1rem 0 2rem; /* Aumentar padding inferior para mejor scroll */
        min-height: calc(100% + 60px); /* Asegurar mínima altura suficiente para el contenido */
    }
    
    .login-header h1 {
        font-size: 1.2rem;
    }

    .company-info h2 {
        font-size: 1.1rem;
    }

    .system-info h3 {
        font-size: 1rem;
    }

    .login-logo {
        width: 100px;
    }

    .icon {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }
    
    /* Mejorar accesibilidad para botones */
    .login-button {
        margin-bottom: 0.5rem;
        padding: 0.9rem;
    }
    
    .login-options {
        margin-bottom: 1rem;
    }
}

/* Orientación del dispositivo */
@media (max-height: 700px) {
    .login-container {
        padding: 1.2rem;
    }

    .company-info,
    .system-info {
        padding: 0.8rem;
        margin: 0.3rem 0;
    }

    body {
        align-items: flex-start;
        padding: 1rem 0;
    }
}

/* Media query específico para W:1272px y H:594px */
@media (width: 1272px) and (height: 594px),
(min-width: 1270px) and (max-width: 1280px) and (min-height: 590px) and (max-height: 600px) {

    /* Ajustes para asegurar que se vea el contenedor completo */
    body {
        align-items: flex-start;
        padding: 0.6rem 0;
        overflow-y: auto; /* Permitir scroll vertical */
    }

    .login-container {
        max-width: 880px;
        padding: 1.5rem;
        margin: 0.3rem auto 1.5rem; /* Aumentar margen inferior */
    }

    .login-content {
        gap: 1.5rem;
    }

    /* Reducir espacios en secciones */
    .company-info,
    .system-info {
        padding: 0.8rem;
        margin: 0.3rem 0;
    }

    .company-info {
        border-bottom: none;
    }

    /* Ajustar tamaños de texto */
    .company-info h2 {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }

    .system-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .company-info p,
    .system-info p {
        font-size: 0.92rem;
        line-height: 1.4;
    }

    /* Hacer el encabezado más compacto */
    .login-header {
        margin-bottom: 0.6rem;
        padding-bottom: 0.8rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-logo {
        width: 120px;
        margin-bottom: 0.7rem;
    }

    /* Ajuste de columnas */
    .left-column {
        padding-right: 1.8rem;
        gap: 1.2rem;
    }

    .right-column {
        padding-left: 1rem;
        gap: 1.2rem;
    }

    /* Ajustar botones y elementos de acceso */
    .login-button {
        padding: 0.9rem;
        font-size: 1rem;
    }

    .access-title {
        margin-bottom: 1rem;
        padding: 0.7rem;
    }

    .access-title h3 {
        font-size: 1.15rem;
        margin-bottom: 0.3rem;
    }

    .access-title p {
        font-size: 0.95rem;
        margin-top: 0.3rem;
    }

    /* Ajustar gap entre botones */
    .login-options {
        gap: 0.8rem;
    }

    .login-button.admin {
        margin-bottom: 0.7rem;
    }

    /* Ajustar altura de los iconos flotantes */
    .floating-shapes::before {
        top: -120px;
        width: 250px;
        height: 250px;
    }

    .floating-shapes::after {
        bottom: -70px;
        width: 220px;
        height: 220px;
    }
}