/* =========================================================
   KARWAN-E-HIRA - LOGIN PAGE
   ---------------------------------------------------------
   Used only by Views/Account/Login.cshtml (body.kh-login).
   Everything is prefixed "kh-" so it cannot collide with
   site.css. No web fonts or external requests.
   ========================================================= */

.kh-login {
    --kh-emerald-950: #01261d;
    --kh-emerald-900: #023a2c;
    --kh-emerald-800: #014836;
    --kh-emerald-600: #0c7d57;
    --kh-emerald-500: #14a372;
    --kh-teal: #138a83;
    --kh-gold: #e3bf6a;
    --kh-gold-bright: #f4dc9c;
    --kh-gold-deep: #b48c3c;
    --kh-text: #fbf7ee;
    --kh-text-soft: rgba(251, 247, 238, 0.78);
    --kh-text-muted: rgba(251, 247, 238, 0.58);
    --kh-line: rgba(255, 255, 255, 0.14);
    --kh-line-gold: rgba(227, 191, 106, 0.32);
    --kh-field-bg: rgba(1, 26, 20, 0.5);
    --kh-danger: #ffb4a6;
    --kh-danger-strong: #ff8f7c;
    --kh-serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
    --kh-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --kh-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--kh-emerald-950);
    color: var(--kh-text);
    font-family: var(--kh-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

    .kh-login *,
    .kh-login *::before,
    .kh-login *::after {
        box-sizing: border-box;
    }

    .kh-login svg {
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.kh-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.kh-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}


/* =========================================================
   BACKGROUND SCENE
   ========================================================= */

.kh-scene {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.kh-scene__image {
    position: absolute;
    inset: -3%;
    background: url('../images/HolyKaaba.png') center 42% / cover no-repeat;
    transform: scale(1.03);
    animation: kh-drift 50s ease-in-out infinite alternate;
    will-change: transform;
}

/* Emerald wash on the branding side (matched to the logo's green),
   a lighter window over the Kaaba, then a vignette and floor fade. */
.kh-scene__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(1, 22, 17, 0.9) 0%, rgba(1, 22, 17, 0) 38%),
        linear-gradient(180deg, rgba(1, 22, 17, 0.55) 0%, rgba(1, 22, 17, 0) 24%),
        radial-gradient(ellipse 85% 70% at 55% 42%, rgba(0, 0, 0, 0) 35%, rgba(0, 12, 9, 0.55) 100%),
        linear-gradient(90deg,
            rgba(1, 66, 50, 0.97) 0%,
            rgba(1, 66, 50, 0.9) 26%,
            rgba(1, 54, 41, 0.6) 46%,
            rgba(1, 36, 28, 0.42) 60%,
            rgba(1, 30, 24, 0.66) 82%,
            rgba(1, 24, 19, 0.82) 100%);
}

.kh-scene__pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23f4dc9c' stroke-width='0.8'%3E%3Crect x='21' y='21' width='22' height='22'/%3E%3Crect x='21' y='21' width='22' height='22' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 64px 64px;
    opacity: 0.03;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.35) 22%, transparent 38%);
    mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.35) 22%, transparent 38%);
}

.kh-scene__glow {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}

.kh-scene__glow--gold {
    top: -30vmax;
    left: 50%;
    width: 64vmax;
    height: 64vmax;
    margin-left: -32vmax;
    background: radial-gradient(circle, rgba(244, 220, 156, 0.2) 0%, rgba(244, 220, 156, 0.06) 38%, rgba(244, 220, 156, 0) 62%);
    animation: kh-breathe 10s ease-in-out infinite alternate;
}

.kh-scene__glow--teal {
    bottom: -38vmax;
    left: -26vmax;
    width: 72vmax;
    height: 72vmax;
    background: radial-gradient(circle, rgba(19, 138, 131, 0.3) 0%, rgba(19, 138, 131, 0.08) 40%, rgba(19, 138, 131, 0) 64%);
    animation: kh-float 18s ease-in-out infinite alternate;
}


