:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --card: #fffdf9;
  --ink: #1d1a16;
  --muted: #6f675e;
  --line: #e3dbd0;
  --accent: #0c6b52;
  --accent-ink: #f7fffb;
  --danger: #8d2d2d;
  --ok: #0c6b52;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, sans-serif;
}

button, input {
  font: inherit;
}

main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.lede, .hint, .status p {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-top: 16px;
}

.login {
  width: min(420px, 100%);
  margin: 12vh auto 0;
}

label {
  display: block;
  margin: 12px 0;
}

label span, .field-head {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

input[type="text"], input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
}

.check input { width: auto; }

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row input { flex: 1; }

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.link {
  background: transparent;
  color: var(--accent);
  padding: 4px 0;
}

.error { color: var(--danger); }
.ok { color: var(--ok); }

.chats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chats button {
  background: #efeae2;
  color: var(--ink);
}

.head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; font-size: 13px; }

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

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .head { align-items: flex-start; flex-direction: column; }
}
