/* ZenCaps Gestão Financeira — modernização visual da operação.
   Somente interface. Não afeta o PDF, cálculos, persistência ou permissões. */
@media screen{
  :root{
    --zen-ui-radius:17px;
    --zen-ui-line:#dfeae2;
    --zen-ui-elevation:0 3px 9px rgba(15,46,26,.035),0 16px 35px rgba(15,46,26,.055);
    --zen-ui-focus:#0c9853;
  }
  :is(.dashboard-view,.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.settings-shell,.users-shell) .table-card{
    border-radius:var(--zen-ui-radius);
    box-shadow:var(--zen-ui-elevation);
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.settings-shell,.users-shell) .page-heading{
    padding-bottom:4px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading h1{
    font-weight:850;letter-spacing:-.045em;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading p{
    line-height:1.6;max-width:78ch;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-toolbar{
    gap:12px 16px;min-height:68px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-toolbar b{
    font-size:14px;font-weight:800;letter-spacing:-.025em;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll th{
    letter-spacing:.08em;font-weight:800;font-size:10px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll td{
    font-size:12px;line-height:1.5;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll .td-sub{
    line-height:1.5;letter-spacing:0;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll :is(td,th).right{
    font-variant-numeric:tabular-nums;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll .actions-cell{
    gap:6px;align-items:center;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll .actions-cell .btn{
    transition:background .15s,border-color .15s,box-shadow .15s;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) :is(.searchbox,.select.compact,.filter-date){
    border-radius:11px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) :is(.searchbox,.select.compact,.filter-date):focus-within{
    box-shadow:0 0 0 3px rgba(22,148,83,.09);
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-card .filters{
    gap:8px;
  }
  .zen-toolbar-summary{
    display:flex;align-items:center;flex-wrap:wrap;gap:7px;
    margin-top:7px;
  }
  .zen-summary-pill{
    display:inline-flex;align-items:center;gap:5px;
    padding:4px 9px;border:1px solid #dce9df;border-radius:999px;
    color:#47765b;background:#f1f8f3;font-size:10px;font-weight:750;
    line-height:1.45;white-space:nowrap;font-variant-numeric:tabular-nums;
  }
  .zen-summary-pill.secondary{
    background:#f6f8f6;color:#62796b;border-color:#e6ece7;
  }
  /* Vendas: fechamento semanal em primeiro plano, sem esconder operações. */
  .orders-shell .callout{
    border-radius:17px;border-left-width:4px;
    background:linear-gradient(107deg,#ebf8ef 0%,#fff 88%);
  }
  .orders-shell .callout b{font-size:16px;font-weight:850;letter-spacing:-.03em}
  .orders-shell .callout p{line-height:1.5}
  .orders-shell .orders-bulk-toolbar{
    gap:8px;align-items:center;
    background:#f4faf6;
    border-bottom:1px solid var(--zen-ui-line);
  }
  .orders-shell .orders-bulk-toolbar>span{
    font-size:11.5px;line-height:1.5;
  }
  .orders-shell .table-card .table-toolbar:nth-child(2){
    background:#fafcfb;
  }
  /* Clientes: notas continuam visíveis, mas ganham destaque consistente. */
  .clients-shell .client-name-cell{gap:12px}
  .clients-shell .client-name-cell .td-main{font-size:13px}
  .clients-shell .client-notes-cell{min-width:190px;max-width:315px}
  .clients-shell .client-notes-text{
    border-left:2px solid #7dbf98;
    background:#f4faf6;
    border-radius:0 8px 8px 0;
    padding:7px 10px;
    line-height:1.55;
  }
  .clients-shell .price-tags{gap:7px}
  .clients-shell .price-tag{
    padding:5px 8px;border-radius:9px;
    border-color:#d9eadd;background:#f3faf5;
    font-weight:750;
  }
  /* Produtos: destaque para informações essenciais do catálogo. */
  .products-shell .callout{
    border-radius:17px;border-left-width:4px;
  }
  .products-shell .table-card .td-main{font-size:13px;font-weight:850}
  /* Faturas e Financeiro: leitura rápida de saldos e atrasos. */
  .invoices-shell .stat-value,.finance-shell .stat-value{
    letter-spacing:-.045em;
    font-variant-numeric:tabular-nums;
  }
  .finance-shell .finance-highlight{
    border-radius:13px;
    padding:18px;
  }
  .finance-shell .finance-highlight b{
    font-size:clamp(18px,2vw,25px);
    letter-spacing:-.04em;
  }
  .finance-shell .finance-panel-title h2{
    font-size:16px;letter-spacing:-.03em;
  }
  .finance-shell .finance-aging-track{
    height:9px;border-radius:999px;overflow:hidden;
  }
  .finance-shell .finance-aging-fill{border-radius:999px}
  .finance-shell .finance-aging-row{padding-block:9px}
  .finance-shell .zen-row-overdue td:first-child{
    box-shadow:inset 3px 0 #d97a70;
  }
  .finance-shell .zen-row-overdue td.zen-finance-saldo{
    color:#aa3f40;font-weight:850;
  }
  .invoices-shell .zen-row-cancelled td:first-child{
    box-shadow:inset 3px 0 #9daca3;
  }
  .invoices-shell .zen-row-cancelled .td-main{
    color:#687c6d;
  }
  /* Dashboard: separar leitura operacional da análise financeira. */
  .dashboard-view .dashboard-summary-row{
    padding:4px 0 7px;
  }
  .dashboard-view .dashboard-summary-copy p{
    font-size:12px;line-height:1.6;
  }
  .dashboard-view .grid4 .stat{
    border-radius:18px;box-shadow:var(--zen-ui-elevation);
  }
  .dashboard-view .stat-value{line-height:1.3}
  .dashboard-view .card-header h2{
    font-size:16px;letter-spacing:-.035em;
  }
  .dashboard-view .content-grid>.card{
    border-radius:17px;
  }
  .dashboard-view .progress-row:last-of-type{
    margin-bottom:10px;
  }
  .dashboard-view .legend-row{
    line-height:1.6;
  }
  /* Modais com maior conforto visual sem alterar o fluxo de salvamento. */
  .modal .form-grid{row-gap:15px}
  .modal .field label:not(.checkbox-line){margin-bottom:6px;display:block}
  .modal :is(.input,.select,.textarea):focus-visible{
    outline:2px solid var(--zen-ui-focus);outline-offset:2px;
  }
  .modal .modal-foot{
    box-shadow:0 -5px 12px rgba(13,46,25,.025);
  }
  /* Estados escuros sem áreas claras indevidas. */
  html[data-theme="dark"]{
    --zen-ui-line:#304638;
    --zen-ui-elevation:0 4px 14px rgba(0,0,0,.20),0 15px 35px rgba(0,0,0,.16);
  }
  html[data-theme="dark"] .zen-summary-pill{
    background:#213b2a;border-color:#355942;color:#bee3c7;
  }
  html[data-theme="dark"] .zen-summary-pill.secondary{
    background:#222f26;border-color:#37483b;color:#b3c8b8;
  }
  html[data-theme="dark"] .orders-shell .callout{
    background:linear-gradient(107deg,#193323 0%,#151e18 88%);
    border-color:#385640;border-left-color:#24ae69;
    color:#e4f2e8;
  }
  html[data-theme="dark"] .orders-shell .orders-bulk-toolbar,
  html[data-theme="dark"] .orders-shell .table-card .table-toolbar:nth-child(2){
    background:#1b2c20;border-color:#324a39;
  }
  html[data-theme="dark"] .clients-shell .client-notes-text{
    background:#203328;border-color:#5b9670;color:#e5f0e7;
  }
  html[data-theme="dark"] .clients-shell .price-tag{
    background:#203c2a;border-color:#3e6249;color:#d4f1dc;
  }
  html[data-theme="dark"] .finance-shell .zen-row-overdue td.zen-finance-saldo{
    color:#ff9e9b;
  }
  html[data-theme="dark"] .invoices-shell .zen-row-cancelled .td-main{
    color:#b6c5b9;
  }
  /* Ações e pesquisa funcionam em telas menores sem comprimir a leitura. */
  @media(max-width:1100px){
    .zen-toolbar-summary{margin-top:8px}
    .finance-shell .finance-highlight{padding:15px}
  }
  @media(max-width:620px){
    :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading p{
      max-width:100%;
    }
    :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-card .table-toolbar{
      min-height:0;
    }
    .zen-toolbar-summary{gap:5px}
    .zen-summary-pill{font-size:10px;padding:4px 7px}
    .orders-shell .callout{gap:12px}
    .clients-shell .client-notes-text{padding:6px 8px}
    .dashboard-view .dashboard-summary-row{align-items:stretch}
    .modal .form-grid{row-gap:12px}
  }
  @media(prefers-reduced-motion:reduce){
    :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell,.users-shell) .table-card .table-scroll .actions-cell .btn{
      transition:none;
    }
  }
}


/* Etapa final de leitura e navegação: sem alteração dos documentos PDF. */
@media screen {
  .orders-shell .table-card .table-scroll td .td-sub{
    color:#61786a;font-size:11px;line-height:1.55;
  }
  .orders-shell .table-card .table-scroll td .td-main{font-size:12.5px;letter-spacing:.002em}
  .orders-shell .table-card .table-scroll td.right b{font-size:12.5px;color:#19492d}
  .orders-shell .zen-orders-pagination{
    display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;
    padding:13px 17px;border-top:1px solid #dde9e0;
    background:#fafdfa;
  }
  .orders-shell .zen-orders-pagination-info{
    display:flex;gap:8px 18px;flex-wrap:wrap;color:#607969;font-size:11px;line-height:1.5;
  }
  .orders-shell .zen-orders-pagination-info b{color:#20583a;font-variant-numeric:tabular-nums}
  .orders-shell .zen-orders-pagination-controls{
    display:flex;align-items:center;gap:9px;flex-wrap:wrap;color:#5d7868;font-size:11px;
  }
  .orders-shell .zen-orders-pagination-controls .select{
    width:76px;min-height:34px;padding:6px 7px;font-size:11px;
  }
  .orders-shell .zen-orders-page-nav{display:flex;align-items:center;gap:9px}
  .orders-shell .zen-orders-page-nav>span{
    color:#415c4b;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums;
  }
  .orders-shell .zen-orders-page-nav .btn:disabled{opacity:.45;cursor:not-allowed}
  .orders-shell .orders-bulk-toolbar{border-bottom:1px solid #dceadf}
  .orders-shell .orders-bulk-toolbar>span{color:#476752}
  .orders-shell .filters .searchbox input::placeholder{color:#718779}

  .clients-shell .zen-toolbar-summary{
    display:flex!important;align-items:center;flex-wrap:wrap;column-gap:9px;row-gap:7px;
    margin-top:9px;
  }
  .clients-shell .zen-summary-pill{
    display:inline-flex;align-items:center;min-height:25px;
    padding:4px 10px;background:#eef8f1;border:1px solid #d6eadc;
    border-radius:999px;color:#18623d;font-size:11px;font-weight:700;line-height:1.2;
  }
  .clients-shell .zen-summary-pill.secondary{background:#f3f6fa;border-color:#dce5ed;color:#50647b}
  .clients-shell .zen-billing-badge{
    display:inline-flex;align-items:center;gap:5px;padding:5px 9px;
    border-radius:9px;font-size:11px;font-weight:800;line-height:1.35;
    border:1px solid #dce8e0;background:#f4f8f5;color:#486553;white-space:nowrap;
  }
  .clients-shell .zen-billing-badge.freight-only{
    background:#e7f0fd;color:#285b90;border-color:#c8dff6;
  }
  .clients-shell .client-notes-text{
    display:block;white-space:pre-line;color:#324a39;font-size:11px;
    border-left:3px solid #80bd95;padding:7px 10px;background:#f3f9f5;border-radius:0 8px 8px 0;
  }
  .clients-shell .client-name-cell .td-sub{color:#647b6c;font-size:11px;line-height:1.5}
  .clients-shell .price-tags{display:flex;gap:6px;flex-wrap:wrap}
  .clients-shell .price-tag{white-space:nowrap}

  .finance-shell .zen-finance-orders-banner{
    display:flex;align-items:center;gap:14px;flex-wrap:wrap;
    border:1px solid #cfe8d8;border-left:4px solid #14a761;
    background:linear-gradient(110deg,#effaf2,#fff);
    padding:15px 18px;border-radius:14px;margin-top:16px;margin-bottom:16px;
    box-shadow:0 7px 24px rgba(24,90,48,.04);
  }
  .finance-shell .zen-finance-orders-icon{
    width:42px;height:42px;display:grid;place-items:center;flex-shrink:0;
    background:#dcf4e5;color:#0a7e47;border-radius:12px;
  }
  .finance-shell .zen-finance-orders-copy{display:flex;flex-direction:column;gap:4px;flex:1 1 270px}
  .finance-shell .zen-finance-orders-copy b{font-size:13px;color:#204b30}
  .finance-shell .zen-finance-orders-copy span{font-size:11px;line-height:1.5;color:#527a60}
  .finance-shell .zen-finance-no-delay{
    display:flex;align-items:center;gap:12px;border-radius:12px;
    padding:17px 16px;background:#f0f8f2;color:#137245;border:1px solid #dcece1;
  }
  .finance-shell .zen-finance-no-delay svg{flex-shrink:0}
  .finance-shell .zen-finance-no-delay>div{display:flex;flex-direction:column;gap:4px}
  .finance-shell .zen-finance-no-delay strong{font-size:12px}
  .finance-shell .zen-finance-no-delay span{font-size:11px;line-height:1.5;color:#62816d}
  .finance-shell .zen-empty-table .empty{padding:22px 16px 27px}
  .finance-shell .zen-empty-table .empty-icon{
    width:43px;height:43px;margin-bottom:9px;border-radius:13px;
  }
  .finance-shell .zen-empty-table .empty p{margin:5px auto 9px}
  .finance-shell .finance-panel-title{margin-bottom:14px}
  .finance-shell .finance-panel-title h2{line-height:1.35}

  .dashboard-view .zen-kpi-delta{
    display:inline-block;font-weight:800;font-variant-numeric:tabular-nums;
    border-radius:7px;padding:2px 5px;margin-right:3px;
  }
  .dashboard-view .zen-kpi-delta.positive{background:#e2f5e9;color:#128346}
  .dashboard-view .zen-kpi-delta.negative{background:#fff0e8;color:#b45d35}
  .dashboard-view .bar-track{position:relative}
  .dashboard-view .zen-bar-zero{
    position:absolute;bottom:13px;left:50%;transform:translateX(-50%);
    font-size:10px;font-weight:750;color:#92a99a;pointer-events:none;
  }

  html[data-theme="dark"] .orders-shell .zen-orders-pagination{
    background:#19271e;border-color:#334b3a;
  }
  html[data-theme="dark"] .orders-shell .zen-orders-pagination-info,
  html[data-theme="dark"] .orders-shell .zen-orders-pagination-controls{color:#b9ccbe}
  html[data-theme="dark"] .orders-shell .zen-orders-pagination-info b,
  html[data-theme="dark"] .orders-shell .zen-orders-page-nav>span{color:#d8eedf}
  html[data-theme="dark"] .orders-shell .table-card .table-scroll td .td-sub{color:#bdd0c1}
  html[data-theme="dark"] .orders-shell .table-card .table-scroll td.right b{color:#e4f7e9}
  html[data-theme="dark"] .clients-shell .zen-summary-pill{background:#21392a;border-color:#385c44;color:#bbebca}
  html[data-theme="dark"] .clients-shell .zen-summary-pill.secondary{background:#2b333d;border-color:#4b5862;color:#d2e1f0}
  html[data-theme="dark"] .clients-shell .zen-billing-badge{background:#233c2a;border-color:#456d50;color:#ddf1e3}
  html[data-theme="dark"] .clients-shell .zen-billing-badge.freight-only{background:#223c52;border-color:#406181;color:#bfdbfb}
  html[data-theme="dark"] .clients-shell .client-notes-text{background:#1e3425;color:#e4f4e8;border-color:#629c70}
  html[data-theme="dark"] .clients-shell .client-name-cell .td-sub{color:#b4c9b9}
  html[data-theme="dark"] .finance-shell .zen-finance-orders-banner{
    background:linear-gradient(110deg,#193423,#1c281f);border-color:#345a40;border-left-color:#20a85e;
  }
  html[data-theme="dark"] .finance-shell .zen-finance-orders-icon{background:#204b2f;color:#afe6be}
  html[data-theme="dark"] .finance-shell .zen-finance-orders-copy b{color:#e2f6e8}
  html[data-theme="dark"] .finance-shell .zen-finance-orders-copy span{color:#bdd6c3}
  html[data-theme="dark"] .finance-shell .zen-finance-no-delay{background:#1d3525;border-color:#375341;color:#a3e5b9}
  html[data-theme="dark"] .finance-shell .zen-finance-no-delay span{color:#c2d5c7}
  html[data-theme="dark"] .dashboard-view .zen-kpi-delta.positive{background:#204b32;color:#b8edc7}
  html[data-theme="dark"] .dashboard-view .zen-kpi-delta.negative{background:#512f25;color:#f9c1a2}
  html[data-theme="dark"] .dashboard-view .zen-bar-zero{color:#9cb8a3}

  @media(max-width:760px){
    .orders-shell .zen-orders-pagination{align-items:stretch}
    .orders-shell .zen-orders-pagination-controls{justify-content:space-between}
    .orders-shell .zen-orders-page-nav{gap:6px}
    .clients-shell .zen-toolbar-summary{gap:6px}
    .finance-shell .zen-finance-orders-banner{align-items:flex-start}
    .finance-shell .zen-finance-orders-banner .btn{width:100%}
  }
}

/* Operações vinculadas: organização visual sem alterar valores e permissões. */
@media screen {
  .zen-linked-operation-item {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 14px;margin:7px 0;border:1px solid var(--line);border-radius:11px;background:var(--card);}
  .zen-linked-operation-item>div {display:flex;flex-direction:column;gap:5px;min-width:0}
  .zen-linked-operation-item b {font-size:13px;overflow-wrap:anywhere}
  .zen-linked-operation-item small {font-size:11px;color:var(--muted);line-height:1.45}
  .zen-operation-form {margin-top:17px;padding:16px;border-radius:12px}
  .zen-operation-form h3 {margin:0 0 12px}
  .zen-operation-form-actions {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px;margin-top:14px}
  .zen-operation-select-wrap {padding:5px 0}
  .zen-operation-select-wrap small {display:block;margin-top:5px;line-height:1.5;color:var(--muted)}
  .zen-operation-filter {min-width:160px}
  .zen-sales-operation {display:inline-flex;padding:5px 8px;max-width:220px;overflow-wrap:anywhere;border-radius:9px;font-size:11px;font-weight:700;background:#eaf4ef;color:#316148;border:1px solid #d5e5da}
  .clients-shell .actions-cell {flex-wrap:wrap;justify-content:flex-end}
  .clients-shell .actions-cell [data-action="client-operations"] {white-space:nowrap}
  .orders-shell .filters {flex-wrap:wrap}
  .orders-shell .filters [data-filter="operation"] {min-width:155px;max-width:235px}
  .invoice-preview .invoice-representative b {font-weight:800;font-size:10px}
  html[data-theme="dark"] .zen-sales-operation {background:#24402f;border-color:#3b6849;color:#d3eedb}
  html[data-theme="dark"] .zen-linked-operation-item {background:#1b2b21;border-color:#344c3d}
  html[data-theme="dark"] .zen-operation-form {border-color:#35533f}
  @media(max-width:760px){
    .zen-linked-operation-item {align-items:flex-start}
    .clients-shell .actions-cell {justify-content:flex-start}
    .zen-operation-form-actions>* {flex:1}
  }
}


/* Refinamento da jornada ZenCaps — 20/10/2026.
   Somente apresentação em tela. Não altera layout de impressão/PDF. */
@media screen{
  :root{
    --zen-refine-border:#dce9df;
    --zen-refine-green:#0b8c4f;
    --zen-refine-secondary:#526e5c;
    --zen-refine-shadow:0 3px 10px rgba(15,51,27,.025),0 14px 28px rgba(15,51,27,.05);
  }
  /* Identidade consistente nas seis telas de trabalho. */
  :is(.dashboard-view,.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell)
  :is(.card,.table-card,.stat,.finance-panel){
    border-color:var(--zen-refine-border);
    box-shadow:var(--zen-refine-shadow);
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading{
    margin-bottom:18px;
    gap:12px 25px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading .eyebrow{
    margin-bottom:6px;
    letter-spacing:1.35px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading h1{
    line-height:1.15;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading p{
    color:#5b7664;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-card{
    overflow:hidden;
    isolation:isolate;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-card .table-toolbar{
    padding:17px 19px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll thead th{
    background:#f5f9f6;
    color:#5e7566;
    font-size:10px;
    letter-spacing:.09em;
    font-weight:800;
    white-space:nowrap;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll tbody tr{
    transition:background-color .12s ease;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll tbody tr:hover{
    background:#f6fbf7;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll tbody tr:focus-within{
    background:#f1f9f3;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .td-main{
    font-weight:800;
    color:#203e2a;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .td-sub{
    color:#667c6d;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll td.right{
    font-variant-numeric:tabular-nums;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .actions-cell .btn{
    border-radius:9px;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .actions-cell .btn:hover{
    border-color:#a8ccb6;
    background:#eef7f0;
  }
  :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .actions-cell .btn:focus-visible{
    outline:2px solid var(--zen-refine-green);
    outline-offset:2px;
  }
  .orders-shell :is(.table-toolbar,.orders-bulk-toolbar) .btn{
    min-height:33px;
  }
  .orders-shell .zen-sales-operation{
    max-width:180px;
    line-height:1.4;
    border-radius:999px;
    padding:5px 9px;
  }
  .orders-shell .filters{
    column-gap:7px;
    row-gap:9px;
  }
  .orders-shell .filters .searchbox{flex:1 1 260px;max-width:365px;}
  .orders-shell .filters .select{max-width:240px;}
  .orders-shell .orders-bulk-toolbar{
    padding-block:12px;
    gap:8px 10px;
  }
  .orders-shell .orders-bulk-toolbar>span{
    font-weight:650;
  }
  .orders-shell .zen-orders-pagination{
    min-height:68px;
  }
  .orders-shell .zen-orders-pagination-info{
    gap:7px 18px;
  }
  .clients-shell .client-name-cell{
    min-width:180px;
    align-items:center;
  }
  .clients-shell .client-notes-text{
    line-height:1.6;
    max-height:115px;
    overflow-y:auto;
    overflow-wrap:anywhere;
  }
  .clients-shell [data-action="client-operations"]{
    color:#156543;
    border-color:#cee5d5;
    background:#f3faf5;
  }
  .clients-shell [data-action="client-operations"]:hover{
    background:#e2f4e8;
  }
  .clients-shell .price-tag{
    border-radius:8px;
  }
  .products-shell .callout{
    background:linear-gradient(115deg,#eef8f1 0%,#fff 92%);
    border-color:#d8e8da;
    border-left:4px solid #26a86b;
    gap:22px;
  }
  .products-shell .callout b{font-size:15px;color:#204c32}
  .products-shell .table-scroll .td-main{font-size:13px}
  .products-shell .table-scroll td:nth-child(3){font-weight:700}
  .invoices-shell .grid4 .stat{
    border-radius:16px;
    min-height:138px;
  }
  .invoices-shell .grid4 .stat-value{
    font-size:clamp(21px,2vw,28px);
    font-variant-numeric:tabular-nums;
  }
  .invoices-shell .table-scroll td:nth-child(5),
  .invoices-shell .table-scroll td:nth-child(6){
    font-variant-numeric:tabular-nums;
  }
  .invoices-shell .zen-invoice-op-name{
    display:inline-block;
    margin-top:5px;
    padding:3px 7px;
    border:1px solid #dce9df;
    border-radius:7px;
    background:#f3f9f5;
    color:#336449;
    font-weight:700;
    font-size:11px;
    line-height:1.45;
  }
  .finance-shell .zen-finance-operation{
    display:block;
    margin-top:4px;
    color:#4a7d5a;
    font-size:11px;
    font-weight:700;
  }
  .finance-shell .finance-panel{
    border-radius:16px;
  }
  .finance-shell .finance-panel-title h2{
    letter-spacing:-.035em;
  }
  .finance-shell .finance-aging-fill{
    border-radius:999px;
  }
  .finance-shell .finance-metrics .stat-value{
    font-variant-numeric:tabular-nums;
  }
  .dashboard-view .stat-icon{transition:transform .16s ease}
  .dashboard-view .stat:hover .stat-icon{transform:translateY(-1px)}
  .dashboard-view .dashboard-daily-card .bar{
    transition:filter .16s ease,transform .16s ease;
  }
  .dashboard-view .dashboard-daily-card .bar-slot:hover .bar{
    filter:brightness(1.08);
  }
  .dashboard-view .content-grid .card-header h2{
    font-size:16px;
    letter-spacing:-.035em;
  }
  .dashboard-view .dashboard-movement-picker select{
    border-radius:10px;
  }
  /* Guia discreto de etapas (informativo; não é um wizard ou bloqueio). */
  .zen-journey{
    display:grid;
    grid-template-columns:repeat(var(--zen-journey-cols,3),minmax(0,1fr));
    gap:7px;
    margin:0 0 11px;
  }
  .zen-modal-invoice .zen-journey{--zen-journey-cols:4}
  .zen-journey-step{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    padding:10px 11px;
    font-size:11px;
    font-weight:700;
    line-height:1.4;
    color:#657d6b;
    border:1px solid #e0ebe3;
    border-radius:10px;
    background:#f7faf8;
  }
  .zen-journey-step span:last-child{overflow-wrap:anywhere}
  .zen-journey-number{
    display:grid;
    flex-shrink:0;
    place-items:center;
    width:22px;
    height:22px;
    border:1px solid #d3e4d8;
    border-radius:50%;
    background:white;
    color:#486b56;
    font-size:11px;
    font-weight:850;
  }
  .zen-journey-step.is-current{
    color:#135d38;
    background:#ecf8f0;
    border-color:#b8e0c5;
  }
  .zen-journey-step.is-current .zen-journey-number{
    background:#0b8f50;
    border-color:#0b8f50;
    color:#fff;
  }
  .zen-journey-step.is-done .zen-journey-number{
    color:#147447;
    border-color:#99cdaa;
    background:#e8f7ed;
  }
  .zen-journey-caption{
    padding:0 2px 17px;
    color:#587462;
    line-height:1.6;
    font-size:11.5px;
  }
  /* Fluxos críticos: descrição e seleção sempre precedem confirmação. */
  .zen-modal-invoice .zen-invoice-details{
    border:1px solid #dce9df;
    background:#f8fbf9;
    padding:17px;
    border-radius:13px;
    gap:14px;
    margin-bottom:16px;
  }
  .zen-modal-invoice .zen-invoice-details .zen-operation-filter{
    min-width:0;
  }
  .zen-modal-invoice .zen-invoice-details [data-invoice-input="operationId"]{
    border-color:#a4d2b4;
    background:#f1faf3;
    font-weight:700;
  }
  .zen-modal-invoice .invoice-kpis,
  .zen-modal-import-review .import-kpis{
    gap:10px;
  }
  .zen-modal-invoice .invoice-kpi,
  .zen-modal-import-review .import-kpis>div{
    border-radius:11px;
    padding:13px;
    background:#f4faf6;
  }
  .zen-modal-invoice .invoice-closeout-summary{
    border-radius:14px;
    border-left:4px solid #0c9b54;
    background:#f0faf3;
  }
  .zen-modal-invoice .invoice-closeout-net strong{font-variant-numeric:tabular-nums}
  .zen-modal-invoice .pick-row{
    line-height:1.5;
  }
  .zen-modal-invoice .pick-row:has(input:checked){
    background:#edf8f0;
  }
  .zen-modal-invoice .modal-foot,
  .zen-modal-import-review .modal-foot{
    justify-content:space-between;
    gap:10px;
  }
  .zen-modal-invoice .modal-foot .btn.primary,
  .zen-modal-import-review .modal-foot .btn.primary{
    min-height:42px;
    padding-inline:17px;
  }
  .zen-modal-upload .form-grid{
    padding:14px;
    border:1px solid #e0ece2;
    border-radius:13px;
    background:#f9fcfa;
  }
  .zen-modal-upload input[type="file"]{
    height:auto;
    padding-block:12px;
  }
  .zen-modal-import-review .import-topline{
    border-radius:11px;
    border-color:#cfe5d7;
    background:#f3faf5;
  }
  .zen-modal-import-review .import-bulk-section{
    border-radius:13px;
  }
  .zen-modal-import-review .import-table thead th{
    background:#edf6f0;
  }
  .zen-modal-import-review .import-table tbody tr:hover{
    background:#f4faf6;
  }
  .zen-modal-import-review .import-invalid{
    background:#fff8ec;
  }
  .zen-modal-import-review .import-summary{
    color:#365c42;
    line-height:1.55;
  }
  /* Cliente principal e operações vinculadas: hierarquia inequívoca. */
  .zen-modal-operations .modal-body{
    display:block;
  }
  .zen-operation-overview{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:11px;
    margin-bottom:17px;
  }
  .zen-operation-overview>div{
    border:1px solid #d9e9dd;
    background:linear-gradient(130deg,#f0faf3,#fff);
    border-radius:12px;
    padding:15px;
    display:flex;
    flex-direction:column;
    gap:6px;
  }
  .zen-operation-overview small{
    font-size:10px;
    font-weight:800;
    color:#54715d;
    text-transform:uppercase;
    letter-spacing:.055em;
  }
  .zen-operation-overview b{
    font-size:17px;
    color:#1c5130;
    overflow-wrap:anywhere;
    line-height:1.25;
  }
  .zen-operation-overview span{color:#617d6a;font-size:11px}
  .zen-operation-section-title{
    font-size:13px;
    font-weight:800;
    margin:0 0 11px;
  }
  .zen-modal-operations .zen-linked-operation-item{
    background:var(--white);
    border-color:#dce8de;
    border-radius:11px;
    margin:8px 0;
    min-height:69px;
  }
  .zen-modal-operations .zen-linked-operation-item.is-principal{
    background:#f5f8f6;
  }
  .zen-modal-operations .zen-linked-operation-item.is-inactive{
    opacity:.77;
    border-style:dashed;
  }
  .zen-operation-row-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
  }
  .zen-operation-status{
    border-radius:999px;
    border:1px solid #cee5d4;
    background:#eaf8ee;
    color:#287044;
    padding:4px 9px;
    font-size:10px;
    font-weight:750;
  }
  .zen-operation-status.is-off{
    background:#f4f5f4;
    border-color:#dce3de;
    color:#6d796e;
  }
  .zen-operation-empty{
    font-size:12px;
    margin:14px 0;
    padding:12px;
    background:#f7faf8;
    border:1px dashed #bfd9c7;
    border-radius:10px;
  }
  .zen-modal-operations .zen-operation-form{
    margin-top:20px;
    border:1px solid #cfdfd2;
    background:#f6faf7;
  }
  /* Dark: fundos e textos não herdam branco dos ajustes de contraste. */
  html[data-theme="dark"]{
    --zen-refine-border:#304638;
    --zen-refine-secondary:#bad1bf;
    --zen-refine-shadow:0 3px 9px #0003,0 14px 28px #0003;
  }
  html[data-theme="dark"] :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll thead th{
    background:#1b2b21;
    color:#bdd4c3;
  }
  html[data-theme="dark"] :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll tbody tr:hover,
  html[data-theme="dark"] :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll tbody tr:focus-within{
    background:#1d3023;
  }
  html[data-theme="dark"] :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .td-main{
    color:#e4f2e8;
  }
  html[data-theme="dark"] :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll .td-sub,
  html[data-theme="dark"] :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .page-heading p{
    color:#aec5b4;
  }
  html[data-theme="dark"] .products-shell .callout{
    background:linear-gradient(110deg,#1b3725,#17231b);
    border-color:#365840;
  }
  html[data-theme="dark"] .products-shell .callout b{color:#e2f2e8}
  html[data-theme="dark"] .invoices-shell .zen-invoice-op-name{
    background:#21392a;border-color:#3c634a;color:#c6ead2;
  }
  html[data-theme="dark"] .finance-shell .zen-finance-operation{color:#a2d6b1}
  html[data-theme="dark"] .zen-journey-step{
    background:#1b2b20;border-color:#35503c;color:#b9cdbd;
  }
  html[data-theme="dark"] .zen-journey-step.is-current{
    background:#1c3f2c;border-color:#427c51;color:#d9f7e1;
  }
  html[data-theme="dark"] .zen-journey-number{
    background:#182c20;color:#bce5c7;border-color:#43674c;
  }
  html[data-theme="dark"] .zen-journey-caption{color:#b1ccba}
  html[data-theme="dark"] .zen-modal-invoice .zen-invoice-details,
  html[data-theme="dark"] .zen-modal-upload .form-grid,
  html[data-theme="dark"] .zen-modal-operations .zen-operation-form{
    background:#1a2a20;border-color:#36543e;
  }
  html[data-theme="dark"] .zen-modal-invoice .zen-invoice-details [data-invoice-input="operationId"]{
    background:#213f2d;border-color:#4d835c;color:#e6f7ea;
  }
  html[data-theme="dark"] .zen-modal-invoice .pick-row:has(input:checked){
    background:#1f3a28;
  }
  html[data-theme="dark"] .zen-modal-invoice .invoice-closeout-summary{
    background:#1d3826;border-color:#386c47;
  }
  html[data-theme="dark"] .zen-modal-invoice .invoice-kpi,
  html[data-theme="dark"] .zen-modal-import-review .import-kpis>div,
  html[data-theme="dark"] .zen-modal-import-review .import-topline,
  html[data-theme="dark"] .zen-operation-overview>div,
  html[data-theme="dark"] .zen-modal-operations .zen-linked-operation-item,
  html[data-theme="dark"] .zen-operation-empty{
    background:#1c3022;border-color:#3a5741;color:#e0f1e5;
  }
  html[data-theme="dark"] .zen-operation-overview :is(small,span){color:#b4d1bd}
  html[data-theme="dark"] .zen-operation-overview b{color:#e9f8ed}
  html[data-theme="dark"] .zen-operation-status{background:#214530;border-color:#43724d;color:#c7eed3}
  html[data-theme="dark"] .zen-operation-status.is-off{background:#313833;color:#c5d0c5;border-color:#4b5a4e}
  html[data-theme="dark"] .zen-modal-operations .zen-linked-operation-item.is-principal{background:#202d24}
  html[data-theme="dark"] .zen-modal-import-review .import-table thead th{background:#203729}
  html[data-theme="dark"] .zen-modal-import-review .import-table tbody tr:hover{background:#213829}
  html[data-theme="dark"] .zen-modal-import-review .import-invalid{background:#453021}
  @media(max-width:1050px){
    .zen-modal-invoice .zen-invoice-details{grid-template-columns:repeat(2,minmax(0,1fr))}
    .orders-shell .filters .searchbox{max-width:none}
    .orders-shell .filters .select{max-width:none}
  }
  @media(max-width:680px){
    .zen-journey{grid-template-columns:1fr;gap:6px}
    .zen-journey-step{padding:7px 10px;min-height:34px}
    .zen-modal-invoice .zen-invoice-details{padding:12px;gap:10px}
    .zen-operation-overview{grid-template-columns:1fr}
    .zen-modal-operations .zen-linked-operation-item{gap:7px}
    .zen-modal-invoice .modal-foot,
    .zen-modal-import-review .modal-foot{justify-content:flex-end}
    .zen-modal-invoice .modal-foot .btn,
    .zen-modal-import-review .modal-foot .btn{flex:1 1 auto}
    .orders-shell .filters .searchbox,
    .orders-shell .filters .select{flex:1 1 100%;max-width:100%;min-width:0}
    .orders-shell .zen-orders-pagination-info{flex-direction:column}
    .products-shell .callout{align-items:stretch;flex-direction:column}
  }
  @media(prefers-reduced-motion:reduce){
    .dashboard-view .stat-icon,
    .dashboard-view .dashboard-daily-card .bar,
    :is(.orders-shell,.clients-shell,.products-shell,.invoices-shell,.finance-shell) .table-scroll tbody tr{transition:none}
  }
}


/* CLIENTES • Painel comercial e cadastro operacional
   Restrito à tela: não altera layout de impressão ou fatura PDF. */
@media screen {
  .clients-shell .zen-client-metrics{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:13px;
    margin:2px 0 17px;
  }
  .clients-shell .zen-client-metric{
    min-width:0;min-height:121px;
    padding:17px 18px 15px;
    display:flex;flex-direction:column;
    border:1px solid #d7e7dc;
    border-radius:15px;
    background:linear-gradient(150deg,#ffffff 65%,#f5fbf7);
    box-shadow:0 4px 12px rgba(18,64,35,.035),0 13px 27px rgba(18,64,35,.035);
    position:relative;
  }
  .clients-shell .zen-client-metric::after{
    content:"";height:2px;position:absolute;
    bottom:0;left:18px;right:18px;
    background:linear-gradient(90deg,#10a85e,#c7e9d3);
    opacity:.78;border-radius:2px;
  }
  .clients-shell .zen-client-metric-top{
    display:flex;justify-content:space-between;align-items:start;
    gap:9px;min-height:32px;
  }
  .clients-shell .zen-client-metric-top>span:first-child{
    color:#5b7866;font-size:10px;font-weight:850;line-height:1.5;
    text-transform:uppercase;letter-spacing:.075em;
    overflow-wrap:anywhere;
  }
  .clients-shell .zen-client-metric-icon{
    height:31px;width:31px;flex:0 0 31px;
    display:grid;place-items:center;border-radius:10px;
    color:#108d51;background:#e6f6ed;
  }
  .clients-shell .zen-client-metric:nth-child(3) .zen-client-metric-icon{
    color:#4869a0;background:#e8effb;
  }
  .clients-shell .zen-client-metric:nth-child(4) .zen-client-metric-icon{
    color:#7961a4;background:#f0eafa;
  }
  .clients-shell .zen-client-metric strong{
    font-size:28px;letter-spacing:-.06em;line-height:1.23;
    color:#1a432d;font-weight:870;font-variant-numeric:tabular-nums;
    margin:2px 0 3px;
  }
  .clients-shell .zen-client-metric small{
    color:#6c8473;font-size:11px;line-height:1.5;
  }
  .clients-shell .zen-client-list-card .zen-clients-toolbar{
    background:linear-gradient(100deg,#f7fbf8,#fff);
    align-items:center;
    border-bottom:1px solid #e1ece4;
    padding:17px 18px;
  }
  .clients-shell .zen-client-list-card .zen-clients-toolbar .searchbox{
    width:min(385px,100%);max-width:100%;min-width:230px;
  }
  .clients-shell .zen-clients-table{min-width:1140px}
  .clients-shell .zen-clients-table thead th{
    padding-top:15px;padding-bottom:15px;white-space:nowrap;
  }
  .clients-shell .zen-clients-table tbody td{
    padding-top:15px;padding-bottom:15px;vertical-align:middle;
  }
  .clients-shell .zen-clients-table tbody td:first-child{
    min-width:198px;
  }
  .clients-shell .zen-clients-table tbody td:nth-child(3){
    min-width:185px;max-width:275px;
  }
  .clients-shell .zen-clients-table tbody td:nth-child(4){
    min-width:200px;max-width:360px;
  }
  .clients-shell .zen-clients-table .td-main{
    font-size:12.5px;letter-spacing:-.01em;
  }
  .clients-shell .zen-clients-table .td-sub{
    line-height:1.65;font-size:11px;
  }
  .clients-shell .zen-client-operation-link{
    display:inline-flex;align-items:center;flex-wrap:wrap;gap:5px;
    border:1px solid #cbdfd2;border-radius:7px;background:#f0f8f2;
    color:#216943;font-size:10px;font-weight:780;
    margin-top:7px;padding:4px 7px;cursor:pointer;text-align:left;
    transition:background .15s ease,border-color .15s ease;
  }
  .clients-shell .zen-client-operation-link:hover{
    background:#e0f1e7;border-color:#a7d4b5;
  }
  .clients-shell .zen-client-operation-link:focus-visible{
    outline:3px solid #48bc80;outline-offset:2px;
  }
  .clients-shell .zen-clients-table .client-notes-text{
    font-size:11px;line-height:1.6;padding:10px 12px;
    background:#f3f9f5;border-left:3px solid #68b587;
    max-height:150px;overflow:auto;white-space:pre-line;
  }
  .clients-shell .zen-clients-table .client-notes-cell .muted{
    font-size:11px;color:#82968a;
  }
  .clients-shell .zen-clients-table .price-tags{
    align-content:flex-start;gap:6px;
  }
  .clients-shell .zen-clients-table .price-tag{
    display:inline-flex;align-items:center;
    max-width:100%;white-space:normal;line-height:1.35;
    background:#eef8f1;color:#286343;
  }
  .clients-shell .zen-clients-table .zen-billing-badge{
    max-width:135px;text-align:center;justify-content:center;
    padding:7px 9px;white-space:normal;
  }
  .clients-shell .zen-clients-table .actions-cell{
    display:flex;align-items:center;justify-content:flex-end;
    flex-wrap:wrap;gap:5px;min-width:173px;
  }
  .clients-shell .zen-clients-table .actions-cell .btn{
    transition:background .15s ease,border-color .15s ease,transform .15s ease;
  }
  .clients-shell .zen-clients-table .actions-cell .btn:hover:not(:disabled){
    transform:translateY(-1px);
  }
  .clients-shell .zen-clients-table .actions-cell [data-action="delete-client"]{
    color:#ae4f4d;border-color:#ebd5d4;
  }
  .clients-shell .zen-clients-table .actions-cell [data-action="delete-client"]:hover{
    background:#fff0ee;border-color:#dcaaa8;
  }
  .clients-shell .zen-client-list-card + .footer-note{
    color:#758d7c;font-size:11px;margin-top:12px;
  }
  html[data-theme="dark"] .clients-shell .zen-client-metric{
    background:linear-gradient(150deg,#1b2d21,#1a2b20);
    border-color:#34503b;
    box-shadow:0 5px 17px #0003;
  }
  html[data-theme="dark"] .clients-shell .zen-client-metric-top>span:first-child,
  html[data-theme="dark"] .clients-shell .zen-client-metric small{
    color:#b7d0bf;
  }
  html[data-theme="dark"] .clients-shell .zen-client-metric strong{color:#e3f6e9}
  html[data-theme="dark"] .clients-shell .zen-client-metric-icon{
    background:#244d35;color:#b7ebc9;
  }
  html[data-theme="dark"] .clients-shell .zen-client-metric:nth-child(3) .zen-client-metric-icon{
    background:#2a3f58;color:#b8d0f4;
  }
  html[data-theme="dark"] .clients-shell .zen-client-metric:nth-child(4) .zen-client-metric-icon{
    background:#3b3153;color:#dfcbf7;
  }
  html[data-theme="dark"] .clients-shell .zen-client-list-card .zen-clients-toolbar{
    background:linear-gradient(90deg,#1e3023,#1b2b20);
    border-color:#395541;
  }
  html[data-theme="dark"] .clients-shell .zen-client-operation-link{
    color:#c1eed0;background:#233d2a;border-color:#42674b;
  }
  html[data-theme="dark"] .clients-shell .zen-client-operation-link:hover{
    background:#2b5237;border-color:#6eaa80;
  }
  html[data-theme="dark"] .clients-shell .zen-clients-table .client-notes-text{
    background:#23382a;color:#e4f1e8;border-color:#6fac82;
  }
  html[data-theme="dark"] .clients-shell .zen-clients-table .price-tag{
    background:#20392a;color:#d7f0df;border-color:#40664a;
  }
  html[data-theme="dark"] .clients-shell .zen-clients-table .actions-cell [data-action="delete-client"]{
    color:#f0b5af;border-color:#714b4a;
  }
  html[data-theme="dark"] .clients-shell .zen-clients-table .actions-cell [data-action="delete-client"]:hover{
    background:#573535;
  }
  @media(max-width:1120px){
    .clients-shell .zen-client-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  }
  @media(max-width:600px){
    .clients-shell .zen-client-metrics{gap:9px}
    .clients-shell .zen-client-metric{min-height:112px;padding:12px}
    .clients-shell .zen-client-metric-top>span:first-child{font-size:9px}
    .clients-shell .zen-client-metric strong{font-size:23px}
    .clients-shell .zen-client-metric small{font-size:10px}
    .clients-shell .zen-client-list-card .zen-clients-toolbar{padding:14px}
    .clients-shell .zen-client-list-card .zen-clients-toolbar .searchbox{min-width:0;width:100%}
  }
  @media(prefers-reduced-motion:reduce){
    .clients-shell .zen-clients-table .actions-cell .btn,
    .clients-shell .zen-client-operation-link{transition:none}
  }
}


/* VENDAS — acabamento visual aprovado (20/10/2026).
   Somente apresentação. Não altera dados, formulários de fatura ou impressão/PDF. */
@media screen {
  .orders-shell {
    --zen-sales-green:#079b57;
    --zen-sales-ink:#203b2b;
    --zen-sales-muted:#637c6b;
    --zen-sales-border:#dbe8df;
    --zen-sales-soft:#f6faf7;
  }
  .orders-shell .page-heading {
    margin:0 0 18px;
    min-height:48px;
    gap:14px 22px;
    align-items:center;
  }
  .orders-shell .page-heading .eyebrow {
    letter-spacing:.135em;
    color:#098349;
    font-weight:850;
  }
  .orders-shell .page-heading p {
    font-size:11.5px;
    line-height:1.65;
    max-width:740px;
    color:#5a7865;
  }
  .orders-shell .heading-actions {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:9px;
  }
  .orders-shell .heading-actions .btn {
    min-height:40px;
    padding:9px 14px;
    border-radius:10px;
    font-weight:760;
    box-shadow:0 3px 10px rgba(15,65,36,.035);
  }
  .orders-shell .heading-actions .btn.primary {
    box-shadow:0 6px 16px rgba(5,134,73,.16);
  }
  .orders-shell .heading-actions .btn svg {flex:0 0 auto}

  /* Resumo com ícone e fundo leve, sem competir com a tabela. */
  .orders-shell .zen-sales-callout {
    position:relative;
    isolation:isolate;
    display:flex;
    align-items:center;
    gap:17px;
    padding:18px 22px;
    min-height:94px;
    margin-bottom:18px;
    overflow:hidden;
    border:1px solid #d4e8db;
    border-left:4px solid #09a464;
    border-radius:17px;
    background:linear-gradient(108deg,#edf9f1 0%,#f7fcf8 56%,#fff 100%);
    box-shadow:0 4px 12px rgba(20,58,37,.035),0 14px 28px rgba(20,58,37,.045);
  }
  .orders-shell .zen-sales-callout::before{
    content:"";position:absolute;pointer-events:none;
    z-index:-1;right:9%;bottom:-83px;
    width:52%;height:132px;border-radius:50%;
    background:rgba(56,190,118,.045);transform:rotate(-10deg);
  }
  .orders-shell .zen-sales-callout::after{
    content:"";position:absolute;pointer-events:none;
    z-index:-1;right:-12%;top:33px;
    width:64%;height:100px;border-radius:50%;
    background:rgba(50,177,114,.035);transform:rotate(-7deg);
  }
  .orders-shell .zen-sales-callout-symbol{
    display:grid;place-items:center;flex:0 0 47px;
    width:47px;height:47px;border-radius:50%;
    color:#008f4b;background:#d9f4e3;
  }
  .orders-shell .zen-sales-callout-symbol svg{width:23px;height:23px}
  .orders-shell .zen-sales-callout-copy {
    flex:1 1 auto;min-width:0;
  }
  .orders-shell .zen-sales-callout-copy b {
    font-size:16px;line-height:1.4;font-weight:850;
    letter-spacing:-.035em;color:#153e27;
  }
  .orders-shell .zen-sales-callout-copy p {
    max-width:830px;margin:5px 0 0;
    font-size:11.5px;line-height:1.6;color:#668573;
  }
  .orders-shell .zen-sales-callout .zen-sales-callout-cta{
    display:inline-flex;align-items:center;justify-content:center;
    gap:8px;min-height:43px;padding:10px 18px;
    border-radius:10px;white-space:nowrap;
    color:#fff;border:1px solid #079a53;background:linear-gradient(#0bab63,#008a48);
    box-shadow:0 7px 16px rgba(6,135,68,.15);
    font-weight:800;flex-shrink:0;
  }
  .orders-shell .zen-sales-callout-cta:hover:not(:disabled){
    filter:brightness(1.04);box-shadow:0 9px 22px rgba(6,135,68,.20);
  }

  /* Ferramentas superiores: buscar à esquerda, filtros ordenados à direita. */
  .orders-shell .zen-sales-table-card{
    overflow:hidden;isolation:isolate;
    border:1px solid #d7e5db;border-radius:17px;
    box-shadow:0 3px 11px rgba(25,65,41,.035),0 16px 32px rgba(25,65,41,.055);
  }
  .orders-shell .zen-sales-table-card .zen-sales-main-toolbar{
    display:grid;
    grid-template-columns:minmax(245px,auto) minmax(0,1fr);
    align-items:center;column-gap:15px;
    padding:17px 18px;
    min-height:67px;background:linear-gradient(120deg,#fff,#fdfefd);
    border-bottom:1px solid #e2ece5;
  }
  .orders-shell .zen-sales-main-toolbar>b{
    color:var(--zen-sales-ink);
    font-size:15px;font-weight:850;
    white-space:nowrap;letter-spacing:-.035em;
  }
  .orders-shell .zen-sales-main-toolbar>b .muted{
    color:#728a79;font-weight:750;
  }
  .orders-shell .zen-sales-main-toolbar .filters{
    display:grid;
    width:100%;
    flex:none;
    grid-template-columns:minmax(190px,1.55fr) minmax(105px,.85fr) minmax(154px,1.06fr) minmax(100px,.82fr) minmax(118px,.85fr);
    gap:8px;
    align-items:center;
    justify-content:end;
  }
  .orders-shell .zen-sales-main-toolbar .filters .searchbox{
    box-sizing:border-box;
    height:40px;width:100%;min-width:0;max-width:none;
    padding:0 12px;
    border:1px solid var(--zen-sales-border);border-radius:11px;
    background:#fff;box-shadow:0 1px 3px rgba(30,70,40,.02);
  }
  .orders-shell .zen-sales-main-toolbar .filters .searchbox input{
    width:100%;min-width:0;font-size:11.5px;
  }
  .orders-shell .zen-sales-main-toolbar .filters .searchbox svg{flex-shrink:0;color:#789688}
  .orders-shell .zen-sales-main-toolbar .filters .select{
    width:100%;min-width:0;max-width:none;
    min-height:40px;padding:9px 11px;
    color:#344d3b;font-size:11.5px;
    border:1px solid var(--zen-sales-border);border-radius:11px;
    background-color:#fff;
    text-overflow:ellipsis;
  }
  .orders-shell .zen-sales-main-toolbar .filters :is(.searchbox,.select):focus-within{
    border-color:#6ebf8b;box-shadow:0 0 0 3px rgba(8,155,83,.105);
  }

  .orders-shell .zen-sales-table-card .zen-sales-period-toolbar{
    display:flex;align-items:center;flex-wrap:wrap;
    gap:10px;min-height:62px;
    padding:11px 18px!important;
    border-top:0!important;border-bottom:1px solid #e2ece5;
    background:#fafcfb;
  }
  .orders-shell .zen-sales-period-label{
    display:inline-flex;align-items:center;gap:9px;
    color:#668171;font-size:11.5px;font-weight:700;
    white-space:nowrap;
  }
  .orders-shell .zen-sales-calendar{
    display:grid;place-items:center;flex-shrink:0;
    width:33px;height:33px;
    border:1px solid #e1eee5;border-radius:9px;
    background:#fff;color:#517561;
  }
  .orders-shell .zen-sales-period-toolbar .filter-date{
    height:38px;min-width:124px;max-width:160px;
    font-size:11.5px;color:#375444;background:#fff;
    border:1px solid #dce9e1;border-radius:10px;
  }
  .orders-shell .zen-sales-period-toolbar .zen-sales-clear{
    display:inline-flex;align-items:center;gap:7px;
    margin-left:7px;
    color:#305b43;font-weight:760;border-color:transparent;
    background:transparent;
  }
  .orders-shell .zen-sales-period-toolbar .zen-sales-clear:hover{
    background:#e9f5ec;border-color:#d4e5d8;
  }

  .orders-shell .zen-sales-bulkbar{
    display:flex;align-items:center;flex-wrap:wrap;
    gap:9px 12px;
    min-height:66px;
    padding:12px 17px;
    background:linear-gradient(110deg,#f0f8f3,#f7fbf8);
    border-top:0;border-bottom:1px solid #dce9df;
  }
  .orders-shell .zen-sales-bulkbar>span{
    flex:1 1 265px;
    min-width:0;font-size:11.5px;line-height:1.6;
    color:#526c5a;font-weight:650;
  }
  .orders-shell .zen-sales-bulkbar>span b{font-weight:850;color:#23563a}
  .orders-shell .zen-sales-bulk-all{
    display:flex;align-items:center;
    width:21px;flex:0 0 21px;cursor:pointer;
  }
  .orders-shell .zen-sales-bulk-actions{
    display:flex;align-items:center;gap:8px;flex-wrap:wrap;
    margin-left:auto;
  }
  .orders-shell .zen-sales-bulk-actions .btn {
    display:inline-flex;align-items:center;justify-content:center;gap:6px;
    min-height:37px;
    padding:7px 11px;
    border:1px solid #dbe9df;border-radius:10px;
    background:#fff;color:#315740;font-size:11px;font-weight:750;
    white-space:nowrap;
  }
  .orders-shell .zen-sales-bulk-actions [data-action="bulk-select-all"]{
    color:#127f49;background:#effaf2;border-color:#ccebd7;
  }
  .orders-shell .zen-sales-bulk-actions [data-action="bulk-delete"]{
    color:#c44848;background:#fffafa;border-color:#f1d9d8;
  }
  .orders-shell .zen-sales-bulk-actions .btn:disabled{
    opacity:.46;cursor:not-allowed;box-shadow:none;
  }
  .orders-shell .zen-sales-bulk-actions .btn:not(:disabled):hover{
    border-color:#91cba6;background:#eaf7ed;
  }
  .orders-shell .zen-sales-bulk-actions [data-action="bulk-delete"]:not(:disabled):hover{
    background:#fff0ef;border-color:#e9b3b0;
  }

  /* Tabela: mais respiro, colunas financeiras alinhadas e badges discretas. */
  .orders-shell .zen-sales-table-scroll{max-width:100%;overflow-x:auto;scrollbar-gutter:stable}
  .orders-shell .zen-sales-data-table{
    width:100%;min-width:1270px;table-layout:fixed;border-collapse:separate;border-spacing:0;
  }
  .orders-shell .zen-sales-data-table th{
    padding:14px 10px;
    background:#f3f8f5;color:#5b7466;
    font-size:10px;font-weight:850;
    letter-spacing:.065em;line-height:1.4;
    border-bottom:1px solid #e0ece3;
  }
  .orders-shell .zen-sales-data-table th:nth-child(1){width:3%}
  .orders-shell .zen-sales-data-table th:nth-child(2){width:7.2%}
  .orders-shell .zen-sales-data-table th:nth-child(3){width:31%}
  .orders-shell .zen-sales-data-table th:nth-child(4){width:10%}
  .orders-shell .zen-sales-data-table th:nth-child(5){width:8%}
  .orders-shell .zen-sales-data-table th:nth-child(6){width:4.5%}
  .orders-shell .zen-sales-data-table th:nth-child(7){width:7%}
  .orders-shell .zen-sales-data-table th:nth-child(8){width:6%}
  .orders-shell .zen-sales-data-table th:nth-child(9){width:7.3%}
  .orders-shell .zen-sales-data-table th:nth-child(10){width:8%}
  .orders-shell .zen-sales-data-table th:nth-child(11){width:8%}
  .orders-shell .zen-sales-data-table tbody tr{background:#fff}
  .orders-shell .zen-sales-data-table tbody tr:nth-child(even){background:#fcfefd}
  .orders-shell .zen-sales-data-table tbody tr:hover{background:#eff8f2}
  .orders-shell .zen-sales-data-table td{
    padding:15px 10px;vertical-align:middle;
    color:#31483a;line-height:1.48;font-size:11.5px;
    border-bottom:1px solid #eaf0eb;
  }
  .orders-shell .zen-sales-data-table td:nth-child(1),
  .orders-shell .zen-sales-data-table th:nth-child(1){padding-left:16px;padding-right:4px}
  .orders-shell .zen-sales-data-table td:nth-child(11),
  .orders-shell .zen-sales-data-table th:nth-child(11){padding-right:15px}
  .orders-shell .zen-sales-data-table input[type="checkbox"],
  .orders-shell .zen-sales-bulkbar input[type="checkbox"]{
    width:17px;height:17px;cursor:pointer;
    accent-color:#058c4d;vertical-align:middle;
  }
  .orders-shell .zen-sales-data-table .td-main{
    font-size:12.5px;line-height:1.45;
    font-weight:850;color:#1f402b;letter-spacing:-.02em;
  }
  .orders-shell .zen-sales-data-table .td-sub{
    font-size:11px;line-height:1.55;letter-spacing:0;
    color:#687f6f;overflow-wrap:anywhere;
  }
  .orders-shell .zen-sales-data-table td:nth-child(6),
  .orders-shell .zen-sales-data-table td:nth-child(7),
  .orders-shell .zen-sales-data-table td:nth-child(8),
  .orders-shell .zen-sales-data-table td:nth-child(9){
    font-variant-numeric:tabular-nums;
    white-space:nowrap;
  }
  .orders-shell .zen-sales-data-table td:nth-child(9) b{
    color:#116739;font-weight:850;font-size:12.5px;letter-spacing:-.025em;
  }
  .orders-shell .zen-sales-operation{
    display:inline-flex;align-items:center;gap:7px;
    padding:7px 9px;max-width:100%;
    border:1px solid #cfe6d8;
    border-radius:12px;background:#e9f7ef;
    color:#235c3e;font-size:10.5px;font-weight:800;
    line-height:1.45;overflow-wrap:anywhere;
    white-space:normal;
  }
  .orders-shell .zen-sales-operation svg{flex:0 0 14px}
  .orders-shell .zen-sales-type,
  .orders-shell .zen-sales-state{
    display:inline-flex;align-items:center;gap:5px;
    width:max-content;max-width:100%;
    padding:4px 7px;border-radius:999px;
  }
  .orders-shell .zen-sales-type{color:#0b8a50;background:#e7f8ee}
  .orders-shell .zen-sales-state{color:#ad711d;background:#fff5e4}
  .orders-shell .zen-sales-state-pago{color:#098b51;background:#e7f7ed}
  .orders-shell .zen-sales-state-faturado{color:#3c64a1;background:#edf4ff}
  .orders-shell .zen-sales-type :is(.badge),
  .orders-shell .zen-sales-state :is(.badge){
    padding:0;border:0;box-shadow:none;
    background:transparent;color:inherit;
    font-size:10.5px;font-weight:800;white-space:nowrap;
  }
  .orders-shell .zen-sales-type>svg,
  .orders-shell .zen-sales-state>svg{flex:0 0 13px}
  .orders-shell .zen-sales-row-actions{
    display:flex;justify-content:flex-end;align-items:center;flex-wrap:nowrap;gap:6px;
  }
  .orders-shell .zen-sales-row-actions .btn{
    display:inline-grid;place-items:center;
    min-width:31px;width:31px;height:32px;min-height:32px;padding:0;
    border:1px solid #dce8e0;border-radius:9px;background:#fff;
    color:#335a44;box-shadow:0 1px 3px rgba(31,71,41,.025);
  }
  .orders-shell .zen-sales-row-actions .btn:hover:not(:disabled){
    color:#117c48;border-color:#abd6b8;background:#edf8f1;
  }
  .orders-shell .zen-sales-row-actions [data-action="delete-order"]{
    color:#cc4b53;border-color:#f2d9db;background:#fffafa;
  }
  .orders-shell .zen-sales-row-actions [data-action="delete-order"]:hover:not(:disabled){
    color:#b9323c;border-color:#e8b4bb;background:#ffeded;
  }
  .orders-shell :is(.zen-sales-bulk-all input,.zen-sales-data-table input,.zen-sales-row-actions .btn,.zen-sales-main-toolbar .select):focus-visible{
    outline:2px solid #09944f;outline-offset:3px;
  }
  .orders-shell .zen-orders-pagination{
    background:#fbfdfb;border-color:#dce9df;
    min-height:70px;padding:15px 18px;
  }

  /* Temas: manter contraste e a leitura dos estados, sem afetar outros módulos. */
  html[data-theme="dark"] .orders-shell{
    --zen-sales-ink:#e0f5e5;
    --zen-sales-muted:#bbd3c1;
    --zen-sales-border:#395542;
  }
  html[data-theme="dark"] .orders-shell .page-heading p{color:#bfd3c3}
  html[data-theme="dark"] .orders-shell .zen-sales-callout{
    background:linear-gradient(110deg,#1c3a29,#1b2e23 65%,#18261f);
    border-color:#44664d;border-left-color:#32bc78;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-callout-symbol{
    background:#244e35;color:#b7ebc7;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-callout-copy b{color:#e5f7e9}
  html[data-theme="dark"] .orders-shell .zen-sales-callout-copy p{color:#bed4c4}
  html[data-theme="dark"] .orders-shell .zen-sales-table-card{border-color:#395641}
  html[data-theme="dark"] .orders-shell .zen-sales-main-toolbar{
    background:linear-gradient(100deg,#1c2e23,#1b2b21);border-color:#395641;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-main-toolbar>b .muted{color:#b5d0be}
  html[data-theme="dark"] .orders-shell .zen-sales-main-toolbar .filters :is(.searchbox,.select),
  html[data-theme="dark"] .orders-shell .zen-sales-period-toolbar .filter-date,
  html[data-theme="dark"] .orders-shell .zen-sales-calendar{
    background:#1c2c22;color:#e7f2e9;border-color:#3c5944;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-main-toolbar .filters .searchbox input{color:#e7f2e9}
  html[data-theme="dark"] .orders-shell .zen-sales-period-toolbar{
    background:#1a2b20;border-color:#37533f;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-period-label{color:#c1d9c7}
  html[data-theme="dark"] .orders-shell .zen-sales-period-toolbar .zen-sales-clear{color:#d5efdc}
  html[data-theme="dark"] .orders-shell .zen-sales-bulkbar{
    background:linear-gradient(90deg,#1e3928,#203328);border-color:#375941;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-bulkbar>span{color:#c4d9c9}
  html[data-theme="dark"] .orders-shell .zen-sales-bulkbar>span b{color:#d2f4da}
  html[data-theme="dark"] .orders-shell .zen-sales-bulk-actions .btn{
    color:#def2e4;background:#213b2b;border-color:#49614f;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-bulk-actions .btn:disabled{opacity:.52}
  html[data-theme="dark"] .orders-shell .zen-sales-bulk-actions [data-action="bulk-delete"]{
    color:#ffbfc2;background:#3b262b;border-color:#69454b;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-data-table th{
    background:#203729;color:#bcd2c2;border-color:#385440;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-data-table tbody tr{background:#1b2920}
  html[data-theme="dark"] .orders-shell .zen-sales-data-table tbody tr:nth-child(even){background:#1e2f24}
  html[data-theme="dark"] .orders-shell .zen-sales-data-table tbody tr:hover{background:#264130}
  html[data-theme="dark"] .orders-shell .zen-sales-data-table td{
    color:#d7e8dc;border-color:#35483c;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-data-table .td-main{color:#eff8f0}
  html[data-theme="dark"] .orders-shell .zen-sales-data-table .td-sub{color:#bed0c3}
  html[data-theme="dark"] .orders-shell .zen-sales-data-table td:nth-child(9) b{color:#c7f3d7}
  html[data-theme="dark"] .orders-shell .zen-sales-operation{
    color:#d4f2de;background:#244534;border-color:#487359;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-type{color:#b4f0cf;background:#234836}
  html[data-theme="dark"] .orders-shell .zen-sales-state{color:#f5d5a3;background:#473826}
  html[data-theme="dark"] .orders-shell .zen-sales-state-pago{color:#bef3cf;background:#25442f}
  html[data-theme="dark"] .orders-shell .zen-sales-state-faturado{color:#d2e2ff;background:#263c57}
  html[data-theme="dark"] .orders-shell .zen-sales-row-actions .btn{
    background:#203629;color:#d5e8da;border-color:#496252;
  }
  html[data-theme="dark"] .orders-shell .zen-sales-row-actions [data-action="delete-order"]{
    color:#f4b7b7;background:#39292b;border-color:#765051;
  }
  html[data-theme="dark"] .orders-shell .zen-orders-pagination{
    background:#1c3022;border-color:#38513e;
  }

  @media (max-width:1500px){
    .orders-shell .zen-sales-table-card .zen-sales-main-toolbar{
      grid-template-columns:1fr;gap:13px;
    }
    .orders-shell .zen-sales-main-toolbar .filters{width:100%}
  }
  @media (max-width:1000px){
    .orders-shell .zen-sales-main-toolbar .filters{
      grid-template-columns:minmax(190px,2fr) repeat(2,minmax(120px,1fr));
    }
    .orders-shell .zen-sales-main-toolbar .filters .searchbox{grid-column:span 1}
    .orders-shell .zen-sales-bulk-actions{margin-left:0}
  }
  @media (max-width:680px){
    .orders-shell .zen-sales-callout{
      padding:15px;gap:10px;flex-wrap:wrap;
    }
    .orders-shell .zen-sales-callout-symbol{
      flex-basis:39px;width:39px;height:39px;
    }
    .orders-shell .zen-sales-callout-copy{flex:1 1 calc(100% - 65px)}
    .orders-shell .zen-sales-callout-copy b{font-size:14px}
    .orders-shell .zen-sales-callout .zen-sales-callout-cta{width:100%}
    .orders-shell .zen-sales-main-toolbar .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
    .orders-shell .zen-sales-main-toolbar .filters .searchbox{grid-column:1/-1}
    .orders-shell .zen-sales-main-toolbar .filters .select{min-width:0;max-width:100%}
    .orders-shell .zen-sales-period-toolbar .zen-sales-clear{margin-left:0}
    .orders-shell .zen-sales-bulkbar{gap:8px}
    .orders-shell .zen-sales-bulk-actions{width:100%}
    .orders-shell .zen-sales-bulk-actions .btn{flex:1 1 auto}
  }
  @media(prefers-reduced-motion:reduce){
    .orders-shell .zen-sales-row-actions .btn,
    .orders-shell .zen-sales-callout-cta{transition:none}
  }
}
