.auth-layout {
    min-height: calc(100vh - var(--ticker-h) - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
    box-sizing: border-box;
}

.auth-layout *,
.auth-layout *::before,
.auth-layout *::after {
    box-sizing: border-box;
}

.auth-layout::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 30%,
            var(--grad-a),
            transparent 40%),
        radial-gradient(circle at 80% 70%,
            var(--grad-b),
            transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.auth-container {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 48px;
    box-shadow: var(--shadow-card);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 8px;
}

.auth-logo span {
    color: var(--orange);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 8px 0 0;
    display: block;
    line-height: 1.5;
}

.auth-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0 0 8px;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.auth-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--orange);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: var(--text-dim);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-alt-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-alt-link a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-alt-link a:hover {
    color: var(--teal);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.02em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-dim);
    display: flex;
    pointer-events: none;
    z-index: 2;
}

.form-input {
    width: 100%;
    min-width: 0;
    padding: 14px 46px 14px 42px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-dim);
}

.form-input::placeholder {
    color: var(--text-dim);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
}

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

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 1px;
}

.checkbox-input:checked+.checkbox-custom {
    background: var(--orange);
    border-color: var(--orange);
}

.checkbox-input:checked+.checkbox-custom::after {
    content: '\2713';
    color: #fff;
    font-family: Arial, sans-serif;
    /* Poppins has no ✓ glyph */
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.forgot-link {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--teal);
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 0 24px var(--orange-glow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--orange-glow);
}

.btn-submit:active {
    transform: scale(0.98);
}

.social-buttons {
    display: flex;
    gap: 12px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    border-color: var(--text-dim);
    background: var(--surface);
    transform: translateY(-1px);
}

.role-select {
    margin-bottom: 4px;
}

.role-toggle {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.role-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.role-toggle-btn.active-advertiser {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 0 20px var(--orange-glow);
}

.role-toggle-btn.active-publisher {
    background: var(--teal);
    color: #060C1A;
    box-shadow: 0 0 20px var(--teal-glow);
}

.role-toggle-btn:hover:not(.active-advertiser):not(.active-publisher) {
    background: var(--surface-2);
    color: var(--text);
}

.role-description {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    margin-bottom: 4px;
}

.inline-link {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
}

.inline-link:hover {
    color: var(--teal);
}

.auth-info-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .auth-layout {
        padding: 24px 16px;
    }

    .auth-card {
        padding: 36px 28px;
        border-radius: 16px;
    }

    .auth-container {
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-logo {
        font-size: 26px;
    }
}
