/* Suppliers Portal login. Styles are scoped to this page; the shared theme,
   controls, self-hosted fonts and language services remain the source of truth. */
.login-page {
    --login-panel-bg: #f8fbff;
    --login-text: #0d2146;
    --login-muted: #52698e;
    --login-field-bg: rgb(239 246 255 / .5);
    --login-border: #cad9ed;
    --login-blue: #005bff;
    --login-link: #0054e8;
    --login-deco: rgb(147 197 253 / .13);
    --login-ring: 0 0 0 3px rgb(0 91 255 / .17);
    display: grid;
    grid-template-columns: minmax(0, 53fr) minmax(0, 47fr);
    grid-template-areas: "story panel";
    direction: ltr;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-panel-bg);
    color: var(--login-text);
}
html[dir="ltr"] .login-page {
    grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
    grid-template-areas: "panel story";
}
[data-theme="dark"] .login-page {
    --login-panel-bg: #0e1b2d;
    --login-text: #f1f6ff;
    --login-muted: #adbed7;
    --login-field-bg: #14243b;
    --login-border: #304967;
    --login-blue: #0968ff;
    --login-link: #89b7ff;
    --login-deco: rgb(59 130 246 / .06);
    --login-ring: 0 0 0 3px rgb(96 165 250 / .26);
}
.login-panel {
    grid-area: panel;
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 36px clamp(32px, 4.1vw, 80px) 28px;
    overflow: hidden;
    background: radial-gradient(ellipse at 85% 100%, var(--login-deco), transparent 50%);
}
.login-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset-inline-end: -145px;
    inset-block-end: 5%;
    width: 240px;
    height: 240px;
    border: 40px solid var(--login-deco);
    border-radius: 48px;
    transform: rotate(45deg);
    pointer-events: none;
}
.login-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.login-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.login-brand__logo { width: 68px; height: 68px; object-fit: contain; flex-shrink: 0; }
[data-theme="dark"] .login-brand__logo { padding: 5px; border-radius: 50%; background: #fff; }
.login-brand__text { min-width: 0; }
.login-brand__name { font-size: clamp(18px, 1.5vw, 24px); font-weight: 700; line-height: 1.45; }
.login-brand__company { margin-top: 4px; max-width: 26ch; font-size: 12px; line-height: 1.7; color: var(--login-muted); }
.login-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.login-lang { margin: 0; }
.login-lang__btn,
.login-tools .topbar__iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding-inline: 12px;
    border: 1px solid var(--login-border);
    border-radius: 11px;
    background: var(--login-panel-bg);
    color: var(--login-muted);
    font-size: 14px;
}
.login-tools .topbar__iconbtn { width: 42px; height: 42px; padding: 0; }
.login-lang__btn:hover,
.login-tools .topbar__iconbtn:hover { background: var(--login-field-bg); color: var(--login-text); }
.login-lang__btn:focus-visible,
.login-tools .topbar__iconbtn:focus-visible,
.login-link:focus-visible,
.login-support:focus-visible { outline: none; box-shadow: var(--login-ring); }
.login-panel__main { flex: 1; display: grid; align-items: center; padding-block: 48px 36px; }
.login-panel__content { width: min(440px, 100%); margin-inline: auto; }
.login-title { margin: 0; color: var(--login-text); font-size: clamp(30px, 3vw, 46px); font-weight: 700; line-height: 1.35; }
.login-lead { margin-top: 13px; color: var(--login-muted); font-size: 16px; line-height: 1.8; }
.login-form { display: flex; flex-direction: column; gap: 24px; margin-top: 40px; }
.login-form .login-field { gap: 10px; }
.login-form .app-field__label { color: var(--login-text); font-size: 15px; font-weight: 500; }
.login-form .app-field__required { display: none; }
.login-form .app-input {
    height: 58px;
    padding-inline: 17px;
    border: 1px solid var(--login-border);
    border-radius: 12px;
    background: var(--login-field-bg);
    color: var(--login-text);
    font-size: 16px;
    line-height: 1.5;
}
.login-form .app-input::placeholder { color: var(--login-muted); opacity: .8; }
.login-form .app-input:hover { border-color: #95b4dd; }
.login-form .app-input:focus { border-color: var(--login-blue); outline: none; box-shadow: var(--login-ring); }
.login-form .app-input-group__icon { width: 22px; height: 22px; inset-inline-start: 18px; color: var(--login-muted); }
.login-form .app-input-group .app-input { padding-inline-start: 55px; }
.login-form .app-input-group--action .app-input { padding-inline-end: 55px; }
.login-form .app-input-group__action { inset-inline-end: 7px; width: 44px; height: 44px; border-radius: 9px; color: var(--login-muted); }
.login-form .app-input-group__action:hover { background: var(--login-deco); color: var(--login-link); }
.login-form .app-input-group__action:focus-visible { box-shadow: var(--login-ring); }
.login-form .input-validation-error { border-color: var(--color-status-danger); }
.login-form__options { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.login-form__remember { gap: 9px; min-height: 44px; color: var(--login-muted); font-size: 14px; }
.login-form__remember input[type="checkbox"] { width: 21px; height: 21px; margin: 0; accent-color: var(--login-blue); }
.login-link { min-height: 44px; border-radius: 5px; color: var(--login-link); font-size: 14px; font-weight: 500; text-align: start; }
.login-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.login-submit {
    position: relative;
    gap: 18px;
    height: 60px;
    margin-top: -6px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--login-blue);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgb(0 91 255 / .1);
}
.login-submit:hover:not(:disabled) { background: #004cdc; }
.login-submit:focus-visible { box-shadow: 0 0 0 3px var(--login-panel-bg), 0 0 0 6px #8ab9ff; }
html[dir="ltr"] .login-submit__arrow { transform: rotate(180deg); }
.login-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    margin: 30px auto 0;
    padding: 6px;
    border-radius: 6px;
    color: var(--login-link);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
}
.login-support svg { flex-shrink: 0; }
.login-support:hover span { text-decoration: underline; text-underline-offset: 4px; }
.login-panel__footer { display: flex; align-items: center; gap: 15px; color: var(--login-muted); font-size: 11px; opacity: .8; }
.login-panel__footer::before,
.login-panel__footer::after { content: ""; height: 1px; flex: 1; background: var(--login-border); }
.login-error { padding: 14px 16px; border: 1px solid var(--color-status-danger); border-radius: 10px; background: var(--color-status-danger-tint); }
.login-error p { margin: 0; line-height: 1.7; }

/* Physical sides deliberately follow the approved composition; the page mirrors
   for English. All form/control spacing uses logical properties. */
.login-story {
    grid-area: story;
    position: relative;
    isolation: isolate;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 70px clamp(30px, 3.7vw, 64px) 38px;
    overflow: hidden;
    border-radius: 0 6% 6% 0 / 0 50% 50% 0;
    background: radial-gradient(ellipse at 10% 0, #163e72, transparent 55%),
                radial-gradient(ellipse at 70% 70%, #123764, transparent 50%), #0b1c33;
    color: #f8fbff;
}
html[dir="ltr"] .login-story { border-radius: 6% 0 0 6% / 50% 0 0 50%; }
.login-story::before { content: ""; position: absolute; z-index: -1; top: -270px; right: -100px; width: 300px; height: 420px; border: 1px solid #2861a1; border-radius: 50%; background: linear-gradient(130deg, #164d8b, #0b1c33); transform: rotate(-24deg); }
.login-story::after { content: ""; position: absolute; z-index: -1; bottom: -290px; right: -260px; width: 1200px; height: 480px; border: 1px solid rgb(77 150 243 / .35); border-radius: 50%; background: linear-gradient(175deg, rgb(15 64 120 / .95), rgb(8 28 53 / .1) 68%); transform: rotate(-13deg); }
.login-story__wave { position: absolute; z-index: -1; bottom: -140px; left: -270px; width: 130%; height: 350px; border: 1px solid rgb(93 164 255 / .38); border-radius: 50%; background: linear-gradient(165deg, #24548b, #0b1d35 72%); transform: rotate(16deg); pointer-events: none; }
.login-story__intro { width: 100%; text-align: center; margin-top: 22px; }
.login-story__intro h2 { font-size: clamp(30px, 3.2vw, 50px); font-weight: 700; line-height: 1.5; color: #fff; }
.login-story__intro p { margin-top: 12px; color: #99ceff; font-size: clamp(13px, 1.4vw, 20px); line-height: 1.9; }
.login-scene { position: relative; width: min(720px, 100%); aspect-ratio: 1.46; margin-block: 28px 30px; }
.login-scene__art { position: absolute; top: -1%; left: 8%; width: 84%; height: auto; pointer-events: none; }
.login-scene__orbit { position: absolute; width: 90%; height: 36%; left: 5%; border: 1px solid rgb(102 173 255 / .45); border-radius: 50%; }
.login-scene__orbit--first { top: 19%; transform: rotate(-18deg); }
.login-scene__orbit--second { top: 44%; transform: rotate(15deg); }
.login-features { position: absolute; inset: 0; margin: 0; padding: 0; }
.login-feature {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: clamp(105px, 21%, 145px);
    min-height: 95px;
    padding: 16px 10px;
    border: 1px solid rgb(109 175 255 / .45);
    border-radius: 15px;
    background: linear-gradient(125deg, rgb(31 65 110 / .86), rgb(10 28 53 / .88));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 12px 28px rgb(2 10 25 / .12);
    color: #f3f8ff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
}
.login-feature--orders { top: 6%; right: 0; }
.login-feature--returns { top: 6%; left: 0; }
.login-feature--checks { bottom: 8%; left: 0; }
.login-feature--sales { bottom: 8%; right: 0; }
.login-story__credit { margin-top: auto; text-align: center; padding-top: 28px; }
.login-story__credit p { margin-bottom: 13px; color: #abc4e3; font-size: 11px; line-height: 1.7; }
.login-story__credit img { display: block; width: 260px; max-width: 100%; height: auto; margin-inline: auto; }

.login-help { width: min(450px, calc(100% - 36px)); max-height: calc(100dvh - 48px); margin: auto; padding: 26px; border: 1px solid var(--color-border-default); border-radius: 18px; background: var(--color-background-surface); color: var(--color-text-primary); box-shadow: 0 24px 80px rgb(4 18 38 / .25); }
.login-help::backdrop { background: rgb(4 17 37 / .58); backdrop-filter: blur(5px); }
.login-help__header { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.login-help__header h2 { font-size: 19px; line-height: 1.6; }
.login-help__close { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0; }
.login-help__close:hover { background: var(--color-hover); }
.login-help p { margin-block: 20px 26px; font-size: 15px; line-height: 1.9; color: var(--color-text-secondary); }
.login-help > .app-btn { min-height: 44px; padding-inline: 22px; }

@media (min-width: 1001px) and (max-width: 1200px) {
    .login-panel { padding-inline: 30px; }
    .login-panel__header { align-items: flex-start; gap: 12px; }
    .login-brand { gap: 8px; }
    .login-brand__logo { width: 54px; height: 54px; }
    .login-brand__name { font-size: 18px; }
    .login-brand__company { font-size: 11px; }
    .login-tools { gap: 6px; }
    .login-lang__btn { padding-inline: 8px; font-size: 12px; }
    .login-tools .topbar__iconbtn { width: 38px; }
    .login-story { padding-inline: 28px; }
    .login-story__intro p { font-size: 13px; }
    .login-feature { min-height: 82px; width: 105px; font-size: 12px; }
}
@media (min-width: 1001px) and (max-height: 760px) {
    .login-panel { padding-block: 24px 20px; }
    .login-panel__main { padding-block: 28px; }
    .login-form { margin-top: 24px; gap: 18px; }
    .login-support { margin-top: 18px; }
    .login-story { padding-block: 38px 28px; }
    .login-story__intro { margin-top: 0; }
    .login-scene { width: min(610px, 90%); margin-block: 14px 12px; }
    .login-story__credit { padding-top: 20px; }
}
@media (max-width: 1000px) {
    .login-page,
    html[dir="ltr"] .login-page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "panel" "story"; }
    .login-panel { min-height: calc(100vh - 130px); min-height: calc(100dvh - 130px); padding: 28px 36px 24px; }
    .login-panel__header { width: min(620px, 100%); margin-inline: auto; }
    .login-panel__main { padding-block: 44px 36px; }
    .login-panel__footer { width: min(440px, 100%); margin-inline: auto; }
    .login-story,
    html[dir="ltr"] .login-story { min-height: 130px; padding: 24px 28px; border-radius: 0; }
    .login-story__intro,
    .login-scene { display: none; }
    .login-story__credit { margin: 0; padding: 0; }
    .login-story__credit p { margin-bottom: 10px; }
    .login-story__credit img { width: 200px; }
    .login-story__wave { bottom: -280px; }
}
@media (max-width: 560px) {
    .login-panel { padding: 18px 24px 22px; }
    .login-panel__header { flex-direction: column-reverse; align-items: stretch; gap: 20px; }
    .login-tools { justify-content: flex-end; }
    .login-brand__logo { width: 62px; height: 62px; }
    .login-brand__name { font-size: 22px; }
    .login-brand__company { max-width: none; font-size: 12px; }
    .login-panel__main { padding-block: 38px 32px; }
    .login-title { font-size: 32px; }
    .login-lead { font-size: 14px; margin-top: 10px; }
    .login-form { gap: 22px; margin-top: 30px; }
    .login-form .app-input { height: 56px; }
    .login-form__remember,
    .login-link { font-size: 12px; }
    .login-form__options { gap: 8px; }
    .login-submit { height: 56px; font-size: 17px; }
    .login-support { margin-top: 24px; font-size: 14px; }
}
@media (max-width: 360px) {
    .login-panel { padding-inline: 18px; }
    .login-brand { gap: 9px; }
    .login-brand__name { font-size: 20px; }
    .login-brand__logo { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    .login-page *,
    .login-help * { transition: none !important; animation: none !important; }
}
