/* ───────── Admin login (layout ported from kess-app, recoloured to Anajak orange / navy) ───────── */
:root {
    --auth-primary: 249 115 22;
    --auth-secondary: 251 176 64;
    --auth-frombg: 249 115 22;
    --auth-tobg: 30 52 96;

    --auth-card-text: #f1f5f9;
    --auth-card-muted: rgb(148 163 184);
    --auth-card-line: rgb(255 255 255 / 0.08);
    --auth-field-line: rgb(var(--auth-primary) / 0.28);
    --auth-input-bg: rgb(255 255 255 / 0.04);
    --auth-accent-text: #fdba74;
}

.auth-shell {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2.5rem 1rem;
    letter-spacing: normal;
    color: var(--auth-card-text);
    background:
        radial-gradient(circle at 15% 15%, rgb(var(--auth-primary) / 0.16), transparent 28rem),
        radial-gradient(circle at 85% 85%, rgb(var(--auth-tobg) / 0.55), transparent 30rem),
        #0b1120;
}

.auth-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
    background-image:
        linear-gradient(115deg, transparent 0 9%, rgb(255 255 255 / 0.12) 9.1% 9.25%, transparent 9.35% 22%, rgb(255 255 255 / 0.08) 22.1% 22.25%, transparent 22.35%),
        linear-gradient(145deg, transparent 0 14%, rgb(var(--auth-secondary) / 0.32) 14.05% 14.2%, transparent 14.35% 35%, rgb(var(--auth-secondary) / 0.2) 35.05% 35.22%, transparent 35.35%),
        linear-gradient(35deg, transparent 0 11%, rgb(255 255 255 / 0.08) 11.05% 11.22%, transparent 11.35% 30%, rgb(var(--auth-primary) / 0.22) 30.05% 30.2%, transparent 30.35%);
    background-size: 44rem 18rem, 38rem 16rem, 52rem 21rem;
    background-position: -9rem 8rem, calc(100% + 4rem) 4rem, 6rem calc(100% - 10rem);
}

.auth-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.36;
    background-image:
        radial-gradient(circle, rgb(var(--auth-secondary) / 0.95) 0 0.12rem, transparent 0.16rem),
        radial-gradient(circle, rgb(255 255 255 / 0.7) 0 0.1rem, transparent 0.15rem),
        linear-gradient(rgb(255 255 255 / 0.05) 0 0.0625rem, transparent 0.0625rem),
        linear-gradient(90deg, rgb(255 255 255 / 0.04) 0 0.0625rem, transparent 0.0625rem);
    background-size: 14rem 7rem, 19rem 9rem, 5rem 5rem, 5rem 5rem;
    background-position: 6rem 12rem, calc(100% - 16rem) 9rem, 0 0, 0 0;
}

.auth-node {
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    pointer-events: none;
    background: rgb(var(--auth-secondary) / 0.95);
    box-shadow: 0 0 1.25rem rgb(var(--auth-secondary) / 0.95);
}

.auth-hex {
    position: absolute;
    display: none;
    place-items: center;
    width: 7.5rem;
    height: 6.5rem;
    pointer-events: none;
    color: rgb(255 255 255 / 0.22);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    background: rgb(255 255 255 / 0.05);
}

.auth-hex svg { width: 2.5rem; height: 2.5rem; }
.auth-hex-lg svg { width: 3rem; height: 3rem; }

@media (min-width: 768px) {
    .auth-hex { display: grid; }
}

/* ── Poster + card split ── */
.auth-split {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.auth-poster { display: none; }

/* Full-height poster panel on landscape screens. Its width follows the poster's 3:4 ratio so it shows
   whole; the 55vw cap keeps room for the card and trims only the poster's side margins near 5:4. */
@media (min-width: 1024px) and (min-aspect-ratio: 5/4) {
    .auth-shell { padding: 0; }

    .auth-split {
        align-items: stretch;
        min-height: 100vh;
    }

    .auth-poster {
        display: block;
        flex-shrink: 0;
        width: min(74.67vh, 55vw);
        min-height: 100vh;
        object-fit: cover;
        box-shadow: 0.5rem 0 3rem rgb(0 0 0 / 0.45);
    }

    .auth-split .auth-wrap {
        flex: 1 1 0;
        min-width: 0;
        max-width: 39rem;
        align-self: center;
        margin-inline: auto;
        padding: 2.5rem 1.5rem;
    }

    /* The hexagons would only peek out from behind the poster and card. */
    .auth-hex { display: none; }
}

/* ── Card ── */
.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 36rem;
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: 1.75rem;
    border-radius: 2rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    color: var(--auth-card-text);
    background: linear-gradient(145deg, rgb(22 31 50 / 0.97), rgb(12 18 32 / 0.97));
    box-shadow:
        0 1.75rem 5rem rgb(0 0 0 / 0.55),
        inset 0 0.0625rem 0 rgb(255 255 255 / 0.06);
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 0%, rgb(var(--auth-frombg) / 0.16), transparent 12rem),
        radial-gradient(circle at 88% 6%, rgb(var(--auth-tobg) / 0.45), transparent 13rem);
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

