/* tecnico.css — Design Minimalista, Limpo e Padronizado */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;

  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --f-xs: 11px;
  --f-sm: 13px;
  --f-base: 15px;
  --f-lg: 18px;
  --f-xl: 21px;

  --brand: #214a63;
  --brand-light: #f0f4f7;

  --tag-bg: #f8fafc;
  --tag-border: #e2e8f0;
  --tag-text: #475569;

  --tag-occ-bg: #fff7ed;
  --tag-occ-border: #fed7aa;
  --tag-occ-text: #9a3412;

  --tag-vac-bg: #f0fdf4;
  --tag-vac-border: #bbf7d0;
  --tag-vac-text: #166534;

  --tag-urg-bg: #fef2f2;
  --tag-urg-border: #fecaca;
  --tag-urg-text: #991b1b;

  --radius: 12px;
  --radius-sm: 6px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--f-base)/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  padding-top: calc(52px + var(--safe-t));
  padding-bottom: calc(64px + var(--safe-b));
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); }

/* ---------- Topbar com Logo Horizontal ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0;
  height: calc(52px + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  z-index: 1000;
}

.topbar-logo {
  height: 26px;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.sync {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--f-xs); font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: #f8fafc; border: 1px solid var(--line); color: var(--muted);
}
.sync-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #94a3b8;
}
.sync.ok { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.sync.ok .sync-dot { background: #16a34a; }
.sync.warn .sync-dot { background: #d97706; }
.sync.off .sync-dot { background: #dc2626; }
.sync.busy .sync-dot { background: #2563eb; }

.view { padding: 12px 16px; max-width: 580px; margin: 0 auto; }

/* ---------- Tabbar Inferior Limpa ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  z-index: 1000;
}
.tabbar a {
  min-height: 54px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: var(--f-xs); font-weight: 600;
}
.tabbar a.on { color: var(--brand); }
.tabbar svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; }
#badge-fila {
  position: absolute; top: 8px; right: calc(50% - 20px);
  background: var(--brand); color: #fff; border-radius: 999px;
  padding: 1px 5px; font-size: 10px; font-weight: 700;
}

/* ---------- HOME: HERO ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 20px;
  padding: 16px 16px 14px; margin-bottom: 16px;
  background:
    radial-gradient(120% 90% at 100% 0%, #3b7290 0%, transparent 55%),
    linear-gradient(160deg, #24506a 0%, #1a3b50 100%);
  box-shadow: 0 12px 28px rgba(33, 74, 99, 0.25);
}
.hero-date {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; background: rgba(255, 255, 255, 0.14);
  padding: 4px 9px; border-radius: 999px;
}
.hero-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  margin: 10px 0 0; line-height: 1.15; color: #fff;
}
.hero-sub { font-size: var(--f-sm); color: rgba(255, 255, 255, 0.72); margin-top: 2px; }

.hero-segments { display: flex; gap: 4px; margin-top: 12px; }
.hero-segments i {
  flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.18);
}
.hero-segments i.is-done { background: #fff; }
.hero-segments i.is-ongoing { background: #7dd3fc; animation: seg-pulse 1.6s ease-in-out infinite; }
@keyframes seg-pulse { 50% { opacity: 0.4; } }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.hero-stat { padding: 0 4px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.hero-stat:first-child { border-left: none; padding-left: 0; }
.hero-stat strong {
  display: block; font-size: 20px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-stat span { display: block; margin-top: 3px; font-size: 11px; color: rgba(255, 255, 255, 0.72); }
.hero-stat.is-alert strong { color: #fca5a5; }

.hero-next {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none;
}
.hero-next-time {
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: #fff; color: var(--brand); padding: 4px 8px; border-radius: 8px; flex-shrink: 0;
}
.hero-next-body { min-width: 0; flex: 1; }
.hero-next-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.7);
}
.hero-next-title {
  font-size: var(--f-sm); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-next-arrow { display: flex; color: #fff; opacity: 0.8; flex-shrink: 0; }

/* ---------- CABEÇALHO DE SEÇÃO ---------- */
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 14px;
}
.section-head h2 {
  font-size: var(--f-sm); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted);
}
.section-count { font-size: var(--f-xs); font-weight: 600; color: var(--muted); }

/* ---------- AGENDA: trilha de horários + cartões compactos ---------- */
.agenda { list-style: none; padding: 0; margin: 0; }
.slot { display: grid; grid-template-columns: 48px 1fr; gap: 6px; }
.slot + .slot { margin-top: 8px; }

