:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #1f4e79;
  --accent-dark: #163b5c;
  --success: #0f766e;
  --danger: #b42318;
  --warning: #b54708;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--accent); }
.site-header {
  background: var(--accent);
  color: white;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header h1 { margin: 4px 0 0; font-size: 26px; }
.county { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; opacity: .9; }
.site-header nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-header a, .site-header .link-button { color: white; text-decoration: none; font-weight: 700; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.inline { display: inline; }
.container { width: min(1180px, 94vw); margin: 28px auto; }
.footer { text-align: center; color: var(--muted); padding: 30px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  margin-bottom: 18px;
}
.narrow { max-width: 480px; margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.prewrap { white-space: pre-wrap; line-height: 1.5; }
.flash {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  background: #eef4ff;
  border: 1px solid #b2ccff;
}
.flash.success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.flash.error { background: #fef3f2; border-color: #fecdca; color: var(--danger); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.full { grid-column: 1 / -1; }
.stacked { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid #c8ced8;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}
textarea { resize: vertical; }
.help { color: var(--muted); font-size: 13px; font-weight: normal; }
button, .button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
}
button:hover, .button:hover { background: var(--accent-dark); }
.button.secondary, a.button.secondary {
  background: #eef2f6;
  color: var(--ink);
  border: 1px solid var(--line);
}
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.success-box { text-align: center; max-width: 680px; margin: 0 auto; }
.request-number { font-size: 34px; font-weight: 800; color: var(--accent); margin: 18px 0; }
.dashboard-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 18px; }
.dashboard-header h2 { margin: 0 0 4px; }
.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.stat strong { display: block; font-size: 26px; color: var(--accent); }
.stat span { color: var(--muted); font-size: 13px; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto auto; gap: 10px; align-items: center; }
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  background: #eef4ff;
  color: var(--accent);
  font-weight: 700;
}
.pill.large { font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.detail-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.timeline { margin-top: 18px; display: grid; gap: 12px; }
.timeline.compact { gap: 8px; }
.timeline-item { border-left: 3px solid var(--line); padding-left: 12px; }
.timeline-item p { margin: 6px 0 0; }
.simple-list { padding-left: 18px; }
.simple-list li { margin-bottom: 8px; }
.print-body { background: white; }
.print-summary { max-width: 850px; margin: 30px auto; background: white; color: black; }
@media (max-width: 900px) {
  .site-header, .dashboard-header { flex-direction: column; align-items: flex-start; }
  .form-grid, .detail-grid, .filters, .stats { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .footer, .actions { display: none; }
  body { background: white; }
  .card { box-shadow: none; border: 0; }
}
