/* Desktop UI: force dark readable text on light backgrounds (all modules) */
.app-body[data-ui-mode="desktop"] .att-device,
.app-body[data-ui-mode="desktop"] .face-enroll,
.app-body[data-ui-mode="desktop"] .rpt-device,
.app-body[data-ui-mode="desktop"] .hod-device,
.app-body[data-ui-mode="desktop"] .mx-device,
.app-body[data-ui-mode="desktop"] .people-device,
.app-body[data-ui-mode="desktop"] .master-device,
.app-body[data-ui-mode="desktop"] .acad-device,
.app-body[data-ui-mode="desktop"] .corr-device,
.app-body[data-ui-mode="desktop"] .tt-device,
.app-body[data-ui-mode="desktop"] .tt-edit-device,
.app-body[data-ui-mode="desktop"] .mytt-device,
.app-body[data-ui-mode="desktop"] .s360-device,
.app-body[data-ui-mode="desktop"] .adm-device,
.app-body[data-ui-mode="desktop"] .dw-device,
.app-body[data-ui-mode="desktop"] .dept-rpt-device {
  color: var(--ca-ink, #152033);
}

/* Page titles / subtitles */
.app-body[data-ui-mode="desktop"] .att-device-nav-title strong,
.app-body[data-ui-mode="desktop"] .att-device-nav-title span,
.app-body[data-ui-mode="desktop"] .fe-nav-copy strong,
.app-body[data-ui-mode="desktop"] .fe-nav-copy span,
.app-body[data-ui-mode="desktop"] .panel-title,
.app-body[data-ui-mode="desktop"] .adm-sec-head,
.app-body[data-ui-mode="desktop"] .adm-sec-head span,
.app-body[data-ui-mode="desktop"] .adm-sec-head a {
  color: var(--ca-navy, #0a1628) !important;
}

/* KPI numbers + labels (Admin / Staff / Students / Face / Matrix / etc.) */
.app-body[data-ui-mode="desktop"] .att-dk strong,
.app-body[data-ui-mode="desktop"] .fe-kpi strong,
.app-body[data-ui-mode="desktop"] .att-kpi strong,
.app-body[data-ui-mode="desktop"] .hod-kpi strong,
.app-body[data-ui-mode="desktop"] .hod-mini strong,
.app-body[data-ui-mode="desktop"] .tt-cov-kpi strong {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .att-dk.present strong,
.app-body[data-ui-mode="desktop"] .fe-kpi.ok strong,
.app-body[data-ui-mode="desktop"] .people-card .face-present {
  color: #15803d !important;
}
.app-body[data-ui-mode="desktop"] .att-dk.pending strong,
.app-body[data-ui-mode="desktop"] .fe-kpi.pend strong,
.app-body[data-ui-mode="desktop"] .people-card .face-pending {
  color: #b45309 !important;
}
.app-body[data-ui-mode="desktop"] .att-dk.absent strong { color: #b91c1c !important; }
.app-body[data-ui-mode="desktop"] .att-dk.rate strong,
.app-body[data-ui-mode="desktop"] .att-dk.total strong,
.app-body[data-ui-mode="desktop"] .rpt-card-pct strong {
  color: #0f766e !important;
}
.app-body[data-ui-mode="desktop"] .att-dk span,
.app-body[data-ui-mode="desktop"] .fe-kpi span,
.app-body[data-ui-mode="desktop"] .att-kpi span,
.app-body[data-ui-mode="desktop"] .hod-kpi span,
.app-body[data-ui-mode="desktop"] .hod-mini span,
.app-body[data-ui-mode="desktop"] .tt-cov-kpi span,
.app-body[data-ui-mode="desktop"] .rpt-card-pct small {
  color: var(--ca-muted, #5c6b7a) !important;
}

/* Card body text */
.app-body[data-ui-mode="desktop"] .rpt-card-copy strong,
.app-body[data-ui-mode="desktop"] .rpt-hub strong,
.app-body[data-ui-mode="desktop"] .rpt-hub-device-grid strong {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .rpt-card-copy span,
.app-body[data-ui-mode="desktop"] .rpt-card-meta,
.app-body[data-ui-mode="desktop"] .rpt-hub span,
.app-body[data-ui-mode="desktop"] .rpt-hub-device-grid span,
.app-body[data-ui-mode="desktop"] .att-list-empty,
.app-body[data-ui-mode="desktop"] .empty-state,
.app-body[data-ui-mode="desktop"] .text-muted {
  color: var(--ca-muted, #5c6b7a) !important;
}

/* Ghost / secondary buttons + card action links (Profile / Face / Reset / Staff / Edit ghost) */
.app-body[data-ui-mode="desktop"] .att-btn-ghost,
.app-body[data-ui-mode="desktop"] a.att-btn-ghost,
.app-body[data-ui-mode="desktop"] button.att-btn-ghost,
.app-body[data-ui-mode="desktop"] .dw-card-actions .att-btn:not(.att-btn-primary),
.app-body[data-ui-mode="desktop"] .dw-card-actions a.att-btn:not(.att-btn-primary),
.app-body[data-ui-mode="desktop"] .dw-card-actions .att-btn-ghost,
.app-body[data-ui-mode="desktop"] .dw-card-actions a.att-btn-ghost,
.app-body[data-ui-mode="desktop"] .dw-card-actions button.att-btn-ghost,
.app-body[data-ui-mode="desktop"] .people-device .dw-card-actions .att-btn-ghost,
.app-body[data-ui-mode="desktop"] .people-device .dw-card-actions a.att-btn-ghost,
.app-body[data-ui-mode="desktop"] .people-device .dw-card-actions button.att-btn-ghost,
.app-body[data-ui-mode="desktop"] .rpt-card .dw-card-actions .att-btn-ghost,
.app-body[data-ui-mode="desktop"] .mx-export-actions .att-btn:not(.att-btn-primary),
.app-body[data-ui-mode="desktop"] .mx-export-actions a.att-btn:not(.att-btn-primary),
.app-body[data-ui-mode="desktop"] .fe-btn-ghost,
.app-body[data-ui-mode="desktop"] .fe-tool-btn,
.app-body[data-ui-mode="desktop"] .fe-chips button,
.app-body[data-ui-mode="desktop"] .fe-chips-inline button {
  background: #e8eef4 !important;
  border: 1px solid #c5d0dc !important;
  color: #0a1628 !important;
  -webkit-text-fill-color: #0a1628 !important;
  opacity: 1 !important;
}
.app-body[data-ui-mode="desktop"] .att-btn-ghost:hover,
.app-body[data-ui-mode="desktop"] a.att-btn-ghost:hover,
.app-body[data-ui-mode="desktop"] .dw-card-actions .att-btn:not(.att-btn-primary):hover,
.app-body[data-ui-mode="desktop"] .dw-card-actions .att-btn-ghost:hover,
.app-body[data-ui-mode="desktop"] .people-device .dw-card-actions .att-btn-ghost:hover,
.app-body[data-ui-mode="desktop"] .fe-btn-ghost:hover {
  background: #d7e0ea !important;
  color: #0a1628 !important;
  -webkit-text-fill-color: #0a1628 !important;
}
.app-body[data-ui-mode="desktop"] .dw-card-actions .att-btn-primary,
.app-body[data-ui-mode="desktop"] .att-btn-primary,
.app-body[data-ui-mode="desktop"] .fe-btn-primary {
  color: #042f2e !important;
  -webkit-text-fill-color: #042f2e !important;
}
.app-body[data-ui-mode="desktop"] .people-card .rpt-card-pct small {
  color: #9a3412 !important;
}

/* Staff profile contact + lists */
.app-body[data-ui-mode="desktop"] .sp-device-contact span {
  color: #5c6b7a !important;
}
.app-body[data-ui-mode="desktop"] .sp-device-contact strong,
.app-body[data-ui-mode="desktop"] .staff-device .staff-sec-head {
  color: #0a1628 !important;
}
.app-body[data-ui-mode="desktop"] #spTtSummary,
.app-body[data-ui-mode="desktop"] .staff-device .staff-sec-head .small {
  color: #5c6b7a !important;
}
.app-body[data-ui-mode="desktop"] .sp-device-list .att-manual-item .name,
.app-body[data-ui-mode="desktop"] .sp-device-list .att-manual-item .status {
  color: #0a1628 !important;
}
.app-body[data-ui-mode="desktop"] .att-manual-item .status,
.app-body[data-ui-mode="desktop"] .att-manual-item.is-present .status,
.app-body[data-ui-mode="desktop"] .sp-device-list .att-manual-item.is-present .status,
.app-body[data-ui-mode="desktop"] .att-list li.marked .status {
  background: #dcfce7 !important;
  color: #14532d !important;
  -webkit-text-fill-color: #14532d !important;
}
.app-body[data-ui-mode="desktop"] .att-manual-item.is-absent .status {
  background: #fee2e2 !important;
  color: #991b1b !important;
  -webkit-text-fill-color: #991b1b !important;
}
.app-body[data-ui-mode="desktop"] .att-manual-item.is-late .status {
  background: #fef3c7 !important;
  color: #92400e !important;
  -webkit-text-fill-color: #92400e !important;
}
.app-body[data-ui-mode="desktop"] .status-pill.done,
.app-body[data-ui-mode="desktop"] .status-pill.completed,
.app-body[data-ui-mode="desktop"] .status-pill.present,
.app-body[data-ui-mode="desktop"] .status-pill.approved {
  background: #dcfce7 !important;
  color: #14532d !important;
}
.app-body[data-ui-mode="desktop"] .status-pill.pending {
  background: #fef3c7 !important;
  color: #92400e !important;
}
.app-body[data-ui-mode="desktop"] .status-pill.absent,
.app-body[data-ui-mode="desktop"] .status-pill.rejected {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.app-body[data-ui-mode="desktop"] .master-device .dw-card-actions .att-btn-ghost,
.app-body[data-ui-mode="desktop"] .master-device .dw-card-actions a.att-btn-ghost {
  color: #0a1628 !important;
  -webkit-text-fill-color: #0a1628 !important;
  background: #e8eef4 !important;
  border: 1px solid #c5d0dc !important;
}
.app-body[data-ui-mode="desktop"] .fe-chips button.on,
.app-body[data-ui-mode="desktop"] .fe-chips-inline button.on {
  background: rgba(13, 148, 136, 0.12) !important;
  border-color: rgba(13, 148, 136, 0.4) !important;
  color: #0f766e !important;
}

/* Forms / filters / sheets */
.app-body[data-ui-mode="desktop"] .att-sheet .att-roster-head,
.app-body[data-ui-mode="desktop"] .att-sheet .att-roster-head span,
.app-body[data-ui-mode="desktop"] .corr-field,
.app-body[data-ui-mode="desktop"] .face-device-filters label,
.app-body[data-ui-mode="desktop"] .fe-filters label,
.app-body[data-ui-mode="desktop"] .fe-side label {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .att-sheet .att-roster-head > span:first-child {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .form-control,
.app-body[data-ui-mode="desktop"] .form-select,
.app-body[data-ui-mode="desktop"] .corr-field .form-control,
.app-body[data-ui-mode="desktop"] .corr-field .form-select,
.app-body[data-ui-mode="desktop"] .face-device-filters .form-control,
.app-body[data-ui-mode="desktop"] .face-device-filters .form-select,
.app-body[data-ui-mode="desktop"] .fe-filters .form-control,
.app-body[data-ui-mode="desktop"] .fe-filters .form-select,
.app-body[data-ui-mode="desktop"] .fe-search,
.app-body[data-ui-mode="desktop"] .people-search-bar .form-control {
  background: #fff !important;
  border-color: var(--ca-border, #d0dae6) !important;
  color: var(--ca-ink, #152033) !important;
}
.app-body[data-ui-mode="desktop"] .form-control::placeholder,
.app-body[data-ui-mode="desktop"] .fe-search::placeholder {
  color: #64748b !important;
}

/* Tables */
.app-body[data-ui-mode="desktop"] .table,
.app-body[data-ui-mode="desktop"] .matrix-table,
.app-body[data-ui-mode="desktop"] .tt-edit-device .table {
  color: var(--ca-ink, #152033) !important;
  --bs-table-color: var(--ca-ink, #152033);
  --bs-table-border-color: var(--ca-border, #e2e8f0);
}
.app-body[data-ui-mode="desktop"] .table thead th,
.app-body[data-ui-mode="desktop"] .matrix-table thead th {
  color: var(--ca-muted, #5c6b7a) !important;
  background: #f8fafc !important;
}

/* Nav icon buttons on page headers */
.app-body[data-ui-mode="desktop"] .att-nav-btn,
.app-body[data-ui-mode="desktop"] .fe-icon-btn {
  background: #f1f5f9 !important;
  border-color: var(--ca-border, #d0dae6) !important;
  color: var(--ca-navy, #0a1628) !important;
}

/* Status pills on light cards */
.app-body[data-ui-mode="desktop"] .status-pill,
.app-body[data-ui-mode="desktop"] .fe-pill,
.app-body[data-ui-mode="desktop"] .badge {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .status-pill.completed,
.app-body[data-ui-mode="desktop"] .fe-pill.ok,
.app-body[data-ui-mode="desktop"] .badge.ok {
  color: #15803d !important;
  background: rgba(21, 128, 61, 0.12) !important;
}
.app-body[data-ui-mode="desktop"] .status-pill.pending,
.app-body[data-ui-mode="desktop"] .fe-pill.pend,
.app-body[data-ui-mode="desktop"] .badge.pend {
  color: #b45309 !important;
  background: rgba(180, 83, 9, 0.12) !important;
}

/* Timetable matrix / staff week / my-class (device shell on light desktop page) */
.app-body[data-ui-mode="desktop"] .mytt-device,
.app-body[data-ui-mode="desktop"] .tm-device,
.app-body[data-ui-mode="desktop"] .tt-edit-device {
  color: var(--ca-ink, #152033) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-block .surface,
.app-body[data-ui-mode="desktop"] .mytt-device .surface,
.app-body[data-ui-mode="desktop"] .tm-device .surface {
  background: #fff !important;
  border-color: var(--ca-border, #d0dae6) !important;
  color: var(--ca-ink, #152033) !important;
  box-shadow: var(--ca-shadow, 0 8px 24px rgba(10, 22, 40, 0.06));
}
.app-body[data-ui-mode="desktop"] .mytt-device .panel-title,
.app-body[data-ui-mode="desktop"] .tm-device .panel-title,
.app-body[data-ui-mode="desktop"] .tt-edit-device .panel-title {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-grid th,
.app-body[data-ui-mode="desktop"] .mytt-device .tt-grid td,
.app-body[data-ui-mode="desktop"] .tm-device .tt-grid th,
.app-body[data-ui-mode="desktop"] .tm-device .tt-grid td {
  border-color: var(--ca-border, #d0dae6) !important;
  background: #fff !important;
  color: var(--ca-ink, #152033) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-grid thead th,
.app-body[data-ui-mode="desktop"] .tm-device .tt-grid thead th {
  background: linear-gradient(180deg, #f8fafc, #eef3f7) !important;
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-grid .tt-day,
.app-body[data-ui-mode="desktop"] .tm-device .tt-grid .tt-day {
  background: #fff !important;
  color: var(--ca-navy, #0a1628) !important;
  box-shadow: 4px 0 8px -6px rgba(10, 22, 40, 0.12);
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-grid thead .tt-day,
.app-body[data-ui-mode="desktop"] .tm-device .tt-grid thead .tt-day {
  background: #eef3f7 !important;
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-cell,
.app-body[data-ui-mode="desktop"] .tm-device .tt-cell {
  background: #f7fbfb !important;
  color: var(--ca-ink, #152033) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-cell.has,
.app-body[data-ui-mode="desktop"] .tm-device .tt-cell.has {
  background: linear-gradient(160deg, #e8f6f7 0%, #f4fbfb 100%) !important;
  border-left-color: var(--ca-accent, #0d5c63) !important;
  color: var(--ca-ink, #152033) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-sub,
.app-body[data-ui-mode="desktop"] .tm-device .tt-sub,
.app-body[data-ui-mode="desktop"] .tt-sub {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-meta,
.app-body[data-ui-mode="desktop"] .tm-device .tt-meta,
.app-body[data-ui-mode="desktop"] .tt-meta,
.app-body[data-ui-mode="desktop"] .mytt-device .tt-block-stats {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-free,
.app-body[data-ui-mode="desktop"] .tm-device .tt-free {
  background: #eef6ef !important;
  color: #166534 !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-empty,
.app-body[data-ui-mode="desktop"] .tm-device .tt-empty {
  color: #94a3b8 !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-day-card {
  background: #fff !important;
  border-color: var(--ca-border, #d0dae6) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-day-head {
  background: #f8fafc !important;
  border-bottom-color: var(--ca-border, #e2e8f0) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-day-head strong,
.app-body[data-ui-mode="desktop"] .mytt-device .tt-p-slot strong,
.app-body[data-ui-mode="desktop"] .mytt-device .tt-p-body strong {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-day-head span,
.app-body[data-ui-mode="desktop"] .mytt-device .tt-p-slot span,
.app-body[data-ui-mode="desktop"] .mytt-device .tt-p-body span {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-prow.is-occ {
  background: linear-gradient(90deg, rgba(13, 92, 99, 0.08), transparent 42%) !important;
  border-left-color: var(--ca-accent, #0d5c63) !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-prow.is-free {
  background: rgba(34, 197, 94, 0.06) !important;
  border-left-color: #86efac !important;
}
.app-body[data-ui-mode="desktop"] .mytt-device .tt-prow.is-free .tt-p-body strong {
  color: #166534 !important;
}

/* Masters / Academic / Subjects / Assignments remaining light text */
.app-body[data-ui-mode="desktop"] .acad-device .panel-title,
.app-body[data-ui-mode="desktop"] .master-device .panel-title,
.app-body[data-ui-mode="desktop"] .asg-device .panel-title {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .acad-device .corr-field,
.app-body[data-ui-mode="desktop"] .master-device .corr-field,
.app-body[data-ui-mode="desktop"] .tt-cov-hint,
.app-body[data-ui-mode="desktop"] .tt-cov-head {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .tt-cov-head strong,
.app-body[data-ui-mode="desktop"] .tt-cov-kpi strong {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .tt-cov-panel {
  background: #fff !important;
  border-color: var(--ca-border, #d0dae6) !important;
}
.app-body[data-ui-mode="desktop"] .hod-device .hod-panel-head h2,
.app-body[data-ui-mode="desktop"] .hod-device .hod-report-card strong,
.app-body[data-ui-mode="desktop"] .hod-cov strong {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .hod-device .hod-report-card span,
.app-body[data-ui-mode="desktop"] .hod-cov span,
.app-body[data-ui-mode="desktop"] .hod-device .text-muted {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .staff-device,
.app-body[data-ui-mode="desktop"] .staff-device .staff-next-dark h3,
.app-body[data-ui-mode="desktop"] .staff-device-cards .kpi-row strong {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .staff-device .text-muted,
.app-body[data-ui-mode="desktop"] .staff-device .staff-meta {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .staff-device .staff-next-dark,
.app-body[data-ui-mode="desktop"] .staff-device-cards .att-class-card,
.app-body[data-ui-mode="desktop"] .staff-device-cards .kpi-row {
  color: var(--ca-ink, #152033) !important;
}
.app-body[data-ui-mode="desktop"] .staff-device-cards .att-class-card .meta,
.app-body[data-ui-mode="desktop"] .staff-device-cards .kpi-row span {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .staff-device-cards .att-class-card .period {
  color: #0f766e !important;
  -webkit-text-fill-color: #0f766e !important;
}
.app-body[data-ui-mode="desktop"] .staff-device-cards .att-class-card h3 {
  color: #0a1628 !important;
  -webkit-text-fill-color: #0a1628 !important;
}
.app-body[data-ui-mode="desktop"] .staff-device-cards .att-class-card .meta span {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  background: #eef3f7 !important;
}
.app-body[data-ui-mode="desktop"] .staff-live-card {
  color: var(--ca-navy, #0a1628) !important;
}
.app-body[data-ui-mode="desktop"] .set-card .set-type,
.app-body[data-ui-mode="desktop"] .audit-card .set-type {
  color: var(--ca-muted, #5c6b7a) !important;
}
.app-body[data-ui-mode="desktop"] .set-card code,
.app-body[data-ui-mode="desktop"] .sys-req code {
  color: #0f766e !important;
}
.app-body[data-ui-mode="desktop"] .acad-device .table,
.app-body[data-ui-mode="desktop"] .master-device .table,
.app-body[data-ui-mode="desktop"] .people-device .table,
.app-body[data-ui-mode="desktop"] .tt-edit-device .table,
.app-body[data-ui-mode="desktop"] .hod-device .table {
  color: var(--ca-ink, #152033) !important;
  --bs-table-color: var(--ca-ink, #152033) !important;
  --bs-table-bg: #fff !important;
  --bs-table-border-color: var(--ca-border, #e2e8f0) !important;
}
.app-body[data-ui-mode="desktop"] .acad-device .table thead th,
.app-body[data-ui-mode="desktop"] .master-device .table thead th,
.app-body[data-ui-mode="desktop"] .people-device .table thead th {
  color: var(--ca-muted, #5c6b7a) !important;
  background: #f8fafc !important;
}
