:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e2e8f0;
    --background: #f7f8fc;
    --text: #0f172a;
    --muted: #64748b;
    --success: #15803d;
    --error: #b91c1c;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

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

.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.auth-brand-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-brand-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.06);
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-card-header h1 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-card-header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.auth-input-group {
    position: relative;
}

.auth-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

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

.auth-input.is-valid {
    border-color: var(--success);
}

.auth-input.is-invalid {
    border-color: var(--error);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.auth-button {
    width: 100%;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.auth-button:hover {
    background: var(--primary-hover);
}

.auth-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-button--outline {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.auth-button--outline:hover {
    background: #f8fafc;
    border-color: #cbd5f5;
}

.auth-alert {
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    border: 1px solid transparent;
}

.auth-alert--error {
    background: rgba(248, 113, 113, 0.1);
    color: var(--error);
    border-color: rgba(248, 113, 113, 0.4);
}

.auth-alert--success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.35);
}

.auth-alert-label {
    font-weight: 600;
}

.auth-meta {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 6px;
}

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

.auth-link:hover {
    color: var(--primary-hover);
}

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

.auth-bottom p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-support {
    margin-top: 24px;
    text-align: center;
}

.auth-support p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-support-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-secondary-button {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-secondary-button:hover {
    border-color: #cbd5f5;
    background: #f8fafc;
}

.auth-security {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--muted);
}

.auth-security span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.floating-support-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 14px 24px rgba(22, 163, 74, 0.35);
    transition: background 0.2s ease;
    z-index: 50;
}

.floating-support-btn:hover {
    background: #15803d;
}

.auth-info-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 12px;
}

.otp-input {
    text-align: center;
    letter-spacing: 0.35em;
    font-size: 1.4rem;
    font-weight: 600;
}

.auth-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.password-strength {
    margin-top: 8px;
}

.password-strength[hidden] {
    display: none;
}

.password-strength__bars {
    display: flex;
    gap: 6px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background 0.2s ease;
}

.strength-bar.is-weak {
    background: #f87171;
}

.strength-bar.is-fair {
    background: #fbbf24;
}

.strength-bar.is-strong {
    background: #34d399;
}

.password-strength__text {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px;
    }

    .auth-brand-logo {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .auth-wrapper {
        padding: 32px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .floating-support-btn {
        transition: none;
    }
}

