/* Controle contábil: uma linha por cliente, com identidade e execução legíveis. */
body.soalhe-system-v4 #view .cc-monthly-grid {
  width:100%;min-width:1454px;table-layout:fixed;border-collapse:separate;
  border-spacing:0 8px;font-family:var(--font-body);font-size:12px;
}
body.soalhe-system-v4 #view .cc-monthly-grid :is(th,td) {
  padding:12px 10px;white-space:normal;text-align:center;vertical-align:middle;
  font-family:var(--font-body)!important;font-size:12px;line-height:1.45;letter-spacing:normal;
}
body.soalhe-system-v4 #view .cc-monthly-grid thead th {
  top:0;font-size:13px;font-weight:700;text-transform:uppercase;background:#f8f5ed;border:0;height:48px;
}
body.soalhe-system-v4 #view .cc-monthly-grid tbody td {
  height:176px;border:0;border-top:1px solid #e9e4d7;border-bottom:1px solid #e9e4d7;background:#fff;
}
body.soalhe-system-v4 #view .cc-monthly-grid tbody tr:hover td {background:#fffdf5}
body.soalhe-system-v4 #view .cc-monthly-grid tbody tr.cc-last td {background:#fff7d2}
body.soalhe-system-v4 #view .cc-monthly-grid td:first-child {border-left:1px solid #e9e4d7;border-radius:12px 0 0 12px}
body.soalhe-system-v4 #view .cc-monthly-grid td:last-child {border-right:1px solid #e9e4d7;border-radius:0 12px 12px 0}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-freeze-sel {left:0;width:36px;min-width:36px;max-width:36px;padding:8px}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-freeze-code {left:36px;width:86px;min-width:86px;max-width:86px}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-freeze-name {left:122px;width:300px;min-width:300px;max-width:300px;box-shadow:5px 0 8px -7px #554}
body.soalhe-system-v4 #view .cc-code-status {display:flex;flex-direction:column;align-items:center;gap:6px}
body.soalhe-system-v4 #view .cc-monthly-grid :is(.cc-client-name,.cc-client-cnpj) {display:block;overflow-wrap:anywhere}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-client-name {font-size:14px;font-weight:700;color:#252720}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-client-cnpj {margin-top:6px;color:#252720;font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
body.soalhe-system-v4 #view .cc-profile {display:flex;flex-direction:column;align-items:center;gap:6px}
body.soalhe-system-v4 #view .cc-profile-tag {display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px 5px;max-width:100%;border:1px solid #e5ddc5;border-radius:999px;padding:5px 10px;background:#faf8ef;color:#514a34;text-align:center}
body.soalhe-system-v4 #view .cc-profile-tag span {font-size:12px;font-weight:600;color:#514a34;flex:none}
body.soalhe-system-v4 #view .cc-profile-tag span::after {content:":"}
body.soalhe-system-v4 #view .cc-profile-tag b {font-size:12px;font-weight:600;text-align:center;overflow-wrap:anywhere;min-width:0}
body.soalhe-system-v4 #view .cc-responsible {display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-resp {width:190px;max-width:190px;min-height:32px;border-radius:10px;padding:5px;font-size:12px;background:#f9f8f3}
body.soalhe-system-v4 #view .cc-support-list {display:grid;grid-template-rows:repeat(4,37px);gap:3px;inline-size:280px;block-size:157px;margin-inline:auto;text-align:left;justify-content:center;contain:layout size}
body.soalhe-system-v4 #view .cc-support-row {display:grid;grid-template-columns:190px 84px;grid-template-rows:25px 12px;justify-content:center;align-items:center;column-gap:6px;min-height:0;block-size:37px}
body.soalhe-system-v4 #view .cc-support-tag {display:inline-flex;align-items:center;justify-content:center;justify-self:center;width:fit-content;max-width:100%;border:1px solid #e5ddc5;border-radius:999px;background:#faf8ef;padding:5px 8px;color:#514a34;font-size:12px;font-weight:700;line-height:1.25;text-align:center;white-space:normal}
body.soalhe-system-v4 #view .cc-support-row>small {grid-column:2;font-size:10px;color:#8a6655;line-height:12px;margin:0;text-align:center;white-space:nowrap}
body.soalhe-system-v4 #view .cc-support-choice {display:flex;gap:2px}
body.soalhe-system-v4 #view .cc-support-option {flex:1;border:1px solid #c9c4b6;border-radius:6px;background:#fff;color:#53584e;padding:3px 2px;font:600 12px/16px var(--font-body);cursor:pointer}
body.soalhe-system-v4 #view .cc-support-option.active.yes, body.soalhe-system-v4 #view .cc-support-tag.yes {background:#ddf3e4;border-color:#7ebc92;color:#176038}
body.soalhe-system-v4 #view .cc-support-option.active.no, body.soalhe-system-v4 #view .cc-support-tag.no {background:#fae8e4;border-color:#db9e93;color:#9b392f}
body.soalhe-system-v4 #view .cc-support-option:focus-visible {outline:2px solid #9c7d20;outline-offset:2px}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-step {display:flex;min-height:58px;flex-direction:column;justify-content:center;align-items:center;gap:4px;text-align:center;border:1px solid rgba(60,60,30,.07);border-radius:12px;padding:9px 7px;font-size:12px;white-space:normal}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-step b {font-size:12px;line-height:1.35}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-step small {font-size:11px;line-height:1.35;margin:0}
body.soalhe-system-v4 #view .cc-monthly-grid .cc-fechamento {background:#f3f0e7;color:#51451f}
body.soalhe-system-v4 #view .cc-integrations {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
body.soalhe-system-v4 #view .cc-integration {min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px}
body.soalhe-system-v4 #view .cc-integration>span {font-size:11px;font-weight:700;line-height:1.3}
body.soalhe-system-v4 #view .cc-integration .cc-step {min-height:42px;padding:5px;font-size:11px}
body.soalhe-system-v4 #view .cc-integration .cc-step b {font-size:11px}
body.soalhe-system-v4 #view .cc-monthly-grid .badge {font-size:11px;white-space:normal}
.cdb-frentes {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:16px}
.cdb-frente {border:1px solid #e8e2d0;border-radius:13px;background:#fffefa;padding:16px;min-width:0}
.cdb-frente h3 {font-family:var(--font-body);font-size:14px;line-height:1.4;margin:0 0 12px;color:#3d341e}
.cdb-frente-score {display:flex;align-items:baseline;gap:8px;justify-content:space-between}
.cdb-frente-score b {font-size:26px}.cdb-frente-score span {font-size:11px;color:#687063;text-align:right}
.cdb-frente-tags {display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.cdb-frente-tags span {border-radius:7px;padding:5px 7px;background:#f0eee6;font-size:11px;line-height:1.35;color:#5b5d54}
.cdb-frente-tags .ok {background:#e2f4e9;color:#216b42}.cdb-frente-tags .warn {background:#fff0d3;color:#865a13}.cdb-frente-tags .danger {background:#fce9e7;color:#9c403c}

body.soalhe-system-v4 #view .cdb-contabil .cdb-table th {font-family:var(--font-body)!important;font-size:12px;text-transform:none;letter-spacing:normal}

/* Popup de etapas: leitura maior e uma unica area de rolagem. */
body.soalhe-system-v4 .cc-closing-modal .modal {display:flex;flex-direction:column;height:min(860px,calc(100vh - 84px));max-height:calc(100vh - 84px);overflow:hidden}
body.soalhe-system-v4 .cc-closing-modal :is(.modal-header,.modal-footer) {flex:none}
body.soalhe-system-v4 .cc-closing-modal .modal-body {display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden;padding:16px 18px}
body.soalhe-system-v4 .cc-closing-scroll {min-height:0;overflow:auto;overscroll-behavior:contain}
.cc-closing-summary {display:grid;grid-template-columns:auto 1fr;align-items:center;gap:6px 14px;margin-bottom:14px;padding:12px 16px;background:#f8f5e9;border:1px solid #e7dfc8;border-radius:12px}
.cc-closing-summary>b {font-size:30px;line-height:1.1;color:#715817}
.cc-closing-summary strong {display:block;font-size:14px}
.cc-closing-summary small {display:block;font-size:12px;color:#687066;margin-top:3px}
.cc-closing-summary progress {grid-column:1/-1;width:100%;height:8px;accent-color:#a28120;border:0}
.cc-timeline {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px;list-style:none;margin:0;padding:0 4px 3px 0;counter-reset:none}
.cc-timeline-item {min-width:0;margin:0;position:relative}
body.soalhe-system-v4 .cc-closing-modal .cc-timeline-card {display:flex;align-items:flex-start;gap:11px;width:100%;min-height:92px;border:1px solid #e3ded0;border-radius:12px!important;background:#fff;padding:12px;text-align:left;white-space:normal;color:#30352e;font-family:var(--font-body)}
.cc-timeline-marker {display:flex;flex:none;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;border:1px solid #d6c999;background:#f7f1df;color:#725a1a;font-size:14px;font-weight:700}
.cc-timeline-item.is-done .cc-timeline-marker {background:#dcfce7;color:#166534;border-color:#a6dabc}
body.soalhe-system-v4 .cc-closing-modal .is-done .cc-timeline-card {border-color:#b7dfc3;background:#f8fdf9}
.cc-timeline-content {display:block;min-width:0;flex:1}
body.soalhe-system-v4 .cc-closing-modal .cc-timeline-content>small {display:block;font-size:12px;line-height:1.3;margin:0 0 4px;color:#73756b}
.cc-timeline-content>strong {display:block;font-size:15px;line-height:1.35}
.cc-timeline-meta {display:flex;align-items:center;gap:6px 9px;flex-wrap:wrap;margin-top:8px}
.cc-timeline-status {display:inline-block;flex:none;padding:4px 9px;border-radius:999px;font-size:13px;line-height:1.35}
.cc-timeline-note {min-width:0;font-size:12px;line-height:1.4;color:#687066;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.cc-timeline-card:hover {box-shadow:0 2px 8px #47381112;border-color:#c9ac50!important}

.cc-closing-summary progress::-webkit-progress-bar {background:#e6e0cd;border-radius:999px}
.cc-closing-summary progress::-webkit-progress-value {background:#b79425;border-radius:999px}

body.soalhe-system-v4 .cc-closing-modal .cc-timeline-open {font-size:15px;font-weight:700;line-height:1.35;background:transparent!important;color:inherit!important;border:0!important;border-radius:0!important;padding:0!important;min-height:0!important;text-align:left;box-shadow:none!important;white-space:normal}
.cc-team-options {display:grid;max-height:52vh;overflow:auto;border:1px solid #e5ddc5;border-radius:10px}
.cc-team-options label.cc-team-option {display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:38px;margin:0;padding:6px 12px;text-align:left;cursor:pointer}
.cc-team-option + .cc-team-option {border-top:1px solid #eee9dd}
.cc-team-options .cc-team-option input.ccEq {appearance:auto;flex:0 0 17px;width:17px;height:17px;min-height:0;margin:0;padding:0;accent-color:#96751b}
.cc-team-options .cc-team-option span {font:600 13px var(--font-body);color:#34352f;line-height:1.35}
.cc-team-option:focus-within {outline:2px solid #9c7d20;outline-offset:-2px}
.cc-timeline-controls {display:flex;gap:12px;flex-wrap:wrap;margin-top:9px}
.cc-timeline-controls label {display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;cursor:pointer}
.cc-timeline-controls input {appearance:auto;width:28px;height:16px;margin:0;accent-color:#9c7d20;flex:none}
.cc-timeline-pending {margin-top:10px;border-top:1px solid #e8e2d1;padding-top:8px}
.cc-timeline-pending[hidden] {display:none}
.cc-timeline-pending label {display:block;font-size:12px;color:#6f5a25}
.cc-timeline-pending textarea {display:block;width:100%;margin:5px 0 7px;font:13px var(--font-body);padding:7px;border:1px solid #dacda7;border-radius:7px;resize:vertical}

.cc-timeline-controls input[role=switch] {appearance:none;border:1px solid #bdb8aa;background:#dad8d0;border-radius:999px;position:relative;cursor:pointer}
.cc-timeline-controls input[role=switch]::before {content:"";position:absolute;top:2px;left:2px;width:10px;height:10px;background:#fff;border-radius:50%;box-shadow:0 1px 2px #0003;transition:transform .12s}
.cc-timeline-controls input[role=switch]:checked {background:#9c7d20;border-color:#9c7d20}
.cc-timeline-controls input[role=switch]:checked::before {transform:translateX(12px)}

body.soalhe-system-v4 #view .cc-revenue {display:grid;justify-content:center;gap:12px;margin-top:5px}
.cc-revenue-line {display:flex;align-items:center;justify-content:space-between;gap:5px;font-variant-numeric:tabular-nums}
.cc-revenue-line button {border:0;background:transparent;font:inherit;color:#514a34;cursor:pointer}
.cc-revenue-line [data-cc-history] {display:grid;gap:3px;padding:1px 3px;text-align:left}
body.soalhe-system-v4 #view .cc-revenue-line [data-cc-history] span {font-size:13px;font-weight:700;line-height:1.3}
body.soalhe-system-v4 #view .cc-revenue-line [data-cc-history] b {font-size:12px;font-weight:600;line-height:1.3}
.cc-revenue-line [data-cc-history]:hover,.cc-revenue-line [data-cc-history]:focus-visible {text-decoration:underline}
.cc-revenue-line [data-cc-revenue-refresh] {min-width:24px;line-height:18px;border:1px solid #d5ccb1;border-radius:5px;color:#745813}
.cc-revenue small {font-size:10px;color:#5e625b}
.cc-revenue-history {position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(1120px,calc(100% - 32px));max-width:calc(100% - 32px);height:fit-content;max-height:calc(100% - 36px);padding:15px 18px;overflow:hidden;border:1px solid #d6c79f;border-radius:12px;background:#fffdf8;color:#282922;box-shadow:0 8px 32px #26221936;font:13px var(--font-body)}
.cc-revenue-history:popover-open {display:flex;flex-direction:column}
.cc-revenue-history header {display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex:none}
.cc-history-scroll {overflow:auto;overscroll-behavior:contain;min-height:0;max-height:calc(100dvh - 130px)}
.cc-revenue-history strong {font-size:14px}.cc-revenue-history p {margin:4px 0 8px}
.cc-revenue-history table {width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.cc-revenue-history :is(th,td) {padding:5px 8px;text-align:right;white-space:nowrap;border-bottom:1px solid #eee8d8}
.cc-revenue-history th:first-child,.cc-revenue-history :is(th,td):last-child {text-align:left}
.cc-revenue-history :is(th,td):last-child {white-space:normal;overflow-wrap:anywhere}
.cc-revenue-history thead th {position:sticky;top:0;background:#f7f1e6;z-index:1}
.cc-revenue-history tfoot {background:#f6f1e2;font-weight:700}
.cc-monthly-grid .cc-pgdas-lote {margin:3px auto 0;font-size:11px;text-transform:none}
.cc-pgdas-acoes {display:flex;gap:8px;align-items:center}
.cc-pgdas-lista {max-height:52vh;overflow:auto}
.cc-pgdas-lista table {width:100%;border-collapse:collapse}
.cc-pgdas-lista :is(th,td) {padding:6px 8px;text-align:left;border-bottom:1px solid #eee8d8}
.cc-pgdas-lista thead th {position:sticky;top:0;background:#f8f5ed}
.cc-pgdas-lista td small {display:block;color:#605a4f}
.cc-pgdas-modal .modal {height:100%;max-height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.cc-pgdas-modal .modal-header,.cc-pgdas-modal .modal-footer {flex:none}
.cc-pgdas-modal .modal-body {flex:1;min-height:0;padding:0;overflow:hidden}
.cc-pgdas-reader {height:100%;display:grid;grid-template-columns:clamp(165px,18%,270px) minmax(0,1fr)}
.cc-pgdas-reader nav {overflow:auto;overscroll-behavior:contain;padding:12px;background:#faf7ef;border-right:1px solid #ded7c8}
.cc-pgdas-reader h4 {margin:0 0 10px;color:#403a2c;font-size:14px}
.cc-pgdas-reader nav button {display:grid;width:100%;grid-template-columns:1fr auto;gap:3px 8px;margin-bottom:5px;padding:9px 8px;border:1px solid #e0d9ca;border-radius:8px;background:#fff;text-align:left;color:#282922;font:inherit;font-variant-numeric:tabular-nums;cursor:pointer}
.cc-pgdas-reader nav button[aria-pressed=true] {background:#f7edc6;border-color:#bd9629}
.cc-pgdas-reader nav button:disabled {cursor:default;background:transparent;color:#625f56}
.cc-pgdas-reader nav small {grid-column:1 / -1}
.cc-pgdas-documento {min-width:0;min-height:0;background:#f4f2ed}
.cc-pgdas-documento p {padding:20px}
.cc-pgdas-pdf {display:block;width:100%;height:100%;border:0}

.cc-col-filter {position:relative;text-transform:uppercase;letter-spacing:normal}
.cc-col-filter>summary {list-style:none;cursor:pointer;font:700 13px var(--font-body)}
.cc-col-filter>summary::-webkit-details-marker {display:none}
.cc-col-filter>summary:focus-visible {outline:2px solid #9c7d20;outline-offset:3px}
.cc-col-menu {position:absolute;top:100%;left:0;z-index:40;width:255px;max-height:50vh;overflow:auto;padding:10px;background:#fff;border:1px solid #ddd4ba;border-radius:10px;box-shadow:0 12px 28px #0003;text-align:left}
.cc-col-menu>input {width:100%;min-width:0;padding:7px;border:1px solid #d8d2c1;border-radius:6px}
.cc-col-menu [data-cc-header-filters] {display:grid;gap:5px;margin-top:7px}
.cc-col-menu .cc-filter-menu {position:static;width:100%;box-shadow:none;max-height:200px}
.cc-quick-sort {display:flex;gap:5px;align-items:center;font-size:11px;font-weight:700}
.cc-quick-sort select {border:1px solid #d8d2c1;border-radius:8px;background:#fff;padding:5px;color:#514a34}

.cc-monthly-grid th:last-child .cc-col-menu {left:auto;right:0}

.cc-header-sort {display:grid;gap:4px;margin-top:8px;font-size:11px;text-transform:none}.cc-header-sort select {width:100%;padding:6px;border:1px solid #d8d2c1;border-radius:6px;background:#fff}.cc-count {font-size:11px}.toolbar[hidden] {display:none!important}

body.soalhe-system-v4 #view .cc-revenue-breakdown {display:grid;gap:3px;margin:4px 3px 0;font-size:11px;color:#5e625b}
.cc-revenue-breakdown span {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;text-align:left}.cc-revenue-breakdown i {font-style:normal;overflow-wrap:anywhere}.cc-revenue-breakdown b {font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}

body.soalhe-system-v4 #view .cc-compact-toolbar {display:flex;align-items:center;flex-wrap:nowrap;gap:6px;padding:9px 10px;min-width:0}
.cc-count {white-space:nowrap}
body.soalhe-system-v4 #view .cc-compact-toolbar #ccBusca {flex:1 1 140px;min-width:100px;max-width:none;padding:6px;font-size:11px}
.cc-only-active {display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:11px}
.cc-batch-actions {display:flex;align-items:center;flex:0 0 auto;gap:5px}.cc-batch-actions #ccLoteResp {width:155px;padding:6px;font-size:11px}.cc-batch-actions button {white-space:nowrap}
.cc-filter-config {display:block;width:100%;border:0;border-top:1px solid #e5ddc5;background:transparent;padding:8px;color:#735b1e;text-align:left;font-size:11px;cursor:pointer}
.cc-compact-toolbar .cc-filter>summary {max-width:185px;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1100px) {body.soalhe-system-v4 #view .cc-compact-toolbar {overflow-x:auto;overflow-y:hidden}.cc-compact-toolbar .cc-filters {flex:none}}

@media(max-width:1100px) {.cc-compact-toolbar .cc-filter-menu {position:fixed;top:96px;left:12px;z-index:1200;max-height:50vh}}

/* Os painéis usam a camada superior do navegador para ultrapassar a grade e as colunas fixas. */
body.soalhe-system-v4 :is(.cc-filter-menu,.cc-col-menu,#ccSugestoes)[popover] {position:fixed;inset:auto;margin:0;z-index:1200}
body.soalhe-system-v4 #view .cc-compact-toolbar {overflow-x:auto;overflow-y:hidden}
.cc-compact-toolbar .cc-filter>summary {text-transform:uppercase}
.cc-only-active {margin-right:0}
#fiscCompGroup {flex:none} .cc-compact-toolbar #fiscComp {width:160px;min-width:0} .cc-compact-toolbar #fiscPrev,.cc-compact-toolbar #fiscNext {padding:4px 7px}
#ccSugestoes {width:min(420px,calc(100vw - 16px));max-height:300px;overflow:auto;padding:5px;border:1px solid #ddd4ba;border-radius:10px;background:#fff;box-shadow:0 12px 28px #0003}
#ccSugestoes [data-cc-sug] {display:grid;grid-template-columns:auto 1fr;gap:2px 8px;width:100%;border:0;border-radius:6px;background:#fff;padding:7px;text-align:left;cursor:pointer}
#ccSugestoes [data-cc-sug]:is(:hover,[aria-selected=true]) {background:#fff4c7} #ccSugestoes small {grid-column:2;color:#667069}

.cc-menu-portal .cc-filter>summary,.cc-menu-portal .cc-col-filter>summary {text-transform:uppercase}

.cc-menu-portal {position:relative;z-index:2147483000}.cc-menu-portal .cc-popup-panel {position:fixed;inset:auto;margin:0;z-index:1}.cc-menu-portal .cc-popup-panel[hidden] {display:none!important}

.cc-menu-portal .cc-filter-opt[hidden] {display:none!important}

.cc-compact-toolbar #fiscCompGroup {margin-inline-start:auto}
