:root {
  color-scheme: light;
  --ink: #12233f;
  --muted: #63738b;
  --paper: #f4f7fb;
  --panel: #ffffff;
  --line: #cdd8e7;
  --blue: #1d5fae;
  --blue-deep: #174b87;
  --focus: #f0a43a;
  --error: #a72d3d;
  font-family: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(29, 95, 174, .06) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 1.15fr) minmax(20rem, .85fr);
  width: min(62rem, calc(100% - 3rem));
  min-height: 34rem;
  margin: clamp(2rem, 8vh, 6rem) auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 1.25rem 3rem rgba(26, 52, 88, .12);
}

.identity {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 6vw, 4.5rem);
  color: #fff;
  background: var(--ink);
}

.track {
  position: absolute;
  top: 3rem;
  right: 3rem;
  left: 3rem;
  display: grid;
  gap: .55rem;
}

.track i {
  display: block;
  height: .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
}

.track i:nth-child(1) { width: 92%; }
.track i:nth-child(2) { width: 67%; }
.track i:nth-child(3) { width: 81%; background: #4d9cf1; }
.track i:nth-child(4) { width: 54%; }
.track i:nth-child(5) { width: 73%; }

.product {
  margin: 0 0 .8rem;
  color: #9fcafa;
  font-weight: 700;
  letter-spacing: .03em;
}

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 12ch; margin-bottom: 1.25rem; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.045em; }
h2 { margin-bottom: .55rem; font-size: 1.65rem; letter-spacing: -.025em; }
h3 { margin-bottom: .35rem; font-size: 1.05rem; letter-spacing: -.01em; }
.summary { max-width: 34rem; margin-bottom: 0; color: #c9d8ec; line-height: 1.7; }

.panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: clamp(2rem, 6vw, 4.5rem);
}

.hint { margin-bottom: 0; color: var(--muted); line-height: 1.6; }
code { font-size: .9em; }

form { display: grid; gap: .7rem; }
label { margin-top: .45rem; font-size: .92rem; font-weight: 700; }

input,
select {
  width: 100%;
  height: 3rem;
  padding: 0 .9rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #aab9cc;
  border-radius: .55rem;
  font: inherit;
}

button {
  min-height: 3rem;
  margin-top: .75rem;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: .55rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: var(--blue-deep); }
input:focus-visible,
select:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.error {
  margin: 0;
  padding: .8rem 1rem;
  color: var(--error);
  background: #fff1f3;
  border-left: 4px solid var(--error);
  line-height: 1.5;
}

.tenant-panel { gap: 1.25rem; }

.workspace-choice {
  display: grid;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  background: #f5f9ff;
  border: 1px solid #c6d8ed;
  border-left: 4px solid var(--blue);
  border-radius: .75rem;
}

.workspace-choice-heading .hint { font-size: .92rem; }
.choice-kicker {
  margin-bottom: .35rem;
  color: var(--blue-deep);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.tenant-form label { margin-top: 0; }
.tenant-form .hint { font-size: .9rem; }

.manual-entry {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.manual-entry summary {
  padding: 1rem .1rem;
  color: var(--blue-deep);
  font-weight: 700;
  cursor: pointer;
}

.manual-entry summary:hover { color: var(--blue); }
.manual-entry[open] summary { padding-bottom: .8rem; }
.manual-entry-body { padding: 0 0 1.15rem 1.15rem; }
.manual-entry-body > .hint { margin-bottom: 1rem; font-size: .9rem; }

button.button-secondary {
  color: var(--blue-deep);
  background: transparent;
  border: 1px solid #aabbd0;
}

button.button-secondary:hover { background: #eef4fb; }

.catalog-status {
  margin-bottom: 0;
  padding: .75rem .9rem;
  color: var(--muted);
  background: #f7f9fc;
  border-left: 3px solid var(--line);
  line-height: 1.55;
}

.direct-entry > .hint { margin-bottom: -.1rem; }

.logout-form {
  justify-items: start;
  margin-top: -.25rem;
}

.logout-form button {
  min-height: 2.75rem;
  margin-top: 0;
  padding: .55rem .15rem;
  color: var(--muted);
  background: transparent;
}

.logout-form button:hover { color: var(--blue-deep); background: transparent; }

@media (max-width: 44rem) {
  .auth-shell { grid-template-columns: 1fr; width: min(100% - 1.25rem, 32rem); margin: .625rem auto; }
  .identity { min-height: 16rem; padding: 2rem; }
  .track { top: 2rem; right: 2rem; left: 2rem; }
  .panel { padding: 2rem; }
  .workspace-choice { padding: 1rem; }
  .manual-entry-body { padding-left: 0; }
  h1 { margin-bottom: .8rem; font-size: 2.4rem; }
}

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