/* ═══════════════════════════════════════════════════════════
   AUTH PAGES — Centered card layout
   Form (right) + Shop-image brand panel (left), wrapped in a
   compact, centered square-ish card on a brand-color background.
   Design tokens: #51459d primary, #f5f5fa bg
   ═══════════════════════════════════════════════════════════ */

.auth-body * { box-sizing: border-box; }
.auth-body,
body.auth-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(1200px 600px at 15% 20%, rgba(255,255,255,0.08), transparent 60%),
        radial-gradient(1000px 500px at 85% 80%, rgba(255,255,255,0.06), transparent 60%),
        linear-gradient(135deg, #6c5fbd 0%, #51459d 50%, #3a3175 100%) !important;
}

/* ═══ PAGE TOPBAR — sits outside the card on the brand bg ═══ */
.auth-page-topbar {
    position: fixed;
    top: 22px;
    left: 28px;
    right: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 20;
}
.auth-page-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.auth-page-brand:hover { opacity: 0.85; }
.auth-page-brand img {
    height: 38px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 4px 14px rgba(0,0,0,0.25));
}

/* Language pill on the brand-color bg — translucent glass */
.auth-page-topbar .auth-lang-btn {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.auth-page-topbar .auth-lang-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

/* ═══ SCENE — centers the card on the page ═══ */
.auth-scene {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 24px 40px;
}

/* ═══ CONTAINER — centered card with form + image side ═══ */
.auth-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 1040px;
    background: #fff;
    border-radius: 28px;
    box-shadow:
        0 30px 80px rgba(20, 8, 60, 0.35),
        0 8px 24px rgba(20, 8, 60, 0.18);
    position: relative;
    overflow: hidden;
}

/* ═══════════════════════════════════════
   FORM PANEL (right side of card on LTR)
   ═══════════════════════════════════════ */
.auth-form-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 44px 44px;
    background: #fff;
    grid-column: 2;  /* form sits on the right; image on the left */
    order: 2;
}

/* Language pill */
.auth-lang { position: relative; }
.auth-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 38px;
    background: #f5f5fa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #525b69;
    cursor: pointer;
    transition: all 0.2s ease;
}
.auth-lang-btn:hover {
    background: #eceef5;
    color: #51459d;
}
.auth-lang-btn i { font-size: 16px; }
.auth-lang .dropdown-menu {
    min-width: 150px;
    padding: 6px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    background: #fff;
}
.auth-lang .dropdown-item {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #525b69;
}
.auth-lang .dropdown-item:hover { background: #f5f5fa; color: #51459d; }
.auth-lang .dropdown-item.active { background: rgba(81,69,157,0.08); color: #51459d; font-weight: 600; }

/* Form body — content within the card */
.auth-form-body {
    display: flex;
    flex-direction: column;
    max-width: 380px;
    width: 100%;
    padding: 0;
}

/* ═══ HEADING — mixed weights ═══ */
.auth-heading {
    font-size: 1.75rem;
    line-height: 1.15;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    color: #1a1a2e;
    font-weight: 500;
}
.auth-heading strong {
    font-weight: 800;
}
.auth-sub {
    font-size: 0.9375rem;
    color: #8c8c9e;
    margin: 0 0 22px;
    line-height: 1.55;
    font-weight: 400;
    font-style: italic;
}

/* ═══ ALERTS ═══ */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.8125rem;
    line-height: 1.5;
}
.auth-alert i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 17px;
}
.auth-alert-success {
    background: rgba(111,217,67,0.1);
    color: #4da32a;
    border: 1px solid rgba(111,217,67,0.2);
}
.auth-alert-error {
    background: rgba(255,58,110,0.08);
    color: #ff3a6e;
    border: 1px solid rgba(255,58,110,0.18);
}
.auth-alert-warning {
    background: rgba(244,180,26,0.08);
    color: #b8871a;
    border: 1px solid rgba(244,180,26,0.22);
}

/* ═══ SOCIAL BUTTONS — 2 column at top ═══ */
.auth-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.auth-social-grid.single { grid-template-columns: 1fr; }

