:root {
  color-scheme: light;
  --ink: #121214;
  --muted: #66707b;
  --page: #f5f6f7;
  --panel: #ffffff;
  --line: #d8dde3;
  --gold: #f5b13b;
  --cyan: #78d3db;
  --blue: #3144a0;
  --pink: #d91f63;
  --danger: #a12434;
  --ok: #1f6b49;
  --shadow: 0 24px 80px rgba(18, 18, 20, 0.13);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 246, 247, 0.96)),
    var(--page);
  color: var(--ink);
  font-family:
    Figtree,
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  height: 10px;
  background: linear-gradient(90deg, #303b98, #77d2da 33%, #f7b33b 67%, #d91f63);
  content: "";
}

button,
input {
  font: inherit;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 420px);
  gap: clamp(38px, 8vw, 112px);
  align-items: center;
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 78px);
}

.brand-stage {
  display: grid;
  justify-items: start;
  align-content: center;
}

.brand-logo {
  display: block;
  width: min(58vw, 560px);
  height: auto;
  margin-bottom: clamp(48px, 8vw, 88px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.4rem, 6.8vw, 6.4rem);
  font-weight: 800;
  line-height: 0.94;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
}

.brand-copy {
  max-width: 520px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.65;
}

.auth-panel {
  position: relative;
  width: 100%;
  padding: 28px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-panel::before {
  display: block;
  width: calc(100% + 56px);
  height: 7px;
  margin: -28px -28px 26px;
  background: linear-gradient(90deg, #303b98, #77d2da 33%, #f7b33b 67%, #d91f63);
  content: "";
}

.panel-heading {
  margin-bottom: 24px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  margin-bottom: 24px;
  background: #eef1f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.mode-tab.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 10px rgba(18, 18, 20, 0.08);
}

.auth-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #3f4852;
  font-size: 0.84rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(49, 68, 160, 0.12);
}

.primary-action,
.secondary-action,
.text-action {
  min-height: 48px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 850;
}

.primary-action {
  margin-top: 4px;
  border: 1px solid #111111;
  background: #111111;
  color: #ffffff;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.secondary-action {
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.text-action {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--blue);
}

.primary-action:disabled,
.secondary-action:disabled,
.text-action:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.status-line {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.status-line.is-error {
  color: var(--danger);
}

.status-line.is-ok {
  color: var(--ok);
}

.account-meta,
.holding-copy {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.holding-copy {
  color: var(--ink);
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
}

.is-hidden {
  display: none;
}

@media (max-width: 840px) {
  body::before {
    height: 8px;
  }

  .page-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 34px 22px;
  }

  .brand-stage {
    justify-items: center;
    text-align: center;
  }

  .brand-logo {
    width: min(84vw, 420px);
    margin-bottom: 34px;
  }

  .brand-copy {
    margin-top: 18px;
  }

  .auth-panel {
    max-width: 430px;
    margin: 0 auto;
    padding: 24px;
  }

  .auth-panel::before {
    width: calc(100% + 48px);
    margin: -24px -24px 24px;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 3.35rem;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
  }
}
