/* Светлая тема — база, тёмная переопределяет только цвета. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #16181d;
  --dim: #6b7280;
  --line: #e3e6ea;
  --accent: #2f6df6;
  --accent-ink: #ffffff;
  --tg: #2aabee;
  --red: #e0453c;
  --amber: #d8920b;
  --green: #1f9d55;
  --shadow: 0 1px 2px rgba(16,20,30,.06), 0 8px 24px rgba(16,20,30,.07);
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --card: #171a20;
    --ink: #e9ecf1;
    --dim: #97a0ae;
    --line: #272c35;
    --accent: #5b8cff;
    --accent-ink: #0b0d11;
    --red: #ff6a60;
    --amber: #ffb428;
    --green: #46c07a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

main.center {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 380px;
  padding: 30px 26px 26px;
  text-align: center;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin: 0 0 4px;
}
.brand em { font-style: normal; color: var(--accent); }
.tagline { color: var(--dim); font-size: 13.5px; margin: 0 0 22px; }

.glyph { font-size: 34px; line-height: 1; margin-bottom: 14px; }
h1.title { font-size: 17px; font-weight: 650; margin: 0 0 8px; }
p.note { color: var(--dim); font-size: 13.5px; margin: 0 0 6px; }
p.fine { color: var(--dim); font-size: 12px; margin: 18px 0 0; }
p.err { color: var(--red); font-size: 13px; margin: 12px 0 0; min-height: 18px; }

button.tg {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--tg);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button.tg:hover { filter: brightness(1.06); }
button.tg:disabled { opacity: .55; cursor: default; }

#tg-widget { display: flex; justify-content: center; min-height: 42px; }

.people { display: grid; gap: 8px; margin: 16px 0 4px; }
button.person {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
button.person:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
button.person[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 600; }
button.person .role { margin-left: auto; font-size: 12px; color: var(--dim); }

button.primary {
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}
button.primary:disabled { opacity: .45; cursor: default; }

button.ghost {
  margin-top: 12px;
  border: 0;
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }

/* временная заглушка рабочего места */
.stub { max-width: 520px; text-align: left; }
.stub h1 { font-size: 20px; margin: 0 0 6px; }
.stub .who { color: var(--dim); font-size: 13.5px; margin: 0 0 18px; }
.stub ol { margin: 0; padding-left: 20px; color: var(--dim); font-size: 14px; }
.stub li { margin: 5px 0; }
.stub li.now { color: var(--ink); font-weight: 600; }

/* ── демо-панель ─────────────────────────────────────────────────────────── */
#dev {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 50;
  font-size: 13px;
}
#dev-toggle {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--dim);
  border-radius: 20px;
  padding: 6px 13px;
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}
#dev-body {
  margin-top: 8px;
  width: 232px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 12px;
}
#dev-body[hidden] { display: none !important; }
.dev-h { margin: 0 0 7px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); }
.dev-h span { text-transform: none; letter-spacing: 0; opacity: .7; }
.dev-h:not(:first-child) { margin-top: 14px; }
#dev-people button, #dev-pending button {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 12.5px;
  cursor: pointer; margin-bottom: 5px;
}
#dev-people button:hover, #dev-pending button:hover { border-color: var(--accent); }
.dev-empty { color: var(--dim); font-size: 12.5px; }
.dev-link { border: 0; background: none; color: var(--dim); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; padding: 8px 0 0; }