.auth-btn-social {
    height: 46px;
    padding: 0 16px;
    background: #fff;
    border: 1.5px solid #e5e3f0;
    border-radius: 12px;
    color: #1a1a2e;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.auth-btn-social:hover {
    border-color: #1a1a2e;
    background: #fff;
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.auth-btn-social img {
    width: 22px;
    height: 22px;
}
.auth-btn-social svg {
    width: 22px;
    height: 22px;
}

/* ═══ DIVIDER ═══ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0,0,0,0.08);
}
.auth-divider span {
    font-size: 0.8125rem;
    color: #8c8c9e;
    font-weight: 500;
}

/* ═══ METHOD TABS (Email / Mobile OTP) ═══ */
.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: #f5f5fa;
    border-radius: 10px;
    margin-bottom: 16px;
}
.auth-tabs input[type="radio"] { display: none; }
.auth-tabs label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #8c8c9e;
    transition: all 0.2s ease;
    margin: 0;
}
.auth-tabs label i { font-size: 15px; }
.auth-tabs label:hover { color: #525b69; }
.auth-tabs input[type="radio"]:checked + label {
    background: #fff;
    color: #51459d;
    box-shadow: 0 1px 3px rgba(81,69,157,0.08), 0 2px 8px rgba(81,69,157,0.06);
}

/* ═══ FIELDS ═══ */
.auth-field { margin-bottom: 14px; }

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

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

.auth-input,
.auth-input-wrap input.form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 0.875rem;
    color: #1a1a2e;
    background: #f5f5fa;
    border: 1.5px solid transparent;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}
.auth-input::placeholder,
.auth-input-wrap input.form-control::placeholder {
    color: #b8b8c8;
    font-weight: 400;
}
.auth-input:focus,
.auth-input-wrap input.form-control:focus {
    border-color: #51459d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(81,69,157,0.1);
    outline: none;
}

/* Password toggle button on the right */
.auth-input-wrap .auth-input-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-end: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: #8c8c9e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}
.auth-input-wrap .auth-input-toggle:hover {
    background: rgba(81,69,157,0.06);
    color: #51459d;
}
.auth-input-wrap .auth-input-toggle i { font-size: 18px; }
.auth-input-wrap:has(.auth-input-toggle) input {
    padding-inline-end: 56px;
}

.auth-input-error {
    display: block;
    font-size: 0.8125rem;
    color: #ff3a6e;
    margin-top: 6px;
}
.auth-input-success {
    display: block;
    font-size: 0.8125rem;
    color: #4da32a;
    margin-top: 6px;
}

/* ═══ FORGOT PASSWORD LINK (right-aligned under password) ═══ */
.auth-forgot {
    display: flex;
    justify-content: flex-end;
    margin: -8px 0 24px;
}
.auth-forgot a {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}
.auth-forgot a:hover { color: #51459d; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #525b69;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}
.auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: #51459d;
    cursor: pointer;
    margin: 0;
}

.auth-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
}
.auth-link:hover { color: #51459d; }

/* ═══ PRIMARY BUTTON — bold, rounded ═══ */
.auth-btn {
    width: 100%;
    height: 50px;
    padding: 0 22px;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    font-family: inherit;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.auth-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #51459d 0%, #6c5fbd 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(81,69,157,0.3);
}
.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(81,69,157,0.4);
    color: #fff;
}

.auth-btn-dark {
    background: #1a1a2e;
    color: #fff;
}
.auth-btn-dark:hover:not(:disabled) {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    color: #fff;
}