.auth-world-map,
.auth-footer-map {
    position: absolute !important;
    z-index: 0 !important;
    overflow: hidden;
    pointer-events: none;
    color: rgb(var(--auth-primary));
    opacity: 0.1;
}

.auth-world-map {
    top: 0;
    left: 0;
    width: 100%;
    height: 8.25rem;
}

.auth-footer-map {
    right: 0;
    bottom: 0;
    width: 72%;
    height: 4.75rem;
}

.auth-world-map::before,
.auth-footer-map::before {
    content: '';
    position: absolute;
    background: currentColor;
    -webkit-mask: url('../assets/image/world.svg') center / cover no-repeat;
    mask: url('../assets/image/world.svg') center / cover no-repeat;
}

.auth-world-map::before {
    top: -0.1rem;
    left: 0;
    width: 100%;
    height: 8.25rem;
}

.auth-footer-map::before {
    top: -2.25rem;
    right: 8%;
    width: min(20rem, 58%);
    height: 7rem;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.auth-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-brand-name {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.45em;
    color: var(--auth-accent-text);
}

.auth-logo {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 0.5rem 1.25rem rgb(0 0 0 / 0.35);
}

.auth-card-body {
    margin-top: 1.5rem;
    padding: 0 1rem;
}

/* ── Fields ── */
.auth-field {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--auth-field-line);
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fed7aa;
}

.auth-toggle {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-accent-text);
    background: none;
    border: 0;
    cursor: pointer;
    transition: color 0.15s;
}

.auth-toggle:hover { color: #ffffff; }

.auth-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgb(255 255 255 / 0.12);
    background: var(--auth-input-bg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus-within {
    border-color: rgb(var(--auth-secondary));
    box-shadow: 0 0 0 3px rgb(var(--auth-primary) / 0.25);
}

.auth-input svg {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    color: var(--auth-accent-text);
}

.auth-input input {
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--auth-card-text);
}

.auth-input input:focus {
    outline: 0;
    box-shadow: none;
}

.auth-input input::placeholder { color: rgb(255 255 255 / 0.3); }

/* Cancel Chrome's autofill background and text colour */
.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-card-text);
    -webkit-box-shadow: 0 0 0 1000px #182033 inset;
    caret-color: var(--auth-card-text);
    transition: background-color 9999s ease-out 0s;
}

.auth-error {
    margin: 0.5rem 0 0;
    text-align: right;
    font-size: 0.85rem;
    color: #f87171;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0 1.25rem 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-card-muted);
    cursor: pointer;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    border-radius: 0.3rem;
    accent-color: rgb(var(--auth-primary));
    cursor: pointer;
}

/* ── Actions ── */
.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .auth-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.auth-forgot {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-card-muted);
    background: none;
    border: 0;
    cursor: pointer;
}

.auth-forgot:hover { color: #ffffff; }

@media (min-width: 640px) {
    .auth-forgot { align-self: center; }
}

.auth-login-button {
    display: inline-flex;
    min-height: 3.25rem;
    min-width: 12rem;
    align-items: stretch;
    justify-content: flex-end;
    overflow: hidden;
    border: 0;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--auth-frombg)), rgb(var(--auth-tobg)));
    box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 0.4);
    transform: skewX(-10deg);
    transition: opacity 160ms ease, transform 160ms ease;
}

.auth-login-button:hover {
    opacity: 0.92;
    transform: skewX(-10deg) translateY(-0.1rem);
}

.auth-login-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.auth-login-button__label {
    display: grid;
    flex: 1;
    place-items: center;
    padding-left: 1rem;
    font-weight: 600;
    transform: skewX(10deg);
}

.auth-login-button__arrow {
    display: grid;
    width: 4rem;
    place-items: center;
    margin-left: -0.75rem;
    padding-left: 0.75rem;
    background: linear-gradient(145deg, rgb(var(--auth-primary)), rgb(var(--auth-secondary)));
    clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
}

.auth-login-button__arrow > span {
    display: grid;
    transform: skewX(10deg);
}

.auth-login-button__arrow svg {
    width: 1.35rem;
    height: 1.35rem;
}

.auth-spin { animation: auth-spin 1s linear infinite; }

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

/* ── Footer ── */
.auth-card-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-card-line);
}

.auth-pci {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--auth-card-text);
}

.auth-pci svg {
    width: 1rem;
    height: 1rem;
    color: var(--auth-accent-text);
}

.auth-tagline {
    padding-left: 1.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--auth-card-muted);
}

.auth-website {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--auth-accent-text);
}

.auth-website svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* ── Forgot password modal ── */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: rgb(0 0 0 / 0.6);
}

.auth-modal-panel {
    width: 100%;
    max-width: 32rem;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    background: #141c2e;
    color: var(--auth-card-text);
    box-shadow: 0 24px 50px rgb(0 0 0 / 0.6);
}

.auth-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.auth-modal-eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--auth-accent-text);
}

.auth-modal-title {
    margin: 0.5rem 0 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-accent-text);
}

.auth-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid rgb(255 255 255 / 0.12);
    background: none;
    color: var(--auth-card-muted);
    cursor: pointer;
}

