/* ==========================================================================
   ROTAS DOS PONTOS
   - Planejamento de bairros/produtos
   - Fila de visitas
   - Botão de imprimir rota
   - Modo de visita assistida
   - Mapa do percurso
   - Botões de subir/descer/remover cards
   ========================================================================== */

.route-planner-form {
  margin-top: 0.5rem;
}

.route-planner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.9rem;
}

.route-planner-header > div {
  max-width: 520px;
}

.route-planner-header p {
  margin: 0;
  max-width: 390px;
}

.route-planner-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.65fr) minmax(180px, 0.55fr);
  align-items: start;
  gap: 1rem;
}

.route-planner-field {
  display: grid;
  gap: 0.55rem;
}

.route-planner-field label,
.route-neighborhood-header label {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 900;
}

.route-planner-field .form-select,
.route-neighborhood-trigger {
  min-height: 54px;
}

.route-planner-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.route-planner-footer p {
  max-width: 620px;
  margin: 0;
  color: #64748b;
  line-height: 1.45;
}

.route-planner-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.route-planner-actions > .btn-modern,
.route-planner-actions > .btn-route-ghost,
.route-planner-actions > .btn-modern-secondary {
  /* No desktop os botões têm largura de conteúdo (não esticam para 100%);
     ficam alinhados à direita via justify-content do contêiner. No mobile a
     media query abaixo volta a deixá-los full-width e empilhados. */
  flex: 0 0 auto;
  min-width: 200px;
  min-height: 54px;
  white-space: nowrap;
}

.route-planner-start-button {
  min-height: 54px;
}

.route-planner-pdf-button {
  min-height: 54px;
}

.route-neighborhood-header {
  display: flex;
  align-items: center;
  min-height: 1.25rem;
}

.route-neighborhood-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.route-neighborhood-actions button {
  min-height: 32px;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
}

.route-neighborhood-actions button:hover {
  background: #dbeafe;
}

.route-neighborhood-picker {
  position: relative;
}

.route-neighborhood-picker-empty {
  border-radius: 14px;
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.12);
}

.route-neighborhood-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  text-align: left;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.route-neighborhood-trigger:hover,
.route-neighborhood-picker.is-open .route-neighborhood-trigger {
  border-color: rgba(37, 99, 235, 0.3);
  background: #f8fbff;
}

.route-neighborhood-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-neighborhood-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
}

.route-neighborhood-option:hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eff6ff;
}

.route-neighborhood-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
  flex: 0 0 auto;
}

.route-neighborhood-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.42);
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.1);
}

.route-neighborhood-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.route-neighborhood-count {
  display: block;
  min-height: 1.25rem;
  color: #64748b;
  font-weight: 800;
}

.route-neighborhood-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1180;
  display: none;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(3px);
}

.route-neighborhood-modal {
  position: fixed;
  inset: 0;
  z-index: 1190;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

body.route-neighborhood-modal-open .route-neighborhood-modal,
body.route-neighborhood-modal-open .route-neighborhood-modal-backdrop {
  display: flex;
}

body.route-neighborhood-modal-open {
  overflow: hidden;
}

.route-neighborhood-modal-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 1rem;
  width: min(680px, 100%);
  max-height: min(680px, calc(100vh - 2.5rem));
  padding: 1.2rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
}

.route-neighborhood-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.route-neighborhood-modal-header span {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-neighborhood-modal-header h2 {
  margin: 0.55rem 0 0;
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 900;
}

.route-neighborhood-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}

.route-neighborhood-modal-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.route-neighborhood-search {
  position: relative;
  flex: 1 1 260px;
}

.route-neighborhood-search i {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  color: #64748b;
  transform: translateY(-50%);
}

.route-neighborhood-search input {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.route-neighborhood-search input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.1);
}

.route-neighborhood-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-content: start;
  gap: 0.65rem;
  min-height: 160px;
  overflow-y: auto;
  padding: 0.2rem 0.2rem 0.4rem;
}

.route-neighborhood-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.route-neighborhood-modal-footer > span {
  color: #64748b;
  font-weight: 900;
}

.route-list-header {
  align-items: center;
}

