/* =============================================================
   Controle de Vendas — Design System
   (baseado no mesmo design system do Roteirizae Pro / Financas)
   Direction: Tech/Utility
   Tokens: CSS custom properties + component classes
   ============================================================= */

/* ---- Google Fonts: Inter ----------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ---- Light tokens (default) -------------------------------- */
:root {
  --bg:      oklch(98.5% 0.004 240);
  --surface: oklch(100% 0 0);
  --fg:      oklch(18% 0.012 250);
  --muted:   oklch(54% 0.012 250);
  --border:  oklch(92% 0.005 250);
  --accent:  oklch(55% 0.20 255);
  --accent-hover: oklch(50% 0.22 255);
  --accent-soft: oklch(55% 0.20 255 / 10%);

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ---- Dark tokens ------------------------------------------- */
[data-theme="dark"] {
  --bg:      oklch(14% 0.012 250);
  --surface: oklch(18% 0.014 250);
  --fg:      oklch(92% 0.006 250);
  --muted:   oklch(58% 0.01 250);
  --border:  oklch(24% 0.008 250);
  --accent:  oklch(62% 0.20 260);
  --accent-hover: oklch(66% 0.22 260);
  --accent-soft: oklch(62% 0.20 260 / 12%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ---- Base -------------------------------------------------- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 1280px) {
  body { font-size: 14px; }
}

/* ---- App window (the white outer container) ---------------- */
.app-window {
  backdrop-filter: blur(6px);
  transition: background 0.2s, box-shadow 0.2s;
}

/* ---- Cards ------------------------------------------------- */
.card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s, border-color 0.15s;
}

/* ---- Fields / Inputs --------------------------------------- */
.field {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  padding: 0.625rem 0.875rem;
  outline: none;
  font-size: 0.9rem;
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field::placeholder {
  color: var(--muted);
  opacity: 0.7;
}
select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ---- Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-lg);
}

.btn-soft {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-soft:hover {
  border-color: var(--muted);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: #16a34a;
  color: #fff;
  border-color: #16a34a;
}
.btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}
.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.4rem 0.6rem;
}
.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---- Status badges ----------------------------------------- */
.status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.status-ativo, .status-aprovado, .status-concluida, .status-entregue,
.status-roteirizada, .status-roteirizada_app, .status-venda_realizada {
  background: oklch(85% 0.08 145 / 30%);
  color: oklch(35% 0.12 145);
  border-color: oklch(85% 0.08 145 / 40%);
}
.status-pendente, .status-rascunho, .status-aguardando, .status-novo {
  background: oklch(88% 0.08 85 / 30%);
  color: oklch(40% 0.12 85);
  border-color: oklch(88% 0.08 85 / 40%);
}
.status-em_andamento, .status-em_rota {
  background: oklch(55% 0.20 255 / 10%);
  color: var(--accent);
  border-color: oklch(55% 0.20 255 / 15%);
}
.status-roteirizada_manual, .status-em_negociacao {
  background: oklch(80% 0.08 290 / 30%);
  color: oklch(35% 0.12 290);
  border-color: oklch(80% 0.08 290 / 40%);
}
.status-inativo, .status-cancelada, .status-cancelado, .status-nao_entregue,
.status-sem_interesse, .status-sem_retorno {
  background: oklch(80% 0.08 25 / 30%);
  color: oklch(35% 0.12 25);
  border-color: oklch(80% 0.08 25 / 40%);
}

