* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --bg-2: #eef4ff;
    --card: rgba(255, 255, 255, 0.94);
    --card-border: rgba(255, 255, 255, 0.85);
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --input-bg: #ffffff;
    --input-border: #dbe2ea;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

body.login-page {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 32%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.10), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.auth-card {
    width: 100%;
    max-width: 470px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 34px 32px;
    backdrop-filter: blur(8px);
}

.auth-card__brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.25);
}

.auth-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.auth-card__brand h1 {
    margin-bottom: 8px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
}

.auth-card__brand p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    opacity: 0.75;
    z-index: 2;
    pointer-events: none;
}

.input-wrap input,
.input-wrap select {
    width: 100%;
    height: 54px;
    padding: 0 46px 0 44px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    outline: none;
    font-size: 15px;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input:focus,
.input-wrap select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.input-wrap select {
    appearance: none;
    cursor: pointer;
}

.toggle-password {
    position: absolute;
    right: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.form-link,
.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-link:hover,
.auth-links a:hover {
    text-decoration: underline;
}

.btn-primary {
    height: 54px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.20);
    transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
}

.auth-alert {
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-alert--error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(185, 28, 28, 0.12);
}

.auth-alert--success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(4, 120, 87, 0.12);
}

.auth-alert--hidden,
.auth-hidden {
    display: none !important;
}

.cadastro-pf,
.cadastro-pj {
    transition: opacity 0.2s ease;
}

@media (max-width: 540px) {
    .auth-shell {
        padding: 18px 14px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .auth-card__brand h1 {
        font-size: 25px;
    }

    .auth-logo {
        width: 62px;
        height: 62px;
        font-size: 24px;
    }
}