/*
 * FastFix CRM Plus — visual estilo WhatsApp Web, página mais limpa, registro de vendas,
 * alertas de chats sem resposta e painel de desempenho do administrador.
 * Carregado por último no index.html; vence o CSS compilado e o do chat-enhancer.
 */
:root {
  --ffp-green: #00a884;
  --ffp-green-dark: #008069;
  --ffp-badge: #25d366;
  --ffp-ink: #111b21;
  --ffp-ink-2: #3b4a54;
  --ffp-muted: #667781;
  --ffp-line: #e9edef;
  --ffp-panel: #ffffff;
  --ffp-header: #f0f2f5;
  --ffp-hover: #f5f6f6;
  --ffp-chat-bg: #efeae2;
  --ffp-out: #d9fdd3;
  --ffp-in: #ffffff;
  --ffp-page: #f0f2f5;
  --ffp-accent: #f17422;
  --ffp-l1: #e9b400;
  --ffp-l2: #f08c00;
  --ffp-l3: #e8590c;
  --ffp-l4: #e03131;
  --ffp-l5: #c2255c;
  --ffp-l6: #7b1236;
}

/* ====================== PÁGINA ====================== */
body.ffp { background: var(--ffp-page) !important; }
body.ffp .modern-workspace { background: var(--ffp-page) !important; }

/* Topo mais discreto */
body.ffp .modern-workspace .topbar {
  background: transparent !important;
  height: 56px !important;
  border: 0 !important;
}
body.ffp #fastfix-menu-toggle {
  background: #fff !important;
  color: var(--ffp-ink-2) !important;
  border: 1px solid var(--ffp-line) !important;
  box-shadow: none !important;
  height: 34px !important;
  font-weight: 500 !important;
}
body.ffp #fastfix-menu-toggle:hover { background: var(--ffp-hover) !important; }
body.ffp .private-tag { box-shadow: none !important; border: 1px solid var(--ffp-line) !important; height: 34px !important; }

