:root {
  color-scheme: light;
  --navy: #102741;
  --ink: #14263f;
  --muted: #51637a;
  --line: #cbd6e4;
  --blue: #07579f;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8fafc;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
.shell { display: grid; grid-template-columns: minmax(260px, 37%) 1fr; min-height: 100vh; min-height: 100svh; }
.brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(26px, 5vw, 76px);
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand::before, .brand::after {
  position: absolute;
  z-index: -1;
  content: "";
  width: clamp(240px, 35vw, 590px);
  aspect-ratio: 1;
  border-radius: 30%;
  border: 1px solid #52769a;
  transform: rotate(33deg);
  top: 23%;
  right: -36%;
}
.brand::after { top: 27%; right: -25%; border-color: #335776; }
.brand-name { display: flex; align-items: center; gap: 13px; font-size: 1.28rem; font-weight: 650; letter-spacing: -.035em; }
.brand-name img { border-radius: 12px; }
.brand-name strong { color: #b9d9ff; font-weight: inherit; }
.brand-intro { margin: 3rem 0 0; font-size: clamp(1.2rem, 2.25vw, 2.25rem); line-height: 1.22; letter-spacing: -.035em; color: #e0edfc; }
.main { display: grid; place-items: center; padding: 54px 26px; }
.signin { width: min(100%, 415px); }
.environment {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 4px 10px;
  color: #285179;
  border: 1px solid #cddced;
  border-radius: 6px;
  background: #edf4fb;
  font-size: .76rem;
  font-weight: 650;
}
h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.85rem); line-height: 1.1; letter-spacing: -.055em; }
.intro { margin: 14px 0 26px; color: var(--muted); overflow-wrap: anywhere; }
.intro strong { color: var(--ink); }
.fields, .choices { display: grid; gap: 9px; }
input, button { font: inherit; }
label { font-size: .91rem; font-weight: 650; }
.label-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 12px; }
.label-row a { font-size: .86rem; }
a, .inline-actions button, .back button { color: var(--blue); text-underline-offset: 3px; }
input:not([type="hidden"]):not([type="checkbox"]) {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px 13px;
  margin-bottom: 9px;
}
input.code { letter-spacing: .35em; font-weight: 700; font-variant-numeric: tabular-nums; }
.password-field { position: relative; }
.password-field input { padding-right: 64px !important; }
.password-field button {
  position: absolute;
  right: 7px;
  top: 5px;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: var(--blue);
  font-size: .84rem;
  font-weight: 650;
}
.password-field button:hover { background: #edf4fb; }
.remember { display: flex; align-items: center; gap: 10px; min-height: 36px; margin-bottom: 3px; font-weight: 500; cursor: pointer; }
.remember input { inline-size: 17px; block-size: 17px; margin: 0; accent-color: var(--blue); }
button { cursor: pointer; }
.primary, .option { min-height: 48px; border-radius: 8px; padding: 10px 14px; font-weight: 650; }
.primary { background: var(--blue); border: 1px solid var(--blue); color: #fff; }
.primary:hover { background: #074681; }
.option { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.option:hover { border-color: var(--blue); background: #f0f6fd; }
.option small { display: block; color: var(--muted); font-size: .82rem; font-weight: 500; overflow-wrap: anywhere; }
.option > span { min-width: 0; }
.inline-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.back { margin-top: 18px; border-top: 1px solid #e1e9f1; padding-top: 10px; }
.inline-actions button, .back button { border: 0; background: transparent; padding: 5px 0; min-height: 36px; font-size: .88rem; text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.message { margin: 0 0 18px; padding: 10px 12px; border-left: 3px solid #3971a1; border-radius: 4px; background: #e8f1fa; color: #194671; font-size: .9rem; }
.error { border-color: #a12538; background: #faebed; color: #8b2031; }

@media (max-width: 700px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .brand { padding: 20px 24px; }
  .brand-intro { display: none; }
  .brand::before, .brand::after { top: -65px; right: -65px; }
  .brand::after { right: -35px; }
  .main { align-items: start; padding-top: clamp(36px, 9vh, 78px); }
}
