:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  background: #f5f6f8;
  color: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f6f8;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.login-panel {
  width: min(100%, 420px);
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  padding: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
}

p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.tab-button {
  height: 36px;
  border: 0;
  background: transparent;
  color: #6b7280;
}

.tab-button.active {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

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

.login-form.hidden {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
  background: #ffffff;
  color: #111827;
  outline: none;
}

input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

button {
  height: 42px;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

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

.primary-button:hover:not(:disabled) {
  background: #1e40af;
}

.secondary-button {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
}

.secondary-button:hover:not(:disabled) {
  background: #f9fafb;
}

.message {
  min-height: 20px;
  margin: 0;
  color: #b91c1c;
  font-size: 13px;
}

.message.success {
  color: #047857;
}

@media (max-width: 480px) {
  .login-panel {
    padding: 24px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
