/**
 * ============================================================
 * nissi-login.css
 * Desc   : Estilos del módulo de login
 * Proyecto: NISSI Core
 * ------------------------------------------------------------
 * @author    Anyis R. Martinez C.
 * @role      Arquitecta de Software | Desarrolladora Senior | Project Manager
 * @company   NISSI Software
 * @version   1.0.0
 * @created   2026-03-30
 * ============================================================
 */

/* ── Variables globales NISSI ── */
:root {
    --nissi-primary:    #1a3c5e;
    --nissi-accent:     #2d7dd2;
    --nissi-light:      #f0f5fb;
    --nissi-border:     #d6e4f0;
    --nissi-text:       #1a2a3a;
    --nissi-muted:      #6b8399;
    --nissi-white:      #ffffff;
    --shadow-card:      0 8px 40px rgba(26,60,94,0.10);
    --shadow-input:     0 2px 8px rgba(45,125,210,0.08);
    --radius-card:      18px;
    --radius-input:     10px;
    --font-body:        'DM Sans', sans-serif;
    --font-display:     'Playfair Display', serif;
}

/* ── Reset base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body ── */
body {
    font-family: var(--font-body);
    background: var(--nissi-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ── Fondos decorativos ── */
body::before {
    content: '';
    position: fixed;
    top: -120px; right: -120px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45,125,210,0.12) 0%, transparent 70%);
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -100px; left: -100px;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,60,94,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Wrapper ── */
.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 16px;
    position: relative;
    z-index: 1;
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Card ── */
.login-card {
    background: var(--nissi-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 44px 40px 36px;
    border: 1px solid var(--nissi-border);
}

/* ── Header ── */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(26,60,94,0.20);
}

.login-logo i { color: white; font-size: 24px; }
.login-logo img { height: 32px; }

.login-header h1 {
    font-family: sans-serif;
    font-size: 22px;
    color: var(--nissi-primary);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 13px;
    color: var(--nissi-muted);
}

/* ── Alert timeout ── */
.alert-timeout {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #e65100;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Form groups ── */
.form-group { margin-bottom: 16px; }

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--nissi-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    display: block;
}

.input-wrapper { position: relative; }

.input-wrapper > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nissi-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper:focus-within > i { color: var(--nissi-accent); }

/* ── Inputs y selects ── */
.form-control {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid var(--nissi-border);
    border-radius: var(--radius-input);
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--nissi-text);
    background: var(--nissi-white);
    box-shadow: var(--shadow-input);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--nissi-accent);
    box-shadow: 0 0 0 3px rgba(45,125,210,0.12);
}

.form-control:disabled {
    background: #f8fafc;
    color: var(--nissi-muted);
    cursor: not-allowed;
}

/* ── Toggle password ── */
.btn-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--nissi-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.btn-toggle-pass:hover { color: var(--nissi-accent); }

/* ── Divider ── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 16px;
    color: var(--nissi-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--nissi-border);
}

/* ── Botón login ── */
.btn-login {
    width: 100%;
    padding: 13px;
    /* Degradado azul NISSI; al pasar el mouse se desliza hacia el azul claro */
    background: linear-gradient(90deg, #083C82 0%, #0A4EA3 45%, #2D9CDB 100%);
    background-size: 200% 100%;
    background-position: 0% 0;
    color: white;
    border: none;
    border-radius: var(--radius-input);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-position 0.4s ease, transform 0.1s, box-shadow 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 18px rgba(10,78,163,0.30);
}

.btn-login:hover:not(:disabled) {
    background-position: 100% 0;
    box-shadow: 0 8px 24px rgba(45,156,219,0.35);
    transform: translateY(-1px);
}

.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.75; cursor: not-allowed; }

/* ── Links ── */
.login-links {
    text-align: center;
    margin-top: 20px;
}

.login-links a {
    font-size: 13px;
    color: var(--nissi-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.login-links a:hover { color: var(--nissi-accent); }

/* ── Footer ── */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: var(--nissi-muted);
}

.login-footer span {
    color: var(--nissi-primary);
    font-weight: 600;
}

.login-footer-legal {
    margin-top: 2px;
    font-size: 9.5px;
    opacity: 0.75;
}

/* ── Spinner ── */
.spinner-border-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
    display: inline-block;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.d-none { display: none !important; }