/* =====================================================
   SabeGestao — CSS Vanilla (estilo Material)
   ===================================================== */

:root {
  --primary:    #1565C0;
  --primary-dk: #0D47A1;
  --primary-lt: #42A5F5;
  --success:    #2E7D32;
  --danger:     #C62828;
  --warning:    #F57F17;
  --gray-50:    #FAFAFA;
  --gray-100:   #F5F5F5;
  --gray-200:   #EEEEEE;
  --gray-300:   #E0E0E0;
  --gray-500:   #9E9E9E;
  --gray-700:   #616161;
  --gray-900:   #212121;
  --sidebar-w:  250px;
  --topbar-h:   56px;
  --radius:     8px;
  --shadow:     0 2px 8px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.18);
  --font-head:  'Raleway', sans-serif;
  --font-body:  'Open Sans', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font-body); background: var(--gray-100); color: var(--gray-900); min-height: 100vh; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Views ── */
.view { display: none; }
.view.active { display: flex; width: 100%; }
/* zoom da tela (botoes da barra de cima): 100vh dentro do zoom encolheria junto, por isso as alturas dividem por --gz */
#view-app { zoom: var(--gz, 1); }

/* ── Login ── */
.login-container {
  width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-dk), var(--primary-lt));
}
.login-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 40px; width: 100%; max-width: 400px;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header h1 { font-family: var(--font-head); font-weight: 800; color: var(--primary); margin: 12px 0 4px; }
.login-header p { color: var(--gray-500); font-size: .9rem; }
.login-logo { max-width: 220px; height: auto; margin-bottom: 8px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; }
.form-group label { font-weight: 600; margin-bottom: 4px; font-size: .85rem; color: var(--gray-700); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid var(--gray-300); border-radius: 6px; padding: 10px 12px;
  font-size: .95rem; font-family: var(--font-body); transition: border .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,.15); }