.route-list-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.route-list-header-actions p {
  max-width: 34ch;
  margin: 0;
  color: #64748b;
  line-height: 1.45;
  text-align: right;
}

.route-list-header-actions .route-planner-pdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 170px;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid #2563eb !important;
  border-radius: 14px;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.route-list-header-actions .route-planner-pdf-button i,
.route-list-header-actions .route-planner-pdf-button span {
  color: #ffffff !important;
}

.route-list-header-actions .route-planner-pdf-button:hover {
  transform: translateY(-1px);
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #ffffff !important;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.route-list-header-actions .route-planner-pdf-button:hover i,
.route-list-header-actions .route-planner-pdf-button:hover span {
  color: #ffffff !important;
}

.route-list-header-actions .route-planner-pdf-button:focus {
  outline: none;
  box-shadow:
    0 18px 34px rgba(37, 99, 235, 0.28),
    0 0 0 0.22rem rgba(37, 99, 235, 0.2);
}

.route-list-header-actions .route-planner-pdf-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  border-color: #93c5fd !important;
  background: #93c5fd !important;
  color: #ffffff !important;
  box-shadow: none;
}

.route-list-header-actions .route-planner-pdf-button:disabled i,
.route-list-header-actions .route-planner-pdf-button:disabled span {
  color: #ffffff !important;
}

.route-coordinates-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.route-coordinate-button {
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: #1e293b;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.route-coordinate-button:hover {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.route-shortcuts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-summary-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.route-summary-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.route-summary-top strong {
  font-size: 1.2rem;
  color: #0f172a;
}

.route-summary-top span {
  color: #64748b;
  line-height: 1.5;
}

.route-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.route-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 120px;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.route-summary-item em {
  order: -1;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.route-summary-item strong {
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.25;
}

.route-summary-item span {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

.route-journey-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.route-journey-status {
  display: grid;
  gap: 0.45rem;
}

.route-journey-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-journey-status strong {
  color: #0f172a;
  font-size: 1.2rem;
}

.route-journey-status p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.route-journey-note {
  color: #475569;
  line-height: 1.5;
}

.route-journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-route-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0.9rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease,
    color 0.24s ease,
    opacity 0.24s ease;
}

.btn-route-secondary:hover {
  transform: translateY(-3px);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.btn-route-secondary:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}

.btn-route-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0.9rem 1.35rem;
  border-radius: 16px;
  border: 1px dashed rgba(71, 85, 105, 0.28);
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  font-weight: 800;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease;
}

.btn-route-ghost:hover {
  transform: translateY(-3px);
  background: #fff;
  border-color: rgba(37, 99, 235, 0.26);
}

.btn-route-ghost:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.route-journey-helper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: rgba(239, 246, 255, 0.88);
  color: #1e3a8a;
  font-weight: 700;
}

.route-progress-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.route-progress-pill {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
}

.route-progress-pill strong {
  color: #0f172a;
  font-size: 1.35rem;
}

.route-progress-pill span {
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
}

.route-next-stop {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.route-next-stop strong {
  color: #0f172a;
  font-size: 1rem;
}

.route-next-stop span {
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.route-next-stop small {
  color: #475569;
  line-height: 1.5;
}

.route-next-stop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.route-next-stop-actions .route-next-stop-arrival-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 54px;
}

.route-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.route-nav-link i {
  font-size: 1.05rem;
}

.route-nav-link:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.route-nav-link-google {
  color: #1e3a8a;
}

.route-nav-link-google i {
  color: #2563eb;
}

.route-nav-link-waze {
  color: #155e75;
}

.route-nav-link-waze i {
  color: #06b6d4;
}

.route-nav-link.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.route-point-list {
  display: grid;
  gap: 1rem;
}

.route-point-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.route-point-copy h3 {
  margin: 0.4rem 0 0.7rem;
  font-size: 1.2rem;
}

.route-point-copy p {
  margin: 0 0 0.4rem;
  color: #475569;
  line-height: 1.55;
}

.route-point-order {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.route-point-actions {
  display: grid;
  gap: 0.55rem;
  min-width: 170px;
}

.route-point-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.route-order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.route-order-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.route-order-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.route-remove-point-button {
  width: 100%;
  border: 1px solid rgba(220, 38, 38, 0.18) !important;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%) !important;
  color: #b91c1c !important;
}

.route-remove-point-button:hover {
  background: linear-gradient(180deg, #ffe4e6 0%, #fecdd3 100%) !important;
  color: #991b1b !important;
}

.route-remove-point-button i,
.route-remove-point-button span {
  pointer-events: none;
}

.route-point-actions .table-btn {
  width: 100%;
}

.route-point-note-wrap {
  margin-top: 0.55rem;
}

.route-point-note {
  width: 100%;
  min-height: 36px;
  max-height: 120px;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.7);
  color: #334155;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.route-point-note:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.35);
  background: #fff;
}

.route-point-note::placeholder {
  color: #94a3b8;
  font-style: italic;
}

.route-point-actions .table-btn-view {
  border: 1px solid rgba(100, 116, 139, 0.22);
}

.route-point-actions .table-btn-edit {
  border: 1px solid rgba(146, 64, 14, 0.15);
}

.route-point-actions .table-btn-pay {
  border: 1px solid rgba(22, 101, 52, 0.18);
}

.route-point-status {
  display: inline-flex;
  margin-top: 0.35rem;
  color: #64748b;
  font-weight: 700;
}

.route-point-card-current {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.12);
}

