/* Paleta Anti-fatiga Visual basada en la identidad de SoftwareDeAvila */
:root {
    --bg-pantalla: #F4F6F9;
    --bg-tarjeta: #FFFFFF;
    --azul-profundo: #1A2530;
    --texto-mutado: #7F8C8D;
    --texto-labels: #566573;
    --azul-botones: #3498DB; 
    --azul-hover: #2980B9;
    --gris-borde: #EAEAEA;
    --danger-red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-pantalla);
    color: var(--azul-profundo);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor de la Tarjeta Original */
.login-card {
    background-color: var(--bg-tarjeta);
    width: 100%;
    max-width: 440px;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gris-borde);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* MARCA DE AGUA TRANSPARENTE EN EL FONDO DE LA TARJETA (RESTAURADA) */
.login-card::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.18;                  /* Opacidad visible pero suave (18%) */
    pointer-events: none;
    z-index: 0;
}

/* Elementos superiores sobre la marca de agua */
.brand-header, 
.alert-info, 
#login-form, 
.card-footer {
    position: relative;
    z-index: 1;
}

/* Identidad Visual de la Marca */
.brand-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--azul-profundo);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.brand-header p {
    font-size: 13.5px;
    color: var(--texto-mutado);
    margin-bottom: 15px;
}

/* --- DISEÑO DEL BADGE DINÁMICO DE COMUNIDAD ORGANIZADO --- */
.community-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-size: 13px;
    color: #0369a1;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(3, 105, 161, 0.04);
    max-width: 100%;
}

.community-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.community-line {
    white-space: nowrap;
}

.community-divider {
    color: #0369a1;
    font-weight: 800;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-animation 1.8s infinite;
    flex-shrink: 0;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Alerta de bloqueo o intentos superados */
.alert-info {
    background-color: #fee2e2;
    color: #b91c1c;
    font-size: 13px;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: justify;
    border-left: 4px solid var(--danger-red);
    font-weight: 500;
    line-height: 1.4;
}

.admin-contact-link {
    font-size: 13px;
    color: #b91c1c;
    text-decoration: underline;
    font-weight: 700;
}

/* Estructura del Formulario */
.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--texto-labels);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    user-select: none;
    color: var(--texto-mutado);
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 12px 42px 12px 42px;
    font-size: 14.5px;
    border: 2px solid var(--gris-borde);
    border-radius: 10px;
    outline: none;
    color: var(--azul-profundo);
    transition: all 0.2s ease;
    background-color: rgba(250, 250, 250, 0.85); /* Permite traslucir el logo */
}

.form-control:focus {
    border-color: var(--azul-botones);
    background-color: var(--bg-tarjeta);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:disabled {
    background-color: #e2e8f0;
    cursor: not-allowed;
}

/* Botón interactivo para ver la contraseña */
.toggle-password-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--texto-mutado);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease;
}

.toggle-password-btn:hover {
    color: var(--azul-botones);
}

/* Botón de Envío Principal */
.btn-submit {
    width: 100%;
    background-color: var(--azul-botones);
    color: #FFFFFF;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.15);
}

.btn-submit:hover {
    background-color: var(--azul-hover);
}

.btn-submit:active {
    transform: scale(0.99);
}

.btn-submit:disabled {
    background-color: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

/* Footer con IP e Información de Sesión */
.card-footer {
    margin-top: 25px;
    font-size: 12px;
    color: var(--texto-mutado);
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-info {
    font-size: 11px;
    color: var(--texto-labels);
    background-color: rgba(244, 246, 249, 0.85);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
    border: 1px solid var(--gris-borde);
}

.session-info strong {
    color: var(--azul-profundo);
}

/* AJUSTE MÓVIL EXCLUSIVO PARA EL BADGE */
@media (max-width: 480px) {
    .community-info {
        flex-direction: column;
        gap: 2px;
    }
    .community-divider {
        display: none;
    }
}