:root {
  --bg: #f4f2ee;
  --card: #ffffff;
  --ink: #1c1a17;
  --muted: #6b665e;
  --line: #e3dfd8;
  --accent: #1c1a17;
  --accent-ink: #ffffff;
  --error: #9b2c2c;
  --error-bg: #fbeaea;
  --notice: #4a5b3f;
  --notice-bg: #eef3ea;
  --ok: #2f6b3a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --card: #1f1d1a;
    --ink: #f1ede6;
    --muted: #a39d93;
    --line: #35322d;
    --accent: #f1ede6;
    --accent-ink: #161513;
    --error: #f2a1a1;
    --error-bg: #3a1f1f;
    --notice: #b9cfae;
    --notice-bg: #212a1d;
    --ok: #9fd3a8;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, "PingFang SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 32px 32px;
}
.card.wide { max-width: 720px; }

.brand {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
h2 { margin: 32px 0 10px; font-size: 15px; font-weight: 600; color: var(--muted); }
.sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type="password"], input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  outline: none;
}
input[type="password"]:focus, input[type="text"]:focus { border-color: var(--ink); }

button {
  margin-top: 16px;
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  width: auto;
  padding: 9px 16px;
  margin-top: 24px;
}
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.error, .notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.error  { color: var(--error);  background: var(--error-bg); }
.notice { color: var(--notice); background: var(--notice-bg); }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
td.ok  { color: var(--ok); }
td.bad { color: var(--error); }
form.inline { display: inline; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 4px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
button.full { width: 100%; margin-top: 12px; }
button.small { padding: 5px 10px; font-size: 13px; margin-top: 0; }
.row { display: flex; gap: 10px; align-items: stretch; margin-top: 12px; flex-wrap: wrap; }
.row input[type="text"] { flex: 1 1 220px; }
.row button { width: auto; margin-top: 0; }
[hidden] { display: none !important; }