.route-point-card-visited {
  opacity: 0.72;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

.route-point-card-visited .route-point-status {
  color: #15803d;
}

.table-btn.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.table-address-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.28);
  text-underline-offset: 0.18em;
}

.table-address-link:hover {
  color: #1d4ed8;
}

.route-circuit-card {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.route-circuit-card-wide {
  margin-top: 1.25rem;
}

.route-circuit-card-wide .route-circuit-map {
  min-height: 360px;
}

.route-circuit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.route-circuit-header > div {
  display: grid;
  gap: 0.25rem;
}

.route-circuit-header strong {
  color: #0f172a;
  font-weight: 900;
}

.route-circuit-header span {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 700;
}

.route-circuit-launch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  color: #1d4ed8;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.route-circuit-launch-button i {
  font-size: 1rem;
}

.route-circuit-launch-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.route-circuit-launch-button.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.route-circuit-map {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.09) 1px, transparent 1px),
    linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  background-size: 38px 38px;
}

.route-circuit-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-circuit-map polyline {
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 12px rgba(37, 99, 235, 0.22));
}

.route-circuit-marker circle {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: 3;
}

.route-circuit-marker text {
  fill: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}

.route-circuit-marker-start circle {
  stroke: #22c55e;
}

.route-circuit-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}

.route-circuit-map.has-route .route-circuit-empty {
  display: none;
}

.route-google-map-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
}

.route-circuit-map.has-google-map .route-google-map-frame {
  display: block;
}

.route-circuit-map.has-google-map svg,
.route-circuit-map.has-google-map .route-circuit-empty {
  display: none;
}

.route-circuit-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.route-circuit-stats span {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: #f8fafc;
}

.route-circuit-stats strong {
  color: #0f172a;
  font-weight: 900;
}

