:root {
  color-scheme: light;
  --bg: #eef2f1;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --text: #17201d;
  --muted: #64716c;
  --line: #d9e1de;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --rose: #9f1239;
  --rose-soft: #fff1f2;
  --ink: #24312c;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.auth-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.auth-card,
.admin-shell {
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(23, 32, 29, 0.1);
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

p,
.muted,
.status-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-form,
.admin-form,
.user-row {
  display: grid;
  gap: 12px;
}

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

input,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: 0;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

button,
.ghost-link {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  color: #fff;
}

button.primary:hover {
  background: var(--accent-strong);
}

button.ghost,
.ghost-link {
  display: inline-grid;
  place-items: center;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  text-decoration: none;
}

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

.status-line.error {
  border: 1px solid rgba(159, 18, 57, 0.26);
  border-radius: 8px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 10px 12px;
}

.admin-page {
  min-height: 100dvh;
  padding: 24px;
}

.admin-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 22px;
}

.admin-topbar,
.user-head,
.user-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-form {
  grid-template-columns: 1.2fr 1.2fr 0.8fr auto;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .admin-form,
  .admin-topbar,
  .user-head,
  .user-actions {
    display: grid;
  }
}
