/* ───────────────────────────────────────────────
   Auth Pages – Blue Theme
   ─────────────────────────────────────────────── */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 30% 50%, rgba(59,130,246,0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(59,130,246,0.10) 0%, transparent 50%);
    animation: authBgShift 20s ease-in-out infinite;
}

@keyframes authBgShift {
    0%, 100% { transform: translate(0,0) rotate(0deg); }
    33%       { transform: translate(2%,1%) rotate(1deg); }
    66%       { transform: translate(-1%,-1%) rotate(-1deg); }
}

/* ── Auth Logo Icon ── */
.auth-logo-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(59,130,246,0.3);
}

/* ── Back to Home Link ── */
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, rgba(250,250,250,0.45));
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 18px;
    padding: 6px 0;
    transition: color 0.2s, transform 0.2s;
}
.auth-back-link i { font-size: 1rem; }
.auth-back-link:hover { color: #3B82F6; transform: translateX(-3px); }
body.light-mode .auth-back-link { color: #64748B; }
body.light-mode .auth-back-link:hover { color: #3B82F6; }

/* ── Register Layout (compact card, no forced page scroll) ── */
.auth-container--register {
    max-width: 960px;
    min-height: 520px;
}
.auth-container--register .auth-brand {
    flex: 0 0 36%;
    padding: 40px 32px;
}
.auth-container--register .auth-brand p { max-width: 280px; }
.auth-container--register .auth-form {
    padding: 36px 40px;
}
.auth-container--register .auth-form-inner {
    max-width: 540px;
}
.auth-container--register .auth-form-title { font-size: 1.5rem; }
.auth-container--register .auth-form-subtitle { margin-bottom: 24px; }
.register-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}
.register-fields-grid .input-group-custom { margin-bottom: 14px; }
.register-field-span2 { grid-column: 1 / -1; }
.register-fields-grid .social-accounts-section { margin-top: 0; }
@media (max-width: 768px) {
    .auth-container--register { min-height: auto; }
    .auth-container--register .auth-brand { min-height: 150px; }
    .register-fields-grid { grid-template-columns: 1fr; }
}

/* ── Theme Toggle (Auth Pages) ── */
.auth-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    padding: 10px 16px;
}
body.light-mode .auth-theme-toggle {
    background: #FFFFFF;
    border-color: rgba(0,0,0,0.08);
    color: #3F3F46;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
body.light-mode .auth-theme-toggle:hover {
    background: #F4F4F5;
    border-color: #3B82F6;
    color: #3B82F6;
}

/* ── Split Panel ── */
.auth-container {
    display: flex;
    width: 100%; max-width: 1100px; min-height: 600px;
    background: var(--bg-card, #121214);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.20), 0 8px 20px rgba(0,0,0,0.10);
    overflow: hidden;
    position: relative; z-index: 1;
    animation: authSlideUp 0.5s ease-out;
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}
@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    flex: 1;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 48px; color: #fff;
    position: relative; overflow: hidden;
}
.auth-brand::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.auth-brand-content { position: relative; z-index: 1; text-align: center; }
.auth-brand-icon {
    width: 80px; height: 80px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.20);
}
.auth-brand h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.auth-brand p  { font-size: 1rem; opacity: 0.85; line-height: 1.6; max-width: 320px; }
.auth-brand .decor-circles { display: flex; gap: 8px; margin-top: 32px; }
.auth-brand .decor-circles span {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.30);
    animation: decorPulse 2s ease-in-out infinite;
}
.auth-brand .decor-circles span:nth-child(2) { animation-delay: 0.3s; }
.auth-brand .decor-circles span:nth-child(3) { animation-delay: 0.6s; }
@keyframes decorPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.3); }
}