.route-circuit-stats small {
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 991.98px) {
  .route-planner-header {
    flex-direction: column;
    gap: 0.7rem;
  }

  .route-planner-header p {
    max-width: none;
  }

  .route-planner-grid {
    grid-template-columns: 1fr;
  }

  .route-planner-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .route-planner-actions {
    width: 100%;
    flex-direction: column;
  }

  .route-planner-start-button,
  .route-planner-pdf-button,
  .route-planner-clear-button {
    width: 100%;
    min-height: 48px;
  }

  .route-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .route-journey-actions {
    flex-direction: column;
  }

  .route-next-stop-actions {
    grid-template-columns: 1fr 1fr;
  }

  .route-summary-grid {
    grid-template-columns: 1fr;
  }

  .route-progress-strip {
    grid-template-columns: 1fr;
  }

  .route-point-card {
    flex-direction: column;
  }

  .route-point-actions {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .route-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .route-list-header-actions {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
  }

  .route-list-header-actions p {
    max-width: none;
    text-align: left;
  }

  .route-list-header-actions .route-planner-pdf-button {
    width: 100%;
  }

  .route-point-actions {
    grid-template-columns: 1fr;
  }

  .route-point-order-actions {
    grid-template-columns: 1fr 1fr;
  }

  .route-order-button,
  .route-remove-point-button {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .route-neighborhood-modal {
    padding: 0.75rem;
  }

  .route-neighborhood-modal-dialog {
    max-height: calc(100vh - 1.5rem);
    padding: 1rem;
    border-radius: 18px;
  }

  .route-neighborhood-list {
    grid-template-columns: 1fr;
  }

  .route-neighborhood-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .route-neighborhood-modal-footer .btn-route-secondary {
    width: 100%;
  }

  .route-circuit-header,
  .route-circuit-stats {
    grid-template-columns: 1fr;
  }

  .route-circuit-header {
    align-items: stretch;
    flex-direction: column;
  }

  .route-circuit-card-wide .route-circuit-map {
    min-height: 280px;
  }
}

/* ==========================================================================
   07.1 - VISITA GUIADA DO PONTO
   --------------------------------------------------------------------------
   Tela mobile/operacional aberta a partir da rota assistida.
   Escopo isolado pela classe .guided-visit-page para não afetar outros forms.
   ========================================================================== */

.guided-visit-page .form-shell-modern {
  width: min(1080px, calc(100% - 1.5rem));
}

.guided-visit-page .form-stage {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: 28px;
  background: #f1f5f9;
  box-shadow: none;
}

/* Cards principais */

.guided-visit-page .form-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 1.8vw, 1.25rem);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.guided-visit-page .form-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgba(148, 163, 184, 0.3);
  opacity: 1;
}

.guided-visit-page .form-card-header {
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.guided-visit-page .form-card-header h2 {
  margin-top: 0.25rem;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.guided-visit-page .form-card-header p {
  max-width: 64ch;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 1.02rem;
  line-height: 1.45;
}

/* Badges menores */

.guided-visit-page .form-section-tag {
  min-height: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.075em;
}

/* Cards de resumo */

.guided-visit-page .form-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.guided-visit-page .form-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: auto;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #f8fafc;
  box-shadow: none;
}

.guided-visit-page .form-summary-card strong {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  font-weight: 700;
}

.guided-visit-page .form-summary-card span {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.28;
  font-weight: 800;
}

.guided-visit-page .form-summary-card small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Cards dos produtos */

.guided-visit-page .form-card:nth-of-type(3) .form-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.guided-visit-page .guided-visit-product-card {
  min-height: 0;
  justify-content: space-between;
  padding: 1rem 1rem 1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left-width: 4px;
  background: #ffffff;
  box-shadow: none;
  transition: box-shadow 0.18s ease;
}

.guided-visit-page .guided-visit-product-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.guided-visit-page .guided-visit-product-card > strong:first-child {
  width: fit-content;
  padding: 0.18rem 0.48rem;
  border-radius: 6px;
  font-size: 0.65rem;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.guided-visit-page .guided-visit-product-card span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
}

/* Status dos produtos */

.guided-visit-page .status-success,
.guided-visit-page .status-warning,
.guided-visit-page .status-danger,
.guided-visit-page .status-muted,
.guided-visit-page .status-pending {
  display: inline-flex !important;
  width: fit-content;
  margin: 0;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1;
}

.guided-visit-page .status-success {
  background: #dcfce7;
  color: #166534 !important;
}

.guided-visit-page .status-warning {
  background: #fef3c7;
  color: #92400e !important;
}

.guided-visit-page .status-danger {
  background: #fee2e2;
  color: #b91c1c !important;
}

.guided-visit-page .status-muted {
  background: #e2e8f0;
  color: #475569 !important;
}

.guided-visit-page .status-pending {
  background: #dbeafe;
  color: #1d4ed8 !important;
}

/* Botões dos produtos */

.guided-visit-page .guided-visit-product-button {
  width: 100%;
  min-height: 40px;
  margin-top: 0.8rem;
  border-radius: 14px;
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.guided-visit-page .guided-visit-product-button i,
.guided-visit-page .guided-visit-product-button span {
  color: #fff !important;
}

.guided-visit-page .guided-visit-product-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.03);
}

.guided-visit-page .guided-visit-product-button.is-completed:disabled {
  opacity: 1;
  cursor: default;
  box-shadow: none;
}