.auth-btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(37,211,102,0.25);
    text-transform: none;
    letter-spacing: 0;
}
.auth-btn-whatsapp:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37,211,102,0.35);
    color: #fff;
}
.auth-btn-whatsapp svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ═══ FOOTER TEXT ═══ */
.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.8125rem;
    color: #8c8c9e;
    font-weight: 400;
}
.auth-footer .auth-link {
    font-size: 0.8125rem;
    color: #1a1a2e;
    margin-inline-start: 4px;
}
.auth-footer .auth-link:hover { color: #51459d; }

/* ═══ OTP INPUTS ═══ */
.auth-otp {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
    margin-bottom: 12px;
}
.auth-otp-input {
    width: 52px;
    height: 58px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    background: #f5f5fa;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    color: #1a1a2e;
    transition: all 0.2s ease;
}
.auth-otp-input:focus {
    border-color: #51459d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(81,69,157,0.1);
    outline: none;
}
.auth-otp-input.filled {
    border-color: #6FD943;
    background: rgba(111,217,67,0.08);
    color: #4da32a;
}

.auth-resend {
    text-align: center;
    margin-top: 14px;
    font-size: 0.8125rem;
    color: #8c8c9e;
}
.auth-resend a {
    color: #51459d;
    font-weight: 600;
    text-decoration: none;
}
.auth-resend a.disabled { pointer-events: none; color: #c8c8d4; }

/* ═══ VERIFIED BADGE ═══ */
.auth-verified {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(111,217,67,0.1);
    color: #4da32a;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
}
.auth-verified i { font-size: 14px; }

/* ═══ INPUT + INLINE BUTTON ═══ */
.auth-input-combo {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.auth-input-combo .auth-input-wrap { flex: 1; }
.auth-input-combo .auth-btn {
    width: auto;
    height: 56px;
    flex-shrink: 0;
    padding: 0 22px;
    font-size: 0.8125rem;
    border-radius: 14px;
}

/* ═══ ROLE CARDS (Register step 1) ═══ */
.auth-roles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.auth-role {
    position: relative;
    padding: 18px 14px;
    border: 2px solid #e5e3f0;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.auth-role:hover {
    border-color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.auth-role.selected {
    background: linear-gradient(135deg, #51459d 0%, #6c5fbd 100%);
    border-color: #51459d;
    box-shadow: 0 10px 28px rgba(81,69,157,0.3);
}
.auth-role-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    background: rgba(81,69,157,0.08);
    color: #51459d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.auth-role-icon i { font-size: 22px; }
.auth-role.selected .auth-role-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.auth-role-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    transition: color 0.2s ease;
}
.auth-role.selected .auth-role-title { color: #fff; }
.auth-role-desc {
    font-size: 0.75rem;
    color: #8c8c9e;
    line-height: 1.4;
    margin: 0;
    transition: color 0.2s ease;
}
.auth-role.selected .auth-role-desc { color: rgba(255,255,255,0.88); }

.auth-role-check {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.2s ease;
}
.auth-role-check i { font-size: 13px; color: #51459d; font-weight: 700; }
.auth-role.selected .auth-role-check { opacity: 1; transform: scale(1); }

/* Selected role pill (step 2) */
.auth-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(81,69,157,0.08);
    color: #51459d;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.auth-role-pill i { font-size: 14px; }

/* Back button */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 6px 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #8c8c9e;
    cursor: pointer;
    margin-bottom: 16px;
    transition: color 0.15s ease;
}
.auth-back:hover { color: #51459d; }
[dir="rtl"] .auth-back i { transform: scaleX(-1); }

/* Step transitions */
.auth-step { display: none; }
.auth-step.active {
    display: block;
    animation: authStepIn 0.25s ease;
}
@keyframes authStepIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulse */
@keyframes authPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
.auth-pulse { animation: authPulse 0.5s ease-in-out 2; }

/* ═══════════════════════════════════════
   BRAND PANEL (left side of card on LTR)
   ═══════════════════════════════════════ */
.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 32px 28px;
    color: #fff;
    background: linear-gradient(160deg, #d8d3ec 0%, #b0a6dc 60%, #6c5fbd 100%);
    grid-column: 1;
    order: 1;
    min-height: 560px;
}


/* Background image slides */
.auth-brand-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #1a0a40;
}
.auth-brand-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.auth-brand-bg-slide.active {
    opacity: 1;
}

/* Soft brand-tinted overlay — keeps photo readable while staying on brand */
.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(81, 69, 157, 0.25) 0%,
            rgba(81, 69, 157, 0.45) 55%,
            rgba(58, 49, 117, 0.85) 100%
        );
    z-index: 1;
}

/* ═══ FLOATING DECORATIVE ICONS ═══ */
.auth-brand-icons {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.auth-float-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 6px 18px rgba(58, 49, 117, 0.28);
    color: #fff;
    opacity: 0.95;
    will-change: transform;
}
.auth-float-icon i {
    font-size: 20px;
    filter: drop-shadow(0 2px 6px rgba(58, 49, 117, 0.35));
}

/* Size variants */
.auth-float-icon.auth-float-2,
.auth-float-icon.auth-float-5 {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}
.auth-float-icon.auth-float-2 i,
.auth-float-icon.auth-float-5 i {
    font-size: 16px;
}
.auth-float-icon.auth-float-7 {
    width: 52px;
    height: 52px;
    border-radius: 16px;
}
.auth-float-icon.auth-float-7 i {
    font-size: 24px;
}

/* Positioning + individual animations */
.auth-float-1 {
    top: 8%;
    left: 12%;
    animation: authFloatA 7s ease-in-out infinite;
}
.auth-float-2 {
    top: 18%;
    right: 14%;
    color: #f4b41a;
    animation: authFloatB 6s ease-in-out infinite .4s;
}
.auth-float-3 {
    top: 48%;
    left: 6%;
    color: #ff6b9d;
    animation: authFloatC 8s ease-in-out infinite .9s;
}
.auth-float-4 {
    top: 35%;
    right: 8%;
    animation: authFloatA 9s ease-in-out infinite 1.2s;
}
.auth-float-5 {
    bottom: 30%;
    right: 18%;
    animation: authFloatB 7s ease-in-out infinite .6s;
}
.auth-float-6 {
    bottom: 14%;
    left: 10%;
    animation: authFloatC 8s ease-in-out infinite 1.5s;
}
.auth-float-7 {
    top: 62%;
    right: 24%;
    animation: authFloatA 10s ease-in-out infinite .3s;
}

/* Keyframes — three variations for organic movement */
@keyframes authFloatA {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-18px) rotate(6deg); }
}
@keyframes authFloatB {
    0%, 100% { transform: translate(0, 0) rotate(-4deg) scale(1); }
    33% { transform: translate(8px, -14px) rotate(8deg) scale(1.05); }
    66% { transform: translate(-6px, -6px) rotate(-2deg) scale(0.98); }
}
@keyframes authFloatC {
    0%, 100% { transform: translateY(0) rotate(8deg); }
    50% { transform: translateY(-22px) rotate(-8deg); }
}

/* Hide some icons on smaller screens to avoid clutter */
@media (max-width: 1400px) {
    .auth-float-4, .auth-float-6 { display: none; }
}
@media (max-width: 1200px) {
    .auth-float-2, .auth-float-5 { display: none; }
}
@media (max-width: 991px) {
    .auth-brand-icons { display: none; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    .auth-float-icon { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   WAVE TRANSITION — Plays on successful sign-in
   Multi-layer sea waves crash in from the right, then logo appears
   ═══════════════════════════════════════════════════════════ */
.auth-wave-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
    overflow: hidden;
}
.auth-wave-transition.active {
    visibility: visible;
    pointer-events: all;
}

.auth-wave {
    position: absolute;
    top: -5%;
    bottom: -5%;
    right: 0;
    width: 140%;
    transform: translateX(100%);
    will-change: transform;
}

/* Each wave — smooth single-curve leading edge, different bulge direction per layer */
.wave-1 {
    background: #e8a9ff;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 80 0 Q 20 500 80 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 80 0 Q 20 500 80 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.wave-2 {
    background: #b24af2;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 60 0 Q 130 500 60 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 60 0 Q 130 500 60 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.wave-3 {
    background: #6e1fb8;
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 50 0 C 110 280, 10 720, 50 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 50 0 C 110 280, 10 720, 50 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.wave-4 {
    background: linear-gradient(135deg, #2d1559 0%, #1a0a40 60%, #0a0420 100%);
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 30 0 Q 70 500 30 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 1000' preserveAspectRatio='none'><path d='M 30 0 Q 70 500 30 1000 L 200 1000 L 200 0 Z' fill='black'/></svg>");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Cascading wave roll-in — each layer arrives slightly after the previous */
.auth-wave-transition.active .wave-1 {
    animation: authWaveIn 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
}
.auth-wave-transition.active .wave-2 {
    animation: authWaveIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}
.auth-wave-transition.active .wave-3 {
    animation: authWaveIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.24s forwards;
}
.auth-wave-transition.active .wave-4 {
    animation: authWaveIn 1.7s cubic-bezier(0.22, 1, 0.36, 1) 0.36s forwards;
}

@keyframes authWaveIn {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(0); }
}

/* RTL: mirror the whole wave layer so waves come from the left */
[dir="rtl"] .auth-wave-transition {
    transform: scaleX(-1);
}
/* Unflip the logo so it still reads correctly */
[dir="rtl"] .auth-wave-logo {
    transform: translate(-50%, -50%) scaleX(-1);
}
[dir="rtl"] .auth-wave-transition.active .auth-wave-logo {
    animation-name: authLogoPopRTL, authLogoFloatRTL;
}
@keyframes authLogoPopRTL {
    0%   { transform: translate(-50%, -50%) scaleX(-1) scale(0.3) rotate(-8deg); opacity: 0; }
    60%  { transform: translate(-50%, -50%) scaleX(-1) scale(1.08) rotate(2deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scaleX(-1) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes authLogoFloatRTL {
    0%, 100% { transform: translate(-50%, -50%) scaleX(-1) translateY(0); }
    50%      { transform: translate(-50%, -50%) scaleX(-1) translateY(-8px); }
}

/* Logo appears centered after waves settle */
.auth-wave-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-wave-logo img {
    max-height: 140px;
    max-width: 280px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.35));
    position: relative;
    z-index: 2;
}
.auth-wave-transition.active .auth-wave-logo {
    animation:
        authLogoPop 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s forwards,
        authLogoFloat 3s ease-in-out 2.1s infinite;
}

@keyframes authLogoPop {
    0%   { transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); opacity: 0; }
    60%  { transform: translate(-50%, -50%) scale(1.08) rotate(2deg); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes authLogoFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50%      { transform: translate(-50%, -50%) translateY(-8px); }
}

/* Concentric ripples radiating from the logo */
.auth-wave-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}
.auth-wave-transition.active .auth-wave-ripple {
    animation: authRipple 2.2s cubic-bezier(0, 0.55, 0.45, 1) 1.5s infinite;
}
@keyframes authRipple {
    0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-wave,
    .auth-wave-logo,
    .auth-wave-ripple { animation: none !important; }
}

/* Centered logo — larger, no text */
.auth-brand-center {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 0;
}
.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.25s ease;
}
.auth-brand-logo:hover { transform: scale(1.03); }
.auth-brand-logo img {
    max-width: 280px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

/* Testimonial block — at bottom */
.auth-testimonial {
    position: relative;
    z-index: 2;
    max-width: 560px;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.auth-testimonial-slide {
    display: none;
}
.auth-testimonial-slide.active {
    display: block;
    animation: authSlideIn 0.6s ease;
}
@keyframes authSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-testimonial-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #fff;
    font-weight: 400;
    margin: 0 0 16px;
    letter-spacing: 0.01em;
}
.auth-testimonial-text::before { content: '" '; font-weight: 700; opacity: 0.8; }
.auth-testimonial-text::after { content: ' "'; font-weight: 700; opacity: 0.8; }

.auth-testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}
.auth-testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}
.auth-testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.auth-testimonial-meta { text-align: start; line-height: 1.3; }
.auth-testimonial-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
}
.auth-testimonial-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 2px;
}

/* Carousel dots */
.auth-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}
.auth-dot {
    width: 28px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}
