:root {
  color-scheme: light;
  --page: #f0eee7;
  --surface: #ffffff;
  --ink: #161616;
  --ink-soft: #4a4f5c;
  --ink-muted: #6f7380;
  --line: #e4e2f2;
  --line-strong: #d7d7f0;
  --primary: #4e47dd;
  --primary-dark: #332da8;
  --primary-soft: #eff0fe;
  --danger: #b7285a;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--page);
}

button, input { font: inherit; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(410px, 1.08fr);
  width: min(100%, 1000px);
  min-height: 620px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgb(30 28 70 / 12%);
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 34px;
  color: #fff;
  background: #25244b;
  background-image: linear-gradient(145deg, #25244b 0%, #343276 58%, #4e47dd 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-ring {
  width: 28px;
  height: 28px;
  flex: none;
  border: 3px dotted currentColor;
  border-radius: 50%;
}

.brand-name { display: grid; gap: 2px; }
.brand-name strong { font-size: 19px; font-weight: 600; line-height: 1; }
.brand-name small { color: rgb(255 255 255 / 68%); font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase; }

.brand-copy { max-width: 390px; margin-block: 70px; }
.eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; }
.brand-copy .eyebrow { color: #c7c5ff; text-transform: uppercase; }
.brand-copy h1 { margin: 18px 0 14px; font-size: 38px; font-weight: 600; line-height: 1.12; }
.brand-copy p { max-width: 32ch; margin: 0; color: rgb(255 255 255 / 78%); font-size: 15px; line-height: 1.6; }

.brand-foot, .form-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .8px;
}

.brand-foot { color: rgb(255 255 255 / 62%); }

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 38px 52px 26px;
}

.mobile-brand { display: none; }
.form-wrap { width: 100%; max-width: 360px; margin: auto; }
.form-eyebrow { color: var(--primary); font-weight: 500; }
.form-wrap h2 { margin: 13px 0 5px; font-size: 30px; font-weight: 600; line-height: 1.2; }
.intro { margin: 0 0 30px; color: var(--ink-soft); font-size: 14px; }

form { display: grid; gap: 9px; }
form label { margin-top: 5px; font-size: 12px; font-weight: 600; }
input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  outline: none;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(78 71 221 / 14%); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 62px; }
.reveal {
  position: absolute;
  top: 0;
  right: 3px;
  height: 100%;
  padding: 0 10px;
  color: var(--primary);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.reveal:focus-visible, .submit:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.submit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  margin-top: 14px;
  padding: 0 15px;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease;
}
.submit:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.submit:disabled { opacity: .7; cursor: wait; }
.submit span { font-size: 18px; font-weight: 400; }

.error { margin: 3px 0 0; color: var(--danger); font-size: 12px; }
.notice { margin: 24px 0 0; padding: 10px 12px; color: var(--ink-soft); background: var(--primary-soft); border-left: 3px solid var(--primary); font-size: 11px; line-height: 1.5; }
.form-foot { margin-top: 35px; color: var(--ink-muted); }

@media (max-width: 720px) {
  body { padding: 0; background: var(--surface); }
  .login-shell { display: block; width: 100%; min-height: 100vh; border: 0; box-shadow: none; }
  .brand-panel { display: none; }
  .form-panel { min-height: 100vh; padding: 22px 24px 20px; }
  .mobile-brand { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; color: var(--primary); }
  .mobile-brand .brand-name small { color: var(--ink-muted); }
  .form-wrap { max-width: 440px; margin: auto; padding-block: 44px; }
  .form-foot { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}