/* ---- Sidebar rail ------------------------------------------ */
.sidebar-rail {
  display: flex;
  width: 100%;
  min-height: 2.75rem;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--muted);
  transition: all 0.15s ease;
  text-decoration: none;
  position: relative;
}
.sidebar-rail svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
.sidebar-rail span {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-rail:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.sidebar-rail-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-rail-active::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.25rem;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

/* ---- Dashboard hero ---------------------------------------- */
.dashboard-hero {
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

/* ---- Mini metric card -------------------------------------- */
.metric-mini {
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.metric-mini span {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.metric-mini strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.metric-mini-dark {
  background: var(--accent);
  border-color: var(--accent);
}
.metric-mini-dark span,
.metric-mini-dark strong {
  color: #fff;
}

/* ---- Route UF chart ---------------------------------------- */
.route-uf-chart {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}
.route-uf-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.route-uf-chart-header h3 {
  margin: 0;
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 700;
}
.route-uf-chart-header span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.route-uf-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.route-uf-chart-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.route-uf-chart-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--fg);
  font-size: 0.84rem;
  min-width: 0;
}
.route-uf-chart-label strong {
  font-weight: 700;
}
.route-uf-chart-label span:last-child {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.route-uf-chart-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.route-uf-chart-dot-mg {
  background: var(--accent);
}
.route-uf-chart-dot-other {
  background: #16a34a;
}
.route-uf-chart-track {
  height: 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  overflow: hidden;
}
.route-uf-chart-bar {
  height: 100%;
  border-radius: inherit;
}
.route-uf-chart-bar-mg {
  background: var(--accent);
}
.route-uf-chart-bar-other {
  background: #16a34a;
}
@media (max-width: 640px) {
  .route-uf-chart-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Route row (dashboard list) ----------------------------- */
.route-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  transition: background 0.12s ease;
  text-decoration: none;
}
.route-row:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

/* ---- Map containers ---------------------------------------- */
.coordinate-map {
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.coordinate-map .leaflet-control-attribution {
  font-size: 10px;
}
#route-map {
  min-height: 360px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.leaflet-container {
  font-family: inherit;
}

.route-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  font-weight: 700;
}
.route-marker-origin {
  background: #059669;
}

.route-qr {
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.route-qr svg {
  width: 84px;
  height: 84px;
  display: block;
}

/* ---- Tables ----------------------------------------------- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.table-container thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.table-container thead th {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table-container tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}
.table-container tbody tr:last-child td {
  border-bottom: none;
}
.table-container tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 3%, transparent);
}
.table-container tbody tr td:first-child {
  font-weight: 600;
}
.table-container tbody tr.order-row-out-of-state td {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}
.table-container tbody tr.order-row-out-of-state:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

/* ---- Numeric values --------------------------------------- */
.numeric {
  font-variant-numeric: tabular-nums;
}

/* ---- Modal overlay ----------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-content {
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
}

/* ---- Print -------------------------------------------------- */
@media print {
  aside, header, .no-print { display: none !important; }
  body { background: #fff !important; }
  main { padding: 0 !important; }
}

/* ---- Dark mode status overrides ---------------------------- */
[data-theme="dark"] .status-ativo, [data-theme="dark"] .status-aprovado,
[data-theme="dark"] .status-concluida, [data-theme="dark"] .status-entregue,
[data-theme="dark"] .status-roteirizada, [data-theme="dark"] .status-roteirizada_app,
[data-theme="dark"] .status-venda_realizada {
  background: oklch(45% 0.08 145 / 30%);
  color: oklch(75% 0.08 145);
  border-color: oklch(45% 0.08 145 / 35%);
}
[data-theme="dark"] .status-pendente, [data-theme="dark"] .status-rascunho,
[data-theme="dark"] .status-aguardando, [data-theme="dark"] .status-novo {
  background: oklch(45% 0.08 85 / 30%);
  color: oklch(78% 0.08 85);
  border-color: oklch(45% 0.08 85 / 35%);
}
[data-theme="dark"] .status-em_andamento, [data-theme="dark"] .status-em_rota {
  background: oklch(50% 0.16 260 / 25%);
  color: oklch(72% 0.16 260);
  border-color: oklch(50% 0.16 260 / 30%);
}
[data-theme="dark"] .status-roteirizada_manual, [data-theme="dark"] .status-em_negociacao {
  background: oklch(40% 0.08 290 / 30%);
  color: oklch(75% 0.08 290);
  border-color: oklch(40% 0.08 290 / 35%);
}
[data-theme="dark"] .status-inativo, [data-theme="dark"] .status-cancelada,
[data-theme="dark"] .status-cancelado, [data-theme="dark"] .status-nao_entregue,
[data-theme="dark"] .status-sem_interesse, [data-theme="dark"] .status-sem_retorno {
  background: oklch(45% 0.08 25 / 30%);
  color: oklch(75% 0.08 25);
  border-color: oklch(45% 0.08 25 / 35%);
}

/* ---- Transition helpers ------------------------------------ */
.fade-in {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Goal donut (percentual da meta) -------------------------- */
.goal-donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.5rem 0;
}
.goal-donut {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.goal-donut svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.goal-donut circle {
  fill: none;
}
.goal-donut__track {
  stroke: var(--border);
  stroke-width: 14;
}
.goal-donut__segment {
  stroke: var(--accent);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}
.goal-donut__center {
  position: absolute;
  inset: 22%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 50%;
  text-align: center;
  background: var(--surface);
}
.goal-donut__center span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.goal-donut__center strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
}
.goal-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.goal-chart-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.goal-chart-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

/* ---- Notice banner ------------------------------------------- */
.notice-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.1rem;
  background: oklch(88% 0.08 85 / 25%);
  border: 1px solid oklch(88% 0.08 85 / 40%);
  color: oklch(35% 0.1 85);
  margin-bottom: 0.75rem;
}
[data-theme="dark"] .notice-banner {
  background: oklch(45% 0.08 85 / 25%);
  border-color: oklch(45% 0.08 85 / 35%);
  color: oklch(85% 0.08 85);
}

/* ---- Empty state ------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.empty-state svg {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.75rem;
  opacity: 0.4;
}
.empty-state p {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Kanban de atendimentos (estilo Trello) */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-column { min-width: 260px; flex: 1 0 260px; background: color-mix(in srgb, var(--fg) 3%, var(--surface)); border-radius: var(--radius-lg); padding: 10px; }
.kanban-column-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; padding: 2px 4px; }
.kanban-column-head h3 { font-size: 13px; font-weight: 700; color: var(--fg); margin: 0; }
.kanban-count { background: var(--border); color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-left: auto; }
.kanban-column-total { font-size: 11px; color: var(--accent); font-weight: 700; margin: 0 0 10px 4px; }
.kanban-cards { min-height: 60px; }

.kanban-card { background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 10px 12px; margin-bottom: 8px; cursor: grab; position: relative; transition: box-shadow .15s, transform .15s; border-left: 3px solid var(--border); }
.kanban-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.kanban-card[data-status="novo"] { border-left-color: oklch(40% 0.12 85); }
.kanban-card[data-status="em_andamento"] { border-left-color: var(--accent); }
.kanban-card[data-status="em_negociacao"] { border-left-color: oklch(35% 0.12 290); }
.kanban-card[data-status="venda_realizada"] { border-left-color: oklch(35% 0.12 145); }
.kanban-card[data-status="sem_interesse"],
.kanban-card[data-status="sem_retorno"] { border-left-color: oklch(35% 0.12 25); }

[data-theme="dark"] .kanban-card[data-status="novo"] { border-left-color: oklch(78% 0.08 85); }
[data-theme="dark"] .kanban-card[data-status="em_andamento"] { border-left-color: oklch(72% 0.16 260); }
[data-theme="dark"] .kanban-card[data-status="em_negociacao"] { border-left-color: oklch(75% 0.08 290); }
[data-theme="dark"] .kanban-card[data-status="venda_realizada"] { border-left-color: oklch(75% 0.08 145); }
[data-theme="dark"] .kanban-card[data-status="sem_interesse"],
[data-theme="dark"] .kanban-card[data-status="sem_retorno"] { border-left-color: oklch(75% 0.08 25); }

.kanban-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.kanban-card-name { font-size: 13px; font-weight: 600; color: var(--fg); margin: 0; }
.kanban-card-actions { display: flex; gap: 2px; opacity: .55; }
.kanban-card-actions:hover { opacity: 1; }
.kanban-card-actions button { border: none; background: none; cursor: pointer; padding: 3px; border-radius: 4px; color: var(--muted); line-height: 1; }
.kanban-card-actions button:hover { background: var(--accent-soft); color: var(--accent); }
.kanban-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.kanban-chip { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--border); color: var(--muted); font-weight: 600; }
.kanban-value { font-size: 12px; font-weight: 700; color: var(--accent); margin: 6px 0 0; }
.kanban-owner { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.kanban-avatar { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.kanban-card-editlink { margin-top: 8px; display: inline-block; }

/* ---- Cliente: abas verticais de cadastro -------------------- */
.client-edit-card {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
}
.client-edit-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}
.client-edit-tab {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.8rem;
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  color: var(--muted);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.client-edit-tab svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.client-edit-tab:hover,
.client-edit-tab.is-active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}
.client-edit-panels {
  min-width: 0;
}
.client-edit-panel[hidden] {
  display: none;
}
.client-geolocation-status {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.client-geolocation-status.is-success { color: oklch(52% 0.14 145); }
.client-geolocation-status.is-error { color: oklch(55% 0.18 25); }
.client-geolocation-attribution {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}
.client-geolocation-attribution a { color: var(--accent); }
.client-city-location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.client-location-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: oklch(62% 0.16 145);
  line-height: 1;
}
.client-location-pin svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.4;
}
@media (max-width: 767px) {
  .client-edit-card {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .client-edit-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.75rem;
  }
  .client-edit-tab {
    width: max-content;
    white-space: nowrap;
  }
}

/* ---- Rota: abas de inclusao e indicador de logistica -------- */
[data-order-panel][hidden] {
  display: none;
}
.order-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.order-tab {
  padding: 0.5rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  background: none;
}
.order-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.logistics-dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: var(--radius-sm, 0.375rem);
  border: 1px solid transparent;
  background: oklch(60% 0.19 25);
  cursor: pointer;
  transition: background 0.15s ease;
}
.logistics-dot.is-sent {
  background: oklch(62% 0.16 145);
}
.logistics-dot[disabled] {
  opacity: 0.5;
  cursor: progress;
}
