/* Auth Page - built on top of the shared design tokens in style.css */

.auth-body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-color);
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.12), transparent 45%),
                       radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.08), transparent 45%);
}

.auth-panel {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px;
}

.auth-logo {
    width: 100%;
    justify-content: center;
    margin-bottom: 22px;
    font-size: clamp(42px, 4vw, 52px);
    line-height: 1;
    filter: drop-shadow(0 0 18px rgba(99, 102, 241, 0.2));
}

.auth-logo .outcome-brand-word-mask {
    overflow: visible;
}

.auth-title {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 14px;
    margin-bottom: 32px;
}

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

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

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.input-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 16px;
    gap: 12px;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-wrapper i {
    color: var(--text-muted);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.toggle-password {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: color 0.2s ease;
}

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

.form-group.has-error .input-wrapper {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.field-error {
    display: none;
    color: #f87171;
    font-size: 12px;
}

.form-group.has-error .field-error {
    display: block;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
}

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

.forgot-link:hover {
    text-decoration: underline;
}

.form-error {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
}

.form-error.visible {
    display: block;
}

.form-success {
    display: none;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
}

.form-success.visible {
    display: block;
}

.auth-submit-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.auth-submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner.hidden {
    display: none;
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.demo-credentials {
    display: grid;
    gap: 4px;
    margin: -12px 0 24px;
    padding: 12px 14px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.demo-credentials strong {
    color: var(--text-main);
    font-size: 13px;
}

/* OAuth provider controls */
.oauth-buttons {
    display: grid;
    gap: 12px;
}

.oauth-button {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 12px 18px;
    color: var(--text-main);
    background: rgba(8, 10, 14, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.oauth-button i {
    width: 18px;
    font-size: 18px;
    text-align: center;
}

.oauth-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.oauth-button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.3);
    outline-offset: 2px;
}

.oauth-button--google i {
    color: #f1f3f4;
}

.oauth-button--discord i {
    color: #b8c0ff;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 22px 0;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.auth-panel > .form-error,
.auth-panel > .form-success {
    margin-bottom: 18px;
}

@media (max-width: 520px) {
    .auth-panel {
        padding: 30px 22px;
        border-radius: 20px;
    }

    .oauth-button {
        min-height: 46px;
    }
}
