/* =========================================================
   Auth pages (Sign in, Verify OTP)
   Desktop: brand artwork with the Albatta mascot + form
   Mobile:  navy band with the logo seal + form sheet
   Colours follow albattadelivery.com
   ========================================================= */

.auth-page {
    --auth-purple: #5138EE;
    --auth-purple-hover: #4128d8;
    --auth-lavender: #F3F1FE;
    --auth-lavender-line: #dcd8f5;
    --auth-ink: #141125;
    --auth-muted: #6b6880;
    --auth-line: #e7e5f2;
    --auth-navy: #2b3372;
    background: #fff;
    color: var(--auth-ink);
}

.auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ---------- Brand panel (desktop) ---------- */
.auth-art {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 56px 56px 0;
    background: linear-gradient(140deg, #cfe6fb 0%, #eef5fd 42%, #fbefe7 78%, #fcdcc6 100%);
}

[dir="rtl"] .auth-art {
    background: linear-gradient(220deg, #cfe6fb 0%, #eef5fd 42%, #fbefe7 78%, #fcdcc6 100%);
}

/* Soft rings behind the mascot */
.auth-art::before {
    content: "";
    position: absolute;
    width: 720px;
    height: 720px;
    inset-inline-end: -200px;
    bottom: -240px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, rgba(255, 255, 255, .55) 0 2px, transparent 2px 46px);
}

.auth-art-copy {
    position: relative;
}

.auth-art-copy h2 {
    font-size: 34px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -.015em;
    color: var(--auth-ink);
    max-width: 15ch;
    margin: 0;
}

.auth-art-copy p {
    color: var(--auth-muted);
    font-size: 17px;
    margin: 14px 0 0;
}

.auth-mascot {
    position: relative;
    margin-top: auto;
    align-self: flex-end;
    height: min(64vh, 560px);
    width: auto;
    margin-inline-end: 4%;
}

.auth-pin {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.auth-pin::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: #fff;
}

.auth-pin--blue { background: #2f7cf6; inset-inline-end: 8%; top: 36%; }
.auth-pin--orange { background: #f47b3a; inset-inline-start: 14%; bottom: 18%; width: 28px; height: 28px; }
.auth-pin--orange::after { inset: 8px; }

/* Mobile-only logo seal (hidden on desktop) */
.auth-seal { display: none; }

/* ---------- Form side ---------- */
.auth-main {
    display: flex;
    flex-direction: column;
    padding: 28px 48px;
    min-width: 0;
}

.auth-top {
    display: flex;
    justify-content: flex-end;
}

.auth-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--auth-lavender);
    color: var(--auth-purple);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: background-color .15s ease;
}

.auth-lang:hover,
.auth-lang:focus-visible { background: #e7e3fd; color: var(--auth-purple); }

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

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

.auth-logo {
    display: inline-block;
    margin-bottom: 32px;
}

.auth-logo img {
    width: 132px;
    height: 132px;
    display: block;
}

.auth-head h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--auth-ink);
    margin: 0;
}

.auth-sub {
    color: var(--auth-muted);
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.6;
}

.auth-head + .fv-row,
.auth-head + * { margin-top: 32px; }

.auth-alt {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-line);
    font-size: 15px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-alt a {
    color: var(--auth-purple);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-footer {
    font-size: 13px;
    color: var(--auth-muted);
    text-align: center;
}

.auth-footer a {
    color: var(--auth-ink);
    font-weight: 500;
    text-decoration: none;
}

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

/* ---------- Theme overrides for Metronic controls on auth pages ---------- */
.auth-page .form-label { font-weight: 500; color: var(--auth-ink); }

.auth-page .form-control.form-control-solid {
    background-color: var(--auth-lavender);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--auth-ink);
}

.auth-page .form-control.form-control-solid:focus {
    background-color: #fff;
    border-color: var(--auth-purple);
    box-shadow: 0 0 0 3px rgba(81, 56, 238, .15);
}

.auth-page .form-control-lg { min-height: 54px; }

.auth-page .btn.btn-primary {
    background-color: var(--auth-purple);
    border-color: var(--auth-purple);
    border-radius: 12px;
    min-height: 54px;
    font-weight: 600;
    box-shadow: 0 8px 20px -8px rgba(81, 56, 238, .6);
}

.auth-page .btn.btn-primary:hover:not(:disabled),
.auth-page .btn.btn-primary:focus:not(:disabled),
.auth-page .btn.btn-primary:active:not(:disabled) {
    background-color: var(--auth-purple-hover) !important;
    border-color: var(--auth-purple-hover) !important;
}

.auth-page .btn.btn-primary:focus-visible { outline: 3px solid rgba(81, 56, 238, .35); outline-offset: 2px; }

