/* AED Secured brand: navy, red, white. Approved prototype design language:
   clean white surfaces, generous spacing, comfortable form fields. */
:root {
  --navy: #0f2a4a;
  --red: #c8102e;
  --ink: #1c2733;
  --muted: #5a6a7a;
  --line: #d9e1e8;
  --bg: #f4f7fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.site-header {
  background: #ffffff;
  border-bottom: 3px solid var(--red);
  padding: 18px 24px;
}

.logo { height: 56px; width: auto; display: block; }

.card {
  background: #ffffff;
  max-width: 760px;
  margin: 40px auto;
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.card h1 { color: var(--navy); margin-top: 0; font-size: 28px; line-height: 1.3; }
.card p { font-size: 17px; line-height: 1.6; }
.muted { color: var(--muted); }

.site-footer {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page { max-width: 980px; margin: 0 auto; padding: 24px 16px 8px; }
.card.wide { max-width: 940px; }
.card.narrow { max-width: 520px; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.main-nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 15px; }
.main-nav a:hover { text-decoration: underline; }
.nav-user { color: var(--muted); font-size: 14px; }
.inline-form { display: inline; }
.link-button { background: none; border: none; color: var(--red); font-weight: 600; cursor: pointer; font-size: 15px; padding: 0; }

.stack-form { display: grid; gap: 14px; }
.stack-form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.stack-form label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.stack-form input, .stack-form select, .stack-form textarea,
.filter-row input, .filter-row select {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--ink); width: 100%;
}
.stack-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 18px; display: grid; gap: 12px; }
.stack-form legend { font-weight: 700; color: var(--navy); padding: 0 6px; }

.primary-button, .secondary-button {
  display: inline-block; padding: 11px 20px; border-radius: 6px; font-weight: 700;
  font-size: 15px; text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.primary-button { background: var(--red); color: #fff; }
.secondary-button { background: #fff; color: var(--navy); border-color: var(--navy); }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; }

.error { background: #fdeef0; border: 1px solid var(--red); color: #7a0c20; padding: 10px 14px; border-radius: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: grid; gap: 2px; background: #fff; }
.stat-num { font-size: 28px; font-weight: 800; color: var(--navy); }
.stat.ok .stat-num { color: #1d7a3a; }
.stat.warn .stat-num { color: #b26a00; }
.stat.bad .stat-num { color: var(--red); }

.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { color: var(--navy); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; text-transform: capitalize; background: #eef2f6; color: var(--navy); }
.badge-ready { background: #e3f4e8; color: #1d7a3a; }
.badge-corrective_action_required { background: #fdf0dc; color: #8a5200; }
.badge-not_ready, .badge-out_of_service { background: #fdeef0; color: #7a0c20; }

.detail-list { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; }
.detail-list dt { font-weight: 700; color: var(--navy); }
.detail-list dd { margin: 0; }

.plain-list { padding-left: 18px; line-height: 1.7; }
.form-section { color: var(--navy); border-bottom: 2px solid var(--red); padding-bottom: 4px; margin-top: 26px; }
.form-subsection { color: var(--navy); margin-top: 18px; }
.question { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 8px; background: #fff; }
.question-text { margin: 0; font-size: 16px; }
.answer-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.radio-pill:has(input:checked) { border-color: var(--navy); background: #eef3f9; }
.inline-label { font-weight: 400; font-size: 14px; }
.answer-line { margin: 4px 0; line-height: 1.55; }
.answer-fail { background: #fdeef0; border-radius: 6px; padding: 6px 8px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.filter-row label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.add-site { margin-top: 18px; }
.small { font-size: 13px; }
