﻿
/* ======================================================
   EBDAA ALKHUTAA - AUTHENTICATION UI
   Shared responsive design / Golden Sneat Theme
   ====================================================== */

:root {
    --auth-gold: #ac812b;
    --auth-gold-dark: #795515;
    --auth-gold-light: #f6e7c1;
    --auth-navy: #273440;
    --auth-cream: #f8f5ed;
    --auth-line: #e8e0d1;
    --auth-shadow: 0 22px 65px rgba(50, 42, 25, .085);
}

.ak-auth-body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;
    background: var(--auth-cream);
    font-family: "Beiruti", Tahoma, sans-serif;
}

.ak-auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* ==============================
   HEADER
   ============================== */

.ak-auth-header {
    position: relative;
    z-index: 30;
    background: rgba(255, 252, 245, .96);
    border-bottom: 1px solid var(--auth-line);
    box-shadow: 0 5px 22px rgba(42, 35, 20, .035);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.ak-auth-header-inner {
    min-height: 88px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.ak-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

    .ak-auth-brand img {
        width: 58px;
        height: 58px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .ak-auth-brand span {
        display: flex;
        flex-direction: column;
        line-height: 1.3;
    }

    .ak-auth-brand strong {
        color: var(--auth-gold-dark);
        font-weight: 800;
        font-size: 1.3rem;
    }

    .ak-auth-brand small {
        color: #817762;
        font-size: .83rem;
    }

.ak-auth-icon-btn,
.ak-auth-lang {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--auth-line);
    border-radius: 13px;
    background: #fff;
    color: var(--auth-gold-dark);
    text-decoration: none;
    font-weight: 800;
    transition: .2s ease;
    cursor: pointer;
}

    .ak-auth-icon-btn:hover,
    .ak-auth-lang:hover {
        background: var(--auth-gold-light);
        border-color: var(--auth-gold);
        color: var(--auth-gold-dark);
    }

.ak-auth-home-link {
    min-height: 44px;
    padding: 0 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--auth-gold);
    border-radius: 13px;
    color: var(--auth-gold-dark);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

    .ak-auth-home-link:hover {
        background: var(--auth-gold-dark);
        color: white;
    }

/* ==============================
   PAGE GRID
   ============================== */

.ak-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding-block: 34px;
}

.ak-auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    gap: 0;
    min-height: 650px;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--auth-line);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--auth-shadow);
}

/* ==============================
   VISUAL SIDE
   ============================== */

.ak-auth-visual {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding: 42px 42px 25px;
    background: radial-gradient( circle at 20% 80%, rgba(218, 174, 83, .24), transparent 42% ), linear-gradient( 150deg, #293642 0%, #34414a 56%, #1c2731 100% );
    color: #fff;
    isolation: isolate;
}

    .ak-auth-visual::before {
        content: "";
        position: absolute;
        width: 360px;
        height: 360px;
        border: 1px solid rgba(224, 186, 104, .22);
        border-radius: 50%;
        inset-block-start: -210px;
        inset-inline-end: -150px;
        pointer-events: none;
    }

    .ak-auth-visual::after {
        content: "";
        position: absolute;
        width: 260px;
        height: 260px;
        background: rgba(211, 168, 78, .07);
        border-radius: 50%;
        inset-block-end: -135px;
        inset-inline-start: -125px;
        pointer-events: none;
    }

.ak-auth-visual-content,
.ak-auth-visual-footer {
    position: relative;
    z-index: 2;
}

.ak-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border: 1px solid rgba(233, 197, 111, .28);
    background: rgba(241, 206, 132, .09);
    color: #edcc82;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .055em;
    margin-bottom: 25px;
}

.ak-auth-visual h1 {
    color: #fff;
    font-weight: 800;
    font-size: clamp(1.65rem, 3vw, 2.6rem);
    line-height: 1.3;
    margin-bottom: 15px;
}

.ak-auth-visual p {
    color: #d5dbe1;
    line-height: 1.85;
    font-size: 1.05rem;
    max-width: 520px;
    margin-bottom: 21px;
}

.ak-auth-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .ak-auth-features span {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border-radius: 9px;
        padding: 8px 11px;
        border: 1px solid rgba(255,255,255,.09);
        background: rgba(255,255,255,.055);
        color: #f2ead9;
        font-size: .86rem;
    }

    .ak-auth-features i {
        color: #e4bd63;
        font-size: 1.15rem;
    }

