* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.4 system-ui, sans-serif; color: #1c2430; background: #f3f5f8; }
h1, h2, h3 { margin: 0 0 8px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; margin-top: 16px; }
button { font: inherit; padding: 6px 12px; border: 1px solid #b9c2cf; border-radius: 6px; background: #fff; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: #1f5fbf; border-color: #1f5fbf; color: #fff; }
button.small { padding: 2px 8px; font-size: 13px; }
input, select { font: inherit; padding: 6px 8px; border: 1px solid #b9c2cf; border-radius: 6px; background: #fff; max-width: 100%; }
label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: #4a5568; margin-bottom: 8px; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
.card { background: #fff; border: 1px solid #dde3ea; border-radius: 10px; padding: 16px; }
.login { width: min(340px, 100% - 32px); margin: 10vh auto; }
.login button { width: 100%; }
header { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 8px 16px; background: #fff; border-bottom: 1px solid #dde3ea; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav button.on { background: #1f5fbf; border-color: #1f5fbf; color: #fff; }
.split { display: flex; height: calc(100vh - 53px); }
.side { width: 390px; overflow-y: auto; padding: 14px; background: #fff; border-right: 1px solid #dde3ea; }
.side.wide { width: 440px; }
.detail { flex: 1; overflow-y: auto; padding: 16px; }
.detail > * { max-width: 520px; }
.mapwrap { flex: 1; position: relative; }
#map { position: absolute; inset: 0; background: #e6e9ee; }
.mapnote { position: absolute; z-index: 1000; top: 10px; left: 50%; transform: translateX(-50%); background: #fff4d6; border: 1px solid #e2c268; border-radius: 6px; padding: 5px 12px; font-size: 13px; text-align: center; }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.row > input, .row > select, .row > label { flex: 1; min-width: 0; margin: 0; }
.item { display: block; width: 100%; text-align: left; margin-bottom: 6px; }
.item.on { border-color: #1f5fbf; background: #eaf1fc; }
.muted { color: #6b7686; font-size: 13px; }
.warn { background: #fff4d6; border: 1px solid #e2c268; border-radius: 6px; padding: 6px 10px; font-size: 13px; margin: 6px 0; }
ol.stops { list-style: none; padding: 0; margin: 0 0 8px; }
ol.stops li { display: grid; grid-template-columns: 26px 1fr 110px auto; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid #eef1f5; }
ol.stops .name { overflow-wrap: anywhere; cursor: pointer; }
.num, .pin span { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 50%; background: #1f5fbf; color: #fff; font-size: 12px; font-weight: 700; }
.pin span { border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); width: 28px; height: 28px; }
.pin.other span { width: 16px; height: 16px; background: #334155; }
.pin.new span { background: #c25a00; }
.popform { width: 220px; }
.popform input { width: 100%; margin-bottom: 6px; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 6px 4px; border-bottom: 1px solid #eef1f5; font-size: 14px; }
tr.click { cursor: pointer; }
tr.click:hover, tr.on { background: #eaf1fc; }
#toast { position: fixed; z-index: 2000; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1c2430; color: #fff; padding: 10px 18px; border-radius: 8px; max-width: calc(100% - 32px); }
#toast.bad { background: #a3271f; }
@media (max-width: 800px) {
  .split { flex-direction: column; height: auto; }
  .side, .side.wide { width: 100%; border-right: 0; }
  .mapwrap { height: 60vh; flex: none; order: -1; }
}
