/* ZenCaps | Aparência claro / black. O CSS original continua sendo a fonte do tema claro. */
.topbar .topbar-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.theme-icon-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid #d9e5dc;
  border-radius:11px;
  background:#f5faf6;
  color:#315d3e;
  cursor:pointer;
  transition:background .15s,border-color .15s,transform .15s;
}
.theme-icon-toggle:hover{background:#e8f6ec;border-color:#a7d3b5}
.theme-icon-toggle:active{transform:scale(.96)}
.theme-icon-toggle:focus-visible{outline:2px solid #159956;outline-offset:3px}
html[data-theme="dark"] .theme-icon-toggle{
  background:#223428;
  border-color:#3c5a44;
  color:#ffda85;
}
html[data-theme="dark"] .theme-icon-toggle:hover{
  background:#2d4834;
  border-color:#5b8867;
}
.settings-shell .settings-masonry{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start}
.settings-shell .settings-column{display:grid;gap:17px;min-width:0;align-content:start}
.settings-shell .settings-card{min-width:0}
.settings-shell .settings-security-card .zen-password-settings{
  margin:0;
  border:0;
  padding:0;
  background:transparent;
}
.settings-shell .settings-maintenance-card .btn,
.settings-shell .settings-import-card .btn{max-width:100%}
@media(max-width:1180px){
  .settings-shell .settings-masonry{grid-template-columns:1fr}
}
@media(max-width:620px){
  .settings-shell .settings-column{gap:13px}
}
@media(prefers-reduced-motion:reduce){
  .theme-icon-toggle{transition:none}
}

@media screen{
  :root[data-theme="dark"]{
    color-scheme:dark;
    --green:#20c875;
    --green-d:#12a55b;
    --green-soft:#123c28;
    --ink:#e6f0e8;
    --muted:#9fb1a3;
    --line:#293b30;
    --bg:#0a0f0d;
    --white:#141e18;
    --black:#080d0a;
    --amber:#ffc36b;
    --amber-soft:#3b2d19;
    --red:#ff858a;
    --red-soft:#3f2025;
    --blue:#82b7ff;
    --blue-soft:#192e48;
    --shadow:0 9px 30px rgba(0,0,0,.22);
  }
  html[data-theme="dark"],html[data-theme="dark"] body{
    background:#0a0f0d;
    color:#e6f0e8;
  }
  html[data-theme="dark"] :is(h1,h2,h3,strong,b,.topbar-title,.td-main,.stat-value,.empty strong){
    color:#e6f0e8;
  }
  html[data-theme="dark"] :is(p,small,.muted,.td-sub,.footer-note,.stat-foot,.card-header p){
    color:#9eafa2;
  }
  html[data-theme="dark"] .sidebar{
    background:linear-gradient(175deg,#0b1b11 0%,#0b140f 56%,#090f0c 100%);
    border-color:#274432;
  }
  html[data-theme="dark"] .topbar{
    background:#0f1712;
    border-bottom:1px solid #263b2d;
  }
  html[data-theme="dark"] .mobile-menu,
  html[data-theme="dark"] .sidebar-close{
    background:#182a1e;
    border-color:#36503c;
    color:#e8f4ea;
  }
  html[data-theme="dark"] :is(
    .card,.table-card,.modal,.settings-card,.finance-panel,
    .staff-role-panel,.staff-secret,.invoice-preview,.invoice-kpi,
    .finance-highlight,.balance-header
  ){
    background:#151e18;
    border-color:#2d4033;
    color:#e6f0e8;
    box-shadow:0 4px 12px #0002,0 14px 32px #0003;
  }
  html[data-theme="dark"] :is(
    .dashboard-view .stat,.dashboard-view .content-grid>.card,.dashboard-view .table-card,
    .orders-shell .table-card,.clients-shell .table-card,.products-shell .table-card,
    .invoices-shell .stat,.invoices-shell .table-card,
    .finance-shell .finance-metrics .stat,.finance-shell .finance-top-grid>.finance-panel,
    .finance-shell .table-card,.settings-shell .settings-card,
    .users-shell .staff-metrics .stat,.users-shell .staff-role-panel,.users-shell .table-card
  ){
    background:#151e18;
    border-color:#304638;
    box-shadow:0 3px 9px #0003,0 15px 32px #0003;
  }
  html[data-theme="dark"] :is(
    .dashboard-view .stat:hover,.invoices-shell .stat:hover,
    .finance-shell .finance-metrics .stat:hover,.users-shell .staff-metrics .stat:hover
  ){
    background:#1b2820;
    border-color:#40624b;
    box-shadow:0 5px 12px #0004,0 18px 36px #0003;
  }
  html[data-theme="dark"] :is(
    .dashboard-view .stat-value,.invoices-shell .stat-value,
    .finance-shell .finance-metrics .stat-value,.users-shell .staff-metrics .stat-value,
    .dashboard-view .card-header h2,.finance-shell .finance-panel-title h2,
    .settings-shell .settings-card>h2,.users-shell .staff-role-panel h2,
    .finance-shell .finance-aging-label b,.clients-shell .td-main,
    .products-shell .td-main,.orders-shell .td-main,.invoices-shell .td-main
  ){color:#ecf6ee}
  html[data-theme="dark"] :is(
    .dashboard-view .stat-label,.invoices-shell .stat-label,
    .finance-shell .finance-metrics .stat-label,.users-shell .staff-metrics .stat-label,
    .dashboard-view .stat-foot,.invoices-shell .stat-foot,
    .finance-shell .finance-metrics .stat-foot,.users-shell .staff-metrics .stat-foot,
    .dashboard-view .page-heading p,.orders-shell .page-heading p,
    .clients-shell .page-heading p,.products-shell .page-heading p,
    .invoices-shell .page-heading p,.finance-shell .page-heading p,
    .settings-shell .page-heading p,.users-shell .page-heading p,
    .finance-shell .finance-panel-title p,.settings-shell .settings-card>p
  ){color:#a3b5a8}
  html[data-theme="dark"] :is(
    .table-toolbar,.modal-foot,.modal-head,.dashboard-view .card-header,
    .dashboard-view .table-toolbar,.invoices-shell .table-toolbar,
    .clients-shell .table-toolbar,.products-shell .table-toolbar,
    .finance-shell .table-toolbar,.users-shell .table-toolbar,
    .orders-shell .table-toolbar,.orders-shell .table-toolbar:first-child,
    .dashboard-pagination
  ){
    background:#18241c;
    border-color:#304638;
    color:#e6f0e8;
  }
  html[data-theme="dark"] :is(
    thead,.dashboard-view thead,.orders-shell thead,
    .clients-shell thead,.products-shell thead,
    .invoices-shell thead,.finance-shell thead,.users-shell thead,
    .import-table th
  ){background:#1a2920}
  html[data-theme="dark"] :is(th,td){border-color:#2a3b2f}
  html[data-theme="dark"] th{color:#a8beae}
  html[data-theme="dark"] :is(
    .dashboard-view tbody tr:nth-child(even),.orders-shell tbody tr:nth-child(even),
    .clients-shell tbody tr:nth-child(even),.products-shell tbody tr:nth-child(even),
    .invoices-shell tbody tr:nth-child(even),.finance-shell tbody tr:nth-child(even),
    .users-shell tbody tr:nth-child(even)
  ){background:#17231b}
  html[data-theme="dark"] :is(
    tbody tr:hover,.dashboard-view tbody tr:hover,.orders-shell tbody tr:hover,
    .clients-shell tbody tr:hover,.products-shell tbody tr:hover,
    .invoices-shell tbody tr:hover,.finance-shell tbody tr:hover,
    .users-shell tbody tr:hover
  ){background:#21372a}
  html[data-theme="dark"] :is(
    .btn:not(.primary):not(.danger),.date-shortcut button,
    .actions-cell .btn,.dashboard-page-btn,
    .orders-shell .actions-cell .btn,.clients-shell .actions-cell .btn,
    .products-shell .actions-cell .btn,.invoices-shell .actions-cell .btn,
    .finance-shell .actions-cell .btn
  ){
    background:#202d23;
    color:#d9ede0;
    border-color:#3a5040;
  }
  html[data-theme="dark"] :is(
    .btn:not(.primary):not(.danger):hover,.actions-cell .btn:hover,
    .date-shortcut button:hover,.dashboard-page-btn:hover:not(.active):not(:disabled)
  ){
    background:#2b4031;
    border-color:#5a8564;
  }
  html[data-theme="dark"] :is(.btn.primary,.dashboard-page-btn.active){
    background:#108d4f;
    border-color:#1bb368;
    color:#fff;
  }
  html[data-theme="dark"] .btn.primary:hover{background:#0c7441}
  html[data-theme="dark"] .btn.danger{
    background:#332124;
    color:#ffb0b4;
    border-color:#674047;
  }
  html[data-theme="dark"] :is(
    .input,.select,.textarea,.searchbox,.filter-date,
    .settings-shell .settings-card .input,.settings-shell .settings-card .select,
    .orders-shell .filters .searchbox,.orders-shell .filters .select,
    .clients-shell .table-toolbar .searchbox,
    .invoices-shell .searchbox,.invoices-shell .select.compact,
    .finance-shell .finance-filter-row .searchbox,.finance-shell .finance-filter-row .select,
    .orders-shell .table-toolbar:nth-child(2) .filter-date
  ){
    background:#101913;
    border-color:#38503d;
    color:#e7f4e9;
    box-shadow:none;
  }
  html[data-theme="dark"] :is(input,textarea,select){accent-color:#24d17a}
  html[data-theme="dark"] :is(input::placeholder,textarea::placeholder,.searchbox input::placeholder){color:#859b8c}
  html[data-theme="dark"] .searchbox input{color:#e7f4e9}
  html[data-theme="dark"] :is(.input:focus,.select:focus,.textarea:focus,.searchbox:focus-within){
    border-color:#25be74;
    box-shadow:0 0 0 3px #26c67624;
  }
  html[data-theme="dark"] :is(
    .catalog-section,.product-price-row,.order-item-row,.order-empty-hint,
    .form-note,.total-preview,.invoice-kpi,.payment-box,
    .invoice-credit-choice,.invoice-manual-discount,.invoice-return-batch,
    .invoice-closeout-summary,.import-product-map,.import-bulk-section,
    .import-kpis>div,.finance-highlight,.staff-role-option,
    .settings-shell .zen-password-settings,.zen-password-settings,
    .zen-email-fallback
  ){
    background:#1b2920;
    border-color:#344d3b;
    color:#d9e9dc;
  }
  html[data-theme="dark"] :is(
    .orders-shell .callout,.products-shell .callout,.callout,
    .orders-shell .table-toolbar:nth-child(2),
    .orders-shell .orders-bulk-toolbar,.orders-bulk-toolbar
  ){
    background:#15291d;
    color:#dff1e5;
    border-color:#2f5940;
  }
  html[data-theme="dark"] :is(
    .callout p,.orders-shell .callout p,.products-shell .callout p,
    .finance-helper,.form-note p,.staff-role-option p,
    .zen-password-settings p,.settings-shell .zen-password-settings p
  ){color:#b1c8b6}
  html[data-theme="dark"] :is(
    .badge.green,.price-tag,.clients-shell .price-tag,
    .stat-icon.green,.empty-icon
  ){
    background:#153d29;
    color:#72e9a3;
    border-color:#326c47;
  }
  html[data-theme="dark"] :is(.badge.amber,.stat-icon.amber){
    background:#42321b;
    color:#ffd081;
  }
  html[data-theme="dark"] :is(.badge.red,.stat-icon.red){
    background:#472328;
    color:#ff949b;
  }
  html[data-theme="dark"] :is(.badge.blue,.stat-icon.blue){
    background:#1b3652;
    color:#9bc5ff;
  }
  html[data-theme="dark"] :is(.badge.neutral){
    background:#27372d;
    color:#bad0bf;
  }
  html[data-theme="dark"] :is(
    .finance-shell .finance-aging-track,.progress-track,
    .finance-shell .finance-highlight,.users-shell .staff-role-option
  ){border-color:#365541}
  html[data-theme="dark"] :is(.finance-aging-track,.progress-track){background:#293c2f}
  html[data-theme="dark"] :is(.finance-shell .finance-highlight b,.balance-header b,.invoice-total b){
    color:#67e8a0;
  }
  html[data-theme="dark"] :is(
    .staff-secret,.users-shell .staff-secret,.staff-role-help,
    .return-line,.return-confirm,.invoice-credit-summary
  ){background:#1b2920;color:#dff1e3;border-color:#365943}
  html[data-theme="dark"] :is(
    .finance-aging-label,.finance-aging-row,.dashboard-page-counter,
    .form-note,.invoice-kpi small,.return-line small,.price-entry,
    .settings-shell .settings-card .field label,.field label
  ){color:#b3c6b8}
  html[data-theme="dark"] :is(.stat-icon,.item-icon){filter:saturate(1.12)}
  html[data-theme="dark"] .modal-layer{background:#000b}
  html[data-theme="dark"] .modal{
    background:#151f19;
    color:#edf6ee;
    border:1px solid #354a3a;
    box-shadow:0 24px 90px #000a;
  }
  html[data-theme="dark"] :is(.modal-body,.modal-head,.modal-foot){background:#151f19}
  html[data-theme="dark"] .invoice-preview{background:#19231c}
  html[data-theme="dark"] :is(.invoice-meta,.invoice-total,.return-line,.product-price-row){
    border-color:#334739;
  }
  html[data-theme="dark"] :is(.invoice-closeout-net>span,.invoice-closeout-lines b,.invoice-closeout-summary>h3){
    color:#deefe0;
  }
  html[data-theme="dark"] :is(
    .import-table,.import-table thead,.import-table tbody,
    .import-composition,.import-summary,.import-invalid,
    .import-warning,.import-ok
  ){
    background:#19251d;
    color:#d7e9da;
    border-color:#344a3a;
  }
  html[data-theme="dark"] .import-invalid{background:#392b21}
  html[data-theme="dark"] :is(
    .settings-shell .settings-card .zen-password-settings,
    .settings-shell .settings-security-card .zen-password-settings
  ){
    background:transparent;
    border:0;
  }
  html[data-theme="dark"] :is(.zen-login-bg){
    background:radial-gradient(circle at 20% 8%,#132d1b,transparent 50%),#080e0a;
    color:#e8f2e9;
  }
  html[data-theme="dark"] .zen-login-card{
    background:#152019;
    color:#eaf5ec;
    border:1px solid #33503b;
    box-shadow:0 26px 85px #0008;
  }
  html[data-theme="dark"] .zen-login-card h1{color:#ebf7ed}
  html[data-theme="dark"] :is(.zen-login-card p,.zen-login-card small){
    color:#a5b8aa;
  }
  html[data-theme="dark"] .zen-login-card input{
    background:#0e1711;
    border-color:#3b5542;
    color:#ecf7ed;
  }
  html[data-theme="dark"] .zen-email-fallback{
    background:#1b3022;
    border-color:#355542;
  }
  html[data-theme="dark"] :is(.zen-login-card label,.zen-login-eyebrow){color:#9fe8b7}
  html[data-theme="dark"] .zen-link-toggle{color:#7fe0a2}
  html[data-theme="dark"] .zen-login-submit{background:#0f9853;color:#fff}
  html[data-theme="dark"] .zen-login-submit:hover{background:#0c7d45}
  html[data-theme="dark"] .zen-password-settings h3{color:#e0f4e5}
  html[data-theme="dark"] .zen-password-settings .zen-password-feedback{color:#93f0b8}
  html[data-theme="dark"] #zen-cloud-status{background:#173d28;color:#9be8b7}
  html[data-theme="dark"] #zen-cloud-status[data-status="waiting"]{background:#422f17;color:#ffd180}
  html[data-theme="dark"] #zen-cloud-status[data-status="error"]{background:#49232b;color:#ffb1b9}
  html[data-theme="dark"] ::selection{background:#197a4b;color:#fff}
  html[data-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}
  html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#365544;border-radius:10px}
  html[data-theme="dark"] ::-webkit-scrollbar-track{background:#121b15}

  /* Visão geral: contraste black refinado. Somente tela e tema escuro. */
  html[data-theme="dark"] .dashboard-view .dashboard-kicker{
    color:#c6dacc;
  }
  html[data-theme="dark"] .dashboard-view .dashboard-kicker svg{
    color:#37d787;
  }
  html[data-theme="dark"] .dashboard-view .dashboard-summary-copy p{
    color:#b6ccbb;
  }
  html[data-theme="dark"] .dashboard-view .progress-head span:first-child{
    color:#e0eee3;
  }
  html[data-theme="dark"] .dashboard-view .progress-head span:last-child{
    color:#b8ccbe;
  }
  html[data-theme="dark"] .dashboard-view .progress-track{
    background:#354e3c;
  }
  html[data-theme="dark"] .dashboard-view .bar-value{
    color:#7be9a4;
  }
  html[data-theme="dark"] .dashboard-view .bar-label{
    color:#b7cdbb;
  }
  html[data-theme="dark"] .dashboard-view .legend-row{
    color:#b6cbb9;
  }
  html[data-theme="dark"] .dashboard-view .footer-note{
    color:#a8bdae;
  }


  /* Vendas: legibilidade refinada exclusivamente no black.
     Somente .orders-shell e os três modais do fluxo de Vendas. */
  html[data-theme="dark"] .orders-shell .page-heading p{
    color:#bdcfc0;
  }
  html[data-theme="dark"] .orders-shell .table-toolbar .muted{
    color:#bdcfc0;
  }
  html[data-theme="dark"] .orders-shell .orders-bulk-toolbar>span{
    color:#bed5c3;
  }
  html[data-theme="dark"] .orders-shell .orders-bulk-toolbar>span b{
    color:#edf5ee;
  }
  html[data-theme="dark"] .orders-shell .td-sub{
    color:#b9cbbc;
  }
  html[data-theme="dark"] .orders-shell th{
    color:#b6cbb9;
  }
  html[data-theme="dark"] .orders-shell .searchbox input::placeholder{
    color:#a6bca9;
  }
  html[data-theme="dark"] .orders-shell .orders-bulk-toolbar .btn:disabled{
    opacity:.64;
    cursor:not-allowed;
  }
  html[data-theme="dark"] .modal:has(form[data-form="order"]) .modal-head p,
  html[data-theme="dark"] .modal:has(form[data-form="sheet-upload"]) .modal-head p,
  html[data-theme="dark"] .modal:has([data-pick-all]) .modal-head p{
    color:#b9cdbd;
  }
  html[data-theme="dark"] .modal:has(form[data-form="order"]) .field label,
  html[data-theme="dark"] .modal:has(form[data-form="sheet-upload"]) .field label,
  html[data-theme="dark"] .modal:has([data-pick-all]) .field label{
    color:#cbded0;
  }
  html[data-theme="dark"] .modal:has(form[data-form="order"]) .order-empty-hint{
    color:#c6d9c9;
    background:#1b2d21;
    border-color:#46644d;
  }
  html[data-theme="dark"] .modal:has(form[data-form="order"]) .catalog-section-head p{
    color:#b9cdbd;
  }
  html[data-theme="dark"] .modal:has(form[data-form="sheet-upload"]) .form-note{
    color:#c4d9c9;
    background:#1b3024;
    border-color:#3d5b47;
  }
  html[data-theme="dark"] .modal:has(form[data-form="sheet-upload"]) .form-note.warning{
    color:#f2d7a3;
    background:#382b1b;
    border-color:#70512b;
  }
  html[data-theme="dark"] .modal:has([data-pick-all]) .checkbox-line{
    color:#c1d5c5;
  }
  html[data-theme="dark"] .modal:has([data-pick-all]) .invoice-kpi small{
    color:#b4cbb9;
  }
  html[data-theme="dark"] .modal:has([data-pick-all]) .invoice-credit-choice p,
  html[data-theme="dark"] .modal:has([data-pick-all]) .invoice-return-batch .catalog-section-head p,
  html[data-theme="dark"] .modal:has([data-pick-all]) .invoice-manual-discount p{
    color:#bcd1c1;
  }
  html[data-theme="dark"] .modal:has([data-pick-all]) .invoice-credit-choice .muted,
  html[data-theme="dark"] .modal:has([data-pick-all]) .empty p{
    color:#b7cbb9;
  }
  html[data-theme="dark"] .modal:has([data-pick-all]) .pick-row-main span{
    color:#b5cbbb;
  }


  /* Clientes: legibilidade aprimorada somente no Tema Black. */
  html[data-theme="dark"] .clients-shell .page-heading p{
    color:#bcd0c1;
  }
  html[data-theme="dark"] .clients-shell .td-sub{
    color:#b4cabc;
  }
  html[data-theme="dark"] .clients-shell .footer-note{
    color:#b5cabb;
  }
  html[data-theme="dark"] .clients-shell .table-toolbar .muted{
    color:#bbd0c0;
  }
  html[data-theme="dark"] .clients-shell th{
    color:#bed1c1;
  }
  html[data-theme="dark"] .clients-shell .searchbox input::placeholder{
    color:#a8bdad;
  }
  html[data-theme="dark"] .clients-shell .price-tag{
    color:#87efb1;
    border-color:#366d4a;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .modal-head p{
    color:#c0d3c3;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .field label{
    color:#d0e1d4;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .input::placeholder{
    color:#a9bead;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .catalog-section-head p{
    color:#bed1c1;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .product-price-row small{
    color:#b5cabc;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .price-entry{
    color:#c4dfca;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .product-price-row{
    border-color:#3d5745;
    background:#1b2b21;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .price-entry .input:disabled{
    opacity:1;
    background:#15221a;
    color:#9db1a2;
    border-color:#35483a;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .price-entry .input:disabled::placeholder{
    color:#9aac9e;
  }
  html[data-theme="dark"] .modal:has(form[data-form="client"]) .form-note{
    color:#c3d7c8;
    border-color:#3b5c45;
  }


  /* Produtos: contraste pontual no Tema Black (catálogo e cadastro). */
  html[data-theme="dark"] .products-shell .page-heading p{
    color:#bed0c2;
  }
  html[data-theme="dark"] .products-shell .callout p{
    color:#c3d8c8;
  }
  html[data-theme="dark"] .products-shell .table-toolbar .muted{
    color:#c3d5c7;
  }
  html[data-theme="dark"] .products-shell th{
    color:#bcd0c0;
  }
  html[data-theme="dark"] .products-shell td:not(.td-main){
    color:#e0eee3;
  }
  html[data-theme="dark"] .modal:has(form[data-form="product"]) .modal-head p{
    color:#bcd1c1;
  }
  html[data-theme="dark"] .modal:has(form[data-form="product"]) .field label{
    color:#d1e2d5;
  }
  html[data-theme="dark"] .modal:has(form[data-form="product"]) .input::placeholder{
    color:#a9beae;
  }
  html[data-theme="dark"] .modal:has(form[data-form="product"]) .checkbox-line{
    color:#c7decd;
  }
  html[data-theme="dark"] .modal:has(form[data-form="product"]) .form-note{
    color:#c4dac9;
    background:#1b3024;
    border-color:#3d6149;
  }


  /* Faturas: leitura refinada exclusivamente no Tema Black. */
  html[data-theme="dark"] .invoices-shell .page-heading p{
    color:#bed3c2;
  }
  html[data-theme="dark"] .invoices-shell .stat-label{
    color:#bfd2c3;
  }
  html[data-theme="dark"] .invoices-shell .stat-foot{
    color:#b5cabb;
  }
  html[data-theme="dark"] .invoices-shell .table-toolbar .muted{
    color:#bfd1c2;
  }
  html[data-theme="dark"] .invoices-shell th{
    color:#bed0c0;
  }
  html[data-theme="dark"] .invoices-shell .td-sub{
    color:#b8cdbb;
  }
  html[data-theme="dark"] .invoices-shell .searchbox input::placeholder{
    color:#a8bdad;
  }
  html[data-theme="dark"] .invoices-shell .actions-cell .btn:disabled{
    opacity:.56;
    cursor:not-allowed;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .modal-head p{
    color:#c0d3c4;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .field label{
    color:#cedfd2;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .invoice-kpi small{
    color:#c1d4c3;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .form-note{
    color:#c3d9c8;
    border-color:#3d5c45;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .checkbox-line{
    color:#c9ddce;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .empty p{
    color:#c1d3c3;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .invoice-credit-choice p{
    color:#bdd2c2;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .invoice-credit-choice .muted{
    color:#b9cfbd;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .invoice-credit-choice{
    border-color:#3c5643;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .invoice-closeout-lines>span{
    color:#c5d8ca;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .invoice-closeout-net>span{
    color:#e0f1e4;
  }
  html[data-theme="dark"] .modal:has([data-invoice-input="clientId"]) .btn:disabled{
    opacity:.57;
    cursor:not-allowed;
  }


  /* Financeiro: contrastes isolados no Tema Black. */
  html[data-theme="dark"] .finance-shell .page-heading p{
    color:#bfd3c4;
  }
  html[data-theme="dark"] .finance-shell .finance-metrics .stat-label{
    color:#c5d8c9;
  }
  html[data-theme="dark"] .finance-shell .finance-metrics .stat-foot{
    color:#b9cebe;
  }
  html[data-theme="dark"] .finance-shell .finance-panel-title p{
    color:#bdcfbf;
  }
  html[data-theme="dark"] .finance-shell .finance-aging-label span{
    color:#b9cbbb;
  }
  html[data-theme="dark"] .finance-shell .finance-aging-track{
    background:#344d3c;
  }
  html[data-theme="dark"] .finance-shell .finance-helper{
    color:#b8cebd;
  }
  html[data-theme="dark"] .finance-shell .finance-highlight span{
    color:#bbd2c0;
  }
  html[data-theme="dark"] .finance-shell .finance-highlight.secondary span{
    color:#bacfbe;
  }
  html[data-theme="dark"] .finance-shell .finance-highlight.secondary b{
    color:#84e7a8;
  }
  html[data-theme="dark"] .finance-shell .table-toolbar .muted{
    color:#bfd3c1;
  }
  html[data-theme="dark"] .finance-shell th{
    color:#becfbe;
  }
  html[data-theme="dark"] .finance-shell .td-sub{
    color:#b9cbbb;
  }
  html[data-theme="dark"] .finance-shell .searchbox input::placeholder{
    color:#adc2b2;
  }
  html[data-theme="dark"] .finance-shell .actions-cell .btn{
    color:#e3f0e5;
    border-color:#43614a;
  }


  /* Configurações e Usuários: refinamento final exclusivo do Tema Black. */
  html[data-theme="dark"] .settings-shell .page-heading p{
    color:#c0d5c5;
  }
  html[data-theme="dark"] .settings-shell .settings-card>p{
    color:#bed2c1;
  }
  html[data-theme="dark"] .settings-shell .field label{
    color:#d2e2d6;
  }
  html[data-theme="dark"] .settings-shell .settings-card .input::placeholder{
    color:#aac2b0;
  }
  html[data-theme="dark"] .settings-shell .settings-security-card .zen-password-settings p{
    color:#c2d5c6;
  }
  html[data-theme="dark"] .settings-shell .settings-security-card .zen-password-settings small{
    color:#bdd1c1;
  }
  html[data-theme="dark"] .settings-shell .settings-backup-card>p{
    color:#c0d4c4;
  }
  html[data-theme="dark"] .settings-shell .settings-maintenance-card>p{
    color:#c0d4c4;
  }

  html[data-theme="dark"] .users-shell .page-heading p{
    color:#c0d4c3;
  }
  html[data-theme="dark"] .users-shell .staff-metrics .stat-label{
    color:#c6d9ca;
  }
  html[data-theme="dark"] .users-shell .staff-metrics .stat-foot{
    color:#bcd0bf;
  }
  html[data-theme="dark"] .users-shell .staff-role-panel>div>p{
    color:#c0d4c4;
  }
  html[data-theme="dark"] .users-shell .staff-role-option{
    background:#1c2d22;
    border-color:#416049;
  }
  html[data-theme="dark"] .users-shell .staff-role-option p{
    color:#c6d9c9;
  }
  html[data-theme="dark"] .users-shell .finance-helper{
    color:#bcd0c0;
  }
  html[data-theme="dark"] .users-shell .table-toolbar .muted{
    color:#bfd2c2;
  }
  html[data-theme="dark"] .users-shell th{
    color:#bed2c3;
  }
  html[data-theme="dark"] .users-shell .staff-secret p{
    color:#c4daca;
  }
  html[data-theme="dark"] .modal:has([data-staff-role]) .modal-head p{
    color:#c0d4c5;
  }
  html[data-theme="dark"] .modal:has([data-staff-role]) .field label{
    color:#d2e3d5;
  }
  html[data-theme="dark"] .modal:has([data-staff-role]) .staff-role-help{
    background:#1c3224;
    color:#cce4d0;
    border-color:#41684b;
  }
  html[data-theme="dark"] .modal:has([data-staff-role]) .form-note{
    background:#1b3023;
    color:#c3d9c9;
    border-color:#3f5b45;
  }

}
