:root {
  color-scheme: light;
  --auth-bg: #edf4f7;
  --auth-panel: #ffffff;
  --auth-ink: #17232f;
  --auth-muted: #62717e;
  --auth-line: #cedde4;
  --auth-brand: #007f82;
  --auth-brand-dark: #075d65;
  --auth-accent: #b23a66;
  --auth-danger: #b4232f;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--auth-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.auth-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 32px 20px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.auth-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-ink);
  font-size: 1.05rem;
  font-weight: 850;
  text-decoration: none;
}

.auth-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-layout {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  align-items: center;
  gap: clamp(48px, 9vw, 120px);
  padding: 56px 56px 72px;
}

.auth-context {
  max-width: 520px;
}

.auth-eyebrow {
  margin: 0 0 14px;
  color: var(--auth-brand);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-context h1 {
  margin: 0;
  color: var(--auth-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.2rem;
  font-weight: 500;
  line-height: 0.95;
}

.auth-context > p:not(.auth-eyebrow) {
  margin: 22px 0 0;
  color: var(--auth-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.auth-signal {
  width: min(430px, 100%);
  height: 82px;
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--auth-line);
  border-bottom: 1px solid var(--auth-line);
}

.auth-signal span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-brand);
  box-shadow: 0 0 0 5px rgba(0, 127, 130, 0.1);
}

.auth-signal span:nth-child(3n) {
  background: var(--auth-accent);
  box-shadow: 0 0 0 5px rgba(178, 58, 102, 0.1);
}

.auth-panel {
  width: 100%;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: var(--auth-panel);
  padding: 34px;
  box-shadow: 0 22px 54px rgba(28, 59, 76, 0.12);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--auth-line);
  border-radius: 7px;
  background: #f2f6f8;
  padding: 4px;
}

.auth-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--auth-muted);
  cursor: pointer;
  font-weight: 750;
}

.auth-tabs button.active {
  background: #ffffff;
  color: var(--auth-brand-dark);
  box-shadow: 0 2px 8px rgba(35, 69, 85, 0.1);
}

.auth-heading {
  margin: 30px 0 24px;
}

.auth-heading p {
  margin: 0 0 6px;
  color: var(--auth-brand);
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-heading h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.25;
}

#auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field > span:first-child {
  color: #344552;
  font-size: 0.86rem;
  font-weight: 750;
}

.auth-field input {
  width: 100%;
  height: 46px;
  border: 1px solid #bdcdd5;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  color: var(--auth-ink);
  padding: 0 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input:focus {
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(0, 127, 130, 0.13);
}

.auth-field input::placeholder {
  color: #92a0aa;
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 62px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--auth-brand-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}

.auth-hint {
  margin: -5px 0 0;
  color: var(--auth-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.auth-message {
  min-height: 20px;
  margin: -2px 0;
  color: var(--auth-danger);
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-message.success {
  color: var(--auth-brand-dark);
}

.auth-submit {
  width: 100%;
  height: 47px;
  border: 0;
  border-radius: 6px;
  background: var(--auth-brand-dark);
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  transition: background 150ms ease, transform 150ms ease;
}

.auth-submit:hover {
  background: #004c54;
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.auth-footer {
  border-top: 1px solid var(--auth-line);
  color: var(--auth-muted);
  font-size: 0.75rem;
  padding-top: 15px;
}

@media (max-width: 800px) {
  .auth-shell {
    padding: 22px 18px 16px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 42px 0;
  }

  .auth-context h1 {
    font-size: 3.15rem;
  }

  .auth-context > p:not(.auth-eyebrow) {
    margin-top: 14px;
  }

  .auth-signal {
    display: none;
  }

  .auth-panel {
    padding: 26px 22px;
  }
}

@media (max-width: 390px) {
  .auth-panel {
    padding: 22px 16px;
  }
}