.auth-page .link-primary,
.auth-page .text-primary { color: var(--auth-purple) !important; }
.auth-page .svg-icon.svg-icon-primary svg [fill]:not(.permanent):not(g) { fill: var(--auth-purple) !important; }

.auth-page .border-primary { border-color: var(--auth-lavender-line) !important; }
.auth-page .border-primary:focus { border-color: var(--auth-purple) !important; }

.auth-btn-icon { width: 20px; height: 20px; margin-inline-end: 8px; vertical-align: -4px; }

/* intl-tel-input inside the lavender field */
.auth-page .iti { width: 100%; }
.auth-page .iti--separate-dial-code .iti__selected-flag,
.auth-page .iti--separate-dial-code .iti__selected-flag:hover {
    background-color: transparent;
    border-inline-end: 1px solid var(--auth-lavender-line);
}

.auth-page .iti__country-list {
    width: min(420px, calc(100vw - 32px));
    white-space: nowrap;
    border-radius: 12px;
    border-color: var(--auth-line);
    box-shadow: 0 16px 40px -16px rgba(20, 17, 37, .3);
}

/* Verify OTP: centred column, six boxes always on one line */
@media (min-width: 992px) {
    .auth-card:has(#kt_verify_otp_form) .auth-logo {
        display: block;
        width: fit-content;
        margin-inline: auto;
    }
}

.auth-page #kt_verify_otp_form .flex-wrap { flex-wrap: nowrap !important; }

.auth-page #kt_verify_otp_form .form-control.w-60px {
    width: auto !important;
    flex: 1 1 0;
    min-width: 0;
    max-width: 60px;
    height: 56px !important;
    font-size: 1.6rem !important;
    border-radius: 12px;
}

/* ---------- Mobile: navy band with the logo only ---------- */
@media (max-width: 991.98px) {
    .auth {
        grid-template-columns: 1fr;
        position: relative;
    }

    .auth-art {
        background: var(--auth-navy) !important;
        padding: 56px 16px 76px;
        align-items: center;
        justify-content: center;
    }

    /* Diamond pattern taken from the logo's border */
    .auth-art::before {
        inset: 0;
        width: auto;
        height: auto;
        border-radius: 0;
        opacity: .09;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 4 40 28 28 52 16 28Z' fill='white'/%3E%3C/svg%3E") 0 0 / 56px;
    }

    .auth-art-copy,
    .auth-mascot,
    .auth-pin,
    .auth-logo { display: none; }

    .auth-seal {
        position: relative;
        display: grid;
        place-items: center;
        width: 150px;
        height: 150px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0 0 10px rgba(255, 255, 255, .08), 0 0 0 22px rgba(255, 255, 255, .04);
    }

    .auth-seal img { width: 136px; height: 136px; }

    .auth-main {
        padding: 0;
        margin-top: -28px;
        position: static;
    }

    .auth-top {
        position: absolute;
        top: 16px;
        inset-inline-end: 16px;
        z-index: 2;
    }

    .auth-lang {
        background: rgba(255, 255, 255, .12);
        color: #fff;
        font-size: 14px;
        padding: 8px 14px;
    }

    .auth-lang:hover,
    .auth-lang:focus-visible { background: rgba(255, 255, 255, .2); color: #fff; }

    .auth-body {
        position: relative;
        z-index: 1;
        background: #fff;
        border-radius: 24px 24px 0 0;
        padding: 28px 16px 8px;
        align-items: flex-start;
    }

    .auth-card { max-width: 480px; margin: 0 auto; }
    .auth-head h1 { font-size: 26px; }
    .auth-footer { padding: 24px 16px; }
}

/* The <picture> around the mascot must not become its own flex item */
.auth-mascot-wrap { display: contents; }

/* ---------- Toast messages (auth-toast.js) ---------- */
.auth-toasts {
    position: fixed;
    top: 16px;
    inset-inline: 16px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.auth-toast {
    pointer-events: auto;
    max-width: 420px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    color: var(--auth-ink);
    font-size: 14px;
    line-height: 1.5;
    border-inline-start: 4px solid var(--auth-purple);
    box-shadow: 0 12px 32px -12px rgba(20, 17, 37, .35);
    cursor: pointer;
    animation: auth-toast-in .2s ease-out;
}

.auth-toast--error { border-inline-start-color: #e5484d; }
.auth-toast--success { border-inline-start-color: #2fa36b; }
.auth-toast--warning { border-inline-start-color: #f5a524; }

@keyframes auth-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-toast { animation: none; }
    .auth-lang, .auth-page .btn { transition: none; }
}
