.workspace-badge {
  margin: 8px 8px 18px;
  padding: 10px 12px;
  border: 1px solid #dce9df;
  border-radius: 12px;
  background: #f5faf5;
  display: grid;
  gap: 3px;
}
.workspace-badge small {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #6b8372;
}
.workspace-badge b {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metrics.operational {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.hero.compact {
  min-height: 220px;
}
.queue-table td small,
.conversation-row small {
  display: block;
  color: #789080;
  margin-top: 3px;
}
.conversation-list {
  display: grid;
  gap: 8px;
}
.conversation-row {
  display: grid;
  grid-template-columns: 42px minmax(180px, 2fr) minmax(120px, 1fr) 90px;
  gap: 14px;
  align-items: center;
  text-align: left;
  border: 1px solid #e3ece5;
  background: #fff;
  border-radius: 14px;
  padding: 12px 15px;
  color: #173d27;
}
.conversation-row:hover {
  border-color: #9fcdae;
  background: #f8fcf8;
}
.conversation-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dff3d9;
  color: #21623a;
  font-weight: 800;
}
.message-detail {
  display: grid;
  gap: 20px;
  max-width: 760px;
}
.message-bubble {
  background: #dcf8c6;
  border-radius: 16px 16px 3px 16px;
  padding: 16px 18px;
  justify-self: end;
  max-width: 80%;
  box-shadow: 0 2px 8px #173d2712;
}
.message-bubble p {
  white-space: pre-wrap;
  margin: 8px 0;
}
.message-bubble small,
.message-bubble span {
  color: #59715e;
  font-size: 12px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf2ee;
}
.timeline-item small {
  color: #789080;
}
@media (max-width: 1050px) {
  .metrics.operational {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .metrics.operational {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .conversation-row {
    grid-template-columns: 38px 1fr 70px;
  }
  .conversation-row .muted {
    display: none;
  }
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .message-bubble {
    max-width: 100%;
  }
}
.deal-create {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px;
  margin: 0 0 14px;
}
.deal-create label,
.deal-toolbar label,
.deal-card label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.deal-create input,
.deal-create select,
.deal-toolbar select,
.deal-card select {
  margin: 5px 0 0;
  padding: 9px;
}
.deal-create button {
  height: 42px;
}
.deal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
}
.deal-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.deal-column {
  background: #edf1eb;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 340px;
  padding: 10px;
}
.deal-column header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 3px 12px;
}
.deal-column header span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.deal-column header small {
  margin-left: auto;
  color: var(--muted);
}
.deal-cards {
  display: grid;
  gap: 9px;
}
.deal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px #24372a0b;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 7px;
}
.deal-card b,
.deal-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deal-card small {
  color: var(--muted);
}
.deal-card strong {
  font-size: 14px;
}
.deal-card > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.deal-card .secondary {
  padding: 8px 10px;
  font-size: 10px;
}
.deal-empty {
  font-size: 12px;
  padding: 18px 6px;
  text-align: center;
}
@media (max-width: 980px) {
  .deal-create {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deal-create button {
    grid-column: span 2;
  }
  .deal-board {
    grid-auto-columns: minmax(265px, 75vw);
  }
}
.activity-create {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 200px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  margin-bottom: 20px;
}
.activity-create input,
.activity-create select {
  margin: 0;
  padding: 10px;
}
.activity-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}
.activity-layout h2 {
  font: 600 19px "Playfair Display";
  margin: 0 0 10px;
}
.activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  margin: 8px 0;
}
.activity-row > div {
  min-width: 0;
  flex: 1;
}
.activity-row b,
.activity-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-row small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.activity-check {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: #edf1eb;
  color: #597265;
  font-size: 16px;
}
.activity-check.done {
  background: #daf3df;
  color: #168153;
}
.activity-row.overdue {
  border-color: #e6b3ad;
  background: #fffaf9;
}
@media (max-width: 900px) {
  .activity-create {
    grid-template-columns: 1fr 1fr;
  }
  .activity-create button {
    grid-column: span 2;
  }
  .activity-layout {
    grid-template-columns: 1fr;
  }
}
.dashboard-crm {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 22px;
  margin: 0 0 36px;
}
.dashboard-overview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0 18px;
}
.dashboard-overview h1 {
  margin: 4px 0;
  color: #17221e;
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.dashboard-overview p {
  margin: 0;
  color: #6d7772;
  font-size: 14px;
}
.dashboard-overview .row {
  flex: none;
}
.pipeline-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.pipeline-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  grid-template-columns: 9px 1fr auto;
  gap: 8px;
  text-align: left;
  padding: 13px;
}
.pipeline-summary > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 4px;
}
.pipeline-summary small {
  grid-column: 2;
  color: var(--muted);
  font-weight: 400;
}
.pipeline-summary strong {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
}
.attention-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
}
.attention-card .section-head {
  margin-bottom: 8px;
}
.attention-card article {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.attention-card article b,
.attention-card article small {
  display: block;
}
.attention-card article small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
@media (max-width: 900px) {
  .dashboard-crm {
    grid-template-columns: 1fr;
  }
  .dashboard-overview {
    align-items: stretch;
    flex-direction: column;
  }
  .pipeline-summary-grid {
    grid-template-columns: 1fr;
  }
}
.company-create {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  margin-bottom: 18px;
}
.company-create input {
  margin: 0;
  padding: 10px;
}
.company-table small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.company-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.company-detail-grid .data-card {
  padding: 18px;
}
.company-detail-grid h2 {
  font: 600 19px "Playfair Display";
  margin: 0 0 14px;
}
.company-detail-grid p {
  margin: 9px 0;
  color: var(--muted);
}
.company-item {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.company-item b,
.company-item small {
  display: block;
}
.company-item small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}
@media (max-width: 760px) {
  .company-create {
    grid-template-columns: 1fr;
  }
  .company-detail-grid {
    grid-template-columns: 1fr;
  }
}
.contact-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.contact-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.contact-summary > section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
}
.contact-summary span,
.contact-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.contact-summary b {
  display: block;
  margin: 8px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-summary select {
  margin: 8px 0 0;
  padding: 8px;
}
.contact-360-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.contact-360-grid .data-card {
  padding: 18px;
}
.contact-360-grid h2 {
  font: 600 19px "Playfair Display";
  margin: 0 0 14px;
}
.contact-360 {
  margin-right: 6px;
  padding: 8px 9px !important;
  font-size: 10px !important;
}
@media (max-width: 900px) {
  .contact-summary,
  .contact-360-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .contact-summary,
  .contact-360-grid {
    grid-template-columns: 1fr;
  }
}
.stage-color {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
}
.settings-split {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 14px;
  margin-top: 14px;
}
.settings-split .data-card {
  padding: 16px;
}
.settings-split h2 {
  font: 600 19px "Playfair Display";
  margin: 0 0 12px;
}
.reason-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 9px 0;
}
.reason-row b {
  flex: 1;
}
.reason-row .secondary {
  padding: 7px 8px;
  font-size: 10px;
}
@media (max-width: 760px) {
  .settings-split {
    grid-template-columns: 1fr;
  }
}
.contact-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 14px;
}
.contact-tags span {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.contact-tags span button {
  padding: 6px 9px;
  background: color-mix(in srgb, var(--tag) 15%, white);
  color: #25483a;
}
.contact-tags select {
  width: auto;
  min-width: 160px;
  margin: 0;
  padding: 8px;
}
.contact-tags .secondary {
  padding: 8px 10px;
  font-size: 10px;
}
.crm-live-status {
  display: block;
  margin-top: 4px;
  color: #21824e;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.whatsapp-crm {
  height: calc(100vh - 118px);
  min-height: 620px;
  display: grid;
  grid-template-columns: 330px minmax(430px, 1fr) 270px;
  border: 1px solid #dce6dd;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 30px #153a2010;
}
.wa-list {
  border-right: 1px solid #e4ebe5;
  min-width: 0;
  background: #fff;
}
.wa-list-head {
  height: 62px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
}
.wa-search {
  margin: 0 12px 9px !important;
  width: calc(100% - 24px) !important;
  padding: 10px 13px !important;
  background: #f3f6f3 !important;
  border: 0 !important;
  border-radius: 10px !important;
}
.wa-filters {
  display: flex;
  gap: 6px;
  padding: 0 12px 9px;
}
.wa-filters button {
  padding: 6px 10px;
  background: #f3f6f3;
  color: #466052;
  font-size: 11px;
}
.wa-filters button.selected {
  background: #dcf7e5;
  color: #087c3e;
}
.wa-filters select {
  display: none;
}
.wa-threads {
  height: calc(100% - 114px);
  overflow: auto;
}
.wa-threads .crm-row {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #eff2ef;
  padding: 13px 15px;
  min-height: 68px;
}
.wa-threads .crm-row:hover {
  background: #f6faf6;
}
.wa-conversation {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #efeae2
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='10' cy='10' r='2' fill='%23ded8cf' opacity='.45'/%3E%3Cpath d='M35 20l8 5-8 5z' fill='%23ded8cf' opacity='.25'/%3E%3C/svg%3E");
}
.wa-empty {
  margin: auto;
  display: grid;
  text-align: center;
  gap: 12px;
  color: #69796d;
}
.wa-empty span {
  font-size: 42px;
  color: #68a575;
}
.wa-empty b {
  font-size: 18px;
}
.wa-conversation .crm-detail-head {
  height: 62px;
  flex: none;
  padding: 0 18px;
  background: #f7f8f7;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wa-contact {
  display: flex;
  align-items: center;
  gap: 11px;
}
.wa-contact b,
.wa-contact small {
  display: block;
}
.wa-contact small {
  font-size: 11px;
  color: #6e7f73;
  margin-top: 3px;
}
.wa-head-actions {
  display: flex;
  gap: 6px;
}
.wa-messages {
  flex: 1;
  overflow: auto;
  padding: 22px 7%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wa-messages .crm-message {
  align-self: flex-end;
  max-width: 72%;
  border-radius: 8px 0 8px 8px;
  background: #d9fdd3;
  padding: 8px 10px;
  box-shadow: 0 1px 1px #00000014;
}
.wa-messages .crm-message.incoming {
  align-self: flex-start;
  border-radius: 0 8px 8px;
  background: #fff;
}
.wa-messages .crm-message p {
  margin: 3px 0 0;
}
.wa-messages .crm-message small {
  font-size: 10px;
  color: #617268;
}
.wa-conversation .crm-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f7f8f7;
}
.wa-conversation .crm-reply input {
  margin: 0;
  flex: 1;
  border: 0;
  border-radius: 20px;
  padding: 11px 15px;
}
.wa-composer-icon,
.wa-send {
  padding: 8px !important;
  background: transparent !important;
  color: #516158 !important;
  font-size: 21px !important;
}
.wa-send {
  color: #16834c !important;
}
.wa-context {
  padding: 20px 16px;
  background: #fbfdfb;
  border-left: 1px solid #e4ebe5;
  overflow: auto;
}
.wa-context h3 {
  margin: 7px 0;
}
.wa-context > p {
  font-size: 12px;
  color: #6d8072;
  margin: 0 0 17px;
}
.wa-context-card {
  border-top: 1px solid #e3ebe4;
  padding: 14px 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.wa-context-card .crm-controls {
  display: grid;
  gap: 8px;
}
.wa-context-card .crm-controls label {
  font-size: 11px;
  color: #6d8072;
}
.wa-context-card select {
  margin: 3px 0 0;
  padding: 7px;
}
.wa-context-card .row {
  display: flex;
}
.wa-context-card input {
  min-width: 0;
}
.wa-context-card article {
  font-size: 12px;
  border-top: 1px solid #edf1ed;
  padding: 8px 0;
}
@media (max-width: 1100px) {
  .whatsapp-crm {
    grid-template-columns: 290px 1fr;
  }
  .wa-context {
    display: none;
  }
}
@media (max-width: 720px) {
  .whatsapp-crm {
    height: calc(100vh - 90px);
    min-height: 520px;
    grid-template-columns: 1fr;
  }
  .wa-list {
    display: none;
  }
  .wa-conversation.active {
    display: flex;
  }
}
.inbox-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inbox-tools input,
.inbox-tools select {
  width: auto;
  min-width: 170px;
  margin: 0;
  padding: 9px;
}
.crm-row.unread {
  border-color: #9fcdab;
  background: #fbfefb;
}
.crm-row.unread .crm-row-main b {
  font-weight: 800;
}
.unread-badge {
  display: inline-grid !important;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #174e40;
  color: white;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  margin: 5px 0 0 auto;
}
.priority-urgent {
  color: #b42318 !important;
}
.priority-high {
  color: #b54708 !important;
}
@media (max-width: 700px) {
  .inbox-tools {
    width: 100%;
  }
  .inbox-tools input,
  .inbox-tools select {
    flex: 1;
    min-width: 0;
  }
}
.deal-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px;
  margin: 0 0 14px;
}
.deal-detail-summary span,
.deal-detail-summary b {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.deal-detail-summary select,
.deal-detail-summary input {
  margin: 0;
  padding: 9px;
}
.deal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.deal-detail-grid .data-card {
  padding: 18px;
}
.deal-detail-grid h2 {
  font: 600 19px "Playfair Display";
  margin: 0;
}
.deal-history article {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.deal-history b,
.deal-history small {
  display: block;
}
.deal-history small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .deal-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deal-detail-summary button {
    grid-column: span 2;
  }
  .deal-detail-grid {
    grid-template-columns: 1fr;
  }
}
.whatsapp-crm {
  height: calc(100vh - 188px);
  min-height: 560px;
  max-height: 760px;
  grid-template-columns: 360px minmax(0, 1fr) 300px;
  align-items: stretch;
}
.wa-list,
.wa-conversation,
.wa-context {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.wa-threads {
  height: auto;
  flex: 1;
}
.wa-list {
  display: flex;
  flex-direction: column;
}
.wa-conversation.active {
  height: 100%;
  overflow: hidden;
}
.wa-messages {
  min-height: 0;
  padding: 28px 8%;
  background-color: #efeae2;
}
.wa-messages .crm-message {
  font-size: 15px;
  line-height: 1.4;
  max-width: 68%;
  padding: 8px 11px;
}
.wa-messages .crm-message p {
  white-space: pre-wrap;
}
.wa-conversation .crm-reply {
  flex: none;
  position: relative;
  bottom: auto;
  border-top: 1px solid #e2e5e2;
  padding: 11px 16px;
}
.wa-context {
  overflow-y: auto;
  background: #fff;
}
.wa-context-card {
  padding: 16px 0;
}
.wa-context-card .crm-controls {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wa-context-card .crm-controls label:last-child {
  grid-column: span 2;
}
.wa-context-card .crm-controls label select {
  width: 100%;
}
@media (max-width: 1250px) {
  .whatsapp-crm {
    grid-template-columns: 320px minmax(0, 1fr) 260px;
  }
}
@media (max-width: 1050px) {
  .whatsapp-crm {
    height: calc(100vh - 145px);
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .wa-context {
    display: none;
  }
}

/* Inbox profissional */
.wa-threads .crm-row.active {
  background: #e9f4ed;
}
.wa-threads .crm-row {
  position: relative;
}
.wa-threads .crm-row.unread .crm-row-main b {
  font-weight: 800;
}
.wa-threads .unread-badge {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #19a75b;
  color: #fff;
  font: 700 11px/1 sans-serif;
}
.wa-messages {
  scroll-behavior: auto;
  overflow-anchor: none;
}
.wa-messages .crm-message {
  display: block;
  min-width: 88px;
}
.wa-messages .crm-message footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
  color: #66756d;
  font-size: 10px;
}
.wa-messages .crm-message footer time {
  font: 500 10px/1.2 sans-serif;
}
.wa-messages .crm-message.failed {
  box-shadow: inset 3px 0 #c84646;
}
.wa-status {
  font-size: 12px;
  line-height: 1;
}
.wa-status.read {
  color: #168bd1;
}
.wa-day {
  align-self: center;
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 7px 0;
}
.wa-day span {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  color: #66756d;
  box-shadow: 0 1px 2px #0002;
  font-size: 11px;
}
.wa-load-older {
  align-self: center !important;
  padding: 7px 13px !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #34604d !important;
  box-shadow: 0 1px 2px #0002;
}
.wa-empty-history {
  margin: auto;
  color: #68776f;
  background: #ffffffd9;
  padding: 8px 13px;
  border-radius: 8px;
}
.wa-conversation .crm-reply textarea {
  flex: 1;
  resize: none;
  overflow-y: auto;
  min-height: 42px;
  max-height: 128px;
  margin: 0;
  padding: 11px 15px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #17221e;
  font: inherit;
  line-height: 20px;
  outline: 0;
}
.wa-attachment-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f6f8f6;
  border-top: 1px solid #e1e5e1;
}
.wa-attachment-preview[hidden] {
  display: none;
}
.wa-attachment-preview span {
  font-size: 22px;
}
.wa-attachment-preview b {
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-attachment-preview small {
  margin-left: auto;
  color: #6d7772;
}
.wa-attachment-preview button {
  padding: 5px 9px;
  background: #e7ece8;
  color: #31443a;
}
.wa-media-preview,
.wa-media-video {
  display: grid;
  gap: 5px;
  margin: -4px -6px 5px;
  background: transparent !important;
  color: inherit !important;
  text-align: left;
  padding: 0 !important;
}
.wa-media-preview img,
.wa-media-video video {
  display: block;
  width: min(320px, 100%);
  max-height: 290px;
  object-fit: cover;
  border-radius: 7px;
  background: #d9dedb;
}
.wa-media-preview span,
.wa-media-video button {
  padding: 0 4px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-document {
  display: flex !important;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px !important;
  background: #ffffff80 !important;
  color: #263a30 !important;
  border-radius: 7px !important;
  text-align: left;
}
.incoming .wa-document {
  background: #f2f4f2 !important;
}
.wa-document > b {
  font-size: 24px;
}
.wa-document span {
  display: grid;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-document small {
  color: #6d7772;
}
.wa-document i {
  margin-left: auto;
}
.crm-message audio {
  max-width: 300px;
}
.media-unavailable [data-crm-media] {
  min-height: 60px;
}
.media-unavailable:after {
  content: "Mídia indisponível";
  display: block;
  padding: 5px;
  color: #9a4c4c;
  font-size: 11px;
}
.inbox-toasts {
  position: fixed;
  z-index: 9999;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
}
.inbox-toast {
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #173f34;
  color: #fff;
  box-shadow: 0 8px 28px #0003;
  animation: toast-in 0.18s ease-out;
}
.inbox-toast.error {
  background: #9f3434;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@media (max-width: 720px) {
  .layout > aside {
    display: none;
  }
  .workspace {
    padding: 0;
    overflow: hidden;
  }
  .topbar {
    display: none;
  }
  .whatsapp-crm {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }
  .wa-list {
    display: flex;
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }
  .wa-conversation {
    display: none !important;
  }
  .wa-conversation.active {
    display: flex !important;
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 0;
    z-index: 5;
  }
  .wa-context {
    display: none !important;
  }
  .whatsapp-crm.mobile-context-open .wa-context {
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 7;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 20px;
    overflow: auto;
    background: #fff;
  }
  .wa-messages .crm-message {
    max-width: 84%;
  }
  .wa-mobile-context-close {
    display: block;
    width: 100%;
    margin: 0 0 14px;
  }
}
.mobile-inbox-nav {
  display: none;
}
@media (max-width: 720px) {
  .mobile-inbox-nav {
    display: flex;
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 20;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    background: #174e40;
    color: #fff;
    box-shadow: 0 7px 20px #0003;
    font-weight: 800;
  }
  .mobile-inbox-nav:hover {
    background: #174e40;
    color: #fff;
  }
}
.wa-mobile-back {
  display: none;
  background: transparent !important;
  color: #35463d !important;
  font-size: 30px !important;
  padding: 0 6px !important;
}
@media (max-width: 720px) {
  .wa-mobile-back {
    display: block;
  }
}
.wa-filter-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  flex: none;
}
.wa-filter-scroll::-webkit-scrollbar {
  display: none;
}
.wa-filter-scroll button {
  white-space: nowrap;
  flex: none;
}
.wa-threads .crm-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
}
.wa-threads .crm-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.wa-threads .crm-row-main b,
.wa-threads .crm-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wa-threads .crm-row-main small {
  color: #6d7772;
  font-weight: 400;
}
.crm-row-summary {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
}
.crm-row-summary time {
  font-size: 11px;
  color: #78837e;
}
.crm-row.unread .crm-row-summary time {
  color: #159552;
}
.wa-list-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  height: 180px;
  color: #6d7772;
  text-align: center;
}
.wa-list-empty small {
  font-size: 12px;
}
.wa-threads.loading {
  opacity: 0.55;
  pointer-events: none;
}
.whatsapp-crm.context-hidden {
  grid-template-columns: 360px minmax(0, 1fr) 0;
}
.whatsapp-crm.context-hidden .wa-context {
  display: none;
}
.wa-archive {
  width: 100%;
  margin-bottom: 12px;
}
.crm-message[hidden] {
  display: none !important;
}
.wa-linked-deal {
  display: flex;
  width: 100%;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #e1e5e1;
  border-radius: 9px;
  background: #fff;
  color: #17221e;
  text-align: left;
  flex-direction: column;
  gap: 2px;
}
.wa-linked-deal span {
  font-weight: 700;
}
.wa-linked-deal small {
  color: #6d7772;
}
.wa-linked-deal:hover {
  border-color: #9fcdae;
  background: #f8fcf8;
}
.wa-retry {
  margin-top: 7px;
  padding: 4px 8px !important;
  border: 1px solid #bf6262 !important;
  background: #fff4f4 !important;
  color: #a13838 !important;
  font-size: 11px !important;
}
.wa-new-messages {
  position: sticky;
  bottom: 8px;
  align-self: center;
  margin-top: auto;
  padding: 7px 12px !important;
  border-radius: 16px !important;
  background: #174e40 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px #0003;
  font-size: 11px !important;
}
/* Em notebooks estreitos, o chat é a área de trabalho principal. A navegação
   não pode esmagar a conversa; o CRM abre no botão de detalhes. */
@media (max-width: 1050px) and (min-width: 721px) {
  .whatsapp-crm {
    position: relative;
  }
  .whatsapp-crm.mobile-context-open .wa-context {
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 12;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 24px;
    overflow: auto;
    background: #fff;
  }
  .wa-mobile-context-close {
    display: block;
    width: 100%;
    margin: 0 0 14px;
  }
}
@media (max-width: 900px) {
  .product-layout:has(.whatsapp-crm) {
    display: block;
  }
  .product-layout:has(.whatsapp-crm) > aside {
    display: none;
  }
  .product-layout:has(.whatsapp-crm) .workspace {
    max-width: none;
    padding: 0;
    overflow: hidden;
  }
  .product-layout:has(.whatsapp-crm) .topbar {
    display: none;
  }
  .product-layout:has(.whatsapp-crm) .whatsapp-crm {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
}
.campaign-v2 {
  max-width: 1100px;
}
.campaign-v2 h1 {
  margin-top: 12px;
}
.block-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}
.content-block {
  border: 1px solid #e1e5e1;
  border-radius: 12px;
  background: #fff;
  padding: 13px;
  margin: 0 0 10px;
}
.content-block header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.content-block textarea {
  min-height: 92px;
}
.media-block {
  display: grid;
  gap: 8px;
  padding: 9px;
  background: #f3f6f3;
  border-radius: 8px;
}
.campaign-preview {
  border: 1px solid #e1e5e1;
  border-radius: 12px;
  padding: 12px;
  background: #f3f0ea;
  min-height: 420px;
}
.campaign-preview > #v2Preview {
  margin-top: 10px;
}
.campaign-preview-phone {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  min-height: 365px;
  overflow: hidden;
  border: 1px solid #ddd8cf;
  border-radius: 10px;
  background: #efeae2;
}
.campaign-preview-phone > header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: #f8f9f7;
  border-bottom: 1px solid #e1e5e1;
}
.campaign-preview-phone header div,
.campaign-preview-media span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.campaign-preview-phone header b,
.campaign-preview-media b { font-size: 12px; }
.campaign-preview-phone header small,
.campaign-preview-media small { color: #6d7772; font-size: 10px; }
.campaign-preview-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #d9f5d4;
  color: #174e40;
  font-weight: 800;
}
.campaign-preview-chat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  background-color: #efeae2;
  background-image: radial-gradient(#d9d2c7 1px, transparent 1px);
  background-size: 14px 14px;
  overflow: auto;
}
.campaign-preview-day {
  align-self: center;
  padding: 4px 8px;
  border-radius: 7px;
  background: #fff;
  color: #69736d;
  font-size: 10px;
  box-shadow: 0 1px 2px #0001;
}
.campaign-preview-bubble {
  width: fit-content;
  max-width: 94%;
  margin-left: auto;
  padding: 9px 10px 5px;
  border-radius: 8px 0 8px 8px;
  background: #d9fdd3;
  color: #17221e;
  font-size: 12px;
  line-height: 1.42;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px #0001;
}
.campaign-preview-bubble > small {
  display: block;
  margin-top: 4px;
  color: #5b7569;
  font-size: 9px;
  text-align: right;
}
.campaign-preview-media > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.campaign-preview-media i {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: #174e40;
  font-style: normal;
  font-weight: 800;
}
.campaign-preview-empty {
  align-self: center;
  width: 100%;
  margin: auto 0;
  color: #6d7772;
  font-size: 12px;
  text-align: center;
}
.campaign-preview-phone > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #f8f9f7;
  color: #86908a;
  font-size: 11px;
}
.campaign-preview-phone > footer b {
  color: #178a5e;
  font-size: 16px;
}
.campaign-v2-list {
  display: grid;
  gap: 10px;
}
.campaign-v2-list article {
  display: grid;
  grid-template-columns: minmax(200px, 1.3fr) minmax(100px, 0.7fr) auto minmax(
      150px,
      0.8fr
    ) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e1e5e1;
  border-radius: 12px;
  background: #fff;
}
.campaign-v2-list b,
.campaign-v2-list small {
  display: block;
}
.campaign-v2-list small {
  color: #6d7772;
}
.campaign-tabs {
  display: flex;
  gap: 7px;
  margin: 0 0 15px;
  overflow: auto;
}
.campaign-tabs button {
  white-space: nowrap;
  background: #fff;
  color: #174e40;
  border: 1px solid #e1e5e1;
}
.campaign-tabs button.selected {
  background: #174e40;
  color: #fff;
}
.review-blocks {
  margin: 14px 0;
  border: 1px solid #e1e5e1;
  border-radius: 10px;
  padding: 10px;
}
.review-blocks p {
  margin: 7px 0;
}
@media (max-width: 800px) {
  .block-editor {
    grid-template-columns: 1fr;
  }
  .campaign-v2-list article {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .campaign-v2-list .progress {
    width: 100%;
  }
}
.opportunity-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.opportunity-head h1 {
  margin: 3px 0;
}
.opportunity-head p {
  margin: 5px 0 0;
  color: #6d7772;
}
.opportunity-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.opportunity-filters input,
.opportunity-filters select {
  min-height: 40px;
  background: #fff;
  border: 1px solid #e1e5e1;
  border-radius: 9px;
  padding: 0 11px;
}
.professional-kanban {
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 10px;
}
.professional-kanban .deal-column {
  min-width: 260px;
  background: #f1f4ef;
  border: 1px solid #e1e5e1;
  border-radius: 12px;
}
.professional-kanban .deal-column > header {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px;
  background: #fff;
  border-radius: 12px 12px 0 0;
}
.professional-kanban .deal-column > header div {
  display: grid;
  gap: 2px;
  flex: 1;
}
.professional-kanban .deal-column > header small {
  color: #6d7772;
}
.professional-kanban .deal-column > header strong {
  font-size: 12px;
  color: #174e40;
}
.professional-kanban .deal-cards {
  min-height: 160px;
  padding: 8px;
}
.deal-card.compact {
  display: grid;
  gap: 6px;
  padding: 12px;
  margin: 0 0 8px;
  border: 1px solid #e1e5e1;
  background: #fff;
  cursor: grab;
}
.deal-card.compact:hover {
  border-color: #80b594;
  box-shadow: 0 3px 10px #133f3412;
}
.deal-card.compact small,
.deal-card.compact em {
  font-size: 12px;
  font-style: normal;
  color: #6d7772;
}
.deal-card.compact em {
  border-top: 1px solid #edf0ec;
  padding-top: 7px;
}
.deal-card.compact em.late {
  color: #a43c37;
  font-weight: 700;
}
.deal-column.drag-over {
  outline: 2px solid #174e40;
  outline-offset: 2px;
}
.crm-modal {
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: #17221e66;
  display: flex;
  justify-content: flex-end;
}
.crm-modal > section {
  width: min(560px, 100vw);
  height: 100%;
  overflow: auto;
  background: #f7f7f3;
  padding: 28px;
  box-shadow: -12px 0 36px #0002;
}
.crm-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.crm-modal h2 {
  margin: 3px 0;
}
.crm-modal label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.crm-modal input,
.crm-modal select,
.crm-modal textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px;
  border: 1px solid #e1e5e1;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}
.crm-modal textarea {
  min-height: 100px;
}
.crm-modal details {
  margin-top: 16px;
}
.crm-modal summary {
  cursor: pointer;
  font-weight: 700;
  color: #174e40;
}
.crm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.crm-form-grid .wide {
  grid-column: 1/-1;
}
.crm-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}
.drawer-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  background: #e8f1e8;
  border-radius: 9px;
  margin-bottom: 14px;
}
.drawer-summary span {
  color: #51605a;
  font-size: 13px;
}
.next-action {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e1e5e1;
  border-radius: 10px;
  background: #fff;
}
.next-action p {
  margin: 7px 0 12px;
}
.compact-lead-card {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #dce8df;
  border-radius: 14px;
  background: #fff;
}
.compact-lead-card .section-head {
  align-items: center;
  margin-bottom: 12px;
}
.compact-lead-card h3 {
  margin: 3px 0 0;
  color: #153c2c;
  font-size: 18px;
}
.compact-lead-card .sales-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.compact-lead-card .sales-mini-grid p {
  margin: 0;
  min-width: 0;
}
.compact-lead-card .sales-mini-grid b,
.compact-lead-card .lead-approach strong,
.prospecting-details p b {
  display: block;
  margin-bottom: 3px;
  color: #60786b;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.compact-lead-card .sales-mini-grid span,
.compact-lead-card .sales-mini-grid a {
  display: block;
  overflow: hidden;
  color: #1d362a;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lead-approach {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 10px;
  background: #f1f7f2;
}
.lead-approach > b {
  color: #174e40;
  font-size: 12px;
}
.lead-approach p,
.prospecting-details p {
  margin: 0;
  color: #405c4d;
  font-size: 13px;
  line-height: 1.45;
}
.prospecting-details {
  margin: 13px 0 0 !important;
  padding: 11px 0 0;
  border-top: 1px solid #e7eee9;
}
.prospecting-details > div {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}
.drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.danger {
  background: #a33 !important;
  color: #fff !important;
}
.crm-toast {
  position: fixed;
  z-index: 1100;
  right: 20px;
  bottom: 20px;
  transform: translateY(90px);
  opacity: 0;
  background: #174e40;
  color: #fff;
  padding: 12px 16px;
  border-radius: 9px;
  transition: 0.2s;
  box-shadow: 0 6px 20px #0003;
}
.crm-toast.show {
  transform: translateY(0);
  opacity: 1;
}
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.task-section {
  background: #fff;
  border: 1px solid #e1e5e1;
  border-radius: 12px;
  padding: 14px;
}
.task-section h2 {
  font-size: 16px;
  margin: 0 0 10px;
}
.task-section h2 small {
  color: #6d7772;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid #edf0ec;
}
.task-row > div {
  display: grid;
  gap: 3px;
  flex: 1;
}
.task-row small {
  color: #6d7772;
}
.task-row.overdue span {
  font-size: 12px;
  color: #a33;
  font-weight: 700;
}
.compact-summary {
  grid-template-columns: repeat(3, 1fr);
}
.compact-summary article {
  padding: 12px;
}
.compact-summary small,
.compact-summary span {
  color: #6d7772;
}
.compact-summary b {
  display: block;
  margin: 4px 0;
}
.contact-tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin: 18px 0;
}
.contact-tabs button {
  white-space: nowrap;
  background: #fff;
  color: #174e40;
  border: 1px solid #e1e5e1;
}
.contact-tabs button.selected {
  background: #174e40;
  color: #fff;
}
.clickable {
  cursor: pointer;
}
.timeline-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid #edf0ec;
}
.timeline-row small {
  color: #6d7772;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .opportunity-head {
    align-items: stretch;
    flex-direction: column;
  }
  .opportunity-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .opportunity-filters input {
    grid-column: 1/-1;
  }
  .tasks-grid,
  .crm-form-grid,
  .compact-summary {
    grid-template-columns: 1fr;
  }
  .crm-modal > section {
    padding: 20px;
  }
  .professional-kanban {
    margin-inline: -10px;
    padding-inline: 10px;
  }
  .drawer-summary {
    flex-direction: column;
  }
  .compact-lead-card .sales-mini-grid {
    grid-template-columns: 1fr;
  }
  .task-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .task-row .secondary {
    margin-left: 36px;
  }
}

