/* Shared palette follows the System Six board concept presentation. */
:root {
  color-scheme: light;
  --ink: #222226;
  --text: #222226;
  --muted: #5d6269;
  --paper: #f4f5f7;
  --surface: #ffffff;
  --line: #dadde1;
  --brand: #ca1f30;
  --green: #1f8b59;
  --green-soft: #e8f7ef;
  --amber: #a4660e;
  --amber-soft: #fff6e2;
  --red: #b4192a;
  --red-soft: #fcebed;
  --blue: #2d6bad;
  --blue-soft: #e9f1fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-family: Aptos, Arial, Helvetica, sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f5;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}
.tag.issue { background: var(--amber-soft); color: var(--amber); }
.tag.open { background: var(--red-soft); color: var(--red); }
.tag.done { background: var(--green-soft); color: var(--green); }
.tag.info { background: var(--blue-soft); color: var(--blue); }

.primary-button, .ghost-button, .text-button, .danger-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.primary-button { background: var(--brand); border-color: var(--brand); color: white; }
.primary-button:disabled, .text-button:disabled, .ghost-button:disabled { opacity: 0.45; cursor: not-allowed; }
.text-button { border: 0; background: transparent; }
.danger-button { border-color: var(--red); color: var(--red); }

.field-label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

/* Password, email and phone fields too (v0.8.36): the driver's PIN box and the office
   login's password box were left as bare browser fields. */
input[type="text"], input[type="date"], input[type="password"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}
textarea { min-height: 80px; }

dialog {
  width: min(92vw, 460px);
  border: 0;
  border-radius: 12px;
  padding: 0;
}
dialog::backdrop { background: rgba(16, 24, 32, 0.56); }
.dialog-card { padding: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.toast-host {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 14px;
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 50;
}
.toast {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(16, 24, 32, 0.25);
}
.toast.error { background: var(--red); }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eee;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .thumb-status {
  position: absolute;
  left: 3px;
  bottom: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.75);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signature-pad {
  width: 100%;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  touch-action: none;
  display: block;
}

/* The staging copy's warning bar (showEnvironmentBanner in shared/dom.mjs). */
.env-banner {
  position: sticky;
  top: 0;
  z-index: 2000;
  padding: 6px 12px;
  background: repeating-linear-gradient(135deg, #f5b400 0 14px, #ffcf3f 14px 28px);
  color: #111;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.01em;
}
