/* Plain CSS for both screens (ADR 0019). There is no build step: this file is
   served exactly as written. */

/* The vendored Burmese font. unicode-range limits it to Myanmar script, so the
   English admin pages only fetch it when Burmese text appears on them. */
@font-face {
  font-family: "Noto Sans Myanmar";
  src: url("../fonts/NotoSansMyanmar-v2.107-wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F, U+200C-200D, U+25CC;
}

:root {
  --ink: #1b1b1f;
  --muted: #5f6368;
  --paper: #fafafa;
}

html {
  font-family: system-ui, "Segoe UI", Roboto, "Noto Sans Myanmar", sans-serif;
  line-height: 1.6;
}

/* Burmese needs taller lines: stacked medials and tone marks sit above and
   below the base letters. */
html[lang="my"] {
  font-family: "Noto Sans Myanmar", system-ui, sans-serif;
  line-height: 1.9;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Forms and messages on the staff screens (ticket 03). */
h2 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
}

.field {
  margin: 0 0 1rem;
}

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

input[type="text"],
input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 24rem;
  padding: 0.5rem 0.6rem;
  font: inherit;
  border: 1px solid #9aa0a6;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

input:focus {
  outline: 2px solid #1a73e8;
  outline-offset: 1px;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

button,
.button-link {
  display: inline-block;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: #1a4fd8;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button-link:hover {
  background: #163fae;
}

.box {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin: 0 0 1.5rem;
}

.error {
  background: #fdecea;
  color: #8a1c13;
  border: 1px solid #f5c2bd;
}

.notice {
  background: #e6f4ea;
  color: #1e4620;
  border: 1px solid #b7dfc0;
}

/* The QR is drawn one pixel per module and enlarged here; crisp edges keep
   every module square for the phone camera. */
.qr img {
  display: block;
  background: #fff;
  padding: 0.5rem;
  border: 1px solid #dadce0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1.5rem 0;
}

.actions form {
  margin: 0;
}

table.audit {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}

table.audit th,
table.audit td {
  text-align: left;
  vertical-align: top;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

table.audit tr.outcome-refused td,
table.audit tr.outcome-rate_limited td {
  background: #fff8f7;
}

/* The audit table is wider than the reading column. */
.page:has(table.audit) {
  max-width: 80rem;
}

/* The Servers screens (ticket 05). */
.page:has(table.servers),
.page:has(table.facts) {
  max-width: 80rem;
}

table.facts {
  border-collapse: collapse;
  margin: 0 0 1rem;
}

table.facts th,
table.facts td {
  text-align: left;
  vertical-align: top;
  padding: 0.3rem 0.75rem 0.3rem 0;
  border-bottom: 1px solid #e0e0e0;
}

table.facts th {
  font-weight: 600;
  white-space: nowrap;
}

table.servers tr.online td:nth-child(2) {
  color: #1e4620;
  font-weight: 600;
}

table.servers tr.status-revoked td {
  color: var(--muted);
}

p.status {
  font-weight: 600;
  margin: 0 0 1rem;
}

p.status-revoked {
  color: var(--muted);
}

/* The one-line enrollment command: a read-only box that selects itself on a
   tap, so it copies whole on a phone. */
textarea.command {
  box-sizing: border-box;
  width: 100%;
  font: 0.85rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 0.6rem;
  border: 1px solid #9aa0a6;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  word-break: break-all;
}

button.danger {
  background: #b3261e;
}

button.danger:hover {
  background: #8a1c13;
}

.inline-form {
  margin: 0 0 1.5rem;
}