.slot-time {
  position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 6px;
}
.slot-time strong {
  font-size: 14px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.slot-time span {
  margin-top: 3px; font-size: 8.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; text-align: center; white-space: nowrap;
}
.slot-time::after {
  content: ""; position: absolute; left: 50%; top: 38px; bottom: -12px;
  width: 1px; background: #cbd5e1; transform: translateX(-50%);
}
.slot:last-child .slot-time::after { display: none; }
.is-ongoing .slot-time strong,
.is-ongoing .slot-time span { color: #1d4ed8; }

/* Cartão compacto: miniatura à esquerda, texto à direita */
.job {
  display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; min-width: 0;
  background: var(--surface); border-radius: 14px; padding: 8px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease;
}
.job:active { transform: scale(0.98); }

.job-thumb {
  position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.job-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-thumb.is-placeholder {
  background: linear-gradient(135deg, #e6eef4, #f1f5f9); color: var(--brand);
}
.job-thumb.is-placeholder svg { width: 22px; height: 22px; }

.job-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.job-kicker {
  font-size: 10px; font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.job-title {
  font-size: 14px; font-weight: 700; color: var(--ink);
  line-height: 1.25; margin: 0; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.job-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; margin-top: 1px;
}
.meta { display: inline-flex; align-items: center; gap: 4px; }
.meta.vacant { color: #15803d; }
.meta.occupied { color: #c2410c; }
.meta.urgent { color: #dc2626; }
.meta.urgent::before, .meta.ongoing::before, .meta.done::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.meta.ongoing { color: #1d4ed8; }
.meta.done { color: #15803d; }
.meta.same-place { color: #0f766e; }
.meta.group-count { color: #334155; }

/* ---------- AGENDA COMPACTA ---------- */
.agenda .slot { grid-template-columns: 44px 1fr; gap: 10px; }
.agenda .slot + .slot { margin-top: 10px; }
.agenda .slot-time::after { content: none; }
.agenda .slot-time span { font-size: 10px; }
.agenda .is-done { opacity: 0.5; }

.ag-item, .ag-group {
  display: block; color: inherit; text-decoration: none;
  background: #fff; border-radius: 12px; padding: 9px 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  min-width: 0;
}
.agenda .is-ongoing .ag-item,
.agenda .is-ongoing .ag-group { box-shadow: inset 3px 0 0 #1d4ed8, 0 1px 3px rgba(15, 23, 42, 0.06); }

.ag-local {
  display: block; font-size: 11px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ag-local em { font-style: normal; color: #0f766e; font-weight: 600; }
.ag-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; min-width: 0; }
.ag-title {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ag-urgent { width: 6px; height: 6px; border-radius: 50%; background: #dc2626; flex-shrink: 0; }

/* grupo: mesmo apartamento */
.ag-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ag-group-head .ag-local { flex: 1; min-width: 0; }
.ag-count {
  font-size: 11px; font-weight: 700; color: #334155; background: #f1f5f9;
  border-radius: 999px; padding: 2px 8px; flex-shrink: 0;
}
.ag-sub { list-style: none; margin: 6px 0 0; padding: 0; }
.ag-sub li + li { border-top: 1px solid var(--line); }
.ag-sub a { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: inherit; text-decoration: none; min-width: 0; }
.ag-sub .ag-title { font-size: 13px; }
.ag-time { font-size: 11px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ag-sub li.is-ongoing .ag-title { color: #1d4ed8; }
.ag-sub li.is-done .ag-title { text-decoration: line-through; color: var(--muted); }
.meta-sep { color: #cbd5e1; }

.is-ongoing .job { background: #eff6ff; }
.is-done .job { opacity: 0.5; background: #f8fafc; box-shadow: none; }
.is-done .job-title { text-decoration: line-through; text-decoration-color: #94a3b8; }

/* OS sem horário definido: lista própria, sem trilha */
.section-gap { margin-top: 22px; }
.avulsas { list-style: none; padding: 0; margin: 0; }
.solo + .solo { margin-top: 8px; }

/* Etiquetas */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 7px; border-radius: var(--radius-sm);
  font-size: var(--f-xs); font-weight: 600; line-height: 1;
  background: var(--tag-bg); border: 1px solid var(--tag-border); color: var(--tag-text);
}
.tag svg { stroke: currentColor; flex-shrink: 0; }
.tag.occupied    { background: var(--tag-occ-bg); border-color: var(--tag-occ-border); color: var(--tag-occ-text); }
.tag.vacant      { background: var(--tag-vac-bg); border-color: var(--tag-vac-border); color: var(--tag-vac-text); }
.tag.urgent      { background: var(--tag-urg-bg); border-color: var(--tag-urg-border); color: var(--tag-urg-text); }
.tag.tag-ongoing { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tag.done        { background: var(--tag-vac-bg); border-color: var(--tag-vac-border); color: var(--tag-vac-text); }

/* ---------- LINHA DO TEMPO DA ROTA (TIMELINE) ---------- */
.timeline-route {
  list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column;
}

.timeline-step { display: flex; gap: 12px; position: relative; }
.timeline-track {
  display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 24px;
}
.timeline-node {
  width: 24px; height: 24px; border-radius: 50%; background: #ffffff;
  border: 1.5px solid #cbd5e1; color: var(--muted); font-size: var(--f-xs);
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  z-index: 2; font-variant-numeric: tabular-nums; transition: all 0.2s ease;
}
.timeline-line { width: 2px; flex: 1; background: #e2e8f0; margin: 3px 0; }

.timeline-card {
  flex: 1; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}
.timeline-card:active { background: #fbfcfd; }
.timeline-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.timeline-time {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--f-xs); color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums;
}
.timeline-apt { font-size: var(--f-sm); color: var(--brand); font-weight: 700; }
.timeline-title { font-size: var(--f-base); font-weight: 600; color: var(--ink); line-height: 1.3; margin: 0; }
.timeline-addr {
  display: inline-flex; align-items: center; gap: 4px; font-size: var(--f-xs); color: var(--muted); margin-top: 2px;
}
.timeline-addr svg { stroke: var(--muted); flex-shrink: 0; }

.timeline-step.is-ongoing .timeline-node {
  background: var(--brand); border-color: var(--brand); color: #ffffff;
  box-shadow: 0 0 0 3px rgba(33, 74, 99, 0.15);
}
.timeline-step.is-ongoing .timeline-card {
  border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 3px 10px rgba(33, 74, 99, 0.05);
}
.timeline-badge-ongoing {
  display: inline-flex; align-items: center; font-size: var(--f-xs); font-weight: 700;
  color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; padding: 1px 6px; border-radius: 4px;
}

/* ---------- MAPA LEAFLET COM HIGHLIGHT ---------- */
.map-wrapper {
  position: relative; width: 100%; height: 300px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #e2e8f0;
  isolation: isolate; z-index: 1; margin-bottom: 12px;
}
.tec-map { width: 100%; height: 100%; }

.tec-map-loader, .tec-map-offline-msg {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 8px; color: var(--muted); font-size: var(--f-sm);
}
.spinner {
  width: 24px; height: 24px; border: 2px solid rgba(33, 74, 99, 0.2);
  border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tec-marker-badge { background: none; border: none; }
.tec-badge-inner {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand);
  color: #ffffff; border: 2px solid #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px;
}
.tec-badge-inner.is-ongoing {
  background: #214a63; border-color: #f7a287; border-width: 2.5px;
  transform: scale(1.15); box-shadow: 0 0 0 3px rgba(247, 162, 135, 0.45);
}
.tec-badge-pulse {
  position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #f7a287;
  animation: map-pulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite; pointer-events: none;
}
@keyframes map-pulse { 0% { transform: scale(0.9); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

.tec-user-gps { background: none; border: none; }
.user-pulse {
  width: 16px; height: 16px; background: #2563eb; border: 2px solid #ffffff;
  border-radius: 50%; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.3);
}

.btn-gps-locate {
  position: absolute; bottom: 12px; right: 12px; z-index: 1000;
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px 0 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-secondary);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  font: inherit; font-size: var(--f-sm); font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.btn-gps-locate svg {
  width: 16px; height: 16px;
  stroke: var(--brand); fill: none; stroke-width: 2.2;
  transition: transform 0.4s ease;
}
.btn-gps-locate:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18); }
.btn-gps-locate:active { transform: scale(0.96); }
.btn-gps-locate.is-loading svg { animation: gps-spin 0.9s linear infinite; }
.btn-gps-locate.is-active { color: var(--brand); }
.btn-gps-locate.is-active svg { transform: rotate(0deg); }

@keyframes gps-spin { to { transform: rotate(360deg); } }

.tec-map-popup strong { display: block; font-size: var(--f-sm); color: var(--ink); }
.tec-map-popup p { margin: 2px 0 6px; font-size: var(--f-xs); color: var(--muted); }
.popup-btn {
  display: inline-block; background: var(--brand); color: #fff !important;
  font-size: var(--f-xs); font-weight: 600; padding: 3px 8px; border-radius: 4px;
}

.page-head { margin-bottom: 12px; }
.page-head h1 { font-size: var(--f-lg); }
.page-head p { margin: 2px 0 0; font-size: var(--f-sm); color: var(--muted); }

/* ---------- DETALHES DA OS (2 BLOCOS DISTINTOS) ---------- */
.detail-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.btn-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600; color: var(--brand); font-size: var(--f-sm); padding: 4px 0;
}
.detail-id { font-weight: 600; font-size: var(--f-xs); color: var(--muted); }

.detail-cards-wrapper {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 76px;
}
.detail-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}
.detail-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.detail-type { font-size: var(--f-xs); font-weight: 600; text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em; }
.detail-title { font-size: var(--f-lg); line-height: 1.3; margin: 4px 0 10px; }

.section-block { margin-top: 10px; border-top: 1px solid var(--line-subtle); padding-top: 10px; }
.section-block h3 { font-size: var(--f-xs); text-transform: uppercase; color: var(--muted); margin-bottom: 4px; letter-spacing: 0.03em; }

.description-text {
  margin: 0; font-size: var(--f-base); line-height: 1.5; color: var(--ink-secondary);
}
.description-text.pre { white-space: pre-wrap; word-break: break-word; }

/* Bloco de Observações */
.observation-box {
  background: #fff8ef; border: 1px solid #fde4c7; border-left: 3px solid #d97706;
  border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 6px;
}
.observation-box p {
  margin: 0; font-size: var(--f-sm); color: #92400e; line-height: 1.45;
}
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- GRADE DE FOTOS E VÍDEOS ANEXADOS (CORRIGIDA) ---------- */
.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.media-thumb-card {
  position: relative;
  width: 90px;
  height: 62px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #142834;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: block;
  outline: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.media-thumb-card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.media-thumb-card:active {
  transform: scale(0.96);
}

.media-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-thumb-card.is-video .video-symbol {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(33, 74, 99, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.media-thumb-card.is-video .video-symbol svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* Bloco do Apartamento */
.property-detail-box {
  display: flex; flex-direction: column; gap: 6px; background: #f8fafc;
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-top: 4px;
}
.property-main-line { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.property-name { font-size: var(--f-base); font-weight: 600; }
.property-sub-line { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--f-sm); }
.property-icon { display: inline-flex; color: var(--brand); }

/* Ações Fixas na Base */
.fixed-actions {
  position: fixed; bottom: calc(56px + var(--safe-b)); left: 0; right: 0;
  padding: 10px 16px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); z-index: 90; display: flex; gap: 8px; max-width: 580px; margin: 0 auto;
}
.btn {
  flex: 1; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 8px; font-size: var(--f-sm); font-weight: 600; border: none; cursor: pointer;
}
.action-start { background: var(--brand); color: #fff; }
.action-exec  { background: #15803d; color: #fff; }

/* ---------- FORMULÁRIO DE EXECUÇÃO ---------- */
.exec-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 80px; }
.form-group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 10px;
}
.form-group legend { font-size: var(--f-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; padding: 0 4px; }

.status-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.status-option input { position: absolute; opacity: 0; pointer-events: none; }
.status-option span {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 4px; font-weight: 600; font-size: var(--f-sm);
  border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; color: var(--muted);
}
.status-option input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }

.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-item label { display: block; font-size: var(--f-xs); font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.time-input-wrap { display: flex; gap: 4px; }
.time-input-wrap input { flex: 1; }
.btn-now {
  background: #f1f5f9; border: 1px solid var(--line); border-radius: 6px; font-size: var(--f-xs); font-weight: 600;
  padding: 0 8px; cursor: pointer; color: var(--ink);
}

input, textarea, select {
  font: inherit; font-size: 16px; padding: 8px 10px; width: 100%; border: 1px solid var(--line);
  border-radius: 6px; background: #fff; color: var(--ink); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); }

.stock-item-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; height: 38px; }
.step-btn { width: 32px; height: 100%; background: #f8fafc; border: none; font-weight: 600; cursor: pointer; }
.step-input { width: 40px; height: 100%; border: none; text-align: center; font-weight: 600; padding: 0; }
.btn-remove { width: 34px; height: 38px; border: 1px solid var(--tag-urg-border); background: var(--tag-urg-bg); color: var(--tag-urg-text); border-radius: 6px; cursor: pointer; }
.btn-secondary {
  width: 100%; min-height: 40px; background: #f8fafc; border: 1px dashed #cbd5e1;
  border-radius: 6px; font-size: var(--f-sm); font-weight: 600; color: var(--brand); cursor: pointer;
}

.receipt-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.receipt-header { display: flex; justify-content: space-between; align-items: center; font-size: var(--f-xs); font-weight: 600; }
.btn-remove-link { background: none; border: none; color: var(--tag-urg-text); font-size: var(--f-xs); font-weight: 600; cursor: pointer; }
.receipt-preview { width: 100%; max-height: 160px; object-fit: contain; border-radius: 4px; background: #fff; border: 1px solid var(--line); }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-cell { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-delete {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(15, 23, 42, 0.75); color: #fff; border: none; font-size: 10px; cursor: pointer;
}

.btn-file-upload {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
  background: #ffffff; border: 1px solid var(--line); border-radius: 6px; color: var(--ink);
  font-weight: 600; font-size: var(--f-sm); cursor: pointer;
}
.btn-file-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Fila */
.queue-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.queue-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.queue-card.has-error { border-color: var(--tag-urg-border); }
.queue-card-top { display: flex; justify-content: space-between; align-items: center; font-size: var(--f-sm); }
.queue-error { font-size: var(--f-xs); color: var(--tag-urg-text); margin: 4px 0 0; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); font-size: var(--f-sm); }
.banner {
  display: flex; align-items: center; gap: 6px; background: var(--tag-occ-bg);
  color: var(--tag-occ-text); border: 1px solid var(--tag-occ-border);
  border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; font-size: var(--f-xs); font-weight: 600;
}
.toast {
  position: fixed; left: 50%; bottom: calc(72px + var(--safe-b));
  transform: translateX(-50%) translateY(16px);
  background: #0f172a; color: #fff; padding: 8px 16px; border-radius: 999px;
  font-size: var(--f-sm); font-weight: 500; opacity: 0; transition: all .2s ease;
  pointer-events: none; z-index: 2000; box-shadow: 0 4px 12px rgba(0,0,0,0.15); max-width: 85vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* ---------- DETALHE DA OS (v3) ---------- */
.od-wrap { padding-bottom: 96px; }
.od-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.od-id {
  font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.od-head { padding: 0 2px 16px; }
.od-title {
  font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em;
  color: var(--ink); margin: 0 0 6px;
}
.od-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--f-sm); color: var(--muted);
}
.od-meta span { display: inline-flex; align-items: center; gap: 5px; }
.od-meta svg { stroke: currentColor; }
.od-urgent { color: #dc2626; font-weight: 600; }

.od-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
}
.od-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin: 0 0 8px;
}
.od-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.od-label-row .od-label { margin: 0; }
.od-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--line-subtle); padding: 2px 7px; border-radius: 999px;
}
.od-text {
  margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-secondary);
  white-space: pre-wrap; word-break: break-word;
}


.od-note {
  background: #fffaf2; border: 1px solid #fde7c7; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 12px;
}
.od-note .od-label { color: #b45309; }
.od-note p { margin: 0; font-size: 14px; line-height: 1.5; color: #7c2d12; white-space: pre-wrap; word-break: break-word; }

.od-gallery {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 4px; -webkit-overflow-scrolling: touch;
}
.od-thumb {
  position: relative; flex: 0 0 132px; height: 96px; border-radius: 12px; overflow: hidden;
  border: 0; padding: 0; background: #e2e8f0; cursor: pointer; scroll-snap-align: start;
}
.od-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-play {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(15, 23, 42, 0.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.od-play svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }

.od-empty-media {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border: 1px dashed #cbd5e1; border-radius: 12px; color: var(--muted); font-size: var(--f-sm);
}
.od-empty-media svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; }

.od-occ { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.od-occ.is-occ { background: #fff7ed; color: #9a3412; }
.od-occ.is-vac { background: #f0fdf4; color: #166534; }
.od-prop-main { display: flex; align-items: center; gap: 10px; font-size: var(--f-base); color: var(--ink); }
.od-prop-main strong { font-weight: 600; }
.od-prop-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.od-prop-addr {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line-subtle); font-size: var(--f-sm); color: var(--muted);
}
.od-prop-addr > svg { flex-shrink: 0; color: var(--brand); }
.od-addr-text { flex: 1; min-width: 0; }
.od-map { color: var(--brand); font-weight: 600; font-size: var(--f-xs); white-space: nowrap; }

.od-actions {
  position: fixed; left: 0; right: 0; bottom: calc(56px + var(--safe-b)); z-index: 90;
  display: flex; gap: 8px; max-width: 580px; margin: 0 auto;
  padding: 10px 16px; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.od-actions .btn { min-height: 48px; border-radius: 12px; font-size: var(--f-sm); }

/* ---------- REGISTRO DE EXECUÇÃO (v2) ---------- */
.od-kicker {
  display: block; font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px;
}
.ex-form { position: relative; }
.ex-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin-bottom: 12px;
}
.ex-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin: 0 0 10px;
}
.ex-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ex-label-row .ex-label { margin: 0; }
.ex-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--line-subtle); padding: 2px 7px; border-radius: 999px;
}

/* Controle segmentado */
.ex-seg {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: var(--line-subtle); padding: 4px; border-radius: 12px;
}
.ex-seg-opt { position: relative; }
.ex-seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ex-seg-opt span {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 40px; border-radius: 9px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.ex-seg-opt span svg { width: 13px; height: 13px; stroke: currentColor; }
.ex-seg-opt input:checked + span { background: var(--brand); color: #fff; }
.ex-seg-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ex-seg-sm { display: inline-grid; grid-template-columns: 1fr 1fr; width: auto; padding: 3px; }
.ex-seg-btn {
  border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer;
}
.ex-seg-btn.is-on { background: var(--brand); color: #fff; }

.ex-textarea {
  display: block; width: 100%; margin-top: 10px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff; resize: vertical;
}
.ex-textarea:focus { outline: none; border-color: var(--brand); }

/* Horário com roletas */
.ex-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-tp { position: relative; }
.ex-tp .ex-label { display: block; margin-bottom: 6px; }
.tp-field {
  width: 100%; height: 48px; display: flex; justify-content: space-between; align-items: center;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font: inherit; color: var(--ink); cursor: pointer; box-sizing: border-box;
}
.tp-field:focus-visible, .tp-field[aria-expanded="true"] {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(33, 74, 99, 0.12);
}
.tp-field svg { width: 16px; height: 16px; stroke: var(--muted); flex-shrink: 0; }
.tp-val { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

.tp-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14); padding: 8px; overflow: hidden;
}
.tp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tp-now {
  border: 0; background: var(--brand-light); color: var(--brand); font: inherit;
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.tp-ok {
  border: 0; background: var(--brand); color: #fff; font: inherit;
  font-size: 12px; font-weight: 600; padding: 6px 16px; border-radius: 8px; cursor: pointer;
}
.tp-wheel { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 200px; }
.tp-band {
  position: absolute; left: 8px; right: 8px; top: 50%; height: 40px; transform: translateY(-50%);
  background: var(--brand-light); border-radius: 10px; pointer-events: none;
}
.tp-col {
  position: relative; height: 200px; overflow-y: auto; scroll-snap-type: y mandatory;
  padding: 80px 0; scrollbar-width: none; overscroll-behavior: contain;
}
.tp-col::-webkit-scrollbar { display: none; }
.tp-item {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 40px;
  padding: 0; border: 0; background: transparent; font: inherit; font-size: 17px;
  color: var(--muted); font-variant-numeric: tabular-nums; scroll-snap-align: center; cursor: pointer;
}
.tp-item.is-sel { color: var(--brand); font-size: 20px; font-weight: 700; }

/* Descrição (editor) */
.ex-card jestor-editor { display: flex; flex-direction: column; width: 100%; height: 150px; }
.ex-card jestor-editor.ex-motivo { height: 120px; margin-top: 10px; }

/* Peças */
.ex-pecas { display: flex; flex-direction: column; gap: 10px; }
.ex-peca {
  display: flex; flex-direction: column; gap: 8px; padding: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #fcfdfe;
}
.ex-peca-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ex-remove {
  width: 32px; height: 32px; border: 0; border-radius: 8px; flex-shrink: 0;
  background: var(--tag-urg-bg); color: var(--tag-urg-text); font-size: 18px; line-height: 1; cursor: pointer;
}
.ex-input {
  width: 100%; height: 44px; box-sizing: border-box; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-size: 15px; color: var(--ink);
}
.ex-input:focus { outline: none; border-color: var(--brand); }
.ex-row { display: flex; gap: 8px; align-items: center; }
.ex-row > .ex-input, .ex-row > .ex-money { flex: 1; min-width: 0; }

.ex-pick {
  flex: 1; min-width: 0; height: 44px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer;
}
.ex-pick:focus-visible { outline: none; border-color: var(--brand); }
.ex-pick-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-pick.is-empty .ex-pick-label { color: var(--muted); }
.ex-chev {
  width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--muted);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ex-pick[aria-expanded="true"] .ex-chev { stroke: var(--brand); animation: ex-chev-open .25s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes ex-chev-open { from { transform: rotate(0deg); } to { transform: rotate(180deg); } }

.ex-seg-sm.ex-seg-3 { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }

/* Folha de seleção de estoque (mobile) */
.ex-sheet-wrap { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; justify-content: flex-end; }
.ex-sheet-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); animation: ex-fade .2s ease; }
.ex-sheet {
  position: relative; display: flex; flex-direction: column; max-height: 78vh; max-height: 78dvh;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(15, 23, 42, .18);
  animation: ex-up .28s cubic-bezier(.2,.7,.3,1);
}
.ex-sheet-drag { touch-action: none; cursor: grab; }
.ex-sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: #cbd5e1; margin: 4px auto 10px; }
.ex-sheet-head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
  font-size: 16px; font-weight: 700; color: var(--ink);
}
.ex-sheet-close { border: 0; background: transparent; color: var(--brand); font: inherit; font-size: 15px; font-weight: 600; padding: 8px 4px; cursor: pointer; }
.ex-search { position: relative; margin-bottom: 10px; }
.ex-search > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.ex-search-input {
  width: 100%; height: 46px; box-sizing: border-box; padding: 0 44px;
  border: 1px solid var(--line); border-radius: 12px; background: #f8fafc;
  font: inherit; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none;
}
.ex-search-input:focus { outline: none; border-color: var(--brand); background: #fff; }
.ex-search-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.ex-search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: #e2e8f0; color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.ex-search-clear[hidden] { display: none; }
.ex-opts {
  flex: 1 1 auto; min-height: 0; list-style: none; margin: 0; padding: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
}
.ex-opts::-webkit-scrollbar { width: 4px; }
.ex-opts::-webkit-scrollbar-track { background: transparent; }
.ex-opts::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.ex-opts li[hidden] { display: none; }
.ex-opt {
  width: 100%; min-height: 52px; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 10px; border: 0; border-bottom: 1px solid #f1f5f9; border-radius: 0;
  background: transparent; font: inherit; font-size: 15px; color: var(--ink); text-align: left; cursor: pointer;
}
.ex-opt span { min-width: 0; overflow-wrap: anywhere; }
.ex-opt small { flex-shrink: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-opt.is-on { color: var(--brand); font-weight: 700; background: var(--brand-light); }
.ex-opt:active { background: var(--brand-light); }
.ex-empty { margin: 18px 0; text-align: center; font-size: 14px; color: var(--muted); }
.ex-empty[hidden] { display: none; }
@keyframes ex-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ex-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Itens de estoque dentro do card */
.ex-itens { display: flex; flex-direction: column; gap: 8px; }
.ex-item-rm {
  width: 30px; height: 44px; flex-shrink: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}

/* Folha responsiva: inferior no celular, centralizada em telas maiores */
@media (min-width: 640px) {
  .ex-sheet-wrap { align-items: center; justify-content: center; }
  .ex-sheet {
    width: min(520px, calc(100vw - 32px)); max-height: 80vh; border-radius: 18px;
    animation: ex-pop .22s ease;
  }
  .ex-sheet-grab { display: none; }
}
@keyframes ex-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Compra: editor de texto padrão */
.ex-peca jestor-editor.ex-compra-editor { display: flex; flex-direction: column; width: 100%; height: 140px; }
.ex-row > .ex-pick { flex: 1; }

/* Compra: valor e notas */
.ex-valor { display: flex; width: 100%; box-sizing: border-box; }
.ex-notas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ex-nota-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e2e8f0; }
.ex-nota-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.ex-nota-add { grid-column: 1 / -1; }
.ex-money {
  display: flex; align-items: center; gap: 6px; height: 44px; box-sizing: border-box;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.ex-money span { font-size: 13px; font-weight: 600; color: var(--muted); }
.ex-money input {
  flex: 1; min-width: 0; width: 100%; border: 0; padding: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
}
.ex-money input:focus { outline: none; }
.ex-attach {
  position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 12px; box-sizing: border-box; border: 1px dashed #cbd5e1; border-radius: 10px;
  font-size: 12px; font-weight: 600; color: var(--brand); cursor: pointer;
}
.ex-attach svg { width: 15px; height: 15px; stroke: currentColor; }
.ex-attach input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.ex-nota {
  width: 44px; height: 44px; flex-shrink: 0; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); cursor: pointer;
}
.ex-stepper {
  display: flex; align-items: center; height: 44px; flex-shrink: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.ex-stepper .step-btn {
  width: 36px; height: 100%; border: 0; background: var(--line-subtle);
  font-size: 16px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.ex-stepper .step-input {
  width: 44px; height: 100%; border: 0; padding: 0; background: transparent;
  text-align: center; font-size: 15px; font-weight: 600; color: var(--ink);
}
.ex-add {
  width: 100%; height: 44px; margin-top: 10px; box-sizing: border-box;
  border: 1px dashed #cbd5e1; border-radius: 12px; background: transparent;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--brand); cursor: pointer;
}

/* Fotos */
.ex-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ex-photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e2e8f0; }
.ex-photo img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.ex-photo video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; background: #0f172a; }
.ex-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%; background: rgba(15, 23, 42, .6); color: #fff;
  font-size: 12px; display: grid; place-items: center; pointer-events: none;
}
.ex-photo-del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: rgba(15, 23, 42, 0.7); color: #fff; font-size: 14px; line-height: 1; cursor: pointer;
}
.ex-upload {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border: 1px dashed #cbd5e1; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--brand); cursor: pointer;
}
.ex-upload svg { width: 16px; height: 16px; stroke: currentColor; }
.ex-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
/* ---------- BOTÃO SALVAR EXECUÇÃO (barra sem fundo) ---------- */
.od-actions--flat {
  background: none; border-top: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 12px 16px;
}
.od-actions--flat .action-exec {
  min-height: 52px; border-radius: 14px; font-size: 16px; font-weight: 700; letter-spacing: 0.01em;
  background: var(--brand);
  box-shadow: 0 8px 20px rgba(33, 74, 99, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.od-actions--flat .action-exec:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px rgba(33, 74, 99, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* ---------- ROTA: ajustes ---------- */
.rota-modo { margin: 0 0 12px; }
.rota-trajeto { margin: -4px 2px 12px; font-size: var(--f-xs); color: var(--muted); }
.rota-trajeto:empty { display: none; }
.timeline-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.timeline-leg {
  font-size: 11px; font-weight: 600; color: var(--muted); margin: -4px 0 10px 4px;
}
.timeline-leg:empty { display: none; }
.timeline-badge-next {
  display: inline-flex; align-items: center; font-size: var(--f-xs); font-weight: 700;
  color: var(--brand); background: var(--brand-light); border: 1px solid #c9d8e2; padding: 1px 6px; border-radius: 4px;
}

/* ---------- HOJE: títulos em até duas linhas + métricas ---------- */
.ag-title {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.3;
}
.hero-stat.is-done strong { color: #bbf7d0; }


/* ---------- HOJE: itinerário, endereço e próxima parada ---------- */
.agenda .slot { grid-template-columns: 40px 1fr; gap: 10px; }
.agenda .slot-time::after {
  content: ""; display: block; position: absolute; left: 50%; top: 26px; bottom: -14px;
  width: 1px; background: #cbd5e1; transform: translateX(-50%);
}
.ag-local { font-size: 12.5px; font-weight: 600; color: var(--ink-secondary); }
.hero-next-title { white-space: normal; font-size: 14px; }
.hero-next-sub {
  font-size: var(--f-sm); font-weight: 500; color: rgba(255, 255, 255, 0.85); margin-top: 2px;
  line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Marcador com logo-redonda.png no Mapa */
.tec-marker-office {
  background: none;
  border: none;
}
.tec-badge-office {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--brand, #214a63);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.15s ease;
}
.tec-badge-office:hover {
  transform: scale(1.1);
}
.office-pin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.tec-map-popup-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.popup-office-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.popup-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Ponto de Partida na Linha do Tempo */
.timeline-step-start .timeline-node-start {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--brand);
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-logo-start {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.timeline-card-start {
  background: #f8fafc;
  border-color: var(--line);
}
.timeline-badge-start {
  display: inline-flex;
  align-items: center;
  font-size: var(--f-xs);
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-light);
  border: 1px solid #c9d8e2;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---------- ANIMAÇÃO DA ROTA ATIVA PULSANTE ---------- */
@keyframes route-halo-pulse {
  0% {
    stroke-opacity: 0.3;
    stroke-width: 4px;
    filter: drop-shadow(0 0 2px #214A63);
  }
  50% {
    stroke-opacity: 0.95;
    stroke-width: 6px;
    filter: drop-shadow(0 0 8px #3b6986);
  }
  100% {
    stroke-opacity: 0.3;
    stroke-width: 4px;
    filter: drop-shadow(0 0 2px #214A63);
  }
}

@keyframes route-dash-flow {
  from {
    stroke-dashoffset: 40px;
  }
  to {
    stroke-dashoffset: 0px;
  }
}

/* Camada externa pulsante */
.tec-route-pulse-halo {
  animation: route-halo-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

/* Núcleo sólido de alto contraste */
.tec-route-pulse-core {
  pointer-events: none;
}