/* v761 — dark-mode force layer: loaded at end of body to beat inline page <style> blocks */

/* ── Remap page-local :root tokens (order dashboard, etc.) ── */
html[data-nl-theme="dark"],
html[data-nl-theme="dark"] :root {
  --od-card: #101827;
  --od-text: #f1f5f9;
  --od-text-2: #e2e8f0;
  --od-muted: #94a3b8;
  --od-line: #334155;
  --od-line-2: rgba(148, 163, 184, 0.28);
  --od-soft: #1a2332;
  --od-soft-2: #253247;
  --od-soft-warn: #2b2116;
  --od-soft-green: #0f2a21;
  --od-primary: #fb7185;
  --od-primary-2: #fda4af;
  --od-primary-deep: #fecdd3;
  --od-shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) {
  color: #f1f5f9 !important;
}

/* ── Inline template survivors: labels, fields, switches ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .field label,
  .form-row label,
  .form-two label,
  .form-three label,
  .od-field label,
  .cp-field label,
  .emp-field label,
  .rp-field label,
  .fp-field label,
  .user-field label,
  .ss-field label,
  .ac-field label,
  .nl-field label
) {
  color: #e2e8f0 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .switch-row,
  .category-create,
  .nl-accordion-toolbar,
  .nl-collapsible-card:not(.nl-card-open),
  .role-switcher,
  .return-origin,
  .food-program-row,
  .food-image-asset,
  .food-image-current,
  .default-sale-current div,
  .food-image-summary span,
  .preview-summary span,
  .stat-tile,
  .nl-mpk-filter-card,
  .xlsx-box,
  .price-card,
  .inline-price-panel,
  .hint-box,
  .compact-note,
  .price-note,
  .form-errors,
  .divider-note,
  .od-panel-title,
  .od-picker-body,
  .od-picker[open] .od-picker-body,
  .od-filter-list,
  .od-report-scoped-search,
  .od-guest-chip,
  .od-chip,
  .policy-quick-actions,
  .policy-guide,
  .policy-meta-strip,
  .nl141-policy-shortcut-row,
  .nl141-guide-panel,
  .nl135-addon-main-ratio-policy,
  .nl138-addon-map-jump,
  .nl-v107-cvp-title,
  .nl-v107-dept-variant summary,
  .modal-actions,
  .policy-pricing-box,
  .nl-accordion-toolbar,
  .nl-card-toggle
) {
  background: #141a24 !important;
  background-image: none !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .food-name,
  .section-title h2,
  .policy-section h3,
  .policy-pricing-box h4,
  .inline-price-panel h3,
  .default-sale-current b,
  .preview-card h2,
  .stat-tile b,
  .nl-v107-cvp-title,
  .od-panel-title b,
  .od-filter-head h2,
  .od-report-scoped-search-title
) {
  color: #fda4af !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .mini,
  .divider-note,
  .compact-note,
  .food-image-path,
  .od-panel-title span,
  .od-filter-head p,
  .od-report-scoped-search small,
  .od-picker-hint,
  .policy-dialog .nl135-addon-main-ratio-policy > summary small,
  .nl-v107-cvp-title small,
  .stat-tile span,
  .default-sale-current span,
  .preview-summary span
) {
  color: #94a3b8 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .hint-box,
  .price-note,
  .compact-note,
  .od-picker-hint,
  .policy-guide
) {
  background: #2b2116 !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .form-errors {
  background: #2a1217 !important;
  border-color: #7f1d1d !important;
  color: #fecdd3 !important;
}

/* ── Badges ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .badge.ok {
  background: #0f2a21 !important;
  color: #86efac !important;
  border-color: #166534 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .badge.off {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .badge.warn {
  background: #2b2116 !important;
  color: #fde68a !important;
  border-color: #92400e !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .badge.vat {
  background: #0b1c3d !important;
  color: #bfdbfe !important;
  border-color: #1d4ed8 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .nl-status.is-ok,
  .nl-ds-status.success
) {
  background: #0f2a21 !important;
  color: #86efac !important;
  border-color: #166534 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .nl-status.is-warn,
  .nl-ds-status.danger
) {
  background: #2b2116 !important;
  color: #fde68a !important;
  border-color: #92400e !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .nl-status.is-danger,
  .nl-ds-status.danger
) {
  background: #2a1217 !important;
  color: #fecdd3 !important;
  border-color: #991b1b !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .nl-status.is-info,
  .nl-ds-status.info
) {
  background: #111f3d !important;
  color: #bfdbfe !important;
  border-color: #1d4ed8 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .nl-status.is-muted,
  .nl-ds-status.muted
) {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
  border-color: #475569 !important;
}

/* ── Table row states ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .row-inactive td,
  .company-table .row-inactive td,
  .employee-table .row-inactive td,
  .restaurant-table .row-inactive td,
  .menu-table .row-inactive td
) {
  background: #2a1217 !important;
  color: #fca5a5 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .row-needs-profile td,
  .menu-table .row-needs-profile td
) {
  background: #2b2116 !important;
  color: #fde68a !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .row-inactive .food-name,
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .row-inactive .mini {
  color: #fca5a5 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  table th,
  .menu-table th,
  .import-table th,
  .price-history-table th,
  .inline-current-table th
) {
  background: #1e293b !important;
  color: #fef3c7 !important;
  border-color: #334155 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  table td,
  .menu-table td,
  .import-table td,
  .price-history-table td,
  .inline-current-table td
) {
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) code {
  background: #1f2937 !important;
  color: #fda4af !important;
  border: 1px solid #334155 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .source-missing {
  color: #fca5a5 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .source-ok {
  color: #86efac !important;
}

/* ── Policy dialog (company manager inline !important) ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog,
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .modal-body {
  background: #1a1215 !important;
  background-image: none !important;
  color: #f8e8e7 !important;
  border-color: #5f3b42 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-section {
  background: #21181b !important;
  border-color: #5f3b42 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-section h3 {
  background: linear-gradient(135deg, #35262a, #2b2023) !important;
  border-color: #5f3b42 !important;
  color: #fff1f0 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-section.is-collapsed {
  background: #1a1215 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl141-policy-shortcut-row button {
  background: #35262a !important;
  border-color: #7c4a52 !important;
  color: #fde8e8 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl141-policy-shortcut-row button.nl141-primary {
  background: #9f1d2d !important;
  border-color: #9f1d2d !important;
  color: #fff !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl141-policy-shortcut-row button.nl141-warn {
  background: #2b2116 !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl141-policy-auto-guide summary {
  background: #35262a !important;
  border-color: #7c4a52 !important;
  color: #fde8e8 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl141-guide-panel {
  background: #21181b !important;
  border-color: #5f3b42 !important;
  color: #f8e8e7 !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42) !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl135-addon-main-ratio-policy > summary,
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl135-addon-main-ratio-policy > summary b {
  color: #fde68a !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .policy-dialog .nl138-addon-map-jump {
  background: #2b2116 !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

/* ── Order dashboard panels ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .od-controls,
  .od-side-panel,
  .od-report-card,
  .od-kpi,
  .od-external-card,
  .od-picker,
  .od-mini-btn,
  .od-pill-action,
  .od-filter-badge
) {
  background: #101827 !important;
  background-image: none !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .od-check:hover {
  background: #1f2937 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .od-mini-btn.apply {
  background: #9f1d2d !important;
  border-color: #9f1d2d !important;
  color: #fff !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .od-picker summary {
  background: linear-gradient(135deg, #520913, #74141f) !important;
  color: #fff !important;
}

/* ── CRUD modals ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) :is(
  .nl-crud-dialog .nl-modal-card,
  .nl-crud-dialog .card,
  .nl-crud-dialog .company-form,
  .xlsx-box.nl-modal-card,
  .price-card.nl-modal-card
) {
  background: #141a24 !important;
  background-image: none !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) dialog#food-form-modal .nl715-food-form-head {
  background: linear-gradient(135deg, #520913, #74141f, #b83b32) !important;
  color: #fff !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) dialog#food-form-modal .nl715-food-form-head h2,
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) dialog#food-form-modal .nl715-food-form-head p {
  color: #fff !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .nl-dialog-close {
  background: #1f2937 !important;
  border-color: #475569 !important;
  color: #fda4af !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .food-image-profile,
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .default-sale-panel {
  background: #141a24 !important;
  border-color: #334155 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .food-image-placeholder,
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .empty-thumb {
  background: #1a2332 !important;
  border-color: #475569 !important;
  color: #94a3b8 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .empty {
  color: #94a3b8 !important;
}

/* ── Accordion / collapsible ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .nl-collapsible-card:not(.nl-card-open):hover {
  background: #1f2937 !important;
  border-color: #475569 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .nl-accordion-toolbar b {
  color: #f1f5f9 !important;
}

/* ── Links inside dark panels ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page a:not(.btn):not(.nl-ds-btn):not(.nl-status-btn) {
  color: #fda4af !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page a:not(.btn):not(.nl-ds-btn):not(.nl-status-btn):hover {
  color: #fecdd3 !important;
}

/* ── Preview / import cards ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .preview-card {
  background: #141a24 !important;
  border-color: #92400e !important;
}

/* ── White islands: last-resort broad rescue inside .page ── */
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page :is(
  article,
  section,
  aside,
  details,
  fieldset
):not(.hero):not(.nl-ds-hero):not(.nl715-food-form-head):not(.od-picker summary) {
  color: inherit;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="background:#fff"],
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="background: #fff"],
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="background:#ffffff"],
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="background: #ffffff"] {
  background: #141a24 !important;
  color: #f1f5f9 !important;
}

