:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #142926;
  background: #eef4f1;
  --muted: #526761;
  --edge: #d8e4de;
  --accent: #096650;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.topbar { background: #102d28; color: #f1faf5; }
.topbar-inner {
  max-width: 1120px; margin: auto; min-height: 72px; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 750; }
.brand small { display: block; color: #b1ccc0; font-size: .73rem; font-weight: 500; }
.mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 9px; color: #123e31; background: #b9ebca; font-size: 1.17rem;
}
nav, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
nav button { color: #f0f8f3; background: transparent; border-color: #31594d; }
nav button:hover, nav button[aria-current="page"] { background: #214d3f; }
main { max-width: 1120px; margin: 0 auto; padding: 43px 28px 56px; }
.page-title { margin-bottom: 26px; }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 6px; letter-spacing: -.055em; line-height: 1.1; }
h2 { font-size: 1.13rem; margin: 0 0 20px; letter-spacing: -.02em; }
p { line-height: 1.55; }
.muted { color: var(--muted); margin-top: 0; }
.card {
  padding: 24px; border: 1px solid var(--edge); border-radius: 14px; background: #fff;
  box-shadow: 0 2px 8px #0e302408;
}
.narrow { max-width: 470px; margin: 26px auto; padding: 31px; }
.narrow h1 { font-size: 2.3rem; margin-bottom: 20px; }
form, label { display: grid; gap: 8px; }
form { gap: 16px; }
label { color: #27463d; font-size: .9rem; font-weight: 650; }
input, button { font: inherit; }
input {
  min-width: 0; width: 100%; background: #fbfdfb; color: #142926;
  border: 1px solid #b9cdc4; border-radius: 7px; padding: 10px 12px; min-height: 42px;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #187c64; outline-offset: 3px; }
input:read-only { color: var(--muted); background: #f2f6f4; }
button {
  background: #f7faf8; color: #163a2c; border: 1px solid #c4d7ce;
  border-radius: 7px; min-height: 37px; padding: 7px 12px; cursor: pointer; font-weight: 650;
}
button:hover { background: #e9f5ed; }
button:disabled { cursor: wait; opacity: .65; }
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover { background: #075742; }
.narrow .primary { margin-top: 5px; }
.fields { display: grid; grid-template-columns: 1.45fr 1fr .48fr; gap: 14px; }
.form-note { font-size: .86rem; margin: -4px 0 0; }
.route-card { margin-top: 20px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .91rem; }
th { color: var(--muted); font-weight: 650; }
td, th { padding: 12px 10px; border-bottom: 1px solid #e8eeea; vertical-align: top; }
td:first-child, th:first-child { padding-left: 0; }
tr:last-child td { border-bottom: 0; }
td a { color: #075f4a; font-weight: 700; text-underline-offset: 3px; }
td .detail { max-width: 290px; margin-top: 5px; display: block; font-size: .8rem; }
.badge { display: inline-block; border-radius: 5px; padding: 4px 8px; font-size: .79rem; font-weight: 700; white-space: nowrap; background: #f1f3f1; color: #4c635a; }
.badge.active { color: #1a5b3d; background: #ddf4e5; }
.badge.error { color: #9a321d; background: #fcece5; }
td .actions { justify-content: flex-end; min-width: 98px; }
td button { min-height: 31px; padding: 4px 8px; font-size: .81rem; }
.danger { color: #8b3128; }
#notice { padding: 10px 13px; margin: 0 0 16px; border: 1px solid #c4ded0; border-radius: 8px; background: #e9f7ef; }
#notice.error { border-color: #efc7bc; background: #fff0eb; color: #7d2519; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 660px) {
  .topbar-inner, main { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 26px; }
  .card { padding: 17px; }
  .fields { grid-template-columns: 1fr 1fr; }
  .fields label:first-child { grid-column: 1 / -1; }
  nav button { min-height: 32px; padding: 4px 7px; font-size: .78rem; }
  td .actions { justify-content: flex-start; }
}