/* Sistema visual unificado: contraste alto, superfícies legíveis e modais em card. */
:root {
  --ink: #16251f;
  --forest: #145a42;
  --paper: #ffffff;
  --cream: #f5f7f4;
  --line: #d8e1da;
  --muted: #52675c;
  --lime: #b8f35a;
}
body {
  background: var(--cream);
  color: var(--ink);
}
.workspace {
  max-width: 1440px;
}
.topbar b,
.page-title p,
.section-head p,
.muted {
  color: var(--muted) !important;
}
.data-card,
.card,
.metrics > div,
.campaign-card,
.empty,
.company-create,
.deal-create,
.activity-create {
  box-shadow: 0 8px 24px rgba(18, 54, 39, 0.06);
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #8bd4b1;
  outline-offset: 2px;
}
.secondary {
  border: 1px solid #d9e5dd !important;
}
.table th {
  color: #365447;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.table td {
  color: #1d3128;
}
.company-detail-grid .data-card,
.contact-360-grid .data-card {
  min-height: 180px;
}
.company-detail-grid p {
  color: #344c40;
}
.company-item small {
  color: #52675c;
}
.app-modal {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 29, 21, 0.55);
  backdrop-filter: blur(4px);
}
.app-modal > section {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border: 1px solid #d8e5dd;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 28px 80px rgba(10, 32, 23, 0.32);
  animation: app-card-in 0.18s ease-out;
}
.app-modal header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5ece7;
}
.app-modal h2 {
  margin: 5px 0 4px;
  font:
    600 27px "Playfair Display",
    serif;
  color: #173c2d;
}
.app-modal header p {
  margin: 0;
  color: #587064;
  line-height: 1.45;
}
.app-modal .icon-btn {
  flex: none;
  border: 1px solid #dbe6df;
  background: #f4f7f4;
  color: #274b3b;
  font-size: 22px;
  line-height: 1;
}
.app-modal-body {
  padding: 22px 0 2px;
}
.app-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  margin-top: 18px;
  border-top: 1px solid #e5ece7;
}
.app-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.app-form-grid label,
.app-modal label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 12px;
  color: #365447;
}
.app-form-grid .wide {
  grid-column: 1/-1;
}
.app-modal input,
.app-modal select,
.app-modal textarea {
  margin: 0;
  border-color: #cbd9d0;
  background: #fbfcfb;
  color: #183127;
}
.app-modal input:focus,
.app-modal select:focus,
.app-modal textarea:focus {
  border-color: #1c8964;
  box-shadow: 0 0 0 3px #bdebd8;
  outline: 0;
}
.app-toasts {
  position: fixed;
  z-index: 3100;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 9px;
}
.app-toast {
  max-width: 360px;
  padding: 13px 16px;
  background: #174e3b;
  color: #fff;
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(9, 34, 23, 0.22);
  font-weight: 600;
}
.app-toast.error {
  background: #aa3d36;
}
@keyframes app-card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 640px) {
  .app-modal {
    padding: 12px;
    align-items: end;
  }
  .app-modal > section {
    border-radius: 18px 18px 12px 12px;
    max-height: calc(100vh - 24px);
    padding: 21px;
  }
  .app-form-grid {
    grid-template-columns: 1fr;
  }
  .app-form-grid .wide {
    grid-column: auto;
  }
  .app-modal footer {
    flex-direction: column-reverse;
  }
  .app-modal footer button {
    width: 100%;
  }
}

/* Não há tipografia editorial na operação: CRM, tabelas e drawers usam a
   mesma sans-serif do produto para leitura rápida durante o atendimento. */
.activity-layout h2,
.company-detail-grid h2,
.contact-360-grid h2,
.settings-split h2,
.deal-detail-grid h2,
.app-modal h2 {
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif !important;
  font-weight: 700 !important;
}
