/* Popup da O.S. (detalhe + edição no mesmo popup). Referência visual: redesigner/popup-os.html.
   Os tokens ficam presos ao popup (não mexem no resto do sistema); os valores são os do design system (--tc-*). */
.osx-modal, .osx-ov2 {
  --o-bg: #0A0C11; --o-surface: #12151C; --o-surface-2: #171B24; --o-surface-3: #1E2330;
  --o-border: #262B38; --o-border-soft: #1C202B;
  --o-t1: #EDEFF3; --o-t2: #9298A8; --o-t3: #565C6C;
  --o-accent: #2FC9B4; --o-accent-soft: rgba(47,201,180,0.12); --o-accent-sb: rgba(47,201,180,0.30);
  --o-amber: #E3A23F; --o-amber-soft: rgba(227,162,63,0.12); --o-amber-sb: rgba(227,162,63,0.30);
  --o-green: #43BE7E; --o-green-soft: rgba(67,190,126,0.12); --o-green-sb: rgba(67,190,126,0.30);
  --o-red: #E1555C; --o-red-soft: rgba(225,85,92,0.12); --o-red-sb: rgba(225,85,92,0.30);
  --o-violet: #9C82ED; --o-violet-soft: rgba(156,130,237,0.14);
  --o-info: #6C93F0; --o-info-soft: rgba(108,147,240,0.12);
  --o-display: 'Space Grotesk', 'Inter', sans-serif; --o-body: 'Inter', sans-serif;
}
.osx-modal, .osx-modal *, .osx-ov2 * { box-sizing: border-box; }
.osx-modal { width: min(1120px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; background: var(--o-surface); border: 1px solid var(--o-border); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.5); color: var(--o-t1); font-family: var(--o-body); font-size: 13px; line-height: 1.45; animation: osxPop .16s ease-out; text-align: left; }
.osx-modal.osx-estreito { width: min(760px, 100%); }
@keyframes osxPop { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.osx-modal button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: 0; cursor: pointer; margin: 0; }
.osx-modal svg { display: block; flex-shrink: 0; }
.osx-modal p, .osx-modal h2, .osx-modal h4, .osx-modal dl, .osx-modal dd, .osx-modal dt { margin: 0; padding: 0; }
.osx-hs { scrollbar-width: none; } .osx-hs::-webkit-scrollbar { display: none; }
.osx-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.osx-muted { color: var(--o-t3); }
.osx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