.auth-dot.active {
    width: 48px;
    background: #fff;
}
.auth-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
    .auth-container { max-width: 920px; }
    .auth-form-panel { padding: 36px 32px; }
}

@media (max-width: 991px) {
    .auth-scene { padding: 88px 16px 24px; }
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .auth-brand {
        display: none;
    }
    .auth-form-panel {
        padding: 36px 28px;
        grid-column: 1;
    }
    .auth-page-topbar { top: 18px; left: 20px; right: 20px; }
    .auth-heading { font-size: 1.625rem; }
    .auth-sub { font-size: 0.875rem; }
}

@media (max-width: 576px) {
    .auth-scene { padding: 80px 12px 20px; }
    .auth-container { border-radius: 22px; }
    .auth-form-panel { padding: 28px 22px; }
    .auth-heading { font-size: 1.5rem; margin-bottom: 6px; }
    .auth-sub { font-size: 0.8125rem; margin-bottom: 18px; }
    .auth-page-brand img { height: 32px; }
    .auth-otp-input { width: 40px; height: 48px; font-size: 1rem; }
    .auth-roles { gap: 10px; }
    .auth-role { padding: 16px 14px; }
    .auth-input-combo { flex-direction: column; gap: 10px; }
    .auth-input-combo .auth-btn { width: 100%; height: 46px; }
}

