:root {
    color-scheme: dark;
    --login-bg: #192226;
    --login-panel: #202a2e;
    --login-text: #f1f5f4;
    --login-muted: #b6c5c8;
    --login-line: #46565d;
    --login-accent: #40d2c7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--login-bg); color: var(--login-text); font-family: "Cairo", Arial, sans-serif; line-height: 1.7; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--login-accent); outline-offset: 5px; }
.login-backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.login-backdrop img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: 30% center; }
.login-backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, #192226 5%, #192226eb 29%, #19222670 70%, #1922264d); }
.login-stage { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 40px 0; }
.login-layout { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }
.login-panel { width: 450px; max-width: 100%; padding: 30px 34px 22px; background: var(--login-panel); border: 1px solid #506068; border-top: 3px solid var(--login-accent); border-radius: 8px; box-shadow: 0 18px 54px #09111440; }
.login-logo { display: block; position: relative; overflow: hidden; width: 100%; height: 106px; }
.login-logo img { position: absolute; top: 50%; width: 100%; height: auto; transform: translateY(-50%); mix-blend-mode: lighten; }
.login-context { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid #405057; font-size: 12px; color: var(--login-muted); }
.login-context > span:first-child { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: var(--login-accent); }
.login-context bdi { font: 800 17px/1.5 Arial, sans-serif; }
.login-context i { font-size: 17px; }
.login-heading { margin: 24px 0; }
.login-heading h1 { font-size: 25px; font-weight: 800; line-height: 1.5; margin: 0; }
.login-form { display: grid; gap: 21px; }
.login-field label { display: block; margin-bottom: 8px; color: #e6eeee; font-size: 13px; font-weight: 700; }
.login-input-wrap { position: relative; }
.login-input-wrap input { display: block; width: 100%; height: 54px; padding: 10px 46px 10px 14px; border: 1px solid #62767e; border-radius: 4px; outline: none; color: #fff; background: #172126; font-size: 16px; line-height: 1.5; transition: border-color 120ms ease, box-shadow 120ms ease; }
.login-input-wrap input:focus { border-color: var(--login-accent); box-shadow: 0 0 0 3px #40d2c724; }
.login-input-wrap input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 60px #172126 inset; caret-color: white; }
.field-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #9eb5bc; font-size: 19px; pointer-events: none; line-height: 1; }
#password { padding-left: 54px; }
.password-toggle { position: absolute; left: 5px; top: 5px; height: 44px; width: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 3px; color: #b7cace; background: transparent; font-size: 19px; line-height: 1; }
.password-toggle:hover { color: var(--login-accent); background: #ffffff0a; }
.password-toggle:focus-visible { outline-offset: -2px; }
.caps-warning { margin: 8px 0 0; display: flex; align-items: center; gap: 8px; color: #f4cf82; font-size: 12px; }
.login-error { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin: -4px 0 22px; color: #ffe1e2; background: #522c32; border: 1px solid #a96069; border-radius: 4px; font-size: 13px; }
.login-error > i { flex-shrink: 0; margin-top: 2px; }
.login-error > p { margin: 0; overflow-wrap: anywhere; }
.login-submit { height: 52px; width: 100%; padding: 10px 18px; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 16px; border: 1px solid var(--login-accent); border-radius: 4px; color: #122727; background: var(--login-accent); font-size: 15px; font-weight: 800; transition: background-color 120ms ease; }
.login-submit:hover { background: #71e0d8; }
.login-submit:disabled { cursor: wait; color: #122727; background: #7ed5ce; border-color: #7ed5ce; }
.submit-arrow { font-size: 19px; line-height: 1; }
.login-spinner { width: 18px; height: 18px; border: 2px solid #123f3e55; border-top-color: #123f3e; border-radius: 50%; animation: login-spin 700ms linear infinite; }
.login-panel-footer { margin-top: 26px; padding-top: 17px; border-top: 1px solid #405057; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--login-muted); font-size: 11px; }
.login-panel-footer a { display: inline-flex; align-items: center; gap: 7px; }
.login-panel-footer a:hover { color: var(--login-accent); }
.login-panel-footer > span { color: #8fa6ac; }
.login-copyright { max-width: 450px; text-align: center; color: #c3cccf; font-size: 10px; margin: 18px 0 0; }
@keyframes login-spin { to { transform: rotate(360deg); } }

@media (min-width: 1700px) {
    .login-layout { width: min(1440px, calc(100% - 160px)); }
    .login-panel { width: 470px; padding-inline: 38px; }
    .login-copyright { max-width: 470px; }
}
@media (max-width: 1023px) {
    .login-stage { padding-block: 32px; }
    .login-layout { width: calc(100% - 64px); }
    .login-panel { margin-inline: auto; }
    .login-copyright { margin-inline: auto; }
    .login-backdrop::after { background: #192226b8; }
}
@media (max-width: 599px) {
    .login-stage { padding-block: 24px; }
    .login-layout { width: calc(100% - 32px); }
    .login-panel { padding: 22px 24px 18px; }
    .login-logo { height: 96px; }
    .login-context { padding-block: 10px 16px; font-size: 11px; gap: 12px; }
    .login-heading { margin-block: 20px; }
    .login-heading h1 { font-size: 23px; }
    .login-form { gap: 18px; }
    .login-panel-footer { margin-top: 22px; padding-top: 15px; }
    .login-backdrop img { object-position: 32% center; }
    .login-backdrop::after { background: #192226e3; }
}
@media (max-width: 359px) {
    .login-layout { width: calc(100% - 24px); }
    .login-panel { padding-inline: 18px; }
    .login-logo { height: 84px; }
    .login-context { font-size: 10px; }
    .login-panel-footer { gap: 12px; font-size: 10px; }
}
@media (max-height: 650px) and (min-width: 600px) {
    .login-stage { padding-block: 24px; }
    .login-panel { padding-block: 18px; }
    .login-logo { height: 82px; }
    .login-heading { margin-block: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