/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.kh-page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.kh-main {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 468px);
    align-items: center;
    gap: clamp(48px, 6vw, 96px);
    width: min(1160px, 100% - 80px);
    margin: 0 auto;
    padding: 56px 0 32px;
}

.kh-footer {
    padding: 0 16px 20px;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--kh-text-muted);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}


/* =========================================================
   BRANDING
   ========================================================= */

.kh-brand {
    max-width: 520px;
}

/* The logo sits on its own green. Its edges are faded and a wider
   glow in the same green sits behind it, so it melts into the page. */
.kh-brand__logo {
    position: relative;
    width: clamp(220px, 23vw, 300px);
    margin: 0 0 6px -22px;
    animation: kh-rise 0.8s var(--kh-ease) both;
}

    .kh-brand__logo::before {
        content: "";
        position: absolute;
        inset: -22% -16%;
        background: radial-gradient(closest-side, rgba(1, 72, 54, 0.96) 52%, rgba(1, 72, 54, 0.5) 74%, rgba(1, 72, 54, 0) 100%);
    }

    .kh-brand__logo img {
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        -webkit-mask-image: radial-gradient(closest-side, #000 86%, transparent 100%);
        mask-image: radial-gradient(closest-side, #000 86%, transparent 100%);
    }

.kh-brand__title {
    margin: 0;
    font-family: var(--kh-serif);
    font-size: clamp(38px, 3.7vw, 54px);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.01em;
    color: var(--kh-text);
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
    animation: kh-rise 0.8s var(--kh-ease) 0.08s both;
}

    .kh-brand__title span {
        display: block;
        background: linear-gradient(100deg, var(--kh-gold-bright) 0%, var(--kh-gold) 45%, var(--kh-gold-deep) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: none;
    }

.kh-rule {
    position: relative;
    width: 96px;
    height: 2px;
    margin: 22px 0 20px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--kh-gold) 0%, rgba(227, 191, 106, 0) 100%);
    animation: kh-grow 0.9s var(--kh-ease) 0.2s both;
    transform-origin: left center;
}

    .kh-rule::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        width: 8px;
        height: 8px;
        margin-top: -4px;
        background: var(--kh-gold-bright);
        transform: rotate(45deg);
        box-shadow: 0 0 12px rgba(244, 220, 156, 0.6);
    }

.kh-brand__lead {
    max-width: 30ch;
    margin: 0 0 32px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--kh-text-soft);
    animation: kh-rise 0.8s var(--kh-ease) 0.16s both;
}

/* Feature highlights */

.kh-features {
    display: grid;
    gap: 18px;
    margin: 0 0 34px;
    padding: 0;
    list-style: none;
}

.kh-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    animation: kh-slide-in 0.7s var(--kh-ease) both;
}

    .kh-feature:nth-child(1) { animation-delay: 0.28s; }
    .kh-feature:nth-child(2) { animation-delay: 0.38s; }
    .kh-feature:nth-child(3) { animation-delay: 0.48s; }

.kh-feature__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--kh-line-gold);
    background: linear-gradient(145deg, rgba(227, 191, 106, 0.2) 0%, rgba(227, 191, 106, 0.04) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px -10px rgba(0, 0, 0, 0.6);
    color: var(--kh-gold-bright);
}

    .kh-feature__icon svg {
        width: 22px;
        height: 22px;
    }

.kh-feature__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

    .kh-feature__text strong {
        font-size: 16px;
        font-weight: 600;
        color: var(--kh-text);
    }

    .kh-feature__text span {
        font-size: 14px;
        color: rgba(251, 247, 238, 0.74);
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    }

/* Quranic quotation */

.kh-quote {
    margin: 0;
    padding: 2px 0 2px 18px;
    border-left: 2px solid;
    border-image: linear-gradient(180deg, var(--kh-gold), rgba(227, 191, 106, 0.1)) 1;
    animation: kh-rise 0.8s var(--kh-ease) 0.6s both;
}

