/* ================= KPI BANNER ================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-width: 0;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3.5px;
  background: var(--kpi-color, var(--primary));
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(2, 132, 199, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--kpi-color, var(--primary));
  flex-shrink: 0;
}

.kpi-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.1rem 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 0.15rem;
  font-weight: 500;
}

/* ================= FILTER BAR ================= */
.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
}

.filter-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.date-presets {
  display: flex;
  align-items: center;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  gap: 0.2rem;
  overflow-x: auto;
}

.btn-date-preset {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-date-preset:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.btn-date-preset.active {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.custom-date-picker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.custom-date-picker input[type="date"] {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.8rem;
  transition: var(--transition);
}

.custom-date-picker input[type="date"]:focus {
  border-color: var(--primary);
}

.filter-row-bottom {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-input-wrapper svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  stroke: var(--text-dim);
  fill: none;
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}

.filter-row-bottom select.form-control {
  width: 100%;
  padding: 0.45rem 1.8rem 0.45rem 0.75rem;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
}

/* View Switcher */
.view-switcher {
  display: flex;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.15rem;
  gap: 0.15rem;
  flex-shrink: 0;
}

.btn-view-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-view-toggle:hover {
  color: var(--text-main);
}

.btn-view-toggle.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-view-toggle svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}

@media (max-width: 1200px) {
  .filter-row-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .filter-row-bottom .search-input-wrapper {
    grid-column: span 2;
  }
  .filter-row-bottom .view-switcher {
    grid-column: span 2;
    justify-self: end;
  }
}

@media (max-width: 768px) {
  .filter-row-bottom {
    grid-template-columns: 1fr;
  }
  .filter-row-bottom .search-input-wrapper,
  .filter-row-bottom select.form-control,
  .filter-row-bottom .view-switcher {
    grid-column: span 1;
  }
}

/* ================= KANBAN COLUMNS (ALTURAS INDEPENDENTES POR CONTEÚDO) ================= */
.mural-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.85rem;
  align-items: start;
  width: 100%;
}

.mural-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  width: 100%;
  align-self: start; /* Cada coluna tem apenas a altura necessária para seu conteúdo */
}

.column-header {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-hover);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.column-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
}

.column-count {
  font-size: 0.72rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-family: var(--font-mono);
}

.column-cards {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.column-cards .empty-state {
  padding: 1.25rem 0.5rem;
  min-height: auto;
}

/* ================= DELIVERY CARD (ALTURA NATURAL BASEADA NO CONTEÚDO) ================= */
.delivery-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  box-sizing: border-box;
  height: auto; /* Altura automática baseada no conteúdo */
}

.delivery-card:hover {
  transform: translateY(-2px);
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.card-client {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  word-break: break-word;
}

.card-time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-card-hover);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  white-space: nowrap;
}

.card-time svg {
  width: 12px;
  height: 12px;
  stroke: var(--accent-amber);
  fill: none;
}

.card-address {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  line-height: 1.35;
  word-break: break-word;
}

.card-address svg {
  width: 13px;
  height: 13px;
  stroke: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
  fill: none;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.76rem;
}

.card-plate-box {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.74rem;
  white-space: nowrap;
}

.card-driver-box {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-volume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.74rem;
}

.volume-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  border: 1px solid rgba(2, 132, 199, 0.18);
  white-space: nowrap;
  flex-shrink: 0;
}

.volume-badge svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
  flex-shrink: 0;
}

.card-tipo-agua {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid rgba(5, 150, 105, 0.2);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  white-space: nowrap;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.card-obs-box {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--bg-card-hover);
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  line-height: 1.35;
  word-break: break-word;
}

/* ================= FOOTER DO CARD EM 2 LINHAS (STATUS NO TOPO, AÇÕES ABAIXO) ================= */
.card-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.status-select-wrapper {
  width: 100%;
}

.status-select-wrapper select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.status-select-wrapper select:focus {
  border-color: var(--primary);
}

.card-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  width: 100%;
}

.card-btn-group button {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  height: 28px;
  width: 100%;
}

.card-btn-group button:hover {
  background: var(--bg-surface);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.card-btn-group button.btn-delete-card:hover {
  background: rgba(225, 29, 72, 0.1);
  color: var(--accent-rose);
  border-color: var(--accent-rose);
}

/* ================= TABLE VIEW ================= */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-card-hover);
  padding: 0.8rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  text-align: center;
}

