:root {
    --login-navy-950: #0a1026;
    --login-navy-900: #111b3d;
    --login-navy-800: #182653;
    --login-blue: #34379a;
    --login-blue-dark: #292d83;
    --login-orange: #ff7b22;
    --login-orange-light: #ffac3d;
    --login-text: #17213c;
    --login-muted: #68728a;
    --login-border: #dfe4ee;
    --login-surface: #ffffff;
    --login-background: #eef1f7;
    --login-danger: #b4233d;
    --login-danger-bg: #fff1f3;
    --login-focus: rgba(52, 55, 154, 0.16);
}

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

html {
    min-height: 100%;
    background: var(--login-background);
}

body.admin-login-page {
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 32px;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    color: var(--login-text);
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 123, 34, 0.12), transparent 26%),
        radial-gradient(circle at 92% 88%, rgba(52, 55, 154, 0.13), transparent 30%),
        linear-gradient(135deg, #f5f7fb 0%, #e9edf5 100%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.admin-login-page::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    opacity: 0.38;
    background-image:
        linear-gradient(rgba(24, 38, 83, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 38, 83, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 48%) minmax(0, 52%);
    overflow: hidden;
    background: var(--login-surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    box-shadow:
        0 35px 80px rgba(19, 29, 62, 0.16),
        0 8px 24px rgba(19, 29, 62, 0.08);
}

.login-showcase {
    position: relative;
    isolation: isolate;
    min-width: 0;
    padding: 54px 58px 48px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #ffffff;
    background:
        linear-gradient(155deg, rgba(52, 55, 154, 0.34), transparent 48%),
        linear-gradient(145deg, var(--login-navy-900) 0%, var(--login-navy-950) 100%);
}

.login-showcase::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    content: "";
    opacity: 0.33;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(140deg, #000, transparent 70%);
}

.login-showcase::after {
    position: absolute;
    right: -85px;
    bottom: 100px;
    z-index: -1;
    width: 260px;
    height: 260px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 38px rgba(255, 255, 255, 0.025),
        0 0 0 76px rgba(255, 255, 255, 0.018);
}

.showcase-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

.showcase-orb-top {
    top: -135px;
    right: -120px;
    width: 330px;
    height: 330px;
    opacity: 0.78;
    background: radial-gradient(circle at 35% 38%, var(--login-orange-light), var(--login-orange) 38%, rgba(255, 123, 34, 0) 69%);
}

.showcase-orb-bottom {
    bottom: -165px;
    left: -150px;
    width: 390px;
    height: 390px;
    opacity: 0.4;
    background: radial-gradient(circle, #4a4db2, rgba(74, 77, 178, 0) 69%);
}

.brand-card {
    width: 262px;
    max-width: 72%;
    min-height: 82px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 18px;
    box-shadow: 0 16px 35px rgba(2, 7, 24, 0.2);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.brand-card:hover,
.brand-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(2, 7, 24, 0.26);
}

.brand-card:focus-visible {
    outline: 3px solid rgba(255, 172, 61, 0.72);
    outline-offset: 4px;
}

.brand-card img,
.mobile-brand img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

.showcase-content {
    max-width: 410px;
    margin: auto 0;
    padding: 64px 0 48px;
}

.showcase-eyebrow,
.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.showcase-eyebrow {
    color: #ffc087;
}

.showcase-eyebrow::before,
.login-kicker::before {
    width: 26px;
    height: 3px;
    content: "";
    background: var(--login-orange);
    border-radius: 99px;
}

.showcase-content h1 {
    margin: 19px 0 19px;
    max-width: 390px;
    font-size: clamp(37px, 4vw, 52px);
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.showcase-content p {
    margin: 0;
    max-width: 390px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.72;
}

.security-note {
    width: fit-content;
    max-width: 100%;
    padding: 12px 16px 12px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
}

.security-note-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: #ffc087;
    background: rgba(255, 123, 34, 0.13);
    border-radius: 12px;
}

.security-note-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.security-note strong,
.security-note small {
    display: block;
}

.security-note strong {
    margin-bottom: 3px;
    font-size: 13px;
    font-weight: 720;
}

.security-note small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    line-height: 1.4;
}

.login-panel {
    min-width: 0;
    padding: 52px clamp(42px, 5vw, 72px) 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--login-surface);
}

.login-form-wrap {
    width: 100%;
    max-width: 430px;
}

.mobile-brand {
    width: 220px;
    max-width: 72%;
    margin: 0 auto 40px;
    display: none;
}

.login-heading {
    margin-bottom: 30px;
}

.login-kicker {
    margin-bottom: 12px;
    color: var(--login-blue);
}

.login-heading h2 {
    margin: 0 0 10px;
    color: var(--login-text);
    font-size: clamp(31px, 3vw, 40px);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.login-heading p {
    margin: 0;
    color: var(--login-muted);
    font-size: 15px;
    line-height: 1.6;
}

.login-messages .form-group {
    margin: 0 0 20px;
}

.login-messages .error-message,
.login-messages .success-message {
    position: relative;
    margin: 0;
    padding: 13px 15px 13px 43px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.login-messages .error-message {
    color: var(--login-danger);
    background: var(--login-danger-bg);
    border: 1px solid #ffd5dc;
}

.login-messages .success-message {
    color: #136c4b;
    background: #ecfdf5;
    border: 1px solid #bcebd8;
}

.login-messages .error-message::before,
.login-messages .success-message::before {
    position: absolute;
    top: 13px;
    left: 14px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.login-messages .error-message::before {
    content: "!";
}

.login-messages .success-message::before {
    content: "✓";
}

.login-messages p {
    margin: 0;
    color: inherit;
}

.login-form {
    width: 100%;
}

.field-group {
    margin-bottom: 19px;
}

.field-group label {
    margin: 0 0 8px;
    display: block;
    color: #303a52;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.input-shell {
    position: relative;
    height: 54px;
    display: flex;
    align-items: center;
    background: #f9fafc;
    border: 1px solid var(--login-border);
    border-radius: 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.input-shell:hover {
    border-color: #c7cedd;
}

.input-shell:focus-within {
    background: #ffffff;
    border-color: var(--login-blue);
    box-shadow: 0 0 0 4px var(--login-focus);
}

.input-icon {
    width: 50px;
    height: 100%;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    color: #8992a6;
}

.input-icon svg,
.password-toggle svg,
.login-submit svg,
.login-footer svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.input-shell input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 15px 0 0;
    color: var(--login-text);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 15px;
    font-weight: 500;
}

.input-shell input::placeholder {
    color: #9aa3b5;
    opacity: 1;
}

.password-toggle {
    width: 48px;
    height: 100%;
    flex: 0 0 48px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #7f899e;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--login-blue);
    background: rgba(52, 55, 154, 0.07);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--login-blue);
    outline-offset: -5px;
}

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

.password-toggle .eye-closed,
.password-toggle[aria-pressed="true"] .eye-open {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
    display: block;
}

.recaptcha-section {
    margin: 25px 0 24px;
    padding: 15px;
    background: #f7f8fb;
    border: 1px solid #e3e7ef;
    border-radius: 15px;
}

.recaptcha-label {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.recaptcha-label span {
    color: #303a52;
    font-size: 12px;
    font-weight: 750;
}

.recaptcha-label small {
    color: #8a93a6;
    font-size: 11px;
}

.recaptcha-widget {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px;
}

.recaptcha-widget .g-recaptcha {
    width: 304px;
    min-height: 78px;
}

.login-submit {
    width: 100%;
    min-height: 54px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--login-blue) 0%, var(--login-blue-dark) 100%);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 12px 25px rgba(52, 55, 154, 0.25);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.01em;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
    box-shadow: 0 16px 30px rgba(52, 55, 154, 0.3);
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit:focus-visible {
    outline: 3px solid rgba(52, 55, 154, 0.28);
    outline-offset: 3px;
}

.login-submit svg {
    width: 19px;
    height: 19px;
    transition: transform 160ms ease;
}

.login-submit:hover svg {
    transform: translateX(3px);
}

.login-footer {
    margin: 23px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #929bad;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.login-footer span {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.login-footer svg {
    width: 17px;
    height: 17px;
}

html[dir="rtl"] .login-messages .error-message,
html[dir="rtl"] .login-messages .success-message {
    padding-right: 43px;
    padding-left: 15px;
}

html[dir="rtl"] .login-messages .error-message::before,
html[dir="rtl"] .login-messages .success-message::before {
    right: 14px;
    left: auto;
}

html[dir="rtl"] .input-shell input {
    padding-right: 0;
    padding-left: 15px;
}

html[dir="rtl"] .login-submit:hover svg {
    transform: translateX(-3px) rotate(180deg);
}

@media (max-width: 920px) {
    body.admin-login-page {
        padding: 24px;
    }

    .login-shell {
        width: min(580px, 100%);
        min-height: 0;
        display: block;
    }

    .login-showcase {
        display: none;
    }

    .login-panel {
        padding: 48px 58px 38px;
    }

    .mobile-brand {
        display: block;
    }
}

@media (max-width: 560px) {
    body.admin-login-page {
        min-height: 100svh;
        padding: 0;
        display: block;
        background: #ffffff;
    }

    body.admin-login-page::before {
        display: none;
    }

    .login-shell {
        width: 100%;
        min-height: 100svh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-panel {
        min-height: 100svh;
        padding: 38px 22px 28px;
        align-items: flex-start;
    }

    .login-form-wrap {
        max-width: 420px;
        margin: auto 0;
    }

    .mobile-brand {
        width: 202px;
        margin-bottom: 34px;
    }

    .login-heading {
        margin-bottom: 27px;
    }

    .login-heading h2 {
        font-size: 32px;
    }

    .recaptcha-section {
        padding: 13px 9px;
    }

    .recaptcha-label {
        padding: 0 4px;
    }
}

@media (max-width: 350px) {
    .recaptcha-widget {
        min-height: 69px;
        justify-content: flex-start;
    }

    .recaptcha-widget .g-recaptcha {
        width: 268px;
        min-height: 69px;
        transform: scale(0.88);
        transform-origin: left top;
    }
}

@media (max-height: 760px) and (min-width: 921px) {
    body.admin-login-page {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-shell {
        min-height: 640px;
    }

    .login-showcase {
        padding-top: 42px;
        padding-bottom: 38px;
    }

    .showcase-content {
        padding-top: 38px;
        padding-bottom: 34px;
    }

    .login-panel {
        padding-top: 32px;
        padding-bottom: 28px;
    }

    .login-heading {
        margin-bottom: 24px;
    }

    .field-group {
        margin-bottom: 15px;
    }

    .recaptcha-section {
        margin-top: 18px;
        margin-bottom: 18px;
    }

    .login-footer {
        margin-top: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