html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="color:#3"],
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="color: #3"],
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="color:#4"],
html[data-nl-theme="dark"][data-nl-theme-scope="admin-shell"] body.nl-admin-shell:not(.nh200-employee-order-page) .page [style*="color:#7"] {
  color: #e2e8f0 !important;
}

/* ── Login page (standalone template) ── */
html[data-nl-theme="dark"] body[class*="nl-login"] {
  background: radial-gradient(circle at 0 0, rgba(251, 113, 133, 0.12), transparent 28rem),
    linear-gradient(180deg, #050814 0%, #0b1220 52%, #111827 100%) !important;
  color: #e2e8f0 !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .login-card {
  background: #141a24 !important;
  border-color: #334155 !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42) !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .brand-panel {
  background: linear-gradient(135deg, #2b1018, #520913 55%, #74141f) !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] :is(.form-head h2, .field label, .remember, .mini-footer span) {
  color: #e2e8f0 !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .forgot-note {
  color: #94a3b8 !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .forgot-note a {
  color: #fda4af !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .message {
  background: #1f2937 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .message.error {
  background: #2a1217 !important;
  border-color: #7f1d1d !important;
  color: #fecdd3 !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .message.success {
  background: #0f2a21 !important;
  border-color: #166534 !important;
  color: #86efac !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .message.warning {
  background: #2b2116 !important;
  border-color: #92400e !important;
  color: #fde68a !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .input-wrap input {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] .input-wrap input::placeholder {
  color: #64748b !important;
}

html[data-nl-theme="dark"] body[class*="nl-login"] :is(.logo-box, .mobile-brand img) {
  background: #1f2937 !important;
}