/* cabeçalho, corpo, rodapé */
.osx-head { display: flex; align-items: center; gap: 12px; padding: 10px 22px; border-bottom: 1px solid var(--o-border-soft); flex-wrap: wrap; }
.osx-osid { font-family: var(--o-display); font-weight: 600; font-size: 15px; }
.osx-acts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.osx-body { flex: 1; overflow-y: auto; padding: 10px 22px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.osx-foot { display: flex; align-items: center; gap: 8px; padding: 9px 22px; border-top: 1px solid var(--o-border-soft); flex-wrap: wrap; }
.osx-sep { flex: 1; }
.osx-foot .osx-btn { padding: 0 11px; gap: 6px; } .osx-foot .osx-btn-primary { padding: 0 14px; } .osx-foot { gap: 6px; }

/* botões */
.osx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.osx-btn.sm { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 500; }
.osx-modal .osx-btn-primary { background: var(--o-accent); color: #06221E; }
.osx-btn-primary:hover { filter: brightness(1.08); }
.osx-btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.osx-modal .osx-btn-outline { border: 1px solid var(--o-border); background: var(--o-surface-2); color: var(--o-t1); font-weight: 500; }
.osx-modal .osx-btn-outline:hover { background: var(--o-surface-3); }
.osx-modal .osx-btn-ghost { color: var(--o-t2); font-weight: 500; }
.osx-modal .osx-btn-ghost:hover { background: var(--o-surface-3); color: var(--o-t1); }
.osx-modal .osx-btn-red { color: var(--o-red); font-weight: 500; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.osx-modal .osx-btn-red:hover { background: var(--o-red-soft); }
.osx-modal .osx-icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--o-border); background: var(--o-surface-2); display: grid; place-items: center; color: var(--o-t2); }
.osx-modal .osx-icon-btn:hover { color: var(--o-t1); background: var(--o-surface-3); }

/* pills, tags, chips */
.osx-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.osx-pill .osx-dot { width: 6px; height: 6px; }
.osx-pill.green { color: var(--o-green); background: var(--o-green-soft); border-color: var(--o-green-sb); } .osx-pill.green .osx-dot { background: var(--o-green); }
.osx-pill.amber { color: var(--o-amber); background: var(--o-amber-soft); border-color: var(--o-amber-sb); } .osx-pill.amber .osx-dot { background: var(--o-amber); }
.osx-pill.red { color: var(--o-red); background: var(--o-red-soft); border-color: var(--o-red-sb); } .osx-pill.red .osx-dot { background: var(--o-red); }
.osx-pill.accent { color: var(--o-accent); background: var(--o-accent-soft); border-color: var(--o-accent-sb); } .osx-pill.accent .osx-dot { background: var(--o-accent); }
.osx-pill.info { color: var(--o-info); background: var(--o-info-soft); border-color: rgba(108,147,240,.3); } .osx-pill.info .osx-dot { background: var(--o-info); }
.osx-pill.violet { color: var(--o-violet); background: var(--o-violet-soft); border-color: rgba(156,130,237,.3); } .osx-pill.violet .osx-dot { background: var(--o-violet); }
.osx-pill.neutral { color: var(--o-t2); background: var(--o-surface-3); border-color: var(--o-border); } .osx-pill.neutral .osx-dot { background: var(--o-t2); }
.osx-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--o-t2); font-size: 12.5px; white-space: nowrap; }
.osx-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; background: var(--o-surface-3); color: var(--o-t2); white-space: nowrap; }
.osx-chip.violet { color: var(--o-violet); background: var(--o-violet-soft); }
.osx-modal a.osx-chip.sgp { text-decoration: none; color: var(--o-accent); background: transparent; border: 1px solid var(--o-accent-sb); height: 26px; padding: 0 9px; font-weight: 600; }
.osx-modal a.osx-chip.sgp:hover { background: var(--o-accent-soft); }
.osx-modal button.osx-chip.link { color: var(--o-info); background: var(--o-info-soft); height: 24px; }
.osx-modal button.osx-chip.link:hover { filter: brightness(1.15); }

/* identidade do cliente */
.osx-ident { display: flex; align-items: center; gap: 14px; padding: 10px 18px; background: var(--o-surface-2); border: 1px solid var(--o-border); border-radius: 14px; }
.osx-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #6C93F0, #9C82ED); color: #0A0C11; font-family: var(--o-display); font-weight: 700; font-size: 15px; display: grid; place-items: center; flex-shrink: 0; }
.osx-avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.osx-ident h2 { font-family: var(--o-display); font-size: 18px; font-weight: 600; line-height: 1.25; color: var(--o-t1); overflow-wrap: anywhere; }
.osx-ident h2.clic { cursor: pointer; } .osx-ident h2.clic:hover { color: var(--o-accent); }
.osx-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; color: var(--o-t2); font-size: 12.5px; }
.osx-sepd { width: 3px; height: 3px; border-radius: 50%; background: var(--o-t3); }
.osx-ident-r { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.osx-skel { height: 10px; border-radius: 5px; background: var(--o-surface-3); width: 220px; margin-top: 8px; }

/* painéis */
.osx-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.osx-panel { background: var(--o-surface-2); border: 1px solid var(--o-border); border-radius: 12px; padding: 11px 16px; min-width: 0; }
.osx-panel h4 { display: flex; align-items: center; gap: 8px; font-family: var(--o-display); font-size: 13px; font-weight: 600; margin-bottom: 9px; color: var(--o-t1); }
.osx-panel h4 svg { color: var(--o-t3); }
.osx-panel h4 .r { margin-left: auto; font-family: var(--o-body); font-weight: 500; }
.osx-kv { display: grid; grid-template-columns: 118px 1fr; gap: 6px 12px; font-size: 12.5px; align-items: center; }
.osx-kv dt { color: var(--o-t3); }
.osx-kv dd { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; min-height: 24px; color: var(--o-t1); overflow-wrap: anywhere; }
.osx-modal .osx-copy { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--o-t3); }
.osx-modal .osx-copy:hover { background: var(--o-surface-3); color: var(--o-t1); }
.osx-alert { padding: 10px 14px; border-radius: 12px; background: var(--o-red-soft); border: 1px solid var(--o-red-sb); }
.osx-alert .l { font-size: 11.5px; color: var(--o-red); font-weight: 600; } .osx-alert .v { font-size: 13px; color: var(--o-t1); margin-top: 2px; white-space: pre-wrap; }

