/* TrendLis — Rotalar listesi + rota detay. */

.route-create {
  width: 100%; padding: 18px; background: transparent; border: 1px dashed var(--muted-2);
  border-radius: var(--r-lg); font-size: 14px; font-weight: 600; color: var(--indigo-600);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.route-create:hover { background: var(--surface); }

/* ---- Rota detay: harita + duraklar ---- */
.rt__layout { display: flex; flex-direction: column; }
.rt__map-wrap { position: relative; }
.rt__map { height: 52vh; min-height: 320px; background: var(--surface); z-index: 0; }
.rt__back { position: absolute; top: 14px; left: 14px; z-index: 500; background: #fff; }
.rt__map-legend { position: absolute; left: 14px; bottom: 14px; z-index: 500; background: #fff; border-radius: var(--r-pill); padding: 7px 14px; font-size: 13px; font-weight: 800; color: var(--ink); box-shadow: var(--shadow-md); }
.rt__side { padding: 20px 16px 32px; }
.rt__title { font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--ink); margin-top: 4px; }
@media (min-width: 1024px) {
  .rt__layout { flex-direction: row-reverse; height: calc(100vh - var(--header-h)); }
  .rt__map-wrap { flex: 1; }
  .rt__map { height: 100%; }
  .rt__side { width: 420px; flex-shrink: 0; overflow-y: auto; border-right: 1px solid var(--border); padding: 24px; }
  .rt__back { display: none; }
}

.rt__stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; background: var(--blue-50); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 4px; }
.rt__stat { text-align: center; min-width: 0; }
.rt__stat span { font-size: 15px; font-weight: 800; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.rt__stat small { font-size: 11px; color: var(--muted); margin-top: 2px; display: block; }
.rt__desc { margin-top: 14px; font-size: 14px; color: var(--text-soft); line-height: 1.55; }
.rt__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rt__h2 { font-size: 16px; font-weight: 800; margin: 22px 0 12px; }

.rt__timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.rt__timeline::before { content: ''; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: repeating-linear-gradient(var(--brand) 0 6px, transparent 6px 10px); opacity: .5; }
.rt__step { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 10px; margin-left: -10px; border-radius: var(--r-md); transition: background .15s; }
.rt__step.is-active { background: var(--brand-50); }
.rt__step-num { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; z-index: 1; display: flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 0 0 4px #fff; }
.rt__step.is-active .rt__step-num { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.rt__step-body { flex: 1; min-width: 0; padding-top: 2px; }
.rt__step-name { font-size: 15px; font-weight: 800; color: var(--ink); }
a.rt__step-name:hover { color: var(--brand-600); }
.rt__step-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rt__step-note { font-size: 12px; color: var(--text-soft); margin-top: 4px; }
.rt__step-show { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--brand-600); font-size: 12px; font-weight: 700; cursor: pointer; }
.rt__leg { position: relative; margin: 2px 0 2px 46px; font-size: 12px; font-weight: 600; color: var(--text-soft); }

/* Harita işaretçisi ve popup */
.rt-pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--ink); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); display: grid; place-items: center; transition: background .15s; }
.rt-pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 13px; font-family: var(--font-ui); }
.rt-pin.is-active { background: var(--brand); }
.rt-pop { width: 190px; display: flex; flex-direction: column; gap: 3px; font-family: var(--font-ui); }
.rt-pop img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.rt-pop strong { font-size: 14px; color: var(--ink); }
.rt-pop span { font-size: 12px; color: var(--text-soft); }
.rt-pop a { margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--brand-600); }

/* Rota yönetimi (/rotalarim) */
.rm-layout { display: grid; gap: 24px; margin-top: 18px; }
@media (min-width: 960px) { .rm-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.rm-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.rm-card h2 { font-size: 20px; color: var(--ink); margin: 0 0 14px; }
.rm-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.rm-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rm-stop { display: flex; gap: 12px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); }
.rm-stop__no { width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.rm-stop__body { flex: 1; min-width: 0; }
.rm-stop__name { font-weight: 600; font-size: 14px; color: var(--ink); }
.rm-stop__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rm-stop__actions { display: flex; gap: 4px; }
.rm-stop__actions form { margin: 0; }
.rm-icon-btn { border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; color: var(--ink-soft); font-size: 14px; }
.rm-icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.rm-icon-btn:disabled { opacity: .35; cursor: default; }
.rm-search { display: flex; gap: 8px; }
.rm-search input { flex: 1; min-width: 0; }
.rm-results { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.rm-result { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); font-size: 13px; }
.rm-result form { margin: 0; }
.rm-danger { color: #b91c1c; }