.form-group input.obrigatorio,
.form-group select.obrigatorio,
.form-group textarea.obrigatorio { background-color: #fffce0; }
.form-group input.obrigatorio.invalido,
.form-group select.obrigatorio.invalido,
.form-group textarea.obrigatorio.invalido { background-color: #ffe0e0; border-color: #d32f2f; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 0; }
.col-2 { flex: 0 0 calc(16.66% - 10px) !important; }
.col-3 { flex: 0 0 calc(25% - 9px) !important; }
.col-4 { flex: 0 0 calc(33.33% - 8px) !important; }
.col-6 { flex: 0 0 calc(50% - 6px) !important; }
.col-8 { flex: 0 0 calc(66.66% - 4px) !important; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: 6px;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1B5E20; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #B71C1C; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #E65100; }
.btn-secondary { background: var(--gray-300); color: var(--gray-900); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }

/* ── Sidebar ── (11/10/2026: mesmo desenho do Portal Insetisan: fundo azul-marinho, faixa da marca
   com borda de destaque, texto solido em negrito, item ativo com faixa + fundo tingido na cor de destaque) */
:root {
  --menu-bg:    #0B2545;
  --menu-bg-dk: #071A33;
  --menu-tx:    #C9D8EA;
  --menu-ic:    #8FB0D6;
  --menu-rot:   #7F98B6;
  --menu-dest:  #FCE500;               /* amarelo, escolhido pelo Janderson (11/10/2026) */
  --menu-dest-bg: rgba(252,229,0,.12);
}
.sidebar {
  width: var(--sidebar-w); height: calc(100vh / var(--gz, 1)); background: var(--menu-bg);
  color: var(--menu-tx); display: flex; flex-direction: column; position: fixed;
  left: 0; top: 0; z-index: 100; transition: transform .3s;
}
.sidebar-header {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  height: var(--topbar-h); padding: 0 16px; background: var(--menu-bg-dk);
  border-bottom: 3px solid var(--menu-dest);
}
.sidebar-header i { font-size: 20px; color: var(--primary-lt); }
/* so a chama do logo (o texto do PNG e cinza escuro e sumia no fundo escuro) */
.marca-chama {
  flex: 0 0 28px; width: 28px; height: 36px;
  background: url('https://sabesistemas.com.br/wp-content/themes/pursuit/assets/images/logo-sabe@2x.png') no-repeat left center / auto 36px;
}
.marca-tx { min-width: 0; line-height: 1.15; }
.marca-tx b { display: block; font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.15rem; letter-spacing: .3px; white-space: nowrap; }
.marca-tx span { display: block; font-size: .66rem; color: var(--menu-dest); font-weight: 700; letter-spacing: .9px; text-transform: uppercase; white-space: nowrap; }
.sidebar-toggle { display: none; background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; margin-left: auto; }
/* ── Sidebar user panel ── */
.sidebar-user {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-user-name {
  font-weight: 700; font-size: .9rem; line-height: 1.25;
  color: #fff; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-info { font-size: .75rem; color: #93A9C4; line-height: 1.4; }
.sidebar-user-info i { margin-right: 3px; }
.sidebar-section-label {
  padding: 14px 18px 6px; font-size: .7rem; text-transform: uppercase;
  color: var(--menu-rot); letter-spacing: 1px; font-weight: 700;
}

.sidebar-nav { flex: 1; padding: 0 0 12px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 16px; color: var(--menu-tx); font-size: .9rem; font-weight: 600;
  border-left: 4px solid transparent;
  transition: background .15s, color .15s; text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--menu-dest-bg); color: #fff; border-left-color: var(--menu-dest); }
.nav-item i { width: 20px; text-align: center; color: var(--menu-ic); }
.nav-item:hover i { color: #fff; }
.nav-item.active i { color: var(--menu-dest); }

/* Grupos accordion no sidebar */
.nav-group-header {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 18px 11px 20px; background: none; border: 0;
  color: #E3ECF7; font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; cursor: pointer;
  font-family: inherit; text-align: left;
  transition: background .2s;
}
.nav-group-header:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-group-header i:first-child { width: 20px; text-align: center; color: var(--menu-ic); }
.nav-group-header.open { color: #fff; }
.nav-group-header.open i:first-child { color: var(--menu-dest); }
.nav-chevron {
  margin-left: auto; font-size: .7rem;
  transition: transform .25s;
}
.nav-group-header.open .nav-chevron { transform: rotate(180deg); }
.nav-group-items {
  max-height: 0; overflow: hidden;
  transition: max-height .25s ease;
  background: rgba(0,0,0,.18);
}
.nav-group-items.open { max-height: 2000px; }
.nav-group-items .nav-item { padding-left: 32px; font-size: .86rem; }
.nav-subgroup-label { padding: 8px 20px 4px 36px; font-size: .7rem; text-transform: uppercase; color: var(--menu-rot); letter-spacing: .5px; font-weight: 700; }
.nav-subgroup-header {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 20px 9px 36px; background: none; border: 0;
  color: #A9BFD8; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; cursor: pointer;
  font-family: inherit; text-align: left; transition: background .2s;
}
.nav-subgroup-header:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-subgroup-header i:first-child { width: 16px; text-align: center; font-size: .75rem; }
.nav-sub-chevron { margin-left: auto; font-size: .6rem; transition: transform .2s; }
.nav-subgroup-header.open .nav-sub-chevron { transform: rotate(90deg); }
.nav-subgroup-items { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.nav-subgroup-items.open { max-height: 1000px; }
.nav-subgroup-items .nav-item { padding-left: 48px; font-size: .84rem; font-weight: 500; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 6px 0; }
.sidebar-footer a { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: var(--menu-tx); font-size: .9rem; text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

/* ── Main content ── */
.main-content { margin-left: var(--sidebar-w); min-height: calc(100vh / var(--gz, 1)); display: flex; flex-direction: column; flex: 1; width: 0; }
/* ===== Menu recolhido (somente icones) ===== */
.sidebar { transition: width .18s ease; }
.main-content { transition: margin-left .18s ease; }
body.menu-recolhido { --sidebar-w: 66px; }
body.menu-recolhido .sidebar { overflow-x: hidden; }
body.menu-recolhido .sidebar-nav span,
body.menu-recolhido .sidebar-footer span,
body.menu-recolhido .nav-chevron,
body.menu-recolhido .nav-sub-chevron,
body.menu-recolhido .sidebar-section-label,
body.menu-recolhido .sidebar-user,
body.menu-recolhido .sidebar-header img,
body.menu-recolhido .marca-tx { display: none; }
body.menu-recolhido .sidebar-header { justify-content: center; padding: 0; }
/* rotulos com display inline no index.html, atalho (F2) e x/estrela dos favoritos vazavam no menu recolhido */
body.menu-recolhido .sidebar-section-label,
body.menu-recolhido #menu-search-row,
body.menu-recolhido .nav-item kbd.atk,
body.menu-recolhido .nav-item .menu-star,
body.menu-recolhido .nav-item i.fa-times { display: none !important; }
body.menu-recolhido .nav-item { border-left-width: 4px; padding-right: 4px; }
body.menu-recolhido .nav-item,
body.menu-recolhido .nav-group-header,
body.menu-recolhido .nav-subgroup-header { justify-content: center; padding-left: 0; padding-right: 0; }
body.menu-recolhido .nav-item i,
body.menu-recolhido .nav-group-header i:first-child,
body.menu-recolhido .nav-subgroup-header i:first-child { margin: 0; }
.menu-recolher-btn { background: none; border: none; color: var(--gray-600, #555); font-size: 18px; cursor: pointer; padding: 6px 10px; margin-right: 6px; border-radius: 6px; line-height: 1; }
.menu-recolher-btn:hover { background: rgba(0,0,0,.06); }
@media (max-width: 768px) { .menu-recolher-btn { display: none; } body.menu-recolhido { --sidebar-w: 250px; } }
.topbar {
  height: var(--topbar-h); background: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 50;
}
.topbar h2 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.topbar-right { margin-left: auto; font-size: .85rem; color: var(--gray-500); }
.sidebar-toggle-mobile { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--gray-700); }
.page-content { padding: 16px 20px; flex: 1; max-width: 100%; }

/* ── Pages ── */
.page { display: none; }
.page.active { display: block; }

/* ── Cards ── */
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; margin-bottom: 20px; width: 100%; box-sizing: border-box;
}
.card h3 { font-family: var(--font-head); font-weight: 700; margin-bottom: 12px; }

/* ── Info cards (dashboard) ── */
.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.info-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; display: flex; align-items: center; gap: 16px;
}
.info-card i { font-size: 32px; color: var(--primary); }
.info-value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; display: block; }
.info-label { font-size: .8rem; color: var(--gray-500); }

/* ── Page actions bar ── */
.page-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.search-bar { display: flex; gap: 8px; flex: 1; max-width: 500px; }
.search-bar input { flex: 1; border: 1px solid var(--gray-300); border-radius: 6px; padding: 10px 12px; font-size: .9rem; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #E3F2FD; font-weight: 700; text-align: left; padding: 12px; border-bottom: 3px solid var(--primary); font-size: .8rem; text-transform: uppercase; color: var(--primary-dk); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-200); font-size: .9rem; }
.data-table tbody tr:hover { background: rgba(21,101,192,.04); }
.data-table .actions { display: flex; gap: 6px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
/* A confirmacao interrompe o que estiver aberto, entao tem que ficar ACIMA de
   qualquer janela — inclusive das telas montadas por JS (e-mail, WhatsApp,
   auditoria), que usam z-index 5000. Antes ela abria ATRAS delas e o usuario
   so via depois de fechar a janela da frente. */
#modal-confirm { z-index: 100000; }   /* acima tambem das janelas de 10000 (layout/compartilhar) e 99999 (conciliacao) - 06/10/2026 */
/* Mesmo motivo para a janela de "digite o texto" (pedirTexto): o "Salvar modelo como"
   da exportacao abria o nome ATRAS da janela de colunas (25/09/2026). */
#modal-prompt { z-index: 100000; }
/* Janela de "aguarde" das consultas ao banco (fica acima de tudo) */
#overlay-aguarde {
  position: fixed; inset: 0; background: rgba(0,0,0,.22);
  display: flex; align-items: center; justify-content: center; z-index: 100002;
}
#overlay-aguarde .aguarde-box {
  background: #fff; padding: 16px 26px; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-weight: 600; color: #2c3e50;
  display: flex; align-items: center; gap: 10px;
}
/* Tela travada durante a emissao de NFS-e (acima de tudo, inclusive do aguarde) */
#overlay-emissao {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 9600;
  padding: 16px;
}
#overlay-emissao .emiss-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; padding: 20px 24px; color: var(--gray-900);
}
#overlay-emissao .emiss-tit { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--primary-dk); margin-bottom: 10px; }
#overlay-emissao .emiss-cont { font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
#overlay-emissao .emiss-cont:empty { display: none; }
#overlay-emissao .emiss-barra { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
#overlay-emissao .emiss-barra > div { height: 100%; width: 0; background: var(--primary); transition: width .3s; }
#overlay-emissao .emiss-atual { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 6px; padding: 10px 12px; line-height: 1.6; }
#overlay-emissao .emiss-spin { font-weight: 600; color: var(--primary); margin-bottom: 4px; }
#overlay-emissao .emiss-spin span { font-weight: 400; color: var(--gray-700); font-size: .9rem; }
#overlay-emissao .emiss-feitas { margin-top: 10px; max-height: 160px; overflow-y: auto; font-size: .92rem; }
#overlay-emissao .emiss-feitas > div { padding: 3px 0; border-bottom: 1px dashed var(--gray-200); }
#overlay-emissao .emiss-feitas .ok i { color: var(--success); }
#overlay-emissao .emiss-feitas .er i { color: var(--danger); }
#overlay-emissao .emiss-feitas span { color: var(--gray-700); }
#overlay-emissao .emiss-aviso { margin-top: 12px; font-size: .88rem; color: var(--warning); }
.modal-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 95%; max-width: 700px; max-height: 90vh; overflow-y: auto;
}
/* Variante larga para formularios com muitas colunas (ex: obra) */
.modal-box.modal-lg { max-width: 75vw; }
@media (max-width: 768px) { .modal-box.modal-lg { max-width: 95vw; } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; border-bottom: 1px solid var(--gray-200);
  font-family: var(--font-head);
}
.modal-header h3 { font-weight: 700; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray-500); }
.modal-close:hover { color: var(--gray-900); }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--gray-200); }

/* ── Toast ── */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 100001;   /* aviso aparece por cima da janela aberta (antes 300: ficava atras) */
  display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: 6px; color: #fff; font-size: .9rem;
  box-shadow: var(--shadow); animation: slideIn .3s ease;
  min-width: 250px;
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-warning { background: var(--warning); color: var(--gray-900); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ── Section cards (collapsible) ── */
.section-card { padding: 16px 20px; }
.section-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin: 0; }
.pes-idade-pill { white-space: nowrap; font-weight: 600; font-size: .85rem; color: #2c5f8a; background: #eef4fb; border-radius: 12px; padding: 3px 10px; margin-left: 4px; }
.pes-idade-pill[hidden] { display: none; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--gray-200); margin-bottom: 12px;
}
.section-header.collapsible { cursor: pointer; }
.section-header.collapsible:hover { opacity: .85; }
.section-body.collapsed { display: none; }
.card.collapsed .section-body { display: none; }
.card.collapsed .fa-chevron-down { transform: rotate(-90deg); }
.total-row { text-align: right; font-weight: 700; padding: 8px 12px; font-size: .95rem; color: var(--primary-dk); }
.input-readonly { background: var(--gray-100); color: var(--gray-500); }

/* ── Filtros card ── */
.filtros-card { padding: 16px 20px; }
.filtros-card .form-group { margin-bottom: 10px; }
.filtros-card label { font-size: .78rem; }

/* ── Result header (count + view toggle) ── */
.result-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding: 0 4px;
}
.result-header span { font-weight: 600; font-size: .9rem; color: var(--gray-700); }
.view-toggle { display: flex; gap: 2px; }
.btn-toggle {
  background: var(--gray-200); border: none; padding: 8px 12px; cursor: pointer;
  color: var(--gray-700); font-size: .95rem; transition: background .2s;
}
.btn-toggle:first-child { border-radius: 6px 0 0 6px; }
.btn-toggle:last-child { border-radius: 0 6px 6px 0; }
.btn-toggle.active { background: var(--primary); color: #fff; }
.btn-toggle:hover:not(.active) { background: var(--gray-300); }

/* ── Client cards ── */
.client-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.client-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; align-items: stretch; overflow: hidden; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  border-left: 5px solid var(--primary-lt);
}
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.client-card-avatar {
  width: 70px; min-height: 70px;
  background: var(--primary-lt); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  flex-shrink: 0;
}
.client-card-body {
  padding: 12px 16px; flex: 1; min-width: 0;
  background: linear-gradient(135deg, #FFF8E1 0%, #fff 100%);
}
.client-card-name {
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  color: var(--primary); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.client-card-info {
  font-size: .78rem; color: var(--gray-700); line-height: 1.5;
}
.client-card-info > span { display: block; }   /* so as LINHAS do cartao; spans dentro da linha (valor com estilo, "na mesma linha") ficam inline */
.client-card-status {
  font-weight: 600; text-transform: uppercase; font-size: .7rem;
}
.client-card.overdue { border-left-color: #C62828; }
.client-card.overdue .client-card-body { background: linear-gradient(135deg, #FFEBEE 0%, #fff 100%); }
tr.overdue-row { background: #FFEBEE; }
.client-card.cancelled { border-left-color: #757575; opacity: .75; }
.client-card.cancelled .client-card-name { text-decoration: line-through; color: var(--gray-700); }
tr.cancelled-row { background: #F5F5F5; color: #757575; }
tr.cancelled-row td:not(:last-child) { text-decoration: line-through; }

/* ── Dashboard welcome ── */
.dashboard-welcome { position: relative; }
.dashboard-logo-bg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  opacity: .04; pointer-events: none; z-index: 0;
}
.dashboard-logo-bg img { width: 400px; height: auto; }
.dashboard-welcome .card { position: relative; z-index: 1; }
.dica-do-dia {
  background: linear-gradient(135deg, #FFF8E1, #FFF3E0); border-radius: var(--radius);
  padding: 20px; text-align: left; border-left: 4px solid #F57F17;
}
.dica-header {
  font-family: var(--font-head); font-weight: 700; color: #F57F17;
  margin-bottom: 8px; font-size: .95rem;
}
.dica-do-dia p { color: var(--gray-700); font-size: .9rem; line-height: 1.6; margin: 0; }

/* ── Autocomplete ── */
.autocomplete-list {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 100;
  background: #fff; border: 1px solid var(--gray-300); border-radius: 0 0 6px 6px;
  box-shadow: var(--shadow-lg); max-height: 250px; overflow-y: auto; display: none;
}
.autocomplete-item { padding: 8px 12px; cursor: pointer; font-size: .9rem; }
.autocomplete-item:hover { background: rgba(21,101,192,.08); }

/* ── Confirm modal animation ── */
#modal-confirm .modal-box { animation: confirmIn .25s ease; }
@keyframes confirmIn { from { opacity: 0; transform: scale(.9) translateY(-20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ── Mobile ── */
@media (max-width: 768px) {
  html { font-size: 16px; }
  body, input, select, textarea, button { font-size: 1rem; }
  .form-group label { font-size: .95rem; }
  table, table td, table th { font-size: .95rem; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  /* Card 0eJdkYqv: no celular o nav (flex:1) esticava e empurrava o rodape (Encerrar) p/ fora dos 100vh; nav com a altura do conteudo + sidebar rolavel faz o Encerrar voltar a aparecer */
  .sidebar { height: calc(100vh / var(--gz, 1)); overflow-y: auto; }
  .sidebar-nav { flex: 0 0 auto; overflow: visible; }
  .sidebar-toggle, .sidebar-toggle-mobile { display: block; }
  .main-content { margin-left: 0; }
  .form-row { flex-direction: column; }
  /* Card cQWeXN2E: no celular (.form-row em coluna) o flex-basis fixo (ex.: CEP flex:0 0 200px) virava ALTURA e abria vao entre CEP e Endereco; forcar auto p/ a altura voltar a ser pelo conteudo */
  /* Analise mobile 2026-06-24: form-group com style="flex:N" (ex.: Nova Natureza flex:3, Conta a Pagar/Receber) nao era constrangida a largura do .form-row (ficava 1670px) e estourava campo p/ fora da tela no celular; max-width:100% limita a largura do form-row, sem mexer no .frow-pair (2 colunas) nem no desktop */
  .form-row:not(.frow-pair) > .form-group { flex-basis: auto !important; max-width: 100%; }
  /* Pedido de Venda: manter 2 colunas no celular, igual ao sistema antigo (rows marcadas com .frow-pair) */
  .form-row.frow-pair { flex-direction: row !important; flex-wrap: wrap; }
  .form-row.frow-pair > .form-group { flex: 1 1 45% !important; min-width: 0; }
  .col-2, .col-3, .col-4, .col-6, .col-8 { flex: 1 1 100% !important; }
  .page-actions { flex-direction: column; }
  /* Janderson 28/09/2026 (video BOTOES ACIMA DO FILTRO): no celular os botoes do topo ficam so com o icone
     (o texto vira dica), na mesma linha e a direita; o Incluir/Salvar (verde) e botao sem icone mantem o texto */
  .page-actions .btn-txt { display: none; }
  .page-actions:not(:has(> h3)) { flex-direction: row; justify-content: flex-end; flex-wrap: wrap; }
  .page-actions:not(:has(> h3)) > div[style*="flex:1"] { display: none; }
  .page-actions:not(:has(> h3)) > .tarefas-wrap { margin-right: 0 !important; }
  .search-bar { max-width: 100%; }
  /* Card CwIXeVgg (Gino): no celular o botao "Lista" ficava marcado mas a tela seguia em cards,
     porque duas regras aqui forcavam os cards e escondiam TODO [id$="-grid-view"]. Agora a escolha
     do usuario vale tambem no celular; a lista rola na horizontal dentro do proprio quadro
     (.table-responsive ja faz isso; o overflow no container cobre os grids que nao tem o wrapper). */
  [id$="-grid-view"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* ── Card v0ACIv0E (#4,#5,#6): impedir que campos/controles estourem a largura da tela no celular ── */
  .form-row input, .form-row select, .form-row textarea { min-width: 0; }            /* input-groups (CEP/CNPJ) podem encolher */
  .form-group input, .form-group select, .form-group textarea { max-width: 100%; }   /* nada passa da largura do container */
  .result-header { flex-wrap: wrap; gap: 8px; }                                       /* contagem + ordenar + toggles quebram, nao estouram */
  .result-header > span { flex: 1 1 100%; }
  .result-header > div { flex-wrap: wrap; max-width: 100%; }
  .result-header select { max-width: 100%; }
  /* -- Card 9GXQdiLu: filtros (Pedido etc.) nao estouram a largura no celular -- */
  .filtros-card, .filtros-card .form-row, .filtros-card .form-group { min-width: 0; max-width: 100%; }
  .filtros-card .form-group input, .filtros-card .form-group select { width: 100%; max-width: 100%; box-sizing: border-box; }
  .page-content { overflow-x: hidden; }
  .card { padding: 16px; }                                                            /* menos respiro lateral no celular */
  .page-content { padding: 12px 10px; }
}

/* ── Card v0ACIv0E (#7): compactar espacamento dos campos na Edicao de Pedido de Venda (proximo ao desktop legado) ── */
#page-pedido-cadastro .form-group { margin-bottom: 10px; }

/* Abas do cadastro de Contas a Receber */
.rec-tab-btn { background:none; border:none; padding:8px 16px; cursor:pointer; font-size:.9rem; color:#666; border-bottom:3px solid transparent; margin-bottom:-2px; }
.rec-tab-btn.active { color:#1976D2; border-bottom-color:#1976D2; font-weight:600; }
.rec-tab-btn:hover { color:#1976D2; }

/* Popup de Tarefas (acoes em lote) */
/* Largura acompanha o item mais largo (width:max-content), com piso e teto.
   O menu da linha da listagem usa .ctx: posicao fixa no ponto do clique, e
   precisa de right:auto senao esticaria de 'left' ate a borda da tela. */
.tarefas-menu { position:absolute; right:0; top:100%; margin-top:4px; background:#fff; border:1px solid #ddd; border-radius:8px; box-shadow:0 6px 20px rgba(0,0,0,.18); z-index:1500; min-width:260px; width:max-content; max-width:min(92vw,420px); padding:6px; }
.tarefas-menu.ctx { position:fixed; right:auto; top:auto; margin-top:0; z-index:99999; max-height:80vh; overflow-y:auto; }
.tarefas-menu-titulo { font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:#888; padding:6px 12px 4px; }
.tarefas-menu button { display:block; width:100%; text-align:left; background:none; border:none; padding:10px 12px; border-radius:6px; cursor:pointer; font-size:14px; color:#333; }
.tarefas-menu button:hover { background:#f0f0f7; }
.tarefas-menu button i { width:18px; margin-right:8px; }
/* No celular o menu Tarefas era ancorado ao botao (min-width 340px) e saia da tela.
   Aqui ele vira um mini-menu centralizado e rolavel, sempre legivel. */
@media (max-width: 640px) {
  .tarefas-menu {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    right: auto;
    margin-top: 0;
    min-width: 0;
    width: calc(100vw - 24px);
    max-width: 380px;
    max-height: 80vh;
    overflow-y: auto;
  }
  /* .ctx tem especificidade maior que a regra acima; repete aqui para o menu
     da linha continuar legivel no celular. */
  .tarefas-menu.ctx { width: calc(100vw - 24px); max-width: 380px; }
  /* Popups que o JavaScript posiciona perto do clique (Tarefas da linha, WhatsApp, menus e filtro da
     grade): no celular abrem centralizados. O !important vence o left/top que o script grava no
     proprio elemento - sem ele a regra acima era ignorada e o menu saia pela esquerda (07/10/2026). */
  .tarefas-menu.ctx, .gw-menu, .gw-painel {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100vw - 24px) !important;
    max-width: 380px !important;
    max-height: 80vh !important;
    overflow-y: auto;
  }
}
/* Ajuda contextual por campo */
.help-ico { cursor:pointer; color:#f39c12; font-size:.85em; }
.help-ico:hover { color:#e67e22; }
.help-inline { font-size:11px; color:#777; background:#fff8e1; border-left:3px solid #f39c12; padding:4px 8px; margin-top:3px; border-radius:0 4px 4px 0; line-height:1.35; }
.help-popover { position:absolute; max-width:320px; background:#2c3e50; color:#fff; font-size:12px; line-height:1.4; padding:9px 12px; border-radius:6px; box-shadow:0 6px 20px rgba(0,0,0,.25); z-index:3000; }
#btn-modo-ajuda-conta.active { background:#e67e22 !important; }
/* Quadros colapsaveis (substituem abas - melhor no celular) */
.rec-quadro-hdr { cursor:pointer; display:flex; align-items:center; justify-content:space-between; padding:10px 2px 6px; border-top:1px solid #eee; margin-top:8px; }
.rec-quadro-hdr h4 { color:#2c3e50; }
.rec-quadro-hdr i { transition:transform .2s; color:#888; font-size:.75rem; }
.rec-quadro-hdr.collapsed i { transform:rotate(-90deg); }
.rec-quadro-collapsed { display:none !important; }

/* Nota emitida/cancelada (somente leitura): campo bloqueado, mas com a letra legivel.
   O disabled padrao do navegador acinzenta o texto e o cliente nao conseguia ler
   (video GESTAOWEB - LAYOUT LETRA, 18/09/2026). Fundo levemente cinza indica o bloqueio. */
.nfe-somente-leitura input:disabled,
.nfe-somente-leitura select:disabled,
.nfe-somente-leitura textarea:disabled {
  color: #1f2933 !important;
  -webkit-text-fill-color: #1f2933;
  opacity: 1;
  background-color: #f4f6f8;
  border-color: #dfe3e8;
  cursor: default;
}
.nfe-somente-leitura select:disabled option { color: #1f2933; }

/* Barra de filtros (Janderson 28/09/2026): com varios filtros na mesma linha, o campo nao espreme abaixo de
   ~110px - a linha quebra sozinha. So no computador (no celular os campos ja ficam um embaixo do outro). */
@media (min-width: 769px) { .filtros-card .form-row > .form-group { min-width: 110px; } }

/* Editor do e-mail: o reset global (*{margin:0}) colava os paragrafos; aqui fica
   igual ao que o cliente ve no programa de e-mail */
#em-mensagem p { margin: 0 0 1em; }

/* ── Abas de janela (como o desktop: cada tela aberta vira uma aba; JanelaAbas no script.js) ── */
#jab-barra { display: none; gap: 2px; align-items: flex-end; padding: 6px 12px 0; background: #e9eef3; border-bottom: 2px solid #2c6fbb;
  overflow-x: auto; overflow-y: hidden; position: sticky; top: var(--topbar-h); z-index: 49; scrollbar-width: thin; }
#jab-barra.on { display: flex; }
#jab-barra .jab { display: flex; align-items: center; gap: 7px; padding: 7px 8px 7px 10px; max-width: 280px; flex-shrink: 0; overflow: hidden;
  background: #d5dde6; color: #34495e; border: 1px solid #c3ced9; border-bottom: none; border-radius: 7px 7px 0 0;
  font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; }
#jab-barra .jab:hover { background: #dfe6ee; }
#jab-barra .jab.on { background: #fff; color: #1f4e85; font-weight: 600; border-color: #2c6fbb; box-shadow: 0 -2px 0 #2c6fbb inset; position: relative; top: 2px; }
#jab-barra .jab .jab-ic { flex-shrink: 0; }
#jab-barra .jab.lista .jab-ic { color: #2c6fbb; }
#jab-barra .jab .jab-txt { overflow: hidden; text-overflow: ellipsis; }
#jab-barra .jab .jab-sujo { width: 7px; height: 7px; border-radius: 50%; background: #e67e22; flex-shrink: 0; }
#jab-barra .jab .jab-x { margin-left: 2px; color: #7f8c8d; font-size: 12px; padding: 1px 4px; border-radius: 3px; flex-shrink: 0; }
#jab-barra .jab .jab-x:hover { background: #c0392b; color: #fff; }
#jab-barra .jab .jab-carregando { color: #95a5a6; }
#jab-barra .jab.arrastando { opacity: .45; }
#jab-barra .jab.solta-antes { box-shadow: inset 3px 0 0 #e67e22; }
#jab-barra .jab.solta-depois { box-shadow: inset -3px 0 0 #e67e22; }
#jab-host { display: none; flex: 1; position: relative; min-height: 0; }
#jab-host.on { display: block; }
#jab-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: none; background: var(--gray-100, #f4f6f9); }
#jab-host iframe.on { display: block; }
/* todas as abas fechadas: logo da empresa no fundo */
#jab-vazio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: calc(100vh - var(--topbar-h) - 40px); padding: 24px; text-align: center; }
#jab-vazio img { max-width: min(420px, 80%); max-height: 45vh; height: auto; opacity: .18; }
#jab-vazio.empresa img { opacity: .85; }
#jab-vazio .jab-vazio-nome { font-size: 1.1rem; font-weight: 600; color: #7f8c8d; }
#jab-vazio .jab-vazio-dica { font-size: .9rem; color: #95a5a6; }
/* dentro da aba (iframe): so a tela, sem menu lateral nem barra de cima (ficam na janela principal) */
html.aba-embed #view-login, html.aba-embed #sidebar, html.aba-embed .topbar, html.aba-embed #jab-barra,
html.aba-embed #faixa-demonstracao { display: none !important; }
html.aba-embed .main-content { margin-left: 0 !important; }
html.aba-embed #page-dashboard { display: none !important; }

/* Auditoria: linha do dia na linha do tempo e clicavel (filtra a grade) */
.aud-lt-dia:hover { background: #e3f2fd; border-radius: 4px; }

/* Contratar o Sabe Gestao (conta de teste) */
.ctrt-grid{display:grid;grid-template-columns:1fr 360px;gap:16px;align-items:start}
@media (max-width:900px){.ctrt-grid{grid-template-columns:1fr}}
.ctrt-mod{display:flex;align-items:flex-start;gap:10px;padding:9px 6px;border-bottom:1px solid #f0f0f0}
.ctrt-mod:last-child{border-bottom:0}
.ctrt-mod.on{background:#f1f8ff}
.ctrt-mod>input{margin-top:3px;width:17px;height:17px;flex:0 0 auto}
.ctrt-mod .n{flex:1}.ctrt-mod .n b{display:block;font-size:.93rem}.ctrt-mod .n small{color:#777}
.ctrt-mod .p{text-align:right;white-space:nowrap;font-size:.9rem}.ctrt-mod .p small{display:block;color:#888}
.ctrt-tot{border-top:2px solid #1565c0;margin-top:8px;padding-top:8px;display:flex;justify-content:space-between;font-size:1.05rem;font-weight:700;color:#0d47a1}
.ctrt-pg{border:1px solid #2e7d32;background:#e8f5e9;color:#1b5e20;font-weight:600;border-radius:6px;padding:9px;text-align:center;font-size:.88rem;margin-bottom:10px}

/* NF-e/NFC-e: botao "Abrir" encostado no campo Cliente/Fornecedor (06/10/2026) */
.nfe-dest-campo { display: flex; align-items: stretch; }
.nfe-dest-campo > input[type="text"] { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.nfe-dest-campo > .nfe-dest-abrir { border-top-left-radius: 0; border-bottom-left-radius: 0; margin: 0; white-space: nowrap; padding: 0 12px; }

/* Quadros proprios do layout (criarLayoutQuadros cfg.camposPersonalizados, Cliente 06/10/2026):
   grade de 12 colunas como a barra de filtros; .lqc-quebra = "comeca linha nova".
   No celular: campo de ate meia linha (.lqc-meia) fica 2 por linha; os maiores, linha inteira. */
.lqc-card > .section-title { margin-bottom: 10px; }
.lqc-grade { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 0; }   /* entre linhas vale o margin-bottom do .form-group, como no .form-row */
.lqc-grade > .form-group { min-width: 0; }
.lqc-quebra { flex-basis: 100%; height: 0; }
@media (max-width: 768px) {
  .lqc-grade > .form-group { flex: 1 1 100% !important; max-width: 100%; }
  .lqc-grade > .form-group.lqc-meia { flex: 1 1 calc(50% - 6px) !important; }
}

/* ===== Mensagens entre usuarios (chat interno, 07/10/2026 - porte do uSis_ChatNovo do TCE) ===== */
.chat-nav-badge, .chat-topo-badge { background: #C62828; color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 7px; line-height: 18px; }
.chat-nav-badge { margin-left: auto; }
.chat-topo-btn { position: relative; background: transparent; border: none; color: var(--gray-700, #455A64); font-size: 18px; cursor: pointer; padding: 6px 10px; margin-right: 10px; border-radius: 6px; vertical-align: middle; }
.chat-topo-btn:hover, .chat-topo-btn.ativo { background: #E3F2FD; color: var(--primary); }
.app-instalar-btn { font-size: 14px; color: var(--primary); border: 1px solid #BBDEFB; }
.app-instalar-btn .app-instalar-txt { margin-left: 6px; font-weight: 600; }
@media (max-width: 900px) { .app-instalar-btn .app-instalar-txt { display: none; } }
.chat-topo-badge { position: absolute; top: -3px; right: -2px; font-size: 10px; line-height: 15px; padding: 0 5px; border: 2px solid #fff; }
.chat-tela { display: flex; height: calc(100vh / var(--gz, 1) - var(--topbar-h) - 40px); min-height: 420px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-contatos { width: 290px; flex-shrink: 0; border-right: 1px solid var(--gray-300); display: flex; flex-direction: column; background: var(--gray-50); }
.chat-contatos-topo { padding: 12px; border-bottom: 1px solid var(--gray-300); }
.chat-contatos-titulo { display: flex; align-items: center; font: 700 13px var(--font-head); text-transform: uppercase; color: #455A64; letter-spacing: .5px; margin-bottom: 8px; }
.chat-contatos-titulo .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.chat-busca { position: relative; }
.chat-busca i { position: absolute; left: 10px; top: 10px; color: var(--gray-500); font-size: 12px; }
.chat-busca input { width: 100%; padding: 7px 10px 7px 30px; border: 1px solid #ddd; border-radius: 6px; font-size: .85rem; }
.chat-lista { overflow-y: auto; flex: 1; }
.chat-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--gray-500); padding: 10px 14px 4px; font-weight: 600; }
.chat-ct { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; border-left: 3px solid transparent; }
.chat-ct:hover { background: #F0F4F8; }
.chat-ct.sel { background: #E3F2FD; border-left-color: var(--primary); }
.chat-ct.naolida .chat-ct-nome { font-weight: 700; color: var(--gray-900); }
.chat-av { width: 36px; height: 36px; border-radius: 50%; color: #fff; font: 700 13px var(--font-head); display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.chat-av .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; }
.chat-st-on { background: #2E7D32; } .chat-st-aus { background: #F9A825; } .chat-st-off { background: #BDBDBD; }
.chat-ct-info { flex: 1; min-width: 0; }
.chat-ct-nome { font-size: .88rem; color: #37474F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ct-sub { font-size: .74rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ct-sub.on { color: #2E7D32; }
.chat-qtd { background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.chat-conversa { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-vazio { margin: auto; text-align: center; color: var(--gray-500); }
.chat-vazio i { font-size: 46px; opacity: .35; display: block; margin-bottom: 10px; }
.chat-conv-topo { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--gray-300); }
.chat-conv-topo .nome { font: 700 15px var(--font-head); color: #263238; }
.chat-conv-topo .st { font-size: .75rem; color: var(--gray-500); }
.chat-conv-topo .st.on { color: #2E7D32; }
.chat-voltar { display: none; background: none; border: none; font-size: 18px; color: #455A64; cursor: pointer; padding: 4px 8px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 22px; background: #ECEFF1; display: flex; flex-direction: column; gap: 8px; }
.chat-dia { align-self: center; background: #CFD8DC; color: #455A64; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px; margin: 6px 0; }
.chat-anteriores { align-self: center; }
.chat-b { max-width: 62%; padding: 8px 11px 5px; border-radius: 10px; font-size: .88rem; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-b.eu { align-self: flex-end; background: #D6EAFB; border-top-right-radius: 2px; }
.chat-b.ele { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.chat-b .meta { font-size: 10.5px; color: #78909C; text-align: right; margin-top: 2px; white-space: normal; }
.chat-b .meta .lida { color: #1E88E5; }
.chat-arq { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.7); border: 1px solid #CFD8DC; border-radius: 8px; padding: 8px 10px; margin: 2px 0 4px; white-space: normal; }
.chat-arq .ic { font-size: 26px; flex-shrink: 0; }
.chat-arq .n { font-weight: 600; font-size: .85rem; color: #263238; word-break: break-all; }
.chat-arq .t { font-size: .72rem; color: #78909C; }
.chat-arq .btn { margin-left: auto; flex-shrink: 0; }
.chat-arq.removido { opacity: .75; background: #F5F5F5; border-style: dashed; }
.chat-arq-obs { font-size: .72rem; color: #78909C; white-space: normal; }
.chat-arq-obs.ok { color: #2E7D32; }
.chat-cit { border-left: 4px solid #6c5ce7; background: #F3F0FF; border-radius: 6px; padding: 8px 10px; margin: 2px 0 6px; white-space: normal; }
.chat-cit .tp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: #6c5ce7; font-weight: 700; }
.chat-cit .tt { font-weight: 700; color: #263238; font-size: .9rem; margin: 1px 0; }
.chat-cit .dd { font-size: .78rem; color: #546E7A; }
.chat-cit .btn { margin-top: 6px; background: #6c5ce7; color: #fff; padding: 4px 10px; font-size: .76rem; }
.chat-comp { border-top: 1px solid var(--gray-300); padding: 10px 14px; background: #fff; }
.chat-comp-linha { display: flex; align-items: flex-end; gap: 8px; }
.chat-comp textarea { flex: 1; resize: none; border: 1px solid #ddd; border-radius: 8px; padding: 9px 11px; font: 14px var(--font-body); height: 62px; }
.chat-comp textarea:focus { outline: none; border-color: var(--primary); }
.chat-clip { background: #ECEFF1; color: #455A64; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 17px; cursor: pointer; flex-shrink: 0; }
.chat-clip:hover { background: #CFD8DC; }
/* audio no chat (02/11/2026) */
.chat-mic { background: #ECEFF1; color: #455A64; border: none; border-radius: 8px; width: 42px; height: 42px; font-size: 17px; cursor: pointer; flex-shrink: 0; }
.chat-mic:hover { background: #CFD8DC; }
.chat-mic.gravando { background: #C62828; color: #fff; }
.chat-gravando { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-gravando .ponto { width: 10px; height: 10px; border-radius: 50%; background: #C62828; animation: chatPisca 1s infinite; }
.chat-gravando .lim { color: #78909C; font-size: .75rem; }
.chat-gravando .btn:first-of-type { margin-left: auto; }
@keyframes chatPisca { 50% { opacity: .25; } }
.chat-audio { min-width: 240px; }
.chat-audio audio { width: 100%; max-width: 320px; height: 40px; }
.chat-audio .n i { color: #6c5ce7; }
.chat-audio-play { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--primary); color: #fff; cursor: pointer; flex-shrink: 0; }
.chat-audio-play:disabled { background: #B0BEC5; cursor: default; }
.chat-transcr { margin-top: 4px; }
.chat-transcr .btn { padding: 2px 8px; font-size: .75rem; }
.chat-transcr-txt { margin-top: 4px; padding: 6px 8px; background: rgba(255,255,255,.75); border-left: 3px solid #6c5ce7; border-radius: 4px; font-size: .85rem; white-space: pre-wrap; color: #263238; }
/* mensagens prontas do chat ("/atalho", 02/11/2026) */
.chat-comp-linha { position: relative; }
.mp-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: #fff; border: 1px solid #CFD8DC; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); overflow: hidden; z-index: 50; font-size: .86rem; }
.mp-cab { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #F5F7FA; border-bottom: 1px solid #ECEFF1; color: #455A64; font-weight: 600; }
.mp-cab .busca { margin-left: auto; font-weight: 400; color: #78909C; }
.mp-it { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #F1F3F5; cursor: pointer; align-items: flex-start; }
.mp-it:hover, .mp-it.sel { background: #E8F1FF; }
.mp-it .at, .mp-tab-lista .at { font-family: monospace; font-weight: 700; color: #1565C0; min-width: 92px; white-space: nowrap; }
.mp-it .tx { color: #37474F; flex: 1; white-space: normal; }
.mp-pop .tg, .mp-tab-lista .tg { font-size: .7rem; padding: 1px 7px; border-radius: 8px; white-space: nowrap; }
.tg.emp { background: #E8F5E9; color: #2E7D32; } .tg.min { background: #EDE7F6; color: #5E35B1; }
.mp-vazio { padding: 10px 12px; color: #78909C; }
.mp-rod { display: flex; gap: 14px; padding: 7px 12px; color: #78909C; font-size: .76rem; background: #FAFBFC; }
.mp-rod a { color: #1565C0; font-weight: 600; margin-left: auto; text-decoration: none; }
.chat-b { position: relative; }
.mp-salvar { display: none; position: absolute; top: -11px; left: -10px; background: #fff; border: 1px solid #b8b0f5; color: #6c5ce7; border-radius: 14px; padding: 2px 8px; font-size: .72rem; box-shadow: 0 2px 6px rgba(0,0,0,.12); white-space: nowrap; cursor: pointer; font-family: inherit; }
.chat-b.eu:hover .mp-salvar { display: inline-block; }
.mp-dica { display: flex; align-items: center; gap: 8px; background: #FFF8E1; border: 1px solid #FFE082; border-radius: 8px; padding: 7px 10px; font-size: .82rem; color: #5D4037; margin-bottom: 6px; }
.mp-dica .btn { padding: 2px 8px; font-size: .75rem; }
.mp-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 6000; padding: 12px; }
.mp-box { background: #fff; border-radius: 10px; padding: 18px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.25); font-size: .88rem; color: #263238; max-width: 96vw; box-sizing: border-box; }
.mp-box h3 { margin: 0 0 4px; font-size: 1.08rem; color: #1a3a5c; }
.mp-sub { color: #78909C; font-size: .8rem; margin-bottom: 12px; }
.mp-box > label { display: block; font-size: .78rem; color: #546E7A; margin: 10px 0 4px; font-weight: 600; }
.mp-box .in { width: 100%; box-sizing: border-box; border: 1px solid #CFD8DC; border-radius: 6px; padding: 7px 9px; font: inherit; }
.mp-ob { font-size: .76rem; color: #78909C; margin-top: 6px; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mp-chip { border: 1px dashed #90A4AE; border-radius: 12px; padding: 2px 9px; font-size: .75rem; font-family: monospace; color: #455A64; background: #fff; cursor: pointer; }
.mp-chip:hover { border-color: #6c5ce7; color: #6c5ce7; }
.mp-prev { background: #E3F2FD; border-radius: 8px; padding: 9px 11px; margin-top: 2px; line-height: 1.5; white-space: pre-wrap; }
.mp-prev .v { background: #FFE0B2; border-radius: 4px; padding: 0 3px; }
.mp-prev .v.falta { background: #FFCDD2; }
.mp-prev .a { background: #BBDEFB; border-radius: 4px; padding: 0 3px; }
.mp-vr { display: inline-block; font-size: .7rem; padding: 1px 6px; border-radius: 8px; margin: 0 3px 3px 0; font-family: monospace; }
.mp-vr.auto { background: #E3F2FD; color: #1565C0; } .mp-vr.liv { background: #FFF3E0; color: #E65100; }
.mp-op { display: flex; gap: 18px; flex-wrap: wrap; }
.mp-op label { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; color: #263238; margin: 0; }
.mp-op small { color: #90A4AE; }
.mp-bt { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.mp-row { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; margin-top: 8px; }
.mp-row .nm { font-family: monospace; font-weight: 700; color: #E65100; word-break: break-all; }
.mp-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.mp-bar input { flex: 1; min-width: 160px; border: 1px solid #CFD8DC; border-radius: 6px; padding: 6px 9px; font: inherit; }
.mp-tab { padding: 5px 12px; border-radius: 16px; background: #ECEFF1; color: #455A64; font-size: .8rem; font-weight: 600; border: none; cursor: pointer; margin-right: 4px; font-family: inherit; }
.mp-tab.on { background: #1565C0; color: #fff; }
table.mp-tab-lista { width: 100%; border-collapse: collapse; }
table.mp-tab-lista th { text-align: left; font-size: .72rem; color: #78909C; text-transform: uppercase; padding: 6px 8px; border-bottom: 2px solid #ECEFF1; }
table.mp-tab-lista td { padding: 8px; border-bottom: 1px solid #F1F3F5; vertical-align: top; }
table.mp-tab-lista .ac { white-space: nowrap; color: #78909C; }
table.mp-tab-lista .ac i { margin-left: 10px; cursor: pointer; }
.mp-leg { display: flex; gap: 16px; font-size: .75rem; color: #78909C; margin-top: 10px; flex-wrap: wrap; }
@media (max-width: 640px) { .mp-row { grid-template-columns: 1fr; } table.mp-tab-lista th:nth-child(3), table.mp-tab-lista td:nth-child(3) { display: none; } }
/* botoes de acao do Assistente de I.A. (02/11/2026) */
.ia-acoes { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; white-space: normal; }
.ia-acao { display: flex; align-items: flex-start; gap: 10px; text-align: left; background: #fff; border: 1px solid #b8b0f5; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: #263238; font: inherit; font-size: .85rem; }
.ia-acao:hover { background: #f1efff; border-color: #6c5ce7; }
.ia-acao > i { color: #6c5ce7; margin-top: 3px; }
.ia-acao b { color: #4834d4; }
.ia-acao small { display: block; color: #78909C; font-size: .75rem; }
.chat-dica { font-size: .72rem; color: var(--gray-500); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.chat-anexo { display: flex; align-items: center; gap: 8px; background: #FFF8E1; border: 1px solid #FFE082; border-radius: 6px; padding: 6px 10px; font-size: .8rem; margin-bottom: 8px; }
.chat-anexo.erro { background: #FFEBEE; border-color: #EF9A9A; color: #B71C1C; }
.chat-anexo .x { margin-left: auto; cursor: pointer; color: #999; }
.chat-aviso-script { margin: 20px; padding: 14px 16px; background: #FFF8E1; border: 1px solid #FFE082; border-radius: 8px; color: #6D4C41; font-size: .9rem; }
/* aviso de mensagem nova (fora da tela de Mensagens) */
.chat-toast { position: fixed; right: 16px; bottom: 16px; width: 370px; max-width: calc(100vw - 32px); background: #fff; border-radius: 10px; box-shadow: 0 10px 36px rgba(0,0,0,.28); border-top: 4px solid var(--primary); z-index: 160; overflow: hidden; }
.chat-toast-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; font-size: .78rem; font-weight: 700; color: var(--primary); }
.chat-toast-h .x { margin-left: auto; color: #90A4AE; cursor: pointer; background: none; border: none; font-size: 1rem; }
.chat-toast-c { display: flex; gap: 10px; padding: 6px 12px 10px; cursor: pointer; }
.chat-toast-c .txt { font-size: .86rem; color: #37474F; line-height: 1.4; min-width: 0; overflow-wrap: anywhere; }
.chat-toast-c .txt b { color: var(--gray-900); }
.chat-toast-c .cita { margin-top: 6px; font-size: .78rem; color: #6c5ce7; font-weight: 600; }
.chat-toast-a { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.chat-toast-a .btn { white-space: nowrap; }
.chat-toast-mais { font-size: .75rem; color: #607D8B; padding: 7px 12px; background: #F5F7F9; border-top: 1px solid #ECEFF1; }
/* janela Enviar por mensagem */
.chat-modal-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.chat-modal { background: #fff; border-radius: 10px; width: 640px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.3); overflow: hidden; }
.chat-modal-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--primary); color: #fff; font: 700 16px var(--font-head); }
.chat-modal-h .x { margin-left: auto; cursor: pointer; background: none; border: none; color: #fff; font-size: 1.1rem; }
.chat-modal-b { padding: 14px 18px; overflow-y: auto; }
.chat-modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #eee; background: var(--gray-50); }
.chat-lbl { font-weight: 600; font-size: .83rem; color: var(--gray-700); margin: 10px 0 5px; display: flex; align-items: center; }
.chat-lbl .r { margin-left: auto; font-weight: 400; font-size: .78rem; }
.chat-lbl .r a { cursor: pointer; }
.chat-dest { border: 1px solid #ddd; border-radius: 8px; max-height: 220px; overflow-y: auto; }
.chat-dest label { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid #f1f1f1; font-size: .88rem; cursor: pointer; margin: 0; }
.chat-dest label.marc { background: #E3F2FD; }
.chat-dest input { width: 16px; height: 16px; }
.chat-dest .chat-av { width: 30px; height: 30px; font-size: 11px; }
.chat-dest .s { margin-left: auto; font-size: .75rem; color: var(--gray-500); }
.chat-dest .s.on { color: #2E7D32; }
.chat-modal textarea { width: 100%; height: 90px; border: 1px solid #ddd; border-radius: 8px; padding: 9px; font: 14px var(--font-body); resize: vertical; }
@media (max-width: 768px) {
  .chat-tela { height: calc(100vh / var(--gz, 1) - var(--topbar-h) - 24px); }
  .chat-contatos { width: 100%; border-right: none; }
  .chat-conversa { display: none; }
  .chat-tela.com-conversa .chat-contatos { display: none; }
  .chat-tela.com-conversa .chat-conversa { display: flex; }
  .chat-voltar { display: inline-block; }
  .chat-b { max-width: 85%; }
  .chat-msgs { padding: 12px; }
  .chat-dica { display: none; }
}

/* ===== Agenda - Pedido de venda: calendario do dia (card nDGrpnHW). Cores de Ocupado/Bloqueado = desktop ===== */
.agcal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.agcal-nav input[type=date] { height: 32px; border: 1px solid var(--gray-300, #ccc); border-radius: 6px; padding: 0 8px; font-family: inherit; }
.agcal-dia { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--primary-dk); }
.agcal-leg { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #607080; }
.agcal-leg i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-left: 8px; }
.agcal-leg-l { background: #fff; border: 1px solid #cfd6df; }
.agcal-leg-o { background: #B6DADA; }
.agcal-leg-b { background: #FFCDD2; }
.agcal { padding: 0; overflow: auto; max-height: calc(100vh - 290px); min-height: 320px; }
.agcal-grade { display: grid; min-width: 600px; }
.agcal-th { position: sticky; top: 0; z-index: 4; background: #E3F2FD; border-bottom: 3px solid var(--primary); border-left: 1px solid var(--gray-200, #e4e8ee);
  padding: 8px 10px; font-weight: 700; font-size: .8rem; text-transform: uppercase; color: var(--primary-dk); }
.agcal-th-hora { left: 0; z-index: 5; border-left: 0; }
.agcal-cnt { display: block; font-weight: 600; text-transform: none; font-size: .75rem; margin-top: 2px; color: #546e7a; }
.agcal-cnt b { color: var(--success); }
.agcal-horas { position: sticky; left: 0; z-index: 3; background: #fff; }
.agcal-horas div { height: 32px; font-size: .78rem; color: #78909c; text-align: right; padding: 3px 8px 0 0; border-bottom: 1px solid var(--gray-200, #e4e8ee); }
.agcal-col { position: relative; border-left: 1px solid var(--gray-200, #e4e8ee); }
.agcal-slot { height: 32px; border-bottom: 1px solid var(--gray-200, #e4e8ee); position: relative; cursor: pointer; }
.agcal-slot:nth-child(even) { background: #FAFBFD; }
.agcal-slot:not(.agcal-slot-x):hover { background: #E3F2FD; }
.agcal-slot:not(.agcal-slot-x):hover::after { content: '+ livre'; position: absolute; left: 8px; top: 7px; font-size: .72rem; color: var(--primary); font-weight: 600; }
.agcal-slot.agcal-sel { background: #BBDEFB !important; outline: 2px solid var(--primary); outline-offset: -2px; }
.agcal-ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 4px 7px; font-size: .74rem; line-height: 1.35; overflow: hidden; cursor: pointer; z-index: 2; }
.agcal-ev:hover { box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.agcal-oc { background: #B6DADA; border-left: 4px solid #5FA8A8; color: #37474F; }
.agcal-oc b { display: block; font-size: .78rem; color: #004D40; padding-right: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agcal-oc span { display: block; }
.agcal-oc .agcal-valor { position: absolute; right: 7px; top: 4px; font-weight: 700; color: #004D40; }
.agcal-bl { background: repeating-linear-gradient(45deg, #FFCDD2 0 8px, #FFE0E3 8px 16px); border-left: 4px solid #E53935; color: #B71C1C; font-weight: 700; }
.agcal-ev-hora { font-weight: 600; opacity: .8; margin-left: 4px; }
.agcal-escolha { margin-top: 10px; padding: 8px 12px; background: #E3F2FD; border-radius: 6px; color: var(--primary-dk); font-size: .85rem; }
.agcal-somente-leitura { background: #f1f3f6 !important; }
@media (max-width: 700px) { .agcal-leg { display: none; } .agcal { max-height: calc(100vh - 220px); } }

/* Foto do produto (card lFoiNPS9) */
.prod-principal-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.prod-principal-campos { flex: 1 1 520px; min-width: 0; }
.prod-foto-grupo { flex: 0 0 230px; width: 230px; }
.prod-foto-box { width: 230px; height: 230px; border: 1px solid #d0d7de; border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; outline: none; }
.prod-foto-box:focus { border-color: var(--primary, #1565C0); box-shadow: 0 0 0 2px rgba(21,101,192,.18); }
.prod-foto-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.prod-foto-box.vazia { border-style: dashed; background: #fafbfc; }
.prod-foto-box.arrastando { border-color: var(--primary, #1565C0); border-style: dashed; background: #E3F2FD; }
.prod-foto-vazia { text-align: center; color: #8a94a0; padding: 10px; font-size: 13px; }
.prod-foto-vazia i { font-size: 44px; display: block; margin-bottom: 8px; }
.prod-foto-botoes { display: flex; gap: 6px; margin-top: 8px; }
.prod-foto-botoes .btn:first-child { flex: 1; }
.prod-foto-dica { font-size: 11px; color: #777; margin-top: 6px; line-height: 1.35; }
.prod-foto-modal img { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; }
@media (max-width: 700px) { .prod-foto-grupo { flex: 1 1 100%; width: 100%; } .prod-foto-box { width: 100%; } }

/* teclas de atalho (spec 2026-10-10) */
.tarefas-menu .atk-sel, #gw-menu .atk-sel { background: #eef3fb; outline: 1px solid #c5d6f0; }
tr.atk-linha > td { background: #fff3c4 !important; }
.client-cards > .atk-linha { outline: 2px solid #f5b400; outline-offset: 1px; }
span.atk-t, span.atk-t u.atk-u { color: inherit !important; font: inherit !important; }
u.atk-u { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 2px; }
.nav-item kbd.atk { margin-left: auto; font-family: inherit; font-size: .68rem; opacity: .55; background: none; border: 0; padding: 0 2px; letter-spacing: .3px; white-space: nowrap; }
.nav-item kbd.atk + .menu-star { margin-left: 4px; }
#page-teclas-atalho .atk-cap, #atk-busca { padding: 7px 10px; border: 1px solid #cfd8dc; border-radius: 6px; background: #fff; font-size: .9rem; }
#page-teclas-atalho .atk-cap:focus { outline: 2px solid #2c5f8a; outline-offset: 1px; background: #f3f8fd; }

/* Acesso de Usuario/Grupo: pesquisa em todas as abas (AcessoBusca no script.js) */
#page-acesso .acesso-tab.achou { background: #fff3c4 !important; color: #7a5b00 !important; border-radius: 6px 6px 0 0; }
#page-acesso .acesso-tab .acesso-tab-qt { display: none; margin-left: 6px; background: #f0a020; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; font-weight: bold; }
#page-acesso .acesso-tab.achou .acesso-tab-qt { display: inline-block; }
#page-acesso mark.acesso-mk { background: #ffeb3b; color: inherit; padding: 0 1px; border-radius: 2px; }
#page-acesso .acesso-achou-linha { background: #fffbe6; }

/* Pedido de Venda: quadros recolhiveis (card XS7xWEal) - fechado mostra so o titulo */
.pedq-rec > .section-header { cursor: pointer; user-select: none; }
.pedq-rec > .section-header .pedq-seta { margin-left: 8px; color: #90A4AE; transition: transform .15s; }
.pedq-rec.pedq-fechado > .section-header .pedq-seta { transform: rotate(-90deg); }
.pedq-rec.pedq-fechado > :not(.section-header) { display: none !important; }
.pedq-rec.pedq-fechado > .section-header { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* Moeda, pais e navio (Workship 17/10/2026): campo so para quem usa (Exterior no script.js) */
.ext-oculto { display: none !important; }

/* ===== Largura dos campos por tamanho de tela, em colunas de 12 (pedidos do editor de layout, 20/10/2026) =====
   c-lg-N = computador (1200px ou mais) | c-md-N = tablet (769 a 1199px) | c-sm-N = celular (ate 768px).
   No celular as linhas ficam um campo por linha; a linha com class "frow-grade" respeita o c-sm-N
   (campo sem c-sm-N continua ocupando a linha inteira). Ver claude-skill-editor-de-layout.md */
@media (min-width: 1200px) {
  .form-row > .form-group.c-lg-1 { flex: 0 0 calc(8.3333% - 11.0px) !important; max-width: calc(8.3333% - 11.0px); }
  .form-row > .form-group.c-lg-2 { flex: 0 0 calc(16.6667% - 10.0px) !important; max-width: calc(16.6667% - 10.0px); }
  .form-row > .form-group.c-lg-3 { flex: 0 0 calc(25.0% - 9.0px) !important; max-width: calc(25.0% - 9.0px); }
  .form-row > .form-group.c-lg-4 { flex: 0 0 calc(33.3333% - 8.0px) !important; max-width: calc(33.3333% - 8.0px); }
  .form-row > .form-group.c-lg-5 { flex: 0 0 calc(41.6667% - 7.0px) !important; max-width: calc(41.6667% - 7.0px); }
  .form-row > .form-group.c-lg-6 { flex: 0 0 calc(50.0% - 6.0px) !important; max-width: calc(50.0% - 6.0px); }
  .form-row > .form-group.c-lg-7 { flex: 0 0 calc(58.3333% - 5.0px) !important; max-width: calc(58.3333% - 5.0px); }
  .form-row > .form-group.c-lg-8 { flex: 0 0 calc(66.6667% - 4.0px) !important; max-width: calc(66.6667% - 4.0px); }
  .form-row > .form-group.c-lg-9 { flex: 0 0 calc(75.0% - 3.0px) !important; max-width: calc(75.0% - 3.0px); }
  .form-row > .form-group.c-lg-10 { flex: 0 0 calc(83.3333% - 2.0px) !important; max-width: calc(83.3333% - 2.0px); }
  .form-row > .form-group.c-lg-11 { flex: 0 0 calc(91.6667% - 1.0px) !important; max-width: calc(91.6667% - 1.0px); }
  .form-row > .form-group.c-lg-12 { flex: 0 0 calc(100.0% - 0.0px) !important; max-width: calc(100.0% - 0.0px); }
}
@media (min-width: 769px) and (max-width: 1199px) {
  .form-row > .form-group.c-md-1 { flex: 0 0 calc(8.3333% - 11.0px) !important; max-width: calc(8.3333% - 11.0px); }
  .form-row > .form-group.c-md-2 { flex: 0 0 calc(16.6667% - 10.0px) !important; max-width: calc(16.6667% - 10.0px); }
  .form-row > .form-group.c-md-3 { flex: 0 0 calc(25.0% - 9.0px) !important; max-width: calc(25.0% - 9.0px); }
  .form-row > .form-group.c-md-4 { flex: 0 0 calc(33.3333% - 8.0px) !important; max-width: calc(33.3333% - 8.0px); }
  .form-row > .form-group.c-md-5 { flex: 0 0 calc(41.6667% - 7.0px) !important; max-width: calc(41.6667% - 7.0px); }
  .form-row > .form-group.c-md-6 { flex: 0 0 calc(50.0% - 6.0px) !important; max-width: calc(50.0% - 6.0px); }
  .form-row > .form-group.c-md-7 { flex: 0 0 calc(58.3333% - 5.0px) !important; max-width: calc(58.3333% - 5.0px); }
  .form-row > .form-group.c-md-8 { flex: 0 0 calc(66.6667% - 4.0px) !important; max-width: calc(66.6667% - 4.0px); }
  .form-row > .form-group.c-md-9 { flex: 0 0 calc(75.0% - 3.0px) !important; max-width: calc(75.0% - 3.0px); }
  .form-row > .form-group.c-md-10 { flex: 0 0 calc(83.3333% - 2.0px) !important; max-width: calc(83.3333% - 2.0px); }
  .form-row > .form-group.c-md-11 { flex: 0 0 calc(91.6667% - 1.0px) !important; max-width: calc(91.6667% - 1.0px); }
  .form-row > .form-group.c-md-12 { flex: 0 0 calc(100.0% - 0.0px) !important; max-width: calc(100.0% - 0.0px); }
}
@media (max-width: 768px) {
  .form-row.frow-grade { flex-direction: row !important; flex-wrap: wrap; }
  .form-row.frow-grade > .form-group { flex: 1 1 100% !important; max-width: 100%; }
  .form-row.frow-grade > .form-group.c-sm-1 { flex: 0 0 calc(8.3333% - 11.0px) !important; max-width: calc(8.3333% - 11.0px); }
  .form-row.frow-grade > .form-group.c-sm-2 { flex: 0 0 calc(16.6667% - 10.0px) !important; max-width: calc(16.6667% - 10.0px); }
  .form-row.frow-grade > .form-group.c-sm-3 { flex: 0 0 calc(25.0% - 9.0px) !important; max-width: calc(25.0% - 9.0px); }
  .form-row.frow-grade > .form-group.c-sm-4 { flex: 0 0 calc(33.3333% - 8.0px) !important; max-width: calc(33.3333% - 8.0px); }
  .form-row.frow-grade > .form-group.c-sm-5 { flex: 0 0 calc(41.6667% - 7.0px) !important; max-width: calc(41.6667% - 7.0px); }
  .form-row.frow-grade > .form-group.c-sm-6 { flex: 0 0 calc(50.0% - 6.0px) !important; max-width: calc(50.0% - 6.0px); }
  .form-row.frow-grade > .form-group.c-sm-7 { flex: 0 0 calc(58.3333% - 5.0px) !important; max-width: calc(58.3333% - 5.0px); }
  .form-row.frow-grade > .form-group.c-sm-8 { flex: 0 0 calc(66.6667% - 4.0px) !important; max-width: calc(66.6667% - 4.0px); }
  .form-row.frow-grade > .form-group.c-sm-9 { flex: 0 0 calc(75.0% - 3.0px) !important; max-width: calc(75.0% - 3.0px); }
  .form-row.frow-grade > .form-group.c-sm-10 { flex: 0 0 calc(83.3333% - 2.0px) !important; max-width: calc(83.3333% - 2.0px); }
  .form-row.frow-grade > .form-group.c-sm-11 { flex: 0 0 calc(91.6667% - 1.0px) !important; max-width: calc(91.6667% - 1.0px); }
  .form-row.frow-grade > .form-group.c-sm-12 { flex: 0 0 calc(100.0% - 0.0px) !important; max-width: calc(100.0% - 0.0px); }
}

/* Quebra de linha por tamanho de tela (pedido de layout "Comeca linha nova no <tamanho>"): <div class="frow-quebra q-lg q-md">
   antes do campo; q-lg = computador, q-md = tablet, q-sm = celular (no celular so faz efeito em linha frow-grade). */
.form-row > .frow-quebra { flex-basis: 100%; height: 0; margin: 0; padding: 0; display: none; }
@media (min-width: 1200px) { .form-row > .frow-quebra.q-lg { display: block; } }
@media (min-width: 769px) and (max-width: 1199px) { .form-row > .frow-quebra.q-md { display: block; } }
@media (max-width: 768px) { .form-row > .frow-quebra.q-sm { display: block; } }

/* Botao WhatsApp ao lado do telefone do cliente (card NFMbnx5P): abre o WhatsApp do usuario no numero */
.zap-tel-wrap { display: flex; gap: 4px; align-items: stretch; }
.zap-tel-wrap > input { flex: 1; min-width: 0; }
.btn-zap-tel { background: #25D366; color: #fff; border: none; padding: 0 10px; font-size: 1.1rem; line-height: 1; flex: 0 0 auto; }
.btn-zap-tel:hover { background: #1ebe5b; color: #fff; }
td.actions .btn-zap-tel { padding: 4px 8px; font-size: .85rem; }

/* Pedido de venda > Produtos: valores sem quebrar ("R$ 0.00" e "USD 1.625,00" em uma linha; o R$ do item em moeda
   fica embaixo) - linha em real com 1 linha so (Janderson 10/11/2026, card KtTbew0u) */
#ped-prod-tbody td[style*="text-align:right"] { white-space: nowrap; }

/* ===== Mapa de vendas (diretoria, 16/11/2026) - static/mapa-vendas.js ===== */
.mv-bloco{padding:12px 14px 10px;margin-bottom:12px}
.mv-cab{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.mv-cab b{font-size:.95rem;color:#1f3b57}
.mv-cab small{color:#6b7c8f;font-size:.8rem}
.mv-legenda{display:flex;gap:16px;flex-wrap:wrap;font-size:.78rem;color:#3b5068;margin:6px 0 2px}
.mv-legenda i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:-1px}
.mv-horas{display:flex;margin-left:64px;font-size:.68rem;color:#8a99a8;height:16px;margin-top:4px}
.mv-horas span{flex:1}
.mv-linha{display:flex;align-items:flex-end;height:40px}
.mv-dia{width:64px;flex:0 0 64px;height:20px;display:flex;align-items:center;font-size:.75rem;color:#56687a;white-space:nowrap}
.mv-dia b{color:#2c3e50;font-weight:600}
.mv-trilho{position:relative;flex:1;height:40px;background:repeating-linear-gradient(to right,#e9edf2 0,#e9edf2 1px,transparent 1px,transparent calc(100% / var(--mv-n)))}
.mv-trilho::after{content:'';position:absolute;left:0;right:0;bottom:9px;height:2px;background:#dfe6ee;border-radius:2px}
.mv-bola{position:absolute;bottom:6px;width:8px;height:8px;margin-left:-4px;border-radius:50%;z-index:1;box-shadow:0 0 0 1.5px #fff;cursor:default}
.mv-valor{position:absolute;bottom:17px;transform:translateX(-50%);font-size:11px;color:#3b5068;white-space:nowrap;pointer-events:none}
.mv-vazio{padding:24px;text-align:center;color:#78909c}
.mv-bola{cursor:pointer}
.mv-atend{position:absolute;bottom:6px;height:8px;min-width:4px;border-radius:4px;background:#8e44ad;opacity:.85;cursor:pointer}
.mv-atend.aberto{background:#e3d0ec;border:1px dashed #8e44ad;opacity:1;min-width:12px}
.mv-leg-atend.aberto{background:#e3d0ec!important;border:1px dashed #8e44ad;box-sizing:border-box}
.mv-leg-atend{width:18px!important;height:7px!important;border-radius:4px!important;background:#8e44ad}
.mv-balao{position:fixed;z-index:10000;max-width:300px;background:#263238;color:#fff;font-size:12px;line-height:1.45;padding:6px 9px;border-radius:6px;white-space:pre-line;box-shadow:0 2px 8px rgba(0,0,0,.25);pointer-events:none}
@media (max-width:600px){.mv-bloco{padding:10px 8px}.mv-dia{width:60px;flex-basis:60px;font-size:.66rem}.mv-horas{margin-left:60px;font-size:.58rem}}