/* localização */
.osx-loc { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: stretch; }
.osx-loc.semmapa { grid-template-columns: minmax(0, 1fr); }
.osx-addr { font-size: 13.5px; line-height: 1.5; color: var(--o-t1); }
.osx-coords { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.osx-coord { padding: 7px 12px; border-radius: 10px; background: var(--o-surface); border: 1px solid var(--o-border-soft); min-width: 0; }
.osx-coord .lbl { font-size: 11.5px; color: var(--o-t3); display: flex; align-items: center; gap: 6px; }
.osx-coord .v { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.osx-coord .v span { flex: 1; min-width: 0; }
.osx-map { border-radius: 10px; border: 1px solid var(--o-border-soft); background: var(--o-surface); overflow: hidden; position: relative; min-height: 96px; }
.osx-map > svg { position: absolute; inset: 0; }
.osx-map .dist { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 7px; background: var(--o-surface-3); border: 1px solid var(--o-border); font-size: 12px; font-weight: 600; font-family: var(--o-display); }
.osx-map .open { position: absolute; right: 8px; bottom: 8px; text-decoration: none; }

.osx-ag select.osx-sel, .osx-modal select.osx-sel { height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--o-border); background: var(--o-surface); color: var(--o-t1); font-family: inherit; font-size: 12.5px; outline: 0; margin: 0; width: auto; cursor: pointer; }
.osx-modal select.osx-sel:focus { border-color: var(--o-accent-sb); }
.osx-modal select.osx-sel option { background: var(--o-surface-2); }
.osx-chip.amber { color: var(--o-amber); background: var(--o-amber-soft); } .osx-chip.red { color: var(--o-red); background: var(--o-red-soft); } .osx-chip.green { color: var(--o-green); background: var(--o-green-soft); }
.osx-menu.osx-menu-ag { min-width: 250px; max-height: 320px; overflow-y: auto; scrollbar-width: none; } .osx-menu.osx-menu-ag::-webkit-scrollbar { display: none; }
/* observações e fotos */
.osx-note { display: flex; align-items: center; gap: 10px; color: var(--o-t2); font-size: 12.5px; }
.osx-note span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osx-modal .osx-link { color: var(--o-accent); font-weight: 600; font-size: 12.5px; padding: 3px 6px; border-radius: 6px; white-space: nowrap; }
.osx-modal .osx-link:hover { background: var(--o-accent-soft); }
.osx-thumbs { display: flex; gap: 8px; align-items: center; }
.osx-thumb { width: 54px; height: 40px; border-radius: 8px; border: 1px solid var(--o-border); overflow: hidden; cursor: pointer; background: var(--o-surface-3); flex-shrink: 0; }
.osx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.osx-thumb:hover { border-color: var(--o-accent-sb); }
.osx-thumb.more { display: grid; place-items: center; color: var(--o-t2); font-size: 12px; font-weight: 600; }
.osx-empty { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px dashed var(--o-border); border-radius: 10px; color: var(--o-t3); font-size: 12.5px; }
.osx-exec { display: flex; flex-wrap: wrap; gap: 6px 30px; padding-top: 9px; padding-bottom: 9px; font-size: 13px; align-items: flex-start; }
.osx-exec > div { min-height: 38px; }
.osx-exec > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.osx-exec .l { font-size: 11.5px; color: var(--o-t3); } .osx-exec .v { color: var(--o-t1); }
.osx-exec .c { flex-basis: 100%; color: var(--o-t2); font-style: italic; font-size: 12.5px; }
.osx-hist-n { font-size: 10.5px; font-weight: 700; background: var(--o-surface-3); border-radius: 5px; padding: 1px 6px; color: var(--o-t3); }
.osx-hist-n:empty { display: none; }

/* menu "Mover para" */
.osx-menu-wrap { position: relative; }
.osx-menu { position: absolute; bottom: 44px; left: 0; min-width: 210px; background: var(--o-surface-3); border: 1px solid var(--o-border); border-radius: 12px; padding: 6px; display: none; box-shadow: 0 16px 40px rgba(0,0,0,.45); z-index: 5; }
.osx-menu.show { display: block; }
.osx-modal .osx-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 10px; border-radius: 8px; color: var(--o-t2); text-align: left; }
.osx-modal .osx-menu button:hover { background: var(--o-surface-2); color: var(--o-t1); }
.osx-modal .osx-menu button.cur { color: var(--o-t3); cursor: default; }
.osx-modal .osx-menu button.cur:hover { background: none; }