.kh-quote__arabic {
    margin: 0 0 2px;
    font-family: "Traditional Arabic", "Arabic Typesetting", "Amiri", "Scheherazade New", serif;
    font-size: 24px;
    line-height: 1.5;
    color: var(--kh-gold-bright);
    text-align: left;
}

.kh-quote blockquote {
    margin: 0;
}

    .kh-quote blockquote p {
        margin: 0;
        font-family: var(--kh-serif);
        font-size: 16px;
        font-style: italic;
        color: rgba(251, 247, 238, 0.88);
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    }

.kh-quote figcaption {
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(240, 210, 135, 0.94);
}


/* =========================================================
   LOGIN CARD
   ========================================================= */

.kh-card {
    position: relative;
    width: 100%;
    padding: 40px 40px 30px;
    border-radius: 24px;
    border: 1px solid var(--kh-line-gold);
    background:
        radial-gradient(120% 55% at 50% 0%, rgba(227, 191, 106, 0.12) 0%, rgba(227, 191, 106, 0) 60%),
        linear-gradient(160deg, rgba(4, 84, 62, 0.86) 0%, rgba(2, 52, 40, 0.9) 55%, rgba(1, 34, 27, 0.94) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 40px 80px -28px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(0, 0, 0, 0.25);
    animation: kh-card-in 0.75s var(--kh-ease) 0.1s both;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .kh-card {
        background:
            radial-gradient(120% 55% at 50% 0%, rgba(227, 191, 106, 0.12) 0%, rgba(227, 191, 106, 0) 60%),
            linear-gradient(160deg, rgba(4, 84, 62, 0.66) 0%, rgba(2, 52, 40, 0.74) 55%, rgba(1, 34, 27, 0.82) 100%);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        backdrop-filter: blur(20px) saturate(140%);
    }
}

    /* Gold highlight along the top edge */
    .kh-card::before {
        content: "";
        position: absolute;
        top: -1px;
        left: 16%;
        right: 16%;
        height: 1px;
        background: linear-gradient(90deg, rgba(244, 220, 156, 0), var(--kh-gold-bright), rgba(244, 220, 156, 0));
    }

/* Kaaba emblem */

.kh-emblem {
    position: relative;
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 1px solid rgba(227, 191, 106, 0.55);
    background: radial-gradient(circle at 50% 30%, rgba(244, 220, 156, 0.24) 0%, rgba(244, 220, 156, 0.04) 70%);
    box-shadow: 0 0 0 6px rgba(227, 191, 106, 0.06), 0 12px 32px -10px rgba(227, 191, 106, 0.45);
}

    /* Slow-turning gold arc around the emblem */
    .kh-emblem::after {
        content: "";
        position: absolute;
        inset: -8px;
        border-radius: 50%;
        background: conic-gradient(from 0deg, rgba(244, 220, 156, 0) 0deg, rgba(244, 220, 156, 0.85) 60deg, rgba(244, 220, 156, 0) 120deg, rgba(244, 220, 156, 0) 360deg);
        -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
        mask: radial-gradient(closest-side, transparent calc(100% - 1.5px), #000 calc(100% - 1px));
        animation: kh-spin 14s linear infinite;
    }

    .kh-emblem svg {
        width: 42px;
        height: 42px;
        stroke: none;
        filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
    }

.kh-emblem__top { fill: #22302b; }
.kh-emblem__left { fill: #0b1411; }
.kh-emblem__right { fill: #141f1b; }
.kh-emblem__band { fill: var(--kh-gold); }

/* Headings */

.kh-card__eyebrow {
    margin: 0 0 6px;
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--kh-gold);
}

.kh-card__title {
    margin: 0;
    text-align: center;
    font-family: var(--kh-serif);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--kh-text);
}

.kh-card__subtitle {
    margin: 8px 0 0;
    text-align: center;
    font-size: 16px;
    color: var(--kh-text-muted);
}

.kh-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 26px;
    color: var(--kh-gold);
}

    .kh-divider span {
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, rgba(227, 191, 106, 0), rgba(227, 191, 106, 0.55));
    }

        .kh-divider span:last-child {
            background: linear-gradient(90deg, rgba(227, 191, 106, 0.55), rgba(227, 191, 106, 0));
        }

    .kh-divider svg {
        width: 13px;
        height: 13px;
        fill: currentColor;
        stroke: none;
    }


/* =========================================================
   FORM
   ========================================================= */

.kh-field {
    margin-bottom: 20px;
}

.kh-label {
    display: block;
    margin-bottom: 9px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--kh-text-soft);
}

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