/* Menu lateral claro */
body.ffp .modern-workspace .navigation,
body.ffp .main-tabs > [data-slot="tabs-list"] {
  background: #fff !important;
  border-right: 1px solid var(--ffp-line) !important;
  box-shadow: none !important;
}
body.ffp .modern-workspace .brand span,
body.ffp .modern-workspace .brand { color: var(--ffp-ink) !important; }
body.ffp .modern-workspace .navigation [data-slot="tabs-trigger"],
body.ffp .modern-workspace .navigation .fastfix-nav-flow-btn,
body.ffp .modern-workspace .navigation .ffp-nav-btn,
body.ffp .modern-workspace .navigation > button {
  color: var(--ffp-ink-2) !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  font-weight: 500 !important;
}
body.ffp .modern-workspace .navigation [data-slot="tabs-trigger"]:hover,
body.ffp .modern-workspace .navigation > button:hover { background: var(--ffp-hover) !important; color: var(--ffp-ink) !important; }
body.ffp .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"],
body.ffp .modern-workspace .navigation [data-slot="tabs-trigger"].fastfix-tab-active-cliente,
body.ffp .modern-workspace .navigation [data-slot="tabs-trigger"].fastfix-tab-active-lojista,
body.ffp .modern-workspace .navigation > button.active,
body.ffp .modern-workspace .navigation > button[data-state="active"] {
  background: #e7f8f3 !important;
  color: var(--ffp-green-dark) !important;
  font-weight: 600 !important;
}
body.ffp.ffp-dash-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) {
  background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important;
}
body.ffp .modern-workspace .navigation .fastfix-nav-badge {
  background: var(--ffp-header) !important;
  color: var(--ffp-muted) !important;
  box-shadow: none !important;
}
body.ffp .modern-workspace .navigation [data-state="active"] .fastfix-nav-badge,
body.ffp .modern-workspace .navigation .fastfix-tab-active-cliente .fastfix-nav-badge { background: var(--ffp-badge) !important; color: #fff !important; }
body.ffp .navigation + *, body.ffp .navigation ~ footer, body.ffp .navigation .nav-footer { color: var(--ffp-muted) !important; }
body.ffp .main-tabs > [data-slot="tabs-list"] { padding-bottom: 150px !important; }

/* Cabeçalhos das páginas mais compactos; rodapé fora */
body.ffp .workspace .page-heading { margin-bottom: 14px !important; }
body.ffp .workspace .page-heading .eyebrow,
body.ffp .workspace .page-heading .connection-pill,
body.ffp .workspace .bottom-line { display: none !important; }
body.ffp .workspace .page-heading h1 { font-size: 24px !important; letter-spacing: -0.01em !important; }
body.ffp .workspace .page-heading p { color: var(--ffp-muted) !important; font-size: 13px !important; }
body.ffp main.inbox-workspace .page-heading { display: none !important; }
body.ffp .workspace { padding-top: 8px !important; }

/* ====================== CONVERSAS ====================== */
body.ffp .inbox-summary {
  padding: 0 2px 10px !important;
  margin: 0 !important;
  min-height: 0 !important;
}
body.ffp .inbox-summary .inbox-tools button {
  background: #fff !important; border: 1px solid var(--ffp-line) !important; box-shadow: none !important;
  color: var(--ffp-ink-2) !important; height: 32px !important; font-size: 13px !important; border-radius: 8px !important;
}
body.ffp .inbox-frame {
  border: 1px solid #d1d7db !important;
  border-radius: 6px !important;
  box-shadow: 0 1px 3px rgba(11, 20, 26, 0.08) !important;
  background: var(--ffp-panel) !important;
}
@media (min-width: 951px) {
  body.ffp .inbox-frame {
    height: calc(100dvh - 120px) !important;
    max-height: none !important;
    min-height: 520px !important;
  }
  body.ffp .inbox-frame.has-selection { grid-template-columns: 380px minmax(0, 1fr) !important; }
  body.ffp .inbox-frame.with-info.has-selection { grid-template-columns: 380px minmax(0, 1fr) !important; }
}

/* Lista de conversas */
body.ffp .conversation-list { background: #fff !important; border-right: 1px solid var(--ffp-line) !important; }
body.ffp .list-heading {
  background: var(--ffp-header) !important;
  padding: 10px 16px !important;
  min-height: 59px !important;
  border: 0 !important;
}
body.ffp .list-heading h2 { font-size: 16px !important; font-weight: 600 !important; color: var(--ffp-ink) !important; }
body.ffp .list-heading span { background: transparent !important; border: 0 !important; color: var(--ffp-muted) !important; }
body.ffp .inbox-search {
  margin: 8px 12px !important;
  background: var(--ffp-header) !important;
  border: 0 !important;
  border-radius: 8px !important;
  height: 36px !important;
  box-shadow: none !important;
}
body.ffp .inbox-search input { background: transparent !important; font-size: 14px !important; }
body.ffp .inbox-filters {
  padding: 2px 12px 8px !important;
  border-bottom: 1px solid var(--ffp-line) !important;
  overflow-x: auto !important;
  scrollbar-width: none !important;
  width: 100% !important;
  justify-content: flex-start !important;
}
body.ffp .inbox-filters [data-slot="tabs-trigger"] {
  flex: 0 0 auto !important;
  border-radius: 999px !important;
  background: var(--ffp-header) !important;
  color: var(--ffp-muted) !important;
  padding: 4px 12px !important;
  height: 30px !important;
  font-size: 13px !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.ffp .inbox-filters [data-slot="tabs-trigger"]::after { display: none !important; }
body.ffp .inbox-filters [data-slot="tabs-trigger"][data-state="active"] { background: #e7fce3 !important; color: var(--ffp-green-dark) !important; }
body.ffp .inbox-filters [data-slot="tabs-trigger"] b { background: transparent !important; color: inherit !important; }

body.ffp .threads { background: #fff !important; }
body.ffp button.thread {
  display: flex !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 0 0 0 13px !important;
  min-height: 72px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  position: relative;
}
body.ffp button.thread:hover { background: var(--ffp-hover) !important; }
body.ffp button.thread.selected { background: #f0f2f5 !important; border-left: 0 !important; }
body.ffp button.thread .thread-content {
  border-bottom: 1px solid var(--ffp-line) !important;
  padding: 11px 15px 11px 0 !important;
  min-height: 72px !important;
  justify-content: center !important;
  gap: 2px !important;
}
body.ffp button.thread .contact-avatar {
  width: 49px !important; height: 49px !important; min-width: 49px !important;
  border-radius: 50% !important;
  background: #dfe5e7 !important; color: #fff !important; font-size: 16px !important; border: 0 !important;
}
body.ffp button.thread .contact-avatar.bot { background: #b6c6cf !important; }
body.ffp button.thread .thread-line b { font-size: 16px !important; font-weight: 400 !important; color: var(--ffp-ink) !important; }
body.ffp button.thread .thread-line time { font-size: 12px !important; color: var(--ffp-muted) !important; }
body.ffp button.thread.ffp-has-unread .thread-line time { color: var(--ffp-badge) !important; font-weight: 500 !important; }
body.ffp button.thread .thread-preview { font-size: 14px !important; color: var(--ffp-muted) !important; }
body.ffp button.thread .mode-label { font-size: 12px !important; color: #8696a0 !important; background: transparent !important; padding: 0 !important; }
body.ffp button.thread .unread {
  background: var(--ffp-badge) !important; color: #fff !important; border-radius: 999px !important;
  min-width: 20px !important; height: 20px !important; font-size: 12px !important; font-weight: 600 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 0 6px !important;
}

/* Cabeçalho da conversa */
body.ffp header.chat-top {
  background: var(--ffp-header) !important;
  border-bottom: 1px solid var(--ffp-line) !important;
  min-height: 59px !important;
  padding: 8px 16px !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}
body.ffp header.chat-top .contact-avatar { width: 40px !important; height: 40px !important; min-width: 40px !important; border-radius: 50% !important; background: #dfe5e7 !important; color: #fff !important; }
body.ffp header.chat-top .chat-title { min-width: 120px !important; flex: 0 1 auto !important; }
body.ffp header.chat-top .chat-title b { font-size: 16px !important; font-weight: 500 !important; color: var(--ffp-ink) !important; }
body.ffp header.chat-top .chat-title .mode-label { font-size: 13px !important; color: var(--ffp-muted) !important; background: transparent !important; padding: 0 !important; }
body.ffp header.chat-top .chat-controls {
  display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; gap: 4px !important; margin-left: auto !important;
}
/* Botões do cabeçalho: neutros, compactos (o de venda é o único colorido) */
body.ffp header.chat-top .chat-controls > button:not(.ffp-sale-btn) {
  background: transparent !important;
  color: var(--ffp-ink-2) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  height: 34px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  transform: none !important;
}
body.ffp header.chat-top .chat-controls > button:not(.ffp-sale-btn):hover { background: rgba(11, 20, 26, 0.06) !important; }
body.ffp header.chat-top .chat-controls > button.close-chat-btn { color: #c92a2a !important; }
body.ffp header.chat-top .chat-controls > button.receive-commission { display: none !important; }
body.ffp .ffp-sale-btn {
  display: inline-flex !important; align-items: center; gap: 6px;
  background: var(--ffp-green) !important; color: #fff !important;
  border: 0 !important; border-radius: 999px !important;
  height: 34px !important; padding: 0 14px !important;
  font-size: 13px !important; font-weight: 600 !important; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}
body.ffp .ffp-sale-btn:hover { background: var(--ffp-green-dark) !important; }
body.ffp .conversation-mode {
  background: #fff8e1 !important; color: #6b5800 !important; border: 0 !important;
  font-size: 12.5px !important; padding: 6px 16px !important; justify-content: center !important;
}

/* Área das mensagens */
body.ffp .message-area {
  background-color: var(--ffp-chat-bg) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23d6cfc4' fill-opacity='0.35'%3E%3Ccircle cx='10' cy='10' r='1.6'/%3E%3Ccircle cx='50' cy='30' r='1.2'/%3E%3Ccircle cx='30' cy='60' r='1.4'/%3E%3Ccircle cx='70' cy='70' r='1'/%3E%3C/g%3E%3C/svg%3E") !important;
  padding: 16px 7% 12px !important;
  gap: 2px !important;
}
body.ffp .message-group { gap: 2px !important; }
body.ffp .date-separator {
  align-self: center !important;
  background: #fff !important; color: #54656f !important;
  font-size: 12.5px !important; text-transform: uppercase !important;
  padding: 5px 12px !important; border-radius: 7.5px !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13) !important;
  margin: 10px auto !important; border: 0 !important; width: auto !important;
}
body.ffp .date-separator::before, body.ffp .date-separator::after { display: none !important; }
body.ffp .modern-workspace .chat-message,
body.ffp .chat-message {
  background: var(--ffp-in) !important;
  border-radius: 7.5px !important;
  border-top-left-radius: 0 !important;
  padding: 6px 7px 8px 9px !important;
  min-width: 80px !important;
  max-width: 65% !important;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13) !important;
  border: 0 !important;
  margin: 2px 0 !important;
  position: relative !important;
  font-size: 14.2px !important;
  line-height: 19px !important;
  color: var(--ffp-ink) !important;
}
body.ffp .modern-workspace .chat-message.outgoing,
body.ffp .chat-message.outgoing {
  background: var(--ffp-out) !important;
  border-radius: 7.5px !important;
  border-top-right-radius: 0 !important;
}
/* "rabinho" do balão */
body.ffp .chat-message::before {
  content: ""; position: absolute; top: 0; left: -8px; width: 8px; height: 13px;
  background: linear-gradient(to bottom left, var(--ffp-in) 50%, transparent 50%);
}
body.ffp .chat-message.outgoing::before {
  left: auto; right: -8px;
  background: linear-gradient(to bottom right, var(--ffp-out) 50%, transparent 50%);
}
body.ffp .chat-message .message-author { display: none !important; }
body.ffp .chat-message p { margin: 0 !important; color: var(--ffp-ink) !important; font-size: 14.2px !important; }
body.ffp .chat-message p > strong:first-child { color: var(--ffp-green-dark) !important; font-size: 12.8px !important; font-weight: 600 !important; }
body.ffp .chat-message[data-role="bot"] p > strong:first-child { color: #7b5fc7 !important; }
body.ffp .chat-message footer {
  display: flex !important; justify-content: flex-end !important; align-items: center !important; gap: 6px !important;
  margin-top: 2px !important; float: none !important;
}
body.ffp .chat-message footer time { font-size: 11px !important; color: var(--ffp-muted) !important; }
body.ffp .chat-message footer .delivery { font-size: 11px !important; color: #53bdeb !important; background: transparent !important; padding: 0 !important; }
body.ffp .chat-message footer .delivery svg { width: 13px !important; height: 13px !important; }
body.ffp .chat-message .fastfix-msg-edit-btn { opacity: 0; transition: opacity .15s; font-size: 11px !important; padding: 0 4px !important; }
body.ffp .chat-message:hover .fastfix-msg-edit-btn { opacity: 1; }
body.ffp .chat-message.ffp-system,
body.ffp .chat-message[data-role="system"] {
  align-self: center !important; background: #fff8c5 !important; max-width: 80% !important;
  font-size: 12.5px !important; text-align: center; border-radius: 7.5px !important;
}
body.ffp .chat-message[data-role="system"]::before { display: none; }

/* Caixa de digitação */
body.ffp form.message-composer {
  background: var(--ffp-header) !important;
  border-top: 0 !important;
  padding: 8px 16px !important;
  grid-template-columns: 40px minmax(0, 1fr) 42px !important;
  gap: 8px !important;
}
body.ffp form.message-composer textarea {
  background: #fff !important;
  border: 0 !important; border-radius: 8px !important;
  box-shadow: none !important; outline: none !important;
  padding: 10px 12px !important; font-size: 15px !important;
  min-height: 42px !important; resize: none !important;
}
body.ffp form.message-composer textarea:focus { box-shadow: none !important; border: 0 !important; }
body.ffp form.message-composer .send-message {
  background: var(--ffp-green) !important; color: #fff !important; border-radius: 50% !important;
  width: 42px !important; height: 42px !important; border: 0 !important; box-shadow: none !important;
}
body.ffp form.message-composer .send-message:disabled { background: transparent !important; color: #8696a0 !important; }
body.ffp form.message-composer .record-mic { background: transparent !important; color: #54656f !important; border: 0 !important; box-shadow: none !important; }
body.ffp form.message-composer small { display: none !important; }

/* Painel da triagem: só abre pelo botão (fica por cima da conversa) */
body.ffp .inbox-frame.with-info.has-selection .triage-sidebar {
  top: 60px !important; right: 0 !important; height: calc(100% - 60px) !important; width: 300px !important;
  border-left: 1px solid var(--ffp-line) !important; box-shadow: -4px 0 16px rgba(11, 20, 26, 0.08) !important;
}

/* ====================== ALERTAS DE ESPERA ====================== */
body.ffp button.thread[data-ffp-level] .contact-avatar { box-shadow: 0 0 0 3px var(--ffp-lvl-color) !important; }
body.ffp button.thread[data-ffp-level]::after {
  content: attr(data-ffp-wait);
  position: absolute; right: 14px; bottom: 9px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--ffp-lvl-color); border-radius: 999px; padding: 1px 7px;
}
body.ffp button.thread[data-ffp-level] .unread { visibility: hidden; }
body.ffp button.thread[data-ffp-level="1"] { --ffp-lvl-color: var(--ffp-l1); }
body.ffp button.thread[data-ffp-level="2"] { --ffp-lvl-color: var(--ffp-l2); }
body.ffp button.thread[data-ffp-level="3"] { --ffp-lvl-color: var(--ffp-l3); }
body.ffp button.thread[data-ffp-level="4"] { --ffp-lvl-color: var(--ffp-l4); background: #fff5f5 !important; }
body.ffp button.thread[data-ffp-level="5"] { --ffp-lvl-color: var(--ffp-l5); background: #fff0f6 !important; }
body.ffp button.thread[data-ffp-level="6"] { --ffp-lvl-color: var(--ffp-l6); background: #ffe3ec !important; animation: ffp-pulse 1.6s ease-in-out infinite; }
body.ffp button.thread[data-ffp-old] { --ffp-lvl-color: #8696a0 !important; background: #fff !important; animation: none !important; }
body.ffp button.thread[data-ffp-old] .contact-avatar { box-shadow: none !important; }
@keyframes ffp-pulse { 50% { background: #ffc9da; } }

/* Alertas e comissão ficam no canto inferior esquerdo (sobre o menu), longe do cabeçalho e da digitação. */
#ffp-alerts {
  position: fixed; left: 16px; bottom: 80px; z-index: 9990;
  display: flex; flex-direction: column-reverse; gap: 8px; width: 330px; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.ffp-alert {
  pointer-events: auto;
  display: grid; grid-template-columns: 6px 1fr auto; gap: 0 12px; align-items: stretch;
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 28px rgba(11, 20, 26, 0.22);
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink);
  animation: ffp-in .25s ease-out;
}
.ffp-alert .bar { background: var(--ffp-lvl-color); }
.ffp-alert .body { padding: 8px 0; cursor: pointer; min-width: 0; }
.ffp-alert .title { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ffp-alert .title .chip { background: var(--ffp-lvl-color); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.ffp-alert .who { color: var(--ffp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ffp-alert .msg { color: var(--ffp-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ffp-alert .actions { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 10px 8px 0; }
.ffp-alert button { border: 0; border-radius: 6px; padding: 5px 9px; font-size: 12px; cursor: pointer; font-weight: 600; }
.ffp-alert .open { background: var(--ffp-green); color: #fff; }
.ffp-alert .dismiss { background: var(--ffp-header); color: var(--ffp-ink-2); }
.ffp-alert[data-level="1"] { --ffp-lvl-color: var(--ffp-l1); }
.ffp-alert[data-level="2"] { --ffp-lvl-color: var(--ffp-l2); }
.ffp-alert[data-level="3"] { --ffp-lvl-color: var(--ffp-l3); }
.ffp-alert[data-level="4"] { --ffp-lvl-color: var(--ffp-l4); }
.ffp-alert[data-level="5"] { --ffp-lvl-color: var(--ffp-l5); }
.ffp-alert[data-level="6"] { --ffp-lvl-color: var(--ffp-l6); animation: ffp-in .25s ease-out, ffp-shake .5s .3s 2; }
.ffp-alert-toggle {
  pointer-events: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--ffp-ink); border: 1px solid var(--ffp-line); border-left: 4px solid var(--ffp-lvl-color); border-radius: 999px;
  padding: 6px 12px 6px 10px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(11,20,26,.18);
}
.ffp-alert-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ffp-lvl-color); }
.ffp-alert-toggle small { color: var(--ffp-muted); font-weight: 500; }
.ffp-alert-toggle .arr { color: var(--ffp-muted); font-size: 11px; }
.ffp-alert-toggle.pulse { animation: ffp-in .25s ease-out, ffp-shake .5s .3s 2; }
.ffp-alert-toggle[data-level="1"] { --ffp-lvl-color: var(--ffp-l1); }
.ffp-alert-toggle[data-level="2"] { --ffp-lvl-color: var(--ffp-l2); }
.ffp-alert-toggle[data-level="3"] { --ffp-lvl-color: var(--ffp-l3); }
.ffp-alert-toggle[data-level="4"] { --ffp-lvl-color: var(--ffp-l4); }
.ffp-alert-toggle[data-level="5"] { --ffp-lvl-color: var(--ffp-l5); }
.ffp-alert-toggle[data-level="6"] { --ffp-lvl-color: var(--ffp-l6); }
.ffp-alert-rest { pointer-events: auto; color: var(--ffp-muted); font: 12px system-ui, sans-serif; background: #fff; border-radius: 8px; padding: 4px 10px; align-self: flex-start; }
@keyframes ffp-in { from { opacity: 0; transform: translateX(-20px); } }
@keyframes ffp-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
#ffp-sound-unlock {
  position: fixed; left: 16px; bottom: 80px; z-index: 9991; pointer-events: auto;
  background: var(--ffp-ink); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px;
  font: 600 13px system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
body.ffp-flash-title #ffp-alerts .ffp-alert[data-level="6"] { outline: 2px solid var(--ffp-l6); }

/* ====================== COMISSÃO (widget e janela) ====================== */
#ffp-commission {
  position: fixed; left: 16px; bottom: 16px; z-index: 9980;
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
body.ffp-alerts-on #ffp-commission .pop { display: none; }
#ffp-commission .pill {
  display: flex; align-items: center; gap: 0; background: #fff; border-radius: 999px;
  box-shadow: 0 6px 22px rgba(11, 20, 26, 0.18); overflow: hidden; border: 1px solid var(--ffp-line);
}
#ffp-commission .pill .sum { background: transparent; border: 0; padding: 0 12px 0 14px; height: 46px; max-width: 150px; white-space: nowrap; cursor: pointer; text-align: left; color: var(--ffp-ink); }
#ffp-commission .pill .sum small { display: block; color: var(--ffp-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
#ffp-commission .pill .sum b { font-size: 15px; font-variant-numeric: tabular-nums; }
#ffp-commission .pill .add {
  height: 46px; border: 0; background: var(--ffp-green); color: #fff; font-weight: 700; font-size: 14px;
  padding: 0 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
#ffp-commission .pill .add:hover { background: var(--ffp-green-dark); }
#ffp-commission .pop {
  width: 340px; max-width: calc(100vw - 36px); max-height: 70vh; overflow: auto;
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(11, 20, 26, 0.22); border: 1px solid var(--ffp-line);
  padding: 16px; animation: ffp-up .2s ease-out;
}
@keyframes ffp-up { from { opacity: 0; transform: translateY(10px); } }
#ffp-commission .pop h4 { margin: 0 0 2px; font-size: 15px; }
#ffp-commission .pop .sub { color: var(--ffp-muted); font-size: 12px; margin-bottom: 12px; }
#ffp-commission .pop .big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
#ffp-commission .pop .big div { background: var(--ffp-header); border-radius: 10px; padding: 10px; }
#ffp-commission .pop .big small { color: var(--ffp-muted); display: block; font-size: 11px; }
#ffp-commission .pop .big b { font-size: 18px; font-variant-numeric: tabular-nums; }
#ffp-commission .pop .row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-top: 1px solid var(--ffp-line); }
#ffp-commission .pop .row .n { font-weight: 600; }
#ffp-commission .pop .row .v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
#ffp-commission .pop .row small { color: var(--ffp-muted); font-size: 11.5px; }
#ffp-commission .pop .row.me { background: #f2fbf8; margin: 0 -8px; padding: 8px; border-radius: 8px; border-top-color: transparent; }
#ffp-commission .pop .warn { background: #fff4e6; color: #8a4b00; border-radius: 8px; padding: 8px 10px; font-size: 12px; margin-bottom: 10px; }
#ffp-commission .pop .close { float: right; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--ffp-muted); line-height: 1; }

.ffp-modal-back {
  position: fixed; inset: 0; background: rgba(11, 20, 26, 0.45); z-index: 9995;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink);
}
.ffp-modal {
  background: #fff; border-radius: 14px; width: 520px; max-width: 100%; max-height: calc(100dvh - 32px); overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); animation: ffp-up .2s ease-out;
}
.ffp-modal header { padding: 18px 20px 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ffp-modal header h3 { margin: 0; font-size: 18px; }
.ffp-modal header p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; }
.ffp-modal header .x { border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--ffp-muted); line-height: 1; }
.ffp-modal form { padding: 8px 20px 20px; display: grid; gap: 14px; }
.ffp-modal label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
.ffp-modal label small { font-weight: 400; color: var(--ffp-muted); }
.ffp-modal input, .ffp-modal textarea {
  border: 1px solid #d1d7db; border-radius: 8px; padding: 10px 12px; font: inherit; font-weight: 400; color: var(--ffp-ink); background: #fff; width: 100%; box-sizing: border-box;
}
.ffp-modal input:focus, .ffp-modal textarea:focus { outline: 2px solid var(--ffp-green); border-color: transparent; }
.ffp-modal .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .ffp-modal .grid2 { grid-template-columns: 1fr; } }
.ffp-modal fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.ffp-modal legend { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.ffp-modal legend span { color: #c92a2a; font-weight: 600; }
.ffp-modal .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ffp-modal .chips label { display: inline-flex; }
.ffp-modal .chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ffp-modal .chips span {
  border: 1.5px solid #d1d7db; border-radius: 999px; padding: 7px 13px; cursor: pointer; font-weight: 500; font-size: 13px; background: #fff; user-select: none;
}
.ffp-modal .chips input:checked + span { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }
.ffp-modal .chips input:focus-visible + span { outline: 2px solid var(--ffp-green); outline-offset: 2px; }
.ffp-modal fieldset.missing .chips span { border-color: #e03131; }
.ffp-modal .channel { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; background: var(--ffp-header); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--ffp-ink-2); }
.ffp-modal .preview { background: #f2fbf8; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ffp-green-dark); }
.ffp-modal .error { background: #fff5f5; color: #c92a2a; border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.ffp-modal .ok { background: #ebfbee; color: #2b8a3e; border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.ffp-modal .actions { display: flex; justify-content: flex-end; gap: 10px; }
.ffp-modal .actions button { border: 0; border-radius: 999px; padding: 10px 18px; font: 600 14px system-ui, sans-serif; cursor: pointer; }
.ffp-modal .actions .primary { background: var(--ffp-green); color: #fff; }
.ffp-modal .actions .primary:disabled { opacity: .6; cursor: wait; }
.ffp-modal .actions .ghost { background: var(--ffp-header); color: var(--ffp-ink-2); }
.ffp-modal.nudge { width: 420px; }
.ffp-modal.nudge .body { padding: 4px 20px 20px; }
.ffp-modal.nudge .actions { margin-top: 14px; }

/* Botão "Registrar venda" na página Minha comissão */
.ffp-commission-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--ffp-line); border-radius: 14px; padding: 16px 20px; margin-bottom: 16px;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.ffp-commission-cta b { font-size: 15px; }
.ffp-commission-cta p { margin: 2px 0 0; color: var(--ffp-muted); font-size: 13px; }

/* ====================== PAINEL DE DESEMPENHO ====================== */
body.ffp-dash-on main.workspace > .page-heading,
body.ffp-dash-on .main-tabs > [data-slot="tabs-content"],
body.ffp-dash-on #fastfix-agent-flow-container,
body.ffp-dash-on main.workspace > section:not(#ffp-dashboard) { display: none !important; }
:is(#ffp-dashboard, #ffp-ads) { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffp-dash-on #ffp-dashboard { display: block; }
:is(#ffp-dashboard, #ffp-ads) h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
:is(#ffp-dashboard, #ffp-ads) .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
:is(#ffp-dashboard, #ffp-ads) .head p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; }
:is(#ffp-dashboard, #ffp-ads) .filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
:is(#ffp-dashboard, #ffp-ads) .filters button {
  border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 6px 13px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2);
}
:is(#ffp-dashboard, #ffp-ads) .filters button[aria-pressed="true"] { background: var(--ffp-ink); color: #fff; border-color: var(--ffp-ink); }
:is(#ffp-dashboard, #ffp-ads) .filters label { font-size: 13px; color: var(--ffp-ink-2); display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
:is(#ffp-dashboard, #ffp-ads) .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
:is(#ffp-dashboard, #ffp-ads) .kpi { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 14px 16px; }
:is(#ffp-dashboard, #ffp-ads) .kpi small { color: var(--ffp-muted); font-size: 12.5px; display: block; }
:is(#ffp-dashboard, #ffp-ads) .kpi b { font-size: 28px; font-weight: 700; display: block; margin: 4px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
:is(#ffp-dashboard, #ffp-ads) .kpi span { color: var(--ffp-muted); font-size: 12px; }
:is(#ffp-dashboard, #ffp-ads) .card { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
:is(#ffp-dashboard, #ffp-ads) .card h2 { font-size: 15px; margin: 0 0 2px; }
:is(#ffp-dashboard, #ffp-ads) .card .ffp-note { color: var(--ffp-muted); font-size: 12.5px; margin: 0 0 12px; }
:is(#ffp-dashboard, #ffp-ads) .cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
@media (max-width: 1100px) { :is(#ffp-dashboard, #ffp-ads) .cols { grid-template-columns: 1fr; } }
:is(#ffp-dashboard, #ffp-ads) table { width: 100%; border-collapse: collapse; font-size: 13px; }
:is(#ffp-dashboard, #ffp-ads) .tablewrap { overflow-x: auto; }
:is(#ffp-dashboard, #ffp-ads) th { text-align: left; font-weight: 600; color: var(--ffp-muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--ffp-line); white-space: nowrap; }
:is(#ffp-dashboard, #ffp-ads) td { padding: 9px 10px; border-bottom: 1px solid var(--ffp-line); white-space: nowrap; font-variant-numeric: tabular-nums; }
:is(#ffp-dashboard, #ffp-ads) td.num, :is(#ffp-dashboard, #ffp-ads) th.num { text-align: right; }
:is(#ffp-dashboard, #ffp-ads) tr.muted td { color: var(--ffp-muted); }
:is(#ffp-dashboard, #ffp-ads) .tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; }
:is(#ffp-dashboard, #ffp-ads) .tag.good { background: #ebfbee; color: #2b8a3e; }
:is(#ffp-dashboard, #ffp-ads) .tag.warn { background: #fff4e6; color: #a35200; }
:is(#ffp-dashboard, #ffp-ads) .tag.bad { background: #fff5f5; color: #c92a2a; }
:is(#ffp-dashboard, #ffp-ads) .callout { background: #fff8e1; color: #6b5800; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
:is(#ffp-dashboard, #ffp-ads) .bars { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; border-bottom: 1px solid #d1d7db; position: relative; }
:is(#ffp-dashboard, #ffp-ads) .bars .b { flex: 1; min-width: 4px; background: var(--ffp-green); border-radius: 4px 4px 0 0; position: relative; cursor: default; }
:is(#ffp-dashboard, #ffp-ads) .bars .b:hover { background: var(--ffp-green-dark); }
:is(#ffp-dashboard, #ffp-ads) .bars .b .tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ffp-ink); color: #fff; padding: 5px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 2; pointer-events: none;
}
:is(#ffp-dashboard, #ffp-ads) .bars .b:hover .tip { display: block; }
:is(#ffp-dashboard, #ffp-ads) .axis { display: flex; justify-content: space-between; color: var(--ffp-muted); font-size: 11.5px; margin-top: 4px; }
:is(#ffp-dashboard, #ffp-ads) .hbar { display: grid; grid-template-columns: 130px 1fr 70px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
:is(#ffp-dashboard, #ffp-ads) .hbar .track { background: var(--ffp-header); border-radius: 4px; height: 12px; overflow: hidden; }
:is(#ffp-dashboard, #ffp-ads) .hbar .fill { background: var(--ffp-green); height: 100%; border-radius: 0 4px 4px 0; }
:is(#ffp-dashboard, #ffp-ads) .hbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
:is(#ffp-dashboard, #ffp-ads) .empty { color: var(--ffp-muted); font-size: 13px; padding: 12px 0; }
:is(#ffp-dashboard, #ffp-ads) .loading { color: var(--ffp-muted); padding: 40px 0; text-align: center; }

/* ====================== ANÚNCIOS META ====================== */
body.ffp-ads-on main.workspace > .page-heading,
body.ffp-ads-on .main-tabs > [data-slot="tabs-content"],
body.ffp-ads-on #fastfix-agent-flow-container,
body.ffp-ads-on main.workspace > section:not(#ffp-ads) { display: none !important; }
body.ffp-ads-on #ffp-ads { display: block; }
body.ffp.ffp-ads-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) {
  background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important;
}
#ffp-ads .filters .tool { border-radius: 8px; }
#ffp-ads .kpi.hero { border-color: var(--ffp-green); }
#ffp-ads .card.setup { max-width: 760px; }
#ffp-ads .kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
#ffp-ads .kpi b { font-size: 25px; overflow-wrap: anywhere; }
#ffp-ads .setup ol { margin: 8px 0 14px; padding-left: 22px; color: var(--ffp-ink-2); font-size: 13.5px; list-style: decimal; }
#ffp-ads .setup ol li { margin-bottom: 6px; display: list-item; }
#ffp-ads .setup code { background: var(--ffp-header); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }
#ffp-ads .form { display: grid; gap: 10px; }
#ffp-ads .form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ffp-muted); }
#ffp-ads .form input, #ffp-ads .form select { border: 1px solid #d1d7db; border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ffp-ink); background: #fff; width: 100%; box-sizing: border-box; }
#ffp-ads .form .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#ffp-ads .btn { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 8px 14px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink); }
#ffp-ads .btn.primary { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }
#ffp-ads .btn.danger { color: #c92a2a; }
#ffp-ads .btn:disabled { opacity: 0.6; cursor: default; }
#ffp-ads .msg { font-size: 13px; }
#ffp-ads .msg.err { color: #c92a2a; }
#ffp-ads .msg.ok { color: #2b8a3e; }
#ffp-ads td.name { white-space: normal; min-width: 180px; max-width: 320px; }
#ffp-ads td.name small { display: block; color: var(--ffp-muted); font-size: 11.5px; }
#ffp-ads .tag.off { background: var(--ffp-header); color: var(--ffp-muted); }
#ffp-ads .bars .b.zero { background: var(--ffp-line); }
#ffp-ads .sect-t { font-size: 15px; margin: 0 0 10px; }
#ffp-ads .sect-t small { color: var(--ffp-muted); font-weight: 400; font-size: 12.5px; margin-left: 6px; }
#ffp-ads .kpis.hero5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { #ffp-ads .kpis.hero5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { #ffp-ads .kpis.hero5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#ffp-ads .kpi.hero b { font-size: 27px; }
#ffp-ads .delta { display: inline-block; font-size: 12px; font-weight: 600; color: var(--ffp-muted); background: var(--ffp-header); border-radius: 999px; padding: 1px 8px; margin: 2px 0 4px; }
#ffp-ads .delta.good { background: #ebfbee; color: #2b8a3e; }
#ffp-ads .delta.bad { background: #fff5f5; color: #c92a2a; }
#ffp-ads .kpi .delta { display: table; }
#ffp-ads .strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 0; }
#ffp-ads .strip .mini { padding: 12px 16px; border-right: 1px solid var(--ffp-line); min-width: 0; }
#ffp-ads .strip .mini:last-child { border-right: 0; }
#ffp-ads .strip .mini small { display: block; color: var(--ffp-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffp-ads .strip .mini b { display: block; font-size: 18px; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
#ffp-ads .strip .mini .delta { margin: 0; }
@media (max-width: 1200px) { #ffp-ads .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } #ffp-ads .strip .mini { border-bottom: 1px solid var(--ffp-line); } }
@media (max-width: 700px) { #ffp-ads .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#ffp-ads td.name .share { display: block; height: 4px; background: var(--ffp-header); border-radius: 2px; margin-top: 5px; max-width: 260px; overflow: hidden; }
#ffp-ads td.name .share i { display: block; height: 100%; background: var(--ffp-green); border-radius: 2px; }
#ffp-ads tfoot td { font-weight: 600; border-bottom: 0; border-top: 2px solid var(--ffp-line); }
#ffp-ads tfoot small { color: var(--ffp-muted); font-weight: 400; }
#ffp-ads .charts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { #ffp-ads .charts3 { grid-template-columns: 1fr; } }
#ffp-ads .charts3 .bars { height: 130px; gap: 2px; }
#ffp-ads .hbar.plat { grid-template-columns: 120px 1fr 110px; }
#ffp-ads .hbar .v small { display: block; color: var(--ffp-muted); font-weight: 400; font-size: 11.5px; }
#ffp-ads details.acts summary { cursor: pointer; list-style: none; }
#ffp-ads details.acts summary::-webkit-details-marker { display: none; }
#ffp-ads details.acts summary h2 { display: inline; }
#ffp-ads details.acts summary h2::before { content: "▸ "; color: var(--ffp-muted); }
#ffp-ads details.acts[open] summary h2::before { content: "▾ "; }
#ffp-ads details.acts summary .ffp-note { display: block; margin: 2px 0 8px; }
/* Automação de verba */
#ffp-ads .card.auto { border-color: var(--ffp-green); }
#ffp-ads .auto-h { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
#ffp-ads .auto-h .ffp-note { max-width: 820px; }
#ffp-ads .auto-t td { vertical-align: middle; }
#ffp-ads .auto-t input[type="number"] { width: 64px; border: 1px solid #d1d7db; border-radius: 6px; padding: 5px 6px; font: inherit; text-align: right; }
#ffp-ads .auto-t input[type="date"] { border: 1px solid #d1d7db; border-radius: 6px; padding: 4px 6px; font: inherit; }
#ffp-ads .auto-t .sw { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
#ffp-ads .auto-t small.sim { margin-top: 4px; color: var(--ffp-ink-2); }
#ffp-ads .card.auto h3 { font-size: 13.5px; margin: 16px 0 6px; }
#ffp-ads .auto-log { list-style: none; margin: 0; padding: 0; }
#ffp-ads .auto-log li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--ffp-line); font-size: 13px; }
#ffp-ads .auto-log li:last-child { border-bottom: 0; }
#ffp-ads .auto-log small { display: block; color: var(--ffp-muted); font-size: 12px; margin-top: 2px; white-space: normal; }
#ffp-ads .ic, #ffads-toast .ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px; font-size: 11px; flex: 0 0 20px; background: var(--ffp-header); color: var(--ffp-muted); }
#ffp-ads .ic.good, #ffads-toast .ic.good { background: #ebfbee; color: #2b8a3e; }
#ffp-ads .ic.warn, #ffads-toast .ic.warn { background: #fff4e6; color: #a35200; }
#ffp-ads .ic.bad, #ffads-toast .ic.bad { background: #fff5f5; color: #c92a2a; }
#ffads-tab { position: relative; }
#ffads-tab .ffads-badge { margin-left: auto; background: #e03131; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; }
#ffads-toast { position: fixed; right: 16px; top: 16px; z-index: 9999; width: min(360px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--ffp-line); border-left: 4px solid var(--ffp-green); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 12px 14px; font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
#ffads-toast .t { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#ffads-toast .x { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ffp-muted); }
#ffads-toast ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
#ffads-toast li { display: flex; gap: 8px; align-items: flex-start; }
#ffads-toast li span:not(.ic) { display: block; color: var(--ffp-ink-2); font-size: 12.5px; }
#ffads-toast small { color: var(--ffp-muted); display: block; margin-bottom: 8px; }
#ffads-toast .go { width: 100%; border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 8px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
@media (max-width: 700px) { #ffp-ads .kpi b { font-size: 22px; } }

/* ====================== CELULAR ====================== */
@media (max-width: 950px) {
  body.ffp #fastfix-menu-toggle { height: auto !important; min-height: 34px !important; }
  body.ffp header.chat-top { flex-wrap: wrap !important; padding: 8px 10px !important; }
  body.ffp header.chat-top .chat-title { flex: 1 1 auto !important; }
  body.ffp header.chat-top .chat-controls {
    order: 10; width: 100% !important; flex-wrap: nowrap !important; justify-content: flex-start !important;
    overflow-x: auto !important; scrollbar-width: none !important; margin: 0 !important; padding-bottom: 2px;
  }
  body.ffp header.chat-top .chat-controls > button { flex: 0 0 auto !important; white-space: nowrap !important; }
  body.ffp .chat-message { max-width: 85% !important; }
  body.ffp .message-area { padding: 12px 4% 10px !important; }
  #ffp-alerts { left: 8px; right: 8px; top: 8px; bottom: auto; width: auto; flex-direction: column; }
  .ffp-alert .msg { display: none; }
  #ffp-sound-unlock { left: 8px; top: 8px; bottom: auto; }
  #ffp-commission { left: auto; right: 12px; bottom: 96px; align-items: flex-end; }
  #ffp-commission .pill .sum { display: none; }
  #ffp-commission .pill .add { height: 44px; border-radius: 999px; }
}

/* Simulador de comissão (página Minha comissão) */
.ffp-sim { background: #fff; border: 1px solid var(--ffp-line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
.ffp-sim .sim-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.ffp-sim .sim-head > div > b { font-size: 15px; }
.ffp-sim .sim-head p { margin: 2px 0 0; color: var(--ffp-muted); font-size: 13px; }
.ffp-sim .sim-head p b { color: var(--ffp-ink); }
.ffp-sim .who { display: grid; gap: 4px; font-size: 12px; color: var(--ffp-muted); }
.ffp-sim select { border: 1px solid #d1d7db; border-radius: 8px; padding: 7px 10px; font: inherit; color: var(--ffp-ink); background: #fff; }
.ffp-sim .warn { background: #fff4e6; color: #8a4b00; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 12px; }
.ffp-sim .sim-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
@media (max-width: 800px) { .ffp-sim .sim-body { grid-template-columns: 1fr; } }
.ffp-sim .sim-input { background: var(--ffp-header); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.ffp-sim .sim-input label { font-weight: 600; font-size: 13px; }
.ffp-sim .sim-input small { color: var(--ffp-muted); font-size: 12px; }
.ffp-sim .qty { display: flex; gap: 10px; align-items: center; }
.ffp-sim .qty input[type=range] { flex: 1; accent-color: var(--ffp-green); }
.ffp-sim .qty input[type=number] { width: 76px; border: 1px solid #d1d7db; border-radius: 8px; padding: 7px 8px; font: 600 16px system-ui, sans-serif; text-align: right; }
.ffp-sim .sim-out { border: 1px solid var(--ffp-line); border-radius: 12px; padding: 12px 14px; display: grid; align-content: center; }
.ffp-sim .sim-out small { color: var(--ffp-muted); font-size: 12px; }
.ffp-sim .sim-out b { font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ffp-sim .sim-out span { color: var(--ffp-muted); font-size: 12px; }
.ffp-sim .sim-out.main { background: #e7f8f3; border-color: transparent; }
.ffp-sim .sim-out.main b { color: var(--ffp-green-dark); font-size: 28px; }
.ffp-sim .sim-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ffp-sim .sim-steps button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 10px; padding: 7px 12px; cursor: pointer; display: grid; text-align: left; font: inherit; }
.ffp-sim .sim-steps button span { font-size: 11.5px; color: var(--ffp-muted); }
.ffp-sim .sim-steps button b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ffp-sim .sim-steps button[aria-pressed="true"] { border-color: var(--ffp-green); background: #f2fbf8; }
.ffp-sim .sim-pace { margin: 12px 0 0; font-size: 13px; color: var(--ffp-ink-2); }


/* ====================== AGENDA ====================== */
body:not(.ffp-agenda-classic) [id$="-content-appointments"] > :not(#ffp-agenda):not(#ffp-agenda-back) { display: none !important; }
body.ffp-agenda-classic #ffp-agenda { display: none !important; }
#ffp-agenda-back { margin-bottom: 12px; border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 7px 14px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
#ffp-agenda { font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffp main.workspace:has(#ffp-agenda) > .page-heading { display: none !important; }
#ffp-agenda .ag-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
#ffp-agenda h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
#ffp-agenda .ag-head p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; }
#ffp-agenda .ag-head p b { color: var(--ffp-ink); }
.ag-primary, .ffp-modal .ag-primary { background: var(--ffp-green); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font: 600 14px system-ui, sans-serif; cursor: pointer; }
.ag-primary:hover { background: var(--ffp-green-dark); }
#ffp-agenda .ag-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
#ffp-agenda .ag-seg { display: inline-flex; background: var(--ffp-header); border-radius: 999px; padding: 3px; }
#ffp-agenda .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 13px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#ffp-agenda .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
#ffp-agenda .ag-nav { display: inline-flex; align-items: center; gap: 4px; }
#ffp-agenda .ag-nav button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; min-width: 32px; height: 32px; padding: 0 10px; font: 500 14px system-ui, sans-serif; cursor: pointer; }
#ffp-agenda .ag-nav b { margin-left: 6px; font-size: 14px; }
#ffp-agenda .ag-check { font-size: 13px; color: var(--ffp-ink-2); display: inline-flex; gap: 6px; align-items: center; }
#ffp-agenda .ag-admin { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ffp-ink-2); }
#ffp-agenda .ag-admin select { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 4px 6px; font: inherit; }
#ffp-agenda .ag-admin button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 6px 10px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffp-agenda .ag-error { background: #fff5f5; color: #c92a2a; border-radius: 10px; padding: 12px; }
#ffp-agenda .ag-empty { background: #fff; border: 1px dashed #d1d7db; border-radius: 12px; padding: 40px 16px; text-align: center; color: var(--ffp-muted); }
#ffp-agenda .ag-empty b { color: var(--ffp-ink); }
#ffp-agenda .ag-tip { color: var(--ffp-muted); font-size: 12.5px; margin: 8px 2px 0; }

#ffp-agenda .ag-scroll { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; overflow: auto; max-height: calc(100dvh - 230px); }
#ffp-agenda .ag-week { display: grid; grid-template-columns: 52px repeat(6, minmax(130px, 1fr)); min-width: 860px; }
#ffp-agenda .ag-day { position: sticky; top: 0; z-index: 3; background: #fff; height: 48px; border-bottom: 1px solid var(--ffp-line); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--ffp-muted); text-transform: capitalize; }
#ffp-agenda .ag-day b { font-size: 18px; color: var(--ffp-ink); }
#ffp-agenda .ag-day em { font-style: normal; background: var(--ffp-header); color: var(--ffp-ink-2); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
#ffp-agenda .ag-col.today .ag-day b { background: var(--ffp-green); color: #fff; border-radius: 999px; min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
#ffp-agenda .ag-hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ffp-muted); font-variant-numeric: tabular-nums; }
#ffp-agenda .ag-hours span:first-child { transform: none; }
#ffp-agenda .ag-col { border-left: 1px solid var(--ffp-line); }
#ffp-agenda .ag-cells { position: relative; cursor: copy; }
#ffp-agenda .ag-line { position: absolute; left: 0; right: 0; border-top: 1px solid #f0f2f5; pointer-events: none; }
#ffp-agenda .ag-closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f6f7f8 0 6px, #eef0f2 6px 12px); cursor: not-allowed; display: flex; align-items: center; justify-content: center; }
#ffp-agenda .ag-closed span { color: var(--ffp-muted); font-size: 12px; font-weight: 600; background: #fff; padding: 2px 8px; border-radius: 999px; }
#ffp-agenda .ag-now { position: absolute; left: 0; right: 0; border-top: 2px solid #e03131; z-index: 2; pointer-events: none; }
#ffp-agenda .ag-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #e03131; }
#ffp-agenda .ag-ev {
  position: absolute; z-index: 1; overflow: hidden; text-align: left; cursor: pointer;
  background: #e7f8f3; border: 1px solid #c3ebdc; border-left: 4px solid var(--ffp-green); border-radius: 8px;
  padding: 5px 8px; display: flex; flex-direction: column; gap: 1px; font: 12.5px/1.3 system-ui, sans-serif; color: var(--ffp-ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
#ffp-agenda .ag-ev:hover { background: #d5f2e9; z-index: 2; box-shadow: 0 4px 12px rgba(16, 24, 40, .14); }
#ffp-agenda .ag-ev .t { font-size: 11.5px; color: var(--ffp-green-dark); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffp-agenda .ag-ev .t i.ok { background: #e9ecef; color: #495057; }
#ffp-agenda .ag-ev.tight { padding: 4px 5px; font-size: 11.5px; }
#ffp-agenda .ag-ev.tight .t { font-size: 10.5px; }
#ffp-agenda .ag-line.half { border-top: 1px dashed #f3f4f6; }
#ffp-agenda .ag-col.today .ag-cells { background: #f6fdf9; }
#ffp-agenda .ag-day.off { color: #adb5bd; }
#ffp-agenda .ag-day.off b { color: #adb5bd; }
#ffp-agenda .ag-ev .t i, #ffp-agenda .ag-item i { font-style: normal; background: #ede5fb; color: #6741d9; border-radius: 4px; padding: 0 4px; font-size: 10px; font-weight: 700; margin-left: 4px; }
#ffp-agenda .ag-ev .n { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffp-agenda .ag-ev .d { color: var(--ffp-ink-2); font-size: 11.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#ffp-agenda .ag-ev.completed { background: #f1f3f5; border-color: #e1e5e8; border-left-color: #868e96; }
#ffp-agenda .ag-ev.completed .t { color: #495057; }
#ffp-agenda .ag-ev.cancelled { background: #fff5f5; border-color: #ffe3e3; border-left-color: #fa5252; opacity: .7; text-decoration: line-through; }

#ffp-agenda .ag-list { display: grid; gap: 14px; }
#ffp-agenda .ag-group h3::first-letter { text-transform: uppercase; }
#ffp-agenda .ag-group h3 { font-size: 13px; color: var(--ffp-ink-2); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
#ffp-agenda .ag-group h3 span { background: var(--ffp-header); border-radius: 999px; padding: 0 8px; font-size: 11px; }
#ffp-agenda .ag-item { width: 100%; display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; text-align: left; background: #fff; border: 1px solid var(--ffp-line); border-left: 4px solid var(--ffp-green); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; cursor: pointer; font: inherit; color: inherit; }
#ffp-agenda .ag-item:hover { background: var(--ffp-hover); }
#ffp-agenda .ag-item.completed { border-left-color: #868e96; }
#ffp-agenda .ag-item.cancelled { border-left-color: #fa5252; opacity: .7; }
#ffp-agenda .ag-item .time { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; display: grid; }
#ffp-agenda .ag-item small { font-weight: 400; font-size: 12px; color: var(--ffp-muted); }
#ffp-agenda .ag-item .who { display: grid; min-width: 0; }
#ffp-agenda .ag-item .who b, #ffp-agenda .ag-item .who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffp-agenda .ag-item .meta { text-align: right; font-size: 13px; font-weight: 600; display: grid; justify-items: end; gap: 2px; }
#ffp-agenda .ag-item .meta em { font-style: normal; font-size: 11px; color: var(--ffp-muted); }

.ag-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ffp-ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 9999; font: 500 14px system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.ag-toast.bad { background: #c92a2a; }

.ffp-modal.ag-modal.booking { width: 640px; }
.ag-modal form { gap: 6px !important; }
.ag-modal .step { border-top: 1px solid var(--ffp-line); padding: 12px 0 6px; display: grid; gap: 8px; }
.ag-modal .step:first-child { border-top: 0; padding-top: 0; }
.ag-modal h4 { margin: 0; font-size: 13px; color: var(--ffp-ink-2); }
.ag-modal .ag-tabs { display: inline-flex; background: var(--ffp-header); border-radius: 999px; padding: 3px; width: fit-content; flex-wrap: wrap; }
.ag-modal .ag-tabs button { border: 0; background: transparent; border-radius: 999px; padding: 6px 12px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
.ag-modal .ag-tabs button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ag-modal .results { display: grid; gap: 4px; margin-top: 6px; }
.ag-modal .results button { text-align: left; border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 10px; cursor: pointer; display: grid; font: inherit; }
.ag-modal .results button:hover { background: #f2fbf8; border-color: var(--ffp-green); }
.ag-modal .results span, .ag-modal .chip-sel span { color: var(--ffp-muted); font-size: 12.5px; }
.ag-modal .chip-sel { background: #f2fbf8; border: 1px solid #b2ead9; border-radius: 10px; padding: 9px 12px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ag-modal .link { border: 0; background: transparent; color: var(--ffp-green-dark); font: 600 13px system-ui, sans-serif; cursor: pointer; padding: 4px 0; margin-left: auto; }
.ag-modal .pick-svc .link { margin-left: 0; }
.ag-modal .hint { color: var(--ffp-muted); font-size: 13px; margin: 2px 0; }
.ag-modal .hint.bad { color: #c92a2a; }
.ag-modal .days { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ag-modal .days button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 10px; padding: 5px 10px; cursor: pointer; display: grid; text-align: center; font: inherit; min-width: 58px; }
.ag-modal .days button small { font-size: 11px; color: var(--ffp-muted); text-transform: capitalize; }
.ag-modal .days button[aria-pressed="true"] { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }
.ag-modal .days button[aria-pressed="true"] small { color: #e6fff7; }
.ag-modal .days .other { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 500; color: var(--ffp-muted); }
.ag-modal .days .other input { padding: 5px 8px; width: auto; }
.ag-modal .slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; }
.ag-modal .slot-grid button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 0; cursor: pointer; font: 600 13px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.ag-modal .slot-grid button:hover { border-color: var(--ffp-green); }
.ag-modal .slot-grid button[aria-pressed="true"] { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }
.ag-modal .detail { padding: 4px 20px 20px; display: grid; gap: 12px; }
.ag-modal dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.ag-modal dt { color: var(--ffp-muted); }
.ag-modal dd { margin: 0; }
.ag-modal .st { font-weight: 600; }
.ag-modal .st.confirmed { color: var(--ffp-green-dark); }
.ag-modal .st.cancelled { color: #c92a2a; }
.ag-modal .re { display: grid; gap: 8px; border-top: 1px solid var(--ffp-line); padding-top: 12px; }
.ag-modal .actions.wrap { flex-wrap: wrap; }
.ffp-modal .actions .danger { background: #fff5f5; color: #c92a2a; }
.ffp-modal .actions button:disabled { opacity: .5; cursor: not-allowed; }

body.ffp header.chat-top .chat-controls > button.ffp-book-btn { color: var(--ffp-green-dark) !important; border-color: #b2ead9 !important; background: #f2fbf8 !important; border-radius: 999px !important; font-weight: 600 !important; }
@media (max-width: 700px) {
  #ffp-agenda .ag-admin { margin-left: 0; }
  .ag-modal dl { grid-template-columns: 1fr; }
}

/* ====================== ORDENS DE SERVIÇO ====================== */
body.ffo-on main.workspace > .page-heading,
body.ffo-on .main-tabs > [data-slot="tabs-content"],
body.ffo-on #fastfix-agent-flow-container,
body.ffo-on #ffp-dashboard,
body.ffo-on main.workspace > section:not(#ffo) { display: none !important; }
#ffo { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffo-on #ffo { display: block; }
body.ffo-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffo .ffo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
#ffo h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
#ffo .ffo-head p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; }
#ffo .ffo-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
#ffo .ag-seg { display: inline-flex; background: var(--ffp-header); border-radius: 999px; padding: 3px; }
#ffo .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 13px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#ffo .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
#ffo .ffo-search { flex: 1 1 220px; min-width: 180px; border: 1px solid var(--ffp-line); border-radius: 999px; padding: 7px 14px; font: inherit; background: var(--ffp-header); }
#ffo .ag-check { font-size: 13px; color: var(--ffp-ink-2); display: inline-flex; gap: 6px; align-items: center; }
#ffo .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 6px 10px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffo .ag-empty { background: #fff; border: 1px dashed #d1d7db; border-radius: 12px; padding: 40px 16px; text-align: center; color: var(--ffp-muted); }
#ffo .ag-error { background: #fff5f5; color: #c92a2a; border-radius: 10px; padding: 12px; }
#ffo .ag-tip { color: var(--ffp-muted); font-size: 12.5px; margin: 8px 2px 0; }
#ffo .ffo-board { display: grid; grid-template-columns: repeat(8, minmax(175px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
#ffo .ffo-col { background: #eef0f2; border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100dvh - 230px); min-height: 200px; }
#ffo .ffo-col-head { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px 8px; border-top: 3px solid var(--c, #868e96); border-radius: 12px 12px 0 0; }
#ffo .ffo-col-head b { font-size: 13.5px; }
#ffo .ffo-col-head span { background: #fff; border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 700; color: var(--ffp-ink-2); }
#ffo .ffo-col-head small { margin-left: auto; color: var(--ffp-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
#ffo .ffo-col[data-col="entrada"] { --c: #4c6ef5; }
#ffo .ffo-col[data-col="orcamento"] { --c: #f08c00; }
#ffo .ffo-col[data-col="em_servico"] { --c: #7048e8; }
#ffo .ffo-col[data-col="finalizado"] { --c: #2b8a3e; }
#ffo .ffo-col[data-col="retirado"] { --c: #e8590c; }
#ffo .ffo-col[data-col="faturado"] { --c: #087f5b; }
#ffo .ffo-col[data-col="garantia"] { --c: #0c8599; }
#ffo .ffo-col[data-col="cancelado"] { --c: #c92a2a; }
#ffo .ffo-cards { padding: 4px 8px 10px; overflow-y: auto; display: grid; gap: 8px; align-content: start; flex: 1; border-radius: 0 0 12px 12px; transition: background .15s; }
#ffo .ffo-cards.over { background: #dfe7ef; }
#ffo .ffo-none { color: var(--ffp-muted); font-size: 12px; text-align: center; margin: 8px 0; }
#ffo .ffo-card { background: #fff; border-radius: 10px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(11,20,26,.1); cursor: grab; display: grid; gap: 3px; border-left: 3px solid transparent; }
#ffo .ffo-card:hover { box-shadow: 0 3px 10px rgba(11,20,26,.15); }
#ffo .ffo-card.loj { border-left-color: #7048e8; }
#ffo .ffo-card.dragging { opacity: .5; }
#ffo .ffo-card .top { display: flex; align-items: center; gap: 5px; font-size: 12.5px; }
#ffo .ffo-card .tech { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; background: var(--ffp-header); color: var(--ffp-ink-2); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
#ffo .ffo-card .cust { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffo .ffo-card .dev { font-size: 12.5px; color: var(--ffp-ink-2); }
#ffo .ffo-card .def { font-size: 12px; color: var(--ffp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffo .ffo-card .bottom { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.ffo-back .tag, #ffo .tag { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 5px; }
.ffo-back .tag.loj, #ffo .tag.loj { background: #f3f0ff; color: #6741d9; }
#ffo .tag.gar { background: #e3fafc; color: #0b7285; }
#ffo .tag.ok, .ffo-back .tag.ok { background: #ebfbee; color: #2b8a3e; }
#ffo .tag.due, .ffo-back .tag.due { background: #fff4e6; color: #c2410c; }
#ffo .ffo-col-note { margin: -4px 12px 6px; color: var(--ffp-muted); font-size: 11px; }
#ffo .st.retirado { color: #c2410c; font-weight: 600; }
#ffo .st.faturado { color: #087f5b; font-weight: 600; }
.ffo-back .dl, #ffo .dl { font-size: 11.5px; font-weight: 600; color: var(--ffp-ink-2); background: var(--ffp-header); border-radius: 999px; padding: 1px 7px; }
.ffo-back .dl.soon, #ffo .dl.soon { background: #fff4e6; color: #a35200; }
.ffo-back .dl.late, #ffo .dl.late { background: #fff5f5; color: #c92a2a; }
#ffo .pay { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 7px; background: var(--ffp-header); color: var(--ffp-ink-2); }
#ffo .pay.ok { background: #ebfbee; color: #2b8a3e; }
#ffo .pay.due, #ffo .pay.part { background: #fff4e6; color: #a35200; }
#ffo .ffo-table { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; overflow: auto; }
#ffo table { width: 100%; border-collapse: collapse; font-size: 13px; }
#ffo th { text-align: left; color: var(--ffp-muted); font-weight: 600; font-size: 12px; padding: 9px 10px; border-bottom: 1px solid var(--ffp-line); white-space: nowrap; }
#ffo td { padding: 9px 10px; border-bottom: 1px solid var(--ffp-line); white-space: nowrap; }
#ffo td.trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
#ffo .num { text-align: right; font-variant-numeric: tabular-nums; }
#ffo tbody tr { cursor: pointer; }
#ffo tbody tr:hover { background: var(--ffp-hover); }
#ffo b.due { color: #a35200; }
#ffo .st, .ffo-back .st { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--ffp-header); }

.ffp-modal.ffo-modal.wide { width: 860px; }
.ffo-modal .ffo-pad { padding: 4px 20px 16px; display: grid; gap: 12px; }
.ffo-modal .ffo-form section { border-top: 1px solid var(--ffp-line); padding-top: 12px; display: grid; gap: 8px; }
.ffo-modal .ffo-form section:first-child { border-top: 0; padding-top: 0; }
.ffo-modal h4 { margin: 0; font-size: 13px; color: var(--ffp-ink-2); }
.ffo-modal .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .ffo-modal .grid3 { grid-template-columns: 1fr; } }
.ffo-modal select { border: 1px solid #d1d7db; border-radius: 8px; padding: 9px 10px; font: inherit; font-weight: 400; background: #fff; }
.ffo-modal .chips button { border: 1.5px solid #d1d7db; border-radius: 999px; padding: 6px 12px; background: #fff; cursor: pointer; font: 500 13px system-ui, sans-serif; color: var(--ffp-ink); }
.ffo-modal .chips button:hover { border-color: var(--ffp-green); }
.ffo-modal .chips button[aria-pressed="true"] { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }
.ffo-modal .ag-tabs { display: inline-flex; background: var(--ffp-header); border-radius: 999px; padding: 3px; width: fit-content; }
.ffo-modal .ag-tabs button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
.ffo-modal .ag-tabs button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ffo-modal .results { display: grid; gap: 4px; margin-top: 6px; }
.ffo-modal .results button { text-align: left; border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 10px; cursor: pointer; display: grid; font: inherit; }
.ffo-modal .results button:hover { background: #f2fbf8; border-color: var(--ffp-green); }
.ffo-modal .results span, .ffo-modal .chip-sel span { color: var(--ffp-muted); font-size: 12.5px; }
.ffo-modal .chip-sel { background: #f2fbf8; border: 1px solid #b2ead9; border-radius: 10px; padding: 9px 12px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ffo-modal .link { border: 0; background: transparent; color: var(--ffp-green-dark); font: 600 13px system-ui, sans-serif; cursor: pointer; padding: 4px 0; }
.ffo-modal .chip-sel .link { margin-left: auto; }
.ffo-modal .hint { color: var(--ffp-muted); font-size: 13px; margin: 2px 0; }
.ffo-modal .hint.bad { color: #c92a2a; }
.ffo-modal .newcust { display: grid; gap: 10px; }
.ffo-modal header h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ffo-steps { display: flex; gap: 4px; padding: 6px 20px 0; flex-wrap: wrap; }
.ffo-steps button { flex: 1 1 auto; border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 6px 8px; font: 500 12.5px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
.ffo-steps button:hover { background: var(--ffp-hover); }
.ffo-steps button.cur { color: #fff; border-color: transparent; font-weight: 700; }
.ffo-steps button.cur.entrada { background: #4c6ef5; } .ffo-steps button.cur.orcamento { background: #f08c00; } .ffo-steps button.cur.em_servico { background: #7048e8; }
.ffo-steps button.cur.finalizado { background: #2b8a3e; } .ffo-steps button.cur.garantia { background: #0c8599; } .ffo-steps button.cur.cancelado { background: #c92a2a; }
.ffo-tabs { display: flex; gap: 2px; padding: 10px 20px 0; border-bottom: 1px solid var(--ffp-line); overflow-x: auto; }
.ffo-tabs button { border: 0; background: transparent; padding: 8px 12px; font: 600 13px system-ui, sans-serif; color: var(--ffp-muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.ffo-tabs button[aria-pressed="true"] { color: var(--ffp-green-dark); border-bottom-color: var(--ffp-green); }
.ffo-modal.detail .ffo-pad { padding-top: 14px; min-height: 260px; }
.ffo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ffo-grid > div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ffo-modal .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ffo-modal input, .ffo-modal select, .ffo-modal textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ffo-modal dl { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; margin: 0; font-size: 13.5px; }
.ffo-modal dt { color: var(--ffp-muted); }
.ffo-modal dd { margin: 0; }
.ffo-modal label input:disabled { background: var(--ffp-header); }
.ffo-save { display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: #fff8e1; border-radius: 10px; padding: 8px 10px; grid-column: 1 / -1; }
.ffo-save[hidden] { display: none; }
.ffo-save span { color: #6b5800; font-size: 13px; margin-right: auto; }
.ffo-save .primary, .ffo-foot .primary, .ffo-payform .primary, .ffo-noteform .primary { background: var(--ffp-green); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font: 600 13.5px system-ui, sans-serif; cursor: pointer; }
.ffo-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 20px 16px; border-top: 1px solid var(--ffp-line); }
.ffo-foot .ghost { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 8px 14px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
.ffo-foot .sp { flex: 1; }
.ffo-modal > .msg { margin: 0 20px 16px; }
.ffo-modal > .msg:empty { display: none; }
.ffo-money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ffo-money div { background: var(--ffp-header); border-radius: 10px; padding: 8px 10px; }
.ffo-money small { display: block; color: var(--ffp-muted); font-size: 11.5px; }
.ffo-money b { font-variant-numeric: tabular-nums; }
.ffo-money .due { background: #fff4e6; } .ffo-money .ok { background: #ebfbee; }
.ffo-pays { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ffo-pays li { display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--ffp-line); padding: 6px 0; font-size: 13px; }
.ffo-pays li span { flex: 1; display: grid; }
.ffo-pays li small { color: var(--ffp-muted); font-size: 11.5px; }
.ffo-pays li.void { opacity: .5; text-decoration: line-through; }
.ffo-pays li.none { color: var(--ffp-muted); border: 0; }
.ffo-payform, .ffo-noteform { display: flex; gap: 6px; flex-wrap: wrap; }
.ffo-payform input, .ffo-noteform input { flex: 1 1 120px; border: 1px solid #d1d7db; border-radius: 8px; padding: 8px 10px; font: inherit; }
.ffo-payform select { border: 1px solid #d1d7db; border-radius: 8px; padding: 8px; font: inherit; }
.ffo-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ffo-events li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ffp-line); }
.ffo-events li div { display: grid; }
.ffo-events li b { font-weight: 500; font-size: 13.5px; }
.ffo-events li small { color: var(--ffp-muted); font-size: 12px; }
.ffo-events .k { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: #adb5bd; flex: 0 0 8px; }
.ffo-events .k.status { background: #7048e8; } .ffo-events .k.payment { background: #2b8a3e; } .ffo-events .k.deliver { background: #0c8599; } .ffo-events .k.note { background: #f08c00; }
body.ffp header.chat-top .chat-controls > button.ffo-chat-btn { color: #5f3dc4 !important; border-color: #d0bfff !important; background: #f8f5ff !important; border-radius: 999px !important; font-weight: 600 !important; }
@media (max-width: 700px) {
  #ffo .ffo-board { grid-template-columns: repeat(8, 82vw); scroll-snap-type: x mandatory; }
  #ffo .ffo-col { scroll-snap-align: start; }
  .ffo-money { grid-template-columns: 1fr; }
}

/* Impressão da OS */
#ffo-print { display: none; }
@media print {
  body.ffo-printing > *:not(#ffo-print) { display: none !important; }
  body.ffo-printing { background: #fff !important; }
  body.ffo-printing #ffo-print { display: block !important; color: #000; font: 11px/1.35 Arial, Helvetica, sans-serif; }
  #ffo-print .ph { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #000; padding-bottom: 6px; margin-bottom: 6px; }
  #ffo-print .ph small { font-size: 9.5px; }
  #ffo-print .no { text-align: right; font-size: 13px; }
  #ffo-print .no b { font-size: 18px; display: block; }
  #ffo-print .no small { font-size: 9px; text-transform: uppercase; }
  #ffo-print table { width: 100%; border-collapse: collapse; }
  #ffo-print th { text-align: left; vertical-align: top; width: 27%; padding: 2px 6px 2px 0; font-weight: 700; }
  #ffo-print td { padding: 2px 0; white-space: pre-wrap; }
  #ffo-print .terms { margin-top: 8px; font-size: 8.5px; border-top: 1px dashed #000; padding-top: 6px; }
  #ffo-print .sign { margin-top: 28px; text-align: center; }
  #ffo-print .sign span { display: inline-block; border-top: 1px solid #000; min-width: 70%; padding-top: 3px; font-size: 9.5px; }
  #ffo-print.p80 { width: 72mm; }
  #ffo-print.a4 .via { min-height: 128mm; }
  #ffo-print.a4 { font-size: 11.5px; }
  #ffo-print .cut { border-top: 1px dashed #000; margin: 8mm 0; }
}

/* Itens próprios do menu lateral (mesmo visual das abas do painel) */
body.ffp .modern-workspace .navigation .ffp-nav-btn, body.ffp .main-tabs > [data-slot="tabs-list"] .ffp-nav-btn {
  display: flex !important; align-items: center !important; gap: 12px !important; width: 100% !important; height: 44px !important;
  padding: 0 14px !important; border-radius: 11px !important; font: 500 13px system-ui, -apple-system, "Segoe UI", sans-serif !important;
  text-align: left !important; cursor: pointer !important; box-sizing: border-box !important;
}
body.ffp .ffp-nav-btn svg { width: 17px !important; height: 17px !important; flex-shrink: 0 !important; }

/* OS — métricas, contas a receber e relatórios */
#ffo .ffo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
#ffo .ffo-kpi { text-align: left; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 14px; font: inherit; color: inherit; display: grid; gap: 2px; }
#ffo button.ffo-kpi:not(:disabled) { cursor: pointer; }
#ffo button.ffo-kpi:not(:disabled):hover { border-color: var(--ffp-green); }
#ffo .ffo-kpi small { color: var(--ffp-muted); font-size: 12px; }
#ffo .ffo-kpi b { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#ffo .ffo-kpi span { color: var(--ffp-muted); font-size: 11.5px; }
#ffo .ffo-kpi.ok b { color: #2b8a3e; } #ffo .ffo-kpi.bad b { color: #c92a2a; } #ffo .ffo-kpi.warn b { color: #a35200; }
#ffo .ffo-kpis.rep .ffo-kpi b { font-size: 20px; }
#ffo .ffo-card.hl { outline: 2px solid var(--ffp-green); }
#ffo .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); }
#ffo .ffo-mini:hover { border-color: var(--ffp-green); }
#ffo td small, .ffo-modal td small { color: var(--ffp-muted); font-size: 11.5px; }
#ffo .due { color: #a35200; }
#ffo .ffo-repbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; font-size: 13px; }
#ffo .ffo-repbar label { display: inline-flex; gap: 6px; align-items: center; color: var(--ffp-ink-2); }
#ffo .ffo-repbar input[type=date] { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 4px 6px; font: inherit; }
#ffo .ffo-repbar .sp { flex: 1; }
#ffo .ffo-rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; margin-bottom: 12px; }
#ffo .ffo-rcard, #ffo-print .ffo-rcard { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 14px 16px; min-width: 0; overflow: auto; }
#ffo .ffo-rcard h3 { margin: 0 0 8px; font-size: 14px; }
#ffo .ffo-note { color: var(--ffp-muted); font-size: 12px; margin: -4px 0 8px; }
#ffo .hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; align-items: center; padding: 3px 0; font-size: 12.5px; }
#ffo .hbar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffo .hbar .track { background: var(--ffp-header); border-radius: 4px; height: 10px; overflow: hidden; }
#ffo .hbar .fill { background: var(--ffp-green); height: 100%; border-radius: 0 4px 4px 0; }
#ffo .hbar .v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
#ffo .ffo-days { display: flex; align-items: flex-end; gap: 3px; height: 140px; border-bottom: 1px solid #d1d7db; }
#ffo .ffo-days .b { flex: 1; min-width: 3px; background: var(--ffp-green); border-radius: 3px 3px 0 0; position: relative; }
#ffo .ffo-days .b:hover { background: var(--ffp-green-dark); }
#ffo .ffo-days .tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ffp-ink); color: #fff; padding: 5px 8px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; z-index: 2; pointer-events: none; }
#ffo .ffo-days .b:hover .tip { display: block; }
#ffo .axis { display: flex; justify-content: space-between; color: var(--ffp-muted); font-size: 11.5px; margin-top: 4px; }
.ffo-settle-foot { display: grid; grid-template-columns: auto 1fr 1.5fr; gap: 12px; align-items: end; }
.ffo-settle-foot small { color: var(--ffp-muted); display: block; font-size: 12px; }
.ffo-settle-foot b { font-size: 22px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .ffo-settle-foot { grid-template-columns: 1fr; } }
.ffo-modal .ffo-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ffo-modal .ffo-table th, .ffo-modal .ffo-table td { padding: 7px 8px; border-bottom: 1px solid var(--ffp-line); text-align: left; }
.ffo-modal .ffo-table .num { text-align: right; }
@media print {
  #ffo-print .lines { margin-top: 8px; }
  #ffo-print .lines th { width: auto; border-bottom: 1px solid #000; }
  #ffo-print .lines td { border-bottom: 1px solid #ccc; padding: 3px 4px 3px 0; }
  #ffo-print .lines .num { text-align: right; }
  #ffo-print .lines .sum td { font-weight: 700; border-bottom: 0; }
  #ffo-print.rep { font-size: 9.5px; }
  #ffo-print.rep .ffo-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 6px 0; }
  #ffo-print.rep .ffo-kpi { border: 1px solid #999; border-radius: 4px; padding: 4px 6px; display: grid; }
  #ffo-print.rep .ffo-kpi b { font-size: 13px; }
  #ffo-print.rep .ffo-kpi span { font-size: 8.5px; }
  #ffo-print.rep .ffo-rgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  #ffo-print.rep .ffo-rcard { border: 1px solid #999; border-radius: 4px; padding: 5px 7px; break-inside: avoid; margin-bottom: 6px; overflow: visible; }
  #ffo-print.rep .ffo-rcard h3 { font-size: 11px; margin: 0 0 4px; }
  #ffo-print.rep .ffo-note { font-size: 8px; margin: 0 0 3px; color: #555; }
  #ffo-print.rep table { width: 100%; border-collapse: collapse; }
  #ffo-print.rep th { width: auto; text-align: left; border-bottom: 1px solid #000; font-size: 8.5px; padding: 1px 3px; }
  #ffo-print.rep td { border-bottom: 1px solid #ddd; padding: 1px 3px; white-space: normal; }
  #ffo-print.rep .num { text-align: right; }
  #ffo-print.rep .hbar { display: grid; grid-template-columns: 38% 1fr auto; gap: 4px; align-items: center; }
  #ffo-print.rep .hbar .track { background: #eee; height: 6px; }
  #ffo-print.rep .hbar .fill { background: #555; height: 100%; }
  #ffo-print.rep .ffo-days { display: flex; align-items: flex-end; gap: 1px; height: 60px; border-bottom: 1px solid #000; }
  #ffo-print.rep .ffo-days .b { flex: 1; background: #555; }
  #ffo-print.rep .ffo-days .tip { display: none; }
  #ffo-print.rep .axis { display: flex; justify-content: space-between; font-size: 8px; }
  #ffo-print.rep .tag { font-size: 8px; }
  #ffo-print.rep .ffo-none { color: #777; }
}

#ffo .ffo-kpi:disabled { opacity: 1; color: var(--ffp-ink); }
@media print { #ffo-print p { color: #000; margin: 6px 0; } }

/* ====================== CHAT: grupos, fixados, seleção, mensagens prontas ====================== */
body.ffp .threads { display: flex !important; flex-direction: column !important; }
body.ffp button.thread.ffc-pinned { order: -1; }
body.ffp button.thread.ffc-pinned .thread-line time::before { content: "📌 "; }
body:not(.ffc-groups) button.thread.ffc-group:not(.ffc-pinned) { display: none !important; }
body.ffc-groups button.thread:not(.ffc-group) { display: none !important; }
body.ffc-groups #fastfix-lojistas-empty { display: none !important; }
body.ffp button.thread.ffc-group .contact-avatar { background: #cfd8dc !important; }
body.ffc-select button.thread { padding-left: 44px !important; }
body.ffc-select button.thread::before { content: ""; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 2px solid #8696a0; border-radius: 4px; background: #fff; }
body.ffc-select button.thread.ffc-checked::before { background: var(--ffp-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--ffp-green); }
body.ffc-select button.thread.ffc-checked { background: #e7f8f3 !important; }
.ffc-select-btn { margin-left: auto; border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 4px 11px; font: 600 12px system-ui, sans-serif; color: var(--ffp-ink-2); cursor: pointer; }
body.ffc-select .ffc-select-btn { background: var(--ffp-ink); color: #fff; border-color: var(--ffp-ink); }
.conversation-list { position: relative; }
#ffc-bulk { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px; background: #fff; border-top: 1px solid var(--ffp-line); box-shadow: 0 -4px 12px rgba(11,20,26,.08); font: 13px system-ui, sans-serif; }
#ffc-bulk .sp { flex: 1; }
#ffc-bulk button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; }
#ffc-bulk button.danger { background: #c92a2a; color: #fff; border-color: #c92a2a; }
#ffc-bulk button:disabled { opacity: .5; cursor: not-allowed; }
body.ffp header.chat-top .chat-controls > button.ffc-pin-btn.on { color: #a35200 !important; }
.ffc-modal { width: 560px; }
.ffc-pad { padding: 4px 20px 20px; display: grid; gap: 12px; }
.ffc-warn { background: #fff4e6; border: 1px solid #ffd8a8; border-radius: 10px; padding: 10px 12px; color: #7a3d00; font-size: 13.5px; }
.ffc-warn p { margin: 4px 0 0; }
.ffc-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--ffp-line); border-radius: 10px; }
.ffc-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 7px 10px; border-bottom: 1px solid var(--ffp-line); font-size: 13px; }
.ffc-list li:last-child { border-bottom: 0; }
.ffc-list li span { grid-column: 1; color: var(--ffp-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ffc-list li em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-size: 11px; font-weight: 700; color: #c92a2a; background: #fff5f5; border-radius: 999px; padding: 1px 8px; }
.ffc-check { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 600; font-size: 13.5px; }
.ffc-check input { width: auto !important; margin-top: 3px; }
.ffp-modal .actions .primary.danger { background: #c92a2a; }
.ffp-modal .actions .primary:disabled { opacity: .45; cursor: not-allowed; }
#ffc-qr { position: fixed; z-index: 9996; background: #fff; border-radius: 12px; box-shadow: 0 12px 36px rgba(11,20,26,.25); border: 1px solid var(--ffp-line); overflow: hidden; font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
#ffc-qr .hd { padding: 7px 12px; font-size: 11.5px; color: var(--ffp-muted); background: var(--ffp-header); }
#ffc-qr .it { padding: 8px 12px; cursor: pointer; border-top: 1px solid var(--ffp-line); }
#ffc-qr .it.on, #ffc-qr .it:hover { background: #e7f8f3; }
#ffc-qr .it b { color: var(--ffp-green-dark); }
#ffc-qr .it small { display: block; color: var(--ffp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.ffc-qr-on main.workspace > .page-heading,
body.ffc-qr-on .main-tabs > [data-slot="tabs-content"],
body.ffc-qr-on main.workspace > section:not(#ffc-qr-admin) { display: none !important; }
body.ffc-qr-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffc-qr-admin { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffc-qr-on #ffc-qr-admin { display: block; }
#ffc-qr-admin h1 { font-size: 24px; margin: 0; }
#ffc-qr-admin .ffc-head p { color: var(--ffp-muted); font-size: 13px; margin: 4px 0 14px; }
#ffc-qr-admin .ffc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { #ffc-qr-admin .ffc-grid { grid-template-columns: 1fr; } }
#ffc-qr-admin .ffc-card { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 12px; }
#ffc-qr-admin h2 { font-size: 15px; margin: 0; }
#ffc-qr-admin label { display: grid; gap: 5px; font-weight: 600; font-size: 13px; }
#ffc-qr-admin input, #ffc-qr-admin textarea { border: 1px solid #d1d7db; border-radius: 8px; padding: 9px 11px; font: inherit; font-weight: 400; width: 100%; box-sizing: border-box; }
#ffc-qr-admin .g2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
#ffc-qr-admin .actions { display: flex; justify-content: flex-end; gap: 8px; }
#ffc-qr-admin .actions button { border: 0; border-radius: 999px; padding: 9px 16px; font: 600 13.5px system-ui, sans-serif; cursor: pointer; }
#ffc-qr-admin .actions .primary { background: var(--ffp-green); color: #fff; }
#ffc-qr-admin .actions .ghost { background: var(--ffp-header); }
#ffc-qr-admin .msg.error { background: #fff5f5; color: #c92a2a; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
#ffc-qr-admin .ffc-replies { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#ffc-qr-admin .ffc-replies li { display: grid; grid-template-columns: 1fr auto; gap: 10px; border: 1px solid var(--ffp-line); border-radius: 10px; padding: 9px 11px; }
#ffc-qr-admin .ffc-replies li b { color: var(--ffp-green-dark); }
#ffc-qr-admin .ffc-replies p { margin: 4px 0 0; color: var(--ffp-ink-2); font-size: 12.5px; white-space: pre-wrap; max-height: 5.4em; overflow: hidden; }
#ffc-qr-admin .btns { display: flex; gap: 4px; align-items: flex-start; }
#ffc-qr-admin .btns button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 6px; padding: 4px 8px; font: 600 12px system-ui, sans-serif; cursor: pointer; }
#ffc-qr-admin .btns button:disabled { opacity: .4; }
#ffc-qr-admin .btns .del { color: #c92a2a; }
#ffc-qr-admin .ffc-none { color: var(--ffp-muted); font-size: 13px; }

/* Em grupo, só ficam os botões que fazem sentido (fixar, encerrar, triagem oculta) */
body.ffc-group-chat header.chat-top .chat-controls > :is(.ffp-sale-btn, .ffp-book-btn, .ffo-chat-btn, .lojista-btn, .fastfix-return-btn, .triage-btn, .fastfix-crm-btn, .fastfix-schedule-btn) { display: none !important; }
.ffp-modal .actions .primary:disabled { background: #e9ecef !important; color: #868e96 !important; opacity: 1 !important; }

/* Documento recebido (PDF/comprovante) */
body.ffp .chat-message p.ffc-doc-text { display: none !important; }
.ffc-doc { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; background: rgba(11,20,26,.05); border-radius: 8px; padding: 8px 10px; min-width: 220px; max-width: 320px; }
.ffc-doc .ic { grid-row: 1 / 3; width: 38px; height: 44px; border-radius: 4px; background: #e03131; color: #fff; font: 700 11px system-ui, sans-serif; display: flex; align-items: center; justify-content: center; }
.ffc-doc .nm { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ffp-ink); }
.ffc-doc .bt { display: flex; gap: 12px; }
.ffc-doc .bt a { color: var(--ffp-green-dark); font: 600 12.5px system-ui, sans-serif; text-decoration: none; }
.ffc-doc .bt a:hover { text-decoration: underline; }

/* Corretor ortográfico do chat */
#ffc-spell { position: fixed; z-index: 9995; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: #fff8e1; border: 1px solid #ffe08a; border-radius: 10px; padding: 7px 10px; box-shadow: 0 6px 18px rgba(11,20,26,.15); font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; color: #5c4a00; box-sizing: border-box; }
#ffc-spell .lb { font-weight: 700; }
#ffc-spell .er s { color: #c92a2a; }
#ffc-spell .er b { color: #2b8a3e; }
#ffc-spell .sp { flex: 1; }
#ffc-spell button { border: 1px solid #e9d18a; background: #fff; border-radius: 999px; padding: 4px 11px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; }
#ffc-spell button.fix { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }
#ffc-spell.shake { animation: ffp-shake .4s 2; }

/* 📌 no item do grupo (fixar em Conversas Clientes) */
.ffc-thread-pin { position: absolute; right: 12px; top: 34px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; background: #fff; border: 1px solid var(--ffp-line); cursor: pointer; opacity: 0; transition: opacity .15s; filter: grayscale(1); z-index: 2; }
button.thread:hover .ffc-thread-pin { opacity: 1; }
button.thread.ffc-pinned .ffc-thread-pin { filter: none; background: #fff4e6; border-color: #ffd8a8; }
button.thread.ffc-pinned:hover .ffc-thread-pin { opacity: 1; }
.ffc-thread-pin:hover { filter: none; border-color: var(--ffp-green); }
@media (hover: none) { .ffc-thread-pin { opacity: 1; } }

body.ffp header.chat-top .chat-controls > button.ffc-alert-btn { color: #2b8a3e !important; }
body.ffp header.chat-top .chat-controls > button.ffc-alert-btn.off { color: #868e96 !important; }

body.ffp header.chat-top .chat-controls > button.ffc-noreply-btn { color: #2b8a3e !important; }

.ffc-vid .ic { background: #1c7ed6 !important; font-size: 16px !important; }
.ffc-vid small { grid-column: 1 / -1; color: var(--ffp-muted); font-size: 12px; line-height: 1.35; }
.ffc-loc .ic { background: #e8f5ee !important; font-size: 18px !important; }
.ffc-loc > small { grid-column: 1 / -1; color: var(--ffp-muted); font-size: 12px; line-height: 1.35; }
.ffc-audtag { font: 600 12px system-ui, sans-serif; color: #5f3dc4; margin: 0 0 4px; }

/* Setores Clientes/Lojistas também por CSS: vale assim que a lista aparece (o filtro do enhancer roda depois). */
body.sector-lojistas:not(.ffc-groups) button.thread[data-is-lojista="false"] { display: none !important; }
body.sector-clientes:not(.ffc-groups) button.thread[data-is-lojista="true"] { display: none !important; }

/* ---------- Tela de login (v2026-10) ---------- */
.login-screen.ffl{display:flex;align-items:center;justify-content:center;min-height:100dvh;padding:24px 16px;background:radial-gradient(900px 520px at 50% -10%,rgba(255,122,26,.22),transparent 65%),radial-gradient(700px 500px at 100% 110%,rgba(255,122,26,.10),transparent 60%),#0e1014;color:#f3f4f6;font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif}
.ffl-card{width:100%;max-width:380px;display:grid;gap:18px;padding:36px 30px 30px;border-radius:22px;background:rgba(24,27,33,.78);border:1px solid rgba(255,255,255,.07);box-shadow:0 30px 80px rgba(0,0,0,.45);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);animation:ffl-in .45s ease-out}
@keyframes ffl-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.ffl-logo{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:10px}
.ffl-mark{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#ff8a2a,#e85d04);color:#fff;box-shadow:0 8px 24px rgba(255,122,26,.35)}
.ffl-mark svg{width:30px;height:30px}
.ffl-word{font-size:30px;font-weight:900;letter-spacing:-1.2px;color:#fff}
.ffl-word b{color:#ff8a2a;font-weight:900}
.ffl-field{display:grid;gap:7px}
.ffl-field>span:first-child{font-size:12.5px;font-weight:600;color:#a7adb8}
.ffl-field input{width:100%;min-width:0;height:48px;padding:0 14px;border-radius:12px;border:1px solid #2c313a;background:#12151a;color:#f3f4f6;font-size:15px;outline:none;transition:border-color .15s,box-shadow .15s}
.ffl-field input:focus{border-color:#ff8a2a;box-shadow:0 0 0 3px rgba(255,138,42,.18)}
.ffl-pass{position:relative;display:block}
.ffl-pass input{padding-right:46px}
.ffl-pass button{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:#8a919d;cursor:pointer}
.ffl-pass button:hover{color:#fff;background:rgba(255,255,255,.06)}
.ffl-error{margin:0;padding:10px 12px;border-radius:10px;background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.28);color:#fca5a5;font-size:13.5px}
.ffl-submit{height:50px;margin-top:6px;border:0;border-radius:12px;background:linear-gradient(145deg,#ff8a2a,#e85d04);color:#fff;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 10px 26px rgba(232,93,4,.32);transition:filter .15s,transform .1s}
.ffl-submit:hover{filter:brightness(1.07)}
.ffl-submit:active{transform:translateY(1px)}
.ffl-submit:disabled{opacity:.6;cursor:default}
.ffl-loading{animation:ffl-pulse 1.4s ease-in-out infinite}
@keyframes ffl-pulse{50%{opacity:.45}}
.login-screen.ffl :focus-visible{outline:2px solid #ff8a2a;outline-offset:2px}
.login-screen.ffl input:focus-visible{outline:none}
@media (max-width:480px){.ffl-card{padding:30px 20px 24px}.ffl-word{font-size:26px}}

/* ====================== MENU EM GRUPOS + DOCK LATERAL ====================== */
.navigation > .ffn-h {
  display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; cursor: pointer;
  padding: 10px 10px 4px; margin-top: 4px; font: 700 10.5px system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ffp-muted); text-align: left; border-radius: 6px;
}
.navigation > .ffn-h:hover { color: var(--ffp-ink-2); background: var(--ffp-header); }
.navigation > .ffn-h .arr { width: 12px; font-size: 12px; line-height: 1; }
.navigation::after { order: 10000; }
.navigation > .ffn-h .n { margin-left: auto; background: var(--ffp-badge, #25d366); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10.5px; letter-spacing: 0; }
.navigation > .ffn-h[data-g="atendimento"] { margin-top: 0; }

#ffs-dock { order: 9999; display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: auto; padding: 12px 0 10px; border-top: 1px solid var(--ffp-line); position: sticky; bottom: 0; background: #fff; z-index: 2; }
body.ffp.ffs-docked .main-tabs > [data-slot="tabs-list"], body.ffp.ffs-docked .modern-workspace .navigation { padding-bottom: 0 !important; }
#ffs-dock #ffp-alerts { order: 0; }
#ffs-dock #ffp-commission { order: 1; }
#ffs-dock #ffp-alerts { position: static; width: auto; max-width: none; flex-direction: column; pointer-events: auto; gap: 0; }
#ffs-dock #ffp-alerts:empty { display: none; }
#ffs-dock .ffp-alert-toggle { width: 100%; border-radius: 10px; box-shadow: none; flex-wrap: wrap; row-gap: 0; padding: 7px 10px; text-align: left; }
#ffs-dock .ffp-alert-toggle small { flex-basis: 100%; padding-left: 16px; }
#ffs-dock .ffp-alert-toggle .arr { margin-left: auto; transform: rotate(90deg); font-size: 12px; }
#ffs-dock .ffp-alert-toggle[aria-expanded="true"] .arr { transform: rotate(90deg); }
/* Lista aberta: ao lado do menu, ancorada embaixo */
#ffs-dock .ffp-alert-list { position: fixed; left: var(--ffs-left, 240px); bottom: 16px; width: 340px; max-width: calc(100vw - var(--ffs-left, 240px) - 16px); max-height: calc(100dvh - 32px); overflow: auto; display: flex; flex-direction: column-reverse; gap: 8px; z-index: 9990; padding: 2px; }
#ffs-dock #ffp-commission { position: static; width: 100%; }
#ffs-dock #ffp-commission .pill { width: 100%; border-radius: 10px; box-shadow: none; }
#ffs-dock #ffp-commission .pill .sum { flex: 1; min-width: 0; max-width: none; height: 44px; padding: 0 8px 0 10px; }
#ffs-dock #ffp-commission .pill .add { height: 44px; padding: 0 10px; }
#ffs-dock #ffp-commission .pop { position: fixed; left: var(--ffs-left, 240px); bottom: 16px; z-index: 9985; }
#ffs-dock .ffp-alert-list:empty { display: none; }
/* Menu recolhido: o dock volta a flutuar no canto */
#ffs-dock.floating { position: fixed; left: 16px; bottom: 16px; width: 270px; z-index: 9980; margin: 0; padding: 0; border: 0; background: transparent; }
#ffs-dock.floating .ffp-alert-toggle, #ffs-dock.floating #ffp-commission .pill { box-shadow: 0 6px 22px rgba(11, 20, 26, 0.18); }
#ffs-dock.floating #ffp-commission .pop { bottom: 130px; }
#ffs-dock.floating .ffp-alert-list { bottom: 130px; }

/* ====================== OS: PERÍODO, TOTAIS POR ETAPA E EXTRATOS ====================== */
#ffo .ffo-period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#ffo .ffo-d { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ffp-muted); }
#ffo .ffo-d input { border: 1px solid #d1d7db; border-radius: 8px; padding: 5px 8px; font: inherit; color: var(--ffp-ink); }
#ffo .ffo-sum { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
#ffo .ffo-sum-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; font-size: 13.5px; }
#ffo .ffo-sum-h span { color: var(--ffp-muted); font-size: 12.5px; }
#ffo .ffo-sum-tot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
@media (max-width: 900px) { #ffo .ffo-sum-tot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#ffo .ffo-sum-tot > div { background: var(--ffp-header); border-radius: 10px; padding: 8px 12px; min-width: 0; }
#ffo .ffo-sum-tot small, #ffo .ffo-sum-c small { display: block; color: var(--ffp-muted); font-size: 11.5px; }
#ffo .ffo-sum-tot b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#ffo .ffo-sum-tot span { color: var(--ffp-muted); font-size: 11px; }
#ffo .ffo-sum-tot .ok b { color: #2b8a3e; }
#ffo .ffo-sum-tot .warn { background: #fff4e6; }
#ffo .ffo-sum-tot .warn b { color: #c2410c; }
#ffo .ffo-sum-cols { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#ffo .ffo-sum-c { border: 1px solid var(--ffp-line); border-left: 4px solid var(--c, #868e96); background: #fff; border-radius: 8px; padding: 6px 10px; text-align: left; cursor: pointer; font: inherit; color: var(--ffp-ink); min-width: 120px; }
#ffo span.ffo-sum-c { cursor: default; }
#ffo .ffo-sum-c b { display: block; font-size: 14.5px; font-variant-numeric: tabular-nums; }
#ffo .ffo-sum-c span { color: var(--ffp-muted); font-size: 11px; }
#ffo .ffo-sum-c[data-k="entrada"] { --c: #4c6ef5; }
#ffo .ffo-sum-c[data-k="orcamento"] { --c: #f08c00; }
#ffo .ffo-sum-c[data-k="em_servico"] { --c: #7048e8; }
#ffo .ffo-sum-c[data-k="finalizado"] { --c: #2b8a3e; }
#ffo .ffo-sum-c[data-k="retirado"] { --c: #e8590c; }
#ffo .ffo-sum-c[data-k="faturado"] { --c: #087f5b; }
#ffo .ffo-sum-c[data-k="garantia"] { --c: #0c8599; }
#ffo .ffo-sum-c[data-k="cancelado"] { --c: #c92a2a; }
#ffo .ffo-ext-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
#ffo .ffo-ext-cust { position: relative; min-width: 280px; flex: 1 1 280px; display: grid; gap: 4px; }
#ffo .ffo-ext-cust label { display: grid; gap: 4px; font-size: 12px; color: var(--ffp-muted); }
#ffo .ffo-ext-cust input { border: 1px solid #d1d7db; border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ffp-ink); }
#ffo .ffo-ext-cust .link { justify-self: start; }
#ffo .ffo-ext-drop { position: absolute; top: 60px; left: 0; right: 0; z-index: 20; background: #fff; border: 1px solid var(--ffp-line); border-radius: 10px; box-shadow: 0 10px 30px rgba(11,20,26,.15); max-height: 320px; overflow: auto; }
#ffo .ffo-ext-drop button { display: block; width: 100%; text-align: left; border: 0; background: #fff; padding: 8px 12px; cursor: pointer; font: inherit; border-bottom: 1px solid var(--ffp-line); }
#ffo .ffo-ext-drop button:hover { background: var(--ffp-header); }
#ffo .ffo-ext-drop small { display: block; color: var(--ffp-muted); font-size: 11.5px; }
#ffo .ffo-ext { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { #ffo .ffo-ext { grid-template-columns: 1fr; } }
#ffo .ffo-ext-prev { min-width: 0; }
#ffo .ffo-ext-title h3 { margin: 0; font-size: 18px; }
#ffo .ffo-ext-title p { margin: 2px 0 10px; color: var(--ffp-muted); font-size: 13px; }
#ffo .ffo-ext-send { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; position: sticky; top: 12px; }
#ffo .ffo-ext-send h4 { margin: 4px 0 0; font-size: 13.5px; }
#ffo .ffo-ext-send .row { display: flex; gap: 8px; }
#ffo .ffo-ext-send a.ffo-mini { text-decoration: none; }
#ffo .ffo-ext-send label { display: grid; gap: 4px; font-size: 12px; color: var(--ffp-muted); }
#ffo .ffo-ext-send textarea { border: 1px solid #d1d7db; border-radius: 8px; padding: 8px 10px; font: 13px/1.4 system-ui, sans-serif; color: var(--ffp-ink); resize: vertical; }
#ffo .ffo-ext-send .primary { border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 10px; font: 600 13.5px system-ui, sans-serif; cursor: pointer; }
#ffo .ffo-ext-send .primary:disabled { opacity: .6; }
#ffo .ffo-ext-send .hint.bad { color: #c92a2a; }
#ffo .ffo-ext-send .msg.ok { color: #2b8a3e; } #ffo .ffo-ext-send .msg.error { color: #c92a2a; }
#ffo tr.muted td { color: var(--ffp-muted); }

/* Aviso de versão nova do CRM (fastfix-crm-refresh.js) */
#ffrefresh-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; gap: 12px; align-items: center; background: var(--ffp-ink, #111b21); color: #fff; border-radius: 999px; padding: 8px 8px 8px 16px; font: 13px system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
#ffrefresh-bar button { border: 0; background: var(--ffp-green, #00a884); color: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; white-space: nowrap; }

/* OS: arrastar com ponteiro (cartão fantasma + barra com todas as etapas) */
#ffo .ffo-card { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#ffo .ffo-card .val { font-size: 12.5px; font-weight: 700; color: var(--ffp-ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
#ffo .ffo-card .bottom { align-items: center; }
#ffo .ffo-card.dragging { opacity: .35; outline: 2px dashed #adb5bd; box-shadow: none; }
body.ffo-dragging, body.ffo-dragging * { cursor: grabbing !important; user-select: none !important; }
.ffo-ghost { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; margin: 0; background: #fff; border-radius: 10px; padding: 9px 10px; display: grid; gap: 3px; box-shadow: 0 12px 28px rgba(11,20,26,.28); font-family: system-ui, sans-serif; font-size: 13px; color: var(--ffp-ink, #111c21); opacity: .96; }
.ffo-ghost .top { display: flex; align-items: center; gap: 5px; font-size: 12.5px; }
.ffo-ghost .cust { font-weight: 600; }
.ffo-ghost .dev, .ffo-ghost .def { font-size: 12px; color: #5c6670; }
.ffo-ghost .bottom { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; }
.ffo-ghost .tag, .ffo-ghost .tech { display: none; }
#ffo-dock { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9999; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 6px; max-width: calc(100vw - 24px); padding: 8px 10px; background: rgba(17,28,33,.92); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
#ffo-dock small { color: #ced4da; font: 600 11px system-ui, sans-serif; margin-right: 2px; }
#ffo-dock .t { --c: #868e96; min-width: 92px; padding: 12px 12px; white-space: nowrap; border-radius: 10px; background: #fff; border-top: 4px solid var(--c); font: 600 12.5px system-ui, sans-serif; color: #111c21; text-align: center; transition: transform .1s, background .1s; }
#ffo-dock .t.over { background: var(--c); color: #fff; transform: scale(1.08); }
#ffo-dock .t[aria-current="true"] { opacity: .45; }
#ffo-dock .t[data-c="entrada"] { --c: #4c6ef5; } #ffo-dock .t[data-c="orcamento"] { --c: #f08c00; } #ffo-dock .t[data-c="em_servico"] { --c: #7048e8; } #ffo-dock .t[data-c="finalizado"] { --c: #2b8a3e; }
#ffo-dock .t[data-c="retirado"] { --c: #e8590c; } #ffo-dock .t[data-c="faturado"] { --c: #087f5b; } #ffo-dock .t[data-c="garantia"] { --c: #0c8599; } #ffo-dock .t[data-c="cancelado"] { --c: #c92a2a; }
#ffo .ffo-cards.over { background: #d3e4f5; box-shadow: inset 0 0 0 2px #74a9e0; }
@media (max-width: 1100px) { #ffo-dock { flex-wrap: wrap; } }
@media (max-width: 700px) { #ffo-dock small { display: none; } #ffo-dock .t { min-width: 0; flex: 1 1 22%; padding: 12px 4px; font-size: 11px; white-space: normal; } }

/* OS: excluir pelo cartão (administrador) */
#ffo .ffo-card .del { margin-left: auto; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: #adb5bd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
#ffo .ffo-card .tech + .del { margin-left: 2px; }
#ffo .ffo-card .del:hover, #ffo .ffo-card .del:focus-visible { background: #fff5f5; color: #c92a2a; }
@media (hover: hover) { #ffo .ffo-card .del { opacity: 0; } #ffo .ffo-card:hover .del, #ffo .ffo-card .del:focus-visible { opacity: 1; } }
.ffo-back .primary.danger, .ffo-back button.primary.danger { background: #c92a2a !important; border-color: #c92a2a !important; color: #fff !important; }
.ffo-back button.primary.danger:hover { background: #a61e1e !important; }

/* Menu lateral organizado: todos os itens com a mesma altura, ícone e espaçamento.
   O menu é uma coluna flex com rolagem; sem "flex: none" os itens adicionados eram espremidos quando faltava altura. */
html body.ffp .modern-workspace .navigation.navigation > button:not(.ffn-h) {
  flex: 0 0 auto !important; height: 34px !important; min-height: 34px !important; width: 100% !important;
  display: flex; align-items: center !important; justify-content: flex-start !important; gap: 10px !important;
  padding: 0 8px 0 12px !important; margin: 0 !important; border-radius: 9px !important; box-sizing: border-box !important;
  font: 500 13px system-ui, -apple-system, "Segoe UI", sans-serif !important; line-height: 1.2 !important; text-align: left !important; white-space: nowrap !important;
}
html body.ffp .modern-workspace .navigation.navigation > button:not(.ffn-h) > span:not([class*="badge"]) { overflow: hidden; text-overflow: ellipsis; }
html body.ffp .modern-workspace .navigation.navigation > button:not(.ffn-h) svg { width: 18px !important; height: 18px !important; flex: none !important; }
html body.ffp .modern-workspace .navigation.navigation > button:not(.ffn-h) [class*="badge"] { margin-left: auto !important; }
html body.ffp .modern-workspace .navigation.navigation { gap: 2px !important; padding-top: 92px !important; }
/* Títulos dos grupos: separados por uma linha e com mais respiro. */
html body .navigation.navigation > .ffn-h { flex: 0 0 auto !important; padding: 10px 12px 4px !important; margin: 4px 0 0 !important; font-size: 11px !important; border-top: 1px solid var(--ffp-line); border-radius: 0 !important; }
html body .navigation.navigation > .ffn-h[data-g="atendimento"] { border-top: 0; margin-top: 0 !important; padding-top: 6px !important; }
html body .navigation.navigation > .ffn-h:hover { background: transparent !important; color: var(--ffp-ink) !important; }

/* OS: colunas recolhíveis (quadro em flex: coluna aberta ocupa o espaço, recolhida vira faixa) e registro no cartão */
#ffo .ffo-board { display: flex !important; }
#ffo .ffo-board > .ffo-col { flex: 1 0 185px; min-width: 185px; }
#ffo .ffo-board > .ffo-col.closed { flex: 0 0 46px; min-width: 46px; min-height: 200px; background: transparent; }
#ffo .ffo-col-x { border: 0; background: transparent; color: var(--ffp-muted); width: 22px; height: 22px; margin: -2px 0 0 -6px; border-radius: 6px; font: 700 16px/1 system-ui, sans-serif; cursor: pointer; flex: none; padding: 0; }
#ffo .ffo-col-x:hover { background: #fff; color: var(--ffp-ink); }
#ffo .ffo-col-strip { --c: #868e96; width: 46px; height: 100%; min-height: 200px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0; border: 0; border-top: 3px solid var(--c); border-radius: 12px; background: #eef0f2; cursor: pointer; font-family: system-ui, sans-serif; color: var(--ffp-ink-2); }
#ffo .ffo-col-strip:hover { background: #e3e7eb; }
#ffo .ffo-col-strip b { writing-mode: vertical-rl; font-size: 13px; white-space: nowrap; }
#ffo .ffo-col-strip span { background: #fff; border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
#ffo .ffo-col-strip.over { background: #d3e4f5; box-shadow: inset 0 0 0 2px #74a9e0; }
#ffo .ffo-col.closed[data-col="entrada"] .ffo-col-strip { --c: #4c6ef5; } #ffo .ffo-col.closed[data-col="orcamento"] .ffo-col-strip { --c: #f08c00; }
#ffo .ffo-col.closed[data-col="em_servico"] .ffo-col-strip { --c: #7048e8; } #ffo .ffo-col.closed[data-col="finalizado"] .ffo-col-strip { --c: #2b8a3e; }
#ffo .ffo-col.closed[data-col="retirado"] .ffo-col-strip { --c: #e8590c; } #ffo .ffo-col.closed[data-col="faturado"] .ffo-col-strip { --c: #087f5b; }
#ffo .ffo-col.closed[data-col="garantia"] .ffo-col-strip { --c: #0c8599; } #ffo .ffo-col.closed[data-col="cancelado"] .ffo-col-strip { --c: #c92a2a; }
#ffo .ffo-card .reg { font-size: 11.5px; color: var(--ffp-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) { #ffo .ffo-board > .ffo-col { flex: 0 0 82vw; } #ffo .ffo-board > .ffo-col.closed { flex: 0 0 46px; } }

/* OS: aba Cadastros */
#ffo .ffo-cadbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 10px; }
#ffo .ffo-cadbar .cad-q { flex: 1 1 280px; }
#ffo .ffo-cadbar a.ffo-mini { text-decoration: none; display: inline-flex; align-items: center; }
#ffo .ffo-cad table { width: 100%; border-collapse: collapse; font-size: 13px; }
#ffo .ffo-cad th, #ffo .ffo-cad td { padding: 8px 10px; border-bottom: 1px solid var(--ffp-line); text-align: left; vertical-align: middle; }
#ffo .ffo-cad th { font-size: 12px; color: var(--ffp-muted); font-weight: 600; background: #fafbfc; position: sticky; top: 0; }
#ffo .ffo-cad .num { text-align: right; font-variant-numeric: tabular-nums; }
#ffo .ffo-cad small, #ffo .ffo-cad .muted { color: var(--ffp-muted); }
#ffo .ffo-cad .link { border: 0; background: none; padding: 0; color: var(--ffp-ink); cursor: pointer; text-align: left; font: inherit; }
#ffo .ffo-cad .link:hover b { color: var(--ffp-green-dark); text-decoration: underline; }
#ffo .ffo-cad .acts { white-space: nowrap; text-align: right; }
#ffo .ffo-cad .acts .ffo-mini { margin-left: 4px; padding: 4px 10px; }
#ffo .ffo-cad .acts .ffo-mini.del { color: #c92a2a; }
#ffo .ffo-cad .acts .ffo-mini.del:hover { border-color: #c92a2a; }
#ffo .ffo-cad .acts .ffo-mini:disabled { opacity: .35; cursor: not-allowed; }
#ffo .ffo-cad .due { color: #c2410c; }
.ffo-modal .imp-out details { margin-top: 8px; font-size: 13px; }
.ffo-modal .imp-out summary { cursor: pointer; font-weight: 600; }
.ffo-modal .imp-list { max-height: 180px; overflow: auto; margin: 6px 0 0; padding-left: 18px; color: var(--ffp-ink-2); }
.ffo-modal .imp-out .ffo-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.ffo-modal .imp-out .ffo-kpi { border: 1px solid var(--ffp-line); border-radius: 10px; padding: 8px 10px; display: grid; }
.ffo-modal .imp-out .ffo-kpi b { font-size: 20px; }
.ffo-modal .imp-out .ffo-kpi.ok b { color: #2b8a3e; } .ffo-modal .imp-out .ffo-kpi.warn b { color: #c2410c; }

/* OS: botão liga/desliga do aviso por WhatsApp ao mudar a etapa */
#ffo .ffo-notify b { color: #c92a2a; font-weight: 600; }
#ffo .ffo-notify.on b { color: var(--ffp-green-dark); }
#ffo .ffo-notify.on { border-color: #b2f2bb; background: #ebfbee; }

/* ====================== RECUPERAR VENDAS ====================== */
body.ffr-on main.workspace > .page-heading,
body.ffr-on .main-tabs > [data-slot="tabs-content"],
body.ffr-on #fastfix-agent-flow-container,
body.ffr-on #ffp-dashboard,
body.ffr-on main.workspace > section:not(#ffr) { display: none !important; }
#ffr { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffr-on #ffr { display: block; }
body.ffr-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffr .ffr-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
#ffr h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
#ffr .ffr-head p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; max-width: 640px; }
#ffr .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 6px 10px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffr .ffr-filters { flex-wrap: wrap; margin-bottom: 12px; }
#ffr .ffr-filters b { margin-left: 4px; font-size: 11.5px; background: #fff; border-radius: 999px; padding: 0 6px; }
#ffr .ffr-list { display: grid; gap: 10px; }
#ffr .ffr-card { background: #fff; border: 1px solid var(--ffp-line); border-left: 4px solid #adb5bd; border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
#ffr .ffr-card.s-recover { border-left-color: #e8590c; } #ffr .ffr-card.s-waiting { border-left-color: #f59f00; } #ffr .ffr-card.s-replied { border-left-color: #4c6ef5; }
#ffr .ffr-card.s-won { border-left-color: #2b8a3e; } #ffr .ffr-card.s-lost { border-left-color: #c92a2a; opacity: .8; }
#ffr .ffr-card .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; }
#ffr .ffr-card .tag { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--ffp-header); color: var(--ffp-ink-2); }
#ffr .ffr-card .tag.meta { background: #e7f0ff; color: #1c4fd8; } #ffr .ffr-card .tag.google { background: #fff4e6; color: #a35200; }
#ffr .ffr-card .tag.st { margin-left: auto; }
#ffr .ffr-card .info { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ffp-ink-2); }
#ffr .ffr-card .info.muted { color: var(--ffp-muted); font-size: 12.5px; }
#ffr .ffr-card .note { font-size: 12.5px; background: #fafbfc; border-radius: 8px; padding: 6px 8px; }
#ffr .ffr-card .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
#ffr .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); }
#ffr .ffo-mini.ok { color: #2b8a3e; } #ffr .ffo-mini.bad { color: #c92a2a; }
#ffr .ffo-mini:hover { border-color: currentColor; }
#ffr .ag-seg { display: inline-flex; background: var(--ffp-header); border-radius: 999px; padding: 3px; }
#ffr .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 13px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#ffr .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
#ffr .ag-seg button[aria-pressed="true"] b { background: var(--ffp-header); }
#ffr .ag-empty { background: #fff; border: 1px dashed var(--ffp-line); border-radius: 12px; padding: 28px; text-align: center; color: var(--ffp-muted); }

/* Estoque */
body.ffe-on main.workspace > .page-heading,
body.ffe-on .main-tabs > [data-slot="tabs-content"],
body.ffe-on #fastfix-agent-flow-container,
body.ffe-on #ffp-dashboard,
body.ffe-on main.workspace > section:not(#ffe) { display: none !important; }
#ffe { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffe-on #ffe { display: block; }
body.ffe-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffe .ffe-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
#ffe h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
#ffe .ffe-head p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; max-width: 640px; }
#ffe .ffe-head a { color: var(--ffp-green-dark); font-weight: 600; }
#ffe .ffe-acts { display: flex; gap: 8px; flex-wrap: wrap; }
#ffe .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 6px 10px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffe .ffe-primary { border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 7px 14px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
#ffe .ffe-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 14px; }
#ffe .ffe-cards > div { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
#ffe .ffe-cards span { font-size: 12px; color: var(--ffp-muted); font-weight: 600; }
#ffe .ffe-cards b { font-size: 20px; font-variant-numeric: tabular-nums; }
#ffe .ffe-cards small { font-size: 12px; color: var(--ffp-muted); }
#ffe .warn { color: #c2410c !important; font-style: normal; }
#ffe .ffe-view { margin-bottom: 10px; }
#ffe .ffe-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
#ffe .ffe-bar input { flex: 1 1 240px; border: 1px solid #d1d7db; border-radius: 8px; padding: 8px 12px; font: inherit; background: #fff; }
#ffe .ffe-bar input:focus { outline: 2px solid var(--ffp-green); border-color: transparent; }
#ffe .ag-seg, .ffe-modal .ag-seg { display: inline-flex; flex-wrap: wrap; background: var(--ffp-header); border-radius: 999px; padding: 3px; }
#ffe .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 12px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#ffe .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
#ffe .ag-empty, .ffe-modal .ag-empty { background: #fff; border: 1px dashed var(--ffp-line); border-radius: 12px; padding: 28px; text-align: center; color: var(--ffp-muted); }
#ffe .ag-error, .ffe-modal .ag-error { background: #fff5f5; color: #c92a2a; border-radius: 10px; padding: 12px; }
.ffe-table { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; overflow: auto; }
.ffe-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ffe-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; color: var(--ffp-muted); font-weight: 700; padding: 9px 10px; background: #fafbfc; border-bottom: 1px solid var(--ffp-line); white-space: nowrap; }
.ffe-table td { padding: 8px 10px; border-bottom: 1px solid var(--ffp-line); vertical-align: middle; }
.ffe-table tr:last-child td { border-bottom: 0; }
.ffe-table tr.grp th { background: var(--ffp-header); color: var(--ffp-ink-2); font-size: 12px; padding: 6px 10px; }
.ffe-table td b { display: block; font-weight: 600; }
.ffe-table td small { color: var(--ffp-muted); font-size: 12px; }
.ffe-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ffe-table .muted, #ffe .muted { color: var(--ffp-muted); font-size: 12.5px; }
.ffe-table .qty { display: inline-block; min-width: 28px; text-align: center; font-weight: 700; background: #ebfbee; color: #2b8a3e; border-radius: 999px; padding: 1px 8px; }
.ffe-table .qty.none { background: #fff5f5; color: #c92a2a; font-size: 11.5px; }
.ffe-table tr.zero td:first-child b { color: var(--ffp-ink-2); }
.ffe-table td small strong { color: var(--ffp-ink-2); }
.ffe-table td .pend { display: inline-block; margin-top: 3px; }
.ffe-modal select { width: 100%; }
.ffe-table .pend { font-size: 11.5px; font-weight: 600; color: #c2410c; background: #fff4e6; border-radius: 999px; padding: 1px 7px; }
.ffe-table .pub { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: #fff5f5; color: #c92a2a; white-space: nowrap; }
.ffe-table .pub.ok { background: #ebfbee; color: #2b8a3e; }
.ffe-table .pub.off { background: var(--ffp-header); color: var(--ffp-muted); }
.ffe-table .acts { white-space: nowrap; text-align: right; }
.ffe-table .acts .ffo-mini + .ffo-mini { margin-left: 4px; }
.ffe-table .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 4px 10px; font: 600 12px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); }
.ffe-table .ffo-mini.ok { color: #2b8a3e; } .ffe-table .ffo-mini.bad { color: #c92a2a; }
.ffe-table .ffo-mini:hover:not(:disabled) { border-color: currentColor; }
.ffe-table .ffo-mini:disabled { opacity: .4; cursor: default; }
.ffe-table .mt { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--ffp-header); white-space: nowrap; }
.ffe-table .mt.t-entrada, .ffe-table .mt.t-inicial { background: #ebfbee; color: #2b8a3e; }
.ffe-table .mt.t-venda { background: #e7f5ff; color: #1864ab; }
.ffe-table .mt.t-uso, .ffe-table .mt.t-perda { background: #fff4e6; color: #a35200; }
.ffe-table .mt.t-estorno { background: #fff5f5; color: #c92a2a; }
.ffe-table .pos { color: #2b8a3e; font-weight: 700; } .ffe-table .neg { color: #c92a2a; font-weight: 700; }
.ffe-table tr.reverted td { opacity: .5; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); }
.ffe-table tr.reverted td.acts { text-decoration: none; }
.ffe-table td.obs { min-width: 160px; max-width: 280px; font-size: 12.5px; color: var(--ffp-ink-2); }
.ffe-table table.moves td:nth-child(2) { min-width: 150px; }
.ffe-table td[data-l="Data"], .ffe-table td[data-l="Por"] { white-space: nowrap; }
.ffe-modal .grid2 label { align-content: end; }
.ffe-modal .hint { margin: 0; font-size: 12.5px; color: var(--ffp-muted); }
.ffe-modal label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ffe-modal label.check input { width: 18px; height: 18px; accent-color: var(--ffp-green); }
.ffe-modal .actions { flex-wrap: wrap; }
.ffe-modal .actions .adjust { margin-right: auto; }
.ffp-modal.ffe-modal.xwide { width: 1040px; }
@media (max-width: 760px) {
  #ffe .ffe-table table, #ffe .ffe-table tbody, #ffe .ffe-table tr, #ffe .ffe-table td { display: block; }
  #ffe .ffe-table thead { display: none; }
  #ffe .ffe-table tr { border-bottom: 1px solid var(--ffp-line); padding: 8px 4px; }
  #ffe .ffe-table td { border: 0; padding: 3px 8px; text-align: left; }
  #ffe .ffe-table td[data-l]:not(:first-child)::before { content: attr(data-l) ": "; color: var(--ffp-muted); font-size: 12px; }
  #ffe .ffe-table .acts { text-align: left; white-space: normal; padding-top: 6px; }
}
.ffe-modal .ffe-buyopts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.ffe-modal .ffe-buyopts > label:first-child { display: flex; align-items: center; gap: 8px; }
.ffe-modal .ffe-buyopts > label:first-child input { width: 70px; }
.ffe-modal .ffe-buylist { max-height: min(52vh, 460px); overflow: auto; }
.ffe-modal .ffe-buylist .ffe-table { border-radius: 10px; }
.ffe-modal .ffe-buylist thead th { position: sticky; top: 0; z-index: 1; }
.ffe-modal input.ffe-buyq { width: 76px; text-align: center; padding: 7px 8px; font-weight: 700; }
.ffe-modal .ffe-buytot { background: #f2fbf8; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.ffe-modal .ffe-buytot .muted { color: var(--ffp-muted); }
.ffe-modal .actions .copy { margin-right: auto; }

/* Painel de desempenho: seções de atenção, funil, mapa de horários e exclusões */
#ffp-dashboard .card.attention { border-color: #ffd8a8; }
#ffp-dashboard td small { color: var(--ffp-muted); font-size: 11.5px; margin-left: 2px; }
#ffp-dashboard .hbar.wide { grid-template-columns: minmax(150px, 220px) 1fr 40px; }
#ffp-dashboard table.heat { font-size: 11px; }
#ffp-dashboard table.heat th { padding: 4px 3px; text-align: center; font-weight: 600; }
#ffp-dashboard table.heat tbody th { text-align: left; padding-right: 8px; }
#ffp-dashboard table.heat td { padding: 0; width: 26px; height: 22px; text-align: center; border: 1px solid #fff; color: #08372d; font-weight: 600; }
#ffp-dashboard .mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 3px 10px; font: 600 12px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); margin-left: 4px; }
#ffp-dashboard .mini:hover { border-color: currentColor; }
#ffp-dashboard .empty { color: var(--ffp-muted); font-size: 13px; padding: 8px 0; }
.ffo-paytech { margin: 4px 0 0; font-size: 12px; color: var(--ffp-muted); }

/* Caixa (PDV) */
body.ffpos-on main.workspace > .page-heading,
body.ffpos-on .main-tabs > [data-slot="tabs-content"],
body.ffpos-on #fastfix-agent-flow-container,
body.ffpos-on #ffp-dashboard,
body.ffpos-on main.workspace > section:not(#ffpos) { display: none !important; }
#ffpos { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffpos-on #ffpos { display: block; }
body.ffpos-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffpos h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
#ffpos h2 { font-size: 15px; margin: 20px 0 8px; }
#ffpos .ffpos-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
#ffpos .ffpos-head p { margin: 4px 0 0; color: var(--ffp-muted); font-size: 13px; max-width: 640px; }
#ffpos .ffpos-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#ffpos .ffpos-day { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ffp-ink-2); }
#ffpos .ffpos-day input { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 6px 8px; font: inherit; }
#ffpos .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 12px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffpos .ffpos-primary { border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 9px 16px; font: 700 14px system-ui, sans-serif; cursor: pointer; }
#ffpos .ffpos-reg { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--ffp-line); background: #fff; }
#ffpos .ffpos-reg.open { border-left: 4px solid var(--ffp-green); }
#ffpos .ffpos-reg.closed { border-left: 4px solid #adb5bd; }
#ffpos .ffpos-reg b { display: block; font-size: 16px; }
#ffpos .ffpos-reg span { color: var(--ffp-muted); font-size: 13px; display: block; }
#ffpos .ffpos-reg .exp { color: var(--ffp-ink-2); margin-top: 4px; }
#ffpos .ffpos-reg .btns { display: flex; gap: 8px; flex-wrap: wrap; }
#ffpos .ffpos-cards { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 10px; }
@media (max-width: 760px) { #ffpos .ffpos-cards { grid-template-columns: 1fr; } }
#ffpos .ffpos-cards > div, #ffpos .ffpos-methods > div { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
#ffpos .ffpos-cards small, #ffpos .ffpos-methods small { color: var(--ffp-muted); font-size: 12px; font-weight: 600; }
#ffpos .ffpos-cards b { font-size: 20px; font-variant-numeric: tabular-nums; }
#ffpos .ffpos-cards .big b { font-size: 26px; }
#ffpos .ffpos-cards span { color: var(--ffp-muted); font-size: 12px; }
#ffpos .ffpos-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 6px; }
#ffpos .ffpos-methods b { font-size: 16px; font-variant-numeric: tabular-nums; }
#ffpos .ag-empty { background: #fff; border: 1px dashed var(--ffp-line); border-radius: 12px; padding: 24px; text-align: center; color: var(--ffp-muted); }
#ffpos .ag-error { background: #fff5f5; color: #c92a2a; border-radius: 10px; padding: 12px; }
#ffpos .bad, .ffpos-modal .bad { color: #c92a2a; }
#ffpos .okc { color: #2b8a3e; }
#ffpos .ffe-table td small { display: inline; }
.ffpos-modal .ffpos-find { display: flex; gap: 8px; flex-wrap: wrap; }
.ffpos-modal .ffpos-find input { flex: 1 1 260px; }
.ffpos-modal .ffpos-find .ghost { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 8px 12px; font: 600 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); }
.ffpos-modal .ffpos-results { display: grid; gap: 4px; }
.ffpos-modal .ffpos-results button { text-align: left; border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font: inherit; }
.ffpos-modal .ffpos-results button:hover { border-color: var(--ffp-green); background: #f2fbf8; }
.ffpos-modal .ffpos-results small { color: var(--ffp-muted); white-space: nowrap; }
.ffpos-modal .ffpos-lines input { border: 1px solid #d1d7db; border-radius: 6px; padding: 6px 8px; font: inherit; width: 100%; }
.ffpos-modal .ffpos-lines input.q { width: 64px; text-align: center; }
.ffpos-modal .ffpos-lines input.p { width: 100px; text-align: right; }
.ffpos-modal .ffpos-total { display: grid; align-content: end; justify-items: end; }
.ffpos-modal .ffpos-total small { color: var(--ffp-muted); font-weight: 600; }
.ffpos-modal .ffpos-total b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ffpos-modal .ffpos-pays { display: grid; gap: 6px; }
.ffpos-modal .ffpos-pays .pay { display: flex; gap: 8px; align-items: center; }
.ffpos-modal .ffpos-pays select { width: auto; min-width: 140px; }
.ffpos-modal .ffpos-pays input { max-width: 160px; }
.ffpos-modal .link { border: 0; background: transparent; color: var(--ffp-green-dark); font: 600 13px system-ui, sans-serif; cursor: pointer; padding: 4px 0; justify-self: start; }
.ffpos-modal .link.bad { color: #c92a2a; }
.ffpos-modal .ffpos-change { font-weight: 700; font-size: 14px; min-height: 18px; }
.ffpos-modal .ffpos-change.ok { color: #2b8a3e; } .ffpos-modal .ffpos-change.due { color: #c2410c; }
.ffpos-modal .ffpos-exp { display: grid; gap: 2px; background: var(--ffp-header); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ffp-ink-2); }
.ffpos-modal .ffpos-exp b { color: var(--ffp-ink); font-size: 15px; margin-top: 4px; }

/* Marketing › Posts Instagram */
body.ffig-on main.workspace > .page-heading,
body.ffig-on .main-tabs > [data-slot="tabs-content"],
body.ffig-on #fastfix-agent-flow-container,
body.ffig-on #ffp-dashboard,
body.ffig-on main.workspace > section:not(#ffig) { display: none !important; }
#ffig { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffig-on #ffig { display: block; }
body.ffig-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffig h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; }
#ffig h2 { font-size: 15px; margin: 24px 0 10px; }
#ffig .ffig-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
#ffig .ffig-head p { margin: 4px 0 8px; color: var(--ffp-muted); font-size: 13px; max-width: 640px; }
#ffig .ffig-status { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#ffig .ffig-sub { font-size: 12px; color: var(--ffp-muted); }
#ffig .ffig-pill { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: #eef2f1; }
#ffig .ffig-pill.ok { color: #0a7a52; background: #e3f5ec; }
#ffig .ffig-pill.bad { color: #b42318; background: #fdecea; }
#ffig .ffig-pill.warn { color: #9a6700; background: #fff5d6; }
#ffig .ffig-acts { display: flex; gap: 8px; flex-wrap: wrap; }
#ffig .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 12px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffig .ffig-warn { border: 1px solid #f3c7a5; background: #fff6ee; color: #8a4b12; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13px; }
#ffig .ffig-warn.soft { border-color: var(--ffp-line); background: #f7f9f8; color: var(--ffp-ink-2); }
#ffig .ffig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
#ffig .ffig-grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
#ffig .ffig-card { background: #fff; border: 1px solid var(--ffp-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
#ffig .ffig-card.bad { border-color: #f1b5ad; }
#ffig .ffig-img { aspect-ratio: 4 / 5; background: #f1f3f2; }
#ffig .ffig-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
#ffig .ffig-ph { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ffp-muted); font-size: 13px; padding: 16px; text-align: center; }
#ffig .ffig-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
#ffig .ffig-when { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#ffig .ffig-when b { font-size: 15px; }
#ffig .ffig-chip { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #eef2f1; white-space: nowrap; }
#ffig .ffig-chip.ok { background: #e3f5ec; color: #0a7a52; }
#ffig .ffig-chip.wait { background: #eef3ff; color: #2948b8; }
#ffig .ffig-chip.done { background: #ece9fb; color: #5b3cc4; }
#ffig .ffig-chip.bad { background: #fdecea; color: #b42318; }
#ffig .ffig-kind { font-size: 12px; color: var(--ffp-muted); }
#ffig .ffig-err { font-size: 12px; color: #b42318; background: #fdecea; border-radius: 8px; padding: 6px 8px; }
#ffig details summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ffp-ink-2); }
#ffig .ffig-cap { white-space: pre-wrap; font-size: 13px; margin: 6px 0 0; max-height: 220px; overflow: auto; }
#ffig .ffig-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
#ffig .ffig-btns .ffo-mini { text-decoration: none; }
.ffig-modal textarea { width: 100%; font: inherit; }
.ffig-modal .ffig-check { display: flex !important; gap: 8px; align-items: center; flex-direction: row !important; }
.ffig-modal .ffig-days { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 10px; font-size: 13px; }
.ffig-modal .ffig-days label { display: inline-flex; gap: 4px; align-items: center; }
@media (max-width: 600px) { #ffig .ffig-grid, #ffig .ffig-grid.small { grid-template-columns: 1fr; } }
#ffig .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 600 12.5px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); }
#ffig .ffo-mini.bad { color: #b42318; }
#ffig .ffo-mini:disabled { opacity: .5; cursor: default; }
/* Recibo da OS */
.ffo-rc-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.ffo-rc-btns .btn { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 8px 14px; font: 500 13px system-ui, sans-serif; color: var(--ffp-ink); text-decoration: none; }
.ffo-rc-btns .btn:hover { border-color: var(--ffp-green); }

/* Marketing › Mensagens nos grupos */
body.ffbc-on main.workspace > .page-heading,
body.ffbc-on .main-tabs > [data-slot="tabs-content"],
body.ffbc-on #fastfix-agent-flow-container,
body.ffbc-on #ffp-dashboard,
body.ffbc-on main.workspace > section:not(#ffbc) { display: none !important; }
#ffbc { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffbc-on #ffbc { display: block; }
body.ffbc-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffbc h1 { font-size: 24px; margin: 0; }
#ffbc h2 { font-size: 15px; margin: 18px 0 8px; }
#ffbc h2 small { font-weight: 400; color: var(--ffp-muted); }
#ffbc .ffig-head p { margin: 4px 0 14px; color: var(--ffp-muted); font-size: 13px; max-width: 720px; }
#ffbc .ffbc-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.4fr); gap: 16px; }
#ffbc .ffbc-card { background: #fff; border: 1px solid var(--ffp-line); border-radius: 14px; padding: 4px 16px 16px; }
#ffbc .ffbc-switch { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; }
#ffbc .ffbc-days { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; margin-bottom: 10px; }
#ffbc .ffbc-time input, #ffbc .ffbc-search { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 6px 8px; font: inherit; }
#ffbc .ffbc-search { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
#ffbc .ffbc-note { font-size: 12px; color: var(--ffp-muted); margin: 8px 0 0; }
#ffbc .ffbc-groups { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; border-top: 1px solid var(--ffp-line); padding-top: 8px; }
#ffbc .ffbc-text { margin-bottom: 12px; }
#ffbc .ffbc-th { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 13px; }
#ffbc textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--ffp-line); border-radius: 8px; padding: 8px; font: 13px/1.4 system-ui, sans-serif; }
#ffbc .ffbc-actions { display: flex; gap: 8px; margin-top: 12px; }
#ffbc .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 5px 11px; font: 600 12px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); }
#ffbc .ffo-mini.bad, #ffbc .bad { color: #b42318; }
#ffbc .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 7px 12px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#ffbc .ffpos-primary { border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 9px 16px; font: 700 14px system-ui, sans-serif; cursor: pointer; }
@media (max-width: 760px) { #ffbc .ffbc-grid { grid-template-columns: 1fr; } }

/* Quadro de OS mais compacto: colunas cabem na tela, títulos numa linha, cartões menores, valores recolhíveis */
#ffo .ffo-board { gap: 8px; }
#ffo .ffo-board > .ffo-col { flex: 1 1 150px; min-width: 150px; max-height: calc(100dvh - 150px); }
#ffo .ffo-col-head { flex-wrap: wrap; row-gap: 1px; padding: 8px 10px 6px; }
#ffo .ffo-col-head b { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
#ffo .ffo-col-head small { flex-basis: 100%; margin-left: 16px; font-size: 11px; }
#ffo .ffo-col-note { margin: 0 10px 4px; font-size: 11px; }
#ffo .ffo-cards { padding: 2px 6px 8px; gap: 6px; }
#ffo .ffo-card { padding: 7px 8px; gap: 1px; }
#ffo .ffo-card .top { font-size: 12px; }
#ffo .ffo-card .cust { font-size: 13px; }
#ffo .ffo-card .dev, #ffo .ffo-card .def { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ffo .ffo-card .reg { font-size: 11px; }
#ffo .ffo-card .bottom { margin-top: 2px; gap: 4px; }
#ffo .ffo-card .bottom > span { font-size: 11px; }
#ffo .ffo-sum-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
#ffo .ffo-sum-tg { margin-left: auto; border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 3px 10px; font: 600 12px system-ui, sans-serif; color: var(--ffp-ink-2); cursor: pointer; }
#ffo .ffo-sum.min { padding-top: 8px; padding-bottom: 8px; }
@media (max-width: 760px) { #ffo .ffo-board > .ffo-col { flex: 0 0 82vw; min-width: 82vw; } }

/* OS — checklist de entrada e fotos do aparelho (formulário e detalhe) */
.ffo-modal .ffo-sub { margin: 14px 0 6px; font: 600 13px system-ui, sans-serif; color: var(--ffp-ink); }
.ffo-modal .ffo-sub small, .ffo-modal h4 small { font-weight: 400; color: var(--ffp-muted); }
.ffo-ck-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 8px; font-size: 13px; }
.ffo-ck-tools .ffo-ck-nt { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; font-weight: 400 !important; color: var(--ffp-ink-2); }
.ffo-ck-tools .ffo-ck-nt input { width: auto !important; margin: 0; }
.ffo-ck { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ffo-ck button { display: flex; align-items: center; gap: 8px; border: 1.5px solid #d1d7db; border-radius: 10px; padding: 7px 10px; background: #fff; cursor: pointer; font: 500 13px system-ui, sans-serif; color: var(--ffp-ink); text-align: left; }
.ffo-ck button i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px dashed #adb5bd; flex-shrink: 0; display: grid; place-items: center; font: 700 11px system-ui, sans-serif; font-style: normal; }
.ffo-ck button[data-state="ok"] { border-color: #2b8a3e; background: #ebfbee; }
.ffo-ck button[data-state="ok"] i { border: 0; background: #2b8a3e; color: #fff; }
.ffo-ck button[data-state="ok"] i::before { content: "✓"; }
.ffo-ck button[data-state="defeito"] { border-color: #c92a2a; background: #fff5f5; }
.ffo-ck button[data-state="defeito"] i { border: 0; background: #c92a2a; color: #fff; }
.ffo-ck button[data-state="defeito"] i::before { content: "✕"; }
.ffo-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: 10px; margin-bottom: 10px; }
.ffo-photos > div { display: grid; gap: 4px; justify-items: start; }
.ffo-photo { position: relative; display: grid !important; place-items: center; align-content: center; gap: 2px; width: 100%; aspect-ratio: 3 / 4; border: 1.5px dashed #c3cbd1; border-radius: 12px; background: #f8f9fa; cursor: pointer; overflow: hidden; margin: 0 !important; text-align: center; }
.ffo-photo:hover { border-color: var(--ffp-accent); }
.ffo-photo .cam { font-size: 26px; }
.ffo-photo b { font-size: 13px; color: var(--ffp-ink); }
.ffo-photo small { font-size: 11.5px; color: var(--ffp-muted); font-weight: 400; }
.ffo-photo.has { border-style: solid; border-color: #dee2e6; }
.ffo-photo.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ffo-photo.has b, .ffo-photo.has small { position: relative; z-index: 1; background: rgba(17, 27, 33, .72); color: #fff; padding: 1px 8px; border-radius: 999px; }
.ffo-photo.has { align-content: end; padding-bottom: 8px; }
.ffo-photobox.busy { opacity: .5; pointer-events: none; }

/* OS — impressão A4 com duas vias (cliente e loja) em meia folha cada */
@media print {
  body.ffo-printing #ffo-print.os2 { width: 210mm; font: 9pt/1.35 "Helvetica Neue", Helvetica, Arial, sans-serif; color: #13161d; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #ffo-print.os2 .os { box-sizing: border-box; height: 148.4mm; padding: 8mm 10mm 7mm; display: flex; flex-direction: column; gap: 3mm; overflow: hidden; page-break-inside: avoid; break-inside: avoid; position: relative; }
  #ffo-print.os2 .os + .os { border-top: 0.3mm dashed #9aa1ad; }
  #ffo-print.os2 .os + .os::before { content: "✂"; position: absolute; top: -2.4mm; left: 4mm; font-size: 9pt; line-height: 1; color: #9aa1ad; background: #fff; padding: 0 1mm; }
  #ffo-print.os2 h6 { margin: 0 0 1mm; font-size: 6.5pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f39200; }
  #ffo-print.os2 h6 b { color: #c92a2a; }
  #ffo-print.os2 p { margin: 0; }
  #ffo-print.os2 header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6mm; padding-bottom: 2.5mm; border-bottom: 0.6mm solid #f39200; }
  #ffo-print.os2 .logo { height: 12mm; width: auto; display: block; }
  #ffo-print.os2 .addr { font-size: 7.5pt; color: #4a5162; line-height: 1.4; }
  #ffo-print.os2 .num { text-align: right; display: grid; justify-items: end; }
  #ffo-print.os2 .num small { font-size: 6.5pt; letter-spacing: .1em; text-transform: uppercase; color: #7a8396; }
  #ffo-print.os2 .num b { font-size: 19pt; line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
  #ffo-print.os2 .num em { font-style: normal; font-size: 6.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: #13161d; color: #fff; padding: .6mm 2mm; border-radius: 1mm; margin-top: .6mm; }
  #ffo-print.os2 .cols { display: grid; grid-template-columns: 1.05fr 1.15fr .9fr; gap: 3mm; }
  #ffo-print.os2 .blk { background: #f4f5f8; border-radius: 2mm; padding: 2mm 2.6mm; display: grid; align-content: start; gap: 1mm; min-width: 0; }
  #ffo-print.os2 .f { display: grid; min-width: 0; }
  #ffo-print.os2 .f small { font-size: 6pt; color: #7a8396; text-transform: uppercase; letter-spacing: .05em; }
  #ffo-print.os2 .f span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #ffo-print.os2 .two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2mm; }
  #ffo-print.os2 .f.money span { font-size: 11pt; font-weight: 800; }
  #ffo-print.os2 .f.money span small { font-size: 7pt; font-weight: 500; text-transform: none; letter-spacing: 0; }
  #ffo-print.os2 .desc { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 4mm; }
  #ffo-print.os2 .desc p, #ffo-print.os2 .obs p { white-space: pre-wrap; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  #ffo-print.os2 .mid { display: flex; gap: 4mm; align-items: stretch; }
  #ffo-print.os2 .ck { flex: 1; min-width: 0; border: 0.25mm solid #e6e8ee; border-radius: 2mm; padding: 2mm 2.6mm; }
  #ffo-print.os2 .items { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9mm 2mm; font-size: 7.5pt; }
  #ffo-print.os2 .items span, #ffo-print.os2 .legend span { display: flex; align-items: center; gap: 1.4mm; white-space: nowrap; overflow: hidden; }
  #ffo-print.os2 .ck i { width: 2.8mm; height: 2.8mm; border-radius: .7mm; border: 0.25mm solid #b8bfcc; flex-shrink: 0; display: grid; place-items: center; font: 700 6pt/1 Arial, sans-serif; font-style: normal; }
  #ffo-print.os2 .ck .ok i { background: #2b8a3e; border-color: #2b8a3e; color: #fff; }
  #ffo-print.os2 .ck .ok i::before { content: "✓"; }
  #ffo-print.os2 .ck .defeito i { background: #c92a2a; border-color: #c92a2a; color: #fff; }
  #ffo-print.os2 .ck .defeito i::before { content: "✕"; }
  #ffo-print.os2 .ck .nt { color: #7a8396; }
  #ffo-print.os2 .legend { display: flex; gap: 4mm; margin-top: 1.2mm; font-size: 6pt; color: #7a8396; }
  #ffo-print.os2 .pics { display: flex; gap: 2mm; }
  #ffo-print.os2 figure { margin: 0; width: 17mm; display: grid; gap: .6mm; }
  #ffo-print.os2 figure img { width: 17mm; height: 22mm; object-fit: cover; border-radius: 1.5mm; display: block; }
  #ffo-print.os2 figcaption { font-size: 6pt; text-align: center; color: #7a8396; text-transform: uppercase; letter-spacing: .05em; }
  #ffo-print.os2 .obs { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
  #ffo-print.os2 .obs p { -webkit-line-clamp: 2; }
  #ffo-print.os2 footer { margin-top: auto; display: grid; grid-template-columns: 1fr 62mm; gap: 5mm; align-items: end; padding-top: 2mm; border-top: 0.25mm solid #e6e8ee; }
  #ffo-print.os2 .terms { font-size: 5.8pt; line-height: 1.35; color: #4a5162; margin: 0; padding: 0; border: 0; }
  #ffo-print.os2 .terms p { margin-top: .6mm; font-weight: 700; color: #13161d; }
  #ffo-print.os2 .sign { display: grid; gap: 6mm; margin: 0; text-align: left; font-size: 6.5pt; color: #4a5162; }
  #ffo-print.os2 .sign span { display: block; min-width: 0; border-top: 0.25mm solid #13161d; padding-top: .8mm; font-size: 6.5pt; }
  #ffo-print.os2 .sign span:last-child { border-top: 0; padding-top: 0; }
}

/* Barra de período: com Hoje/Ontem/Esta semana rola na horizontal em telas estreitas */
#ffo .ffo-period .ag-seg { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
#ffo .ffo-period .ag-seg button { white-space: nowrap; flex-shrink: 0; }

/* OS — padrão de desbloqueio Android (bolinhas) */
.ffo-patbox { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ffo-patbox > div:last-child { display: grid; gap: 3px; justify-items: start; max-width: 300px; font-size: 13px; }
.ffo-patbox small { color: var(--ffp-muted); }
.ffo-pat { width: 132px; height: 132px; border-radius: 14px; background: #f1f3f5; padding: 6px; box-sizing: border-box; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; color: #f39200; }
.ffo-patsvg { width: 100%; height: 100%; display: block; }
.ffo-patsvg .off { fill: #adb5bd; }
.ffo-patsvg .on { fill: #13161d; }
.ffo-patsvg .on.first { fill: #f39200; }
.ffo-patsvg text { fill: #fff; font: 700 10px Arial, sans-serif; }
@media print {
  #ffo-print .pat80 { width: 24mm; height: 24mm; color: #000; }
  #ffo-print .pat80 .off { fill: #999; } #ffo-print .pat80 .on { fill: #000; } #ffo-print .pat80 .on.first { fill: #000; stroke: #000; stroke-width: 2; }
  #ffo-print.os2 .blk.dev { grid-template-columns: 1fr auto; gap: 2mm; align-items: start; }
  #ffo-print.os2 .devf { display: grid; gap: 1mm; min-width: 0; }
  #ffo-print.os2 .blk.dev:has(.pat) .two { grid-template-columns: 1fr; gap: 1mm; }
  #ffo-print.os2 .pat { width: 17mm; display: grid; justify-items: center; gap: .4mm; color: #f39200; }
  #ffo-print.os2 .pat svg { width: 17mm; height: 17mm; background: #fff; border-radius: 1.5mm; }
  #ffo-print.os2 .pat small { font-size: 5.5pt; text-transform: uppercase; letter-spacing: .05em; color: #7a8396; }
}

/* OS — garantia em meses ou personalizada */
.ffo-warr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ffo-warr select { flex: 1 1 130px; }
.ffo-warr .cust { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ffp-muted); }
.ffo-warr .cust[hidden] { display: none; }
.ffo-warr .cust input { width: 90px; }

/* OS — caixinha ao lado de um campo (ex.: "não quis informar" a data de nascimento) */
.ffo-modal .ffo-chk { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; align-self: end; padding-bottom: 9px; font-weight: 400 !important; }
.ffo-modal .ffo-chk input { width: auto !important; margin: 0; }
.ffo-modal .cbirth[hidden] { display: none; }
.ffo-modal .csrc[hidden] { display: none; }

/* Marketing › Fidelização (aniversário e pesquisa de satisfação) */
body.ffly-on main.workspace > .page-heading,
body.ffly-on .main-tabs > [data-slot="tabs-content"],
body.ffly-on #fastfix-agent-flow-container,
body.ffly-on #ffp-dashboard,
body.ffly-on main.workspace > section:not(#ffly) { display: none !important; }
#ffly { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffly-on #ffly { display: block; }
body.ffly-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffly h1 { font-size: 24px; margin: 0; }
#ffly h2 { font-size: 15px; margin: 18px 0 8px; }
#ffly .ffig-head p { margin: 4px 0 14px; color: var(--ffp-muted); font-size: 13px; max-width: 760px; }
#ffly .ffly-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
#ffly .ffo-kpi { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
#ffly .ffo-kpi small { color: var(--ffp-muted); font-size: 12px; }
#ffly .ffo-kpi b { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#ffly .ffo-kpi span { color: var(--ffp-muted); font-size: 11.5px; }
#ffly .ffo-kpi.ok b { color: #2b8a3e; } #ffly .ffo-kpi.bad b { color: #c92a2a; } #ffly .ffo-kpi.warn b { color: #a35200; }
#ffly .ffly-cfg { display: flex; flex-wrap: wrap; gap: 6px 28px; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
#ffly .ffbc-switch { display: flex; gap: 8px; align-items: center; margin: 0; }
#ffly .ffbc-switch small { color: var(--ffp-muted); }
#ffly .ffly-alert { background: #fff5f5; border: 1px solid #ffc9c9; border-radius: 12px; padding: 2px 14px 10px; margin-bottom: 14px; }
#ffly .ffly-alert h2 { color: #c92a2a; margin-top: 12px; }
#ffly .ffly-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid #ffe3e3; }
#ffly .ffly-row small { color: var(--ffp-muted); }
#ffly .ffly-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#ffly .ffly-resolve { display: flex; gap: 6px; flex-wrap: wrap; }
#ffly .ffly-resolve input { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 5px 8px; font: inherit; min-width: 240px; }
#ffly .ffly-tabs { margin: 6px 0 12px; }
#ffly .ffly-stars { color: #f39200; letter-spacing: 1px; white-space: nowrap; }
#ffly .ffly-stars i { color: #dee2e6; font-style: normal; }
/* Fidelização: funil das pesquisas (cartões filtram a lista) */
#ffly .ffly-funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 12px 0 10px; }
#ffly .ffly-step { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ico n" "lab lab" "sub sub"; align-items: center; gap: 2px 8px; text-align: left; padding: 10px 12px; border: 1.5px solid #e3e8eb; border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ffp-ink); }
#ffly .ffly-step .ico { grid-area: ico; font-size: 18px; }
#ffly .ffly-step b { grid-area: n; font-size: 22px; line-height: 1; }
#ffly .ffly-step .lab { grid-area: lab; font-weight: 700; font-size: 13px; }
#ffly .ffly-step small { grid-area: sub; font-size: 11.5px; color: var(--ffp-muted); line-height: 1.3; }
#ffly .ffly-step:hover { border-color: var(--ffp-green); }
#ffly .ffly-step[aria-pressed="true"] { border-color: var(--ffp-green); background: #ebfbee; box-shadow: 0 0 0 2px rgba(43, 138, 62, .15); }
#ffly .ffly-step.pelicula[aria-pressed="false"] b:not(:empty) { color: #a35200; }
#ffly .ffly-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
#ffly .ffly-bar .ffly-q { flex: 1 1 auto; min-width: 0; padding: 9px 12px; border: 1.5px solid #d1d7db; border-radius: 10px; font: inherit; }
#ffly .ffly-bar span { font-size: 12.5px; color: var(--ffp-muted); white-space: nowrap; }
#ffly td.acts { white-space: normal; }
#ffly small.bad { color: #c92a2a; font-weight: 600; }
@media (max-width: 760px) { #ffly .ffly-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } #ffly .ffly-step:last-child { grid-column: 1 / -1; } }
#ffly .ffly-tag { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
#ffly .ffly-tag.ok { background: #ebfbee; color: #2b8a3e; } #ffly .ffly-tag.bad { background: #fff5f5; color: #c92a2a; }
#ffly .ffly-tag.wait { background: #fff4e6; color: #a35200; } #ffly .ffly-tag.muted { background: #f1f3f5; color: var(--ffp-muted); }
#ffly .ffly-by { display: block; color: var(--ffp-muted); font-size: 11.5px; }
#ffly .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 5px 11px; font: 600 12px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); white-space: nowrap; }
#ffly .link { border: 0; background: none; color: var(--ffp-muted); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; }
#ffly select { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 12.5px; }
#ffly code { background: #f1f3f5; border-radius: 6px; padding: 2px 6px; font-size: 12.5px; }
#ffly .ffbc-note { font-size: 12px; color: var(--ffp-muted); margin: 8px 0 0; }
#ffly .ffly-up { display: flex; gap: 8px; flex-wrap: wrap; }
#ffly .ffly-bd { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 8px 12px; display: grid; min-width: 130px; }
#ffly .ffly-bd b { color: #f39200; } #ffly .ffly-bd small { color: var(--ffp-muted); }
#ffly .ffly-bd.today { border-color: #f39200; background: #fff8ef; }

/* Loja › Compras */
body.ffpur-on main.workspace > .page-heading,
body.ffpur-on .main-tabs > [data-slot="tabs-content"],
body.ffpur-on #fastfix-agent-flow-container,
body.ffpur-on #ffp-dashboard,
body.ffpur-on main.workspace > section:not(#ffpur) { display: none !important; }
#ffpur { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); }
body.ffpur-on #ffpur { display: block; }
body.ffpur-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffpur h1 { font-size: 24px; margin: 0; }
#ffpur h2 { font-size: 15px; margin: 16px 0 8px; }
#ffpur .ffpur-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
#ffpur .ffpur-head p { margin: 4px 0 14px; color: var(--ffp-muted); font-size: 13px; max-width: 700px; }
#ffpur .ffpur-btns { display: flex; gap: 8px; }
#ffpur .ffo-gear { border: 1px solid var(--ffp-line); background: #fff; border-radius: 8px; padding: 9px 14px; font: 500 14px system-ui, sans-serif; cursor: pointer; }
#ffpur .ffpos-primary, .ffpur-modal .ffpos-primary { border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 9px 16px; font: 700 14px system-ui, sans-serif; cursor: pointer; }
#ffpur .ffly-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 4px; }
#ffpur .ffo-kpi { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
#ffpur .ffo-kpi small { color: var(--ffp-muted); font-size: 12px; }
#ffpur .ffo-kpi b { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#ffpur .ffo-kpi span { color: var(--ffp-muted); font-size: 11.5px; }
#ffpur .ffo-kpi.ok b { color: #2b8a3e; } #ffpur .ffo-kpi.bad b { color: #c92a2a; }
#ffpur .ffpur-owe { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
#ffpur .ffpur-sup { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
#ffpur .ffpur-sup > div:first-child { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
#ffpur .ffpur-sup > div:first-child b { flex-basis: 100%; }
#ffpur .ffpur-sup > div:last-child { display: flex; gap: 8px; align-items: center; }
#ffpur .ffpur-sup .bad { color: #c92a2a; font-weight: 600; font-size: 13px; } #ffpur .ffpur-sup .ok { color: #2b8a3e; font-size: 12.5px; }
#ffpur .ffpur-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 10px; }
#ffpur .ag-seg, #ffly .ag-seg { display: inline-flex; background: var(--ffp-header); border-radius: 999px; padding: 3px; max-width: 100%; overflow-x: auto; }
#ffpur .ag-seg button, #ffly .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 13px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); white-space: nowrap; }
#ffpur .ag-seg button[aria-pressed="true"], #ffly .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
#ffpur .ffpur-filters select, #ffpur .ffpur-filters input { border: 1px solid var(--ffp-line); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px; background: #fff; }
#ffpur .ffly-tag { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
#ffpur .ffly-tag.ok { background: #ebfbee; color: #2b8a3e; } #ffpur .ffly-tag.bad { background: #fff5f5; color: #c92a2a; } #ffpur .ffly-tag.muted { background: #f1f3f5; color: var(--ffp-muted); }
#ffpur .ffpur-sub, .ffpur-modal .ffpur-sub { display: block; color: var(--ffp-muted); font-size: 11.5px; }
#ffpur .ffpur-sub.late { color: #c92a2a; font-weight: 600; }
#ffpur td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
#ffpur tr.cx td { color: var(--ffp-muted); } #ffpur tr.cx td.num { text-decoration: line-through; }
#ffpur td.acts { white-space: nowrap; text-align: right; }
#ffpur td.acts > * { margin-left: 6px; }
#ffpur .ffo-mini, .ffpur-modal .ffo-mini { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 5px 11px; font: 600 12px system-ui, sans-serif; cursor: pointer; color: var(--ffp-green-dark); white-space: nowrap; }
#ffpur .link, .ffpur-modal .link { border: 0; background: none; color: var(--ffp-green-dark); cursor: pointer; font-size: 12.5px; padding: 0; text-decoration: underline; }
#ffpur .link.bad, .ffpur-modal .link.bad { color: #c92a2a; }
#ffpur .ffbc-note { font-size: 12px; color: var(--ffp-muted); margin: 8px 0 0; }
.ffpur-modal .ffpur-item { display: grid; grid-template-columns: 1fr 70px 120px 24px; gap: 6px; align-items: center; margin-bottom: 6px; }
.ffpur-modal .ffpur-item input { width: 100%; box-sizing: border-box; }
.ffpur-modal .ffpur-item .link { font-size: 18px; text-decoration: none; }
.ffpur-modal .ffpur-total { margin: 4px 0; font-size: 14px; }
.ffpur-modal .ffpur-total b { font-size: 16px; }
.ffpur-modal [hidden] { display: none !important; }
.ffpur-modal .ffpur-paylist { display: grid; gap: 4px; max-height: 260px; overflow: auto; border: 1px solid var(--ffp-line); border-radius: 10px; padding: 8px 10px; }
.ffpur-modal .ffpur-paylist label { display: grid !important; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 0; }
.ffpur-modal .ffpur-suplist { display: grid; gap: 10px; justify-items: start; }
.ffpur-modal .ffpur-suplist .ffe-table { width: 100%; }
@media (max-width: 640px) { .ffpur-modal .ffpur-item { grid-template-columns: 1fr 56px 96px 20px; } #ffpur td.acts { text-align: left; } }

/* Janela "Novidades no sistema" */
.ffnew-back { z-index: 10050 !important; }
.ffo-modal.ffnew { max-width: 560px; }
.ffnew header { border-bottom: 3px solid #f39200; }
.ffnew-list { max-height: 60vh; overflow: auto; }
.ffnew-list ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 12px; }
.ffnew-list h4 { margin: 10px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #f39200; }
.ffnew-list h4:first-child { margin-top: 0; }
.ffnew-list h4 small { color: var(--ffp-muted); font-weight: 500; }
.ffnew-list li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.ffnew-list li > span { font-size: 20px; line-height: 1.2; }
.ffnew-list b { font-size: 14px; }
.ffnew-list p { margin: 2px 0 0; font-size: 13px; color: var(--ffp-ink-2); line-height: 1.4; }
.ffpur-modal form > .link { justify-self: start; }

/* ====================== CELULAR (até 760 px): equipe usa o celular para conversas, compras e estoque ====================== */
@media (max-width: 760px) {
  /* Campos com 16 px: abaixo disso o iPhone dá zoom ao tocar no campo. */
  body.ffp input:not([type=checkbox]):not([type=radio]), body.ffp select, body.ffp textarea { font-size: 16px !important; }

  /* Topo e área de trabalho mais enxutos */
  body.ffp header.topbar { padding: 8px 10px !important; min-height: 0 !important; height: auto !important; gap: 8px !important; }
  body.ffp header.topbar .private-tag { max-width: 44vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  body.ffp #fastfix-menu-toggle { padding: 6px 10px !important; }
  body.ffp main.workspace { padding: 6px 8px 16px !important; }

  /* Menu aberto: lista de abas logo abaixo do topo, sem o espaço vazio de cima */
  html body.ffp .modern-workspace .navigation.navigation { padding-top: 8px !important; }

  /* Atendimento: "Felipe ativo", Pausar e Configurar numa linha só */
  body.ffp .inbox-summary { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 6px 8px !important; min-height: 0 !important; padding: 2px 0 8px !important; }
  body.ffp .inbox-summary .inbox-tools { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; gap: 6px !important; margin-left: auto !important; width: auto !important; }
  body.ffp .inbox-summary .inbox-tools button { height: 32px !important; min-height: 0 !important; padding: 0 10px !important; font-size: 12.5px !important; width: auto !important; }
  body.ffp .inbox-frame { border-radius: 12px !important; }

  /* Conversa aberta: ocupa a tela toda, só as mensagens rolam, a caixa de digitar fica sempre embaixo */
  body.ffp .inbox-frame.has-selection section.conversation-main {
    position: fixed !important; inset: 0 !important; z-index: 9000 !important; width: 100% !important; height: 100dvh !important; max-height: none !important;
    margin: 0 !important; border: 0 !important; border-radius: 0 !important; display: flex !important; flex-direction: column !important; background: var(--ffp-chat-bg, #efeae2) !important;
  }
  body.ffp .inbox-frame.has-selection header.chat-top { flex: 0 0 auto !important; padding: 6px 8px 4px !important; padding-top: calc(6px + env(safe-area-inset-top)) !important; gap: 4px 8px !important; background: var(--ffp-header) !important; }
  body.ffp header.chat-top .back-conversations { width: 36px !important; height: 36px !important; }
  body.ffp header.chat-top .contact-avatar { width: 34px !important; height: 34px !important; min-width: 34px !important; }
  body.ffp header.chat-top .chat-title { min-width: 0 !important; }
  body.ffp header.chat-top .chat-title * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.ffp header.chat-top .chat-controls { gap: 6px !important; padding: 2px 0 4px !important; }
  body.ffp header.chat-top .chat-controls > button { height: 32px !important; min-height: 0 !important; padding: 0 10px !important; font-size: 12.5px !important; border-radius: 999px !important; }
  body.ffp .inbox-frame.has-selection .conversation-mode { flex: 0 0 auto !important; padding: 4px 10px !important; font-size: 12px !important; }
  body.ffp .inbox-frame.has-selection .message-area { flex: 1 1 auto !important; min-height: 0 !important; height: auto !important; max-height: none !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; padding: 10px 8px !important; }
  body.ffp .chat-message { max-width: 88% !important; }
  body.ffp .inbox-frame.has-selection form.message-composer { flex: 0 0 auto !important; padding: 6px 8px !important; padding-bottom: calc(6px + env(safe-area-inset-bottom)) !important; gap: 6px !important; }
  body.ffp form.message-composer textarea { min-height: 42px !important; max-height: 30dvh !important; }

  /* Avisos (chats sem resposta) e "+ Venda": somem com a conversa aberta; na lista, ficam pequenos no canto */
  body.ffp:has(.inbox-frame.has-selection) #ffs-dock, body.ffp.ffc-select #ffs-dock { display: none !important; }
  /* Espaço no fim das telas para os avisos do canto não cobrirem o último botão */
  body.ffp main.workspace { padding-bottom: 84px !important; }
  /* Avisos curtos aparecem no topo (embaixo ficam os botões das janelas) */
  .ag-toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }
  #ffs-dock.floating { left: auto !important; right: 10px !important; bottom: calc(10px + env(safe-area-inset-bottom)) !important; width: auto !important; max-width: calc(100vw - 20px) !important; flex-direction: row !important; align-items: flex-end !important; gap: 6px !important; }
  #ffs-dock.floating .ffp-alert-toggle { width: auto !important; max-width: 62vw; padding: 7px 10px !important; }
  #ffs-dock.floating .ffp-alert-toggle small, #ffs-dock.floating .ffp-alert-toggle .arr { display: none !important; }
  #ffs-dock.floating #ffp-commission { width: auto !important; }
  #ffs-dock.floating .ffp-alert-list { left: 8px !important; right: 8px !important; width: auto !important; max-width: none !important; bottom: 64px !important; }

  /* Janelas (nova compra, OS, estoque...): sobem de baixo e usam a largura toda */
  .ffp-modal-back { padding: 0 !important; align-items: flex-end !important; }
  .ffp-modal, .ffp-modal.ffo-modal.wide { width: 100% !important; max-height: 94dvh !important; border-radius: 16px 16px 0 0 !important; padding-bottom: env(safe-area-inset-bottom); }
  .ffp-modal form, .ffp-modal .ffo-pad { padding-left: 14px !important; padding-right: 14px !important; }
  .ffp-modal .actions { position: sticky; bottom: 0; background: #fff; padding: 10px 0 4px; margin-top: 4px; z-index: 2; }
  .ffp-modal .actions button { flex: 1 1 0; min-height: 44px; }

  /* Tabelas de Compras e Fidelização viram cartões (como já é no Estoque) */
  :is(#ffpur, #ffly) .ffe-table { border: 0; background: transparent; overflow: visible; }
  :is(#ffpur, #ffly) .ffe-table table, :is(#ffpur, #ffly) .ffe-table tbody, :is(#ffpur, #ffly) .ffe-table tr, :is(#ffpur, #ffly) .ffe-table td { display: block; }
  :is(#ffpur, #ffly) .ffe-table thead { display: none; }
  :is(#ffpur, #ffly) .ffe-table tr { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 8px 4px; margin-bottom: 8px; }
  :is(#ffpur, #ffly) .ffe-table td { border: 0; padding: 3px 10px; text-align: left; }
  :is(#ffpur, #ffly) .ffe-table td[data-l]:not(:first-child)::before { content: attr(data-l) ": "; color: var(--ffp-muted); font-size: 12px; }
  #ffpur td.acts { text-align: left !important; white-space: normal !important; padding-top: 8px !important; display: flex !important; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
  #ffpur td.acts > * { margin-left: 0 !important; }
  #ffpur td.acts .ffo-mini, #ffpur td.acts .link { font-size: 13.5px; padding: 8px 14px; }
  #ffpur td.acts .link { padding: 8px 2px; }

  /* Compras: botões grandes, filtros rolando na horizontal */
  #ffpur h1, #ffly h1 { font-size: 21px; }
  #ffpur .ffpur-head p, #ffly .ffig-head p { display: none; }
  #ffpur .ffpur-head { align-items: center; margin-bottom: 10px; }
  #ffpur .ffpur-btns { width: 100%; }
  #ffpur .ffpur-btns button { flex: 1 1 0; min-height: 46px; font-size: 15px; }
  #ffpur .ffly-kpis, #ffly .ffly-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #ffpur .ffo-kpi b, #ffly .ffo-kpi b { font-size: 18px; }
  #ffpur .ffpur-filters { gap: 6px; }
  #ffpur .ffpur-filters .ag-seg { width: 100%; }
  #ffpur .ffpur-filters select, #ffpur .ffpur-filters input { flex: 1 1 140px; min-height: 40px; }
  .ffpur-modal .ffpur-item { grid-template-columns: 1fr 58px 100px 22px; }
  .ffpur-modal .ffpur-paylist label { grid-template-columns: auto 1fr; }
  .ffpur-modal .ffpur-paylist label b { grid-column: 2; }

  /* Estoque: cada peça num cartão com os dados em duas colunas (metade da altura) */
  #ffe .ffig-head p, #ffe .ffe-head p { display: none; }
  #ffe .ffe-table tr { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 6px; }
  #ffe .ffe-table tr > td:first-child, #ffe .ffe-table tr > td:only-child, #ffe .ffe-table tr > th, #ffe .ffe-table .acts { grid-column: 1 / -1; }
  #ffe .ffe-table td[data-l] { font-size: 13px; }
  #ffe .ffe-table .acts { display: flex !important; flex-wrap: wrap; gap: 6px; }
  #ffe .ffe-table .acts button { min-height: 36px; }
}

/* Celular: sem o botão flutuante de comissão ("+ Venda"); a venda é registrada pelo botão Venda da conversa */
@media (max-width: 760px) { #ffp-commission, #ffs-dock #ffp-commission { display: none !important; } }

/* Aguardando peças (OS de cliente final com peça encomendada) */
#ffo .ffo-col[data-col="aguardando_pecas"], #ffo .ffo-sum-c[data-k="aguardando_pecas"], #ffo-dock .t[data-c="aguardando_pecas"], #ffo .ffo-col.closed[data-col="aguardando_pecas"] .ffo-col-strip { --c: #1098ad; }
.ffo-steps button.cur.aguardando_pecas { background: #1098ad; }

/* OS A4 (29/10/2026): o conteúdo passava da meia folha e cortava o rodapé (termos, garantia e data).
   Espaçamento mais compacto; o rodapé nunca encolhe e o miolo é que se ajusta. */
@media print {
  #ffo-print.os2 .os { padding: 7mm 9mm 6mm; gap: 2mm; }
  #ffo-print.os2 header { padding-bottom: 2mm; }
  #ffo-print.os2 .logo { height: 10mm; }
  #ffo-print.os2 .os > :not(header):not(footer) { flex-shrink: 1; min-height: 0; overflow: hidden; }
  #ffo-print.os2 footer { flex-shrink: 0; padding-top: 1.5mm; }
  #ffo-print.os2 .items { gap: .5mm 2mm; }
  #ffo-print.os2 .sign { gap: 5mm; }
  #ffo-print.os2 .desc p, #ffo-print.os2 .obs p { font-size: 8.3pt; line-height: 1.3; }
  #ffo-print.os2 .blk { padding: 1.6mm 2.4mm; gap: .7mm; }
  #ffo-print.os2 .ck { padding: 1.6mm 2.4mm; }
  #ffo-print.os2 .items { font-size: 7.2pt; }
}

/* Condição do aparelho: botões rápidos (marcam/desmarcam no texto) */
.ffp-modal .chips.cond { margin: 4px 0 6px; gap: 6px; }
.ffp-modal .chips.cond button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.ffp-modal .chips.cond span { padding: 5px 11px; font-size: 12.5px; }
.ffp-modal .chips.cond button.on span { background: var(--ffp-green); border-color: var(--ffp-green); color: #fff; }

/* Compras: item que entra no estoque. OS: peças usadas do estoque. */
.ffpur-modal .ffpur-stk { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 6px; }
.ffpur-modal .ffpur-stk select[name=stk] { flex: 1 1 220px; min-width: 0; }
.ffpur-modal .ffpur-new:not([hidden]) { display: contents; }
.ffpur-modal .ffpur-new input, .ffpur-modal .ffpur-new select { flex: 1 1 130px; min-width: 0; width: auto; }
.ffo-parts { margin-top: 14px; }
.ffo-partform { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ffo-partform input[name=p] { flex: 1 1 220px; min-width: 0; }
.ffo-partform input[name=q] { width: 64px; }
/* Caixa: filtro de período */
#ffpos .ffpos-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 12px; }
#ffpos .ffpos-period label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
#ffpos .ffpos-period input[type=date] { padding: 6px 8px; border: 1.5px solid #d1d7db; border-radius: 8px; font: inherit; }
#ffpos .ffpos-range { font-size: 13px; color: #5b6b73; }
#ffpos .ag-seg { display: inline-flex; flex-wrap: wrap; background: var(--ffp-header); border-radius: 999px; padding: 3px; }
#ffpos .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 5px 13px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#ffpos .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
@media (max-width: 760px) { #ffpos .ag-seg { border-radius: 14px; } #ffpos .ag-seg button { padding: 6px 11px; } }
/* OS › A receber: ordenar */
.ffo-recvsort { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.ffo-recvsort > span { font-size: 13px; color: #5b6b73; }
/* OS: itens do serviço com valor (o total soma sozinho) */
.ffo-items { display: grid; gap: 8px; }
.ffo-irows { display: grid; gap: 6px; }
.ffo-irows:empty { display: none; }
.ffo-irow { display: grid; grid-template-columns: minmax(0, 1fr) 110px 32px; gap: 6px; align-items: center; }
.ffo-irow input { width: 100%; min-width: 0; }
.ffo-irow input[data-it="v"] { text-align: right; }
.ffo-irow [data-rmitem] { font-size: 20px; line-height: 1; color: #b3261e; text-decoration: none; }
.ffo-modal .chips.svcs button { padding: 4px 10px; font-size: 12.5px; }
.ffo-itot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f1f6f3; }
.ffo-itot span { font-size: 12.5px; color: #5b6b73; }
.ffo-itot b { font-size: 15px; }

/* Relatório por funcionário (Desempenho) */
.ffp-team { display: grid; gap: 14px; }
.ffp-team-card { border: 1px solid var(--ffp-line, #e3e8ec); border-radius: 12px; padding: 14px 16px; background: #fff; }
.ffp-team-card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ffp-team-card h3 { margin: 0; font-size: 17px; }
.ffp-team-card .ffp-btn { border: 1px solid var(--ffp-green, #12a150); color: var(--ffp-green-dark, #0b7a3b); background: #fff; border-radius: 8px; padding: 6px 12px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.ffp-team-card .ffp-btn:disabled { opacity: .6; cursor: progress; }
.ffp-team-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ffp-team-nums .m { background: var(--ffp-header, #f5f7f8); border-radius: 8px; padding: 7px 10px; display: grid; gap: 2px; }
.ffp-team-nums .m small { color: var(--ffp-muted, #6b7378); font-size: 11.5px; }
.ffp-team-nums .m b { font-size: 16px; } .ffp-team-nums .m b span { font-size: 12px; font-weight: 500; color: var(--ffp-muted, #6b7378); }
.ffp-team-nums .m.good b { color: #2b8a3e; } .ffp-team-nums .m.warn b { color: #c76a00; } .ffp-team-nums .m.bad b { color: #c92a2a; }
.ffp-review .res { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.ffp-review h4 { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--ffp-muted, #6b7378); }
.ffp-review ul.ok { margin: 0; padding-left: 18px; } .ffp-review ul.ok li { margin: 3px 0; }
.ffp-review ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.ffp-review ol li b { display: block; } .ffp-review ol li span { display: block; color: var(--ffp-ink-2, #444); font-size: 13px; } .ffp-review ol li em { display: block; font-style: normal; font-size: 12.5px; color: #0b7a3b; font-weight: 600; }
.ffp-review blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--ffp-green, #12a150); background: #f3fbf5; border-radius: 0 8px 8px 0; font-size: 13.5px; }

/* OS — fotos extras e foto do defeito (02/11) */
.ffo-photos { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-width: 620px; }
.ffo-photo.add { border-color: var(--ffp-green); background: #f2fbf8; }
.ffo-photo.add .cam { font-size: 30px; color: var(--ffp-green-dark); line-height: 1; }
.ffo-ckpics { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; color: var(--ffp-ink-2); }
.ffo-ckpics > label { display: inline-flex !important; align-items: center; gap: 5px; margin: 0 !important; border: 1.5px solid #c92a2a; background: #fff5f5; color: #c92a2a; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600 !important; font-size: 13px !important; }
#ffo-print.os2 .pics figure { width: 15mm; } #ffo-print.os2 .pics figure img { width: 15mm; height: 20mm; }

/* OS no celular: janela em tela cheia, campos de 16 px (o iPhone não dá zoom), toques grandes e botão fixo embaixo */
@media (max-width: 700px) {
  .ffp-modal-back.ffo-back:not(.ffnew-back) { padding: 0; align-items: stretch; }
  .ffp-modal-back.ffo-back > .ffo-modal:not(.ffnew) { width: 100% !important; max-width: 100%; max-height: none; height: 100dvh; border-radius: 0; display: flex; flex-direction: column; overflow: hidden; animation: none; }
  .ffo-modal > header { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--ffp-line); padding: calc(10px + env(safe-area-inset-top)) 14px 10px; flex: 0 0 auto; }
  .ffo-modal > header h3 { font-size: 17px; }
  .ffo-modal > header .x { font-size: 30px; width: 44px; height: 44px; margin: -8px -8px -8px 0; }
  .ffo-modal > form, .ffo-modal > .ffo-pad, .ffo-modal > div:not(.actions) { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  /* Detalhe da OS: a janela inteira rola (abas e botões não podem ser espremidos) */
  .ffp-modal-back.ffo-back > .ffo-modal.detail { display: block; overflow-y: auto; }
  .ffo-modal.detail > * { flex: none; overflow: visible; }
  .ffo-modal.detail > .ffo-tabs { overflow-x: auto; position: sticky; top: 0; z-index: 2; background: #fff; }
  .ffo-modal .ffo-form { padding: 12px 14px 0; gap: 14px; }
  .ffo-modal .ffo-form section { gap: 10px; }
  .ffo-modal h4 { font-size: 15px; color: var(--ffp-ink); }
  .ffo-modal .grid2, .ffo-modal .grid3 { grid-template-columns: 1fr !important; }
  .ffo-modal input:not([type=checkbox]):not([type=radio]), .ffo-modal select, .ffo-modal textarea { font-size: 16px !important; min-height: 44px; }
  .ffo-modal .chips { gap: 7px; }
  .ffo-modal .chips span, .ffo-modal .chips button { padding: 10px 14px; font-size: 14px; }
  .ffo-modal .ag-tabs { width: 100%; } .ffo-modal .ag-tabs button { flex: 1; padding: 10px; font-size: 14px; }
  .ffo-modal .results button { padding: 11px 12px; }
  .ffo-modal .link { padding: 10px 0; font-size: 14px; }
  .ffo-ck { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .ffo-ck button { min-height: 46px; font-size: 14px; padding: 8px 10px; }
  .ffo-ck button i { width: 20px; height: 20px; }
  .ffo-ck-tools { gap: 2px 18px; }
  .ffo-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: none; }
  .ffo-photo b { font-size: 12px; } .ffo-photo small { font-size: 10.5px; }
  .ffo-ckpics > label { padding: 9px 13px; }
  .ffo-patbox { gap: 12px; }
  .ffo-modal .ffo-form > .actions { position: sticky; bottom: 0; z-index: 3; background: #fff; border-top: 1px solid var(--ffp-line); margin: 0 -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .ffo-modal .ffo-form > .actions button { flex: 1; padding: 14px; font-size: 16px; }
  .ffo-modal .ffo-form > .actions .primary { flex: 2; }
  .ffo-modal .ffo-form > .msg:not(:empty) { position: sticky; bottom: 76px; z-index: 3; }
  .ffo-modal .ffo-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ffo-modal .ffo-tabs button { flex: 0 0 auto; padding: 10px 12px; }
}
/* A barra de períodos não pode alargar a página (no celular o navegador tirava o zoom da tela toda) */
#ffo .ffo-bar > *, #ffo .ffo-period, #ffo .ffo-period .ag-seg { min-width: 0; max-width: 100%; }
#ffo .ffo-period { flex: 1 1 100%; }
@media (max-width: 700px) {
  #ffo .ffo-head [data-act="new"] { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 50; padding: 15px 22px; font-size: 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
}
#ffo .ffo-bar > .ag-seg { overflow-x: auto; scrollbar-width: none; }
#ffo .ffo-bar > .ag-seg button { flex-shrink: 0; white-space: nowrap; }

/* Janela de novidades no celular: cartão que sobe de baixo, lista rola e o botão fica sempre à vista */
.ffnew header .x { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ffp-muted); padding: 4px 8px; margin: -6px -8px 0 0; }
@media (max-width: 700px) {
  .ffp-modal-back.ffnew-back { padding: 0; align-items: flex-end; }
  .ffp-modal-back.ffnew-back > .ffo-modal.ffnew { width: 100%; max-width: 100%; max-height: 88dvh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden; }
  .ffo-modal.ffnew > header { flex: none; padding: 16px 16px 10px; }
  .ffo-modal.ffnew > header .x { width: 44px; height: 44px; font-size: 30px; }
  .ffo-modal.ffnew > .ffo-pad { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px 0; overflow: hidden; }
  .ffo-modal.ffnew .ffnew-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .ffo-modal.ffnew .actions { flex: none; padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); }
  .ffo-modal.ffnew .actions .primary { width: 100%; padding: 14px; font-size: 16px; touch-action: manipulation; }
}
@media (max-width: 700px) { .ffo-modal.ffnew .ffnew-list h4 { font-size: 13px; color: #f39200; } }

/* ===== Celular simplificado (02/11): Estoque, Produtos, Compras e Dashboard ===== */
@media (max-width: 760px) {
  /* Estoque e Produtos: sem texto de explicação, botões numa linha que desliza, resumo 2×2 */
  #ffe .ffe-head { margin-bottom: 8px; gap: 8px; }
  #ffe .ffe-head h1 { font-size: 22px; }
  #ffe .ffe-head p { display: none; }
  #ffe .ffe-acts { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding-bottom: 2px; }
  #ffe .ffe-acts button { flex: 0 0 auto; white-space: nowrap; }
  #ffe .ffe-acts .ffe-primary { order: -1; }
  #ffe .ffe-acts [data-a="reload"] { display: none; }
  #ffe .ffe-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  #ffe .ffe-cards > div { padding: 8px 10px; border-radius: 10px; }
  #ffe .ffe-cards span { font-size: 11px; }
  #ffe .ffe-cards b { font-size: 16px; }
  #ffe .ffe-cards small { display: none; }
  #ffe .ffe-view { margin-bottom: 8px; }
  /* Busca e filtros grudados no topo; filtros numa linha que desliza */
  #ffe .ffe-bar { position: sticky; top: 0; z-index: 5; background: var(--ffp-bg, #f0f2f5); padding: 6px 0 8px; margin: 0 0 6px; display: grid; gap: 6px; }
  #ffe .ffe-bar .ag-seg, #ffpur .ffpur-filters .ag-seg, #ffe .ffe-view { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  #ffe .ffe-bar .ag-seg button, #ffpur .ffpur-filters .ag-seg button { flex: 0 0 auto; white-space: nowrap; }
  /* Cada peça: nome e saldo na 1ª linha, preço na 2ª, botões embaixo. Custo, cliente final, catálogo e última mov. ficam no Editar/Histórico */
  #ffe .ffe-table table:not(.moves) tr:not(.grp) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding: 10px 6px; }
  #ffe .ffe-table table:not(.moves) td { padding: 1px 4px; }
  #ffe .ffe-table table:not(.moves) td:first-child { grid-column: 1; grid-row: 1; }
  #ffe .ffe-table table:not(.moves) td:first-child b { font-size: 15px; }
  #ffe .ffe-table table:not(.moves) td:first-child small { display: block; font-size: 12px; }
  #ffe .ffe-table table:not(.moves) td[data-l="Saldo"] { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  #ffe .ffe-table table:not(.moves) td[data-l="Saldo"]::before { display: none; }
  #ffe .ffe-table table:not(.moves) td[data-l="Saldo"] .qty { font-size: 15px; padding: 4px 10px; }
  #ffe .ffe-table table:not(.moves) td[data-l="Preço lojista"], #ffe .ffe-table table:not(.moves) td[data-l="Preço de venda"] { grid-column: 1; font-weight: 700; font-size: 14px; }
  #ffe .ffe-table table:not(.moves) td[data-l="Custo un."], #ffe .ffe-table table:not(.moves) td[data-l="Cliente final"], #ffe .ffe-table table:not(.moves) td[data-l="Catálogo"], #ffe .ffe-table table:not(.moves) td[data-l="Última mov."] { display: none; }
  #ffe .ffe-table table:not(.moves) td.acts { grid-column: 1 / -1; display: flex; gap: 6px; padding-top: 8px; }
  #ffe .ffe-table table:not(.moves) td.acts button { flex: 1 1 0; min-width: 0; padding: 9px 4px; font-size: 13px; white-space: nowrap; }
  /* Movimentações: só o essencial */
  #ffe .ffe-table table.moves td[data-l="Custo un."], #ffe .ffe-table table.moves td[data-l="Por"] { display: none; }

  /* Compras: sem texto de explicação, resumo 2×2, filtros que deslizam e cada compra como cartão */
  #ffpur .ffpur-head p { display: none; }
  #ffpur .ffpur-head { gap: 8px; margin-bottom: 8px; }
  #ffpur .ffpur-head h1 { font-size: 22px; }
  #ffpur .ffpur-btns { width: 100%; }
  #ffpur .ffpur-btns button { flex: 1; padding: 11px 10px; }
  #ffpur .ffly-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #ffpur .ffo-kpi { padding: 8px 10px; border-radius: 10px; }
  #ffpur .ffo-kpi b { font-size: 16px; }
  #ffpur .ffo-kpi span { display: none; }
  #ffpur .ffpur-filters { display: grid !important; gap: 6px; }
  #ffpur .ffe-table table, #ffpur .ffe-table tbody { display: block; }
  #ffpur .ffe-table thead { display: none; }
  #ffpur .ffe-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--ffp-line); }
  #ffpur .ffe-table td { display: block; border: 0; padding: 1px 0; text-align: left; }
  #ffpur .ffe-table td::before { display: none !important; }
  #ffpur .ffe-table td[data-l="Item"] { grid-column: 1; grid-row: 1; font-size: 15px; }
  #ffpur .ffe-table td[data-l="Valor"] { grid-column: 2; grid-row: 1; text-align: right; font-weight: 800; font-size: 15px; }
  #ffpur .ffe-table td[data-l="Fornecedor"] { grid-column: 1; font-size: 12.5px; color: var(--ffp-muted); }
  #ffpur .ffe-table td[data-l="Data"] { grid-column: 2; grid-row: 2; text-align: right; font-size: 12.5px; color: var(--ffp-muted); }
  #ffpur .ffe-table td[data-l="Pagamento"] { grid-column: 1 / -1; padding-top: 4px; }
  #ffpur .ffe-table td[data-l="Qtd"], #ffpur .ffe-table td[data-l="Por"] { display: none; }
  #ffpur .ffe-table td.acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-top: 6px; }
  #ffpur .ffe-table td.acts .ffo-mini { padding: 8px 18px; font-size: 14px; }
  #ffpur .ffe-table td.acts .link { padding: 8px 0; font-size: 14px; }
  #ffpur .ffe-table td[colspan] { grid-column: 1 / -1; }

  /* Dashboard: sem subtítulo, períodos numa linha que desliza, números menores */
  body #ffdash .d-head p { display: none; }
  body #ffdash h1 { font-size: 22px; }
  body #ffdash .d-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  body #ffdash .d-bar button { flex: 0 0 auto; white-space: nowrap; }
  body #ffdash .kpis { gap: 6px; }
  body #ffdash .kpi { padding: 10px 12px; }
  body #ffdash .kpi b { font-size: 19px; }
  body #ffdash .kpi span { font-size: 11.5px; }
  body #ffdash .card { padding: 12px; }
  body #ffdash .c-head small { display: none; }
  body #ffdash .split > div { padding: 10px 12px; }
  body #ffdash .split b { font-size: 18px; }
  body #ffdash .hb { grid-template-columns: 84px minmax(24px, 1fr) auto; gap: 6px; font-size: 12.5px; }
  body #ffdash .hb .v small { display: none; }
  body #ffdash table { font-size: 12.5px; }
  body #ffdash td.n, body #ffdash th.n { white-space: nowrap; }
}
@media (max-width: 760px) {
  body #ffdash .split { grid-template-columns: 1fr 1fr; gap: 6px; }
  body #ffdash .split > div { padding: 8px 10px; }
  body #ffdash .split b { font-size: 15px; }
  body #ffdash .split span, body #ffdash .split small { font-size: 11px; }
}

/* ===== Celular: barra de atalhos embaixo e menu completo por cima (02/11) ===== */
#ffmb { display: none; }
@media (max-width: 760px) {
  body.ffmb-on #ffmb { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9600; background: #fff; border-top: 1px solid var(--ffp-line); box-shadow: 0 -4px 18px rgba(11, 20, 26, .08); padding: 4px 4px env(safe-area-inset-bottom); font: 600 11px/1.1 system-ui, -apple-system, "Segoe UI", sans-serif; }
  #ffmb button { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; color: #54656f; padding: 7px 2px 6px; border-radius: 12px; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
  #ffmb button[aria-pressed="true"] { color: var(--ffp-green-dark, #0b7a5a); }
  #ffmb button[aria-pressed="true"] svg { background: #e3f6ef; border-radius: 999px; padding: 2px 12px; box-sizing: content-box; }
  #ffmb button b { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 99px; background: #25d366; color: #fff; font-size: 10.5px; line-height: 18px; text-align: center; }
  /* espaço para a barra não cobrir o fim da página */
  body.ffmb-on main.workspace, body.ffmb-on .inbox-workspace { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  /* o botão "Expandir/Recolher Menu" do topo vira o "Menu" da barra */
  body.ffmb-on #fastfix-menu-toggle { display: none !important; }
  /* menu completo: tela por cima, rolando, acima da barra */
  body.ffmb-on:not(.menu-collapsed) .modern-workspace .navigation.navigation { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: calc(60px + env(safe-area-inset-bottom)) !important; width: auto !important; max-width: none !important; height: auto !important; max-height: none !important; z-index: 9550 !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; margin: 0 !important; border-radius: 0 !important; padding: calc(14px + env(safe-area-inset-top)) 10px 16px !important; background: #fff !important; box-shadow: none !important; }
  body.ffmb-on:not(.menu-collapsed) .modern-workspace .navigation.navigation > button:not(.ffn-h) { min-height: 46px !important; font-size: 15.5px !important; }
  /* avisos acima da barra (antes cobriam os botões do topo) */
  body.ffmb-on #ffs-dock.floating { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  body.ffmb-on #ffs-dock.floating .ffp-alert-list { bottom: calc(124px + env(safe-area-inset-bottom)) !important; }
  body.ffmb-on #ffp-sound-unlock { top: auto !important; bottom: calc(120px + env(safe-area-inset-bottom)) !important; left: 10px !important; font-size: 12.5px; }
  body.ffmb-on #ffo .ffo-head [data-act="new"] { bottom: calc(124px + env(safe-area-inset-bottom)) !important; }
  /* conversa aberta em tela cheia: a barra some para não cobrir a caixa de digitar */
  body.ffmb-on:has(.inbox-frame.has-selection) #ffmb { display: none; }
  body.ffmb-on:has(.inbox-frame.has-selection) #ffs-dock.floating { bottom: calc(10px + env(safe-area-inset-bottom)) !important; }
}
@media (max-width: 760px) {
  #ffmb i { display: contents; font-style: normal; }
  #ffmb [data-k="menu"] .ic-close, #ffmb [data-k="menu"][aria-pressed="true"] .ic-open { display: none; }
  #ffmb [data-k="menu"][aria-pressed="true"] .ic-close { display: contents; }
  #ffmb b[hidden] { display: none; }
}

/* Métricas do catálogo dos lojistas (Estoque › 📈 Acessos do catálogo) */
.ffcs .ffo-pad { display: grid; gap: 14px; }
.ffcs h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ffp-muted); }
.ffcs h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ffcs .hint a { color: var(--ffp-green-dark); font-weight: 600; }
.ffcs-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ffcs-kpis > div { background: #f8f9fa; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 1px; }
.ffcs-kpis small { font-size: 12px; color: var(--ffp-muted); font-weight: 600; }
.ffcs-kpis b { font-size: 24px; font-variant-numeric: tabular-nums; }
.ffcs-kpis span { font-size: 11.5px; color: var(--ffp-muted); }
.ffcs-kpis .ok b { color: #2b8a3e; }
.ffcs-bars { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding: 6px 0; border-bottom: 1px solid var(--ffp-line); }
.ffcs-bars .b { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; }
.ffcs-bars i { display: block; width: 100%; min-height: 2px; background: #f39200; border-radius: 3px 3px 0 0; }
.ffcs-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ffp-muted); margin-top: 3px; }
.ffcs-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.ffcs-rank { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.ffcs-rank li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--ffp-line); padding: 3px 0; }
.ffcs-rank li span { min-width: 0; overflow-wrap: anywhere; }
.ffcs-rank small { color: var(--ffp-muted); }
.ffcs em { font-style: normal; font-size: 11px; font-weight: 700; color: #c92a2a; background: #fff5f5; border-radius: 99px; padding: 1px 7px; }
.ffcs-orders { display: grid; gap: 6px; font-size: 13.5px; }
.ffcs-orders > div { background: #ebfbee; border-radius: 10px; padding: 8px 10px; }
.ffcs-orders small { display: block; color: var(--ffp-ink-2); }
.ffcs-sess { display: grid; gap: 4px; font-size: 13.5px; }
.ffcs-sess details { border: 1px solid var(--ffp-line); border-radius: 10px; padding: 7px 10px; }
.ffcs-sess summary { cursor: pointer; }
.ffcs-sess ol { margin: 6px 0 2px; padding-left: 20px; display: grid; gap: 2px; color: var(--ffp-ink-2); }
@media (max-width: 760px) {
  .ffcs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ffcs-kpis > div:last-child { grid-column: 1 / -1; }
  .ffcs-cols { grid-template-columns: 1fr; }
  .ffcs .ffcs-per { overflow-x: auto; flex-wrap: nowrap; }
}
.ffcs .ffcs-per { display: inline-flex; gap: 2px; background: var(--ffp-header, #f0f2f5); border-radius: 999px; padding: 3px; width: fit-content; max-width: 100%; }
.ffcs .ffcs-per button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: 500 13px system-ui, sans-serif; color: var(--ffp-ink-2); cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.ffcs .ffcs-per button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }

/* Fiscal (admin) */
body.fffis-on main.workspace > .page-heading,
body.fffis-on .main-tabs > [data-slot="tabs-content"],
body.fffis-on #fastfix-agent-flow-container,
body.fffis-on #ffp-dashboard,
body.fffis-on main.workspace > section:not(#fffis) { display: none !important; }
#fffis { display: none; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ffp-ink); max-width: 1200px; }
body.fffis-on #fffis { display: block; }
body.fffis-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#fffis h1 { font-size: 24px; margin: 0; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#fffis .fis-head p { margin: 4px 0 12px; color: var(--ffp-muted); font-size: 13px; max-width: 760px; }
#fffis .fis-seg { display: inline-flex; gap: 2px; background: var(--ffp-header, #f0f2f5); border-radius: 999px; padding: 3px; margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
#fffis .fis-seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: 500 13px system-ui, sans-serif; color: var(--ffp-ink-2); cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
#fffis .fis-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
#fffis .fis-seg b { font-size: 11px; background: #fff4e6; color: #a35200; border-radius: 999px; padding: 0 6px; margin-left: 2px; }
#fffis .tag { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 1px 9px; }
#fffis .tag.good { background: #ebfbee; color: #2b8a3e; }
#fffis .tag.warn { background: #fff4e6; color: #a35200; }
#fffis .tag.bad { background: #fff5f5; color: #c92a2a; }
#fffis .fis-msg { border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 0 0 12px; }
#fffis .fis-msg.ok { background: #ebfbee; color: #2b8a3e; }
#fffis .fis-msg.err { background: #fff5f5; color: #c92a2a; }
#fffis .fis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1000px) { #fffis .fis-grid { grid-template-columns: 1fr; } }
#fffis .fis-card { background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; min-width: 0; }
#fffis .fis-card h2 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#fffis .fis-card h2 small { color: var(--ffp-muted); font-weight: 500; font-size: 12.5px; }
#fffis .fis-note { color: var(--ffp-muted); font-size: 12.5px; margin: 0 0 12px; }
#fffis .warn { color: #c2410c; }
#fffis .fis-empty { color: var(--ffp-muted); text-align: center; padding: 22px 12px; font-size: 13px; }
#fffis .fis-empty.big { padding: 36px 20px; max-width: 560px; margin: 0 auto; line-height: 1.5; }
#fffis .fis-prog { height: 8px; background: var(--ffp-line); border-radius: 999px; overflow: hidden; margin: 4px 0 12px; }
#fffis .fis-prog i { display: block; height: 100%; background: var(--ffp-green); border-radius: 999px; }
#fffis .fis-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#fffis .fis-check li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--ffp-line); }
#fffis .fis-check li:last-child { border-bottom: 0; }
#fffis .fis-check .ic { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
#fffis .fis-check li.ok .ic { background: #ebfbee; color: #2b8a3e; }
#fffis .fis-check li.no .ic { background: #fff4e6; color: #a35200; }
#fffis .fis-check li span:nth-child(2) { flex: 1; }
#fffis .lnk { border: 0; background: none; color: var(--ffp-green-dark); font: 600 13px system-ui, sans-serif; cursor: pointer; padding: 4px; }
#fffis .fis-how { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; }
#fffis .fis-log { list-style: none; margin: 0; padding: 0; font-size: 13px; }
#fffis .fis-log li { padding: 7px 0; border-bottom: 1px solid var(--ffp-line); }
#fffis .fis-log small { display: block; color: var(--ffp-muted); font-size: 12px; }
#fffis .fis-row { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 10px; }
#fffis .fis-f { display: grid; gap: 4px; flex: 1 1 150px; min-width: 0; }
#fffis .fis-f.wide { flex: 3 1 260px; }
#fffis .fis-f.btn { flex: 0 0 auto; }
#fffis .fis-f > span { font-size: 12px; font-weight: 600; color: var(--ffp-ink-2); }
#fffis .fis-f small { font-size: 11.5px; color: var(--ffp-muted); }
#fffis .fis-f.chk { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
#fffis .fis-f.chk span { font-weight: 500; font-size: 13px; }
#fffis input:not([type=checkbox]):not([type=file]), #fffis select, #fffis textarea { border: 1px solid #d1d7db; border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; color: var(--ffp-ink); width: 100%; box-sizing: border-box; min-width: 0; }
#fffis input:focus, #fffis select:focus, #fffis textarea:focus { outline: 2px solid var(--ffp-green); border-color: transparent; }
#fffis input[type=file] { font: inherit; font-size: 13px; max-width: 100%; }
#fffis .fis-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
#fffis .fis-actions.left { justify-content: flex-start; margin-bottom: 0; }
#fffis .fis-pri { border: 0; background: var(--ffp-green); color: #fff; border-radius: 8px; padding: 9px 16px; font: 600 13.5px system-ui, sans-serif; cursor: pointer; }
#fffis .fis-sec { border: 1px solid var(--ffp-line); background: #fff; color: var(--ffp-ink); border-radius: 8px; padding: 8px 14px; font: 500 13px system-ui, sans-serif; cursor: pointer; }
#fffis .fis-danger { border: 0; background: #e03131; color: #fff; border-radius: 8px; padding: 8px 14px; font: 600 13px system-ui, sans-serif; cursor: pointer; }
#fffis button:disabled { opacity: .55; cursor: default; }
#fffis .fis-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 13.5px; }
#fffis .fis-dl dt { color: var(--ffp-muted); }
#fffis .fis-dl dd { margin: 0; overflow-wrap: anywhere; }
#fffis .fis-ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
#fffis .fis-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
#fffis .fis-bar input { flex: 1 1 240px; }
#fffis .fis-chips { display: inline-flex; gap: 4px; }
#fffis .fis-chips button { border: 1px solid var(--ffp-line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 500 12.5px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#fffis .fis-chips button[aria-pressed="true"] { background: var(--ffp-ink); color: #fff; border-color: var(--ffp-ink); }
#fffis .fis-bulk { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #f0faf7; border: 1px solid #c3eadf; border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
#fffis .fis-bulk input, #fffis .fis-bulk select { width: auto !important; flex: 0 1 110px; padding: 6px 8px !important; }
#fffis .tablewrap { overflow-x: auto; }
#fffis .fis-t { width: 100%; border-collapse: collapse; font-size: 13px; }
#fffis .fis-t th { text-align: left; font-weight: 600; color: var(--ffp-muted); font-size: 12px; padding: 7px 6px; border-bottom: 1px solid var(--ffp-line); white-space: nowrap; }
#fffis .fis-t td { padding: 6px; border-bottom: 1px solid var(--ffp-line); vertical-align: middle; }
#fffis .fis-t td.nm { min-width: 200px; }
#fffis .fis-t td.nm small { display: block; color: var(--ffp-muted); font-size: 11.5px; }
#fffis .fis-t tr.miss td.nm { box-shadow: inset 3px 0 0 #f59f00; }
#fffis .fis-t .ck { width: 28px; }
#fffis .fis-t .fx { padding: 6px 7px !important; font-size: 13px; }
#fffis .fis-t .w-ncm { width: 100px; } #fffis .fis-t .w-cest { width: 86px; } #fffis .fis-t .w-cfop { width: 62px; } #fffis .fis-t .w-un { width: 54px; } #fffis .fis-t .w-ean { width: 130px; }
#fffis .fis-t select.fx { width: auto; }
#fffis .fis-t .sv { width: 22px; font-weight: 700; text-align: center; }
#fffis .fis-t .sv.ok { color: #2b8a3e; } #fffis .fis-t .sv.err { color: #c92a2a; cursor: help; }
#fffis .chg { display: inline-block; margin: 2px 8px 2px 0; font-size: 12.5px; white-space: nowrap; }
#fffis .chg s { color: var(--ffp-muted); }
#fffis .fis-card.imp { border-color: #c3eadf; background: #fbfffd; }
#fffis .fis-unm { margin: 10px 0; font-size: 13px; }
#fffis .fis-unm summary { cursor: pointer; color: var(--ffp-ink-2); font-weight: 600; }
#fffis .fis-unm ul { max-height: 220px; overflow: auto; margin: 6px 0 0; padding-left: 18px; }
#fffis .fis-unm small { color: var(--ffp-muted); }
@media (max-width: 760px) {
  #fffis { padding: 0 2px; }
  #fffis h1 { font-size: 20px; }
  #fffis .fis-card { padding: 14px; border-radius: 10px; }
  #fffis .fis-seg { display: flex; flex-wrap: nowrap; }
  #fffis input:not([type=checkbox]):not([type=file]), #fffis select, #fffis textarea { font-size: 16px; }
  #fffis .fis-f, #fffis .fis-f.wide { flex: 1 1 100%; }
  #fffis .fis-row .fis-f:not(.wide):not(.chk) { flex: 1 1 calc(50% - 6px); }
  #fffis .fis-actions { position: sticky; bottom: 64px; background: linear-gradient(transparent, #f0f2f5 30%); padding-top: 10px; }
  #fffis .fis-actions.left { position: static; background: none; }
  #fffis .fis-pri { flex: 1; padding: 12px 16px; }
  #fffis .fis-t .fx { font-size: 16px !important; }
  #fffis .fis-dl { grid-template-columns: 1fr; gap: 0; }
  #fffis .fis-dl dd { margin-bottom: 8px; }
  #fffis .fis-prod thead { display: none; }
  #fffis .fis-prod, #fffis .fis-prod tbody { display: block; }
  #fffis .fis-prod tr { display: grid; grid-template-columns: 28px repeat(3, minmax(0, 1fr)); gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--ffp-line); position: relative; }
  #fffis .fis-prod td { border: 0; padding: 0; min-width: 0; }
  #fffis .fis-prod td.ck { grid-row: 1; grid-column: 1; padding-top: 2px; }
  #fffis .fis-prod td.nm { grid-row: 1; grid-column: 2 / -1; min-width: 0; padding-right: 22px; }
  #fffis .fis-prod tr.miss td.nm { box-shadow: none; }
  #fffis .fis-prod tr.miss { box-shadow: inset 3px 0 0 #f59f00; padding-left: 6px; }
  #fffis .fis-prod td[data-l] { display: grid; gap: 2px; }
  #fffis .fis-prod td[data-l]::before { content: attr(data-l); font-size: 11px; font-weight: 600; color: var(--ffp-muted); }
  #fffis .fis-prod td[data-l="NCM"] { grid-column: 1 / 3; }
  #fffis .fis-prod td:is([data-l="CSOSN"], [data-l="CST"]) { grid-column: 1 / 3; }
  #fffis .fis-prod td[data-l="Cód. barras"] { grid-column: 1 / -1; }
  #fffis .fis-prod .fx, #fffis .fis-prod select.fx { width: 100% !important; }
  #fffis .fis-prod td.sv { position: absolute; right: 0; top: 10px; }
}

/* Ponto eletrônico */
body.ffpt-on main.workspace > .page-heading,
body.ffpt-on .main-tabs > [data-slot="tabs-content"],
body.ffpt-on #fastfix-agent-flow-container,
body.ffpt-on #ffp-dashboard,
body.ffpt-on main.workspace > section:not(#ffpt) { display: none !important; }
#ffpt { display: none; }
body.ffpt-on #ffpt { display: block; }
body.ffpt-on .modern-workspace .navigation [data-slot="tabs-trigger"][data-state="active"]:not(.ffp-nav-btn) { background: transparent !important; color: var(--ffp-ink-2) !important; font-weight: 500 !important; }
#ffpt .ffpt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
#ffpt .ffpt-head p { color: var(--ffp-muted); max-width: 640px; }
#ffpt .ag-seg { display: inline-flex; flex-wrap: wrap; background: var(--ffp-header); border-radius: 999px; padding: 3px; }
#ffpt .ag-seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font: 500 13px system-ui, sans-serif; cursor: pointer; color: var(--ffp-ink-2); }
#ffpt .ag-seg button[aria-pressed="true"] { background: #fff; color: var(--ffp-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
#ffpt .ffpt-card { background: #fff; border: 1px solid var(--ffp-line); border-radius: 14px; padding: 20px; margin-bottom: 14px; text-align: center; max-width: 560px; margin-left: auto; margin-right: auto; }
#ffpt .ffpt-card.left { text-align: left; max-width: none; }
#ffpt .ffpt-card h2 { font-size: 15px; margin: 0 0 10px; text-align: left; }
#ffpt .ffpt-clock { font-size: 56px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1; }
#ffpt .ffpt-date { color: var(--ffp-muted); margin: 6px 0 18px; }
#ffpt .ffpt-date::first-letter { text-transform: uppercase; }
#ffpt .ffpt-punch { width: 100%; max-width: 380px; border: 0; border-radius: 16px; padding: 20px 16px; font: 700 19px system-ui, sans-serif; color: #fff; cursor: pointer; background: var(--ffp-green); box-shadow: 0 6px 18px rgba(43, 138, 62, .25); }
#ffpt .ffpt-punch.out { background: #e8590c; box-shadow: 0 6px 18px rgba(232, 89, 12, .25); }
#ffpt .ffpt-punch:disabled { opacity: .7; cursor: wait; }
#ffpt .ffpt-msg { margin: 14px auto 0; max-width: 420px; padding: 10px 12px; border-radius: 10px; font-weight: 600; }
#ffpt .ffpt-msg.ok { background: #ebfbee; color: #2b8a3e; }
#ffpt .ffpt-msg.bad { background: #fff5f5; color: #c92a2a; }
#ffpt .ffpt-hint { color: var(--ffp-muted); font-size: 12.5px; margin: 10px 0 0; }
#ffpt .ffpt-warn { background: #fff4e6; color: #a35200; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
#ffpt .ffpt-line { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
#ffpt .ffpt-line li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #f8f9fa; border-left: 4px solid var(--ffp-green); }
#ffpt .ffpt-line li.out { border-left-color: #e8590c; }
#ffpt .ffpt-line b { font-size: 17px; font-variant-numeric: tabular-nums; min-width: 52px; }
#ffpt .ffpt-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; text-align: left; }
#ffpt .ffpt-sum div { background: #f8f9fa; border-radius: 10px; padding: 8px 10px; }
#ffpt .ffpt-sum small { display: block; color: var(--ffp-muted); font-size: 12px; }
#ffpt .ffpt-sum b { font-size: 17px; }
#ffpt .ffpt-sum .bad b, #ffpt .ffpt-sum em { color: #c92a2a; font-style: normal; font-size: 13px; }
#ffpt .ffo-kpi { text-align: left; background: #fff; border: 1px solid var(--ffp-line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; }
#ffpt .ffo-kpi small { color: var(--ffp-muted); font-size: 12px; }
#ffpt .ffo-kpi b { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#ffpt .ffo-kpi span { color: var(--ffp-muted); font-size: 11.5px; }
#ffpt .ffo-kpi.ok b { color: #2b8a3e; } #ffpt .ffo-kpi.bad b { color: #c92a2a; } #ffpt .ffo-kpi.warn b { color: #a35200; }
#ffpt .ffpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
#ffpt .ffpt-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
#ffpt .ffpt-period label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
#ffpt .ffpt-period input[type=date] { padding: 6px 8px; border: 1.5px solid #d1d7db; border-radius: 8px; font: inherit; }
#ffpt .ffpt-range { font-size: 13px; color: var(--ffp-muted); text-transform: capitalize; }
#ffpt .ffpt-late { background: #fff5f5; color: #c92a2a; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
#ffpt .ffpt-miss { color: #c92a2a; font-weight: 600; }
#ffpt .ffpt-on { color: #2b8a3e; font-weight: 600; }
#ffpt td.neg { color: #c92a2a; font-weight: 600; }
#ffpt td.pos { color: #2b8a3e; font-weight: 600; }
#ffpt .ffpt-row.open td { background: #f8fffb; }
#ffpt .ffpt-detail > td { background: #fbfcfd; padding: 10px 12px; }
#ffpt .ffpt-detail table { width: 100%; margin-bottom: 8px; }
#ffpt .ffpt-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #ebfbee; color: #2b8a3e; font-size: 12.5px; font-weight: 600; margin: 2px 2px 2px 0; white-space: nowrap; }
#ffpt .ffpt-chip.out { background: #fff4e6; color: #a35200; }
#ffpt .ffpt-chip.adj { outline: 1px dashed #868e96; }
#ffpt .ffpt-chip a { text-decoration: none; }
#ffpt .ffpt-chip .link { color: #868e96; font-size: 14px; padding: 0 2px; text-decoration: none; }
#ffpt .ffpt-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
#ffpt .ffpt-form input { padding: 7px 9px; border: 1.5px solid #d1d7db; border-radius: 8px; font: inherit; }
#ffpt .ffpt-form input[name=note] { flex: 1 1 220px; min-width: 0; }
#ffpt .ffpt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; margin-top: 12px; }
#ffpt .ffpt-grid label { display: grid; gap: 4px; font-size: 13px; }
#ffpt .ffpt-grid input, #ffpt .ffpt-sched input { padding: 7px 9px; border: 1.5px solid #d1d7db; border-radius: 8px; font: inherit; min-width: 0; }
#ffpt .ffpt-sched { display: grid; grid-template-columns: 1fr 64px 64px 1fr 64px 64px auto; gap: 6px; align-items: center; }
@media (max-width: 760px) {
  #ffpt .ffpt-clock { font-size: 46px; }
  #ffpt .ffpt-card { padding: 16px; }
  #ffpt .ffpt-sched { grid-template-columns: 1fr 1fr 1fr; }
}
