/* Styles for the OrdiBot admin page, served as /admin.css. Edit this to change
   colours, sizes or spacing; texts and layout are in ../pages.ts.
   Colours are set once here; the dark block below is used when the phone or
   computer is in dark mode. */
:root {
  --bg: #f6f7f9;
  --card: #fff;
  --text: #1b1f24;
  --muted: #5f6b7a;
  --line: #e3e6ea;
  --accent: #1f7a4d;
  --warn: #d4a20b;
  --danger: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --card: #1a1e23;
    --text: #e8eaed;
    --muted: #9aa4b0;
    --line: #2b3138;
    --accent: #3fb37a;
    --danger: #f07167;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.45 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    sans-serif;
}
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
h1 {
  font-size: 22px;
  margin: 0 0 16px;
}
h2 {
  font-size: 17px;
  margin: 0 0 12px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.err {
  color: var(--danger);
  margin: 0 0 12px;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 14px;
}

/* Forms */
input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  flex: 1;
  min-width: 140px;
}
button {
  font: inherit;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button.link {
  background: none;
  color: var(--danger);
  padding: 6px 8px;
}

/* Tables of people */
table {
  width: 100%;
  border-collapse: collapse;
}
td {
  padding: 10px 4px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* WhatsApp status box (shown in a frame that refreshes itself) */
.status-frame {
  border: 0;
  width: 100%;
  height: 440px;
}
.status-frame.connected {
  height: 60px;
}
body.frame {
  background: var(--card);
}
body.frame main {
  padding: 0;
}
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot.ok {
  background: var(--accent);
}
.dot.waiting {
  background: var(--warn);
}
.dot.bad {
  background: var(--danger);
}
.qr {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  width: min(280px, 100%);
}
.qr svg {
  display: block;
  width: 100%;
  height: auto;
}
