:root {
  color-scheme: light;
  --ink: #171512;
  --paper: #f4efe6;
  --paper-deep: #e7ddcf;
  --accent: #b8432f;
  --muted: #6f675d;
  --line: rgba(23, 21, 18, 0.2);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.admin-shell {
  display: grid;
  min-height: 100dvh;
}

.brand-panel,
.login-panel {
  padding: max(1.5rem, env(safe-area-inset-top)) max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
}

.brand-panel {
  display: grid;
  min-height: 44dvh;
  grid-template-rows: auto 1fr auto;
  gap: 3rem;
  color: var(--paper);
  background: var(--ink);
}

.wordmark {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 0.82;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark span:last-child {
  color: #dc644f;
}

.brand-copy {
  align-self: center;
  max-width: 40rem;
}

.eyebrow,
.section-number,
.environment,
.notice,
.login-panel footer {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: #dc644f;
  font-weight: 700;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(2.8rem, 10vw, 6.6rem);
  line-height: 0.94;
}

.brand-copy > p:last-child {
  max-width: 33rem;
  margin: 1.5rem 0 0;
  color: rgba(244, 239, 230, 0.68);
  font-size: 1rem;
  line-height: 1.65;
}

.environment {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: rgba(244, 239, 230, 0.6);
}

.environment span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #dc644f;
}

.login-panel {
  display: grid;
  min-height: 56dvh;
  grid-template-rows: 1fr auto;
  border-top: 1px solid var(--line);
}

.login-wrap {
  width: min(100%, 29rem);
  align-self: center;
  justify-self: center;
  padding: 3.5rem 0;
}

.section-number {
  margin: 0 0 1rem;
  color: var(--accent);
  font-weight: 700;
}

h2 {
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 4.2rem);
  line-height: 1;
}

.login-wrap header > p:last-child {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

form {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.field {
  display: grid;
  gap: 0.65rem;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  transition: border-color 160ms ease;
}

input::placeholder {
  color: #9a9288;
}

input:focus {
  border-color: var(--accent);
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.form-message {
  margin: -0.25rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
  color: #7d281a;
  background: rgba(184, 67, 47, 0.08);
  font-size: 0.88rem;
  line-height: 1.5;
}

.form-message[hidden] {
  display: none;
}

.submit-button {
  display: flex;
  min-height: 3.7rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--ink);
  color: var(--paper);
  background: var(--ink);
  cursor: pointer;
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  color: var(--ink);
  background: transparent;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.notice {
  margin: 1.35rem 0 0;
  color: var(--muted);
}

.login-panel footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (min-width: 900px) {
  .admin-shell {
    grid-template-columns: minmax(0, 1.08fr) minmax(28rem, 0.92fr);
  }

  .brand-panel,
  .login-panel {
    min-height: 100dvh;
    padding-right: max(2.5rem, env(safe-area-inset-right));
    padding-left: max(2.5rem, env(safe-area-inset-left));
  }

  .login-panel {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (max-width: 420px) {
  .login-panel footer span {
    display: none;
  }

  .login-panel footer {
    justify-content: flex-end;
  }
}

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