/* ========================================
   AUTH PAGES — Login & Register Styles
   ======================================== */

/* ── Auth Page Layout ── */
.auth-page {
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    padding: 24px;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1040px;
    min-height: 640px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

/* ── Illustration Panel (Left) ── */
.auth-illustration {
    flex: 0 0 420px;
    background: var(--bg-accent-gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
    overflow: hidden;
}

.register-illustration {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #9333EA 100%);
}

.auth-illustration-bg {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image:
        radial-gradient(circle at 20% 80%, white 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, white 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, white 1px, transparent 1px);
    background-size: 40px 40px, 60px 60px, 80px 80px;
}

.auth-illustration::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-illustration::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-illustration-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.auth-illustration-icon {
    font-size: 56px;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.auth-illustration-content h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.auth-illustration-content p {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 28px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.auth-illustration-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-feature-icon {
    font-size: 16px;
}

/* Stat badges for register page */
.auth-stat-badges {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    justify-content: center;
}

.auth-stat-badge {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    text-align: center;
    backdrop-filter: blur(10px);
}

.auth-stat-badge strong {
    display: block;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 2px;
}

.auth-stat-badge span {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 500;
}

/* ── Form Panel (Right) ── */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Logo */
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 28px;
}

.auth-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 900;
}

.auth-logo .logo-text-highlight {
    color: var(--primary);
}

/* Headings */
.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ── Social Login ── */
.social-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.discord-btn {
    color: #5865F2;
}

.discord-btn:hover {
    border-color: #5865F2;
    background: #EEF0FF;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Form Styles ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-link {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.form-link:hover {
    color: var(--primary-dark);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 14px;
    z-index: 1;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.input-wrapper input::placeholder {
    color: var(--text-tertiary);
}

.input-wrapper input:focus {
    background: var(--bg-primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.08);
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-fast);
}

.toggle-password:hover {
    opacity: 0.7;
}

/* Password strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

/* Checkbox */
.form-group-row {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-link-inline {
    color: var(--primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.form-link-inline:hover {
    color: var(--primary-dark);
}

/* Submit Button */
.btn-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    background: var(--bg-accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(238, 77, 45, 0.3);
    margin-top: 4px;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 77, 45, 0.4);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-arrow {
    transition: transform var(--transition-fast);
    font-size: 18px;
}

.btn-auth-submit:hover .btn-arrow {
    transform: translateX(4px);
}

/* Switch Link */
.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-switch a:hover {
    color: var(--primary-dark);
}

/* ── Alert Messages ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.alert p {
    margin: 2px 0;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}

.alert-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #16A34A;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-illustration {
        display: none;
    }

    .auth-container {
        max-width: 480px;
    }

    .auth-form-panel {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 0;
        align-items: stretch;
    }

    .auth-container {
        border-radius: 0;
        min-height: calc(100vh - var(--navbar-height));
        box-shadow: none;
        border: none;
    }

    .auth-form-panel {
        padding: 28px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .social-login-grid {
        grid-template-columns: 1fr;
    }

    .auth-title {
        font-size: 20px;
    }
}