body.tabie-login-page-active .header-center-home,
body.tabie-login-page-active .footer.footer-default,
body.tabie-login-page-active #back-to-top,
body.tabie-login-page-active .loader.simple-loader {
    display: none !important;
}

body.tabie-login-page-active .main-content {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
}

.tabie-login-page {
    --auth-bg: #141418;
    --auth-surface: #292b34;
    --auth-input: #141418;
    --auth-border: rgba(255, 255, 255, 0.12);
    --auth-muted: #9aa0b1;
    --auth-text: #ffffff;
    --auth-primary: #4f3f92;
    --auth-primary-hover: #6050b0;
    --auth-error-bg: rgba(244, 67, 54, 0.15);
    --auth-error-border: rgba(244, 67, 54, 0.32);
    --auth-error-text: #ff8b8b;
    --triangle-orbit: clamp(260px, 33vw, 520px);
    --triangle-inner-offset: clamp(40px, 5vw, 90px);
    --triangle-outer-offset: clamp(68px, 8vw, 132px);
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: radial-gradient(circle at 8% 20%, rgba(139, 92, 246, 0.22) 0%, transparent 40%), radial-gradient(circle at 90% 80%, rgba(178, 38, 76, 0.2) 0%, transparent 42%), var(--auth-bg);
    overflow: hidden;
    isolation: isolate;
    font-family: "QatarMediaCorporation", "TanseekModernProArabic", "Segoe UI", sans-serif;
}

.tabie-login-page::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20, 20, 24, 0.15), rgba(20, 20, 24, 0.85));
    pointer-events: none;
    z-index: 0;
}

.triangles-container {
    position: absolute;
    inset: 0;
    width: 100%;
    z-index: 0;
    pointer-events: none;
}

