﻿/* ---- Theme tokens (EasyDist dark theme) ---- */
:root {
    --login-bg-color: #18305a;
    --login-card-bg: #232e42;
    --login-header-bg: #151e2e;
    --login-footer-bg: #151e2e;
    --login-separator-color: #2a3750;
    --login-border-color: #3a4a6a;
    --login-button-gradient-start: #3a8bfd;
    --login-button-gradient-end: #005bea;
    --login-toggle-color: #7a7a7a;

    --login-text-color: #fff;
    --login-text-muted: rgba(255, 255, 255, 0.7);
    --login-text-dim: rgba(255, 255, 255, 0.5);

    --login-accent: #ff4c4c;
    --login-accent-hover: #3a8bfd;

    --login-radius-lg: 18px;
    --login-radius-md: 12px;

    --login-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --login-focus-ring: 0 0 0 4px rgba(58, 139, 253, 0.3);
}

/* ---- Base / Background ---- */
html, body { height: 100%; }

body {
    background: var(--login-bg-color) !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-width: 100vw;
}

.login-bg {
    height: 100vh;
    width: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---- Card (brighter) ---- */
.login-card-nexa {
    background: var(--login-card-bg);
    border-radius: var(--login-radius-lg);
    box-shadow: var(--login-shadow);
    min-width: 370px;
    max-width: 410px;
    width: 100%;
    color: var(--login-text-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid var(--login-separator-color);
    animation: cardIn .35s ease-out;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.login-card-nexa:hover {
    transform: translateY(-2px);
    box-shadow: var(--login-shadow-hover);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(40, 52, 80, 0.88);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Header (lighter) ---- */
.login-header-nexa {
    background: var(--login-header-bg);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.2rem 2rem;
    gap: 1.2rem;
    min-height: 70px;
}

/*.login-logo-nexa {
    max-width: 70px;
    max-height: 50px;
    object-fit: contain;
    background: transparent;*/
    /* transforma preto em branco */
    /*filter: brightness(0) saturate(100%) invert(64%) sepia(78%) saturate(524%) hue-rotate(182deg) brightness(101%) contrast(101%);*/
    /* ligeiro brilho para destacar no fundo azul */
    /*opacity: 0.95;
}*/

.login-logo-nexa {
    max-width: 70px;
    max-height: 50px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}


.login-brand-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.login-title-nexa {
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--login-text-color);
    line-height: 1;
    margin: 0;
}

.login-title-soft {
    color: var(--login-accent);
    font-weight: 500;
}

.login-header-separator {
    height: 2px;
    background: var(--login-separator-color);
    width: 100%;
}

/* ---- Body ---- */
.login-body-nexa {
    padding: 2rem 2rem 1rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.login-title-nexa-form {
    display: flex;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--login-text-muted);
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.icon-nexa {
    font-size: 1.3rem;
    color: #6b7bb6;
}

.login-separator-nexa {
    border: none;
    border-top: 1px solid var(--login-separator-color);
    margin: 1.1rem 0 1.2rem 0;
    opacity: 0.7;
}

/* Field spacing + validation */
.login-field { margin-bottom: 14px; }

.validation-message {
    display: block;
    margin-top: 6px;
    font-size: 0.88rem;
    line-height: 1.25;
    color: rgba(255, 160, 160, 1);
    font-weight: 600;
}

/* Labels (brighter) */
.login-label-nexa {
    display: block;
    color: var(--login-text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

/* Inputs (MUCH brighter & clearer) */
.input-nexa {
    background: var(--login-card-bg) !important;
    color: var(--login-text-color) !important;
    border: 1px solid var(--login-border-color);
    border-radius: 7px;
    font-size: 1rem;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: none;
    transition: border 0.2s;
}

.input-nexa::placeholder { color: rgba(255,255,255,.52); }

.input-nexa:focus {
    border: 1.5px solid var(--login-accent-hover);
    background: var(--login-card-bg);
    color: var(--login-text-color);
    box-shadow: 0 0 0 2px rgba(58, 139, 253, 0.2);
}

/* Autofill on dark inputs */
input.input-nexa:-webkit-autofill,
input.input-nexa:-webkit-autofill:hover,
input.input-nexa:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--login-text-color);
    box-shadow: 0 0 0px 1000px rgba(44, 60, 92, 0.95) inset, var(--login-focus-ring);
    border: 1px solid rgba(92,159,255,.65);
    transition: background-color 9999s ease-in-out 0s;
}

/* Password wrapper */
.password-wrapper-nexa {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper-nexa .input-nexa {
    padding-right: 2.2rem;
    width: 100%;
}

/* Toggle (brighter) */
.toggle-password-nexa {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--login-toggle-color);
    z-index: 2;
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Checkbox line */
.login-check {
    color: var(--login-text-muted);
}

.login-check .form-check-input {
    background-color: var(--login-card-bg);
    border: 1px solid var(--login-border-color);
}

.login-check .form-check-input:checked {
    background-color: var(--login-accent-hover);
    border-color: var(--login-accent-hover);
}

/* Button (brighter gradient) */
.btn-login-nexa {
    background: linear-gradient(90deg, var(--login-button-gradient-start) 0%, var(--login-button-gradient-end) 100%);
    color: var(--login-text-color);
    font-weight: 700;
    border: none;
    border-radius: 7px;
    padding: 0.9rem 0;
    margin-top: 0.7rem;
    margin-bottom: 0.7rem;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px 0 rgba(0, 94, 234, 0.2);
    transition: background 0.2s;
}

.btn-login-nexa:hover {
    background: linear-gradient(90deg, var(--login-button-gradient-end) 0%, var(--login-button-gradient-start) 100%);
}

.recover-password-nexa {
    display: flex;
    justify-content: center;
    margin-top: 0.7rem;
}

.recover-password-nexa a {
    color: var(--login-accent);
    background: var(--login-card-bg);
    border: 1px solid var(--login-border-color);
    border-radius: 7px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.recover-password-nexa a:hover {
    background: var(--login-accent-hover);
    color: var(--login-text-color);
}

.login-footer-nexa {
    background: var(--login-footer-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: var(--login-text-muted);
    padding: 0.7rem 1.2rem;
    border-top: 1px solid var(--login-separator-color);
    margin-top: 1.2rem;
}

.login-footer-nexa .login-title-soft {
    color: var(--login-accent-hover);
    font-weight: 600;
}

/* Alerts (bootstrap) - brighter */
.alert.alert-danger {
    border-radius: var(--login-radius-md);
    background: rgba(255, 85, 85, 0.14);
    border: 1px solid rgba(255, 85, 85, 0.36);
    color: rgba(255, 240, 240, 1);
    box-shadow: 0 16px 34px rgba(0,0,0,0.18);
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .login-card-nexa,
    .input-nexa,
    .btn-login-nexa,
    .recover-password-nexa a,
    .toggle-password-nexa {
        transition: none !important;
        animation: none !important;
    }
}
