:root {
  font-family: Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color-scheme: light;
  --bg: #f2f5fa;
  --card: #fff;
  --ink: #1f2733;
  --muted: #4f5969;
  --line: #bec6d1;
  --edge: #dce2eb;
  --accent: #1b62c5;
  --action: #fff;
  --error: #b3261e;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101318;
  --card: #1c2027;
  --ink: #e4e9f2;
  --muted: #b6bfcd;
  --line: #555f70;
  --edge: #323a46;
  --accent: #a4c7ff;
  --action: #082d62;
  --error: #ffb4aa;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg);
  color: var(--ink);
}
main {
  width: min(848px, 100%);
  display: grid;
  grid-template-columns: 42% 58%;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 22px 70px -36px #11274755;
}
.cover {
  position: relative;
  isolation: isolate;
  min-height: 452px;
  color: white;
  background: #162743;
}
.landscape { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.brand { display: flex; align-items: center; gap: 11px; padding: 29px; font-size: 20px; letter-spacing: -.5px; font-weight: 550; }
section { padding: 56px clamp(28px, 4vw, 56px); align-self: center; }
h1 { margin: 0 0 32px; font-size: clamp(26px, 3vw, 33px); font-weight: 600; letter-spacing: -.055em; line-height: 1.25; }
label { display: block; color: var(--muted); font-size: 13px; font-weight: 550; margin: 20px 0 8px; }
input, button { font: inherit; }
input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
}
input:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.password { position: relative; }
.password input { padding-right: 50px; }
button { cursor: pointer; }
#visibility {
  position: absolute;
  top: 4px;
  right: 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  height: 38px;
  width: 40px;
  display: grid;
  place-items: center;
}
button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#visibility .slash { display: none; }
#visibility[aria-pressed="true"] .slash { display: block; }
#error { min-height: 21px; line-height: 1.5; margin: 9px 0 12px; color: var(--error); font-size: 13px; }
#submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
  color: var(--action);
  background: var(--accent);
}
#submit:hover { filter: brightness(.95); }
#submit:disabled { cursor: wait; opacity: .7; }

@media (max-width: 640px) {
  body { padding: 18px; }
  main { width: min(425px, 100%); grid-template-columns: 1fr; border-radius: 15px; }
  .cover { min-height: 114px; overflow: hidden; }
  .landscape { height: 230px; top: auto; bottom: -45px; }
  .brand { padding: 22px; }
  section { padding: 30px 24px 34px; }
  h1 { margin-bottom: 22px; }
}
