/* CRM do Consultor — integrado ao simulador Meireles Capital. */
:root {
  --crm-navy: #061d3b;
  --crm-navy-2: #0a2d57;
  --crm-cream: #f3f1ec;
  --crm-card: #fff;
  --crm-line: #ddd9cf;
  --crm-ink: #071c35;
  --crm-muted: #627287;
  --crm-gold: #b68a3c;
  --crm-red: #b23b2a;
  --crm-green: #25785d;
  --crm-sidebar: 300px;
}

body.consultor-shell-active { background: var(--crm-cream); }
body.consultor-shell-active .app-header {
  padding: 0 24px;
  background: #0c1c2f;
  border-bottom-color: rgba(185, 147, 70, .42);
  box-shadow: 0 8px 26px rgba(4, 20, 39, .12);
}
body.consultor-shell-active .brand-mark { width: 42px; height: 42px; border-radius: 8px; }
body.consultor-shell-active .brand-copy strong { font-size: .82rem; }
body.consultor-shell-active .brand-copy small { font-size: .55rem; }
body.consultor-shell-active .ghost-button { border-radius: 6px; }
body.consultor-shell-active #simulatorView {
  width: calc(100% - var(--crm-sidebar));
  margin-left: var(--crm-sidebar);
}
body.crm-page-open #simulatorView { display: none !important; }
body.crm-page-open #simulatorZoomControl { display: none !important; }