.guided-visit-page .guided-visit-product-button.is-completed:disabled:hover {
  transform: none;
}

.guided-visit-page .guided-visit-product-button.is-completed:disabled i,
.guided-visit-page .guided-visit-product-button.is-completed:disabled span {
  color: inherit !important;
}

/* Tema Bolinhas */

.guided-visit-page .guided-visit-product-card.produto-theme-bolinhas {
  border-left-color: #22c55e;
}

.guided-visit-page
  .guided-visit-product-card.produto-theme-bolinhas
  > strong:first-child {
  background: #dcfce7;
  color: #15803d;
}

.guided-visit-page .guided-visit-product-button.produto-theme-bolinhas {
  color: #fff !important;
  border: none;
  background: #16a34a;
  box-shadow: none;
}

.guided-visit-page .guided-visit-product-button.produto-theme-bolinhas:hover {
  background: #15803d;
}

.guided-visit-page
  .guided-visit-product-button.is-completed.produto-theme-bolinhas:disabled {
  color: #166534 !important;
  background: #dcfce7;
  border: 1px solid rgba(34, 197, 94, 0.18);
}

/* Tema Consignados */

.guided-visit-page .guided-visit-product-card.produto-theme-consignados {
  border-left-color: #2563eb;
}

.guided-visit-page
  .guided-visit-product-card.produto-theme-consignados
  > strong:first-child {
  background: #dbeafe;
  color: #1d4ed8;
}

.guided-visit-page .guided-visit-product-button.produto-theme-consignados {
  color: #fff !important;
  border: none;
  background: #2563eb;
  box-shadow: none;
}

.guided-visit-page
  .guided-visit-product-button.produto-theme-consignados:hover {
  background: #1d4ed8;
}

.guided-visit-page
  .guided-visit-product-button.is-completed.produto-theme-consignados:disabled {
  color: #1e40af !important;
  background: #dbeafe;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

/* Tema Pelúcias */

.guided-visit-page .guided-visit-product-card.produto-theme-pelucias {
  border-left-color: #7c3aed;
}

.guided-visit-page
  .guided-visit-product-card.produto-theme-pelucias
  > strong:first-child {
  background: #ede9fe;
  color: #6d28d9;
}

.guided-visit-page .guided-visit-product-button.produto-theme-pelucias {
  color: #fff !important;
  border: none;
  background: #7c3aed;
  box-shadow: none;
}

.guided-visit-page .guided-visit-product-button.produto-theme-pelucias:hover {
  background: #6d28d9;
}

.guided-visit-page
  .guided-visit-product-button.is-completed.produto-theme-pelucias:disabled {
  color: #6d28d9 !important;
  background: #ede9fe;
  border: 1px solid rgba(139, 92, 246, 0.18);
}

/* Área inferior de ação */

.guided-visit-page .form-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.guided-visit-page .form-footer-actions .btn-modern,
.guided-visit-page .form-footer-actions .btn-modern-secondary,
.guided-visit-page .form-footer-actions .btn-modern-danger,
.guided-visit-page .form-footer-actions .btn-modern-ghost {
  width: auto;
  min-height: 42px;
  padding: 0 1.1rem;
  font-size: 0.875rem;
  border-radius: 12px;
  box-shadow: none;
}

.guided-visit-page .form-footer-actions .btn-modern {
  color: #fff;
}

.guided-visit-page .form-footer-actions .btn-modern-secondary {
  color: #334155;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.guided-visit-page .form-footer-actions .btn-modern-secondary:hover {
  background: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.5);
  color: #0f172a;
}

