/* -------------------------------------------------------------------------- */
/* Auth page — login / signup / forgot password                                 */
/* -------------------------------------------------------------------------- */

.auth-page {
    --auth-blue: #0974BA;
    --auth-green: #1DAC8E;
    --auth-gold: #ECB558;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-surface: #f8fafc;
    background: #fff;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.auth-shell {
    min-height: 100vh;
}

/* Hero panel — fixed on inline-start (left LTR, right RTL) */
.auth-hero {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: 50%;
    max-width: 50%;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
}

html[dir="rtl"] .auth-shell {
    flex-direction: unset;
}

.auth-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.05);
}

.auth-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(9, 116, 186, 0.88) 0%, rgba(15, 23, 42, 0.82) 55%, rgba(29, 172, 142, 0.75) 100%);
}

.auth-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    padding: clamp(32px, 5vw, 72px);
    color: #fff;
}

.auth-hero__title {
    font-family: "CuristicExtraBold", sans-serif;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 28rem;
}

.auth-hero__title span {
    color: var(--auth-green);
}

.auth-hero__lead {
    font-family: "CuristicRegular", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    max-width: 32rem;
    margin-bottom: 40px;
}

.auth-hero__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 34rem;
}

.auth-hero__feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
}

.auth-hero__feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 172, 142, 0.25);
    color: #fff;
    font-size: 20px;
}

.auth-hero__feature strong {
    display: block;
    font-family: "CuristicBold", sans-serif;
    font-size: 15px;
    line-height: 1.35;
    margin-bottom: 4px;
}

.auth-hero__feature p {
    margin: 0;
    font-family: "CuristicRegular", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.82);
}

/* Form panel — scrollable, opposite side from fixed hero */
.auth-main {
    margin-inline-start: 50%;
    width: 50%;
    max-width: 50%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--auth-surface);
    -webkit-overflow-scrolling: touch;
}

.auth-main__toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 20px 28px 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--auth-surface);
    flex-shrink: 0;
}

.auth-locale {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--auth-text);
    font-family: "CuristicSemiBold", sans-serif;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

html:not([dir="rtl"]) .auth-locale.locale-switch--arabic {
    font-family: "SomarSans", sans-serif;
}

.auth-locale:hover {
    background: #e8f3fa;
    color: var(--auth-blue);
}

.auth-main__body {
    flex: 1 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 28px 40px;
}

.auth-view {
    width: 100%;
    max-width: 650px;
}

