:root {
    --login-blue-900: #0c2a66;
    --login-blue-700: #1d4ed8;
    --login-blue-600: #2563eb;
    --login-blue-500: #3b82f6;
    --login-gold: #f2b705;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

/* ===== Fundo decorativo ===== */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: #0c2a66 url("images/login_bg.6f12bb4e6020.jpg") center center / cover no-repeat;
}

/* ===== Shell / Card ===== */
.login-shell {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 980px;
    min-height: 600px;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(5, 20, 60, 0.35);
    display: flex;
    overflow: hidden;
}

/* ===== Lado visual (imagem) ===== */
.login-visual {
    flex: 1 1 58%;
    position: relative;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: flex-end;
}

.login-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 35, 95, 0.35) 0%, rgba(8, 28, 80, 0.78) 100%);
}

.login-visual-overlay {
    position: relative;
    z-index: 1;
    padding: 44px 40px;
    color: #fff;
}

.login-visual-title {
    margin: 0;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.25;
}

.login-visual-divider {
    display: block;
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: var(--login-gold);
    margin: 0 0 14px;
}

/* ===== Lado do formulário ===== */
.login-form-side {
    flex: 1 1 42%;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    align-self: center;
    height: 48px;
    width: auto;
    margin-bottom: 28px;
}

.login-title {
    margin: 0 0 6px;
    font-size: 1.55rem;
    font-weight: 800;
    color: #111827;
    text-align: center;
}

.login-subtitle {
    margin: 0 0 28px;
    font-size: 0.95rem;
    color: #6b7280;
    text-align: center;
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 18px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.login-field label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #374151;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    width: 19px;
    height: 19px;
    color: #9ca3af;
    pointer-events: none;
}

.login-input-wrap input {
    width: 100%;
    height: 50px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 0 44px;
    font-size: 15px;
    color: #111827;
    outline: none;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.login-input-wrap input::placeholder {
    color: #9ca3af;
}

.login-input-wrap input:focus {
    border-color: var(--login-blue-600);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-toggle-pwd {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.login-toggle-pwd:hover {
    color: #4b5563;
    background: #f3f4f6;
}

.login-toggle-pwd svg {
    width: 20px;
    height: 20px;
}

.login-submit {
    margin-top: 6px;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: var(--login-blue-600);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.15s, transform 0.15s;
}

.login-submit svg {
    width: 20px;
    height: 20px;
}

.login-submit:hover {
    background: var(--login-blue-700);
    transform: translateY(-1px);
}

.login-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-footer-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-footer-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
}

.login-footer-text svg {
    width: 15px;
    height: 15px;
}

/* ===== Responsivo ===== */
@media (max-width: 860px) {
    .login-visual {
        display: none;
    }

    .login-card {
        min-height: 0;
    }

    .login-form-side {
        padding: 40px 28px;
    }
}

@media (max-width: 420px) {
    body {
        padding: 12px;
    }

    .login-form-side {
        padding: 32px 20px;
    }

    .login-title {
        font-size: 1.3rem;
    }
}