/* edição */
.osx-form-sec { display: flex; flex-direction: column; gap: 11px; }
.osx-form-sec h4 { margin-bottom: 0; }
.osx-fg { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.osx-fg.tres { grid-template-columns: 2fr 1fr 1fr; }
.osx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.osx-field.full { grid-column: 1 / -1; }
.osx-modal .osx-field > label { font-size: 12px; color: var(--o-t2); display: flex; align-items: center; gap: 6px; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
.osx-field label .req { color: var(--o-accent); }
.osx-field label .hint { margin-left: auto; color: var(--o-t3); font-size: 11.5px; }
.osx-inp { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--o-border); background: var(--o-surface); transition: border-color .12s, box-shadow .12s; }
.osx-inp:focus-within { border-color: var(--o-accent-sb); box-shadow: 0 0 0 3px var(--o-accent-soft); }
.osx-inp.dirty { border-color: rgba(227,162,63,.45); }
.osx-inp.err { border-color: var(--o-red-sb); box-shadow: 0 0 0 3px var(--o-red-soft); }
.osx-inp.ro { background: transparent; border-style: dashed; }
.osx-inp svg { color: var(--o-t3); }
.osx-modal .osx-inp input, .osx-modal .osx-inp select { flex: 1; min-width: 0; width: auto; height: 100%; background: none; border: 0; outline: 0; color: var(--o-t1); font-family: inherit; font-size: 13px; padding: 0; margin: 0; box-shadow: none; border-radius: 0; }
.osx-modal .osx-inp select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.osx-modal .osx-inp select option { background: var(--o-surface-2); color: var(--o-t1); }
.osx-modal .osx-inp input::placeholder, .osx-modal textarea.osx-ta::placeholder { color: var(--o-t3); }
.osx-inp input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.6); }
.osx-err { font-size: 11.5px; color: var(--o-red); display: none; }
.osx-field.has-err .osx-err { display: block; }
.osx-modal textarea.osx-ta { min-height: 84px; width: 100%; resize: vertical; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--o-border); background: var(--o-surface); outline: 0; color: var(--o-t1); line-height: 1.5; font-family: inherit; font-size: 13px; margin: 0; box-shadow: none; }
.osx-modal textarea.osx-ta:focus { border-color: var(--o-accent-sb); box-shadow: 0 0 0 3px var(--o-accent-soft); }
.osx-modal textarea.osx-ta.dirty { border-color: rgba(227,162,63,.45); }
.osx-segc { display: flex; gap: 4px; padding: 3px; border-radius: 10px; border: 1px solid var(--o-border); background: var(--o-surface); height: 38px; }
.osx-segc.dirty { border-color: rgba(227,162,63,.45); }
.osx-modal .osx-segc button { flex: 1; border-radius: 7px; color: var(--o-t2); font-weight: 500; font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.osx-modal .osx-segc button:hover { color: var(--o-t1); }
.osx-modal .osx-segc button.on { background: var(--o-surface-3); color: var(--o-t1); }
.osx-modal .osx-eye { color: var(--o-t3); width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; }
.osx-modal .osx-eye:hover { background: var(--o-surface-3); color: var(--o-t1); }
.osx-dirty { display: none; align-items: center; gap: 6px; color: var(--o-amber); font-size: 12px; font-weight: 500; }
.osx-dirty.show { display: flex; }

/* popups internos (observação completa e galeria) */
.osx-ov2 { position: fixed; inset: 0; background: rgba(5,6,9,.66); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 900; padding: 24px; }
.osx-gallery { display: grid; grid-template-columns: 1fr 120px; gap: 14px; padding: 18px 22px; min-height: 0; }
.osx-gmain { border-radius: 12px; overflow: hidden; border: 1px solid var(--o-border); aspect-ratio: 4 / 3; background: var(--o-surface-2); cursor: zoom-in; max-height: calc(100vh - 230px); }
.osx-gmain img { width: 100%; height: 100%; object-fit: contain; display: block; }
.osx-gside { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: calc(100vh - 230px); }
.osx-gside .osx-thumb { width: 100%; height: 78px; }
.osx-gside .osx-thumb.on { border-color: var(--o-accent); box-shadow: 0 0 0 2px var(--o-accent-soft); }
.osx-gcap { display: flex; align-items: center; gap: 10px; padding: 0 22px 16px; color: var(--o-t2); font-size: 12.5px; text-transform: capitalize; }
.osx-notefull { color: var(--o-t2); line-height: 1.7; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .osx-modal { max-height: 100vh; max-height: 100dvh; border-radius: 14px; }
  .osx-cols, .osx-loc, .osx-fg.tres { grid-template-columns: minmax(0, 1fr); }
  .osx-ident { flex-wrap: wrap; } .osx-ident > div:nth-child(2) { flex: 1 1 0; } .osx-ident-r { margin-left: 60px; flex-basis: 100%; }
  .osx-foot .osx-btn { height: 36px; padding: 0 12px; }
  .osx-head, .osx-body, .osx-foot { padding-left: 14px; padding-right: 14px; }
  .osx-gallery { grid-template-columns: 1fr; } .osx-gside { flex-direction: row; max-height: none; } .osx-gside .osx-thumb { width: 78px; height: 58px; }
  .osx-kv { grid-template-columns: 104px 1fr; }
}

/* ── Nova O.S. (formulário do modal antigo, mesmos campos e ids) no visual do popup da O.S. ─────────────── */
#modal-os { --o-bg: #0A0C11; --o-surface: #12151C; --o-surface-2: #171B24; --o-surface-3: #1E2330; --o-border: #262B38; --o-border-soft: #1C202B; --o-t1: #EDEFF3; --o-t2: #9298A8; --o-t3: #565C6C;
  --o-accent: #2FC9B4; --o-accent-soft: rgba(47,201,180,0.12); --o-accent-sb: rgba(47,201,180,0.30); --o-display: 'Space Grotesk', 'Inter', sans-serif; }
#modal-os .modal-card:has(#os-step-form:not(.hidden)) { max-width: 940px; width: min(940px, 100%); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); background: var(--o-surface); border: 1px solid var(--o-border); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
#modal-os .modal-card:has(#os-step-form:not(.hidden)) .modal-header { padding: 10px 22px; border-bottom: 1px solid var(--o-border-soft); background: none; }
#modal-os .modal-card:has(#os-step-form:not(.hidden)) .modal-header h3 { font-family: var(--o-display); font-size: 15px; font-weight: 600; color: var(--o-t1); }
#modal-os .modal-card:has(#os-step-form:not(.hidden)) .modal-body { padding: 10px 22px; scrollbar-width: none; }
#modal-os .modal-card:has(#os-step-form:not(.hidden)) .modal-body::-webkit-scrollbar { display: none; }
#os-step-form.osn { display: flex; flex-direction: column; gap: 8px; font-family: 'Inter', sans-serif; font-size: 13px; color: var(--o-t1); }
#os-step-form.osn.hidden { display: none; }
#os-step-form.osn > #os-duplic-warn, #os-step-form.osn > .cliente-banner { margin: 0 !important; border-radius: 12px !important; }
#os-step-form.osn .cliente-banner { background: var(--o-surface-2); border: 1px solid var(--o-border); padding: 9px 16px; }
#os-step-form.osn > #os-duplic-warn { padding: 8px 14px !important; }
#os-step-form.osn .cliente-banner-avatar { background: linear-gradient(135deg, #6C93F0, #9C82ED); color: #0A0C11; font-family: var(--o-display); font-weight: 700; }
#os-step-form.osn .cliente-banner-name { font-family: var(--o-display); font-weight: 600; }
.osn-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.osn-panel { background: var(--o-surface-2); border: 1px solid var(--o-border); border-radius: 12px; padding: 10px 16px 12px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.osn-panel h4 { display: flex; align-items: center; gap: 8px; font-family: var(--o-display); font-size: 13px; font-weight: 600; color: var(--o-t1); margin: 0; }
.osn-panel h4 svg { color: var(--o-t3); flex-shrink: 0; }
#os-step-form.osn .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
#os-step-form.osn .form-row > .form-group:only-child, #os-step-form.osn .form-row > .form-group:first-child:has(+ .form-group[style*="display: none"]), #os-step-form.osn .form-row > .form-group:first-child:has(+ .form-group[style*="display:none"]) { grid-column: 1 / -1; }
.osn-g3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 11px; }
.osn-g3b { display: grid; grid-template-columns: 1.15fr 1fr 1.25fr; gap: 10px; }
#os-step-form.osn .osx-segc { display: flex; gap: 4px; padding: 3px; border-radius: 10px; border: 1px solid var(--o-border); background: var(--o-surface); height: 36px; }
#os-step-form.osn .osx-segc button { flex: 1; border: 0; background: none; border-radius: 7px; color: var(--o-t2); font-family: inherit; font-weight: 500; font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; margin: 0; padding: 0; }
#os-step-form.osn .osx-segc button:hover { color: var(--o-t1); }
#os-step-form.osn .osx-segc button.on { background: var(--o-surface-3); color: var(--o-t1); }
#os-step-form.osn .osx-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
#os-cto-loc-wrap .osn-g3 { margin-top: 11px; }
#os-step-form.osn .form-group { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
#os-step-form.osn .form-group > label { font-size: 12px; color: var(--o-t2); text-transform: none; letter-spacing: 0; font-weight: 400; margin: 0; display: flex; align-items: center; gap: 4px; }
.osn-req { color: var(--o-accent); }
.osn-hint { margin-left: auto; color: var(--o-t3); font-size: 11.5px; }
#os-step-form.osn .form-group input, #os-step-form.osn .form-group select, #os-step-form.osn .form-group textarea { width: 100%; box-sizing: border-box; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--o-border); background: var(--o-surface); color: var(--o-t1); font-family: inherit; font-size: 13px; outline: 0; box-shadow: none; margin: 0; transition: border-color .12s, box-shadow .12s; }
#os-step-form.osn .form-group textarea { height: auto; min-height: 54px; padding: 8px 12px; line-height: 1.5; resize: vertical; }
#os-step-form.osn .form-group input:focus, #os-step-form.osn .form-group select:focus, #os-step-form.osn .form-group textarea:focus { border-color: var(--o-accent-sb); box-shadow: 0 0 0 3px var(--o-accent-soft); }
#os-step-form.osn .form-group input::placeholder, #os-step-form.osn .form-group textarea::placeholder { color: var(--o-t3); }
#os-step-form.osn .form-group input[readonly] { background: transparent; border-style: dashed; }
#os-step-form.osn .form-group select option { background: var(--o-surface-2); color: var(--o-t1); }
#os-step-form.osn input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.6); }
.osn-cto { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px dashed var(--o-border); color: var(--o-t2); font-size: 12.5px; }
.osn-cto svg { color: var(--o-t3); flex-shrink: 0; } .osn-cto small { display: block; color: var(--o-t3); font-size: 11px; }
#modal-os .modal-footer.osn-foot { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 9px 22px; border-top: 1px solid var(--o-border-soft); background: none; }
#modal-os .modal-footer.osn-foot.hidden { display: none; }
#modal-os .modal-footer.osn-foot .btn-primary { flex: 0 0 auto; width: auto; height: 38px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--o-accent); background-image: none; color: #06221E; font-weight: 600; font-size: 13px; box-shadow: none; }
#modal-os .modal-footer.osn-foot .btn-primary:hover { filter: brightness(1.08); transform: none; }
#modal-os .modal-footer.osn-foot .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
#modal-os .modal-footer.osn-foot .btn-secondary { flex: 0 0 auto; width: auto; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--o-border); background: var(--o-surface-2); color: var(--o-t1); font-weight: 500; font-size: 13px; margin: 0; }
#modal-os .modal-footer.osn-foot .btn-secondary:hover { background: var(--o-surface-3); }
.osn-leg { margin-left: auto; color: var(--o-t3); font-size: 12px; }
@media (max-width: 760px) { .osn-cols, .osn-g3, .osn-g3b { grid-template-columns: minmax(0, 1fr); } #modal-os .modal-card:has(#os-step-form:not(.hidden)) .modal-body, #modal-os .modal-footer.osn-foot { padding-left: 14px; padding-right: 14px; } }

/* ── Lista de opções própria (substitui a lista nativa dos <select>) ───────────────────────────────────── */
select.osx-dd-nativo { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; padding: 0 !important; border: 0 !important; margin: 0 !important; }
.osx-dd-bt { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: 'Inter', sans-serif; font-size: 13px; color: #EDEFF3; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: left; }
.osx-inp > .osx-dd-bt { flex: 1; height: 100%; }
.osx-dd-bt .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osx-dd-bt .t.vazio { color: #565C6C; }
.osx-dd-bt svg { color: #565C6C; flex-shrink: 0; transition: transform .15s; }
.osx-dd-bt.aberto svg { transform: rotate(180deg); color: #2FC9B4; }
.osx-dd-bt:disabled { opacity: .5; cursor: not-allowed; }
.osx-dd-bt.caixa { width: 100%; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid #262B38; background: #12151C; transition: border-color .12s, box-shadow .12s; }
.osx-dd-bt.caixa:hover { border-color: #343A4B; }
.osx-dd-bt.caixa:focus-visible, .osx-dd-bt.caixa.aberto { outline: 0; border-color: rgba(47,201,180,0.30); box-shadow: 0 0 0 3px rgba(47,201,180,0.12); }
.osx-dd-bt.caixa.mini { width: auto; min-width: 0; height: 26px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; }
.osx-inp:has(> .osx-dd-bt.aberto) { border-color: rgba(47,201,180,0.30); box-shadow: 0 0 0 3px rgba(47,201,180,0.12); }
.osx-dd-menu { position: fixed; z-index: 1200; overflow-y: auto; padding: 6px; border-radius: 12px; background: #1E2330; border: 1px solid #2E3445; box-shadow: 0 18px 44px rgba(0,0,0,.5); font-family: 'Inter', sans-serif; scrollbar-width: none; }
.osx-dd-menu::-webkit-scrollbar { display: none; }
.osx-dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: #B4BAC8; font-family: inherit; font-size: 13px; text-align: left; cursor: pointer; margin: 0; }
.osx-dd-menu button span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osx-dd-menu button:hover, .osx-dd-menu button.foco { background: #171B24; color: #EDEFF3; }
.osx-dd-menu button.sel { color: #2FC9B4; font-weight: 600; background: rgba(47,201,180,0.10); }
.osx-dd-menu button.sel svg { color: #2FC9B4; flex-shrink: 0; }
.osx-dd-menu button.vazio:not(.sel) { color: #6B7283; }
.osx-dd-menu button:disabled { opacity: .4; cursor: not-allowed; }
.osx-dd-menu .nada { padding: 10px; color: #565C6C; font-size: 12.5px; }
.osx-modal .osx-inp input.osx-oculta:not(:placeholder-shown) { -webkit-text-security: disc; letter-spacing: 1px; }
.osx-modal .osx-inp input:-webkit-autofill { -webkit-text-fill-color: #EDEFF3; box-shadow: 0 0 0 40px #12151C inset; caret-color: #EDEFF3; }
.osx-modal #osx-ag-per { flex-wrap: nowrap; gap: 6px; }
.osx-modal #osx-ag-per .osx-dd-bt.mini { flex: 0 1 auto; min-width: 0; }

/* ── Popup em 3 colunas (23/11/2026): rede, execução, avaliação, observações em lista ───────────────── */
.osx-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.osx-g3:empty { display: none; }
.osx-span2 { grid-column: span 2; }
.osx-g3 .osx-kv { grid-template-columns: 96px minmax(0, 1fr); }
.osx-g3 .osx-kv dd { min-height: 26px; }
.osx-g3 .osx-loc { grid-template-columns: minmax(0, 1fr) 230px; }
.osx-sig { font-family: var(--o-display); font-weight: 600; font-size: 14px; }
.osx-gauge { position: relative; height: 6px; border-radius: 6px; margin: 4px 0 2px; }
.osx-gauge i { position: absolute; top: -4px; width: 3px; height: 14px; border-radius: 2px; background: var(--o-t1); box-shadow: 0 0 0 2px var(--o-surface-2); transform: translateX(-50%); }
.osx-gauge-l { position: relative; height: 14px; font-size: 10.5px; color: var(--o-t3); font-family: var(--o-display); }
.osx-gauge-l span { position: absolute; }
.osx-copy.gira svg { animation: osxGira .8s linear infinite; }
@keyframes osxGira { to { transform: rotate(360deg); } }
.osx-chip.violet { color: var(--o-violet); background: var(--o-violet-soft); }
.osx-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.osx-metric { padding: 8px 12px; border-radius: 10px; background: var(--o-surface); border: 1px solid var(--o-border-soft); min-width: 0; }
.osx-metric .l { font-size: 11.5px; color: var(--o-t3); }
.osx-metric .v { font-family: var(--o-display); font-weight: 600; font-size: 17px; margin-top: 1px; color: var(--o-t1); }
.osx-metric .s { font-size: 11.5px; color: var(--o-t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osx-metric.hl .v { color: var(--o-accent); }
.osx-track { position: relative; margin: 26px 6px 32px; height: 8px; border-radius: 8px; background: var(--o-surface-3); }
.osx-track .seg { position: absolute; top: 0; bottom: 0; border-radius: 8px; }
.osx-track .seg.travel { background: repeating-linear-gradient(90deg, var(--o-info) 0 6px, transparent 6px 10px); opacity: .8; }
.osx-track .seg.onsite { background: var(--o-green); }
.osx-track .seg.live { background: linear-gradient(90deg, var(--o-accent), rgba(47,201,180,.35)); }
.osx-track .mk { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--o-surface-2); border: 2px solid var(--o-t2); transform: translate(-50%, -50%); }
.osx-track .mk.g { border-color: var(--o-green); } .osx-track .mk.a { border-color: var(--o-accent); } .osx-track .mk.i { border-color: var(--o-info); }
.osx-track .lb { position: absolute; top: 14px; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; color: var(--o-t2); text-align: center; }
.osx-track .lb b { display: block; font-family: var(--o-display); color: var(--o-t1); font-weight: 600; }
.osx-track .lb.r { transform: translateX(-100%); text-align: right; } .osx-track .lb.l { transform: none; text-align: left; }
.osx-track .seglb { position: absolute; top: -19px; transform: translateX(-50%); font-size: 11px; white-space: nowrap; }
.osx-src { font-size: 11.5px; color: var(--o-t3); display: flex; align-items: center; gap: 6px; font-family: var(--o-body); font-weight: 400; }
.osx-rate { display: flex; align-items: center; gap: 14px; }
.osx-rate .score { font-family: var(--o-display); font-weight: 700; font-size: 34px; line-height: 1; }
.osx-stars { display: flex; gap: 2px; } .osx-stars .off { color: var(--o-surface-3); }
.osx-modal p.osx-quote { margin-top: 12px; padding: 8px 12px; border-left: 2px solid var(--o-green-sb); color: var(--o-t2); font-style: italic; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.osx-pendente { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px dashed var(--o-border); border-radius: 12px; color: var(--o-t3); font-size: 12.5px; }
.osx-pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.osx-pgrid .osx-thumb { width: auto; height: 56px; }
.osx-notes { display: flex; flex-direction: column; gap: 14px; }
.osx-notes-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.osx-notes-2.uma { grid-template-columns: minmax(0, 1fr); }
.osx-nt { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.osx-nt .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.osx-nt .ic.cliente { background: var(--o-info-soft); color: var(--o-info); } .osx-nt .ic.tecnico { background: var(--o-accent-soft); color: var(--o-accent); }
.osx-nt .ic.atendente { background: var(--o-violet-soft); color: var(--o-violet); } .osx-nt .ic.sistema { background: var(--o-surface-3); color: var(--o-t3); }
.osx-nt .meta { font-size: 11.5px; color: var(--o-t3); }
.osx-nt .tx { color: var(--o-t2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osx-nt.full .tx { white-space: pre-wrap; color: var(--o-t1); line-height: 1.55; overflow-wrap: anywhere; }
.osx-add-note { display: flex; gap: 8px; margin: 0 0 6px; }
.osx-foot .osx-btn-ghost .osx-hist-n { margin-left: 2px; }
@media (max-width: 1100px) { .osx-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .osx-g3 > .osx-panel:last-child:nth-child(odd):not(.osx-span2) { grid-column: 1 / -1; } }
@media (max-width: 760px) { .osx-g3, .osx-notes-2, .osx-g3 .osx-loc { grid-template-columns: minmax(0, 1fr); } .osx-span2 { grid-column: auto; } .osx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.osx-modal button.osx-chip { border: 0; font-family: inherit; }
.osx-g3 .osx-kv { gap: 5px 12px; }

.osx-modal .osx-atd { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; margin-left: 4px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: #2FC9B4; border: 1px solid rgba(47,201,180,.35); white-space: nowrap; }
.osx-modal .osx-atd:hover { background: rgba(47,201,180,.12); }
