/* Ajustes locais: não alteram o shell ou os formulários de outras páginas. */
.cq-board-help--mobile { display: none; }
.cq-mobile-nav, .cq-mobile-filters, .cq-mobile-empty { display: none; }
@media screen and (max-width: 900px) {
  .cq-tabsrow, .cq-tabs { min-width: 0; max-width: 100%; }
  .cq-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .cq-tab { flex: 0 0 auto; white-space: nowrap; min-height: 44px; }
  .cq-tabsrow { align-items: stretch; }
  .cq-tabs { width: 100%; }
  .cq-boardmonth { margin-left: auto; }
}
@media screen and (max-width: 700px) {
  body { min-height: 100dvh; }
  .app-body, body.sidebar-collapsed .app-body { min-width: 0; width: 100%; margin-left: 0; }
  .main { min-width: 0; padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .main > section { min-width: 0; max-width: 100%; }
  .cq-tabsrow { gap: 10px; margin-bottom: 20px; }
  .cq-tabs { display: none; }
  .cq-mobile-nav { display: grid; width: 100%; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .cq-mobile-nav select, .cq-mobile-filters select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 30px 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-weight: 500; font-size: 16px; line-height: 1.4; font-family: inherit; }
  .cq-mobile-nav select { font-weight: 700; }
  .cq-mobile-filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
  .cq-mobile-filters label { min-width: 0; display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
  #cqFilters { display: none; }
  .cq-tabs { border-radius: 10px; gap: 4px; padding: 4px; scroll-padding-inline: 4px; }
  .cq-tab { font-size: 13px; padding: 10px 14px; border-radius: 7px; }
  .cq-tab.active { box-shadow: none; }
  .cq-boardmonth { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .cq-boardmonth > .cq-month { margin-left: 0; width: 100%; justify-content: space-between; }
  .cq-month { max-width: 100%; }
  .cq-month button { width: 40px; height: 40px; flex-shrink: 0; }
  .cq-month .lbl { min-width: 0; padding-inline: 12px; font-family: inherit; font-size: 13px; }
  .cq-head { gap: 14px; margin-bottom: 16px; }
  .cq-head__top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: stretch; }
  .cq-head__top > div:first-child { grid-column: 1 / -1; }
  .cq-head__top .cq-spacer { display: none; }
  .cq-title { font-size: 24px; line-height: 1.2; letter-spacing: -.6px; overflow-wrap: anywhere; }
  .cq-sub { font-size: 13px; line-height: 1.6; margin-top: 7px; }
  .cq-board-help--desktop { display: none; }
  .cq-board-help--mobile { display: block; }
  .cq-stats { grid-column: 1 / -1; flex-wrap: wrap; white-space: normal; font: 500 12px/1.6 'Inter', sans-serif; }
  .btn { min-height: 44px; justify-content: center; padding: 10px 14px; line-height: 1.4; }
  .btn--xs, .btn--sm { min-height: 40px; }
  .cq-filters, .cq-cal-nichos { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding: 3px 2px 9px; overscroll-behavior-x: contain; }
  .cq-chip { flex: 0 0 auto; min-height: 40px; }
  .cq-board-wrap:not(.cq-board-wrap--fit) { margin: 0; padding: 0 0 16px; overflow: visible; }
  .cq-board:not(.cq-board--fit) { display: grid; width: 100%; min-width: 0; padding: 0; gap: 20px; }
  .cq-board:not(.cq-board--fit) > .cq-col { width: 100%; min-width: 0; max-height: none; }
  #cqBoard > .cq-col--mobile-hidden { display: none; }
  .cq-mobile-empty { display: block; padding: 16px; margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
  .cq-col__head { padding: 14px 12px; }
  .cq-col__name { overflow-wrap: anywhere; min-width: 0; }
  .cq-col__body { overflow-y: visible; padding: 4px 10px 12px; }
  .cq-card { padding: 14px; touch-action: pan-x pan-y; }
  .cq-add { min-height: 44px; }
  .cq-cli-head { gap: 12px; }
  .cq-cli-head > div:first-child { width: 100%; }
  .cq-cli-head > .cq-spacer { display: none; }
  .cq-cli-head > .btn { flex: 1 1 auto; }
  .cq-cli-grid, .cq-redes-grid, .cq-wa-grid { grid-template-columns: minmax(0, 1fr); }
  .cq-redes-acct, .cq-redes-cfg, .fhint, .cq-sub { overflow-wrap: anywhere; }
  .cq-redes-acct__top > div { min-width: 0; }
  .cq-search { min-width: 0; width: 100%; }
  .cq-search__in { min-height: 44px; font-size: 16px; }
  .cq-seg { min-height: 40px; }
  .cq-ctr-list, .cq-fatura, .cq-archnote { min-width: 0; max-width: 100%; }
  .cq-cal-grid { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .overlay { padding: 10px; align-items: center; }
  .modal { width: 100%; max-height: calc(100dvh - 20px); padding: 20px; border-radius: 14px; overscroll-behavior-y: contain; scroll-padding-block: 20px 100px; }
  .modal-hd { gap: 12px; align-items: flex-start; margin-bottom: 20px; }
  .modal-title { font-size: 20px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
  .modal-x { width: 40px; height: 40px; flex-shrink: 0; }
  .fgrid, .cq-grid { grid-template-columns: minmax(0, 1fr); }
  .fgrid > *, .cq-grid > *, .frow { min-width: 0; }
  .finput, .modal input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), .modal select, .modal textarea { min-width: 0; max-width: 100%; font-size: 16px; }
  .finput { min-height: 44px; }
  .modal textarea { min-height: 100px; }
  .modal-actions { flex-wrap: wrap; gap: 8px; padding-top: 16px; }
  .modal-actions > .sp { display: none; }
  .modal-actions > .btn { flex: 1 1 120px; }
  .modal.cq-ctrm { max-height: calc(100dvh - 20px); }
  .cq-ilinha { flex-wrap: wrap; }
  .cq-ilinha .finput { flex: 1 1 180px; }
  .cq-carr-acts button { width: 36px; height: 36px; }
  .main :is(button, a, select, input):focus-visible, .modal :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 3px; }
  .bottom-nav { height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  #toast { bottom: calc(78px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); width: max-content; overflow-wrap: anywhere; }
}