.triangle {
    position: absolute;
    width: 0;
    height: 0;
    transform-origin: center;
    will-change: transform;
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.triangle-1 {
    border-left: 84px solid transparent;
    border-right: 84px solid transparent;
    border-bottom: 145px solid rgba(139, 92, 246, 0.28);
    top: 18%;
    left: calc(50% - var(--triangle-orbit) - var(--triangle-outer-offset));
}

.triangle-2 {
    width: 92px;
    height: 80px;
    top: 21%;
    right: calc(50% - var(--triangle-orbit) - var(--triangle-inner-offset));
}

.triangle-2::before,
.triangle-4::before,
.triangle-7::before,
.triangle-8::before {
    content: "";
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.triangle-2::before {
    background: rgba(255, 255, 255, 0.24);
}

.triangle-2::after,
.triangle-4::after,
.triangle-7::after,
.triangle-8::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: 7px;
    bottom: 7px;
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
    background: rgba(20, 20, 24, 0.9);
}

.triangle-3 {
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 69px solid rgba(178, 38, 76, 0.34);
    top: 47%;
    left: calc(50% - var(--triangle-orbit) - calc(var(--triangle-outer-offset) * 1.1));
}

.triangle-4 {
    width: 118px;
    height: 102px;
    top: 69%;
    left: calc(50% - var(--triangle-orbit) - var(--triangle-inner-offset));
}

.triangle-4::before {
    background: rgba(139, 92, 246, 0.22);
}

.triangle-5 {
    border-left: 52px solid transparent;
    border-right: 52px solid transparent;
    border-bottom: 90px solid rgba(255, 255, 255, 0.22);
    top: 50%;
    right: calc(50% - var(--triangle-orbit) - calc(var(--triangle-outer-offset) * 1.05));
}

.triangle-6 {
    border-left: 78px solid transparent;
    border-right: 78px solid transparent;
    border-bottom: 136px solid rgba(178, 38, 76, 0.3);
    top: 68%;
    right: calc(50% - var(--triangle-orbit) - var(--triangle-inner-offset));
}

.triangle-7 {
    width: 64px;
    height: 54px;
    top: 14%;
    left: calc(50% - var(--triangle-orbit) - calc(var(--triangle-outer-offset) * 1.35));
}

.triangle-7::before {
    background: rgba(255, 255, 255, 0.24);
}

.triangle-8 {
    width: 86px;
    height: 74px;
    top: 16%;
    right: calc(50% - var(--triangle-orbit) - calc(var(--triangle-outer-offset) * 1.4));
}

.triangle-8::before {
    background: rgba(178, 38, 76, 0.3);
}

.triangle-9 {
    border-left: 38px solid transparent;
    border-right: 38px solid transparent;
    border-bottom: 66px solid rgba(139, 92, 246, 0.3);
    top: 60%;
    left: calc(50% - var(--triangle-orbit) - calc(var(--triangle-outer-offset) * 1.45));
}

.auth-container {
    width: min(440px, 100%);
    background: rgba(41, 43, 52, 0.94);
    border-radius: 28px;
    padding: 40px 32px;
    border: 1px solid var(--auth-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 1;
}

.auth-title {
    text-align: center;
    color: var(--auth-text);
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.auth-subtitle {
    text-align: center;
    color: var(--auth-muted);
    margin: 10px 0 28px;
    font-size: 1.05rem;
    line-height: 1.5;
}

.auth-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    margin-bottom: 22px;
    background: rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-tab {
    flex: 1 1 0;
    border: 0;
    border-radius: 999px;
    padding: 10px 8px;
    background: transparent;
    color: #7f879b;
    font-size: 20px;
    font-family: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: #292b34;
    color: #fff;
}

.auth-tab:hover {
    color: #d2d7e4;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: auth-tab-slide 0.25s ease;
}

@keyframes auth-tab-slide {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    margin-bottom: 7px;
    color: #cfd4e1;
    font-size: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.phone-input-wrapper input,
.country-select {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--auth-input);
    color: var(--auth-text);
    border-radius: 12px;
    font-family: inherit;
    font-size: 20px;
    height: 46px;
}

.input-wrapper input,
.phone-input-wrapper input {
    width: 100%;
    padding-top: 8px;
    padding-bottom: 8px;
}

.input-wrapper input:focus,
.phone-input-wrapper input:focus,
.country-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.38);
}

.input-wrapper input::placeholder,
.phone-input-wrapper input::placeholder {
    color: #687084;
}

.auth-page-rtl .input-wrapper > i {
    right: 14px;
    left: auto;
}

.auth-page-ltr .input-wrapper > i {
    left: 14px;
    right: auto;
}

.input-wrapper > i {
    position: absolute;
    color: #8c93a4;
    font-size: 14px;
    pointer-events: none;
}

.auth-page-rtl .input-wrapper input {
    padding-right: 42px;
    padding-left: 42px;
    text-align: right;
}

.auth-page-ltr .input-wrapper input {
    padding-left: 42px;
    padding-right: 42px;
    text-align: left;
    direction: ltr;
}

.auth-page-rtl .input-wrapper input[type="email"] {
    direction: ltr;
    text-align: right;
}

/* Force right alignment for Arabic login inputs (email + mobile). */
.tabie-login-page.auth-page-rtl #email,
.tabie-login-page.auth-page-rtl #phone,
.tabie-login-page.auth-page-rtl .input-wrapper input,
.tabie-login-page.auth-page-rtl .phone-input-wrapper input {
    text-align: right !important;
}

.tabie-login-page.auth-page-rtl #email::placeholder,
.tabie-login-page.auth-page-rtl #phone::placeholder,
.tabie-login-page.auth-page-rtl .input-wrapper input::placeholder,
.tabie-login-page.auth-page-rtl .phone-input-wrapper input::placeholder {
    text-align: right !important;
    direction: rtl !important;
}

.tabie-login-page.auth-page-rtl #email::-webkit-input-placeholder,
.tabie-login-page.auth-page-rtl #phone::-webkit-input-placeholder,
.tabie-login-page.auth-page-rtl .input-wrapper input::-webkit-input-placeholder,
.tabie-login-page.auth-page-rtl .phone-input-wrapper input::-webkit-input-placeholder {
    text-align: right !important;
    direction: rtl !important;
}

.auth-page-rtl .toggle-password {
    left: 10px;
    right: auto;
}

.auth-page-ltr .toggle-password {
    right: 10px;
    left: auto;
}

.toggle-password {
    position: absolute;
    border: 0;
    background: transparent;
    color: #8c93a4;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.toggle-password:hover {
    color: #ffffff;
}

.phone-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.country-picker {
    position: relative;
    width: 220px;
    flex-shrink: 0;
}

.country-picker-btn {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: var(--auth-input);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 20px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.country-picker-btn i {
    margin-inline-start: auto;
    color: #8c93a4;
    font-size: 12px;
}

.country-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
    background: #1b1d25;
}

.country-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-dial {
    color: #cfd4e1;
    font-weight: 700;
}

.auth-page-rtl .country-picker-btn {
    direction: rtl;
    text-align: right;
}

.auth-page-ltr .country-picker-btn {
    direction: ltr;
    text-align: left;
}

.country-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 86vw);
    background: rgba(20, 20, 24, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 50;
    display: none;
    direction: ltr;
}