.guided-visit-page .form-footer-actions .btn-modern-danger {
  color: #fff;
  background: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.guided-visit-page .form-footer-actions .btn-modern-danger:hover {
  background: #b91c1c;
}

.guided-visit-page .form-footer-actions .btn-modern-ghost {
  color: #64748b;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.guided-visit-page .form-footer-actions .btn-modern-ghost:hover {
  color: #334155;
  background: #f8fafc;
  border-color: rgba(100, 116, 139, 0.45);
}

/* WhatsApp link next to phone number */

.visit-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #16a34a;
  text-decoration: none;
  padding: 0.18rem 0.52rem;
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.visit-whatsapp-link:hover {
  background: #dcfce7;
  color: #15803d;
}

/* Card de alerta da visita em andamento */

.guided-visit-page .form-card:last-child {
  background: #fff;
}

.guided-visit-page .form-card:last-child::before {
  background: #f59e0b;
  opacity: 0.8;
}

.guided-visit-page .form-card:last-child .form-section-tag {
  background: #fef3c7;
  color: #92400e;
  box-shadow: none;
}

.guided-visit-page .form-card:last-child .form-card-header {
  margin-bottom: 0.65rem;
}

/* Responsividade */

@media (max-width: 991.98px) {
  .guided-visit-page .form-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guided-visit-page .form-card:nth-of-type(3) .form-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body.list-page-body .list-shell:has(.route-planner-form) {
    width: calc(100% - 0.75rem);
  }

  body.list-page-body .list-shell:has(.route-planner-form) .list-stage {
    gap: 0.85rem;
    padding-inline: 0;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .list-panel,
  body.list-page-body .list-shell:has(.route-planner-form) .dashboard-panel {
    width: 100%;
    padding: 0.95rem;
    border-radius: 22px;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-operational-grid {
    gap: 0.85rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel {
    padding: 1rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .dashboard-panel-header {
    margin-bottom: 0.9rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .dashboard-panel-header p {
    font-size: 1.02rem;
    line-height: 1.5;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-journey-card {
    gap: 0.85rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-journey-status {
    gap: 0.5rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-journey-status strong {
    font-size: 1.02rem;
    line-height: 1.35;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-journey-note {
    font-size: 0.9rem !important;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-next-stop-priority {
    padding: 0.9rem;
    border-radius: 18px;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-journey-helper {
    align-items: flex-start;
    padding: 0.85rem;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-progress-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-progress-pill {
    min-height: 92px;
    padding: 0.85rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-execution-panel .route-progress-pill:last-child {
    grid-column: 1 / -1;
    min-height: 78px;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-header {
    margin-bottom: 0.75rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-form {
    margin-top: 0.35rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    width: 100%;
    min-width: 0;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-field,
  body.list-page-body .list-shell:has(.route-planner-form) .route-neighborhood-picker {
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-field .form-select,
  body.list-page-body .list-shell:has(.route-planner-form) .route-neighborhood-trigger {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 50px;
    box-sizing: border-box;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-neighborhood-trigger {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-neighborhood-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-footer {
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-footer p {
    font-size: 0.94rem;
    line-height: 1.48;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-actions {
    align-items: center;
    gap: 0.65rem;
  }

  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-start-button,
  body.list-page-body .list-shell:has(.route-planner-form) .route-planner-clear-button {
    width: 100% !important;
    min-width: 0;
    min-height: 48px;
    padding-inline: 1rem;
  }

  .guided-visit-page .form-shell-modern {
    width: calc(100% - 1rem);
  }

  .guided-visit-page .form-stage {
    gap: 0.85rem;
    padding: 0.8rem;
    border-radius: 22px;
  }

  .guided-visit-page .form-card {
    padding: 0.95rem;
    border-radius: 20px;
  }

  .guided-visit-page .form-card-header {
    flex-direction: column;
    margin-bottom: 0.75rem;
  }

  .guided-visit-page .form-card-header p {
    font-size: 1.02rem;
  }

  .guided-visit-page .form-summary-grid,
  .guided-visit-page .form-card:nth-of-type(3) .form-summary-grid {
    grid-template-columns: 1fr;
  }

  .guided-visit-page .form-summary-card {
    min-height: auto;
  }

  .guided-visit-page .guided-visit-product-card {
    padding: 0.9rem 0.9rem 0.9rem 1.1rem;
  }

  .guided-visit-page .guided-visit-product-button {
    min-height: 42px;
    font-size: 0.85rem;
  }

  .guided-visit-page .form-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .guided-visit-page .form-footer-actions .btn-modern,
  .guided-visit-page .form-footer-actions .btn-modern-secondary,
  .guided-visit-page .form-footer-actions .btn-modern-danger,
  .guided-visit-page .form-footer-actions .btn-modern-ghost {
    width: 100%;
    min-width: 0;
  }
}

/* ==========================================================================
   FIM - ROTAS DOS PONTOS
   ========================================================================== */

/* ==========================================================================
   MOBILE TYPE NORMALIZATION
   ========================================================================== */

@media (max-width: 767.98px) {
  .route-planner-form :is(p, li, label, .form-select, .form-control),
  .route-summary-card :is(p, span, small),
  .route-journey-card :is(p, span, small),
  .route-point-card :is(p, span, small),
  .guided-visit-page :is(p, li, label, .form-control, .form-select, textarea) {
    font-size: var(--vm-mobile-system-text) !important;
    line-height: var(--vm-mobile-system-line) !important;
  }

  .route-neighborhood-actions button,
  .route-point-order,
  .route-progress-pill span,
  .guided-visit-page :is(small, .form-text) {
    font-size: var(--vm-mobile-system-small) !important;
    line-height: var(--vm-mobile-system-line-compact) !important;
  }

  .route-journey-pill,
  .route-circuit-header span {
    font-size: var(--vm-mobile-system-micro) !important;
    line-height: var(--vm-mobile-system-line-compact) !important;
  }
}

/* Urgency panel */
.route-urgency-panel {
  display: grid;
  gap: 0;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 20px;
}

.route-urgency-panel .dashboard-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.route-urgency-panel .dashboard-panel-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.route-urgency-panel .dashboard-section-tag {
  min-height: 24px;
  padding: 0.34rem 0.62rem;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: fit-content;
}

.route-urgency-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.route-urgency-controls {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.route-urgency-select {
  flex: 1 1 0;
  min-height: 54px;
  padding: 0.9rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 0;
}

.route-urgency-select:hover {
  border-color: rgba(148, 163, 184, 0.35);
  background: #f8fafc;
}

.route-urgency-select:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.34);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.route-urgency-load-button {
  flex: 1 1 0;
  min-height: 54px;
  padding: 0.9rem 1.35rem;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 16px;
  background: #dc2626;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease;
  white-space: nowrap;
}

.route-urgency-load-button:hover {
  transform: translateY(-3px);
  background: #b91c1c;
  border-color: rgba(220, 38, 38, 0.42);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.22);
}

.route-urgency-load-button:active {
  transform: translateY(1px);
}

.route-urgency-load-button i {
  color: #ffffff;
  font-size: 1rem;
}

#urgencyContent {
  padding: 2rem 1.4rem;
  background: #ffffff;
  min-height: 200px;
}

@media (min-width: 769px) {
  #urgencyContent .modern-table-wrap {
    border-color: rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04);
  }

  #urgencyContent .modern-table {
    min-width: 0;
    table-layout: fixed;
  }

  #urgencyContent .modern-table th,
  #urgencyContent .modern-table td {
    height: 56px;
    padding: 0.82rem 1rem;
    text-align: center;
    vertical-align: middle;
  }

  #urgencyContent .modern-table th {
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
  }

  #urgencyContent .modern-table th.urgency-check-cell,
  #urgencyContent .modern-table td.urgency-check-cell {
    width: 3rem;
    padding-inline: 0.85rem;
    text-align: center;
  }

  #urgencyContent .modern-table th:nth-child(2),
  #urgencyContent .modern-table td.reports-rank-cell {
    width: 3rem;
    color: #334155;
    font-weight: 900;
  }

  #urgencyContent .modern-table th:nth-child(3),
  #urgencyContent .modern-table td:nth-child(3) {
    width: 34%;
    text-align: left;
  }

  #urgencyContent .modern-table th:nth-child(4),
  #urgencyContent .modern-table td:nth-child(4) {
    width: 24%;
    text-align: left;
  }

  #urgencyContent .modern-table th:nth-child(5),
  #urgencyContent .modern-table td:nth-child(5) {
    width: 15%;
  }

  #urgencyContent .modern-table th:nth-child(6),
  #urgencyContent .modern-table td:nth-child(6) {
    width: 16%;
  }

  #urgencyContent .modern-table tbody td {
    color: #334155;
    font-size: 0.9rem;
  }

  #urgencyContent .modern-table tbody td:nth-child(3) strong {
    color: #0f172a;
    font-weight: 900;
  }

  #urgencyContent .modern-table tbody tr:hover td {
    background: #f8fbff;
  }

  #urgencyContent .urgency-check-cell input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: #dc2626;
    cursor: pointer;
  }

  #urgencyContent .table-badge {
    justify-content: center;
    min-width: 6.8rem;
    min-height: 28px;
    padding-inline: 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
  }

  #urgencyContent .table-badge-warning {
    color: #92400e;
    background: #fef3c7;
  }

  #urgencyContent .route-urgency-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
  }

  #urgencyContent .route-urgency-footer p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 650;
  }

  #urgencyContent .route-urgency-footer .btn-modern {
    width: auto;
    min-width: 250px;
    min-height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
  }

  #urgencyContent .route-urgency-footer .btn-modern:disabled {
    opacity: 0.55;
    box-shadow: none;
  }
}

