/* Deadset — minimal stylesheet, no framework, no web fonts, no icon library.
   Mobile-first single column. Worker-facing screens must satisfy: 48x48px
   touch targets, 18px+ body text, WCAG AA contrast, readable in sunlight. */

:root {
  --ink: #111111;
  --bg: #ffffff;
  --muted: #4d4d4d;
  --line: #cfcfcf;
  --accent: #0a5c36;      /* dark green, AA-contrast on white */
  --danger-bg: #fff1f0;
  --danger-ink: #7a0000;
  --danger-border: #c62828;
  --ok-bg: #eef8f1;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 20px 0 8px; }
p { margin: 0 0 12px; }

a { color: var(--accent); }

.org-header {
  font-size: 15px;
  color: var(--muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.doc-dates {
  font-weight: 600;
  margin: 8px 0 16px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
}

.badge-overdue {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border: 2px solid var(--danger-border);
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.badge--warning {          /* orange: needs attention (same values as fleet.css) */
  background: #FCEADB;
  color: var(--ink);
  border: 2px solid #E2670A;
}

.btn {
  display: block;
  width: 100%;
  min-height: 56px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  padding: 14px 16px;
  margin: 12px 0;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

.btn:active { opacity: 0.85; }

.btn-secondary {
  background: #ffffff;
  color: var(--accent);
  border: 2px solid var(--accent);
}

input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 48px;
  font-size: 18px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  margin: 6px 0 16px;
}

label { font-weight: 600; display: block; margin-top: 12px; }

/* Default (admin/denser screens): smaller table text is fine, these are
   not worker-facing acceptance-criteria screens. The worker page below
   overrides this back up to the 18px body-text minimum. */
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

/* Worker-facing screens (brief UI acceptance criteria): body text, which
   includes table cells and the "muted" footnote text, must be >=18px. */
body.page-worker table { font-size: 18px; }
body.page-worker .muted { font-size: 18px; }

.hazard-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
}

.hazard-block .controls { margin-top: 6px; color: var(--muted); }

.finding {
  border-left: 4px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-ink);
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 4px;
  font-size: 15px;
}

.muted { color: var(--muted); font-size: 15px; }

nav.admin-nav a {
  display: inline-block;
  margin-right: 16px;
  font-size: 16px;
}

.field-blank { color: var(--danger-ink); font-style: italic; }

/* Share and Download pair (records PDF). */
.share-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.share-row .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.share-note { min-height: 1.4em; margin: 0; font-weight: 600; }