.kh-input-icon {
    position: absolute;
    left: 17px;
    width: 21px;
    height: 21px;
    color: var(--kh-text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.kh-input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 50px;
    border: 1px solid var(--kh-line);
    border-radius: 12px;
    background: var(--kh-field-bg);
    color: var(--kh-text);
    font: inherit;
    font-size: 17px;
    caret-color: var(--kh-gold-bright);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

    .kh-input::placeholder {
        color: rgba(251, 247, 238, 0.4);
    }

    .kh-input:hover {
        border-color: rgba(255, 255, 255, 0.26);
    }

    .kh-input:focus {
        outline: none;
        border-color: var(--kh-gold);
        background-color: rgba(1, 26, 20, 0.66);
        box-shadow: 0 0 0 4px rgba(227, 191, 106, 0.18);
    }

.kh-input-wrap:focus-within .kh-input-icon {
    color: var(--kh-gold-bright);
}

.kh-input--password {
    padding-right: 56px;
}

/* Hide Edge's built-in reveal button; the custom toggle replaces it. */
.kh-input--password::-ms-reveal,
.kh-input--password::-ms-clear {
    display: none;
}

/* Keep browser autofill on-theme. */
.kh-input:-webkit-autofill,
.kh-input:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--kh-text);
    box-shadow: 0 0 0 1000px #033a2d inset;
    transition: background-color 9999s ease 0s;
}

    .kh-input:-webkit-autofill:focus {
        -webkit-text-fill-color: var(--kh-text);
        box-shadow: 0 0 0 1000px #033a2d inset, 0 0 0 4px rgba(227, 191, 106, 0.18);
    }

.kh-input.input-validation-error {
    border-color: rgba(255, 143, 124, 0.8);
}

    .kh-input.input-validation-error:focus {
        box-shadow: 0 0 0 4px rgba(255, 143, 124, 0.18);
    }

.kh-input-wrap:has(.input-validation-error) .kh-input-icon {
    color: var(--kh-danger-strong);
}

/* Password visibility toggle */

.kh-password-toggle {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--kh-text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

    .kh-password-toggle:hover {
        color: var(--kh-text);
        background: rgba(255, 255, 255, 0.07);
    }

    .kh-password-toggle:focus-visible {
        outline: 2px solid var(--kh-gold);
        outline-offset: 0;
        color: var(--kh-text);
    }

    .kh-password-toggle svg {
        width: 20px;
        height: 20px;
    }

    .kh-password-toggle .kh-icon-eye-off,
    .kh-password-toggle.is-visible .kh-icon-eye {
        display: none;
    }

    .kh-password-toggle.is-visible .kh-icon-eye-off {
        display: block;
    }

/* Caps Lock hint */

.kh-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--kh-gold-bright);
    animation: kh-fade-down 0.25s ease both;
}

    .kh-hint[hidden] {
        display: none;
    }

    .kh-hint svg {
        width: 14px;
        height: 14px;
    }

/* Field validation messages (jQuery unobtrusive + server) */

.kh-field-error.field-validation-valid {
    display: none;
}

.kh-field-error.field-validation-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--kh-danger);
    animation: kh-fade-down 0.25s ease both;
}

    .kh-field-error.field-validation-error::before {
        content: "";
        flex: none;
        width: 14px;
        height: 14px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
    }

/* Login failure summary */

.kh-alert.validation-summary-valid {
    display: none;
}

