/* Nepal Dairy: fixes on top of the clay theme (kept separate so theme files can be replaced as delivered). */

/* Form section bars (customer, visit, lease, equipment, raw milk forms) are red with white text;
   the theme's heading colour made the text dark blue on red. */
html[data-theme] body .section-title { color: #fff; }

/* Green "Open Online Shop" button on the Orders page: the theme's link colour made it blue on green. */
html[data-theme] body a.shop-link-btn { color: #fff; }

/* Shop home banner: headline and intro sit on a dark blue gradient, so keep them white. */
html[data-theme] body .hero-content :is(h1, p) { color: #fff; }

/* Dark mode: the theme gives links its primary blue (#418ABE), too dark on dark panels and rows. */
html[data-theme="dark"] { --nd-dark-link: #9DD3F7; }
html[data-theme="dark"] body :is(.main-content,.container,.page-container,.content-wrapper,.shop-container) :is(a:not([class*="btn-"]):not([class*="-btn"]):not(.action-card):not(.tab-btn):not(.subcat-tab)) { color: var(--nd-dark-link); }
html[data-theme="dark"] body .clay-breadcrumb :is(a,.clay-crumb-home) { color: var(--nd-dark-link) !important; }   /* theme sets it with !important */

/* Buttons that are links: keep their own text colour over the theme's link colour. */
html[data-theme] body a.shop-link-btn { color: #fff !important; }
html[data-theme="dark"] body a.clear-btn { color: var(--clay-danger-ink) !important; }

/* Status pills coloured from the database (inline colour set at render time): brighten in dark mode. */
html[data-theme="dark"] body .pill[style*="color"] { filter: brightness(1.9) saturate(0.85); }

/* Dark mode: the theme recolours table body cells (tbody td) but not header/footer rows built as td. */
html[data-theme="dark"] body table :is(thead, tfoot) td { color: var(--clay-ink); }

/* Dark mode: green totals (style.css .grand-total #059669) */
html[data-theme="dark"] body .grand-total,
html[data-theme="dark"] body .grand-total strong { color: var(--clay-success-ink); }

/* Dark mode: Nepali date picker (button, AD input, calendar popup) — styled in style.css with white surfaces */
html[data-theme="dark"] body :is(.ndp-bs-btn, .ndp-ad-in, .ndp-ysel, .ndp-msel) {
  background: var(--clay-inset-bg); color: var(--clay-ink); border-color: var(--clay-line);
}
html[data-theme="dark"] body .ndp-bs-btn:is(:hover, :focus) { background: var(--clay-interactive-hover); }
html[data-theme="dark"] body .ndp-popup { background: var(--clay-panel); border-color: var(--clay-line); box-shadow: var(--clay-raised-shadow); }
html[data-theme="dark"] body :is(.ndp-title, .ndp-d) { color: var(--clay-ink); }
html[data-theme="dark"] body :is(.ndp-nav, .ndp-wh, .ndp-table-bs, .ndp-d.ndp-tod) { color: var(--nd-dark-link); border-color: var(--clay-line); }
html[data-theme="dark"] body :is(.ndp-nav, .ndp-d):hover { background: var(--clay-interactive-hover); }
html[data-theme="dark"] body .ndp-d.ndp-sel { background: var(--palette-primary); color: #fff; }
html[data-theme="dark"] body .ndp-equiv { color: var(--clay-secondary); border-top-color: var(--clay-line); }
html[data-theme="dark"] body .ndp-d sub { color: var(--clay-secondary); }

/* Dark mode: Customer Setup tab strip (page styles: grey tabs, red active tab) */
html[data-theme="dark"] body .tabs a { background: var(--clay-inset-bg); color: var(--clay-ink) !important; }
html[data-theme] body .tabs a.on { background: #c0392b; color: #fff !important; }   /* both modes: the theme link colour made it blue on red */

/* Dark mode: shop product subcategory labels and the order confirmation title (shop.css colours) */
html[data-theme="dark"] body .product-subcat { color: var(--clay-secondary); }
html[data-theme="dark"] body .confirm-title { color: var(--clay-success-ink); }
