/* =============================================
   AUTH PAGES - ACLClouds v13
   Split layout: form left, hero right (OVH style)
   ============================================= */

/* ---- PAGE WRAPPER ---- */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--bg-primary);
}

/* ---- LEFT PANEL (Form) ---- */
.auth-left-panel {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
}

.auth-left-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 32px;
}

.auth-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.auth-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.auth-form-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
}

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

.auth-left-footer {
    padding: 16px 32px;
    font-size: 12px;
    color: var(--text-quaternary);
    text-align: center;
}

.auth-left-footer p {
    margin: 6px 0 0;
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.auth-footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.15s;
}

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

.auth-footer-sep {
    color: var(--text-quaternary);
    margin: 0 2px;
}

/* ---- RIGHT PANEL (Hero) ---- */
.auth-right-hero {
    flex: 0 0 50%;
    max-width: 50%;
    background: linear-gradient(135deg, #0a2463 0%, #1e3a8a 40%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 48px;
}

/* ---- SHOWCASE CAROUSEL ---- */
.auth-showcase {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 420px;
    width: 100%;
}

.auth-showcase-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: translateY(0);
}

.auth-showcase-slide--exit {
    opacity: 0;
    transform: translateY(-20px);
}

.auth-showcase-slide--enter {
    opacity: 1;
    transform: translateY(0);
    animation: showcaseSlideIn 0.4s ease;
}

@keyframes showcaseSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-showcase-icon-wrapper,
.auth-showcase-emoji {
    width: 120px;
    height: 120px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    font-size: 56px;
    line-height: 1;
}

.auth-showcase-icon {
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

.auth-showcase-title {
    font-size: 40px;
    font-weight: 800;
    color: white;
    margin: 0 0 20px;
    letter-spacing: -0.5px;
}

.auth-showcase-description {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    max-width: 380px;
}

.auth-showcase-dots {
    display: flex;
    gap: 10px;
    margin-top: 40px;
}

.auth-showcase-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.auth-showcase-dot--active {
    background: white;
    transform: scale(1.3);
}

.auth-showcase-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Decorative shapes */
.auth-hero-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.auth-hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.auth-hero-shape-1 {
    width: 300px;
    height: 300px;
    background: #60a5fa;
    top: -80px;
    right: -60px;
}

.auth-hero-shape-2 {
    width: 200px;
    height: 200px;
    background: #34d399;
    bottom: -40px;
    left: -40px;
}

.auth-hero-shape-3 {
    width: 150px;
    height: 150px;
    background: #a78bfa;
    bottom: 30%;
    right: 10%;
}

/* ---- FORM ELEMENTS ---- */
.auth-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 28px;
}

.auth-field-group {
    margin-bottom: 18px;
}

.auth-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-field-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.auth-field-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.auth-field-input::placeholder {
    color: var(--text-quaternary);
}

/* OAuth buttons */
.auth-oauth-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
}

.auth-oauth-btn:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.auth-oauth-btn svg, .auth-oauth-btn i {
    font-size: 18px;
}

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

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

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.auth-submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-muted);
}

.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-link-highlight {
    color: var(--accent);
    font-weight: 500;
}

.auth-link-highlight:hover {
    text-decoration: underline;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

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

.auth-back-link svg {
    width: 14px;
    height: 14px;
}

.auth-link-centered {
    justify-content: center;
}

/* Forgot password link */
.auth-forgot-link {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    margin-top: -10px;
    margin-bottom: 16px;
}

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

/* ---- LANGUAGE SELECTOR ---- */
.auth-language-selector {
    margin-left: auto;
    position: relative;
}

.auth-language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.auth-language-btn:hover {
    border-color: var(--accent);
}

.auth-language-flag-img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-language-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.auth-language-chevron {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}

.auth-language-chevron.open {
    transform: rotate(180deg);
}

.auth-language-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 200;
    overflow: hidden;
}

.auth-language-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-primary);
    font-size: 13px;
    transition: background 0.1s;
}

.auth-language-item:hover {
    background: var(--bg-hover);
}

.auth-language-item.active {
    background: var(--accent-muted);
    color: var(--accent);
}

