* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family: Cairo, Tahoma, Arial, sans-serif;
    background: #031721;
}

button,
input {
    font: inherit;
}

.authp-page {
    --gold: #d9a846;
    --gold-soft: #ffe5a6;
    --aqua: #55e7ff;
    --panel: rgba(3, 30, 45, .86);
    min-height: 100vh;
    direction: rtl;
    color: #fff1c4;
    overflow-x: hidden;
    background:
        linear-gradient(90deg, rgba(2, 9, 16, .25), rgba(2, 14, 25, .12) 52%, rgba(2, 9, 16, .78)),
        url("../generated/pharaonic/nile-capital-login-v1.webp") center / cover no-repeat #10151d;
}

.authp-page::before,
.authp-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.authp-page::before {
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.48));
    opacity: .82;
}

.authp-page::after {
    z-index: 1;
    background:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 70px 70px;
    mask-image: linear-gradient(90deg, transparent, #000 26%, #000 74%, transparent);
    opacity: .22;
}

.authp-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100vw - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 18px;
    padding: 22px 0 28px;
}

.authp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.authp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.authp-crest {
    width: 74px;
    height: 74px;
    position: relative;
    flex: 0 0 auto;
}

.authp-crest img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.authp-crest .authp-portrait {
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
}

.authp-crest picture,
picture.authp-crest { display:block; }

.authp-journey-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    counter-reset: journey;
}
.authp-journey-list li {
    counter-increment: journey;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e8edf0;
    font-size: 13px;
}
.authp-journey-list li::before {
    content: counter(journey);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(217, 168, 70, .75);
    border-radius: 50%;
    color: #10151d;
    background: linear-gradient(#ffe7a6, #c68d2d);
    font-weight: 900;
}

.authp-brand-text {
    display: grid;
    gap: 2px;
}

.authp-kicker {
    color: var(--aqua);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.authp-brand h1 {
    margin: 0;
    color: var(--gold-soft);
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 900;
    line-height: 1.12;
    text-shadow: 0 3px 14px rgba(0,0,0,.65);
}

.authp-lang {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 22px;
    color: #fff3c7;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(5, 50, 68, .9), rgba(4, 29, 44, .94));
    border: 1px solid rgba(217,168,70,.58);
    box-shadow: 0 10px 20px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.12);
}

.authp-main {
    display: grid;
    grid-template-columns: minmax(360px, 470px) minmax(360px, 1fr);
    gap: 24px;
    align-items: center;
}

.authp-card,
.authp-side-card {
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(5, 43, 61, .94), rgba(2, 14, 24, .96));
    border: 1px solid rgba(217,168,70,.6);
    box-shadow: 0 28px 60px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
}

.authp-card {
    padding: 22px;
}

.authp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(217,168,70,.34);
}

.authp-card-title {
    display: grid;
    gap: 4px;
}

.authp-card-title h2 {
    margin: 0;
    color: #fff2c4;
    font-size: 24px;
    font-weight: 900;
}

.authp-card-title p {
    margin: 0;
    color: #bdefff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.7;
}

.authp-seal {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: url("../izariam_custom/ui_v2/buttons/top_round_button_64x64.png") center / contain no-repeat;
}

.authp-seal img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.authp-alert {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #ffd6d6;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.7;
    background: rgba(99, 18, 23, .62);
    border: 1px solid rgba(255, 108, 108, .44);
}

.authp-alert ul {
    margin: 0;
    padding-inline-start: 20px;
}

.authp-success {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #dbffd6;
    font-size: 13px;
    font-weight: 800;
    background: rgba(23, 91, 46, .5);
    border: 1px solid rgba(128, 255, 136, .38);
}

.authp-form {
    display: grid;
    gap: 13px;
}

.authp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.authp-field {
    display: grid;
    gap: 7px;
}

.authp-field label,
.authp-section-label {
    color: #ffe8aa;
    font-size: 12px;
    font-weight: 900;
}

.authp-input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border-radius: 8px;
    color: #fff5ce;
    background: rgba(1, 17, 29, .74);
    border: 1px solid rgba(217,168,70,.42);
    outline: 0;
    box-shadow: inset 0 1px 8px rgba(0,0,0,.22);
}

.authp-input::placeholder {
    color: rgba(220, 240, 247, .55);
}

.authp-input:focus {
    border-color: rgba(85,231,255,.86);
    box-shadow: 0 0 0 3px rgba(85,231,255,.14), inset 0 1px 8px rgba(0,0,0,.25);
}

.authp-check {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #dff8ff;
    font-size: 12px;
    font-weight: 800;
}

.authp-check input {
    width: 18px;
    height: 18px;
    accent-color: #d9a846;
}

.authp-submit {
    height: 50px;
    border: 0;
    border-radius: 8px;
    color: #241407;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(180deg, #ffe7a6, #d59a32 58%, #a96d1e);
    box-shadow: 0 14px 24px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.42);
}

.authp-submit:hover {
    filter: brightness(1.06);
}

.authp-switch {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    color: #dff8ff;
    font-size: 13px;
    font-weight: 800;
}

.authp-switch a {
    color: var(--gold-soft);
    text-decoration: none;
}

.authp-switch a:hover {
    text-decoration: underline;
}

.authp-side {
    display: grid;
    gap: 14px;
    max-width: 520px;
}

.authp-side-card {
    padding: 18px;
}

.authp-side-card h3 {
    margin: 0 0 10px;
    color: #fff2c4;
    font-size: 17px;
    font-weight: 900;
}

.authp-side-card p {
    margin: 0;
    color: #d7f6ff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.8;
}

