/* ============================================================================
DECLARACIÓN DE PROPIEDAD INTELECTUAL Y DERECHOS DE AUTOR REGISTRADOS
============================================================================

PROPIETARIO ÚNICO, DESARROLLADOR, DISEÑADOR Y PROGRAMADOR EXCLUSIVO:
----------------------------------------------------------------------------
Ing. Roel Arturo Copetillo Portela
COPR810501rm1

HISTORIAL DE REGISTRO DE DESARROLLO (FECHA DE INICIO):
----------------------------------------------------------------------------
- Inicio oficial de diseño y desarrollo: 14 de Mayo de 2026

DECLARACIÓN DE DERECHOS LEGALES:
----------------------------------------------------------------------------
Tanto esta versión de prueba (trial/beta) como cualquier versión posterior,
estable, modificada, compilada, autoejecutable o derivada del código de esta 
aplicación, pertenecen al 100% en exclusiva y de manera vitalicia a su único
dueño y desarrollador Roel Arturo Copetillo Portela. Queda prohibida la copia, 
distribución, alteración o venta no autorizada sin el consentimiento expreso
por escrito del autor.

Todos los Derechos Reservados © 2026.
============================================================================ */

/* ═══════════════════════════════════════════════════════════════════════════
   Xerberoz® — Estilos de la Pantalla de Login (Fase 2)
   Diseño Glassmorphism Oscuro con Acentos Cyan (#00e5ff)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overlay principal de Login que cubre toda la pantalla */
.xrz-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: radial-gradient(circle at center, #0f172a 0%, #060913 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.xrz-login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Tarjeta principal Glassmorphism */
.xrz-login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 229, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-sizing: border-box;
    animation: loginCardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo de Xerberoz en la tarjeta */
.xrz-login-logo {
    height: 48px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.5));
}

.xrz-login-title {
    color: #f8fafc;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.xrz-login-subtitle {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 28px;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Formulario */
.xrz-login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Campos de entrada */
.xrz-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.xrz-input-label {
    color: #00e5ff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.xrz-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.xrz-input-field {
    width: 100%;
    height: 46px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0 42px 0 14px;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

.xrz-input-field:focus {
    border-color: #00e5ff;
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.xrz-input-field.error {
    border-color: #ff3366 !important;
    box-shadow: 0 0 12px rgba(255, 51, 102, 0.4) !important;
}

/* Íconos dentro de inputs */
.xrz-input-icon {
    position: absolute;
    right: 14px;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.xrz-input-icon:hover {
    color: #00e5ff;
}

/* Mensajes de Alerta / Error */
.xrz-login-alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    display: none;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    color: #ff3333;
    background: rgba(255, 51, 51, 0.12);
    border: 1px solid rgba(255, 51, 51, 0.45);
}

.xrz-login-alert.show {
    display: flex;
    animation: alertShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.xrz-login-alert.error {
    background: rgba(255, 51, 51, 0.12);
    border: 1px solid rgba(255, 51, 51, 0.45);
    color: #ff3333;
}

.xrz-login-alert.warning {
    background: rgba(255, 51, 51, 0.12);
    border: 1px solid rgba(255, 51, 51, 0.45);
    color: #ff3333;
}

#loginAlert,
#loginAlertMsg {
    color: #ff3333 !important;
}

@keyframes alertShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Botón Entrar */
.xrz-login-btn {
    height: 48px;
    width: 100%;
    margin-top: 10px;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    border: 1px solid #00e5ff;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.xrz-login-btn:hover {
    background: linear-gradient(135deg, #00e5ff 0%, #0096c7 100%);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
    transform: translateY(-1px);
}

.xrz-login-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.4);
}

.xrz-login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Pie de tarjeta */
.xrz-login-footer {
    margin-top: 24px;
    font-size: 11px;
    color: #64748b;
    letter-spacing: 0.5px;
    text-align: center;
}

/* ── Banner instalación PWA (flotante superior derecha) ── */
.xrz-pwa-banner {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
    transform: translateY(-12px) scale(0.98);
    z-index: 200000;
    width: min(380px, calc(100vw - 32px));
    padding: 16px 18px;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(165deg, rgba(12, 18, 32, 0.98) 0%, rgba(6, 10, 18, 0.99) 100%);
    border: 1px solid rgba(0, 229, 255, 0.75);
    border-radius: 14px;
    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(0, 229, 255, 0.2),
        0 0 24px rgba(0, 229, 255, 0.45),
        0 0 48px rgba(0, 229, 255, 0.22);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
    pointer-events: auto;
    animation: xrzPwaGlow 2.4s ease-in-out infinite;
}

@keyframes xrzPwaGlow {
    0%, 100% {
        box-shadow:
            0 20px 48px rgba(0, 0, 0, 0.65),
            0 0 0 1px rgba(0, 229, 255, 0.25),
            0 0 20px rgba(0, 229, 255, 0.4),
            0 0 40px rgba(0, 229, 255, 0.18);
        border-color: rgba(0, 229, 255, 0.7);
    }
    50% {
        box-shadow:
            0 20px 48px rgba(0, 0, 0, 0.65),
            0 0 0 1px rgba(0, 229, 255, 0.45),
            0 0 32px rgba(0, 229, 255, 0.7),
            0 0 64px rgba(0, 229, 255, 0.35);
        border-color: rgba(94, 240, 255, 0.95);
    }
}

.xrz-pwa-banner.xrz-pwa-banner--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.xrz-pwa-banner__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 4px;
}

.xrz-pwa-banner__body {
    flex: 1;
    min-width: 0;
    padding-right: 18px;
}

.xrz-pwa-banner__title {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.xrz-pwa-banner__text {
    margin: 0 0 12px;
    color: #94a3b8;
    font-size: 12.5px;
    line-height: 1.45;
}

.xrz-pwa-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.xrz-pwa-banner__btn-install {
    padding: 8px 16px;
    background: #00e5ff;
    border: none;
    border-radius: 8px;
    color: #090d16;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.xrz-pwa-banner__btn-install:hover {
    background: #5ef0ff;
}

.xrz-pwa-banner__btn-later {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.xrz-pwa-banner__btn-later:hover {
    border-color: rgba(148, 163, 184, 0.6);
    color: #e2e8f0;
}

.xrz-pwa-banner__close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}

.xrz-pwa-banner__close:hover {
    color: #cbd5e1;
}

@media (max-width: 480px) {
    .xrz-pwa-banner {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        padding: 14px 14px 14px 12px;
    }
}