.auth-language-flag-img-dropdown {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-language-code-dropdown {
    font-weight: 600;
    font-size: 12px;
}

.auth-language-name {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Turnstile */
.auth-turnstile {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

/* ---- MOBILE ---- */
@media (max-width: 900px) {
    .auth-page-wrapper {
        flex-direction: column;
    }

    .auth-left-panel {
        flex: 1;
        max-width: 100%;
    }

    .auth-right-hero {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-left-header {
        padding: 16px 20px;
    }

    .auth-form-area {
        padding: 0 20px;
    }

    .auth-form-card {
        max-width: 100%;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-left-footer {
        padding: 12px 20px;
    }
}


/* ---- SOCIAL/OAUTH BUTTONS ---- */
.auth-social-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
}

.auth-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.auth-social-btn:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.auth-social-btn svg, .auth-social-btn i, .auth-social-btn img {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.auth-social-btn-google { }
.auth-social-btn-discord { }

/* ---- FORM FIELDS ---- */
.auth-field {
    margin-bottom: 16px;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
    outline: none;
}

.auth-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.auth-input::placeholder {
    color: var(--text-quaternary);
}

.auth-input-error {
    border-color: var(--error) !important;
}

.auth-input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-with-icon {
    padding-right: 44px;
}

.auth-input-icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.auth-input-icon-btn:hover {
    color: var(--text-primary);
}

.auth-input-icon-btn svg {
    width: 18px;
    height: 18px;
}

.auth-error-text {
    font-size: 12px;
    color: var(--error);
    margin: 4px 0 0;
}

.auth-forgot-password {
    display: block;
    text-align: right;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    margin-top: 6px;
}

.auth-forgot-password:hover {
    text-decoration: underline;
}

/* ---- TURNSTILE ---- */
.auth-turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}


/* ---- MISSING STYLES ---- */
.auth-input-with-icon {
    padding-right: 44px !important;
}

.auth-input-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1) !important;
}

.auth-email-display {
    margin-bottom: 20px;
}

.auth-email-display label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-email-display input {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: not-allowed;
    opacity: 0.7;
}

[data-theme="dark"] .auth-email-display input {
    background: var(--bg-tertiary);
    border-color: var(--border);
    color: var(--text-secondary);
}

.auth-field-description {
    font-size: 12px;
    color: var(--text-quaternary);
    margin-top: 4px;
}

.auth-form-row {
    display: flex;
    gap: 12px;
}

.auth-form-row > * {
    flex: 1;
}

.auth-info-box {
    padding: 12px 14px;
    background: rgba(10, 132, 255, 0.08);
    border: 1px solid rgba(10, 132, 255, 0.2);
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.auth-verify-code {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 28px 0;
}

.auth-verify-separator {
    color: var(--text-quaternary);
    font-size: 18px;
    user-select: none;
}

.auth-verify-input {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: var(--accent);
}

.auth-verify-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.12);
}

[data-theme="dark"] .auth-verify-input {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-primary);
}

[data-theme="dark"] .auth-verify-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.auth-verify-spam {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-quaternary);
    font-style: italic;
}

.auth-verify-loading {
    text-align: center;
    font-size: 14px;
    color: var(--accent);
}

.auth-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.auth-suggestions-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.auth-suggestion-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(10, 132, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(10, 132, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.auth-suggestion-btn:hover {
    background: rgba(10, 132, 255, 0.15);
    border-color: var(--accent);
}

.auth-captcha-box {
    margin-bottom: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 16px;
    transition: border-color 0.3s;
}

.auth-captcha-box.verified {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.auth-captcha-box.failed {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.auth-captcha-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.auth-captcha-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

.auth-captcha-checkbox.checked {
    background: #22c55e;
    border-color: #22c55e;
}

.auth-captcha-checkbox.checked svg {
    width: 14px;
    height: 14px;
    color: #fff;
}

.auth-captcha-checkbox.loading {
    border-color: var(--accent);
}

.auth-captcha-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(10, 132, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: captcha-spin 0.6s linear infinite;
}

@keyframes captcha-spin {
    to { transform: rotate(360deg); }
}

.auth-captcha-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-captcha-box.verified .auth-captcha-label {
    color: #22c55e;
}

.auth-captcha-error {
    margin-top: 8px;
    font-size: 12px;
    color: #ef4444;
}

[data-theme="light"] .auth-captcha-box {
    background: var(--bg-tertiary);
    border-color: var(--border);
}

[data-theme="light"] .auth-captcha-checkbox {
    border-color: var(--border);
}

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

.auth-link-pointer {
    cursor: pointer;
}

.auth-links-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

/* ---- FORCE DARK MODE FORM STYLES ---- */
[data-theme="dark"] .auth-input,
[data-theme="dark"] .auth-social-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

[data-theme="dark"] .auth-input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .auth-social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

[data-theme="dark"] .auth-label {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .auth-divider {
    color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
    background: rgba(255, 255, 255, 0.1);
}

/* Submit button loading state */
.auth-submit-btn.loading {
    opacity: 0.7;
    cursor: wait;
}
