/* The Animates admin panel. A work tool: plain, calm, readable.
   System fonts only. Nothing is loaded from anywhere else.
   This file is plain ASCII. */

:root {
  color-scheme: light;
  --page: #f4f5f7;
  --paper: #ffffff;
  --ink: #1b1f24;
  --soft: #55606e;
  --line: #d3d8df;
  --main: #1f4f8f;
  --main-ink: #ffffff;
  --bad: #9b1c1c;
  --bad-paper: #fdeceb;
  --good: #17603a;
  --good-paper: #e9f6ee;
  --note-paper: #eef2f8;
  --warn-paper: #fff4d6;
  --focus: #b45309;
}

* {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- top bar ---- */
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.6rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 650;
  margin-right: auto;
}

.signed-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  font-size: 0.9rem;
}

.who {
  overflow-wrap: anywhere;
}

.role {
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--note-paper);
}

.left {
  color: var(--soft);
}

.banner {
  margin: 0;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  border-bottom: 1px solid var(--line);
}

.banner.alert {
  background: var(--bad);
  color: #ffffff;
  font-weight: 600;
}

.banner.warning {
  background: var(--warn-paper);
}

/* ---- the screen ---- */
main {
  flex: 1;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.card {
  max-width: 34rem;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
}

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.25;
}

h1:focus {
  outline: none;
}

p {
  margin: 0 0 0.9rem;
}

.lead {
  color: var(--soft);
}

.small {
  font-size: 0.9rem;
  color: var(--soft);
  margin-bottom: 0.3rem;
}

.steps {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.steps li {
  margin-bottom: 0.4rem;
}

/* ---- forms ---- */
.row {
  margin-bottom: 0.9rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.box {
  display: block;
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--paper);
  padding: 0.55rem 0.65rem;
  border: 1px solid #8a94a3;
  border-radius: 6px;
}

#code {
  max-width: 11rem;
  font-size: 1.3rem;
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.1rem;
}

.button {
  font: inherit;
  cursor: pointer;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  border: 1px solid #8a94a3;
  background: var(--paper);
  color: var(--ink);
}

.button.main {
  background: var(--main);
  border-color: var(--main);
  color: var(--main-ink);
  font-weight: 600;
}

.button.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--main);
  text-decoration: underline;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Keyboard focus is always visible. */
.button:focus-visible,
.box:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- messages ---- */
.message {
  margin: 0.9rem 0;
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--note-paper);
}

.message.bad {
  background: var(--bad-paper);
  border-color: #e3aaa6;
  color: var(--bad);
}

.message.good {
  background: var(--good-paper);
  border-color: #a9d3b9;
  color: var(--good);
}

/* ---- the authenticator ---- */
.qr {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  margin-bottom: 0.9rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.picture {
  width: 14rem;
  height: 14rem;
  max-width: 100%;
}

.key,
.print {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
}

.key {
  font-size: 0.95rem;
}

.print {
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  margin: 0.4rem 0 1rem;
  user-select: all;
}

/* ---- what the server says ---- */
.facts {
  margin: 0 0 0.5rem;
}

.facts dt {
  color: var(--soft);
  font-size: 0.9rem;
}

.facts dd {
  margin: 0 0 0.7rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---- footer ---- */
footer {
  padding: 0.75rem 1rem 1.25rem;
  font-size: 0.8rem;
  color: var(--soft);
  text-align: center;
  overflow-wrap: anywhere;
}

footer details {
  margin-top: 0.3rem;
}

footer ul {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[hidden] {
  display: none !important;
}

@media (max-width: 30rem) {
  main {
    padding: 0.75rem 0.5rem 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .print {
    font-size: 1.6rem;
  }
}
.account {
  font-weight: 650;
  overflow-wrap: anywhere;
}

/* ---- the queue and a report ---- */
.card.wide {
  max-width: none;
}

h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1rem;
}

.part {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.actions.top {
  margin: 0 0 0.5rem;
}

.items,
.lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.item,
.line {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.item:first-child,
.line:first-child {
  border-top: 0;
}

.item p,
.line p {
  margin-bottom: 0.35rem;
}

.item .actions {
  margin-top: 0.5rem;
}

.reported-line {
  background: var(--warn-paper);
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  border-radius: 6px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

/* The panel's own labels. Never member-written text. */
.chip {
  display: inline-block;
  flex: none;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--note-paper);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  unicode-bidi: isolate;
  direction: ltr;
}

.chip.reported {
  background: var(--bad-paper);
  border-color: #e3aaa6;
  color: var(--bad);
}

.chip.other {
  background: #eef0f3;
}

.chip.urgent {
  background: var(--bad);
  border-color: var(--bad);
  color: #ffffff;
}

.chip.status {
  background: var(--paper);
}

/* Text someone else wrote. A box of its own, always left to right, wrapped
   inside itself, with its own scroll bar when it is very long: it cannot
   move, cover or imitate anything outside the box. */
.their {
  unicode-bidi: isolate;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-left: 4px solid #8a94a3;
  border-radius: 4px;
  contain: content;
}

.their.block {
  display: block;
  padding: 0.5rem 0.6rem;
  max-height: 16rem;
  overflow: auto;
}

.their.line {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  max-height: 4.5rem;
  overflow: auto;
  padding: 0.05rem 0.4rem;
}

.fact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.25rem 0.6rem;
  margin-bottom: 0.5rem;
  min-width: 0;
}

.fact > .their.block {
  flex: 1 1 100%;
  min-width: 0;
}

.fact .label {
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--soft);
  font-size: 0.9rem;
}

.fact .label::after {
  content: ":";
}

.none,
.empty {
  color: var(--soft);
  font-style: italic;
}

.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}

.photo {
  margin: 0;
  max-width: 18rem;
}

.photo .picture {
  width: 100%;
  height: auto;
  max-height: 24rem;
  object-fit: contain;
  background: #000000;
  border-radius: 6px;
  display: block;
}

.photo figcaption {
  font-size: 0.9rem;
  color: var(--soft);
  margin: 0.3rem 0;
}

.panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid var(--main);
  border-radius: 8px;
  background: var(--note-paper);
}

.panel h3 {
  margin-top: 0;
}

.sentence {
  font-weight: 650;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}

select.box,
textarea.box {
  max-width: 100%;
}

textarea.box {
  resize: vertical;
}

/* ---- the sections, serious actions, times ---- */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  padding: 0.3rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.time {
  white-space: nowrap;
}

.utc {
  color: var(--soft);
  font-size: 0.82em;
}

.group {
  margin-top: 0.9rem;
}

.group .actions {
  margin-top: 0.4rem;
}

.already {
  margin: 0 0 0.3rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--line);
  color: var(--soft);
}

/* Suspending, banning, locking: unmistakably not an everyday button. */
.button.serious {
  background: var(--paper);
  border: 2px solid var(--bad);
  color: var(--bad);
  font-weight: 650;
}

.panel.serious {
  border-color: var(--bad);
  background: var(--bad-paper);
}

.panel.serious .button.serious {
  background: var(--bad);
  color: #ffffff;
}

.item.log .what {
  font-weight: 600;
}

/* ---- the second press ---- */
.actions.first {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.sentence:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.tick {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.8rem 0 0.2rem;
}

.tick input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex: none;
}

.tick label {
  font-weight: 650;
  margin: 0;
}

.tick input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.mixed {
  color: var(--soft);
  font-size: 0.8rem;
}
