@import url("/design-system/theme.css");

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background-base);
  color: var(--text-main);
  font-family: var(--font-ui);
}

button, input { font: inherit; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(480px, 1.1fr);
  min-height: 100vh;
}

.brand-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 5vw, 72px);
  overflow: hidden;
  border-right: 3px solid var(--border-color-heavy);
  background-color: var(--background-pane);
  background-image: radial-gradient(var(--line-soft) 1.25px, transparent 1.25px);
  background-size: 22px 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-lockup img { object-fit: contain; }
.eyebrow, .step { margin: 0 0 14px; color: var(--text-accent); font-family: var(--font-code); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { margin: 0; max-width: 720px; font-size: clamp(46px, 6vw, 88px); line-height: 0.93; letter-spacing: -0.055em; }
.brand-copy { max-width: 520px; margin: 28px 0 0; color: var(--text-muted); font-size: clamp(17px, 1.7vw, 22px); line-height: 1.45; }
.theme-status { display: flex; align-items: center; gap: 10px; margin: 32px 0 0; color: var(--text-muted); font-family: var(--font-code); font-size: 12px; }
.theme-status > span:first-child { width: 10px; height: 10px; background: var(--accent-green); border: 1px solid var(--border-color-heavy); }

.form-pane { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(100%, 480px); padding: clamp(28px, 5vw, 52px); border: 3px solid var(--border-color-heavy); background: var(--background-pane); box-shadow: var(--shadow-hard); }
h2 { margin: 0; font-size: clamp(36px, 5vw, 54px); line-height: 1; letter-spacing: -0.04em; }
.intro { margin: 16px 0 34px; color: var(--text-muted); line-height: 1.5; }
form { display: grid; gap: 22px; }
label { display: grid; gap: 8px; font-weight: 700; }
label span { font-size: 13px; }
input { width: 100%; min-height: 50px; padding: 10px 13px; border: 2px solid var(--border-color-heavy); border-radius: 0; background: var(--background-input); color: var(--text-main); }
input:focus { outline: 3px solid var(--accent-green); outline-offset: 2px; background: var(--background-input-focus); }
button { min-height: 50px; padding: 10px 16px; border: 2px solid var(--border-color-heavy); border-radius: 0; background: var(--background-pane); color: var(--text-main); font-weight: 800; cursor: pointer; box-shadow: 4px 4px 0 var(--shadow-color); }
button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow-color); }
button.primary { display: flex; justify-content: space-between; align-items: center; border-color: var(--accent-green); background: var(--accent-green); color: var(--text-inverse); }
button:disabled { cursor: wait; opacity: 0.65; }
button.quiet { box-shadow: none; }
button.text-button { min-height: auto; padding: 0; border: 0; background: transparent; color: var(--text-accent); box-shadow: none; text-align: left; }
button.text-button:hover { transform: none; text-decoration: underline; }
.form-explanation { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.message { margin: 22px 0 0; padding: 12px; border: 2px solid var(--red); color: var(--red); font-weight: 700; }
[data-theme="dark"] .message { color: var(--red); border-color: var(--red); }
.help { margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: 13px; line-height: 1.5; }

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .brand-pane { min-height: 42vh; border-right: 0; border-bottom: 3px solid var(--border-color-heavy); }
  .theme-status { margin-bottom: 0; }
  .form-pane { padding: 24px 18px 40px; }
}

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