:root {
  color-scheme: light;
  --ink: #111519;
  --muted: #737f90;
  --blue: #007fb2;
  --error: #b33131;
  --paper: #f6f8fc;
  font-family: Arial, Helvetica, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; }
button:focus-visible { outline: 3px solid #51b9e2; outline-offset: 4px; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon-definitions { width: 0; height: 0; position: absolute; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.auth-shell {
  display: flex; flex-direction: column; width: 100%; min-height: 100svh;
  background: linear-gradient(125deg, #fafbfe 0%, #f3f6fa 68%, #f8fafd 100%);
}
.native-safe-top { height: env(safe-area-inset-top, 0px); flex: 0 0 auto; background: #0b3047; }
.identity {
  position: relative; width: 100%; flex: 0 0 auto; padding: 16px 0 24px;
  background-color: #0b3047;
}
.identity-art {
  width: min(100%, 404px); aspect-ratio: 404 / 192; margin: 0 auto;
  background-image: url("./assets/approved-login-art.png");
  background-size: 380.19802% 533.333333%;
  background-position: 8.480565% 11.298077%;
  background-repeat: no-repeat;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}
.identity::after { content: ""; position: absolute; top: 100%; left: 0; width: 24px; height: 24px; background: #0b3047; }
.form-surface { position: relative; flex: 1; display: flex; justify-content: center; margin-top: -1px; padding: 40px 24px max(80px, env(safe-area-inset-bottom, 0px)); border-radius: 22px 0 0 0; background: linear-gradient(125deg, #fafbfe 0%, #f3f6fa 68%, #f8fafd 100%); }
.form-content { width: 100%; max-width: 356px; }
h1 { margin: 0 0 32px; font-size: 30px; font-weight: 750; line-height: 36px; letter-spacing: -.65px; }
.field + .field { margin-top: 24px; }
.field label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 400; line-height: 20px; }
.input-wrap { position: relative; }
input {
  display: block; width: 100%; height: 50px; padding: 0 16px;
  color: #232b37; background: #f9faff88; border: 1px solid #c6cedd;
  border-radius: 8px; font-size: 18px; line-height: normal; box-shadow: inset 0 1px 2px #1a2f4b02;
}
input::placeholder { color: #798397; opacity: 1; }
input:hover { border-color: #a8b8cb; }
input:focus { outline: none; border-color: #007fb2; box-shadow: 0 0 0 3px #007fb215; }
input[aria-invalid="true"] { border-color: var(--error); }
.password-wrap input { padding-right: 58px; }
.password-toggle { position: absolute; top: 3px; bottom: 3px; right: 5px; width: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; color: #8b94a3; background: transparent; }
.password-toggle:hover { color: #0074a6; background: #eef4fa; }
.password-toggle .icon { width: 24px; height: 24px; stroke-width: 2; }
.field-error, .caps-lock { margin: 8px 0 0; font-size: 13px; line-height: 1.4; }
.field-error { color: var(--error); }
.caps-lock { color: #8a5b18; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; padding: 13px 18px; border: 1px solid #007fac; border-radius: 9px; background: linear-gradient(110deg, #0089b9, #0074a5); color: white; font-size: 20px; font-weight: 700; line-height: 1.4; box-shadow: inset 0 1px 0 #ffffff0d; }
.primary-button:hover { background: linear-gradient(110deg, #007fac, #006c9a); }
.primary-button:active { filter: brightness(.96); }
.primary-button:disabled { opacity: .75; }
#submit-button { margin-top: 44px; }
.text-button { min-height: 44px; padding: 10px 8px; border: 0; border-radius: 6px; background: transparent; color: #006fc3; font-size: 18px; line-height: 24px; }
.text-button:hover { background: #eaf2fa88; }
.help-button { display: block; margin: 28px auto 0; }
.form-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding: 13px; border: 1px solid #d2e2ed; border-radius: 9px; background: #edf5fb; color: #3e586e; font-size: 13px; line-height: 1.5; }
.form-notice .icon { width: 19px; height: 19px; margin-top: 1px; color: #2a779d; }
.form-notice p { margin: 0; }
.notice-title { font-weight: 700; margin-bottom: 3px !important; }
.offline-banner { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 10px 20px; background: #fff2d9; color: #74511e; font-size: 13px; line-height: 1.45; }
.offline-banner .icon { width: 19px; height: 19px; }
.noscript-notice { color: var(--error); font-size: 14px; line-height: 1.5; }
.button-spinner { width: 18px; height: 18px; border: 2px solid #ffffff66; border-top-color: white; border-radius: 100%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog { width: min(390px, calc(100% - 32px)); max-height: calc(100svh - 40px); padding: 24px; border: 1px solid #dce5eb; border-radius: 17px; color: var(--ink); background: #f9fbfe; box-shadow: 0 24px 70px #10233533; }
dialog::backdrop { background: #10233266; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-top h2 { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -.5px; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 8px; color: #607284; background: #edf1f6; }
dialog > p { margin: 0; color: #64717e; font-size: 15px; line-height: 1.65; }
dialog > .primary-button { min-height: 48px; margin-top: 24px; font-size: 16px; }

@media (max-width: 560px) {
  .identity { padding: 0; }
  .identity-art {
    width: 100%; max-width: none; mask-image: none;
    aspect-ratio: 404 / 220;
    background-size: 380.19802% 465.454545%;
    background-position: 8.480565% 11.691542%;
  }
  .form-surface { padding-bottom: max(100px, env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 350px) {
  .form-surface { padding: 32px 20px 100px; }
  h1 { font-size: 27px; line-height: 34px; margin-bottom: 28px; }
  input { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
