:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --muted:#6b7280;
  --border:#e5e7eb;
  --brand:#2563eb;
  --brand-d:#1e40af;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,sans-serif;
  background:var(--bg);
  color:#111827;
}
.container{max-width:980px;margin:auto;padding:20px}

.topbar{
  background:linear-gradient(135deg,#6ea8ff,#d48bff);
  color:#fff;
  padding:24px 0 16px;
}
.app-title{margin:0}
.vtag{font-weight:600;font-size:.85em;opacity:.9}
.tagline{margin:.25rem 0 0;opacity:.9}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:16px;
  margin:16px 0;
  box-shadow:0 1px 3px rgba(0,0,0,.04);
}
h2{margin:.25rem 0 12px}
h3{margin:12px 0 8px}

.label{display:block;margin:6px 0 6px;font-size:.9rem;color:#374151}
.hint{margin-top:8px;color:var(--muted);font-size:.9rem}
.muted{color:var(--muted)}
.small{font-size:.9rem}
.center{text-align:center}
.actions-right{display:flex;align-items:flex-end;justify-content:flex-end;height:100%}

input,select,button{
  font:inherit;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  width:100%;
  background:#fff;
}
input:focus,select:focus,button:focus{outline:2px solid #93c5fd;outline-offset:1px}

.btn{
  background:#eef2ff;
  color:#111827;
  border-color:#c7d2fe;
  cursor:pointer;
  width:auto;
}
.btn-primary{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}
.btn-primary:hover{background:var(--brand-d);border-color:var(--brand-d)}
.spacer-10{height:10px}

.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
@media (max-width:720px){
  .grid-2,.grid-3{grid-template-columns:1fr}
}

#map{height:420px;border-radius:12px;border:1px solid var(--border)}

/* Autocomplete */
.ac-wrapper{position:relative}
.ac-list{
  position:absolute;left:0;right:0;top:100%;
  background:#fff;border:1px solid var(--border);
  border-radius:8px;margin-top:4px;z-index:50;display:none;
  max-height:220px;overflow:auto;
}
.ac-item{padding:8px 10px;cursor:pointer}
.ac-item:hover,.ac-item.active{background:#eef2ff}

#stops .stop-item{
  display:flex;gap:10px;align-items:center;margin:8px 0;
}
#stops .stop-item > span{min-width:64px;color:#374151}
#stops .stop-item .remove-stop{
  width:auto;background:#fee2e2;border-color:#fecaca;color:#7f1d1d;
}

/* Stats */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:10px 0 6px}
.stat{background:#f9fafb;border:1px solid var(--border);border-radius:10px;padding:14px;text-align:center}
.stat-value{font-size:28px;font-weight:800;color:var(--brand)}
.stat-label{color:var(--muted);font-size:.9rem}

/* Table */
.table-wrap{overflow:auto}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px 8px;border-bottom:1px solid var(--border);text-align:left}
.table th.num,.table td.num{width:44px;text-align:right}

/* POIs list */
.poi-list{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}
.poi-card{
  border:1px solid var(--border);border-radius:10px;background:#fff;padding:10px;
  box-shadow:0 1px 2px rgba(0,0,0,.03);
}
.poi-title{font-weight:700}
.poi-sub{color:var(--muted)}
@media (max-width:720px){
  .poi-list{grid-template-columns:1fr}
}
