/* Clientes */
body .app-content .clients-grid .client-card-row-premium {
  display: grid !important;
  grid-template: "person" auto "data" auto "actions" auto / minmax(0,1fr) !important;
  align-content: start;
  gap: 6px !important;
  min-width: 0;
  min-height: 0 !important;
  padding: 10px !important;
}
body .app-content .clients-grid .client-card-row-person { grid-area: person; min-width: 0; gap: 8px; }
body .app-content .clients-grid .client-card-row-data { grid-area: data; min-width: 0; }
body .app-content .clients-grid .client-card-row-identity { flex: 1; min-width: 0; }
body .app-content .clients-grid .client-card-row-name-line h3 {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 14px;
}
body .app-content .clients-grid .client-card-row-actions {
  grid-area: actions;
  display: flex !important;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 5px 0 0 !important;
  border: 0;
  border-top: 1px solid #eceef2;
}

/* Funil */
body .app-content .funil-board {
  grid-template-columns: repeat(6,minmax(220px,1fr));
  max-width: 100%;
  overflow-x: auto;
  gap: 8px;
}
body .app-content .funil-column { min-width: 0; box-sizing: border-box; padding: 8px; }
body .app-content .funil-card { min-width: 0; padding: 9px; overflow-wrap: anywhere; }
body .app-content .funil-card-event { flex-wrap: wrap; row-gap: 4px; }
body .app-content .funil-card-links > small { flex-basis: 100%; color: #515c6f; font-size: 11px; }
body .app-content .funil-card footer select {
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #d9dfe8;
  border-radius: 7px;
  color: #293344;
  background: #fff;
}

/* Propostas */
body .app-content .orc-shell { grid-template-columns: minmax(0,1fr) minmax(190px,225px); }
body .app-content .orc-main-column { min-width: 0; }
body .app-content .orc-card-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); gap: 8px; }
body .app-content .orc-card { min-width: 0; padding: 11px; overflow-wrap: anywhere; }
body .app-content .orc-card-meta-grid { gap: 6px; padding: 8px; }
body .app-content .orc-card-meta-grid > div { min-width: 0; gap: 3px; }
body .app-content .orc-card-actions { display: flex; flex-wrap: wrap; gap: 5px; }
body .app-content :is(.orc-toolbar,.orc-card-actions,.orc-side-list,.orc-detail-header,.orc-detail-card)
  :is(a,button):is(.secondary-button,.ghost-button) {
  display: inline-flex; align-items: center; gap: 4px; min-height: 31px;
  padding: 4px 8px; border: 1px solid #d9dfe8; border-radius: 7px;
  background: #fff; color: #293344; font-size: 11px; text-decoration: none;
}
body .app-content :is(#historico,#acompanhamento) { scroll-margin-block-start: 25px; }

/* Financeiro */
body .app-content .fin-overview .fin-balance-card {
  background: linear-gradient(120deg,#fff 55%,#eef8f4);
  border-color: #dbe9e3;
}
body .app-content .fin-overview-kpis > button {
  border-top: 3px solid #a6b4c7;
  min-width: 0;
}
body .app-content .fin-overview-kpis > button:nth-child(2) { border-top-color: #d85959; }
body .app-content .fin-overview-kpis > button:nth-child(3) { border-top-color: #d5a247; }
body .app-content .fin-overview-kpis > button:nth-child(4) { border-top-color: #4da783; }
body .app-content .fin-overview-kpis > button:focus-visible { outline: 2px solid #823447; outline-offset: 2px; }
body .app-content .fin-overview-panel { min-width: 0; }
body .app-content :is(.fin-attention-list,.fin-receipt-list) > div:nth-child(even) { background: #f8fafc; }
body .app-content :is(.fin-attention-list,.fin-receipt-list) > div > div:first-child { min-width: 0; overflow-wrap: anywhere; }

/* Relatórios */
.report-period-detail { grid-column: 1 / -1; }
.report-period-detail details { padding: 8px 13px 12px; }
.report-period-detail summary { cursor: pointer; font-weight: 650; }
.report-period-scroll { max-width: 100%; overflow-x: auto; margin-top: 10px; }
.report-period-scroll table { width: 100%; border-collapse: collapse; text-align: left; }
.report-period-scroll :is(th,td) { padding: 7px 10px; border-bottom: 1px solid #e7ecf2; white-space: nowrap; }
.report-period-scroll tr:nth-child(even) { background: #f8fafc; }

@media (max-width: 1024px) {
  body .app-content .orc-shell { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 780px), (max-width: 1024px) and (pointer: coarse) {
  body .app-content .funil-column { flex-shrink: 0; }
  body .app-content .orc-card-grid { grid-template-columns: minmax(0,1fr); }
  body .app-content :is(.orc-toolbar,.orc-card-actions,.orc-detail-card) :is(a,button):is(.secondary-button,.ghost-button) { min-height: 44px; }
}