@media (max-width: 1024px) {
  .filter-row-bottom {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .filter-row-bottom {
    grid-template-columns: 1fr;
  }
}


/* ========================================================
   NOVA CENTRAL LOGÍSTICA (REDESENHO: KANBAN COMPACTO & DRAWER)
   ======================================================== */

.kpi-grid.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

@media (max-width: 1400px) {
  .kpi-grid.kpi-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .kpi-grid.kpi-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-purple { --kpi-color: #8b5cf6; }
.kpi-indigo { --kpi-color: #3b82f6; }

.mural-workspace {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  width: 100%;
  position: relative;
}

.mural-columns-wrapper {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0.75rem;
}

.mural-columns {
  display: grid;
  grid-template-columns: repeat(6, minmax(250px, 1fr));
  gap: 0.75rem;
  align-items: start;
  min-width: calc(250px * 6 + 0.75rem * 5);
}

/* Filipeta Compacta Estilo Trello */
.card-filipeta {
  cursor: pointer;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
  position: relative;
}

.card-filipeta:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

.card-filipeta.active-selected {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25), 0 4px 16px rgba(2, 132, 199, 0.15);
  background: #f0fdfa;
}

.filipeta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.filipeta-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--primary);
}

.filipeta-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filipeta-urgent {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.filipeta-client {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filipeta-address {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filipeta-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.4rem;
  margin-top: 0.15rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.74rem;
}

.filipeta-vol {
  font-weight: 700;
  color: var(--text-main);
}

.filipeta-truck {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card-hover);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.68rem;
}

.filipeta-driver {
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.filipeta-card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-card-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.45rem;
  border-radius: 5px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(2, 132, 199, 0.05);
}

.btn-card-action.btn-card-details {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--primary);
}

.btn-card-action.btn-card-details:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ========================================================
   MODAL LATERAL OPERACIONAL (SLIDE-OVER FULL HEIGHT)
   ======================================================== */

.mural-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mural-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mural-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 95vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  box-shadow: -14px 0 45px rgba(0, 0, 0, 0.24);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.mural-drawer.open {
  transform: translateX(0);
}

/* Header do Modal */
.drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.drawer-doc-icon {
  color: var(--text-dim);
  display: flex;
  align-items: center;
}

.drawer-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.drawer-instant-tag {
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drawer-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.drawer-status-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.drawer-status-pill.badge-agendado { background: #8b5cf6; }
.drawer-status-pill.badge-aguardando_aceite { background: #8b5cf6; }
.drawer-status-pill.badge-abastecendo { background: #0284c7; }
.drawer-status-pill.badge-em_rota { background: #0284c7; }
.drawer-status-pill.badge-no_local { background: #f59e0b; }
.drawer-status-pill.badge-concluido { background: #10b981; }
.drawer-status-pill.badge-cancelado { background: #ef4444; }

.btn-drawer-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-drawer-close:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.06);
}

/* Abas Segmentadas */
.drawer-segmented-tabs {
  display: flex;
  background: var(--bg-card-hover);
  padding: 4px;
  margin: 0.75rem 1.25rem 0.25rem;
  border-radius: 8px;
  gap: 4px;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.drawer-segmented-tabs .drawer-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.drawer-segmented-tabs .drawer-tab.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
}

.drawer-segmented-tabs .drawer-tab:hover:not(.active) {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.drawer-tab-badge {
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  font-weight: 700;
}

.drawer-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Conteúdo Scrollável */
.drawer-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drawer-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.drawer-section-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.btn-drawer-section-action {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

.btn-drawer-section-action:hover {
  background: rgba(2, 132, 199, 0.08);
}

/* 2-Column Cards Grid */
.drawer-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.drawer-card-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.drawer-card-item.span-2 {
  grid-column: span 2;
}

.drawer-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.drawer-card-content {
  flex: 1;
  min-width: 0;
}

.drawer-card-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.drawer-card-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-card-item.span-2 .drawer-card-value {
  white-space: normal;
}

.drawer-card-sub {
  font-size: 0.73rem;
  color: var(--text-dim);
  margin-top: 1px;
}

/* Stepper Conectado de 6 Etapas */
.drawer-stepper-connected {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0.6rem 0.25rem 0.25rem;
}

.drawer-stepper-connected::before {
  content: '';
  position: absolute;
  top: 19px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.stepper-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58px;
  text-align: center;
}

.stepper-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.stepper-node.completed .stepper-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.stepper-node.active .stepper-circle {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
  color: #ffffff;
}

.stepper-node.active .stepper-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.stepper-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 5px;
  white-space: nowrap;
}

.stepper-node.completed .stepper-label,
.stepper-node.active .stepper-label {
  color: var(--text-main);
  font-weight: 700;
}

.stepper-node.active .stepper-label {
  color: var(--primary);
}

.stepper-time {
  font-size: 0.62rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.stepper-node.active .stepper-time {
  color: var(--primary);
  font-weight: 700;
}

/* Card do Mapa e Telemetria em Resumo */
.drawer-map-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem;
  background: var(--bg-surface);
}

.drawer-mini-map {
  width: 100%;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.drawer-full-map {
  width: 100%;
  height: calc(100vh - 220px);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.drawer-telemetry-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

.telemetry-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.telemetry-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.telemetry-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.telemetry-label {
  font-size: 0.62rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.telemetry-bold {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.telemetry-sub {
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseLive 1.5s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Observações Callout */
.drawer-obs-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.15);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
}

.drawer-obs-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

.drawer-obs-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-main);
}

/* Timeline Auditável */
.drawer-timeline-container {
  display: flex;
  flex-direction: column;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  position: relative;
  padding-left: 1.6rem;
}

.timeline-list::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 6px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.timeline-dot {
  position: absolute;
  left: -1.6rem;
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--primary);
}

.timeline-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.timeline-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Barra de Ações Fixa no Rodapé */
.drawer-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.35rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  flex-shrink: 0;
  position: relative;
  z-index: 1060;
}

.btn-drawer-main {
  flex: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.65rem 0.85rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-drawer-main:hover {
  filter: brightness(1.08);
}

.btn-drawer-sub {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-drawer-sub:hover {
  background: rgba(2, 132, 199, 0.08);
}

.drawer-more-dropdown {
  position: relative;
  flex-shrink: 0;
}

.btn-drawer-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-drawer-more:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-drawer-more.active {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0284c7;
}

.btn-drawer-more svg {
  transition: transform 0.2s ease;
}

.btn-drawer-more.active svg {
  transform: rotate(180deg);
}

.drawer-more-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  min-width: 250px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1070;
  animation: fadeInMoreMenu 0.15s ease;
}

@keyframes fadeInMoreMenu {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.more-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.more-menu-item:hover {
  background: #f1f5f9;
  color: #0284c7;
}

.more-menu-item svg {
  flex-shrink: 0;
  color: #64748b;
}

.more-menu-item:hover svg {
  color: #0284c7;
}

.more-menu-item.item-danger {
  color: #ef4444;
}

.more-menu-item.item-danger svg {
  color: #ef4444;
}

.more-menu-item.item-danger:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ================= SELETOR DE MODO DE DESPACHO (AGENDADA VS IMEDIATA) ================= */
.dispatch-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dispatch-mode-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.dispatch-mode-btn svg {
  flex-shrink: 0;
  color: var(--text-dim);
}

.dispatch-mode-btn div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dispatch-mode-btn strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.dispatch-mode-btn span {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.dispatch-mode-btn:hover {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.03);
}

.dispatch-mode-btn.active {
  border-color: var(--primary);
  background: rgba(2, 132, 199, 0.08);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.12);
}

.dispatch-mode-btn.active svg {
  color: var(--primary);
}

.dispatch-mode-btn.mode-instant.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
}

.dispatch-mode-btn.mode-instant.active svg,
.dispatch-mode-btn.mode-instant.active strong {
  color: #d97706;
}

.dispatch-instant-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #b45309;
  font-size: 0.78rem;
  margin-bottom: 1rem;
}

.dispatch-instant-banner svg {
  flex-shrink: 0;
  color: #d97706;
}

/* ================= SUB-STATUS DE ACEITE DO MOTORISTA NA FILIPETA ================= */
.filipeta-substatus-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.45rem;
}

.filipeta-substatus {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.filipeta-substatus.pending {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.filipeta-substatus.accepted {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

@keyframes cardStatusPulse {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.55); transform: scale(1.015); }
  70% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); transform: scale(1); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); transform: scale(1); }
}

.card-filipeta.live-updated {
  animation: cardStatusPulse 1.2s ease-out;
}

/* ==========================================================================
   WIZARD DE AGENDAMENTO DE ENTREGA & DISTRIBUIÇÃO MULTI-VIAGENS
   ========================================================================== */

/* Stepper Superior de 4 Passos */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  gap: 0.5rem;
  overflow-x: auto;
}

.wizard-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.wizard-step-indicator:hover {
  background: #f1f5f9;
}

.wizard-step-indicator .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #64748b;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wizard-step-indicator .step-label {
  display: flex;
  flex-direction: column;
}

.wizard-step-indicator .step-label strong {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.2;
}

.wizard-step-indicator .step-label span {
  font-size: 0.7rem;
  color: #94a3b8;
}

.wizard-step-indicator.active {
  background: rgba(8, 127, 189, 0.08);
}

.wizard-step-indicator.active .step-num {
  background: #087fbd;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(8, 127, 189, 0.35);
}

.wizard-step-indicator.active .step-label strong {
  color: #087fbd;
}

.wizard-step-indicator.completed .step-num {
  background: #10b981;
  color: #ffffff;
}

.wizard-step-indicator.completed .step-label strong {
  color: #0f172a;
}

.wizard-step-arrow {
  font-size: 1.25rem;
  color: #cbd5e1;
  font-weight: 300;
}

/* Título de Seção do Passo */
.wizard-section-title {
  margin-bottom: 1.25rem;
}

.wizard-section-title .step-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

.wizard-section-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.3rem 0;
}

