/* =========================================================
   login.css  —  Pantalla de inicio de sesión ArezSerlog
   ========================================================= */

/* Reset de estilos del template que afectan al login */
body.login-img { background: #f0f4f8 !important; }
body.login-img .page { padding: 0 !important; margin: 0 !important; }

/* ── Contenedor principal ─────────────────────────────────── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Panel izquierdo — Branding ───────────────────────────── */
.login-panel-brand {
    width: 45%;
    background: linear-gradient(150deg, #0c1445 0%, #1a237e 35%, #283593 60%, #4338ca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}

/* Círculos decorativos */
.login-panel-brand .deco-circle-1 {
    position: absolute; width: 520px; height: 520px; border-radius: 50%;
    background: rgba(108,95,252,0.18); top: -170px; right: -170px;
    animation: deco-pulse 7s ease-in-out infinite;
}
.login-panel-brand .deco-circle-2 {
    position: absolute; width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255,255,255,0.05); bottom: -110px; left: -110px;
}
.login-panel-brand .deco-circle-3 {
    position: absolute; width: 200px; height: 200px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.08); bottom: 60px; right: 40px;
}

@keyframes deco-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.06); }
}

/* Contenido de branding */
.brand-inner {
    position: relative; z-index: 2;
    text-align: center; width: 100%; max-width: 360px;
}
.brand-inner .brand-logo {
    height: 100px;
    object-fit: contain;
    margin-bottom: 2.4rem;
}
.brand-inner h2 {
    color: #fff; font-size: 1.5rem; font-weight: 700;
    line-height: 1.35; letter-spacing: -0.3px; margin-bottom: 0.8rem;
}
.brand-inner .brand-tagline {
    color: rgba(255,255,255,0.62); font-size: 0.88rem;
    line-height: 1.8; margin-bottom: 2rem;
}

/* Tarjetas de características */
.brand-feature {
    display: flex; align-items: center; gap: 0.85rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 12px; padding: 0.75rem 1.1rem; margin-bottom: 0.6rem;
    backdrop-filter: blur(6px); text-align: left;
}
.brand-feature .feat-icon {
    width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
}
.brand-feature .feat-icon i { color: #a5b4fc; font-size: 1rem; }
.brand-feature span { color: rgba(255,255,255,0.82); font-size: 0.84rem; font-weight: 500; }

/* ── Panel derecho — Formulario ───────────────────────────── */
.login-panel-form {
    width: 55%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 2rem;
}
.login-form-container { width: 100%; max-width: 420px; }

/* Encabezado del formulario */
.login-form-header { margin-bottom: 2rem; }
.login-form-header .mobile-logo {
    display: none; height: 36px; margin-bottom: 1.6rem;
}
.login-form-header h1 {
    font-size: 1.8rem; font-weight: 700; color: #0f172a;
    letter-spacing: -0.4px; margin-bottom: 0.35rem;
}
.login-form-header p { font-size: 0.9rem; color: #64748b; margin: 0; }

/* Etiquetas de campos */
.login-form-container .form-label {
    font-size: 0.83rem; font-weight: 600; color: #374151;
    margin-bottom: 0.45rem; display: block;
}

/* Wrapper con ícono flotante */
.input-field-wrap { position: relative; }
.input-field-wrap .field-icon {
    position: absolute; top: 50%; right: 13px; transform: translateY(-50%);
    color: #94a3b8; font-size: 1rem; pointer-events: none; z-index: 5;
}
.input-field-wrap .field-icon.clickable {
    pointer-events: all; cursor: pointer; transition: color 0.2s;
}
.input-field-wrap .field-icon.clickable:hover { color: #4338ca; }

/* Campo de texto */
.login-form-container .form-control {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 0.72rem 2.8rem 0.72rem 1rem !important;
    font-size: 0.92rem !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}
.login-form-container .form-control:focus {
    border-color: #4338ca !important;
    box-shadow: 0 0 0 3px rgba(67,56,202,0.1) !important;
    background: #fff !important;
    outline: none;
}
.login-form-container .form-control.is-invalid {
    border-color: #ef4444 !important;
    background-image: none !important;
}
.login-form-container .form-control::placeholder { color: #c0c8d4 !important; }

/* Alerta de error unificada */
.login-alert {
    border-radius: 10px; font-size: 0.875rem;
    background: #fef2f2; color: #b91c1c;
    padding: 0.75rem 1rem; margin-bottom: 1.4rem;
    display: flex; align-items: center; gap: 0.5rem;
    border: 1px solid #fecaca;
}

/* Botón principal */
.btn-login-primary {
    background: linear-gradient(135deg, #283593 0%, #4338ca 60%, #6c5ffc 100%);
    border: none; color: #fff; font-weight: 600;
    padding: 0.78rem 1.5rem; border-radius: 10px;
    font-size: 0.94rem; width: 100%; letter-spacing: 0.15px;
    transition: opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(67,56,202,0.35);
    cursor: pointer;
}
.btn-login-primary:hover  { opacity: 0.92; color: #fff; box-shadow: 0 6px 20px rgba(67,56,202,0.42); }
.btn-login-primary:active { transform: scale(0.99); }
.btn-login-primary:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-login-primary .spinner-border { width: 0.95rem; height: 0.95rem; border-width: 2px; }

/* Footer de versión */
.login-footer { text-align: center; margin-top: 2.2rem; }
.login-footer .version-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: #f1f5f9; padding: 0.3rem 0.85rem;
    border-radius: 20px; color: #64748b;
    font-size: 0.78rem; font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .login-panel-brand { width: 40%; padding: 2rem 1.5rem; }
    .login-panel-form  { width: 60%; }
}
@media (max-width: 720px) {
    .login-panel-brand { display: none; }
    .login-panel-form  { width: 100%; padding: 2rem 1.5rem; min-height: 100vh; }
    .login-form-header .mobile-logo { display: block; }
}