@media (max-width: 400px) {
    .auth-social-grid { grid-template-columns: 1fr; }
    .auth-roles { grid-template-columns: 1fr; }
    .auth-role {
        display: flex;
        align-items: center;
        gap: 14px;
        text-align: start;
        padding: 16px;
    }
    .auth-role-icon { margin: 0; flex-shrink: 0; }
    .auth-role-check { position: static; flex-shrink: 0; }
    .auth-otp { gap: 6px; }
    .auth-otp-input { width: 40px; height: 48px; font-size: 1rem; border-radius: 10px; }
}

/* ═══ DARK MODE ═══ */
.auth-body.dark-mode {
    background:
        radial-gradient(1200px 600px at 15% 20%, rgba(255,255,255,0.04), transparent 60%),
        linear-gradient(135deg, #1a1a2e 0%, #16162a 60%, #0f0f1f 100%) !important;
    color: #e5e3f0;
}
.auth-body.dark-mode .auth-container { background: #1e1e35; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.auth-body.dark-mode .auth-form-panel { background: #1e1e35; }
.auth-body.dark-mode .auth-brand { background: linear-gradient(160deg, #2a2a40 0%, #1e1e35 100%); }
.auth-body.dark-mode .auth-heading,
.auth-body.dark-mode .auth-topbar-brand-text { color: #fff; }
.auth-body.dark-mode .auth-sub { color: #8c8c9e; }
.auth-body.dark-mode .auth-label { color: #c8c8d4; }
.auth-body.dark-mode .auth-input,
.auth-body.dark-mode .auth-input-wrap input.form-control,
.auth-body.dark-mode .auth-otp-input {
    background: #2a2a40;
    border-color: transparent;
    color: #fff;
}
.auth-body.dark-mode .auth-input:focus { border-color: #6c5fbd; background: #2a2a40; }
.auth-body.dark-mode .auth-tabs { background: #2a2a40; }
.auth-body.dark-mode .auth-tabs label { color: #8c8c9e; }
.auth-body.dark-mode .auth-tabs input[type="radio"]:checked + label {
    background: #3f3f5f;
    color: #fff;
}
.auth-body.dark-mode .auth-btn-social {
    background: #2a2a40;
    border-color: #3f3f5f;
    color: #fff;
}
.auth-body.dark-mode .auth-btn-social:hover { background: #343455; border-color: #4f4f6f; }
.auth-body.dark-mode .auth-divider::before,
.auth-body.dark-mode .auth-divider::after { background: #3f3f5f; }
.auth-body.dark-mode .auth-lang-btn {
    background: #2a2a40;
    border-color: #3f3f5f;
    color: #c8c8d4;
}
.auth-body.dark-mode .auth-role {
    background: #2a2a40;
    border-color: #3f3f5f;
}
.auth-body.dark-mode .auth-role:hover { border-color: #6c5fbd; }
.auth-body.dark-mode .auth-role-title { color: #fff; }
.auth-body.dark-mode .auth-topbar-brand-mark { background: #fff; }
.auth-body.dark-mode .auth-topbar-brand-mark img { filter: none; }
.auth-body.dark-mode .auth-link,
.auth-body.dark-mode .auth-forgot a { color: #e5e3f0; }
.auth-body.dark-mode .auth-footer .auth-link { color: #fff; }
.auth-body.dark-mode .g-recaptcha { filter: invert(1) hue-rotate(180deg); }