.kh-alert.validation-summary-errors {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 143, 124, 0.35);
    border-left: 3px solid var(--kh-danger-strong);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(196, 60, 44, 0.26) 0%, rgba(196, 60, 44, 0.12) 100%);
    color: #ffe1db;
    font-size: 15px;
    line-height: 1.45;
    animation: kh-fade-down 0.35s var(--kh-ease) both;
}

    .kh-alert.validation-summary-errors::before {
        content: "";
        flex: none;
        width: 18px;
        height: 18px;
        margin-top: 1px;
        background: var(--kh-danger-strong);
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9.5 16.5h-19z'/%3E%3Cpath d='M12 10v4.5M12 17.25h.01'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9.5 16.5h-19z'/%3E%3Cpath d='M12 10v4.5M12 17.25h.01'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .kh-alert ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

/* Remember me */

.kh-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2px 0 20px;
}

.kh-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    font-size: 15.5px;
    color: var(--kh-text-soft);
    cursor: pointer;
    user-select: none;
}

.kh-checkbox {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1.5px solid rgba(251, 247, 238, 0.38);
    border-radius: 6px;
    background: var(--kh-field-bg);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

    .kh-checkbox::after {
        content: "";
        width: 12px;
        height: 12px;
        background: #0b2a20;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
        transform: scale(0);
        transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.6, 1);
    }

    .kh-remember:hover .kh-checkbox {
        border-color: var(--kh-gold);
    }

    .kh-checkbox:checked {
        border-color: var(--kh-gold);
        background: linear-gradient(145deg, var(--kh-gold-bright), var(--kh-gold-deep));
    }

        .kh-checkbox:checked::after {
            transform: scale(1);
        }

    .kh-checkbox:focus-visible {
        outline: 2px solid var(--kh-gold);
        outline-offset: 3px;
    }

/* Login button */

.kh-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 58px;
    padding: 0 20px;
    overflow: hidden;
    border: 1px solid rgba(244, 220, 156, 0.42);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--kh-emerald-500) 0%, var(--kh-emerald-600) 48%, #07583e 100%);
    color: #fff;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 14px 30px -12px rgba(10, 140, 95, 0.8);
    transition: transform 0.2s var(--kh-ease), box-shadow 0.2s ease, filter 0.2s ease;
}

    /* Light sweep on hover */
    .kh-submit::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: -60%;
        width: 40%;
        background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.26) 50%, rgba(255, 255, 255, 0) 100%);
        transform: skewX(-20deg);
        transition: left 0.75s ease;
        pointer-events: none;
    }

    .kh-submit:hover {
        transform: translateY(-1px);
        filter: brightness(1.07);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 20px 36px -14px rgba(10, 140, 95, 0.95), 0 0 0 1px rgba(244, 220, 156, 0.2);
    }

        .kh-submit:hover::before {
            left: 125%;
        }

    .kh-submit:active {
        transform: translateY(0) scale(0.99);
        filter: brightness(0.96);
    }

    .kh-submit:focus-visible {
        outline: none;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 0 3px var(--kh-emerald-950), 0 0 0 5px var(--kh-gold);
    }

.kh-submit__icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s var(--kh-ease);
}

.kh-submit:hover .kh-submit__icon {
    transform: translateX(2px);
}

.kh-submit__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: kh-spin 0.8s linear infinite;
}

.kh-submit.is-loading {
    cursor: progress;
    transform: none;
    filter: saturate(0.85);
}

    .kh-submit.is-loading .kh-submit__icon {
        display: none;
    }

    .kh-submit.is-loading .kh-submit__spinner {
        display: block;
    }

/* Card footer */

.kh-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

    .kh-card__footer span {
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, rgba(227, 191, 106, 0), rgba(227, 191, 106, 0.4));
    }

        .kh-card__footer span:last-child {
            background: linear-gradient(90deg, rgba(227, 191, 106, 0.4), rgba(227, 191, 106, 0));
        }

    .kh-card__footer p {
        margin: 0;
        font-family: var(--kh-serif);
        font-size: 13px;
        font-style: italic;
        text-align: center;
        color: rgba(244, 220, 156, 0.82);
    }


