html {
  color-scheme: dark;
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e6edf3;
  background: #0d1117;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(47, 129, 247, 0.55);
  outline-offset: 2px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 5vw, 32px);
  background: rgba(13, 17, 23, 0.92);
  border-bottom: 1px solid #30363d;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
  color: #f0f6fc;
}

.page {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.auth-shell {
  display: flex;
  justify-content: center;
  width: 100%;
}

.panel,
.auth-panel {
  width: 100%;
  max-width: 420px;
  border: 1px solid #30363d;
  border-radius: 12px;
  background: #161b22;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.panel {
  padding: 24px;
}

.auth-panel {
  padding: 24px 20px;
}

.auth-brand {
  margin: 0 0 6px;
  color: #8b949e;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin: 0 0 8px;
  color: #f0f6fc;
  font-size: 24px;
  line-height: 1.2;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: #8b949e;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label,
.checkbox-label {
  color: #e6edf3;
  font-size: 14px;
  font-weight: 650;
}

.field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #f0f6fc;
  background: #21262d;
  font: inherit;
}

.field input::placeholder {
  color: #8b949e;
}

.checkbox-label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  line-height: 1.35;
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #2f81f7;
}

.checkbox-label span {
  display: block;
}

.button-primary,
.button-secondary,
.oauth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button-primary {
  border: 1px solid #2f81f7;
  color: #ffffff;
  background: #2f81f7;
}

.button-secondary,
.oauth-button {
  border: 1px solid #30363d;
  color: #f0f6fc;
  background: #21262d;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
  color: #8b949e;
  font-size: 14px;
  text-align: center;
}

.oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.form-message,
.validation-summary-errors {
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.validation-summary-errors {
  border: 1px solid rgba(248, 81, 73, 0.35);
  color: #ffa198;
  background: rgba(248, 81, 73, 0.12);
}

.field-validation-error {
  color: #ffa198;
  font-size: 13px;
}

.legal-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.footer {
  padding: 24px 16px;
  color: #8b949e;
  text-align: center;
}

@media (min-width: 640px) {
  .page {
    padding-top: 48px;
  }

  .auth-panel {
    padding: 30px 28px;
  }
}
