body.auth-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.16), transparent 28%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 48%, #fff7ed 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--cor-texto);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 460px);
    align-items: stretch;
    gap: 2rem;
    padding: 2rem;
}

.auth-brand-panel,
.auth-card {
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
}

.auth-brand-panel {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
    color: #e2e8f0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 4rem);
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    align-self: flex-start;
}

.auth-brand-logo-wrap {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.auth-brand-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.auth-brand-text strong {
    font-size: 1.2rem;
    line-height: 1.1;
}

.auth-brand-text span {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.auth-brand-copy {
    margin: 2.5rem 0 2rem;
    max-width: 560px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    color: #bfdbfe;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-brand-copy h1 {
    margin: 1rem 0 0.85rem;
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.auth-brand-copy p {
    margin: 0;
    max-width: 48rem;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #cbd5e1;
}

.auth-highlights {
    display: grid;
    gap: 1rem;
}

.auth-highlight {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-highlight i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fbbf24;
    flex-shrink: 0;
}

.login-form {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.96);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-self: end;
    align-self: center;
}

.login-back {
    margin-bottom: 1.5rem;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--cor-texto-claro);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.login-back-link:hover {
    color: var(--cor-primary);
    transform: translateX(-2px);
}

.login-header {
    text-align: left;
    margin-bottom: 1.75rem;
}

.login-logo-compact {
    margin-bottom: 1rem;
}

.login-logo {
    width: auto;
    max-width: 220px;
    height: 72px;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.login-header h2 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--cor-texto);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: var(--cor-texto-claro);
    font-size: 0.98rem;
    line-height: 1.65;
    margin: 0;
}

.login-field {
    margin-bottom: 1.25rem;
}

.login-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cor-texto);
    margin-bottom: 0.55rem;
}

.login-label i {
    margin-right: 0.625rem;
    color: var(--cor-primary);
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.login-field input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1.5px solid #dbe4f0;
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f8fafc;
    color: var(--cor-texto);
}

.login-field input:focus {
    outline: none;
    border-color: var(--cor-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.login-field input::placeholder {
    color: #94a3b8;
}

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

.login-password-wrap input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cor-texto-claro);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--cor-primary);
}

.login-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--cor-accent), #fb923c);
    color: #fff;
    border: none;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.25s ease;
    margin: 0.5rem 0 1.5rem;
    box-shadow: 0 14px 24px rgba(249, 115, 22, 0.25);
}

.login-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(249, 115, 22, 0.32);
}

.login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#msg {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    animation: slideIn 0.3s ease-out;
}

#msg[hidden] {
    display: none;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#msg.alert {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

#msg.alert-error {
    background-color: var(--cor-erro-bg);
    color: var(--cor-erro);
    border: 1px solid rgba(220, 38, 38, 0.24);
}

#msg.alert-success {
    background-color: var(--cor-sucesso-bg);
    color: var(--cor-sucesso);
    border: 1px solid rgba(22, 163, 74, 0.24);
}

.login-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #e5edf5;
    text-align: center;
}

.login-footer-text {
    color: var(--cor-texto-claro);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.login-create-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: 1.5px solid rgba(37, 99, 235, 0.22);
    border-radius: 18px;
    color: var(--cor-primary);
    background: rgba(37, 99, 235, 0.04);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.login-create-account:hover {
    background-color: var(--cor-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

body.auth-page-login {
    background:
        radial-gradient(circle at top center, rgba(37, 99, 235, 0.14), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

.auth-shell-login {
    grid-template-columns: minmax(320px, 520px);
    justify-content: center;
    padding: calc(2.5rem + env(safe-area-inset-top)) 1.5rem calc(2.5rem + env(safe-area-inset-bottom));
}

.login-card-clean {
    max-width: 520px;
    justify-self: center;
    padding: 2.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.login-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 1rem;
}

.login-logo-centered {
    max-width: min(240px, 72vw);
    height: 84px;
}

.auth-page-login .login-header {
    text-align: center;
}

.auth-page-login .login-header h2 {
    margin-top: 0;
}

.auth-page-login .login-subtitle {
    max-width: 320px;
    margin: 0 auto;
}

.auth-page-login .login-back {
    margin-bottom: 1.25rem;
}

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
    }

    .login-form {
        justify-self: stretch;
        max-width: none;
    }

    .auth-shell-login {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-shell {
        padding: 1rem;
        gap: 1rem;
    }

    .auth-brand-panel,
    .auth-card {
        border-radius: 24px;
    }

    .auth-brand-panel,
    .login-form {
        padding: 1.5rem;
    }

    .auth-brand-copy h1 {
        font-size: 2rem;
    }

    .login-card-clean {
        padding: 1.5rem;
        border-radius: 24px;
    }

    .login-logo-centered {
        width: 84px;
        height: 84px;
    }
}

@media (max-width: 480px) {
    body.auth-page {
        background: #f8fafc;
    }

    .auth-shell {
        padding: 0;
        gap: 0;
    }

    .auth-brand-panel {
        border-radius: 0;
        min-height: auto;
        padding: 1.25rem;
    }

    .login-form {
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 1.5rem 1.25rem 2rem;
        background: #fff;
    }

    .login-header h2 {
        font-size: 1.55rem;
    }

    .login-field input {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .auth-brand-logo-wrap {
        width: 60px;
        height: 60px;
    }

    .auth-brand-logo {
        width: 44px;
        height: 44px;
    }

    .auth-highlight {
        padding: 0.85rem 0.9rem;
    }

    .login-form {
        padding: 1.25rem 1rem 1.6rem;
    }

    .login-submit i,
    .login-create-account i {
        display: none;
    }
}
