/* RouteMap v1.2 — SalesOS navy/gold, phone-first. The mileage log leads;
   the route planner sits below it under "Plan a route". */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f6f7fa; color: #14213d; line-height: 1.45;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 14px 14px 28px; }
.top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 22px; color: #0a1f44; }
.brand span { color: #b8912a; }
.brand-mark {
  background: #0a1f44; color: #d4af37; font-weight: 800; font-size: 14px;
  border-radius: 9px; padding: 7px 8px; letter-spacing: .5px;
}
.free-pill {
  background: #0a1f44; color: #fff; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 12px; letter-spacing: .6px;
}
.benefit { margin: 8px 0 12px; font-size: 15px; color: #33415c; }
.card {
  background: #fff; border: 1px solid #e2e6ee; border-radius: 14px;
  padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(10, 31, 68, .05);
}
.card-title { font-size: 16px; margin: 0 0 6px; color: #0a1f44; }
.card-sub { margin: 0 0 8px; font-size: 13px; color: #5a6a86; }
.count { color: #b8912a; font-weight: 700; }
input[type="text"], input[type="date"], input[type="number"], select {
  width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid #c6cede;
  border-radius: 10px; background: #fbfcfe; color: #14213d; font-family: inherit;
}
input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus, select:focus { outline: 2px solid #d4af37; border-color: #d4af37; background: #fff; }
.fld { display: block; margin-bottom: 10px; }
.fld span { display: block; font-size: 13px; font-weight: 600; color: #33415c; margin-bottom: 4px; }
.fld em { font-weight: 400; color: #8296b3; font-style: normal; }
.btn {
  display: inline-block; text-align: center; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; border-radius: 10px; padding: 12px 16px;
  text-decoration: none; font-family: inherit;
}
.btn-gold { background: #d4af37; color: #0a1f44; }
.btn-navy { background: #0a1f44; color: #fff; }
.btn-ghost { background: transparent; color: #5a6a86; border: 1px solid #c6cede; }
.btn-small { padding: 7px 12px; font-size: 13px; }
.btn.disabled { opacity: .38; pointer-events: none; }
.route-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.route-btns .btn { flex: 1 1 200px; }
.micro { margin: 10px 0 0; font-size: 13px; color: #33415c; }
.hint { margin: 6px 0 0; font-size: 13px; color: #8296b3; }
.form-btns { display: flex; gap: 10px; margin-top: 2px; }
.hidden { display: none !important; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-head .card-title { margin: 0; }
.empty { margin: 8px 0 2px; font-size: 14px; color: #5a6a86; }
.stop-list { list-style: none; margin: 10px 0 0; padding: 0; }
.stop {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-top: 1px solid #edf0f5;
}
.stop:first-child { border-top: none; }
.stop.editing { background: #fdf6e0; border-radius: 8px; }
.stop-num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: #0a1f44; color: #d4af37; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.stop-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.stop-body strong { font-size: 15px; color: #0a1f44; overflow-wrap: anywhere; }
.stop-addr { font-size: 13px; color: #5a6a86; overflow-wrap: anywhere; }
.stop-time { font-size: 13px; color: #b8912a; font-weight: 700; }
.stop-ctrls { flex: 0 0 auto; display: flex; gap: 5px; }
.mini {
  border: 1px solid #c6cede; background: #fff; color: #33415c; border-radius: 8px;
  font-size: 13px; font-weight: 700; padding: 6px 9px; cursor: pointer; font-family: inherit;
}
.mini:disabled { opacity: .3; cursor: default; }
.foot { text-align: center; font-size: 12.5px; color: #8296b3; margin-top: 6px; }
.plan-heading { font-size: 20px; color: #0a1f44; margin: 22px 2px 2px; }
.plan-sub { margin: 0 2px 12px; font-size: 13.5px; color: #5a6a86; }
.totals-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: 2px 0 14px; }
.total-stat {
  flex: 1 1 140px; background: #0a1f44; border-radius: 12px; padding: 10px 14px;
}
.total-num { display: block; font-size: 24px; font-weight: 800; color: #d4af37; line-height: 1.15; }
.total-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #dbe4f2; margin-top: 2px; }
.totals-est { flex: 1 1 100%; margin: 0; font-size: 13px; color: #5a6a86; }
.quick-add { background: #fdf8e7; border: 1px solid #eadfae; border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.quick-add .fld { margin-bottom: 8px; }
.trip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trip-grid .fld { min-width: 0; }
.photo-field { margin: 2px 0 12px; }
.photo-label { display: block; font-size: 13px; font-weight: 600; color: #33415c; margin-bottom: 5px; }
.photo-button { display: inline-block; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-preview { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; }
.photo-preview img, .trip-photo { display: block; max-width: 220px; width: auto; max-height: 160px; border-radius: 10px; border: 1px solid #d9dee8; object-fit: contain; background: #eef1f6; }
.trip-main-btn { width: 100%; }
.active-trip { border-top: 1px solid #edf0f5; padding-top: 12px; }
.active-label { margin: 0; color: #b8912a; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.active-summary { margin: 4px 0 2px; color: #0a1f44; font-size: 16px; font-weight: 750; }
.active-trip .trip-photo { margin: 8px 0 12px; }
.warning { background: #fff3f2; border: 1px solid #e5aaa4; color: #8c241c; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.confirm-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #8c241c; margin: 8px 0 12px; }
.confirm-line input { margin-top: 3px; }
.trip-log-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #edf0f5; margin-top: 16px; padding-top: 14px; }
.trip-log-head h3 { margin: 0; color: #0a1f44; font-size: 15px; }
.trip-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.trip-list { margin-top: 6px; }
.trip-row { border-top: 1px solid #edf0f5; padding: 11px 0; }
.trip-row:first-child { border-top: none; }
.trip-row-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.trip-row-title { color: #0a1f44; font-size: 15px; }
.trip-row-sub { color: #5a6a86; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.trip-row-btns { display: flex; gap: 5px; flex: 0 0 auto; }
.trip-details { margin: 10px 0 2px 36px; color: #33415c; font-size: 14px; }
.trip-details p { margin: 5px 0; }
.trip-details ol { margin: 6px 0 10px; padding-left: 22px; }
.trip-photo-pair { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.trip-photo-figure { margin: 0; }
.trip-photo-figure figcaption { font-size: 12.5px; font-weight: 700; color: #5a6a86; margin-bottom: 4px; }
.foot-feedback { display: flex; justify-content: center; margin-bottom: 2px; }
.ao-fb { text-align: left; }
.ao-fb-link { background: none; border: 0; color: #5a6a86; opacity: .85; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 2px; text-decoration: underline; font-family: inherit; }
.ao-fb-panel { background: #fff; color: #14213d; border: 1.5px solid #c8ccd4; border-radius: 12px; padding: 12px; width: min(340px, 88vw); margin: 6px auto 0; box-shadow: 0 8px 24px rgba(10,31,68,.12); }
.ao-fb-panel label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 4px; color: #0a1f44; text-align: left; }
.ao-fb-panel textarea, .ao-fb-panel input { width: 100%; box-sizing: border-box; padding: 10px; border: 1.5px solid #c8ccd4; border-radius: 10px; font-size: 15px; font-family: inherit; margin: 0 0 8px; }
.ao-fb-send { background: #d4af37; color: #0a1f44; border: 0; font-weight: 800; padding: 10px 18px; border-radius: 999px; cursor: pointer; font-size: 14px; font-family: inherit; }
.ao-fb-send[disabled] { opacity: .55; }
.ao-fb-err { color: #b3261e; font-size: 13px; min-height: 16px; margin: 0 0 6px; }
.ao-fb-done { font-size: 14px; font-weight: 700; color: #0a1f44; margin: 2px 0; }
.trip-print-report { display: none; }
@media (max-width: 560px) {
  .trip-grid { grid-template-columns: 1fr; gap: 0; }
  .trip-log-head { align-items: flex-start; flex-direction: column; }
  .trip-actions { justify-content: flex-start; }
  .trip-details { margin-left: 0; }
}
@media print {
  body { background: #fff; }
  .wrap { display: none !important; }
  .trip-print-report { display: block !important; color: #111; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding: 24px; }
  .trip-print-report h1 { font-size: 24px; margin: 0 0 4px; }
  .trip-print-report .print-sub { color: #444; margin: 0 0 14px; }
  .print-summary { border: 2px solid #222; border-radius: 4px; padding: 12px 16px; margin: 0 0 18px; }
  .print-summary h2 { font-size: 16px; margin: 0 0 6px; }
  .print-summary p { margin: 4px 0; }
  .print-trip { border-top: 2px solid #222; padding: 16px 0 20px; page-break-inside: avoid; }
  .print-trip h2 { font-size: 17px; margin: 0 0 6px; }
  .print-trip p { margin: 4px 0; }
  .print-trip ol { margin: 6px 0 10px; }
  .print-photos { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
  .print-photos figure { margin: 0; }
  .print-photos img { max-width: 300px; max-height: 230px; object-fit: contain; border: 1px solid #bbb; }
  .print-photos figcaption { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
}
@media (min-width: 900px) {
  .wrap { padding-top: 26px; }
  .brand { font-size: 26px; }
  .benefit { font-size: 16.5px; }
}
