/* THRS V14.63 | Attendance Intelligence — Approved Midnight Navy & Cumin Gold
   Route-scoped DARK ONLY. Applied as a direct final head stylesheet to avoid
   CSS gateway timing/cache problems. Identical Light layout + chart data. */

html[data-theme="dark"] body .thrs-page-attendance .thrs-attendance-analytics-grid > :is(.at16-trend-panel,.at16-heatmap-panel),
html[data-theme="dark"] body .thrs-shell .thrs-page-attendance[data-thrs-attendance-v1411="insights"] .thrs-attendance-chart-panel,
html[data-theme="dark"] body .thrs-page-attendance :is(.at16-trend-panel,.at16-heatmap-panel) {
  --at16-paper:#102d41!important;
  --at16-soft:#0b273a!important;
  --at16-ink:#f0f5fa!important;
  --at16-muted:#bdd0dc!important;
  --at16-border:#547185!important;
  --v1414-surface:#102d41!important;
  --v1414-raised:#0b273a!important;
  --v1414-ink:#f0f5fa!important;
  --v1414-muted:#bfd0db!important;
  --v1414-stroke:#547185!important;
  --v1414-hair:#486579!important;
  --lux12-paper:#102d41!important;
  --lux12-wash:#0b273a!important;
  --lux12-ink:#f0f5fa!important;
  --lux12-muted:#bfd0dc!important;
  background:#102d41!important;
  background-image:linear-gradient(155deg,#16384b 0%,#0b273a 100%)!important;
  background-color:#102d41!important;
  color:#eef4f8!important;
  border-color:#63798a!important;
  box-shadow:0 12px 23px rgba(0,5,13,.25),inset 0 1px 0 rgba(244,234,215,.055)!important;
  color-scheme:dark!important;
}
/* Header text, horizontal divider, gold icons and restrained gold pills. */
html[data-theme="dark"] body .thrs-page-attendance :is(.at16-trend-panel,.at16-heatmap-panel) .thrs-premium-panel-head {
  background:none!important;
  border-bottom-color:#426277!important;
}
html[data-theme="dark"] body .thrs-page-attendance :is(.at16-trend-panel,.at16-heatmap-panel) .thrs-premium-panel-head h3 {
  color:#eef5f8!important;
  -webkit-text-fill-color:#eef5f8!important;
}
html[data-theme="dark"] body .thrs-page-attendance :is(.at16-trend-panel,.at16-heatmap-panel) .thrs-premium-panel-badge {
  background:#253b42!important;
  background-image:none!important;
  color:#edc478!important;
  border-color:#b18b50!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-page-attendance :is(.at16-trend-panel,.at16-heatmap-panel) .thrs-premium-panel-body {
  background:transparent!important;
  background-image:none!important;
  color:#c4d6e2!important;
}
/* Data-less floating message: dark slate, not white. */
html[data-theme="dark"] body .thrs-page-attendance .at16-trend-empty {
  background:#1e4054!important;
  background-image:none!important;
  background-color:#1e4054!important;
  border-color:#527588!important;
  color:#e7f1f6!important;
  box-shadow:0 3px 11px rgba(0,9,18,.19)!important;
}
/* Chart.js axis labels are painted light-mode navy inside canvas.
   Preserve actual series geometry and points; adjust display contrast only. */
html[data-theme="dark"] body .thrs-page-attendance .at16-trend-canvas {
  background:transparent!important;
}
html[data-theme="dark"] body .thrs-page-attendance .at16-trend-canvas canvas {
  filter:invert(.84) hue-rotate(180deg) saturate(.83)!important;
}
/* Heatmap dark slate internal background and 84 "No data" cells. Keep
   real attendance status colors unchanged: present/late/absent/leave/WFH. */
html[data-theme="dark"] body .thrs-page-attendance .at16-heatmap-scroll {
  background:#123348!important;
  background-image:none!important;
  border-color:#54788b!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-page-attendance .at16-heatmap-cell[style*="#e6edf5"],
html[data-theme="dark"] body .thrs-page-attendance .at16-heatmap-cell[style*="230, 237, 245"] {
  background:#365469!important;
  background-color:#365469!important;
  border-color:#587b90!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-theme="dark"] body .thrs-page-attendance .at16-heatmap-legend i[style*="#e6edf5"],
html[data-theme="dark"] body .thrs-page-attendance .at16-heatmap-legend i[style*="230, 237, 245"] {
  background:#365469!important;
  background-color:#365469!important;
  border-color:#587b90!important;
}
html[data-theme="dark"] body .thrs-page-attendance :is(
 .at16-heatmap-weekdays span,.at16-heatmap-week-label,.at16-empty-heatmap,.at16-heatmap-legend
) {
 color:#c3d4e0!important;
 -webkit-text-fill-color:#c3d4e0!important;
}
html[data-theme="dark"] body .thrs-page-attendance .at16-heatmap-legend span{
 color:#d7e3ea!important;
}
/* Additional attendance panel backgrounds when visiting other tabs.
   Avoid changing their size, spacing, placement, or event handlers. */
html[data-theme="dark"] body .thrs-page-attendance :is(
 .thrs-attendance-filters-panel,.thrs-attendance-monthly-panel,.thrs-attendance-records-panel
) {
 background:#183649!important;
 background-image:linear-gradient(160deg,#1b3a4e,#102a3c)!important;
 border-color:#547184!important;
 color:#e9f3f8!important;
}
html[data-theme="dark"] body .thrs-page-attendance :is(
 .thrs-attendance-filters-panel,.thrs-attendance-monthly-panel,.thrs-attendance-records-panel
) .thrs-premium-panel-head h3{
 color:#ebf3f7!important;
}
/* Pure skin patch. No width, height, grid-template, position, JS, APIs or permissions. */
