/* Shared light palette for module-owned dark surfaces. Loaded last; dynamic
   module styles may arrive later, so these rules intentionally use !important. */
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page,.posPro){
  color:#172033!important;
  background:#f3f7fc!important;
}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page,.posPro) :is(h1,h2,h3,h4,p,span,small,label,td,th,em,b,strong,div){
  color:#172033!important;
}
html[data-theme="light"] :is(.ra-panel,.ra-kpi,.dc-panel,.dc-kpi,.nh-panel,.nh-kpi,.tc-panel,.tc-kpi,.fo-panel,.fo-filters,.fo-stats article,.fo-modal,.fo-item,.ms-plan,.ms-benefit,.ms-list,.ms-detail,.ms-modal,.ms-history,.ms-guarantee,.wa-panel,.wa-stats article,.wa-total,.ts-card,.ts-form-card,.ts-history,.ts-drawer,.ts-add-tank-modal,.ly-panel,.ly-kpi,.ly-form section,.ly-form aside,.inv-card,.emp-card){
  background:#fff!important;
  color:#172033!important;
  border-color:#d5deea!important;
  box-shadow:0 8px 24px rgba(15,23,42,.06)!important;
}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(input,select,textarea,.input,.select,.dc-input,.nh-input,.tc-input,.nh-cell){
  background:#fff!important;
  color:#172033!important;
  border-color:#bdcadd!important;
}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(input,textarea)::placeholder{color:#52647b!important;opacity:1}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(button,.ra-dash-actions select,.dc-ghost,.nh-ghost,.tc-ghost,.ms-btn,.wa-tabs button){
  background:#fff!important;
  color:#172033!important;
  border-color:#bdcadd!important;
}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(.ra-dash-actions button,.dc-primary,.nh-primary,.tc-primary,.fo-primary,.ms-primary,.btn.primary){
  background:linear-gradient(135deg,#2563eb,#6d28d9)!important;
  color:#fff!important;
  border-color:transparent!important;
}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(.ra-dash-actions button,.dc-primary,.nh-primary,.tc-primary,.fo-primary,.ms-primary,.btn.primary) :is(span,b,strong){color:#fff!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(th,thead td){background:#e8eef6!important;color:#26364d!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) tbody tr:nth-child(even){background:#f2f6fb!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) tbody td{color:#172033!important;border-color:#dce5ef!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page,.inv-page,.emp-page) :is(.muted,.ra-dash-head p,.dc-head p,.nh-head p,.tc-head p,.fo-head p,.ms-title p,.wa header p,.ra-kpi small,.dc-kpi small,.nh-kpi small,.tc-kpi small){color:#43546b!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page) :is(.good,.green,.nh-paid,.ms-green){color:#047857!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page) :is(.bad,.red,.nh-debt,.ms-red){color:#b91c1c!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page) :is(.orange,.yellow,.ms-yellow){color:#a16207!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page) :is(.violet,.purple,.ms-purple){color:#7e22ce!important}
html[data-theme="light"] :is(.ra-kpi-icon,.ra-mini-icon,.ms-logo,.ms-avatar){color:#fff!important}
html[data-theme="light"] :is(.ra-tablewrap,.ra-table td,.ra-overview .ra-table tbody tr:last-child,.dc-product-suggestions,.nh-product-results,.nh-item-suggestions,.nh-bill-upload,.nh-bill-preview,.nh-tablewrap,.nh-receipt,.nh-release-fish,.nh-release-actions,.nh-pdf-progress,.ms-usage,.ms-menu,.ms-modal-total,.ms-form-choices button,.wa-poster,.ts-death-chart,.ts-checks label){background:#f8fafc!important;color:#172033!important;border-color:#d5deea!important}
html[data-theme="light"] :is(.nh-invoice-sheet,.fo-invoice,.receipt,.invoice) .nh-tablewrap{background:transparent!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page) :is(.ra-receipt,.dc-row,.nh-receipt,.tc-row,.fo-item,.ms-menu,.wa-status,.ts-checks label){background:#f8fafc!important;border-color:#d5deea!important;color:#172033!important}
html[data-theme="light"] :is(.ra-dashboard,.dc-page,.nh-page,.tc-page,.fo-page,.ms-wrap,.wa,.ts-page,.ly-page) :is(.nh-receipt small,.dc-kpi em,.nh-kpi em,.tc-kpi em,.fo-stats small,.fo-stats em,.ms-person small,.wa-stats span){color:#43546b!important}
/* Printable invoices retain their own white-paper design and accent colors. */
html[data-theme="light"] :is(.fo-invoice,.nh-invoice-sheet,.receipt,.invoice,.wa-invoice,.ms-receipt){background:#fff!important;color:#18202a!important}

/* Module surfaces previously missed by the shared light palette. */
html[data-theme="light"] :is(.ts-kpis article,.nh-shipping-row,.nh-payment-row,.tc-tablewrap,.tc-cats,.tc-note,.tc-cat-item,.tc-order-preview){background:#fff!important;color:#172033!important;border-color:#d5deea!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important}
html[data-theme="light"] :is(.tc-periods,.ts-tabs,.lr-tabs button,.lr-date-choice){background:#edf2f8!important;color:#334155!important;border-color:#cbd6e4!important}
html[data-theme="light"] .lr-date-choice span{color:#26364d!important}
html[data-theme="light"] .lr-date-choice .input{background:#fff!important;color:#172033!important;border-color:#bdcadd!important;color-scheme:light}
html[data-theme="light"] .lr-tabs button.active{background:linear-gradient(135deg,#1877f2,#6366f1)!important;color:#fff!important}
html[data-theme="light"] :is(.tc-periods button.active,.tc-tabs button.active,.tc-radio.active,.ts-tabs button.on){background:#e7f0ff!important;color:#075ac2!important;border-color:#1877f2!important;font-weight:600}
html[data-theme="light"] .tc-table tbody tr:nth-child(odd) td{background:#fff!important}
html[data-theme="light"] .tc-table tbody tr:nth-child(even) td{background:#f2f6fb!important}
html[data-theme="light"] .tc-table tbody tr:hover td{background:#e7f0ff!important}
html[data-theme="light"] :is(.nh-note,.nh-note li,.nh-shipping-row small,.nh-payment-row span,.ts-kpis span){color:#43546b!important}
html[data-theme="light"] .ts-kpis article>b{color:#075ac2!important}
html[data-theme="light"] .ts-kpis .warn>b{color:#9a5900!important}
html[data-theme="light"] .ts-kpis .danger>b{color:#be123c!important}
html[data-theme="light"] .ts-kpis .good>b{color:#047857!important}
html[data-theme="light"] :is(.tc-badge.income,.tc-money-income){color:#047857!important}
html[data-theme="light"] :is(.tc-badge.expense,.tc-money-expense){color:#b91c1c!important}
html[data-theme="light"] .nh-panel :is(ul,li){color:#43546b!important}

/* Import chart: use white paper in the donut center in light appearance. */
html[data-theme="light"] .nh-donut{background:radial-gradient(circle,#fff 0 46%,transparent 47%),conic-gradient(#1677ff 0 42%,#22c55e 42% 64%,#f59e0b 64% 78%,#8b5cf6 78% 90%,#64748b 90% 100%)!important}
html[data-theme="light"] .nh-donut strong{color:#172033!important}
html[data-theme="light"] .nh-donut small{color:#43546b!important}

/* Mina operations/planner and investor screens share the light app palette. */
html[data-theme="light"] :is(.mo-page,.investor-module){background:#f3f7fc!important;color:#172033!important}
html[data-theme="light"] .mp-root{--mp-line:#d5deea;--mp-muted:#52647b;--mp-bg:#fff;background:#fff!important;color:#172033!important;border-color:#d5deea!important}
html[data-theme="light"] :is(.mo-card,.mo-panel,.mp-editor,.mp-proposal,.inv-kpi,.inv-loading,.inv-empty,.inv-card){background:#fff!important;color:#172033!important;border-color:#d5deea!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important}
html[data-theme="light"] :is(.mo-hero,.inv-hero){background:linear-gradient(135deg,#e0f2fe,#e7eeff)!important;color:#172033!important;border-color:#cbd6e4!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important}
html[data-theme="light"] :is(.mo-page,.mp-root,.investor-module) :is(h1,h2,h3,h4,label,legend,strong,b){color:#172033!important}
html[data-theme="light"] :is(.mo-page,.mp-root,.investor-module) :is(p,small){color:#43546b!important}
html[data-theme="light"] :is(.mo-hero span,.mp-eyebrow){color:#0369a1!important}
html[data-theme="light"] :is(.mo-form fieldset,.mo-default-work,.mo-extra-work,.mo-preview-summary b,.mo-preview-employees article,.mo-row-staff label,.inv-profile-grid>div,.inv-fund-line,.inv-funding-total,.ip-funding-grid label,.inv-live-summary>div,.inv-staff-choice,.inv-fund-available,.ip-multi-funding,.inv-investor-row){background:#f8fafc!important;color:#172033!important;border-color:#d5deea!important}
html[data-theme="light"] :is(.mo-rule-note,.mp-tag){background:#e7f0ff!important;color:#075ac2!important;border-color:#b9d3f9!important}
html[data-theme="light"] :is(.mo-extra-head,.mo-work-head h3 span,.inv-kpi span,.inv-profile-grid span,.inv-live-summary span,.inv-formula,.inv-group-row em){color:#43546b!important}
html[data-theme="light"] :is(.mo-page,.mp-root,.investor-module,.ip-detail) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#fff!important;color:#172033!important;border-color:#bdcadd!important;color-scheme:light}
html[data-theme="light"] :is(.mo-page,.mp-root,.investor-module) :is(input,textarea)::placeholder{color:#52647b!important;opacity:1}
html[data-theme="light"] :is(.mo-tabs button,.mo-actions button,.mp-button,.inv-tabs button,.investor-module .btn){background:#fff!important;color:#26364d!important;border-color:#bdcadd!important}
html[data-theme="light"] :is(.mo-tabs button.on,.inv-tabs button.active,.investor-module .btn.primary){background:linear-gradient(135deg,#1877f2,#6366f1)!important;color:#fff!important;border-color:transparent!important}
html[data-theme="light"] :is(.mo-tabs button.on,.inv-tabs button.active,.investor-module .btn.primary) :is(span,b,strong){color:#fff!important}
html[data-theme="light"] .mp-button.mp-primary{background:#ccfbf1!important;color:#115e59!important;border-color:#5eead4!important}
html[data-theme="light"] :is(.mp-button.mp-positive,.mo-savebar label,.inv-owner-line,.inv-green){color:#047857!important}
html[data-theme="light"] :is(.mo-actions button.danger,.mo-remove){background:#fff1f2!important;color:#be123c!important;border-color:#fecdd3!important}
html[data-theme="light"] .mo-add-work{color:#075ac2!important}
html[data-theme="light"] :is(.mp-active,.inv-owner-line){background:#ecfdf5!important;border-color:#a7f3d0!important}
html[data-theme="light"] :is(.mp-active .mp-status,.mp-done .mp-task-title>b,.mp-root .mp-change,.mp-loading){color:#047857!important}
html[data-theme="light"] .mp-task-main{border-left-color:#cbd6e4}
html[data-theme="light"] .mp-warning{background:#fffbeb!important;color:#854d0e!important;border-color:#fcd34d!important}
html[data-theme="light"] .mp-warning :is(p,small,li){color:#854d0e!important}
html[data-theme="light"] .mp-tag.mp-priority-critical{background:#fff1f2!important;color:#be123c!important}
html[data-theme="light"] .mp-tag.mp-priority-high{background:#fffbeb!important;color:#854d0e!important}
html[data-theme="light"] :is(.mo-page,.investor-module,.ip-detail) :is(.tablewrap,.productTableWrap){background:#fff!important;border-color:#d5deea!important}
html[data-theme="light"] :is(.mo-page,.investor-module,.ip-detail) th{background:#e8eef6!important;color:#26364d!important;border-color:#d5deea!important}
html[data-theme="light"] :is(.mo-page,.investor-module,.ip-detail) tbody td{background:#fff!important;color:#172033!important;border-color:#d5deea!important}
html[data-theme="light"] :is(.mo-page,.investor-module,.ip-detail) tbody tr:nth-child(even) td{background:#f2f6fb!important}
html[data-theme="light"] :is(.mo-page,.investor-module,.ip-detail) tbody tr:hover td{background:#e7f0ff!important}
html[data-theme="light"] .investor-module .inv-green{color:#047857!important}
html[data-theme="light"] .investor-module .inv-red{color:#b91c1c!important}
html[data-theme="light"] .ip-detail{color:#172033!important}
html[data-theme="light"] .ip-detail h2{color:#172033!important}
html[data-theme="light"] :is(.mina-planning,.mina-planning .mina-body){background:#fff!important;color:#172033!important}
html[data-theme="light"] .mina-planning .mina-transcript{background:#f8fafc!important;color:#172033!important;border-color:#d5deea!important}
html[data-theme="light"] .mina-planning :is(.mina-hint,.mina-status){color:#43546b!important}
html[data-theme="light"] .mina-planning .mina-planner-toggle.on{background:#ccfbf1!important;color:#115e59!important;border-color:#5eead4!important}
:is(.mo-page,.mp-root,.investor-module) :is(td,label,input,select,textarea){font-size:15px}
:is(.mo-page,.mp-root,.investor-module) :is(small,.mp-button,.mp-root label,.mp-header p){font-size:13px}

/* Website channel: overview, promotions, reviews, settings and editors. */
html[data-theme="light"] :is(.wc-page,.wc-drawer,.wc-settings){color:#172033!important}
html[data-theme="light"] :is(.wc-heading,.wc-stats article,.wc-label-grid article,.wc-drawer,.wc-drawer-actions,.wc-settings,.wc-table){background:#fff!important;border-color:#d5deea!important;box-shadow:0 8px 24px rgba(15,23,42,.06)!important}
html[data-theme="light"] :is(.wc-page,.wc-drawer,.wc-settings) :is(h1,h2,h3,h4,b,strong,label){color:#172033!important}
html[data-theme="light"] :is(.wc-page,.wc-drawer,.wc-settings) :is(p,small,.wc-review-comment){color:#43546b!important}
html[data-theme="light"] :is(.wc-nav button,.wc-product-results button,.wc-selected,.wc-product-search,.wc-product-suggestions,.wc-image,.wc-apply,.wc-review-counts span){background:#f8fafc!important;color:#26364d!important;border-color:#d5deea!important}
html[data-theme="light"] .wc-nav button.active{background:#e7f0ff!important;color:#075ac2!important;border-color:#1877f2!important}
html[data-theme="light"] .wc-nav button.active b{color:#075ac2!important}
html[data-theme="light"] .wc-tabs{border-color:#d5deea!important}
html[data-theme="light"] .wc-tabs button{color:#43546b!important}
html[data-theme="light"] .wc-tabs button.active{color:#075ac2!important;border-bottom-color:#1877f2!important}
html[data-theme="light"] .wc-stats b{color:#075ac2!important}
html[data-theme="light"] :is(.wc-name img,.wc-name i){background:#edf2f8!important}
html[data-theme="light"] .wc-drawer-close{color:#334155!important}
html[data-theme="light"] .wc-search-hint{color:#52647b!important;border-color:#bdcadd!important}
html[data-theme="light"] .wc-product-results>button:hover{background:#e7f0ff!important;border-color:#1877f2!important}
html[data-theme="light"] .wc-product-suggestions>button i{color:#075ac2!important}
html[data-theme="light"] :is(.wc-page,.wc-drawer,.wc-settings) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#fff!important;color:#172033!important;border-color:#bdcadd!important;color-scheme:light}
html[data-theme="light"] :is(.wc-page,.wc-drawer,.wc-settings) :is(input,textarea)::placeholder{color:#52647b!important;opacity:1}
html[data-theme="light"] :is(.wc-page,.wc-drawer) .btn{background:#fff!important;color:#26364d!important;border-color:#bdcadd!important}
html[data-theme="light"] :is(.wc-page,.wc-drawer) .btn.primary{background:linear-gradient(135deg,#1877f2,#6366f1)!important;color:#fff!important;border-color:transparent!important}
html[data-theme="light"] :is(.wc-page,.wc-drawer) .btn.danger{background:#fff1f2!important;color:#be123c!important;border-color:#fecdd3!important}
html[data-theme="light"] :is(.wc-selected>button,.wc-selected-head button){color:#be123c!important}
html[data-theme="light"] :is(.wc-status.active,.wc-status.approved){background:#dcfce7!important;color:#166534!important}
html[data-theme="light"] :is(.wc-status.upcoming,.wc-status.pending){background:#fef3c7!important;color:#854d0e!important}
html[data-theme="light"] :is(.wc-status.ended,.wc-status.hidden){background:#e2e8f0!important;color:#334155!important}
html[data-theme="light"] .wc-status.paused{background:#ffe4e6!important;color:#be123c!important}
html[data-theme="light"] .wc-review-stars{color:#a16207!important}
html[data-theme="light"] .wc-table th{background:#e8eef6!important;color:#26364d!important;border-color:#d5deea!important}
html[data-theme="light"] .wc-table tbody td{background:#fff!important;color:#172033!important;border-color:#d5deea!important}
html[data-theme="light"] .wc-table tbody tr:nth-child(even) td{background:#f2f6fb!important}
html[data-theme="light"] .wc-table tbody tr:hover td{background:#e7f0ff!important}
html[data-theme="light"] .nav-children button{color:#43546b!important}
html[data-theme="light"] :is(.nav-children button:hover,.nav-children button.active){color:#075ac2!important}
html[data-theme="light"] .wo-invoice-toolbar{background:#e8eef6!important;color:#172033!important}
:is(.wc-page,.wc-drawer,.wc-settings) :is(td,label,input,select,textarea){font-size:15px}
:is(.wc-page,.wc-drawer,.wc-settings) small{font-size:13px}