.auth-page-ltr .country-popup {
    left: 0;
    right: auto;
}

.country-popup.show {
    display: block;
}

.country-popup-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    direction: ltr;
}

.country-option {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    direction: ltr;
    text-align: left;
}

.country-option-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-option-dial {
    color: #c2c8d7;
    font-weight: 700;
}

.country-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.country-option.active {
    background: rgba(79, 63, 146, 0.35);
}

.country-popup-empty {
    text-align: center;
    color: #a8aebd;
    font-size: 16px;
    padding: 14px 10px;
}

.country-select {
    width: 125px;
    padding: 0 28px 0 10px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.auth-page-rtl .country-select {
    background-position: left 10px center;
    padding: 0 10px 0 28px;
}

.phone-input-wrapper input {
    flex: 1;
    padding-left: 12px;
    padding-right: 12px;
    text-align: right;
}

.form-options {
    margin-top: 4px;
    margin-bottom: 12px;
}

.auth-check-row {
    margin: 10px 0 16px;
}

.auth-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8deec;
    font-size: 18px;
    line-height: 1.4;
}

.auth-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-check-row a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

.register-recaptcha-container {
    justify-content: center;
    margin-top: 8px;
}

.register-recaptcha-container .g-recaptcha {
    transform-origin: center;
}

.forgot-password {
    color: #ffffff;
    font-size: 20px;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    color: #ffffff;
    text-decoration: underline;
}

.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 16px 0 22px;
}

.recaptcha-box {
    width: 100%;
    min-height: 78px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #141418;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.recaptcha-chk-container {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.recaptcha-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: #141418;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-inline-end: 12px;
}

.recaptcha-checkbox.checked {
    border-color: transparent;
    background: transparent;
}

.recaptcha-spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid rgba(79, 63, 146, 0.2);
    border-left-color: #4f3f92;
    display: none;
    animation: auth-spin 0.8s linear infinite;
}

.recaptcha-checkmark-icon {
    display: none;
    font-size: 20px;
    line-height: 1;
    color: #42b883;
    font-weight: 700;
}

.recaptcha-text-label {
    font-family: "QatarMediaCorporation", "TanseekModernProArabic", "Segoe UI", sans-serif;
    font-size: 17px;
    color: #d8dbe5;
}

.recaptcha-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
}

.recaptcha-logo-img {
    width: 30px;
    height: 30px;
    background: url("https://www.gstatic.com/recaptcha/api2/logo_48.png") no-repeat center;
    background-size: 30px;
    opacity: 0.58;
}

.recaptcha-brand-text {
    font-family: "QatarMediaCorporation", "TanseekModernProArabic", "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.2;
    color: #7e8598;
    text-align: center;
}

.recaptcha-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.recaptcha-links a {
    color: #7e8598;
    text-decoration: none;
    font-size: 11px;
    font-family: "QatarMediaCorporation", "TanseekModernProArabic", "Segoe UI", sans-serif;
}

.recaptcha-links a:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    border: 0;
    border-radius: 12px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--auth-primary);
    color: #fff;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-submit:hover:not(:disabled) {
    background: var(--auth-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 63, 146, 0.35);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-cancel-btn {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    height: 46px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.auth-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.auth-cancel-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.auth-message {
    margin-top: 14px;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 18px;
    line-height: 1.45;
}

.auth-message.error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error-text);
}

.auth-footer {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--auth-muted);
    font-size: 20px;
}

.auth-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    margin-inline-start: 6px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

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

@media (max-width: 1200px) {
    .triangles-container {
        display: none;
    }
}

@media (max-width: 560px) {
    .tabie-login-page {
        padding: 20px 12px;
    }

    .auth-container {
        padding: 26px 18px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 1.7rem;
    }

    .auth-subtitle {
        font-size: 0.96rem;
    }

    .auth-tab,
    .auth-form label,
    .auth-footer,
    .auth-check-row label,
    .forgot-password,
    .input-wrapper input,
    .phone-input-wrapper input,
    .country-select,
    .country-picker-btn,
    .auth-cancel-btn,
    .auth-submit {
        font-size: 19px;
    }

    .country-picker {
        width: 180px;
    }

    .country-popup {
        width: min(320px, 92vw);
    }

    .register-recaptcha-container .g-recaptcha {
        transform: scale(0.92);
    }

    .recaptcha-box {
        width: 100%;
        min-height: 74px;
    }
}
