:root {
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-soft: #60A5FA;
    --navy-dark: #0A192F;
    --navy-card: #0F2A4A;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --danger-bg: #fef2f2;
    --danger: #b91c1c;
    --danger-border: #fecaca;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.login-page {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 45%, #eff6ff 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    min-height: 100vh;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    padding: 32px 28px 24px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-logo-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    display: block;
}

.brand-text strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-text span {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.login-heading h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-heading p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 22px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.login-ativo-hint {
    font-size: 0.84rem;
    color: var(--muted);
    margin: -4px 0 14px;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 16px;
}

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.field-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-input:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.field-input svg {
    width: 18px;
    height: 18px;
    fill: #2563eb;
    flex-shrink: 0;
}

.field-input input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
}

.field-input input::placeholder {
    color: #94a3b8;
}

.form-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.forgot-link {
    font-size: 0.84rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary);
}

.btn-primary,
.btn-secondary {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.btn-secondary {
    background: #fff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #eff6ff;
}

.login-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--muted);
}

.login-footer strong {
    color: #0f172a;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.28), transparent 42%),
        linear-gradient(145deg, #0a192f 0%, #0f2a4a 45%, #172554 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.hero-glow {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 68%);
    top: -120px;
    right: -80px;
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 90%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.hero-kicker {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-soft);
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-content h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.hero-content h2 span {
    color: #60a5fa;
}

.hero-features {
    list-style: none;
    display: grid;
    gap: 14px;
}

.hero-features li {
    position: relative;
    padding-left: 22px;
    color: #cbd5e1;
    font-size: 0.98rem;
    line-height: 1.5;
}

.hero-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.88rem;
}

@media (max-width: 992px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        display: none;
    }

    .login-panel {
        padding: 24px 16px;
    }

    .login-card {
        padding: 28px 22px 22px;
    }
}

@media (max-width: 480px) {
    .brand-block {
        align-items: flex-start;
    }

    .login-heading h1 {
        font-size: 1.5rem;
    }
}