.ak-auth-illustration-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 1;
    min-height: 230px;
    margin-top: 10px;
}

.ak-auth-illustration {
    display: block;
    max-width: min(100%, 430px);
    max-height: 335px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 25px rgba(0,0,0,.12));
}

.ak-auth-visual-footer {
    padding-top: 18px;
    text-align: center;
    color: #d7cba9;
    font-size: .82rem;
}

    .ak-auth-visual-footer i {
        margin-inline-end: 5px;
    }

/* ==============================
   FORM SIDE
   ============================== */

.ak-auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 58px);
    min-width: 0;
}

.ak-auth-content-inner {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
}

.ak-auth-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 40px;
    background: var(--ak-gold-soft, #fff7e5);
    color: var(--auth-gold-dark);
    font-weight: 800;
    font-size: .84rem;
    margin-bottom: 17px;
}

.ak-auth-title {
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.35;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--bs-heading-color, #303843);
}

.ak-auth-subtitle {
    color: var(--bs-secondary-color, #7d8490);
    line-height: 1.75;
    margin-bottom: 28px;
}

.ak-auth-form .form-label {
    font-weight: 700;
    margin-bottom: 9px;
    font-size: 1rem;
}

.ak-auth-form .input-group {
    min-width: 0;
}

.ak-auth-form .input-group-text {
    border-color: var(--bs-border-color, #dedede);
    background: var(--bs-tertiary-bg, #fafafa);
    color: var(--auth-gold);
    font-size: 1.2rem;
}

.ak-auth-form .form-control {
    min-width: 0;
    min-height: 53px;
    font-size: 1rem;
    border-color: var(--bs-border-color, #dedede);
}

    .ak-auth-form .form-control:focus {
        border-color: var(--auth-gold);
        box-shadow: 0 0 0 .18rem rgba(172,129,43,.12);
    }

.ak-auth-form .ak-password-toggle {
    min-width: 48px;
    border: 1px solid var(--bs-border-color, #dedede);
    border-inline-start: 0;
    color: var(--bs-secondary-color, #777);
    background: var(--bs-body-bg, #fff);
}

    .ak-auth-form .ak-password-toggle:hover {
        color: var(--auth-gold-dark);
        background: var(--ak-gold-soft, #fff7e5);
    }

.ak-auth-submit {
    min-height: 56px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.08rem;
    box-shadow: 0 8px 20px rgba(149,107,23,.14);
}

    .ak-auth-submit:disabled {
        cursor: wait;
        opacity: .75;
    }

.ak-auth-help {
    border: 1px solid var(--auth-line);
    background: var(--ak-gold-soft, #fff8eb);
    padding: 15px;
    border-radius: 13px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.7;
    color: var(--bs-body-color, #5f5a50);
    font-size: .94rem;
}

    .ak-auth-help > i {
        font-size: 1.3rem;
        color: var(--auth-gold-dark);
        flex-shrink: 0;
    }

.ak-auth-current-user {
    padding: 15px 17px;
    border-radius: 13px;
    border: 1px solid var(--auth-line);
    background: var(--bs-tertiary-bg, #faf9f7);
    margin-bottom: 22px;
    overflow-wrap: anywhere;
}

    .ak-auth-current-user small {
        display: block;
        color: var(--bs-secondary-color, #777);
        margin-bottom: 5px;
    }

    .ak-auth-current-user strong {
        font-weight: 800;
    }

.ak-auth-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 17px;
    color: var(--bs-secondary-color, #888);
    font-size: .88rem;
}

    .ak-auth-separator::before,
    .ak-auth-separator::after {
        content: "";
        height: 1px;
        background: var(--bs-border-color, #e5e5e5);
        flex: 1;
    }

.ak-auth-portal-link {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    padding: 13px 15px;
    border: 1px solid var(--bs-border-color, #ddd);
    border-radius: 13px;
    color: var(--bs-body-color, #444);
    transition: .2s ease;
}

    .ak-auth-portal-link:hover {
        border-color: var(--auth-gold);
        background: var(--ak-gold-soft, #fff7e5);
        color: var(--auth-gold-dark);
    }

    .ak-auth-portal-link > i {
        color: var(--auth-gold);
        font-size: 1.65rem;
    }

    .ak-auth-portal-link small {
        display: block;
        color: var(--bs-secondary-color, #888);
    }

.ak-auth-denied-code {
    display: block;
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--auth-gold);
    letter-spacing: -.05em;
}

/* ==============================
   FOOTER
   ============================== */

.ak-auth-footer {
    padding: 18px 0 22px;
    font-size: .85rem;
    color: var(--bs-secondary-color, #827a6d);
}

/* ==============================
   DARK MODE
   ============================== */

[data-bs-theme="dark"] .ak-auth-body {
    background: #181e24;
}

[data-bs-theme="dark"] .ak-auth-header {
    background: rgba(32, 39, 46, .97);
    border-color: #3a424a;
}

[data-bs-theme="dark"] .ak-auth-brand strong,
[data-bs-theme="dark"] .ak-auth-brand small {
    color: #e3bd68;
}

[data-bs-theme="dark"] .ak-auth-grid {
    border-color: #42454a;
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] .ak-auth-icon-btn,
[data-bs-theme="dark"] .ak-auth-lang {
    background: #29313a;
    border-color: #45494a;
    color: #edc775;
}

[data-bs-theme="dark"] .ak-auth-home-link {
    color: #ecc76e;
}

[data-bs-theme="dark"] .ak-auth-help,
[data-bs-theme="dark"] .ak-auth-portal-link:hover {
    background: #322917;
    border-color: #6c582e;
}

[data-bs-theme="dark"] .ak-auth-form .ak-password-toggle {
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
}

/* ==============================
   RESPONSIVE TABLET
   ============================== */

@media (max-width: 1199.98px) {

    .ak-auth-grid {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
    }

    .ak-auth-visual {
        padding: 32px 27px 22px;
    }

    .ak-auth-content {
        padding: 30px 25px;
    }
}

/* ==============================
   MOBILE LAYOUT
   ============================== */

@media (max-width: 991.98px) {

    .ak-auth-main {
        padding-block: 20px;
    }

    .ak-auth-grid {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        max-width: 660px;
        margin-inline: auto;
    }

    .ak-auth-visual {
        padding: 23px;
        min-height: 0;
    }

        .ak-auth-visual h1 {
            font-size: 1.6rem;
            margin-bottom: 7px;
        }

        .ak-auth-visual p {
            margin-bottom: 8px;
            font-size: .95rem;
        }

    .ak-auth-features,
    .ak-auth-visual-footer {
        display: none;
    }

    .ak-auth-illustration-wrap {
        min-height: 115px;
        max-height: 170px;
        margin-top: 5px;
    }

    .ak-auth-illustration {
        max-height: 170px;
    }

    .ak-auth-content {
        padding: 26px 24px 30px;
    }
}

@media (max-width: 575.98px) {

    .ak-auth-header-inner {
        min-height: 72px;
        gap: 8px;
    }

    .ak-auth-brand {
        gap: 7px;
    }

        .ak-auth-brand img {
            width: 39px;
            height: 43px;
        }

        .ak-auth-brand strong {
            font-size: 1.05rem;
        }

        .ak-auth-brand small {
            font-size: .72rem;
        }

    .ak-auth-icon-btn,
    .ak-auth-lang,
    .ak-auth-home-link {
        width: 39px;
        height: 39px;
        min-height: 39px;
        padding: 0;
        border-radius: 11px;
    }

    .ak-auth-main {
        padding-block: 12px;
    }

    .ak-auth-grid {
        border-radius: 18px;
    }

    .ak-auth-visual {
        padding: 19px 18px 0;
    }

    .ak-auth-eyebrow {
        margin-bottom: 12px;
        padding: 6px 11px;
        font-size: .72rem;
    }

    .ak-auth-visual h1 {
        font-size: 1.35rem;
    }

    .ak-auth-visual p {
        font-size: .89rem;
        line-height: 1.6;
    }

    .ak-auth-illustration-wrap {
        min-height: 75px;
        max-height: 115px;
    }

    .ak-auth-illustration {
        max-height: 115px;
    }

    .ak-auth-content {
        padding: 25px 19px 30px;
    }

    .ak-auth-title {
        font-size: 1.55rem;
    }

    .ak-auth-subtitle {
        margin-bottom: 22px;
    }

    .ak-auth-submit {
        min-height: 54px;
    }

    .ak-auth-footer {
        padding-block: 14px;
    }

        .ak-auth-footer span {
            text-align: center;
        }
}

@media (prefers-reduced-motion: reduce) {
    .ak-auth-icon-btn,
    .ak-auth-lang,
    .ak-auth-home-link,
    .ak-auth-portal-link {
        transition: none;
    }
}
