/* UI40: theme tokens for legacy component declarations. Values are unset in
   light mode, so their exact original fallback colors remain in effect. */
@media screen {
html[data-theme="dark"] {
  --orange:var(--abz-orange);
  --red:var(--abz-red);
  --ui40-surface:var(--paper);
  --ui40-raised:var(--soft);
  --ui40-text:var(--ink);
  --ui40-muted:var(--muted);
  --ui40-border:var(--line);
  --ui40-track:#34465e;
  --ui40-accent:var(--primary);
  --ui40-accent-surface:var(--abz-blue-soft);
  --ui40-success:var(--abz-green);
  --ui40-success-surface:var(--abz-green-soft);
  --ui40-warning:var(--abz-orange);
  --ui40-warning-surface:var(--abz-orange-soft);
  --ui40-danger:var(--abz-red);
  --ui40-danger-surface:var(--abz-red-soft);
}
html[data-theme="dark"] body.ui-update.abz-ui39 {
  background:var(--bg);
  color:var(--ink);
}
/* Surface aliases also cover the mobile cards generated from real tables. */
html[data-theme="dark"] body.ui-update.abz-ui39 #app :is(.table-scroll,.ui-focus-table,.responsive-table,.responsive-table tbody,.responsive-table tbody tr) {
  background-color:var(--paper);
  border-color:var(--line);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #app :is(.location-cell strong,.user-cell strong,.metric strong,.main-text) {
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #app .dashboard-stats .stat :is(.stat-value,.stat-label,.stat-sub) {
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #app .dashboard-stats .stat :is(.stat-label,.stat-sub) {
  color:var(--muted);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.notifications-dialog {
  background:var(--paper);
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.notifications-dialog :is(.modal-head,.notification-toolbar,.notification-list,.modal-footer) {
  background:var(--paper);
  border-color:var(--line);
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.notifications-dialog .notification-item {
  background:var(--soft);
  border-color:var(--line);
  color:var(--ink);
  opacity:1;
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.notifications-dialog .notification-item.unread {
  background:var(--abz-blue-soft);
  border-color:#4e6c98;
  box-shadow:inset 4px 0 #8ab2ff;
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.notifications-dialog .notification-body :is(strong,p) {
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.notifications-dialog .notification-body :is(time,small) {
  color:var(--muted);
}
html[data-theme="dark"] body.ui-update.abz-ui39 :is(.sync-notice,.sync-inline-notice) {
  background:var(--abz-orange-soft);
  color:var(--abz-orange);
  border-color:#8b6937;
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.unified-dossier :is(.modal-head,.modal-content,.modal-footer,.dossier-tabs) {
  background:var(--paper);
  border-color:var(--line);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.unified-dossier .modal-head :is(h2,p) {
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.unified-dossier :is(.order-planning,.order-planning-summary,.fleet-extras,.record-note,.information-text,.damage-text,.battery-record,.battery-summary,.media-card,.document-item,.history-entry,.order-comment) {
  background:var(--soft);
  color:var(--ink);
  border-color:var(--line);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #modal.unified-dossier :is(.detail-facts,.order-planning-summary) strong {
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #app .profile-picture-editor {
  background:var(--soft);
  color:var(--ink);
  border-color:var(--line);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #app .profile-picture-editor :is(p,small) {
  color:var(--muted);
}
html[data-theme="dark"] body.ui-update.abz-ui39 #app .profile-picture-editor strong {
  color:var(--ink);
}
html[data-theme="dark"] body.ui-update.abz-ui39 :is(.meter>span,.meter>i,.accessory-progress,.task-progress) {
  background-color:var(--ui40-track);
}
/* Search icons have their own flex slot, including inside the activity log. */
body.ui-update.abz-ui39 :is(.notification-toolbar,.ui-users-toolbar) .search {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
body.ui-update.abz-ui39 :is(.notification-toolbar,.ui-users-toolbar) .search>.icon {
  position:static;
  flex-shrink:0;
}
body.ui-update.abz-ui39 :is(.notification-toolbar,.ui-users-toolbar) .search>input {
  min-width:0;
  padding-left:12px;
}
}