.auth-view--signup {
    max-width: 650px;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    padding: clamp(28px, 4vw, 40px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

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

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.auth-brand img {
    max-height: 68px;
    width: auto;
    height: auto;
}

.auth-card__intro {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card__intro h2 {
    font-family: "CuristicBold", sans-serif;
    font-size: 26px;
    line-height: 1.25;
    color: var(--auth-text);
    margin-bottom: 8px;
}

.auth-card__intro p {
    margin: 0;
    font-family: "CuristicRegular", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--auth-muted);
}

/* Form fields */
.login-form label,
.login-form .form-label {
    color: var(--auth-muted);
    font-family: "CuristicMedium", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

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

.auth-field--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-grid {
    display: grid;
    gap: 0 16px;
}

.auth-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-phone-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.auth-phone-code {
    min-width: 0;
}

.login-form input,
.login-form select {
    color: var(--auth-text);
    background-color: #fff;
    font-family: "CuristicMedium", sans-serif;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 0;
    padding: 14px 16px;
    border: 1.5px solid var(--auth-border);
    border-radius: 14px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('/Assets/Images/select-arrow-down.svg');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem auto;
    padding-inline-end: 2.75rem;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(9, 116, 186, 0.12);
}

.login-form input::placeholder {
    color: #94a3b8;
}

.login-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.login-form .form-check label {
    color: var(--auth-blue);
    font-family: "CuristicMedium", sans-serif;
    font-size: 14px;
    margin: 0;
}

.login-form .form-check-input {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 5px;
    border: 2px solid var(--auth-blue);
    margin: 0;
    flex-shrink: 0;
}

.login-form .form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(9, 116, 186, 0.12);
}

input[type="checkbox"]:checked {
    background-color: var(--auth-blue);
    border-color: var(--auth-blue);
}

.forget {
    color: var(--auth-blue);
    font-family: "CuristicSemiBold", sans-serif;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.forget:hover {
    color: #0865a3;
}

.auth-terms {
    color: var(--auth-muted);
    font-family: "CuristicRegular", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    margin: 8px 0 0;
}

.auth-terms a {
    color: var(--auth-blue) !important;
    font-family: "CuristicBold", sans-serif;
    text-decoration: none;
}

.auth-submit,
.login-form button.auth-submit {
    width: 100%;
    margin: 20px 0 0;
    padding: 15px 20px;
    border: none;
    border-radius: 14px;
    background: var(--auth-blue);
    color: #fff;
    font-family: "CuristicBold", sans-serif;
    font-size: 16px;
    line-height: 1.2;
    display: block;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.auth-submit:hover,
.login-form button.auth-submit:hover {
    background: #0865a3;
    color: #fff;
}

.auth-submit:active {
    transform: translateY(1px);
}

.login-form button:disabled,
.login-form button.auth-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.create-account {
    color: var(--auth-muted);
    font-family: "CuristicMedium", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    margin: 24px 0 0;
}

.create-account a {
    color: var(--auth-blue) !important;
    font-family: "CuristicBold", sans-serif;
    text-decoration: none;
}

.password-box {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    inset-inline-end: 16px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--auth-muted);
    font-size: 18px;
}

.password-box input {
    padding-inline-end: 3rem;
}

/* Auth alerts */
.login-form .auth-alert {
    display: none;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin: 0 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    border-inline-start-width: 3px;
    font-family: "CuristicRegular", sans-serif;
    font-size: 13px;
    line-height: 1.45;
}

.login-form .auth-alert.is-visible {
    display: flex;
}

.login-form .auth-alert--error {
    background: #fff5f5;
    border-color: #f5c2c7;
    border-inline-start-color: #e05252;
    color: #9b1c1c;
}

.login-form .auth-alert--success {
    background: #f0fdf8;
    border-color: #b6e8d8;
    border-inline-start-color: var(--auth-green);
    color: #0f6b56;
}

.login-form .auth-alert__icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 1px;
}

.login-form .auth-alert__text {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-family: "CuristicMedium", sans-serif;
    font-size: 13px;
}

.login-form .auth-alert-link {
    color: var(--auth-blue);
    font-family: "CuristicBold", sans-serif;
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Legacy layout helpers (reset-password etc.) */
.generalContainer {
    margin-top: 50px;
    margin-bottom: 50px;
}

.Curlogo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.Curlogo img {
    max-height: 60px;
    width: auto;
    height: auto;
}

/* Standalone auth screens: email verification, password reset */
.auth-panel {
    max-width: 460px;
    margin-inline: auto;
    padding-block: 40px;
}

.auth-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-inline: auto;
    margin-bottom: 20px;
}

.auth-state-icon.is-success {
    background-color: #E6F6EF;
    color: #06AA88;
}

.auth-state-icon.is-pending {
    background-color: #E8F3FB;
    color: #0974BA;
}

.auth-state-icon.is-error {
    background-color: #FDECEC;
    color: #D64545;
}

.auth-state-title {
    color: #1A1A1A;
    font-family: "CuristicBold";
    font-size: 24px;
    line-height: 32px;
    text-align: center;
    margin-bottom: 12px;
}

.auth-state-body {
    color: #737373;
    font-family: "CuristicRegular";
    font-size: 16px;
    line-height: 26px;
    text-align: center;
    margin-bottom: 8px;
}

.auth-state-hint {
    color: #B9B9B9;
    font-family: "CuristicRegular";
    font-size: 14px;
    line-height: 22px;
    text-align: center;
}

.auth-panel .btn-primary-cu,
.auth-panel .btn-primary-cu:hover {
    padding: 12px 28px;
    border-radius: 14px;
    background-color: #0974BA;
    border: none;
    color: white;
    font-family: "CuristicBold";
    font-size: 16px;
    line-height: 21.94px;
    display: block;
    margin: 30px auto 0 auto;
    text-decoration: none;
    text-align: center;
    width: fit-content;
}

.auth-dev-link {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed #0974BA;
    border-radius: 12px;
    background-color: #F5FAFE;
    font-family: "CuristicRegular";
    font-size: 13px;
    line-height: 20px;
    color: #0974BA;
    word-break: break-all;
}

.auth-dev-link a {
    color: #0974BA;
    font-family: "CuristicBold";
}

/* RTL login form checkbox */
html[dir="rtl"] .login-form .form-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0 !important;
}

html[dir="rtl"] .login-form .form-check .form-check-input {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
}

html[dir="rtl"] .login-form .form-check .form-check-label {
    margin-top: 0;
}

html[dir="rtl"] .login-form select {
    background-position: left 1rem center !important;
    padding-inline-end: 2.75rem !important;
}

/* Responsive */
@media (max-width: 991px) {
    .auth-page {
        height: auto;
        overflow: auto;
    }

    .auth-hero {
        display: none;
        position: static;
        width: auto;
        max-width: none;
        height: auto;
    }

    .auth-main {
        margin-inline-start: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 100vh;
        overflow-y: visible;
    }

    .auth-main__body {
        align-items: flex-start;
        padding: 16px 16px 32px;
    }

    .auth-grid--2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 24px 20px;
        border-radius: 20px;
        box-shadow: none;
        border: none;
        background: transparent;
    }

    .auth-main {
        background: #fff;
    }

    .auth-main__toolbar {
        padding: 16px 16px 0;
    }

    .auth-phone-row {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .auth-card__intro h2 {
        font-size: 22px;
    }
}