.wizard-section-title p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* Card Destacado do Passo */
.wizard-card-highlight {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Box de Informações Rápidas do Cliente */
.cliente-info-mini-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #087fbd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.85rem 0 1.15rem 0;
  font-size: 0.84rem;
  color: #334155;
}

/* Box de Diagnóstico de Frota */
.frota-diagnostic-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  transition: all 0.2s ease;
}

.frota-diagnostic-box .diagnostic-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #0369a1;
}

/* Pílulas de Balanço de Litros */
.distribution-summary-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dist-pill {
  font-size: 0.78rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dist-pill.total {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.dist-pill.allocated {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.dist-pill.remaining {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  transition: all 0.2s ease;
}

.dist-pill.remaining.balanced {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.dist-pill.remaining.excess {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Barra Rápida de Distribuição */
.dist-quick-bar {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* Tabela de Viagens Alocadas */
.multi-trips-container {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.multi-trips-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.multi-trips-table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.multi-trips-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.multi-trips-table tbody tr:last-child {
  border-bottom: none;
}

.multi-trips-table tbody tr:hover {
  background: #fafafa;
}

.multi-trips-table td {
  padding: 0.6rem 0.65rem;
  vertical-align: middle;
}

.multi-trips-table .form-control {
  font-size: 0.82rem;
  padding: 0.4rem 0.55rem;
  height: 34px;
}

.multi-trips-table .trip-num-badge {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  background: #087fbd;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
}

.multi-trips-table .btn-remove-trip {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.multi-trips-table .btn-remove-trip:hover {
  background: #fee2e2;
}

/* Banner de Alerta de Balanço */
.dist-alert-banner {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.dist-alert-banner.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.dist-alert-banner.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.dist-alert-banner.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Card de Revisão de Pedido */
.review-order-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.review-item label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
  display: block;
}

.review-item strong {
  font-size: 0.95rem;
  color: #0f172a;
}

.rev-trips-list-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rev-trip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-size: 0.84rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rev-trip-row .rev-trip-num {
  font-weight: 800;
  color: #087fbd;
  margin-right: 0.5rem;
}

/* Badge de Viagem Agrupada no Card do Kanban */
.filipeta-trip-badge {
  background: rgba(8, 127, 189, 0.12);
  color: #0369a1;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(8, 127, 189, 0.25);
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
}

/* ==========================================================================
   PASSO 1: MODO & CLIENTE (DESIGN REFINADO FIEL AO MOCKUP)
   ========================================================================== */

/* Header do formulário */
.page-form-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-header-back-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.btn-header-back-circle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0284c7;
  transform: translateX(-2px);
}

.header-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.step-indicator-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.step-indicator-bar-track {
  width: 140px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.step-indicator-bar-fill {
  height: 100%;
  background: #0284c7;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.header-droplet-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}

.page-form-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}

.user-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.btn-header-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  margin-left: 0.25rem;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.btn-header-close:hover {
  color: #ef4444;
}

/* Grid de 2 Colunas do Passo 1 */
.step-1-grid-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .step-1-grid-layout {
    grid-template-columns: 1fr;
  }
}

.step-1-field-group {
  margin-bottom: 1.25rem;
}

.step-1-field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

/* Cards de Tipo de Despacho (Agendado / Emergencial) */
.dispatch-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.dispatch-card-btn {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.dispatch-card-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.dispatch-card-btn.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px #0284c7, 0 2px 6px rgba(2, 132, 199, 0.12);
}

.dispatch-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dispatch-card-icon.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.dispatch-card-icon.slate {
  background: #f1f5f9;
  color: #64748b;
}

.dispatch-card-btn.active .dispatch-card-icon.slate {
  background: #fee2e2;
  color: #ef4444;
}

.dispatch-card-info strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.dispatch-card-info span {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}

/* Busca Pesquisável do Cliente */
.cliente-search-container {
  position: relative;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-box .search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
}

#page-cliente-search-input {
  padding-left: 40px;
  padding-right: 64px;
  height: 44px;
  font-size: 0.92rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#page-cliente-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-input-box .btn-clear-search {
  position: absolute;
  right: 36px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.search-input-box .btn-clear-search:hover {
  color: #ef4444;
}

.search-input-box .arrow-dropdown-icon {
  position: absolute;
  right: 14px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Dropdown Flutuante de Clientes */
.cliente-dropdown-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
}

.cliente-dropdown-item {
  padding: 0.65rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.cliente-dropdown-item:last-child {
  border-bottom: none;
}

.cliente-dropdown-item:hover,
.cliente-dropdown-item.highlighted {
  background: #f0f9ff;
}

.cli-dropdown-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}

.cli-dropdown-sub {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.15rem;
}

/* Card do Cliente Selecionado */
.selected-cliente-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.cli-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.cli-card-user-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cli-avatar-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cli-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.cli-tel {
  font-size: 0.82rem;
  color: #64748b;
  margin-left: 0.35rem;
}

.badge-cli-ativo {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.cli-card-bottom-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.35;
}

.cli-card-bottom-row svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #94a3b8;
}

/* Coluna Direita: Resumo do Cliente */
.client-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.summary-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1.15rem 0;
}

.summary-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.summary-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.summary-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon-circle.outline {
  border: 1px solid #cbd5e1;
  color: #64748b;
  background: #ffffff;
}

.summary-icon-circle.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.summary-item-content {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.summary-item-content strong {
  font-size: 0.9rem;
  color: #0f172a;
}

.summary-address-multiline {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.summary-label {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-value {
  font-size: 0.88rem;
  color: #334155;
}

/* Mini Mapa no Resumo */
.summary-map-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-top: 0.5rem;
}

.summary-mini-map {
  height: 130px;
  width: 100%;
  background: #f1f5f9;
}

.map-location-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(2, 132, 199, 0.92);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 400;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Linha de Ações (Cancelar / Próximo) no Passo 1 */
.step-1-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-step-cancel {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
}

.btn-step-next {
  padding: 0.55rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 700;
  background: #0284c7;
  border-color: #0284c7;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-step-next:hover {
  background: #0369a1;
  border-color: #0369a1;
}

/* ==========================================================================
   PASSO 2: VOLUME TOTAL & ANÁLISE DE FROTA (FIEL AO MOCKUP)
   ========================================================================== */

/* Linha Superior: Dois Cards Lado a Lado */
.step-2-top-cards {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .step-2-top-cards {
    grid-template-columns: 1fr;
  }
}

/* Card 1: Volume Solicitado */
.step-2-volume-display-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.step-2-volume-droplet-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-2-volume-info {
  display: flex;
  flex-direction: column;
}

.step-2-volume-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.2rem;
}

.step-2-volume-val {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.step-2-volume-water-type {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.35rem;
}

/* Card 2: Análise da Frota */
.step-2-frota-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.step-2-frota-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.step-2-frota-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0284c7;
}

.step-2-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

@media (max-width: 768px) {
  .step-2-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.step-2-stat-item {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.step-2-stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-2-stat-icon.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.step-2-stat-icon.green {
  background: #dcfce7;
  color: #15803d;
}

.step-2-stat-texts {
  display: flex;
  flex-direction: column;
}

.step-2-stat-number {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.step-2-stat-number.green {
  color: #15803d;
}

.step-2-stat-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.15rem;
  line-height: 1.25;
}

.step-2-stat-label.green {
  color: #16a34a;
  font-weight: 600;
}

/* Seções e Chips de Volume */
.step-2-section-group {
  margin-top: 1.5rem;
}

.step-2-section-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.step-2-chips-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-vol-chip {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 1.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-vol-chip:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-vol-chip.active {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 0 0 1px #0284c7, 0 2px 4px rgba(2, 132, 199, 0.12);
}

/* Valor do Pedido e Taxa */
.step-2-valor-wrapper {
  max-width: 440px;
}

.step-2-valor-input {
  height: 46px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.85rem;
}

.step-2-valor-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.step-2-rate-text {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 0.35rem;
}

/* Banner Informativo de Frota */
.step-2-banner-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.15s ease;
}

.step-2-banner-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-2-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-2-banner-text {
  display: flex;
  flex-direction: column;
}

.step-2-banner-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0284c7;
}

.step-2-banner-desc {
  font-size: 0.82rem;
  color: #334155;
  margin-top: 0.1rem;
}

.step-2-banner-arrow {
  color: #0284c7;
  display: flex;
  align-items: center;
}

/* Linha de Ações (Voltar / Próximo) no Passo 2 */
.step-2-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.btn-step-back {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 8px;
}

/* ==========================================================================
   PASSO 3: DISTRIBUIÇÃO DAS VIAGENS (FIEL AO MOCKUP - SEM FOTOS DE CAMINHÕES)
   ========================================================================== */

.step-3-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.step-3-header-titles {
  display: flex;
  flex-direction: column;
}

.step-3-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.01em;
}

.step-3-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.btn-auto-dist-sparkle {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  color: #0284c7;
  border-radius: 8px;
  padding: 0.55rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.08);
}

.btn-auto-dist-sparkle:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.step-3-trips-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

/* Card de Viagem Individual (Limpo e Funcional, Sem Fotos de Caminhões) */
.trip-dist-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trip-dist-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.trip-dist-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
}

.trip-dist-card-badges {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.trip-badge-num {
  background: #10b981;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.trip-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.trip-badge-status.distribuida {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.trip-badge-status.pendente {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.btn-trip-card-delete {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: all 0.15s ease;
}

.btn-trip-card-delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Grid de Dados da Viagem (5 Colunas Operacionais) */
.trip-dist-card-body {
  display: grid;
  grid-template-columns: 1.3fr 1.1fr 1.2fr 0.9fr 0.9fr;
  gap: 1.15rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 992px) {
  .trip-dist-card-body {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.trip-input-number-vol {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0284c7;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #ffffff;
  height: 38px;
  transition: border-color 0.15s ease;
}

.trip-input-number-vol:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Painel de Controle de Balanço de Volume (Passo 3) */
.dist-balance-control-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dist-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

@media (max-width: 768px) {
  .dist-balance-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.dist-balance-item {
  display: flex;
  flex-direction: column;
}

.dist-balance-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.dist-balance-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.dist-balance-val.blue {
  color: #0284c7;
}

.dist-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  width: fit-content;
}

.dist-pill.exact {
  background: #dcfce7;
  color: #15803d;
}

.dist-pill.missing {
  background: #fef3c7;
  color: #b45309;
}

.dist-pill.overflow {
  background: #fee2e2;
  color: #b91c1c;
}

.dist-progress-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.dist-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.dist-alert-banner {
  margin-top: 0.85rem;
  padding: 0.65rem 0.95rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.dist-alert-banner.warning {
  background: #fefce8;
  border: 1px solid #fef08a;
  color: #854d0e;
}

.dist-alert-banner.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.dist-alert-banner.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Prévia da Entrega Fixa (Passo 1 Lateral) */
.previa-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}

.previa-sub-metric {
  display: block;
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 0.2rem;
  font-weight: 500;
}

.previa-trips-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-top: 0.4rem;
}

.previa-trips-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.previa-trips-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.previa-trips-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.previa-progress-bar-container {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.previa-progress-bar-fill {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.previa-progress-label {
  font-size: 0.72rem;
  color: #166534;
  font-weight: 600;
}

/* Campo Amplo de Volume (Passo 2) */
.step-2-volume-input-wrapper {
  margin-top: 0.4rem;
}

.step-2-volume-field-container {
  position: relative;
  max-width: 380px;
}

.step-2-input-large {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  height: 52px;
  padding: 0.5rem 5rem 0.5rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  transition: all 0.15s ease;
}

.step-2-input-large:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
  outline: none;
}

.step-2-input-suffix {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
}

.step-2-input-help {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.45rem;
}

.step-2-chips-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.step-2-chips-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.trip-col-item {
  display: flex;
  flex-direction: column;
}

.trip-col-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.trip-col-label svg {
  color: #94a3b8;
}

.trip-select-inline {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #ffffff;
  height: 38px;
  transition: border-color 0.15s ease;
}

.trip-select-inline:focus {
  border-color: #0284c7;
  outline: none;
}

.trip-input-inline {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.55rem;
  background: #ffffff;
  height: 38px;
}

.trip-val-static {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  height: 38px;
  display: flex;
  align-items: center;
}

.trip-col-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Linha Inferior com Base e Destino */
.trip-dist-card-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .trip-dist-card-footer {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.trip-loc-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.trip-loc-pin {
  color: #0284c7;
  flex-shrink: 0;
  margin-top: 2px;
}

.trip-loc-label {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.trip-loc-value {
  display: block;
  font-size: 0.84rem;
  color: #334155;
  font-weight: 600;
  line-height: 1.35;
}

/* Linha de Ações (Voltar / Próximo) no Passo 3 */
.step-3-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

/* ============================================================
   PASSO 4: CONFIRMAÇÃO & DESPACHO (FIEL AO MOCKUP)
============================================================ */
.step-4-grid-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .step-4-grid-layout {
    grid-template-columns: 1fr;
  }
}

.step-4-main-col {
  display: flex;
  flex-direction: column;
}

.step-4-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.6rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.step-4-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.step-4-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.step-4-header-badges {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.badge-ped-code {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.badge-ped-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.badge-ped-mode.agendado {
  background: #dcfce7;
  color: #15803d;
}

.badge-ped-mode.emergencial {
  background: #fee2e2;
  color: #b91c1c;
}

.step-4-order-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.75rem;
}

@media (max-width: 768px) {
  .step-4-order-body {
    grid-template-columns: 1fr;
  }
}

.step-4-client-info {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.step-4-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.step-4-info-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}

.step-4-info-icon.blue {
  background: #e0f2fe;
  color: #0284c7;
}

.step-4-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.step-4-info-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.step-4-info-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.step-4-info-sub {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.step-4-metrics-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1rem;
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  border: 1px solid #f1f5f9;
  align-content: center;
}

.step-4-metric-col {
  display: flex;
  flex-direction: column;
}

.step-4-metric-label {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.step-4-metric-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

.step-4-metric-val.smaller {
  font-size: 1.05rem;
  font-weight: 700;
}

.step-4-metric-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Lista de Viagens no Passo 4 */
.step-4-trips-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.step-4-trip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  gap: 1rem;
}

.step-4-trip-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.step-4-trip-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-4-trip-icon.green {
  background: #dcfce7;
  color: #166534;
}

.step-4-trip-desc {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.step-4-trip-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

.step-4-trip-meta {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
}

.step-4-trip-time-col {
  display: flex;
  flex-direction: column;
  min-width: 65px;
}

.step-4-trip-time-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.step-4-trip-time-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.step-4-trip-badge {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-4-trip-badge.green {
  background: #dcfce7;
  color: #166534;
}

.step-4-trip-badge.blue {
  background: #e0f2fe;
  color: #0369a1;
}

/* Coluna Direita: Validações */
.step-4-sidebar-col {
  display: flex;
  flex-direction: column;
}

.step-4-validations-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.validations-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.validations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.validation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
}

.validation-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.validations-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.info-banner-icon {
  color: #0284c7;
  flex-shrink: 0;
  margin-top: 1px;
}

.info-banner-text {
  font-size: 0.78rem;
  color: #0369a1;
  line-height: 1.4;
  font-weight: 500;
}

/* Linha de Ações (Voltar / Confirmar e Despachar) no Passo 4 */
.step-4-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.btn-step-confirm-dispatch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 0.72rem 1.6rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.btn-step-confirm-dispatch:hover {
  background: #0369a1;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

/* ============================================================
   TELA ÚNICA UNIFICADA & OTIMIZADA (SEM CARDS PESADOS)
============================================================ */
.single-page-body {
  padding: 1.25rem 1.75rem 2.5rem 1.75rem;
}

.single-form-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .single-form-layout {
    grid-template-columns: 1fr;
  }
}

.single-form-main {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.single-section-block {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 0.95rem 0;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid #f1f5f9;
  box-shadow: none;
}

.single-section-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.single-section-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.single-section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.single-section-number {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.single-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

.single-dispatch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dispatch-toggle-cards {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.dispatch-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dispatch-card-btn:hover {
  color: #0f172a;
}

.dispatch-card-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dispatch-card-btn svg {
  color: inherit;
}

.single-datetime-group {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.form-group-compact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
}

.form-label-compact {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.form-control-compact {
  height: 38px;
  font-size: 0.88rem;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.65rem;
  color: #0f172a;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control-compact:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  outline: none;
}

.form-control-compact.font-bold {
  font-weight: 700;
  color: #0f172a;
}

/* Inputs e Selects com Ícones e Chevrons */
.input-with-leading-icon,
.select-with-leading-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-lead-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.form-control-compact.has-icon {
  padding-left: 2.25rem !important;
  width: 100%;
}

.form-control-compact.has-trailing-btn {
  padding-right: 2.25rem !important;
}

.form-control-compact.has-chevron {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem !important;
  width: 100%;
  cursor: pointer;
}

.select-chevron-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.btn-clear-search-icon {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 3;
  transition: all 0.15s ease;
}

.btn-clear-search-icon:hover {
  color: #ef4444;
  background: #fee2e2;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.volume-commercial-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .volume-commercial-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.input-suffix-wrapper {
  position: relative;
}

.input-suffix-tag {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

.input-rate-wrapper {
  position: relative;
}

.input-rate-badge {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.74rem;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  pointer-events: none;
}

.quick-vol-pills-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.quick-vol-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-right: 0.25rem;
}

.btn-vol-chip {
  padding: 0.35rem 0.8rem;
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-vol-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-vol-chip.active {
  background: #eff6ff;
  border-color: #0284c7;
  color: #0284c7;
  font-weight: 700;
}

.trips-header-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-outline-pill:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-primary-pill {
  background: #0284c7;
  border: 1px solid #0284c7;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.2);
}

.btn-primary-pill:hover {
  background: #0369a1;
}

.trips-balance-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.balance-bar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #334155;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dist-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
}

.dist-progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.dist-progress-bar {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.trips-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.trips-compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.trips-compact-table th {
  background: #f8fafc;
  padding: 0.6rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #e2e8f0;
}

.trips-compact-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.trips-compact-table tr:last-child td {
  border-bottom: none;
}

.trip-table-badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 auto;
}

.trips-table-select {
  width: 100%;
  height: 34px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  background: #ffffff;
  cursor: pointer;
}

.trips-table-input {
  width: 100%;
  height: 34px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  background: #ffffff;
}

.trips-table-vol {
  width: 100%;
  height: 34px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0284c7;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  background: #ffffff;
  text-align: center;
}

.trip-arrival-cell {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.84rem;
}

.trip-actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-trip-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-trip-action-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-trip-action-icon.btn-trip-delete:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Accordion de Observações Operacionais */
.trips-obs-accordion {
  margin-top: 0.85rem;
}

.btn-obs-accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-obs-accordion-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.obs-toggle-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.obs-chevron-icon {
  color: #64748b;
  transition: transform 0.2s ease;
}

.obs-chevron-icon.open {
  transform: rotate(180deg);
}

.obs-accordion-collapse {
  margin-top: 0.5rem;
}

/* SIDEBAR FIXA: Resumo do Pedido */
.previa-sticky-card {
  position: sticky;
  top: 1.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.previa-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.previa-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.previa-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.previa-status-pill.success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.previa-details-list {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.previa-detail-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.previa-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.previa-row-content {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  flex: 1;
}

.previa-item-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.previa-item-val {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.previa-item-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 1px;
}

.previa-trips-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.previa-trips-pill-blue {
  background: #e0f2fe;
  color: #0284c7;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.previa-progress-bar-container {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.previa-progress-bar-fill {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.previa-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
}

.previa-actions-box {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.btn-confirm-dispatch-direct {
  width: 100%;
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  cursor: pointer;
}

.btn-confirm-dispatch-direct:hover {
  background: #0369a1;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}





/* Toggle m³ vs Litros */
.vol-unit-toggle-group {
  display: inline-flex;
  align-items: center;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.btn-unit-pill {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-unit-pill:hover {
  color: #0f172a;
}

.btn-unit-pill.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.35);
}

.vol-conversion-hint {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.35rem;
  padding-left: 0.2rem;
}

.vol-conversion-hint strong {
  color: #0284c7;
  font-weight: 700;
}

/* Badge Viagem Única Coberta */
.badge-single-trip-covered {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Wrapper e Botão de Dropdown do Cliente */
.cliente-search-wrapper {
  position: relative;
  width: 100%;
}

.has-trailing-icons {
  position: relative;
  display: flex;
  align-items: center;
}

.has-trailing-icons .btn-clear-search-icon {
  right: 28px !important;
}

.btn-dropdown-toggle-icon {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.btn-dropdown-toggle-icon:hover {
  color: #0284c7;
  background: #f1f5f9;
}

/* Dropdown Flutuante de Clientes Reforçado */
.cliente-dropdown-results {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  left: 0 !important;
  right: 0 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  z-index: 9999 !important;
}

/* Alinhamento Rigoroso com a Seção 2 (1fr 1fr e gap de 1rem) */
.volume-commercial-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 1rem !important;
  align-items: start !important;
}

@media (max-width: 640px) {
  .volume-commercial-row {
    grid-template-columns: 1fr !important;
  }
}

.form-label-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 20px;
  margin-bottom: 0.25rem;
}

.label-rate-badge {
  font-size: 0.73rem;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #bae6fd;
}

/* ========================================================
   BARRA DE COMANDO / TOOLBAR UNIFICADA (LINHA ÚNICA LINEAR)
   ======================================================== */
.filter-toolbar-unified {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 0.35rem 0.65rem !important;
  margin-bottom: 0.85rem !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.55rem !important;
  box-shadow: 0 1px 3px rgba(18, 49, 75, 0.04) !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  height: 52px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* 1. Navegador de Data Plano (Sem Card Dentro de Card, Sem Emojis) */
.date-navigator-box {
  display: inline-flex !important;
  align-items: center !important;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  padding: 0 !important;
  gap: 0 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  height: 38px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.date-navigator-box:hover {
  border-color: #94A3B8 !important;
}

.btn-date-nav-step {
  width: 30px !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #64748B !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  padding: 0 !important;
}

.btn-date-nav-step:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

.date-display-trigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 0.75rem !important;
  border: none !important;
  border-left: 1px solid #E2E8F0 !important;
  border-right: 1px solid #E2E8F0 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  background: transparent !important;
  color: #0F172A !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  user-select: none !important;
  position: relative !important;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  white-space: nowrap !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.date-display-trigger:hover {
  background: #F8FAFC !important;
  color: #0284C7 !important;
}

.date-display-trigger input[type="date"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.btn-quick-today {
  background: #E0F2FE !important;
  color: #0284C7 !important;
  border: none !important;
  border-right: 1px solid #BAE6FD !important;
  border-radius: 0 !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  padding: 0 0.55rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.btn-quick-today:hover {
  background: #0284C7 !important;
  color: #FFFFFF !important;
}

.dropdown-presets-wrap {
  position: relative !important;
  height: 100% !important;
}

.btn-presets-toggle {
  width: 26px !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #94A3B8 !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  padding: 0 !important;
}

.btn-presets-toggle:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

.dropdown-presets-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  background: #FFFFFF !important;
  border: 1.5px solid #CBD5E1 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 25px rgba(18, 49, 75, 0.14) !important;
  min-width: 165px !important;
  padding: 0.35rem !important;
  z-index: 100 !important;
  display: none;
  flex-direction: column !important;
  gap: 0.2rem !important;
}

.dropdown-presets-menu.show {
  display: flex !important;
}

.dropdown-presets-menu button {
  text-align: left !important;
  background: transparent !important;
  border: none !important;
  padding: 0.45rem 0.7rem !important;
  font-size: 0.81rem !important;
  font-weight: 600 !important;
  color: #1E293B !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  transition: all 0.15s ease !important;
}

.dropdown-presets-menu button:hover {
  background: #F1F5F9 !important;
  color: #0284C7 !important;
}

.dropdown-presets-menu button.active {
  background: #E0F2FE !important;
  color: #0284C7 !important;
  font-weight: 700 !important;
}

/* 2. Campo de Busca Fluida — EXPANDIDO E INTEGRADO */
.toolbar-search {
  position: relative !important;
  flex: 1 1 200px !important;
  min-width: 170px !important;
  max-width: none !important;
  height: 38px !important;
  box-sizing: border-box !important;
}

.toolbar-search svg {
  position: absolute !important;
  left: 0.75rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 14px !important;
  height: 14px !important;
  stroke: #94A3B8 !important;
  fill: none !important;
  pointer-events: none !important;
}

.toolbar-search input.form-control {
  width: 100% !important;
  padding: 0.38rem 1.8rem 0.38rem 2.2rem !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
  border: 1px solid #CBD5E1 !important;
  background: #FFFFFF !important;
  height: 38px !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.toolbar-search input.form-control:focus {
  border-color: #0284C7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12) !important;
}

.toolbar-search .btn-clear-search-icon {
  position: absolute !important;
  right: 0.55rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  font-size: 0.82rem !important;
  color: #94A3B8 !important;
  cursor: pointer !important;
  padding: 0.2rem !important;
}

.toolbar-search .btn-clear-search-icon:hover {
  color: #0F172A !important;
}

/* 3. Grupo de Selects Operacionais */
.toolbar-selects-group {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-shrink: 0 !important;
}

select.toolbar-select.form-control,
.toolbar-select {
  display: inline-block !important;
  width: auto !important;
  height: 38px !important;
  padding: 0.35rem 1.85rem 0.35rem 0.65rem !important;
  font-size: 0.81rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  border: 1px solid #CBD5E1 !important;
  background-color: #FFFFFF !important;
  color: #1E293B !important;
  outline: none !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease !important;
  cursor: pointer !important;
}

select.toolbar-select.form-control:focus,
.toolbar-select:focus {
  border-color: #0284C7 !important;
}

select.toolbar-select.select-status {
  min-width: 140px !important;
}

select.toolbar-select.select-caminhao {
  min-width: 155px !important;
}

select.toolbar-select.select-motorista {
  min-width: 165px !important; /* Espaço suficiente para "Todos os Motoristas" sem truncar */
}

/* 4. Grupo de Ações: View Switcher + Totalizador */
.toolbar-actions-group {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  margin-left: 0.15rem !important;
}

.toolbar-view-switcher {
  display: inline-flex !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  background: #F1F5F9 !important;
  padding: 0.15rem !important;
  gap: 0.15rem !important;
  height: 38px !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.toolbar-view-switcher .btn-view-toggle {
  background: transparent !important;
  border: none !important;
  padding: 0.2rem 0.65rem !important;
  border-radius: 6px !important;
  font-size: 0.77rem !important;
  font-weight: 700 !important;
  color: #64748B !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.toolbar-view-switcher .btn-view-toggle svg {
  width: 13px !important;
  height: 13px !important;
}

.toolbar-view-switcher .btn-view-toggle.active {
  background: #FFFFFF !important;
  color: #0284C7 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.toolbar-view-switcher .btn-view-toggle:hover:not(.active) {
  color: #0F172A !important;
}

.mural-quick-kpi {
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  padding: 0 0.85rem !important;
  background: #F0F9FF !important;
  border: 1px solid #BAE6FD !important;
  border-radius: 8px !important;
  color: #0369A1 !important;
  font-size: 0.78rem !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.mural-quick-kpi strong {
  color: #0F172A !important;
  font-weight: 800 !important;
  font-size: 0.86rem !important;
}


/* ========================================================
   DASHBOARD EXECUTIVO: CARDS DE INDICADORES NO TOPO DO MURAL
   ======================================================== */
.kpi-grid-mural {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.85rem !important;
  margin-bottom: 0.85rem !important;
  width: 100% !important;
}

.kpi-card-mural {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 0.85rem 1.1rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.85rem !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(18, 49, 75, 0.04) !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease !important;
}

.kpi-card-mural:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(18, 49, 75, 0.08) !important;
  border-color: #CBD5E1 !important;
}

.kpi-card-mural::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 4px !important;
}

.kpi-card-mural.card-realizadas::before { background: #10B981 !important; }
.kpi-card-mural.card-pendentes::before { background: #F59E0B !important; }
.kpi-card-mural.card-faturamento::before { background: #0284C7 !important; }
.kpi-card-mural.card-total::before { background: #6366F1 !important; }

.kpi-icon-wrap {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.card-realizadas .kpi-icon-wrap { background: #ECFDF5 !important; color: #10B981 !important; }
.card-pendentes .kpi-icon-wrap { background: #FFFBEB !important; color: #F59E0B !important; }
.card-faturamento .kpi-icon-wrap { background: #F0F9FF !important; color: #0284C7 !important; }
.card-total .kpi-icon-wrap { background: #EEF2FF !important; color: #6366F1 !important; }

.kpi-icon-wrap svg {
  width: 20px !important;
  height: 20px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
}

.kpi-content-box {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.kpi-label-text {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #64748B !important;
  white-space: nowrap !important;
}

.kpi-main-number {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  margin: 0.12rem 0 !important;
  white-space: nowrap !important;
}

.card-realizadas .kpi-main-number { color: #059669 !important; }
.card-pendentes .kpi-main-number { color: #D97706 !important; }
.card-faturamento .kpi-main-number { color: #0284C7 !important; }
.card-total .kpi-main-number { color: #4F46E5 !important; }

.kpi-sub-text {
  font-size: 0.74rem !important;
  color: #64748B !important;
  white-space: nowrap !important;
  font-weight: 600 !important;
}

/* ========================================================
   FILTROS RÁPIDOS DE DATA EM PÍLULAS (SEM EMOJIS, DIRETO E CLARO)
   ======================================================== */
.toolbar-date-pills {
  display: inline-flex !important;
  gap: 0.25rem !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

.btn-date-pill {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  background: #F8FAFC !important;
  border: 1px solid #CBD5E1 !important;
  color: #475569 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  height: 38px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.btn-date-pill:hover {
  border-color: #0284C7 !important;
  color: #0284C7 !important;
  background: #F0F9FF !important;
}

.btn-date-pill.active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #0284C7 !important;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.25) !important;
}

/* Seletor de Data com Setas Integrado */
.date-stepper-box {
  display: inline-flex !important;
  align-items: center !important;
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  border-radius: 8px !important;
  height: 38px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.date-stepper-box:hover {
  border-color: #94A3B8 !important;
}

.btn-date-step {
  width: 28px !important;
  height: 100% !important;
  background: transparent !important;
  border: none !important;
  color: #64748B !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.15s ease, color 0.15s ease !important;
  padding: 0 !important;
}

.btn-date-step:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

.date-stepper-label {
  padding: 0 0.65rem !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  cursor: pointer !important;
  position: relative !important;
  border-left: 1px solid #E2E8F0 !important;
  border-right: 1px solid #E2E8F0 !important;
  height: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  user-select: none !important;
}

.date-stepper-label:hover {
  background: #F8FAFC !important;
  color: #0284C7 !important;
}

.date-stepper-label input[type="date"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
}



/* ========================================================
   MENU SUSPENSO DE DATA NA TOOLBAR DO MURAL
   ======================================================== */
.toolbar-date-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  flex-shrink: 0 !important;
}

.select-date-preset {
  min-width: 150px !important;
  font-weight: 700 !important;
  color: #0369A1 !important;
  background-color: #F0F9FF !important;
  border: 1.5px solid #BAE6FD !important;
  border-radius: 8px !important;
  height: 38px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0.35rem 1.85rem 0.35rem 0.75rem !important;
}

.select-date-preset:hover {
  border-color: #0284C7 !important;
  background-color: #E0F2FE !important;
}

.select-date-preset:focus {
  border-color: #0284C7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.custom-date-box {
  display: inline-flex;
  align-items: center;
}

.toolbar-custom-date {
  height: 38px !important;
  border: 1.5px solid #0284C7 !important;
  border-radius: 8px !important;
  padding: 0 0.65rem !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #0F172A !important;
  background: #FFFFFF !important;
  width: auto !important;
  box-sizing: border-box !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12) !important;
}



/* ========================================================
   SKELETON LOADERS INSTANTÂNEOS DO KANBAN (0ms FIRST PAINT)
   ======================================================== */
.kanban-skeleton-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 0.95rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: kanbanPulse 1.2s ease-in-out infinite alternate;
}

@keyframes kanbanPulse {
  0% { opacity: 0.45; }
  100% { opacity: 0.95; }
}

.skeleton-line {
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  margin-bottom: 0.6rem;
}

.skeleton-line.short { width: 40%; height: 14px; margin-bottom: 0.8rem; background: #cbd5e1; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 92%; }
.skeleton-count {
  opacity: 0.5;
}


/* Endereço de descarregamento: somente leitura / menu quando houver vários */
.local-entrega-select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.local-entrega-select:disabled, .local-entrega-select.is-locked {
  cursor: default; opacity: 1; color: #0F172A; background-color: #F8FAFC; -webkit-text-fill-color: #0F172A;
}

/* Status em_retorno no mural exibido como concluído */
.drawer-status-pill.badge-em_retorno { background: rgba(16, 185, 129, 0.12); color: #059669; border: 1px solid rgba(16, 185, 129, 0.25); }


/* Modo Cards limpo: oculta todos os filtros, mantendo apenas o alternador Cards / Lista */
.filter-toolbar-unified.cards-mode-clean {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
  margin-bottom: 0.65rem !important;
  justify-content: flex-end !important;
}

.filter-toolbar-unified.cards-mode-clean .toolbar-date-group,
.filter-toolbar-unified.cards-mode-clean .toolbar-search,
.filter-toolbar-unified.cards-mode-clean .toolbar-selects-group {
  display: none !important;
}

.filter-toolbar-unified.cards-mode-clean .toolbar-actions-group {
  margin-left: auto !important;
}
