:root {
  color-scheme: light;
  --ink: #1f2d3d;
  --soft-ink: #516276;
  --line: #cfd9e6;
  --paper: #ffffff;
  --bg-a: #fff8ee;
  --bg-b: #eef7f5;
  --green: #1f8b5f;
  --green-strong: #166b47;
  --blue: #2f6bb2;
  --danger: #a92d43;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", "Trebuchet MS", sans-serif;
  background:
    linear-gradient(140deg, var(--bg-a) 0%, #f3f9ff 48%, var(--bg-b) 100%);
}

.auth-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 28px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 22px;
  align-items: stretch;
}

.welcome-panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
}

.welcome-panel {
  padding: 32px;
  background:
    linear-gradient(145deg, rgba(47, 107, 178, 0.11), rgba(31, 139, 95, 0.08) 60%, rgba(255, 255, 255, 0.95));
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 13px 24px;
  border: 2px solid #b9cee7;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(47, 107, 178, 0.14), rgba(31, 139, 95, 0.16));
  color: #1c456d;
  box-shadow: 0 12px 26px rgba(31, 45, 61, 0.14);
  text-transform: uppercase;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  line-height: 1;
}

.site-name-icon {
  width: clamp(28px, 1em, 58px);
  height: clamp(28px, 1em, 58px);
  flex: 0 0 auto;
  border-radius: 11px;
  box-shadow: 0 8px 16px rgba(19, 40, 64, 0.28);
}

.site-name-text {
  display: inline-block;
  line-height: 0.98;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-strong);
  text-transform: uppercase;
  font-size: 0.82rem;
  font-weight: 800;
}

h1 {
  margin: 0 0 14px;
  font-size: 3.1rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.lede {
  margin: 0 0 18px;
  max-width: 640px;
  color: var(--soft-ink);
  font-size: 1.06rem;
  line-height: 1.58;
}

.benefit-list {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.benefit-list li {
  position: relative;
  padding-left: 24px;
  font-weight: 700;
  color: #2d4156;
}

.benefit-list li::before {
  position: absolute;
  top: 0.34em;
  left: 0;
  width: 11px;
  height: 7px;
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
  content: "";
  transform: rotate(-45deg);
}

.context-card {
  width: min(300px, 100%);
  padding: 14px 16px;
  border: 1px solid #c5d6ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.context-label {
  margin: 0;
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.context-plan {
  margin: 6px 0 0;
  font-size: 1.32rem;
  font-weight: 800;
}

.form-panel {
  padding: 22px;
  display: grid;
  align-content: start;
}

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #e8eff7;
  border: 1px solid #d1dce8;
  border-radius: 8px;
}

.mode-btn {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3a4d62;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mode-btn.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(31, 45, 61, 0.12);
}

.status {
  margin: 12px 0 0;
  min-height: 22px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-strong);
}

.auth-form {
  display: none;
  gap: 10px;
  margin-top: 4px;
}

.auth-form.is-visible {
  display: grid;
}

.auth-form h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

label {
  display: grid;
  gap: 6px;
  color: #2f4255;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #b9c7d8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input:focus,
select:focus {
  outline: 2px solid rgba(47, 107, 178, 0.3);
  border-color: var(--blue);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-toggle {
  min-width: 62px;
  padding: 0 10px;
  border: 1px solid #b7c4d5;
  border-radius: 8px;
  background: #fff;
  color: #2d4156;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inline-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.inline-row input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.inline-row span {
  color: #32475b;
  font-size: 0.9rem;
  font-weight: 700;
}

.submit-btn {
  min-height: 46px;
  border: 1px solid #19754f;
  border-radius: 8px;
  background: linear-gradient(180deg, #249667 0%, #1c7e56 100%);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

.form-footer {
  margin: 14px 0 0;
  text-align: center;
}

.form-footer a {
  color: #305170;
  font-weight: 700;
}

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

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 24px));
  }

  h1 {
    font-size: 2.5rem;
  }

  .site-name {
    font-size: 1.86rem;
    padding: 11px 18px;
  }
}

@media (max-width: 560px) {
  .auth-shell {
    width: min(100% - 16px, 470px);
    padding: 18px 0;
  }

  .welcome-panel,
  .form-panel {
    padding: 18px;
  }

  h1 {
    font-size: 2.1rem;
  }

  .site-name {
    font-size: 1.48rem;
    padding: 9px 15px;
  }
}