.auth-modal-close:hover { background: rgb(255 255 255 / 0.06); }
.auth-modal-close svg { width: 1rem; height: 1rem; }

.auth-modal-body {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    background: rgb(255 255 255 / 0.04);
    font-size: 1rem;
}

.auth-modal-phone {
    font-weight: 600;
    color: var(--auth-accent-text);
}

.auth-modal-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-card-muted);
}

.auth-modal-ok {
    padding: 0.5rem 1.25rem;
    border: 0;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--auth-frombg)), rgb(var(--auth-tobg)));
}

.auth-modal-ok:hover { opacity: 0.9; }

@media (max-width: 639px) {
    .auth-card {
        padding: 1.25rem;
        border-radius: 1.5rem;
    }

    .auth-card-body { padding: 0; }
    .auth-brand-name { font-size: 0.625rem; letter-spacing: 0.3em; }
    .auth-logo { width: 3.5rem; height: 3.5rem; }

    .auth-world-map { height: 7rem; }
    .auth-world-map::before { top: 0; height: 6.25rem; }
    .auth-footer-map { width: 82%; height: 4.25rem; }

    .auth-login-button { width: 100%; }

    .auth-card-foot { flex-direction: column; }
}

/* ── Login verification code step ── */
.auth-otp {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-otp-head { text-align: center; }

.auth-otp-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 9999px;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--auth-frombg)), rgb(var(--auth-tobg)));
    box-shadow: 0 0.75rem 1.5rem rgb(var(--auth-frombg) / 0.3);
}

.auth-otp-icon::before {
    content: '';
    position: absolute;
    inset: -0.45rem;
    border-radius: 9999px;
    border: 1px solid rgb(var(--auth-primary) / 0.3);
    animation: auth-ring 2.4s ease-out infinite;
}

@keyframes auth-ring {
    0%   { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.25); opacity: 0; }
}

.auth-otp-icon svg { width: 1.75rem; height: 1.75rem; }

.auth-otp-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--auth-card-text);
}

.auth-otp-subtitle {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: var(--auth-card-muted);
}

.auth-otp-digits {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--auth-field-line);
}

.auth-otp-digit {
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    border-radius: 9999px;
    border: 2px solid rgb(255 255 255 / 0.14);
    background: var(--auth-input-bg);
    color: var(--auth-card-text);
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    caret-color: var(--auth-accent-text);
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-otp-digit::placeholder {
    color: rgb(255 255 255 / 0.25);
    font-size: 1.6rem;
}

.auth-otp-digit:hover:not(:focus) { border-color: rgb(255 255 255 / 0.28); }

.auth-otp-digit.is-filled {
    border-color: rgb(var(--auth-secondary) / 0.7);
    background: rgb(var(--auth-primary) / 0.16);
    color: #ffffff;
}

.auth-otp-digit:focus {
    border-color: transparent;
    background:
        linear-gradient(#182033, #182033) padding-box,
        linear-gradient(135deg, rgb(var(--auth-secondary)), rgb(var(--auth-primary)), rgb(var(--auth-tobg))) border-box;
    box-shadow:
        0 0.6rem 1.4rem -0.25rem rgb(var(--auth-primary) / 0.6),
        0 0 0 0.3rem rgb(var(--auth-primary) / 0.18);
    transform: translateY(-0.2rem);
}

.auth-otp-digit:focus::placeholder { opacity: 0; }

.auth-otp-timer,
.auth-otp-resend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.auth-otp-timer-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--auth-card-muted);
    background: rgb(255 255 255 / 0.06);
}

.auth-otp-timer-text strong { color: var(--auth-card-text); }

.auth-otp-timer-text svg {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--auth-accent-text);
}

.auth-otp-timer-text.is-expired {
    color: #f87171;
    background: rgb(239 68 68 / 0.12);
}

.auth-otp-resend-btn {
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid rgb(var(--auth-secondary) / 0.5);
    background: none;
    color: var(--auth-accent-text);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-otp-resend-btn:hover { background: rgb(var(--auth-primary) / 0.12); }

.auth-otp-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.85rem;
    color: #f87171;
}

.auth-otp-error svg { width: 1rem; height: 1rem; }

.auth-otp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.auth-otp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgb(255 255 255 / 0.14);
    background: none;
    color: var(--auth-card-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.auth-otp-back:hover {
    color: #ffffff;
    border-color: rgb(var(--auth-secondary) / 0.6);
    background: rgb(255 255 255 / 0.05);
}

.auth-otp-back svg { width: 1rem; height: 1rem; }

.auth-otp-confirm { min-width: 10rem; }

.auth-otp-confirm:disabled,
.auth-otp-confirm:disabled:hover {
    opacity: 0.45;
    cursor: not-allowed;
    transform: skewX(-10deg);
}

@media (max-width: 639px) {
    .auth-otp-digits { gap: 0.4rem; padding: 1rem 0.5rem; }
    .auth-otp-digit { width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }
    .auth-otp-footer { flex-direction: column-reverse; align-items: stretch; }
    .auth-otp-back { justify-content: center; }
    .auth-otp-confirm { width: 100%; }
}
