:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --line: #d9e3df;
  --text: #16211e;
  --muted: #66736f;
  --accent: #167962;
  --accent-strong: #0f5e4b;
  --accent-soft: #e6f4ef;
  --danger: #b83d3d;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 760px);
  gap: 18px;
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  align-items: center;
}

.login-side,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.login-side {
  display: grid;
  gap: 18px;
  min-height: 560px;
  padding: 26px;
  align-content: start;
}

.login-brand {
  width: fit-content;
  font-size: 26px;
  font-weight: 900;
}

.login-side h1 {
  margin: 64px 0 0;
  font-size: 42px;
  line-height: 1.12;
}

.login-side p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-shortcuts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
}

.login-shortcuts a,
.login-tabs button,
.form-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.login-shortcuts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 800;
}

.login-panel {
  display: grid;
  gap: 18px;
  min-height: 560px;
  padding: 24px;
}

.login-tabs,
.form-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-tabs button,
.form-tabs button {
  padding: 0 16px;
  font-weight: 800;
}

.login-tabs button.is-active,
.form-tabs button.is-active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.login-tab-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.login-tab-panel.is-hidden {
  display: none;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

label.wide {
  grid-column: 1 / -1;
}

input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.primary-button {
  justify-self: start;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 900;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.login-status {
  align-self: end;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfdfc;
  line-height: 1.5;
}

.login-status.is-error {
  color: var(--danger);
  border-color: rgba(184, 61, 61, 0.28);
  background: #fff4f4;
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 16px 0;
  }

  .login-side {
    min-height: auto;
  }

  .login-side h1 {
    margin-top: 18px;
  }

  .login-panel {
    min-height: auto;
  }

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