.crm-sidebar {
  position: fixed;
  z-index: 74;
  inset: 74px auto 0 0;
  width: var(--crm-sidebar);
  min-height: calc(100vh - 74px);
  padding: 23px 10px 14px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #062142;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.crm-sidebar[hidden] { display: none !important; }
.crm-sidebar-label {
  margin: 0 10px 9px;
  color: #8fb0d3;
  font-size: .67rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.crm-sidebar-label.crm-area-label { margin-top: 10px; }
.crm-sidebar-label svg { width: 12px; height: 12px; margin-left: 4px; color: #d3ad55; vertical-align: -2px; }
.crm-nav { display: grid; gap: 3px; }
.crm-nav-button,
.crm-sidebar-action {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: .89rem;
  font-weight: 500;
  text-align: left;
  transition: background .16s, color .16s;
}
.crm-nav-button svg,
.crm-sidebar-action svg { width: 19px; height: 19px; flex: 0 0 auto; color: #b9cade; stroke-width: 1.65; }
.crm-nav-button:hover,
.crm-nav-button:focus-visible,
.crm-sidebar-action:hover,
.crm-sidebar-action:focus-visible { background: rgba(255, 255, 255, .09); outline: none; }
.crm-nav-button.is-active { background: rgba(255, 255, 255, .14); font-weight: 700; }
.crm-nav-button.is-active svg { color: #fff; }
.crm-simulator-picker {
  min-height: 0;
  margin-top: 18px;
  padding-top: 15px;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, .1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.crm-simulator-picker[hidden] { display: none !important; }
.crm-simulator-picker-head {
  margin: 0 10px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.crm-simulator-picker-head span {
  color: #dce7f2;
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.crm-simulator-picker-head small { color: #86a5c5; font-size: .57rem; white-space: nowrap; }
.crm-simulator-list { display: grid; gap: 6px; }
.crm-simulator-choice {
  position: relative;
  width: 100%;
  min-height: 61px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #fff;
  border: 1px solid rgba(211, 173, 85, .46);
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition: background .16s, border-color .16s, transform .16s, box-shadow .16s;
}
.crm-simulator-choice:hover,
.crm-simulator-choice:focus-visible {
  border-color: rgba(232, 205, 142, .9);
  background: rgba(255,255,255,.08);
  outline: none;
  transform: translateX(2px);
}
.crm-simulator-choice.is-active {
  border-color: #d3ad55;
  background: linear-gradient(105deg, rgba(255,255,255,.15), rgba(255,255,255,.08));
  box-shadow: inset 3px 0 0 #d3ad55, 0 8px 20px rgba(0,0,0,.12);
}
.crm-simulator-choice > svg { width: 21px; height: 21px; color: #d9bd76; stroke-width: 1.7; }
.crm-simulator-choice.is-active > svg { color: #f1d993; }
.crm-simulator-copy { min-width: 0; display: grid; gap: 3px; }
.crm-simulator-copy strong { font-size: .78rem; font-weight: 700; line-height: 1.2; }
.crm-simulator-copy small { color: #a9bdd2; font-size: .61rem; font-weight: 450; line-height: 1.3; }
.crm-simulator-choice.is-active .crm-simulator-copy small { color: #d7e2ed; }
.crm-simulator-choice.is-active::after {
  content: "Em uso";
  position: absolute;
  top: 5px;
  right: 7px;
  color: #e8cd8e;
  font-size: .48rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.crm-simulator-choice.is-active .crm-simulator-copy strong { padding-right: 38px; }
body.crm-page-open .crm-simulator-picker { display: none; }
body.consultor-shell-active:not(.crm-page-open) .crm-protected-menu,
body.consultor-shell-active:not(.crm-page-open) #crmLockButton { display: none !important; }
.crm-sidebar-bottom {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: grid;
  gap: 3px;
}
.crm-protected-menu[hidden] { display: none !important; }
.crm-sidebar.is-collapsed { width: 72px; }
.crm-sidebar.is-collapsed .crm-sidebar-label,
.crm-sidebar.is-collapsed .crm-nav-button span,
.crm-sidebar.is-collapsed .crm-sidebar-action span { display: none; }
.crm-sidebar.is-collapsed .crm-nav-button,
.crm-sidebar.is-collapsed .crm-sidebar-action { justify-content: center; padding-inline: 8px; }
.crm-sidebar.is-collapsed .crm-simulator-picker { margin-top: 10px; padding-top: 10px; }
.crm-sidebar.is-collapsed .crm-simulator-picker-head,
.crm-sidebar.is-collapsed .crm-simulator-copy { display: none; }
.crm-sidebar.is-collapsed .crm-simulator-choice { min-height: 44px; padding: 5px; grid-template-columns: 1fr; }
.crm-sidebar.is-collapsed .crm-simulator-choice::after { display: none; }
.crm-sidebar.is-collapsed .crm-simulator-choice > svg { margin: auto; }
.crm-sidebar.is-collapsed + .crm-consultor-root { padding-left: 106px; }
body.consultor-sidebar-collapsed #simulatorView { width: calc(100% - 72px); margin-left: 72px; }

.crm-consultor-root {
  min-height: 100vh;
  padding: 103px 32px 60px calc(var(--crm-sidebar) + 40px);
  color: var(--crm-ink);
  background: var(--crm-cream);
  font-family: "Avenir Next", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.crm-consultor-root[hidden] { display: none !important; }
.crm-page { width: min(1120px, 100%); margin: 0 auto; }
.crm-page-head {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.crm-eyebrow {
  margin: 0 0 5px;
  color: #9a6d24;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.crm-page-head h1 { margin: 0; font-size: 2rem; line-height: 1.08; letter-spacing: -.045em; }
.crm-page-head p:not(.crm-eyebrow) { margin: 7px 0 0; color: var(--crm-muted); font-size: .82rem; }
.crm-page-actions { display: flex; align-items: center; gap: 9px; }
.crm-button {
  min-height: 38px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--crm-navy);
  border: 1px solid #d8d4ca;
  border-radius: 7px;
  background: #fff;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.crm-button:hover,
.crm-button:focus-visible { border-color: #9dafc1; box-shadow: 0 0 0 3px rgba(6, 29, 59, .06); outline: none; }
.crm-button.primary { color: #fff; border-color: var(--crm-navy); background: var(--crm-navy); }
.crm-button.gold { color: #5e4314; border-color: #cda952; background: #fffdf7; }
.crm-button.danger { color: #a43628; border-color: #e2bbb5; background: #fff9f7; }
.crm-button.compact { min-height: 32px; padding: 6px 10px; font-size: .7rem; }
.crm-button.icon-only { width: 36px; padding: 0; }
.crm-card {
  border: 1px solid var(--crm-line);
  border-radius: 12px;
  background: var(--crm-card);
  box-shadow: 0 8px 26px rgba(8, 27, 50, .035);
}

.crm-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.crm-kpi {
  min-height: 108px;
  padding: 17px 18px;
  border: 1px solid var(--crm-line);
  border-radius: 11px;
  background: #fff;
}
.crm-kpi span { display: block; color: #637185; font-size: .58rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.crm-kpi strong { display: block; margin-top: 10px; color: var(--crm-navy); font-size: 1.33rem; line-height: 1; }
.crm-kpi small { display: block; margin-top: 10px; color: #758296; font-size: .65rem; line-height: 1.35; }
.crm-kpi small.is-alert { color: var(--crm-red); font-weight: 700; }
.crm-kpi.is-featured { color: #fff; border-color: var(--crm-navy); background: var(--crm-navy); }
.crm-kpi.is-featured span,
.crm-kpi.is-featured small { color: #c8d4e1; }
.crm-kpi.is-featured strong { color: #f0c767; }

.crm-followups-card { margin-top: 20px; padding: 17px 18px 12px; }
.crm-section-title { margin: 0 0 10px; font-size: .9rem; }
.crm-list-row {
  min-height: 55px;
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e9e5dd;
}
.crm-list-row:last-child { border-bottom: 0; }
.crm-list-main { min-width: 0; }
.crm-list-main strong { display: block; font-size: .75rem; }
.crm-list-main small { display: block; margin-top: 3px; color: #65768a; font-size: .65rem; line-height: 1.35; }
.crm-list-main small b { color: #9a660d; }
.crm-list-main small .overdue { color: var(--crm-red); font-weight: 700; }
.crm-row-actions { display: flex; align-items: center; gap: 7px; }

.crm-toolbar { margin-bottom: 13px; display: grid; grid-template-columns: 1fr 180px; gap: 10px; }
.crm-input,
.crm-select,
.crm-textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--crm-ink);
  border: 1px solid #d4d0c7;
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: .76rem;
  outline: none;
}
.crm-input:focus,
.crm-select:focus,
.crm-textarea:focus { border-color: #7391ad; box-shadow: 0 0 0 3px rgba(11, 53, 92, .08); }
.crm-textarea { min-height: 102px; resize: vertical; line-height: 1.5; }
.crm-table-card { padding: 12px 20px 15px; overflow: hidden; }
.crm-table-scroll { overflow-x: auto; }
.crm-table { width: 100%; border-collapse: collapse; font-size: .7rem; }
.crm-table th { padding: 10px 7px; color: #718096; border-bottom: 1px solid #dcd8cf; font-size: .55rem; font-weight: 700; letter-spacing: .13em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.crm-table td { padding: 11px 7px; border-bottom: 1px solid #e8e4dc; vertical-align: middle; }
.crm-table tbody tr:last-child td { border-bottom: 0; }
.crm-table td strong { display: block; font-size: .71rem; }
.crm-table td small { display: block; margin-top: 2px; color: #718096; font-size: .6rem; }
.crm-stage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  color: #31516f;
  border-radius: 999px;
  background: #edf2f7;
  font-size: .61rem;
  white-space: nowrap;
}
.crm-stage-pill.negotiation { color: #8d6518; background: #fff6df; }
.crm-stage-pill.won { color: #216d52; background: #e9f6f0; }
.crm-stage-pill.lost { color: #9f392d; background: #faece9; }

.crm-funnel-card { padding: 22px 22px 18px; }
.crm-funnel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 30px; align-items: center; }
.crm-funnel-visual { display: grid; justify-items: center; gap: 3px; }
.crm-funnel-step {
  width: var(--step-width, 100%);
  min-height: 52px;
  padding: 8px 20px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 70px minmax(150px, 1fr);
  align-items: center;
  gap: 12px;
  color: #fff;
  background: var(--step-color, #082b56);
  clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%);
}
.crm-funnel-step:first-child { clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%); }
.crm-funnel-step span { font-size: .67rem; font-weight: 700; text-align: center; }
.crm-funnel-step strong { font-size: 1.6rem; text-align: center; }
.crm-funnel-step small { color: rgba(255,255,255,.9); font-size: .61rem; text-align: center; }
.crm-funnel-step.is-won { color: #19324b; background: #d0ac59; }
.crm-funnel-metrics { display: grid; gap: 18px; }
.crm-funnel-metric span { display: block; color: #718096; font-size: .58rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.crm-funnel-metric strong { display: block; margin-top: 5px; font-size: 1.4rem; }
.crm-funnel-metric small { display: block; margin-top: 3px; color: #748296; font-size: .63rem; line-height: 1.35; }
.crm-funnel-lost { padding: 8px 10px; color: #9f392d; border-radius: 7px; background: #f8e8e5; font-size: .65rem; text-align: center; }
.crm-kanban { margin-top: 16px; padding-bottom: 8px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 10px; overflow-x: auto; }
.crm-kanban-column { min-height: 285px; padding: 12px; border: 1px solid var(--crm-line); border-radius: 10px; background: #f8f6f1; }
.crm-kanban-head { margin-bottom: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.crm-kanban-head strong { font-size: .7rem; }
.crm-kanban-head span { color: #6c7889; font-size: .67rem; }
.crm-kanban-value { display: block; margin-top: -5px; margin-bottom: 8px; color: #66778b; font-size: .62rem; }
.crm-contact-tile { margin-bottom: 8px; padding: 11px; border: 1px solid #ddd8ce; border-radius: 9px; background: #fff; }
.crm-contact-tile strong { display: block; font-size: .7rem; }
.crm-contact-tile small { display: block; margin-top: 3px; color: #65768a; font-size: .62rem; line-height: 1.35; }
.crm-contact-tile .crm-select { min-height: 31px; margin-top: 8px; padding: 5px 7px; font-size: .64rem; }

.crm-agenda-card { padding: 6px 20px 14px; }
.crm-agenda-group-title { margin: 15px 0 4px; color: #67778a; font-size: .61rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.crm-agenda-group-title.overdue { color: var(--crm-red); }
.crm-agenda-row { min-height: 58px; padding: 9px 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid #e8e4dc; }
.crm-agenda-row:last-child { border-bottom: 0; }
.crm-agenda-actions { display: flex; align-items: center; gap: 6px; }
.crm-agenda-actions .crm-input { width: 132px; min-height: 33px; padding: 6px 8px; font-size: .66rem; }

.crm-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.crm-template-card { min-height: 165px; padding: 16px 18px; display: flex; flex-direction: column; }
.crm-template-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crm-template-head h2 { margin: 0; font-size: .88rem; }
.crm-channel-pill { padding: 4px 8px; color: #41607d; border-radius: 999px; background: #edf2f6; font-size: .58rem; }
.crm-template-card pre { margin: 10px 0 14px; color: #263b52; font-family: inherit; font-size: .7rem; font-weight: 400; line-height: 1.5; white-space: pre-wrap; }
.crm-template-actions { margin-top: auto; display: flex; gap: 7px; }

.crm-commission-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.crm-commission-kpis .crm-kpi { min-height: 96px; padding: 14px; }
.crm-clickable-card { font: inherit; text-align: left; cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s, background .16s; }
.crm-clickable-card:hover,
.crm-clickable-card:focus-visible { border-color: #b99a55; box-shadow: 0 8px 20px rgba(7,28,53,.08); outline: none; transform: translateY(-2px); }
.crm-commission-rule-strip {
  width: 100%;
  min-height: 46px;
  margin-top: 13px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--crm-ink);
  border: 1px solid #ddc68e;
  border-radius: 10px;
  background: #fbf7ed;
  font: inherit;
  text-align: left;
}
.crm-commission-rule-strip:hover,
.crm-commission-rule-strip:focus-visible { border-color: #b68a3c; background: #fffaf0; outline: none; }
.crm-commission-rule-strip span { color: #8d6518; font-size: .59rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.crm-commission-rule-strip strong { font-size: .77rem; }
.crm-commission-rule-strip small { margin-left: auto; color: #6c7889; font-size: .62rem; }
.crm-chart-card { margin-top: 15px; padding: 17px 18px 14px; }
.crm-chart-title { display: flex; align-items: baseline; gap: 8px; }
.crm-chart-title h2 { margin: 0; font-size: .85rem; }
.crm-chart-title span { color: #728094; font-size: .61rem; }
.crm-bars {
  height: 148px;
  margin-top: 15px;
  padding: 10px 6px 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(45px, 1fr));
  align-items: end;
  gap: 9px;
  overflow-x: auto;
}
.crm-bar-item { height: 100%; min-width: 45px; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; color: inherit; border: 0; background: transparent; font: inherit; cursor: pointer; }
.crm-bar-item:hover .crm-bar,
.crm-bar-item:focus-visible .crm-bar { filter: brightness(1.32); transform: scaleX(1.08); }
.crm-bar-item:focus-visible { outline: 2px solid #c9a54f; outline-offset: 3px; }
.crm-bar-value { margin-bottom: 6px; color: #18334f; font-size: .86rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.crm-bar { width: 35px; min-height: 3px; border-radius: 3px 3px 0 0; background: var(--crm-navy); }
.crm-bar-item:first-child .crm-bar { background: #cfac5b; }
.crm-bar-label { margin-top: 7px; color: #52667c; font-size: .72rem; font-weight: 650; white-space: nowrap; }
.crm-flow-card { margin-top: 15px; padding: 17px 18px; }
.crm-flow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.crm-flow-head h2 { margin: 0; font-size: .87rem; }
.crm-flow-head p { margin: 4px 0 0; color: #6d7c8e; font-size: .65rem; }
.crm-segmented { display: inline-flex; padding: 3px; border-radius: 8px; background: #f2f0eb; }
.crm-segmented button { padding: 6px 10px; color: #6b788a; border-radius: 6px; background: transparent; font-size: .58rem; }
.crm-segmented button.is-active { color: var(--crm-navy); background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.crm-flow-summary { margin: 13px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.crm-mini-kpi { padding: 12px; border: 1px solid #ded9d0; border-radius: 9px; background: #fff; }
.crm-mini-kpi span { color: #718096; font-size: .55rem; letter-spacing: .11em; text-transform: uppercase; }
.crm-mini-kpi strong { display: block; margin-top: 7px; font-size: 1.08rem; }
.crm-mini-kpi small { display: block; margin-top: 4px; color: #748296; font-size: .58rem; }
.crm-rule-note { margin: 10px 2px 0; color: #728094; font-size: .61rem; line-height: 1.45; }
.crm-clickable-row { cursor: pointer; transition: background .14s; }
.crm-clickable-row:hover,
.crm-clickable-row:focus-visible { background: #f4f7fa; outline: none; }
.crm-clickable-row.is-current { background: #fbf5e7; }
.crm-commission-table td:nth-child(5) strong { color: var(--crm-navy); font-size: .77rem; }

.crm-settings-grid { display: grid; gap: 14px; }
.crm-settings-card { padding: 17px 20px; }
.crm-settings-card h2 { margin: 0; font-size: .82rem; }
.crm-settings-card p { margin: 9px 0 0; color: #6d7c8e; font-size: .65rem; line-height: 1.5; }
.crm-inline-form { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.crm-inline-form .crm-input { width: 82px; }
.crm-empty {
  min-height: 220px;
  padding: 34px 20px;
  display: grid;
  place-items: center;
  color: #718096;
  text-align: center;
}
.crm-empty svg { width: 34px; height: 34px; margin: 0 auto 10px; color: #9cabb9; }
.crm-empty strong { display: block; color: #33485f; font-size: .82rem; }
.crm-empty p { max-width: 380px; margin: 7px auto 14px; font-size: .69rem; line-height: 1.5; }

.crm-modal {
  position: fixed;
  z-index: 12000;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(3, 19, 41, .68);
  backdrop-filter: blur(7px);
}
.crm-modal[hidden] { display: none !important; }
.crm-dialog {
  width: min(640px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  color: var(--crm-ink);
  border: 1px solid rgba(182, 138, 60, .45);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(3, 19, 41, .34);
}
.crm-dialog.small { width: min(430px, 100%); }
.crm-dialog-head { padding: 20px 22px 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e7e2d9; }
.crm-dialog-head h2 { margin: 0; font-size: 1.18rem; }
.crm-dialog-head p { margin: 5px 0 0; color: #68788c; font-size: .7rem; }
.crm-dialog-close { width: 34px; height: 34px; display: grid; place-items: center; color: #41546b; border: 1px solid #d7d4cc; border-radius: 50%; background: #fff; font-size: 1.25rem; }
.crm-dialog-body { padding: 18px 22px 22px; }
.crm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.crm-form-grid .full { grid-column: 1 / -1; }
.crm-field { display: grid; gap: 6px; }
.crm-field > span { color: #43566c; font-size: .67rem; font-weight: 700; }
.crm-field > span small { color: #7b899a; font-weight: 400; }
.crm-dialog-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }
.crm-dialog.commission-wide { width: min(900px, 100%); }
.crm-dialog.crm-promo-wide { width: min(880px, 100%); }
.crm-promo-body { display: grid; grid-template-columns: minmax(0, .82fr) minmax(360px, 1.18fr); gap: 18px 22px; align-items: center; }
.crm-promo-copy { align-self: start; }
.crm-promo-kicker { color: #9a6c18; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.crm-promo-copy h3 { margin: 7px 0 0; color: var(--crm-navy); font-size: 1.45rem; line-height: 1.08; }
.crm-promo-copy p { margin: 12px 0 0; color: #52667b; font-size: .82rem; line-height: 1.62; }
.crm-promo-carousel { position: relative; min-height: 244px; overflow: hidden; border: 1px solid #d8c59b; border-radius: 14px; background: #f4f6f8; box-shadow: 0 14px 34px rgba(5,29,58,.12); }
.crm-promo-slide { position: absolute; inset: 0; padding: 18px; opacity: 0; transform: translateX(24px); animation: crmPromoSlide 15s ease-in-out infinite; }
.crm-promo-slide:nth-child(2) { animation-delay: 5s; }
.crm-promo-slide:nth-child(3) { animation-delay: 10s; }
.crm-promo-slide header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.crm-promo-slide header span { color: var(--crm-navy); font-size: 1rem; font-weight: 800; }
.crm-promo-slide header small { color: #728094; font-size: .68rem; }
.crm-promo-kpis { margin-top: 17px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.crm-promo-kpis > span { min-height: 76px; padding: 11px; border: 1px solid #dfe3e7; border-radius: 9px; background: #fff; }
.crm-promo-kpis small { display: block; color: #718096; font-size: .6rem; }
.crm-promo-kpis strong { display: block; margin-top: 10px; color: var(--crm-navy); font-size: .95rem; }
.crm-promo-list { margin-top: 10px; padding: 13px; display: grid; grid-template-columns: 8px 1fr; gap: 3px 9px; border-radius: 9px; background: #fff; }
.crm-promo-list i { width: 8px; height: 8px; margin-top: 3px; grid-row: 1 / 3; border-radius: 50%; background: #c9a34e; }
.crm-promo-list b { color: var(--crm-navy); font-size: .75rem; }
.crm-promo-list small { color: #788697; font-size: .64rem; }
.crm-promo-funnel { margin: 18px auto 0; display: grid; justify-items: center; gap: 5px; }
.crm-promo-funnel span { height: 39px; display: grid; place-items: center; color: #fff; background: #0b2f59; font-size: .7rem; font-weight: 750; clip-path: polygon(7% 0, 93% 0, 84% 100%, 16% 100%); }
.crm-promo-funnel span:nth-child(1) { width: 100%; }
.crm-promo-funnel span:nth-child(2) { width: 82%; background: #164a7b; }
.crm-promo-funnel span:nth-child(3) { width: 65%; background: #28689b; }
.crm-promo-funnel span:nth-child(4) { width: 48%; color: #142841; background: #d3ad55; }
.crm-promo-bars { height: 95px; margin-top: 16px; padding: 0 7px; display: flex; align-items: end; justify-content: space-around; gap: 8px; border-bottom: 1px solid #d8dde3; }
.crm-promo-bars i { width: 11%; border-radius: 4px 4px 0 0; background: #0b2f59; }
.crm-promo-bars i:nth-child(1) { height: 34%; background: #d3ad55; }
.crm-promo-bars i:nth-child(2) { height: 52%; }
.crm-promo-bars i:nth-child(3) { height: 47%; }
.crm-promo-bars i:nth-child(4) { height: 71%; }
.crm-promo-bars i:nth-child(5) { height: 61%; }
.crm-promo-bars i:nth-child(6) { height: 86%; }
.crm-promo-price { grid-column: 1 / -1; padding: 13px 15px; display: grid; grid-template-columns: 1fr auto; gap: 3px 14px; align-items: center; border: 1px solid #e2d3ad; border-radius: 10px; background: #fbf7ec; }
.crm-promo-price > span { color: #8f681f; font-size: .67rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.crm-promo-price > strong { grid-row: 1 / 3; grid-column: 2; color: var(--crm-navy); font-size: 1.18rem; white-space: nowrap; }
.crm-promo-price > strong small { color: #6e7b8c; font-size: .65rem; font-weight: 600; }
.crm-promo-price p { margin: 0; color: #65768a; font-size: .68rem; line-height: 1.4; }
.crm-promo-actions { grid-column: 1 / -1; margin-top: 0; align-items: stretch; }
.crm-promo-actions .crm-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@keyframes crmPromoSlide { 0%, 30% { opacity: 1; transform: translateX(0); } 33% { opacity: 0; transform: translateX(-24px); } 34%, 100% { opacity: 0; transform: translateX(24px); } }
@media (prefers-reduced-motion: reduce) { .crm-promo-slide { animation: none; opacity: 0; transform: none; } .crm-promo-slide:first-child { opacity: 1; } }
.crm-payment-dialog-body { padding-top: 16px; }
.crm-payment-month-total {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #e4d7b6;
  border-radius: 11px;
  background: #fbf8f1;
}
.crm-payment-month-total > div:first-child > span { display: block; color: #826527; font-size: .6rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.crm-payment-month-total > div:first-child > strong { display: block; margin-top: 4px; font-size: 1.28rem; }
.crm-payment-month-total > div:first-child > small { display: block; margin-top: 5px; color: #68788c; font-size: .68rem; }
.crm-payment-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.crm-payment-counts span { padding: 6px 9px; display: inline-flex; align-items: center; gap: 6px; color: #526478; border: 1px solid #e1ded7; border-radius: 999px; background: #fff; font-size: .66rem; font-weight: 650; }
.crm-payment-counts i { width: 7px; height: 7px; border-radius: 50%; }
.crm-payment-list { margin-top: 14px; overflow: hidden; border: 1px solid #e1e4e8; border-radius: 11px; }
.crm-payment-row {
  min-height: 65px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: minmax(185px, 1fr) 72px 300px 105px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e8ebee;
  background: #fff;
  cursor: pointer;
}
.crm-payment-row:last-child { border-bottom: 0; }
.crm-payment-row:hover { background: #fafbfd; }
.crm-payment-client { min-width: 0; display: flex; align-items: center; gap: 10px; }
.crm-payment-client > i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #bdc8d3; }
.crm-payment-row.paid .crm-payment-client > i { background: #2caa76; }
.crm-payment-row.late .crm-payment-client > i { background: #d89820; }
.crm-payment-row.unpaid .crm-payment-client > i { background: #d65b4d; }
.crm-payment-row.canceled .crm-payment-client > i { background: #8797a9; }
.crm-payment-row.overdue .crm-payment-client > i { background: #c34a3d; }
.crm-payment-client strong { display: block; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.crm-payment-client small { display: block; margin-top: 3px; color: #6f8093; font-size: .69rem; line-height: 1.25; }
.crm-payment-row.overdue .crm-payment-client small,
.crm-payment-row.unpaid .crm-payment-client small { color: #b64034; }
.crm-payment-day { display: flex; align-items: center; gap: 6px; color: #69798c; font-size: .66rem; }
.crm-payment-day input { width: 46px; height: 32px; padding: 5px; color: var(--crm-ink); border: 1px solid #d8dee5; border-radius: 7px; background: #fbfcfd; font: inherit; text-align: center; }
.crm-payment-status { padding: 3px; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 999px; background: #f2f4f6; }
.crm-payment-status button { min-height: 30px; padding: 5px 7px; color: #68788b; border-radius: 999px; background: transparent; font-size: .61rem; font-weight: 650; white-space: nowrap; }
.crm-payment-status button.is-active.paid { color: #267557; background: #e3f5ed; }
.crm-payment-status button.is-active.late { color: #9a650b; background: #fff0cf; }
.crm-payment-status button.is-active.unpaid { color: #a83d32; background: #fde7e4; }
.crm-payment-status button.is-active.canceled { color: #4e6074; background: #e5ebf0; }
.crm-payment-value { min-width: 0; padding: 0; color: var(--crm-navy); background: transparent; text-align: right; }
.crm-payment-value small { display: block; color: #8290a0; font-size: .58rem; }
.crm-payment-value strong { display: block; margin-top: 3px; font-size: .86rem; white-space: nowrap; }
.crm-payment-row.unpaid .crm-payment-value strong,
.crm-payment-row.canceled .crm-payment-value strong { color: #aab5c0; }
.crm-payment-row.carried { grid-template-columns: minmax(220px, 1fr) auto 120px; background: #fffaf0; }
.crm-payment-carried { padding: 6px 9px; color: #96640c; border-radius: 999px; background: #ffefc9; font-size: .65rem; font-weight: 700; }

.crm-client-commission-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.crm-client-commission-kpis article { padding: 12px; border: 1px solid #dedbd4; border-radius: 9px; background: #fff; }
.crm-client-commission-kpis span,
.crm-period-row small,
.crm-commission-client-card small { display: block; color: #728195; font-size: .58rem; letter-spacing: .04em; }
.crm-client-commission-kpis strong { display: block; margin-top: 7px; font-size: .98rem; }
.crm-client-commission-kpis small { display: block; margin-top: 4px; color: #758398; font-size: .62rem; }
.crm-double-schedule { margin-top: 13px; display: grid; grid-template-columns: 1.05fr 1.2fr .8fr .95fr 1.25fr; gap: 7px; }
.crm-double-schedule > div { min-height: 84px; padding: 11px; border: 1px solid #e0ddd6; border-radius: 9px; background: #f9fafb; }
.crm-double-schedule > div.is-double { border-color: #d8ba70; background: #fff8e7; }
.crm-double-schedule span { display: block; color: #68798c; font-size: .62rem; font-weight: 700; }
.crm-double-schedule strong { display: block; margin-top: 7px; font-size: .75rem; line-height: 1.2; }
.crm-double-schedule .is-double strong { color: #8b6116; }
.crm-double-schedule small { display: block; margin-top: 4px; color: #7d8997; font-size: .6rem; }
.crm-client-commission-note { margin-top: 12px; padding: 12px 14px; display: grid; gap: 4px; border-left: 4px solid #c39a43; border-radius: 8px; background: #f8f4e9; }
.crm-client-commission-note strong { font-size: .76rem; }
.crm-client-commission-note span { color: #68788b; font-size: .67rem; }
.crm-commission-history-head { margin: 16px 0 7px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.crm-commission-history-head h3 { margin: 0; font-size: .82rem; }
.crm-commission-history-head span { color: #788697; font-size: .61rem; }
.crm-commission-history { overflow: hidden; border: 1px solid #e0e3e6; border-radius: 9px; }
.crm-commission-history-row { width: 100%; min-height: 48px; padding: 8px 12px; display: grid; grid-template-columns: 1fr 100px 110px; align-items: center; gap: 10px; color: var(--crm-ink); border-bottom: 1px solid #e9ebed; background: #fff; font: inherit; text-align: left; }
.crm-commission-history-row:last-child { border-bottom: 0; }
.crm-commission-history-row:hover { background: #f6f8fa; }
.crm-commission-history-row span strong { display: block; font-size: .72rem; }
.crm-commission-history-row span small { display: block; margin-top: 2px; color: #748397; font-size: .63rem; }
.crm-commission-history-row em { color: #66788c; font-size: .64rem; font-style: normal; }
.crm-commission-history-row b { font-size: .75rem; text-align: right; }
.crm-commission-history-row.is-double { box-shadow: inset 3px 0 0 #c69d45; }
.crm-commission-history-row.is-double span small { color: #966812; }
.crm-commission-history-row.unpaid b,
.crm-commission-history-row.canceled b { color: #a4afba; }

.crm-commission-client-list,
.crm-period-list { overflow: hidden; border: 1px solid #e0e3e6; border-radius: 10px; }
.crm-commission-client-card,
.crm-period-row { width: 100%; min-height: 62px; padding: 10px 13px; display: grid; align-items: center; gap: 12px; color: var(--crm-ink); border-bottom: 1px solid #e8eaed; background: #fff; font: inherit; text-align: left; }
.crm-commission-client-card { grid-template-columns: minmax(180px, 1.5fr) 1fr 1fr 15px; }
.crm-period-row { grid-template-columns: minmax(130px, 1.2fr) 1fr 1fr 1fr 15px; }
.crm-commission-client-card:last-child,
.crm-period-row:last-child { border-bottom: 0; }
.crm-commission-client-card:hover,
.crm-period-row:hover { background: #f6f8fa; }
.crm-commission-client-card strong,
.crm-period-row strong { display: block; font-size: .78rem; }
.crm-commission-client-card b,
.crm-period-row b { display: block; margin-top: 4px; font-size: .74rem; }
.crm-commission-client-card i,
.crm-period-row i { color: #9a6d24; font-size: 1.15rem; font-style: normal; text-align: right; }
.crm-commission-explanation { margin: 14px 2px 0; color: #4e6278; font-size: .72rem; line-height: 1.6; }
.crm-pin-dots { margin: 15px 0 4px; display: grid; grid-template-columns: repeat(4, 54px); justify-content: center; gap: 9px; }
.crm-pin-dots input { width: 54px; height: 58px; border: 1px solid #cfd5db; border-radius: 10px; background: #f9fafb; font-size: 1.35rem; font-weight: 700; text-align: center; outline: none; }
.crm-pin-dots input:focus { border-color: #54799c; box-shadow: 0 0 0 3px rgba(10, 45, 87, .1); }
.crm-pin-message { min-height: 20px; margin: 9px 0 0; color: var(--crm-red); font-size: .66rem; text-align: center; }
.crm-security-note { margin: 12px 0 0; color: #6f7f92; font-size: .62rem; line-height: 1.45; text-align: center; }
.crm-toast {
  position: fixed;
  z-index: 13000;
  right: 22px;
  bottom: 22px;
  max-width: 340px;
  padding: 12px 15px;
  color: #fff;
  border-radius: 9px;
  background: #0a294e;
  box-shadow: 0 14px 35px rgba(3, 19, 41, .25);
  font-size: .72rem;
}

@media (max-width: 1120px) {
  :root { --crm-sidebar: 264px; }
  .crm-kpi-grid,
  .crm-commission-kpis { grid-template-columns: repeat(3, 1fr); }
  .crm-funnel-layout { grid-template-columns: 1fr; }
  .crm-funnel-metrics { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  body.consultor-shell-active #simulatorView { width: 100%; margin-left: 0; }
  .crm-sidebar {
    inset: auto 0 0 0;
    width: 100%;
    min-height: 0;
    height: 68px;
    padding: 7px 8px;
    flex-direction: row;
    overflow-x: auto;
    border-top: 1px solid rgba(255,255,255,.12);
    border-right: 0;
  }
  .crm-sidebar-label,
  .crm-simulator-picker,
  #crmCollapseButton,
  .crm-sidebar-bottom::before { display: none; }
  .crm-nav { display: flex; flex: 1 0 auto; gap: 4px; }
  .crm-protected-menu { flex: 0 0 auto; }
  .crm-nav-button { width: 74px; min-height: 53px; padding: 5px; flex-direction: column; justify-content: center; gap: 4px; font-size: .56rem; text-align: center; }
  .crm-nav-button svg { width: 18px; height: 18px; }
  .crm-sidebar-bottom { margin: 0; padding: 0; display: flex; border: 0; }
  #crmLockButton { width: 74px; min-height: 53px; padding: 5px; flex-direction: column; justify-content: center; gap: 4px; font-size: .56rem; text-align: center; }
  .crm-consultor-root,
  .crm-sidebar.is-collapsed + .crm-consultor-root { padding: 96px 16px 92px; }
  .crm-page-head { align-items: flex-start; }
  .crm-kpi-grid,
  .crm-commission-kpis { grid-template-columns: repeat(2, 1fr); }
  .crm-template-grid { grid-template-columns: 1fr; }
  .crm-agenda-row { grid-template-columns: 1fr; }
  .crm-agenda-actions { flex-wrap: wrap; }
  .crm-funnel-step { grid-template-columns: 1fr 46px 1fr; padding-inline: 12px; }
  .crm-funnel-metrics,
  .crm-flow-summary { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (min-width: 861px) {
  body.consultor-shell-active:not(.crm-page-open) .strategy-tabs { display: none; }
  body.consultor-shell-active:not(.crm-page-open) .strategy-context { margin-top: 22px; }
}

@media (max-width: 600px) {
  body.consultor-shell-active .app-header { padding: 0 10px; }
  body.consultor-shell-active .brand-copy { display: none; }
  body.consultor-shell-active .consultant-name { display: none; }
  .crm-consultor-root { padding-top: 88px; }
  .crm-page-head { display: grid; gap: 13px; }
  .crm-page-head h1 { font-size: 1.65rem; }
  .crm-page-actions { width: 100%; }
  .crm-page-actions .crm-button { flex: 1; }
  .crm-kpi-grid,
  .crm-commission-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .crm-kpi { min-height: 97px; padding: 13px; }
  .crm-kpi strong { font-size: 1.05rem; }
  .crm-toolbar { grid-template-columns: 1fr; }
  .crm-table-card { padding-inline: 10px; }
  .crm-list-row { align-items: flex-start; flex-direction: column; }
  .crm-row-actions { width: 100%; }
  .crm-row-actions .crm-button { flex: 1; }
  .crm-funnel-card { padding: 14px 10px; }
  .crm-funnel-step { min-height: 48px; grid-template-columns: 1fr 40px 1fr; gap: 5px; padding: 7px 10px; }
  .crm-funnel-step strong { font-size: 1.2rem; }
  .crm-funnel-step small { font-size: .52rem; }
  .crm-form-grid { grid-template-columns: 1fr; }
  .crm-form-grid .full { grid-column: auto; }
  .crm-modal { padding: 10px; }
  .crm-dialog { max-height: calc(100vh - 20px); }
  .crm-dialog-head,
  .crm-dialog-body { padding-inline: 16px; }
  .crm-promo-body { grid-template-columns: 1fr; }
  .crm-promo-carousel { min-height: 238px; }
  .crm-promo-price { grid-template-columns: 1fr; }
  .crm-promo-price > strong { grid-row: auto; grid-column: auto; }
  .crm-promo-actions { flex-direction: column; }
  .crm-pin-dots { grid-template-columns: repeat(4, 48px); }
  .crm-pin-dots input { width: 48px; height: 54px; }
}

@media print {
  .crm-sidebar,
  .crm-consultor-root,
  .crm-modal,
  .crm-toast { display: none !important; }
  body.consultor-shell-active #simulatorView { width: 100%; margin-left: 0; }
}

/* Navegação móvel: duas entradas principais embaixo e áreas do CRM em uma faixa própria. */
@media screen and (max-width: 860px) {
  body.mobile-interface.consultor-shell-active #simulatorView {
    width: 100%;
    margin-left: 0;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }
  body.mobile-interface .crm-sidebar {
    z-index: 96;
    inset: auto 0 0;
    width: 100%;
    height: calc(72px + env(safe-area-inset-bottom));
    min-height: 0;
    padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow: visible;
    align-items: stretch;
    background: rgba(5, 29, 58, .98);
    box-shadow: 0 -8px 28px rgba(3, 19, 41, .18);
  }
  body.mobile-interface .crm-sidebar > .crm-nav {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  body.mobile-interface .crm-sidebar > .crm-nav .crm-nav-button,
  body.mobile-interface .crm-sidebar-bottom .crm-sidebar-action {
    width: auto;
    min-width: 0;
    min-height: 56px;
    padding: 5px 8px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-radius: 9px;
    font-size: .72rem;
    line-height: 1.1;
    text-align: center;
  }
  body.mobile-interface .crm-sidebar > .crm-nav .crm-nav-button svg,
  body.mobile-interface .crm-sidebar-bottom .crm-sidebar-action svg { width: 20px; height: 20px; }
  body.mobile-interface .crm-sidebar-bottom { flex: 0 0 auto; margin: 0 0 0 5px; }
  body.mobile-interface #crmLockButton { width: 76px; min-height: 56px; font-size: .66rem; }
  body.mobile-interface #crmCollapseButton { display: none !important; }

  body.mobile-interface .crm-protected-menu:not([hidden]) {
    position: fixed;
    z-index: 94;
    top: calc(62px + env(safe-area-inset-top));
    right: 0;
    left: 0;
    height: 64px;
    padding: 7px 10px;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: #0b2b50;
    box-shadow: 0 8px 22px rgba(3,19,41,.14);
    scrollbar-width: none;
  }
  body.mobile-interface .crm-protected-menu::-webkit-scrollbar { display: none; }
  body.mobile-interface:not(.crm-page-open) .crm-protected-menu { display: none !important; }
  body.mobile-interface .crm-protected-menu .crm-sidebar-label { display: none; }
  body.mobile-interface .crm-protected-menu .crm-nav {
    width: max-content;
    min-width: 100%;
    height: 50px;
    display: flex;
    gap: 5px;
  }
  body.mobile-interface .crm-protected-menu .crm-nav-button {
    width: auto;
    min-width: 112px;
    min-height: 48px;
    padding: 7px 10px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 7px;
    border-radius: 8px;
    font-size: .76rem;
    text-align: left;
    white-space: nowrap;
  }
  body.mobile-interface .crm-protected-menu .crm-nav-button svg { width: 18px; height: 18px; }

  body.mobile-interface .crm-consultor-root,
  body.mobile-interface .crm-sidebar.is-collapsed + .crm-consultor-root {
    min-height: 100dvh;
    padding: calc(142px + env(safe-area-inset-top)) 12px calc(96px + env(safe-area-inset-bottom));
  }
  body.mobile-interface .crm-page { width: 100%; }
  body.mobile-interface .crm-page-head { margin-bottom: 14px; align-items: flex-start; display: grid; gap: 12px; }
  body.mobile-interface .crm-eyebrow { font-size: .7rem; }
  body.mobile-interface .crm-page-head h1 { font-size: 1.65rem; }
  body.mobile-interface .crm-page-head p:not(.crm-eyebrow) { font-size: .86rem; line-height: 1.45; }
  body.mobile-interface .crm-page-actions { width: 100%; }
  body.mobile-interface .crm-page-actions .crm-button { flex: 1; }
  body.mobile-interface .crm-button { min-height: 44px; padding: 9px 12px; font-size: .82rem; }
  body.mobile-interface .crm-button.compact { min-height: 40px; font-size: .76rem; }
  body.mobile-interface :is(.crm-input, .crm-select, .crm-textarea) { min-height: 48px; font-size: 1rem; }
  body.mobile-interface .crm-kpi-grid,
  body.mobile-interface .crm-commission-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body.mobile-interface .crm-kpi { min-height: 112px; padding: 14px; }
  body.mobile-interface .crm-kpi span { font-size: .68rem; line-height: 1.3; }
  body.mobile-interface .crm-kpi strong { margin-top: 8px; font-size: 1.17rem; overflow-wrap: anywhere; }
  body.mobile-interface .crm-kpi small { margin-top: 7px; font-size: .75rem; }
  body.mobile-interface .crm-card { border-radius: 11px; }
  body.mobile-interface .crm-followups-card,
  body.mobile-interface .crm-agenda-card,
  body.mobile-interface .crm-chart-card,
  body.mobile-interface .crm-flow-card,
  body.mobile-interface .crm-settings-card { padding: 14px 12px; }
  body.mobile-interface .crm-section-title,
  body.mobile-interface .crm-chart-title h2,
  body.mobile-interface .crm-flow-head h2 { font-size: .95rem; }
  body.mobile-interface .crm-chart-title { align-items: flex-start; flex-direction: column; }
  body.mobile-interface .crm-chart-title span { font-size: .72rem; line-height: 1.4; }
  body.mobile-interface .crm-bar-value { font-size: .9rem; }
  body.mobile-interface .crm-bar-label { font-size: .7rem; }
  body.mobile-interface .crm-commission-rule-strip { align-items: flex-start; flex-direction: column; gap: 4px; }
  body.mobile-interface .crm-commission-rule-strip span { font-size: .68rem; }
  body.mobile-interface .crm-commission-rule-strip strong { font-size: .86rem; }
  body.mobile-interface .crm-commission-rule-strip small { margin-left: 0; font-size: .74rem; }
  body.mobile-interface .crm-list-row { min-height: 0; padding: 12px 0; align-items: flex-start; flex-direction: column; }
  body.mobile-interface .crm-list-main strong { font-size: .9rem; }
  body.mobile-interface .crm-list-main small { font-size: .78rem; }
  body.mobile-interface .crm-row-actions { width: 100%; }
  body.mobile-interface .crm-row-actions .crm-button { flex: 1; }
  body.mobile-interface .crm-toolbar { grid-template-columns: minmax(0, 1fr); }
  body.mobile-interface .crm-table-card { padding: 8px; }
  body.mobile-interface .crm-table { min-width: 760px; font-size: .78rem; }
  body.mobile-interface .crm-table th { font-size: .66rem; }
  body.mobile-interface .crm-table td strong { font-size: .8rem; }
  body.mobile-interface .crm-table td small { font-size: .7rem; }
  body.mobile-interface .crm-stage-pill { min-height: 29px; font-size: .72rem; }
  body.mobile-interface .crm-template-card { min-height: 0; padding: 15px; }
  body.mobile-interface .crm-template-head h2 { font-size: .95rem; }
  body.mobile-interface .crm-template-card pre { font-size: .82rem; }
  body.mobile-interface .crm-agenda-row { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  body.mobile-interface .crm-agenda-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  body.mobile-interface .crm-agenda-actions .crm-input { width: 100%; }
  body.mobile-interface .crm-funnel-card { padding: 12px 8px; overflow-x: auto; }
  body.mobile-interface .crm-funnel-layout { min-width: 560px; }
  body.mobile-interface .crm-kanban { grid-auto-columns: minmax(230px, 82vw); }
  body.mobile-interface .crm-flow-head { align-items: flex-start; flex-direction: column; }
  body.mobile-interface .crm-flow-summary,
  body.mobile-interface .crm-funnel-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.mobile-interface .crm-mini-kpi span { font-size: .66rem; }
  body.mobile-interface .crm-mini-kpi small { font-size: .7rem; }
  body.mobile-interface .crm-settings-card h2 { font-size: .95rem; }
  body.mobile-interface .crm-settings-card p { font-size: .8rem; }
  body.mobile-interface .crm-inline-form { align-items: stretch; flex-wrap: wrap; }
  body.mobile-interface .crm-inline-form .crm-input { width: 100px; }

  body.mobile-interface .crm-modal { align-items: end; padding: 10px 10px max(10px, env(safe-area-inset-bottom)); }
  body.mobile-interface .crm-dialog,
  body.mobile-interface .crm-dialog.small { width: 100%; max-height: calc(100dvh - 20px - env(safe-area-inset-top)); border-radius: 17px; }
  body.mobile-interface .crm-dialog-head { padding: 18px 16px 14px; }
  body.mobile-interface .crm-dialog-head h2 { font-size: 1.25rem; }
  body.mobile-interface .crm-dialog-head p { font-size: .82rem; }
  body.mobile-interface .crm-dialog-body { padding: 16px; }
  body.mobile-interface .crm-promo-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body.mobile-interface .crm-promo-copy h3 { font-size: 1.35rem; }
  body.mobile-interface .crm-promo-copy p { font-size: .86rem; }
  body.mobile-interface .crm-promo-carousel { min-height: 230px; }
  body.mobile-interface .crm-promo-slide { padding: 14px; }
  body.mobile-interface .crm-promo-kpis { gap: 6px; }
  body.mobile-interface .crm-promo-kpis > span { min-height: 70px; padding: 9px; }
  body.mobile-interface .crm-promo-kpis strong { font-size: .82rem; overflow-wrap: anywhere; }
  body.mobile-interface .crm-payment-month-total { align-items: flex-start; flex-direction: column; }
  body.mobile-interface .crm-payment-counts { justify-content: flex-start; }
  body.mobile-interface .crm-payment-row {
    padding: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "client value" "day day" "status status";
    gap: 9px;
  }
  body.mobile-interface .crm-payment-client { grid-area: client; }
  body.mobile-interface .crm-payment-client strong { font-size: .92rem; }
  body.mobile-interface .crm-payment-client small { font-size: .78rem; }
  body.mobile-interface .crm-payment-day { grid-area: day; }
  body.mobile-interface .crm-payment-day input { width: 58px; height: 40px; font-size: .9rem; }
  body.mobile-interface .crm-payment-status { grid-area: status; overflow-x: auto; grid-template-columns: repeat(4, minmax(88px, 1fr)); }
  body.mobile-interface .crm-payment-status button { min-height: 38px; font-size: .7rem; }
  body.mobile-interface .crm-payment-value { grid-area: value; }
  body.mobile-interface .crm-payment-value strong { font-size: .92rem; }
  body.mobile-interface .crm-payment-row.carried { grid-template-areas: "client value" "status status"; grid-template-columns: minmax(0,1fr) auto; }
  body.mobile-interface .crm-payment-row.carried .crm-payment-carried { grid-area: status; justify-self: start; }
  body.mobile-interface .crm-client-commission-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.mobile-interface .crm-double-schedule { grid-auto-flow: column; grid-auto-columns: minmax(150px, 58vw); grid-template-columns: none; overflow-x: auto; padding-bottom: 5px; }
  body.mobile-interface .crm-commission-history-head { align-items: flex-start; flex-direction: column; }
  body.mobile-interface .crm-commission-history-row { grid-template-columns: minmax(0,1fr) 82px; }
  body.mobile-interface .crm-commission-history-row b { grid-column: 2; }
  body.mobile-interface .crm-commission-client-card,
  body.mobile-interface .crm-period-row { grid-template-columns: minmax(0, 1fr) auto; }
  body.mobile-interface .crm-commission-client-card > span:first-child,
  body.mobile-interface .crm-period-row > span:first-child { grid-column: 1 / -1; }
  body.mobile-interface .crm-commission-client-card > i,
  body.mobile-interface .crm-period-row > i { display: none; }
  body.mobile-interface .crm-form-grid { grid-template-columns: minmax(0, 1fr); }
  body.mobile-interface .crm-form-grid .full { grid-column: auto; }
  body.mobile-interface .crm-field > span { font-size: .82rem; }
  body.mobile-interface .crm-pin-dots { grid-template-columns: repeat(4, 54px); gap: 8px; }
  body.mobile-interface .crm-pin-dots input { width: 54px; height: 58px; font-size: 1.5rem; }
  body.mobile-interface .crm-pin-message,
  body.mobile-interface .crm-security-note { font-size: .78rem; }
  body.mobile-interface .crm-toast { right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); left: 12px; max-width: none; font-size: .82rem; }
}

@media screen and (max-width: 430px) {
  body.mobile-interface .crm-sidebar > .crm-nav .crm-nav-button { font-size: .68rem; }
  body.mobile-interface #crmLockButton { width: 68px; }
  body.mobile-interface .crm-protected-menu .crm-nav-button { min-width: 105px; }
  body.mobile-interface .crm-kpi-grid,
  body.mobile-interface .crm-commission-kpis { grid-template-columns: minmax(0, 1fr); }
  body.mobile-interface .crm-kpi { min-height: 0; }
}
