/* ── Background ─────────────────────────────────────────────────────────────── */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        url('/assets/img/NexCore/logosNexcore/financeiro/login-bg-1920x1080.jpg')
        center center / cover no-repeat;
}

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(5,6,12,.55) 0%, rgba(5,6,12,.82) 100%);
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
body {
    background: #070910;
    min-height: 100vh;
}

.login-wrap {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
}

/* ── Card glassmorphism ─────────────────────────────────────────────────────── */
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 17, 26, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    box-shadow:
        0 0 0 1px rgba(208, 21, 42, 0.08),
        0 24px 64px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Linha de acento superior vermelha/azul */
.login-card::before {
    content: '';
    display: block;
    position: absolute;
    top: -1px;
    left: 16px;
    right: 16px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(90deg, #D0152A 0%, #1A3A8F 100%);
}

.login-card {
    position: relative;
}

/* ── Inputs ─────────────────────────────────────────────────────────────────── */
.login-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f0f0f0 !important;
    border-radius: 8px !important;
    padding: .6rem .9rem;
    transition: border-color .2s, box-shadow .2s;
}

.login-input::placeholder { color: rgba(255,255,255,.28) !important; }

.login-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(208, 21, 42, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(208, 21, 42, 0.15) !important;
    color: #fff !important;
    outline: none;
}

.login-input-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: none !important;
    color: rgba(255,255,255,.45) !important;
    border-radius: 0 8px 8px 0 !important;
}

.login-input-btn:hover { color: rgba(255,255,255,.8) !important; }

.input-group .login-input { border-radius: 8px 0 0 8px !important; }

/* ── Botão principal ────────────────────────────────────────────────────────── */
.btn-login {
    background: linear-gradient(135deg, #D0152A 0%, #a01020 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .7rem;
    border-radius: 8px;
    letter-spacing: .3px;
    transition: opacity .2s, transform .1s;
}

.btn-login:hover  { opacity: .9; color: #fff; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }

/* ── Links ──────────────────────────────────────────────────────────────────── */
.hover-white:hover { color: #fff !important; }

/* ── Rodapé ─────────────────────────────────────────────────────────────────── */
.login-footer {
    position: fixed;
    bottom: 1rem;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
    color: rgba(255,255,255,.22);
    font-size: .72rem;
    letter-spacing: .5px;
}

/* ── Toggle tema flutuante ─────────────────────────────────────────────────── */
.btn-tema-float {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    cursor: pointer;
    transition: background .2s, color .2s;
    font-size: 1rem;
}

.btn-tema-float:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

/* ── Responsivo ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card { padding: 2rem 1.25rem; border-radius: 12px; }
}

/* ── Tema claro ─────────────────────────────────────────────────────────────── */
[data-bs-theme="light"] body { background: #f4f5f8; }

[data-bs-theme="light"] .login-overlay {
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, .55) 0%, rgba(244, 245, 248, .88) 100%);
}

[data-bs-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 0 0 1px rgba(208, 21, 42, 0.06),
        0 24px 64px rgba(0, 0, 0, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-bs-theme="light"] .login-input {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    color: #1a1a1a !important;
}

[data-bs-theme="light"] .login-input::placeholder { color: rgba(0, 0, 0, .35) !important; }

[data-bs-theme="light"] .login-input:focus {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(208, 21, 42, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(208, 21, 42, 0.12) !important;
    color: #000 !important;
}

[data-bs-theme="light"] .login-input-btn {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-left: none !important;
    color: rgba(0, 0, 0, .45) !important;
}

[data-bs-theme="light"] .login-input-btn:hover { color: rgba(0, 0, 0, .8) !important; }

[data-bs-theme="light"] .hover-white:hover { color: #000 !important; }

[data-bs-theme="light"] .text-white-50 { color: rgba(0, 0, 0, .55) !important; }
[data-bs-theme="light"] .text-white { color: #1a1a1a !important; }

[data-bs-theme="light"] .login-footer { color: rgba(0, 0, 0, .35); }

[data-bs-theme="light"] .btn-tema-float {
    background: rgba(0, 0, 0, .05);
    border: 1px solid rgba(0, 0, 0, .12);
    color: rgba(0, 0, 0, .5);
}

[data-bs-theme="light"] .btn-tema-float:hover {
    background: rgba(0, 0, 0, .1);
    color: #000;
}

/* Badge "Acesso Administrativo — SAS" tem cor fixa pensada pro fundo escuro;
   sem isso o texto rosa claro (#ff6b7a) fica ilegível sobre o card claro. */
[data-bs-theme="light"] .badge-sas-tag {
    background: rgba(208, 21, 42, .1) !important;
    color: #a01020 !important;
    border-color: rgba(208, 21, 42, .3) !important;
}

/* Alertas de erro/aviso também têm cor fixa pensada pro fundo escuro. */
[data-bs-theme="light"] .alert-login-danger {
    background: rgba(208, 21, 42, .08) !important;
    border-color: rgba(208, 21, 42, .3) !important;
    color: #a01020 !important;
}

[data-bs-theme="light"] .alert-login-warning {
    background: rgba(255, 193, 7, .15) !important;
    border-color: rgba(255, 193, 7, .4) !important;
    color: #7a5b00 !important;
}