.authp-steps {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.authp-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border-radius: 8px;
    background: rgba(0, 15, 27, .28);
    border: 1px solid rgba(217,168,70,.18);
}

.authp-step img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.authp-step span {
    color: #fff0b8;
    font-size: 12px;
    font-weight: 900;
}

.authp-shards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.authp-shard input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.authp-shard span {
    min-height: 72px;
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 9px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    color: #dff8ff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.45;
    background: rgba(0, 18, 31, .5);
    border: 1px solid rgba(217,168,70,.28);
    cursor: pointer;
}

.authp-shard img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.authp-shard input:checked + span {
    color: #fff2c4;
    border-color: rgba(85,231,255,.78);
    background: linear-gradient(180deg, rgba(10, 62, 78, .78), rgba(3, 31, 47, .78));
    box-shadow: 0 0 0 3px rgba(85,231,255,.11);
}

.authp-footer-note {
    color: rgba(223,248,255,.72);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.7;
}

.authp-realm-shell {
    width: min(1220px, calc(100vw - 40px));
}

.authp-realm-main {
    grid-template-columns: 1fr;
    align-items: start;
}

.authp-realm-card {
    padding: 22px;
}

.authp-brand-seal {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.authp-brand-seal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.authp-realm-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

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

.authp-realm-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.authp-realm-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.authp-realm-face {
    position: relative;
    min-height: 330px;
    display: grid;
    grid-template-rows: 156px auto;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 26%, rgba(40, 126, 145, .25), transparent 34%),
        linear-gradient(180deg, rgba(5,43,61,.94), rgba(2,21,35,.98));
    border: 1px solid rgba(217,168,70,.34);
    box-shadow: 0 16px 34px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.1);
}

.authp-realm-art {
    display: grid;
    place-items: center;
    padding: 9px 12px 0;
}

.authp-realm-art img {
    width: 146px;
    height: 146px;
    object-fit: contain;
    filter: saturate(.96) brightness(.9) drop-shadow(0 14px 20px rgba(0,0,0,.46));
}

.authp-realm-copy {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 13px;
}

.authp-realm-copy strong {
    color: #fff2c4;
    font-size: 15px;
    font-weight: 900;
}

.authp-realm-copy span {
    color: #bdefff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.7;
}

.authp-realm-copy em {
    margin-top: 2px;
    color: #75eaff;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.authp-realm-option input:checked + .authp-realm-face {
    border-color: rgba(85,231,255,.86);
    box-shadow: 0 0 0 3px rgba(85,231,255,.12), 0 20px 38px rgba(0,0,0,.35);
}

.authp-realm-option input:focus-visible + .authp-realm-face {
    outline: 3px solid #fff0b5;
    outline-offset: 3px;
}

.authp-realm-option input:checked + .authp-realm-face img {
    filter: saturate(1.08) brightness(1.02);
}

.authp-choice-state {
    position: absolute;
    inset: 12px auto auto 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.46);
    background: rgba(1, 20, 31, .8);
}

.authp-realm-option input:checked + .authp-realm-face .authp-choice-state {
    border: 6px solid #e5b84f;
    background: #63eaff;
    box-shadow: 0 0 18px rgba(99,234,255,.66);
}

.authp-realm-submit {
    width: 100%;
    margin-top: 18px;
}

[dir="ltr"] .authp-page {
    direction: ltr;
}

[dir="ltr"] .authp-page {
    font-family: Outfit, Cairo, Tahoma, Arial, sans-serif;
}

@media (max-width: 980px) {
    .authp-shell {
        width: min(680px, calc(100vw - 28px));
        padding: 16px 0 22px;
    }

    .authp-main {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .authp-side {
        max-width: none;
        order: -1;
    }

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

@media (max-width: 620px) {
    .authp-top {
        align-items: flex-start;
    }

    .authp-crest {
        width: 58px;
        height: 58px;
    }

    .authp-brand h1 {
        font-size: 22px;
    }

    .authp-lang {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .authp-card {
        padding: 16px;
    }

    .authp-card-head {
        align-items: flex-start;
    }

    .authp-grid-2,
    .authp-shards {
        grid-template-columns: 1fr;
    }

    .authp-side-card {
        padding: 15px;
    }

    .authp-realm-grid {
        grid-template-columns: 1fr;
    }

    .authp-realm-face {
        min-height: 260px;
    }
}

@media (max-height: 820px) and (min-width: 981px) {
    .authp-shell {
        gap: 10px;
        padding: 12px 0 16px;
    }

    .authp-crest {
        width: 60px;
        height: 60px;
    }

    .authp-brand h1 {
        font-size: 28px;
    }

    .authp-card {
        padding: 16px 20px;
    }

    .authp-card-head {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .authp-card-title h2 {
        font-size: 22px;
    }

    .authp-card-title p {
        font-size: 12px;
        line-height: 1.55;
    }

    .authp-seal {
        width: 50px;
        height: 50px;
    }

    .authp-seal img {
        width: 29px;
        height: 29px;
    }

    .authp-form {
        gap: 9px;
    }

    .authp-field {
        gap: 5px;
    }

    .authp-input {
        height: 40px;
    }

    .authp-shard span {
        min-height: 56px;
        padding: 8px;
    }

    .authp-submit {
        height: 44px;
    }

    .authp-side-card {
        padding: 14px 16px;
    }

    .authp-side-card h3 {
        margin-bottom: 6px;
        font-size: 16px;
    }

    .authp-side-card p {
        line-height: 1.6;
    }

    .authp-steps {
        gap: 6px;
        margin-top: 8px;
    }

    .authp-step {
        padding: 7px;
    }
}