.auth-form {
    flex: 1; display: flex;
    align-items: center; justify-content: center;
    padding: 48px;
}
.auth-form-inner { width: 100%; max-width: 400px; }
.auth-form-title    { font-size: 1.75rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary, #FAFAFA); }
.auth-form-subtitle { color: var(--text-muted, rgba(250,250,250,0.45)); margin-bottom: 32px; font-size: 0.95rem; }

/* ── Input Groups ── */
.input-group-custom { margin-bottom: 20px; }
.input-icon-wrapper { position: relative; }
.input-icon-wrapper .input-icon {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    color: #71717A; font-size: 1.1rem;
    z-index: 4; pointer-events: none; transition: color 0.2s;
}
.input-icon-wrapper .form-control,
.input-icon-wrapper .form-select {
    padding-left: 46px; height: 50px;
    border: 2px solid var(--border-muted, rgba(255,255,255,0.12)); border-radius: 12px;
    font-size: 0.95rem; transition: all 0.25s;
    background: var(--bg-elevated, #27272A);
    color: var(--text-primary, #FAFAFA);
}
.input-icon-wrapper .form-control::placeholder,
.input-icon-wrapper .form-select::placeholder {
    color: var(--text-muted, rgba(250,250,250,0.45));
    opacity: 1;
}
.input-icon-wrapper .form-control:-ms-input-placeholder,
.input-icon-wrapper .form-select:-ms-input-placeholder {
    color: var(--text-muted, rgba(250,250,250,0.45));
}
.input-icon-wrapper .form-control::-ms-input-placeholder,
.input-icon-wrapper .form-select::-ms-input-placeholder {
    color: var(--text-muted, rgba(250,250,250,0.45));
}
.input-icon-wrapper .form-control:focus,
.input-icon-wrapper .form-select:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.10);
}
.input-icon-wrapper .form-control:focus ~ .input-icon,
.input-icon-wrapper .form-select:focus ~ .input-icon { color: #3B82F6; }
.input-icon-wrapper .form-control:-webkit-autofill,
.input-icon-wrapper .form-control:-webkit-autofill:hover,
.input-icon-wrapper .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary, #FAFAFA);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated, #27272A) inset;
    transition: background-color 9999s ease-in-out 0s;
    border: 2px solid var(--border-muted, rgba(255,255,255,0.12));
}
.input-group-custom .form-check-input {
    width: 1.2em; height: 1.2em; margin-top: 0.15em;
    border: 2px solid var(--border-muted, rgba(255,255,255,0.12)); cursor: pointer;
    background: var(--bg-elevated, #27272A);
}
.input-group-custom .form-check-input:checked {
    background-color: #3B82F6; border-color: #3B82F6;
}
.input-group-custom .form-label {
    font-weight: 600; font-size: 0.875rem; color: var(--text-secondary, rgba(250,250,250,0.70)); margin-bottom: 6px;
}

/* ── Buttons ── */
.btn-auth {
    height: 50px; border-radius: 12px;
    font-weight: 600; font-size: 1rem;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none; color: #fff;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.35);
    color: #fff;
}
.btn-auth:active { transform: translateY(0); }
.btn-auth::after {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}
.btn-auth:hover::after { left: 100%; }

.btn-auth-outline {
    height: 50px; border-radius: 12px;
    font-weight: 600; font-size: 1rem;
    border: 2px solid #3B82F6; color: #3B82F6;
    background: transparent; transition: all 0.3s;
}
.btn-auth-outline:hover {
    background: #3B82F6; color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59,130,246,0.25);
}

/* ── Links ── */
.auth-link { color: #60A5FA; text-decoration: none; font-weight: 500; transition: all 0.2s; }
.auth-link:hover { color: #2563EB; text-decoration: underline; }

.auth-divider {
    display: flex; align-items: center;
    color: var(--text-muted, rgba(250,250,250,0.45)); font-size: 0.875rem; margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-muted, rgba(255,255,255,0.12));
}
.auth-divider::before { margin-right: 16px; }
.auth-divider::after  { margin-left: 16px; }

/* ── Alerts ── */
.auth-alert {
    border-radius: 12px; padding: 14px 16px;
    border: none; font-size: 0.9rem; margin-bottom: 20px;
    animation: authAlertSlide 0.3s ease-out;
}
@keyframes authAlertSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-alert-success { background: rgba(16,185,129,0.12); color: #34D399; border-left: 4px solid #10B981; }
.auth-alert-danger  { background: rgba(239,68,68,0.12); color: #F87171; border-left: 4px solid #EF4444; }
.auth-alert-warning { background: rgba(245,158,11,0.12); color: #FBBF24; border-left: 4px solid #F59E0B; }
.auth-alert-info    { background: rgba(59,130,246,0.12); color: #60A5FA; border-left: 4px solid #3B82F6; }
.auth-alert ul { margin-bottom: 0; padding-left: 20px; }
.auth-alert li { margin-bottom: 2px; }

/* ── Auth Card Icons ── */
.auth-card-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}
.auth-card-icon-success { background: rgba(16,185,129,0.15); color: #10B981; }
.auth-card-icon-danger  { background: rgba(239,68,68,0.15);  color: #EF4444; }
.auth-icon-centered     { margin: 0 auto 16px; }

/* ── Validation ── */
.input-validation-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.10) !important;
}
.input-validation-error ~ .input-icon { color: #EF4444 !important; }
.input-validation-error:focus {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 4px rgba(239,68,68,0.15) !important;
}
.field-validation-error {
    display: block;
    color: #EF4444;
    font-size: 0.8rem;
    margin-top: 4px;
}
.validation-summary-errors {
    border-radius: 12px;
    padding: 14px 16px;
    background: rgba(239,68,68,0.12);
    color: #F87171;
    border-left: 4px solid #EF4444;
    font-size: 0.9rem;
    margin-bottom: 20px;
    animation: authAlertSlide 0.3s ease-out;
}
.validation-summary-errors ul { margin-bottom: 0; padding-left: 20px; }
.validation-summary-errors li { margin-bottom: 2px; }

/* ── Utility ── */
.auth-check-label    { font-weight: 500; color: var(--text-secondary, rgba(250,250,250,0.70)); cursor: pointer; }
.auth-muted-text     { color: var(--text-muted, rgba(250,250,250,0.45)); font-size: 0.9rem; }
.auth-label-optional { color: var(--text-muted, rgba(250,250,250,0.45)); font-weight: 400; }
.auth-card-centered  { text-align: center; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .auth-container { flex-direction: column; min-height: auto; max-width: 440px; }
    .auth-brand { padding: 28px 20px; min-height: 160px; }
    .auth-brand h2 { font-size: 1.4rem; }
    .auth-brand p  { display: none; }
    .auth-form { padding: 28px 20px; }
    .auth-form-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
    .auth-page { padding: 12px; }
    .auth-container { max-width: 100%; border-radius: 16px; }
    .auth-brand { padding: 20px 16px; min-height: 120px; border-radius: 16px 16px 0 0; }
    .auth-form { padding: 24px 16px; }
    .auth-form-title { font-size: 1.25rem; }
    .input-icon-wrapper .form-control,
    .input-icon-wrapper .form-select { height: 46px; font-size: 0.9rem; }
    .btn-auth { height: 46px; font-size: 0.95rem; }
}

/* ── Light Mode Overrides ── */
body.light-mode .auth-container {
    background: rgba(255,255,255,0.97);
    border-color: rgba(0,0,0,0.08);
}
body.light-mode .auth-form-title { color: #1E293B; }
body.light-mode .auth-form-subtitle { color: #64748B; }
body.light-mode .input-icon-wrapper .input-icon { color: #94A3B8; }
body.light-mode .input-icon-wrapper .form-control,
body.light-mode .input-icon-wrapper .form-select {
    background: #fff;
    border-color: #E2E8F0;
    color: #09090B;
}
body.light-mode .input-icon-wrapper .form-control::placeholder,
body.light-mode .input-icon-wrapper .form-select::placeholder {
    color: #94A3B8;
    opacity: 1;
}
body.light-mode .input-icon-wrapper .form-control:-ms-input-placeholder,
body.light-mode .input-icon-wrapper .form-select:-ms-input-placeholder {
    color: #94A3B8;
}
body.light-mode .input-icon-wrapper .form-control::-ms-input-placeholder,
body.light-mode .input-icon-wrapper .form-select::-ms-input-placeholder {
    color: #94A3B8;
}
body.light-mode .input-icon-wrapper .form-control:focus,
body.light-mode .input-icon-wrapper .form-select:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.10);
}
body.light-mode .input-icon-wrapper .form-control:-webkit-autofill,
body.light-mode .input-icon-wrapper .form-control:-webkit-autofill:hover,
body.light-mode .input-icon-wrapper .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #09090B;
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-in-out 0s;
    border: 2px solid #E2E8F0;
}
body.light-mode .input-group-custom .form-label { color: #475569; }
body.light-mode .input-group-custom .form-check-input {
    border-color: #CBD5E0;
    background: #fff;
}
body.light-mode .auth-link { color: #3B82F6; }
body.light-mode .auth-divider { color: #94A3B8; }
body.light-mode .auth-divider::before,
body.light-mode .auth-divider::after { background: #E2E8F0; }
body.light-mode .auth-check-label { color: #475569; }
body.light-mode .auth-muted-text { color: #64748B; }
body.light-mode .auth-label-optional { color: #94A3B8; }
body.light-mode .auth-alert-success { background: #F0FDF4; color: #166534; }
body.light-mode .auth-alert-danger { background: #FEF2F2; color: #991B1B; }
body.light-mode .auth-alert-warning { background: #FFFBEB; color: #92400E; }
body.light-mode .auth-alert-info { background: #EFF6FF; color: #1E40AF; }
body.light-mode .validation-summary-errors {
    background: #FEF2F2;
    color: #991B1B;
}
body.light-mode .platform-checkbox-box {
    background: #F4F4F5;
    border-color: rgba(0,0,0,0.15);
    color: #3F3F46;
}
body.light-mode .platform-checkbox-item:hover .platform-checkbox-box {
    background: rgba(59,130,246,0.06);
}
body.light-mode .platform-checkbox-item input[type="checkbox"]:checked + .platform-checkbox-box {
    background: rgba(59,130,246,0.10);
    color: #3B82F6;
}
body.light-mode .platform-url-field {
    background: #F4F4F5;
    border-color: rgba(0,0,0,0.15);
}

/* ── Auth Card (Verify Email Change) ── */
.auth-card { max-width: 450px; }
.auth-verify-icon { font-size: 4rem; }

/* ── Hidden State (JS toggles) ── */
.auth-validation-summary { display: none; }

/* ── Register Success Box ── */
.reg-success-box {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}
.reg-success-icon { font-size: 2rem; color: #10B981; }
.reg-success-title {
    font-weight: 600;
    color: #34D399;
    margin: 10px 0 4px;
}
.reg-success-text {
    color: var(--text-muted, rgba(250,250,250,0.60));
    font-size: 0.85rem;
    margin: 0;
}

/* ── Auth Page Helpers ── */
.mt-12 { margin-top: 12px; }
.auth-hint {
    font-size: 0.78rem;
    color: var(--text-muted, rgba(250,250,250,0.50));
}
.btn-radius-sm { border-radius: 8px; }

/* ── Social Accounts Section (Register) ── */
.social-accounts-section { margin-top: 20px; }
.social-accounts-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-primary, #f8fafc);
}
.social-accounts-hint {
    font-size: 0.8rem;
    color: var(--text-muted, rgba(250,250,250,0.50));
    margin-bottom: 12px;
}

/* ── Social Badges (preview) ── */
.social-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px;
}
.social-badge-close { font-size: 0.5rem; }
