* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #eef2f6;
  color: #0a2342;
  line-height: 1.4;
}
.top {
  background: #0a2342;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 16px;
}
.top a, .top button.nav {
  color: #fff;
  background: transparent;
  border: 0;
  text-decoration: none;
  font: inherit;
  font-size: 0.95rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
}
.top a.brand, .top .brand { font-weight: 750; margin-right: 8px; }
.top a.primary, .top button.primary {
  background: #f26b1d;
  color: #fff;
  font-weight: 700;
}
.banner {
  background: #fff4e5;
  color: #0a2342;
  border-bottom: 3px solid #f26b1d;
  margin: 0;
  padding: 8px 16px;
  font-weight: 650;
}
main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 12px 16px 28px; }
h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1rem; margin: 0 0 8px; }
a { color: #0a2342; }
.metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.metric {
  background: #fff;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  padding: 8px 10px;
}
.metric b { display: block; font-size: 1.25rem; }
.metric span { display: block; font-size: 0.75rem; color: #5c6b7a; }
.metric.warn b { color: #8a4b08; }
.metric.safety b { color: #8d1d1d; }
.note { margin: 0 0 12px; color: #33485c; }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.surface {
  background: #fff;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  padding: 12px;
}
.list-scroll { max-height: min(68vh, 720px); overflow: auto; }
table.dense { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.dense th, table.dense td {
  text-align: left;
  padding: 5px 8px;
  border-bottom: 1px solid #e4ebf2;
  white-space: nowrap;
}
table.dense th { position: sticky; top: 0; background: #fff; }
table.dense tr.selected { background: #fff1e8; }
table.dense button {
  background: none;
  border: 0;
  padding: 0;
  min-height: 0;
  width: auto;
  color: #0a2342;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.work a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #e4ebf2;
  text-decoration: none;
}
.work a strong { display: block; }
.work a.safety strong { color: #8d1d1d; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.toolbar input[type="search"] { flex: 1; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
label { display: block; font-weight: 650; margin: 8px 0 4px; font-size: 0.9rem; }
input, select, textarea, button.action {
  width: 100%;
  font: inherit;
  font-size: 16px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #b7c5d4;
  border-radius: 8px;
  background: #fff;
  color: #0a2342;
}
textarea { min-height: 72px; }
button.action {
  width: auto;
  background: #0a2342;
  color: #fff;
  border-color: #0a2342;
  cursor: pointer;
  font-weight: 650;
}
button.quiet {
  width: auto;
  background: #fff;
  color: #0a2342;
  min-height: 40px;
  border: 1px solid #b7c5d4;
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
}
.hold { color: #8d1d1d; font-weight: 700; }
.fine { color: #5c6b7a; font-size: 0.85rem; }
.detail dt { font-weight: 700; margin-top: 8px; }
.detail dd { margin: 0; }
.detail label.field { display: grid; gap: 4px; margin-top: 8px; font-size: 0.78rem; font-weight: 700; color: #0a2342; }
.detail label.field input,
.detail label.field select,
.detail label.field textarea { font-weight: 450; }
.stamp-note { background: #f4f7fb; border: 1px solid #d5dee8; border-radius: 8px; padding: 8px; }
.cascade-panel { margin-bottom: 12px; }
.cascade-panel h2 { margin-bottom: 4px; }
.cascade-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cascade-card { border: 1px solid #d5dee8; border-radius: 10px; padding: 8px 10px; background: #f7f9fb; }
.cascade-card b { display: block; font-size: 1.15rem; }
.cascade-card .missing { color: #5c6b7a; }
.cascade-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.progress { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.progress div { background: #fff; border: 1px solid #d5dee8; border-radius: 10px; padding: 8px 10px; min-width: 108px; }
.progress b { display: block; font-size: 1.15rem; }
.progress span { color: #5c6b7a; font-size: 0.75rem; }
.choice { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0; }
.choice label { font-weight: 650; }
.ok-line { background: #e7f6ea; border: 1px solid #8fce9a; border-radius: 8px; padding: 8px 10px; }
.walk-error { background: #fff5f5; border: 1px solid #e3a3a3; border-radius: 8px; padding: 8px 10px; }
button.primary-save { background: #f26b1d; border-color: #c45512; margin-top: 12px; }
label.field { display: grid; gap: 4px; margin-top: 8px; font-size: 0.78rem; font-weight: 700; }
@media (max-width: 800px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .work-col { order: -1; }
  .filters { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cascade-grid { grid-template-columns: 1fr; }
}
