/* The team server's admin page, in TaskOverflow's colors; light or dark with the system. */
:root {
  --bg: #eceef1;
  --panel: #ffffff;
  --panel-2: #f6f7f9;
  --line: #dde1e6;
  --line-2: #c9ced6;
  --fg: #171b22;
  --muted: #5a6270;
  --accent: #2f62c8;
  --accent-ink: #ffffff;
  --accent-soft: #e3ebfa;
  --done: #2d8a50;
  --warn: #9a6514;
  --late: #c43a2f;
  --late-soft: #fbe9e7;
  --shadow: 0 1px 2px rgba(20, 24, 32, 0.06), 0 4px 14px rgba(20, 24, 32, 0.07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #16191f;
    --panel-2: #1a1e25;
    --line: #272c35;
    --line-2: #343b47;
    --fg: #e6e8ec;
    --muted: #a0a7b2;
    --accent: #6f9df2;
    --accent-ink: #0d1017;
    --accent-soft: #1d2b45;
    --done: #4fbb73;
    --warn: #e2a64a;
    --late: #f0695d;
    --late-soft: #2c1816;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
/* Hidden means hidden, whatever display a class gives. */
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    400 14px/1.45 'Segoe UI',
    system-ui,
    sans-serif;
}
#app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
h1 {
  margin: 0;
  font-size: 24px;
}
h2 {
  margin: 0;
  font-size: 16px;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.mono {
  font-family: 'Cascadia Mono', Consolas, ui-monospace, monospace;
  font-size: 0.92em;
}
.row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.grow {
  flex: 1 1 auto;
  min-width: 0;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
}

/* Cards and sections */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.narrow {
  max-width: 460px;
  width: 100%;
  margin: 8vh auto 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.stat b {
  display: block;
  font-size: 20px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--done);
}
.dot.warn {
  background: var(--warn);
}

/* Forms */
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
input,
select {
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 7px 10px;
  min-height: 36px;
}
input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
button {
  font: inherit;
  font-weight: 600;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--fg);
  cursor: pointer;
}
button:hover {
  border-color: var(--muted);
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
button.danger {
  color: var(--late);
}
button.link {
  border: 0;
  background: none;
  padding: 0 4px;
  min-height: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}
form.row {
  align-items: flex-end;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.error {
  background: var(--late-soft);
  color: var(--late);
  border-radius: 8px;
  padding: 8px 10px;
}
.note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.code {
  font-family: 'Cascadia Mono', Consolas, ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow-wrap: anywhere;
}

/* Tables */
.table {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 8px;
}
td {
  padding: 9px 8px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td.actions {
  text-align: right;
  white-space: nowrap;
}
td.actions button + button {
  margin-left: 6px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.off {
  background: var(--late-soft);
  color: var(--late);
}
.sub {
  background: var(--panel-2);
}
.sub td {
  border-top: 0;
}
.sub .inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 8px;
}