.dashboard-empty-state-light {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: rgba(248, 250, 252, 0.8);
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

.dashboard-empty-state-light h3 {
  margin: 0 0 0.5rem 0;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 800;
}

.dashboard-empty-state-light p {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 768px) {
  .route-urgency-panel .dashboard-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
  }

  .route-urgency-panel h2 {
    font-size: 1.12rem;
  }

  .route-urgency-controls {
    width: 100%;
  }

  .route-urgency-select {
    min-width: 0;
  }

  #urgencyContent {
    padding: 1.5rem 1rem;
    min-height: 160px;
  }
}

@media (max-width: 768px) {
  #urgencyContent .modern-table {
    display: block;
    min-width: 0;
    width: 100%;
    border-spacing: 0;
  }

  #urgencyContent .modern-table thead {
    display: none;
  }

  #urgencyContent .modern-table tbody {
    display: grid !important;
    gap: 0.62rem !important;
  }

  #urgencyContent .modern-table tbody tr {
    position: relative;
    display: grid;
    gap: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  }

  #urgencyContent .modern-table tbody td {
    display: grid;
    grid-template-columns: minmax(8.6rem, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 0.72rem;
    min-height: 40px;
    padding: 0.52rem 0;
    border-top: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: transparent;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.92rem;
  }

  #urgencyContent .modern-table tbody td:first-child {
    text-align: right;
  }

  #urgencyContent .modern-table tbody td.urgency-check-cell {
    position: absolute;
    top: 0.72rem;
    right: 0.85rem;
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    line-height: 1;
    text-align: right;
  }

  #urgencyContent .modern-table tbody td.urgency-check-cell::before {
    content: none;
  }

  #urgencyContent .modern-table tbody td.urgency-check-cell input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: #dc2626;
  }

  #urgencyContent .modern-table tbody td.reports-rank-cell {
    display: none;
  }

  #urgencyContent .modern-table tbody td:nth-child(3) {
    display: block;
    min-height: 0;
    padding-right: 2rem;
    padding-bottom: 0.72rem;
    text-align: left;
  }

  #urgencyContent .modern-table tbody td:nth-child(3)::before {
    content: none;
  }

  #urgencyContent .modern-table tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    overflow-wrap: normal;
    line-height: 1.2;
  }

  #urgencyContent .modern-table tbody td:last-child {
    border-bottom: 0;
  }

  #urgencyContent .modern-table tbody td strong {
    display: block;
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.18;
    text-align: left;
  }

  #urgencyContent .route-urgency-footer {
    padding: 1rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    text-align: center;
  }

  #urgencyContent .route-urgency-footer p {
    margin: 0 0 0.8rem 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
  }

  #urgencyContent .route-urgency-footer .btn-modern {
    width: 100%;
    min-height: 48px;
  }

  #urgencyContent .modern-table-scroll {
    overflow-x: visible;
  }
}

@media (max-width: 480px) {
  .route-urgency-controls {
    flex-direction: column;
    gap: 0.65rem;
  }

  .route-urgency-select,
  .route-urgency-load-button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  #urgencyContent .modern-table tbody td {
    grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
    gap: 0.7rem;
    font-size: 0.9rem;
  }

  #urgencyContent .modern-table tbody td::before {
    font-size: 0.64rem;
    letter-spacing: 0.015em;
  }
}
