/* ============================================================
   ÜLTU UI — Componentes reutilizables
   Botones, inputs, mensajes, spinner, layout de login
   ============================================================ */

/* ── Reset base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: #ecedf8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ──────────────────────────────────────────
   FONDO DECORATIVO
────────────────────────────────────────── */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}
.bg-blob-tl {
    width: 420px; height: 420px;
    background: #c4c6e8;
    top: -100px; left: -120px;
}
.bg-blob-br {
    width: 350px; height: 350px;
    background: #cfd0ec;
    bottom: -80px; right: -90px;
}

.dot-grid {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.dot-grid-tl { top: 90px;  left: 70px; }
.dot-grid-bl { bottom: 90px; left: 70px; }
.dot-grid-tr { top: 90px;  right: 60px; }

/* ──────────────────────────────────────────
   CARD / CONTENEDOR CENTRAL
────────────────────────────────────────── */
#divCentral {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 24px 16px;
}

.login-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 44px 36px;
    box-shadow:
        0 24px 64px rgba(80, 60, 150, 0.10),
        0 4px 16px rgba(0, 0, 0, 0.05);
}

/* ── Logo ── */
.logo-wrapper { text-align: center; margin-bottom: 32px; }
#logoSistema  { max-width: 200px; height: auto; }

/* ── Títulos ── */
.login-title {
    text-align: center;
    font-size: 1.70rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    line-height: 1.25;
}
.login-title span { color: #6C4FD1; }

.login-subtitle {
    text-align: center;
    color: #8b8fa8;
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 28px;
}

/* ──────────────────────────────────────────
   INPUTS
────────────────────────────────────────── */
.input-wrap {
    position: relative;
    margin-bottom: 14px;
}

.input-wrap .ico-left {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a8adc4;
    pointer-events: none;
    display: flex;
}

.input-wrap input[type="text"],
.input-wrap input[type="password"] {
    width: 100%;
    padding: 13px 44px 13px 44px;
    border: 1.5px solid #e6e8f4;
    border-radius: 12px;
    background: #f5f6fc;
    font-size: 0.94rem;
    font-family: inherit;
    color: #1a1a2e;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.input-wrap input::placeholder { color: #b4b8ce; }

.input-wrap input:focus {
    border-color: #6C4FD1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108, 79, 209, 0.12);
}

/* ── Toggle ojo contraseña ── */
.btn-eye {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a8adc4;
    padding: 4px;
    line-height: 0;
    transition: color .2s;
}
.btn-eye:hover { color: #6C4FD1; }

/* ──────────────────────────────────────────
   BOTONES
────────────────────────────────────────── */

/* Primario — acción principal */
.btn-login {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #7B5FD9 0%, #5A3DBF 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.2px;
    box-shadow: 0 6px 22px rgba(108, 79, 209, 0.38);
    transition: transform .15s, box-shadow .2s;
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(108, 79, 209, 0.48);
}
.btn-login:active { transform: translateY(0); }

/* Secundario — acción de retroceso */
.btn-back {
    padding: 12px 20px;
    background: #f0f1f9;
    color: #5e6278;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
}
.btn-back:hover { background: #e4e6f4; }

/* Recuperar contraseña */
.btn-recover {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #7B5FD9 0%, #5A3DBF 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(108, 79, 209, 0.32);
    transition: transform .15s;
}
.btn-recover:hover { transform: translateY(-1px); }

/* Cerrar mensaje */
.btn-msg-close {
    padding: 11px 24px;
    background: linear-gradient(135deg, #7B5FD9 0%, #5A3DBF 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(108, 79, 209, 0.28);
}

/* Confirmación Sí */
.btn-conf-yes {
    padding: 11px 24px;
    background: linear-gradient(135deg, #7B5FD9 0%, #5A3DBF 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(108, 79, 209, 0.28);
}

/* Confirmación No */
.btn-conf-no {
    padding: 11px 24px;
    background: #f0f1f9;
    color: #5e6278;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

/* ──────────────────────────────────────────
   FILA DE OPCIONES (olvidé contraseña / recordarme)
────────────────────────────────────────── */
.row-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0 22px;
}

.link-forgot {
    color: #6C4FD1;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s;
}
.link-forgot:hover { opacity: 0.7; }

.remember-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.84rem;
    color: #5e6278;
    cursor: pointer;
    user-select: none;
}
.remember-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #6C4FD1;
    cursor: pointer;
}

/* ──────────────────────────────────────────
   FORMULARIO RECUPERAR CONTRASEÑA
────────────────────────────────────────── */
.recover-note {
    background: #f3f3fb;
    border-left: 3px solid #6C4FD1;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #5e6278;
    line-height: 1.55;
    margin-bottom: 18px;
}

.recover-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* ──────────────────────────────────────────
   PANELES DE MENSAJE Y CONFIRMACIÓN
────────────────────────────────────────── */
.msg-box {
    background: #f5f6fc;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    font-size: 0.94rem;
    color: #1a1a2e;
    line-height: 1.6;
}

.msg-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ──────────────────────────────────────────
   SPINNER DE CARGA
────────────────────────────────────────── */
#load {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 8px;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(108, 79, 209, 0.15);
    border-top-color: #6C4FD1;
    animation: ultu-spin 0.75s linear infinite;
}

@keyframes ultu-spin {
    to { transform: rotate(360deg); }
}

/* ──────────────────────────────────────────
   DIVISOR Y FOOTER
────────────────────────────────────────── */
.card-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 18px;
    color: #c8cad8;
    font-size: 0.7rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.card-divider::before,
.card-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eaecf5;
}

.card-footer { text-align: center; }
#logoKimn    { max-width: 110px; height: auto; opacity: 0.72; }
.copyright   { margin-top: 10px; font-size: 0.77rem; color: #c0c3d4; }

/* ──────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────── */
@media (max-width: 520px) {
    .login-card  { padding: 36px 24px 28px; border-radius: 20px; }
    .login-title { font-size: 1.45rem; }
}

@media (max-width: 360px) {
    .login-card  { padding: 28px 16px 22px; }
    .row-options { flex-direction: column; align-items: flex-start; gap: 10px; }
}