/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes kh-rise {
    from { opacity: 0; transform: translate3d(0, 16px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes kh-slide-in {
    from { opacity: 0; transform: translate3d(-14px, 0, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes kh-card-in {
    from { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.985); }
    to { opacity: 1; transform: none; }
}

@keyframes kh-grow {
    from { opacity: 0; transform: scaleX(0); }
    to { opacity: 1; transform: scaleX(1); }
}

@keyframes kh-fade-down {
    from { opacity: 0; transform: translate3d(0, -4px, 0); }
    to { opacity: 1; transform: none; }
}

@keyframes kh-drift {
    from { transform: scale(1.03) translate3d(0, 0, 0); }
    to { transform: scale(1.1) translate3d(-1.2%, -0.8%, 0); }
}

@keyframes kh-breathe {
    from { opacity: 0.65; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1.04); }
}

@keyframes kh-float {
    from { opacity: 0.7; transform: translate3d(0, 0, 0); }
    to { opacity: 1; transform: translate3d(6vmax, -4vmax, 0); }
}

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

@media (prefers-reduced-motion: reduce) {

    .kh-login *,
    .kh-login *::before,
    .kh-login *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .kh-scene__image,
    .kh-emblem::after {
        animation: none !important;
    }

    /* The spinner is the only motion that carries meaning; keep it, slower. */
    .kh-submit__spinner {
        animation: kh-spin 1.6s linear infinite !important;
    }
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Small desktops / large tablets in landscape */
@media (max-width: 1199.98px) {

    .kh-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 436px);
        gap: 48px;
        width: min(1160px, 100% - 64px);
    }

    .kh-card {
        padding: 34px 32px 26px;
    }
}

/* Short desktop viewports (e.g. 1366 x 768): tighten vertically */
@media (min-width: 1024px) and (max-height: 860px) {

    .kh-main {
        padding: 20px 0 12px;
    }

    .kh-footer {
        padding-bottom: 14px;
    }

    .kh-brand__logo {
        width: 210px;
        margin-bottom: 0;
    }

    .kh-brand__title {
        font-size: 42px;
    }

    .kh-rule {
        margin: 16px 0 14px;
    }

    .kh-brand__lead {
        margin-bottom: 22px;
        font-size: 16.5px;
    }

    .kh-features {
        gap: 12px;
        margin-bottom: 24px;
    }

    .kh-feature__icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .kh-quote__arabic {
        font-size: 21px;
    }

    .kh-card {
        padding: 24px 34px 20px;
    }

    .kh-emblem {
        width: 58px;
        height: 58px;
        margin-bottom: 12px;
    }

        .kh-emblem svg {
            width: 32px;
            height: 32px;
        }

    .kh-card__title {
        font-size: 27px;
    }

    .kh-card__subtitle {
        margin-top: 4px;
    }

    .kh-divider {
        margin: 14px 0 18px;
    }

    .kh-alert.validation-summary-errors {
        margin-bottom: 14px;
        padding: 10px 14px;
    }

    .kh-field {
        margin-bottom: 12px;
    }

    .kh-field-error.field-validation-error {
        margin-top: 6px;
    }

    .kh-label {
        margin-bottom: 7px;
    }

    .kh-input {
        height: 52px;
    }

    .kh-submit {
        height: 54px;
    }

    .kh-options {
        margin: 0 0 12px;
    }

    .kh-card__footer {
        margin-top: 16px;
    }
}

/* Very short desktops (e.g. 1280 x 720) */
@media (min-width: 1024px) and (max-height: 740px) {

    .kh-main {
        padding: 12px 0 8px;
    }

    .kh-emblem {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }

        .kh-emblem svg {
            width: 28px;
            height: 28px;
        }

    .kh-divider {
        margin: 12px 0 14px;
    }

    .kh-card__footer {
        margin-top: 12px;
    }
}

/* Tablet and below: one column. The branding wrapper dissolves so
   its pieces can sit around the card: header, card, features, quote. */
@media (max-width: 1023.98px) {

    .kh-scene__shade {
        background:
            radial-gradient(ellipse 120% 60% at 50% 30%, rgba(0, 0, 0, 0) 30%, rgba(0, 12, 9, 0.5) 100%),
            linear-gradient(180deg,
                rgba(1, 66, 50, 0.92) 0%,
                rgba(1, 60, 46, 0.8) 30%,
                rgba(1, 40, 31, 0.84) 60%,
                rgba(1, 22, 17, 0.96) 100%);
    }

    .kh-scene__pattern {
        -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 40%);
        mask-image: linear-gradient(180deg, #000 0%, transparent 40%);
    }

    .kh-main {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        align-content: center;
        gap: 0;
        width: min(600px, 100% - 48px);
        padding: 32px 0 24px;
        text-align: center;
    }

    .kh-brand {
        display: contents;
    }

    .kh-brand__logo { order: 1; margin: 0 auto -4px; width: 220px; }
    .kh-brand__title { order: 2; font-size: 38px; }
    .kh-rule { order: 3; margin: 16px auto 14px; transform-origin: center; background: linear-gradient(90deg, rgba(227, 191, 106, 0), var(--kh-gold), rgba(227, 191, 106, 0)); }
    .kh-rule::before { left: 50%; margin-left: -4px; }
    .kh-brand__lead { order: 4; margin: 0 auto 28px; font-size: 16.5px; }
    .kh-card { order: 5; max-width: 460px; text-align: left; }
    .kh-features { order: 6; }
    .kh-quote { order: 7; }

    .kh-brand__title span {
        display: inline;
    }

    .kh-card__eyebrow {
        display: none;
    }

    .kh-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        width: 100%;
        margin: 36px 0 28px;
    }

    .kh-feature {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        animation-name: kh-rise;
    }

    .kh-feature__text strong {
        font-size: 15px;
    }

    .kh-feature__text span {
        font-size: 13px;
    }

    .kh-quote {
        padding: 14px 0 0;
        border: 0;
        border-top: 1px solid;
        border-image: linear-gradient(90deg, rgba(227, 191, 106, 0), var(--kh-gold), rgba(227, 191, 106, 0)) 1;
    }

    .kh-quote__arabic {
        text-align: center;
        font-size: 22px;
    }
}

/* Phones */
@media (max-width: 575.98px) {

    .kh-main {
        width: calc(100% - 32px);
        padding: 20px 0 16px;
    }

    .kh-brand__logo {
        width: 172px;
        margin-bottom: -8px;
    }

    .kh-brand__title {
        font-size: 30px;
    }

    .kh-rule {
        width: 72px;
        margin: 12px auto 10px;
    }

    .kh-brand__lead {
        margin-bottom: 22px;
        font-size: 15px;
    }

    .kh-card {
        padding: 26px 20px 20px;
        border-radius: 20px;
    }

    .kh-input {
        height: 54px;
        font-size: 16.5px;
    }

    .kh-submit {
        height: 56px;
    }

    .kh-emblem {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

        .kh-emblem svg {
            width: 34px;
            height: 34px;
        }

    .kh-card__title {
        font-size: 25px;
    }

    .kh-divider {
        margin: 16px 0 20px;
    }

    /* Features become a compact list */
    .kh-features {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        max-width: 360px;
        margin: 28px auto 22px;
    }

    .kh-feature {
        flex-direction: row;
        gap: 14px;
        text-align: left;
    }

    .kh-feature__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

        .kh-feature__icon svg {
            width: 19px;
            height: 19px;
        }

    .kh-card__footer p {
        font-size: 12px;
    }

    .kh-footer {
        font-size: 11px;
    }
}

@media (max-width: 360px) {

    .kh-brand__title {
        font-size: 27px;
    }

    .kh-card {
        padding: 22px 16px 18px;
    }

    .kh-input {
        padding-left: 46px;
        font-size: 16px;
    }

    .kh-input-icon {
        left: 15px;
    }

    .kh-input--password {
        padding-right: 50px;
    }

    .kh-password-toggle {
        right: 4px;
    }

    .kh-card__footer {
        gap: 8px;
    }
}
