/*
   izObras — tema escuro global

   Este ficheiro e carregado depois dos estilos isolados dos componentes.
   Centraliza as superfícies escuras para que páginas, diálogos e componentes
   novos não tenham de implementar um tema escuro individualmente.
*/

html[data-iz-theme="dark"] {
    color-scheme: dark;
    --iz-dark-canvas: #202124;
    --iz-dark-navigation: #292a2d;
    --iz-dark-surface: #303134;
    --iz-dark-surface-raised: #3a3b3e;
    --iz-dark-surface-soft: #44464a;
    --iz-dark-surface-hover: #4a4c50;
    --iz-dark-border: #4a4d52;
    --iz-dark-border-strong: #5f6368;
    --iz-dark-text: #e8eaed;
    --iz-dark-text-soft: #dadce0;
    --iz-dark-muted: #bdc1c6;
    --iz-dark-input: #202124;

    --iz-ink: var(--iz-dark-text);
    --iz-muted: var(--iz-dark-muted);
    --iz-canvas: var(--iz-dark-canvas);
    --iz-surface: var(--iz-dark-surface);
    --iz-surface-raised: var(--iz-dark-surface-raised);
    --iz-surface-secondary: var(--iz-dark-surface-soft);
    --iz-border: var(--iz-dark-border);
    --iz-border-light: var(--iz-dark-border);
    --iz-primary-soft: color-mix(in srgb, var(--iz-brand-primary) 22%, var(--iz-dark-surface));
    --iz-info-soft: color-mix(in srgb, var(--iz-brand-secondary) 22%, var(--iz-dark-surface));
    --iz-brand-primary-soft: color-mix(in srgb, var(--iz-brand-primary) 22%, var(--iz-dark-surface));
    --iz-brand-secondary-soft: color-mix(in srgb, var(--iz-brand-secondary) 22%, var(--iz-dark-surface));
    --iz-brand-primary-border: color-mix(in srgb, var(--iz-brand-primary) 48%, var(--iz-dark-border));
    --iz-shadow-sm: 0 3px 10px rgba(0, 0, 0, .22);
    --iz-shadow-md: 0 14px 36px rgba(0, 0, 0, .3);

    /* Compatibilidade com componentes que ainda usam a paleta clara legada. */
    --iz-palette-f8fafb: var(--iz-dark-surface-raised);
    --iz-palette-f7f9fa: var(--iz-dark-surface-soft);
    --iz-palette-f7fafb: var(--iz-dark-surface-soft);
    --iz-palette-f7fbf9: var(--iz-dark-surface-raised);
    --iz-palette-f4f8fa: var(--iz-dark-surface-soft);
    --iz-palette-fbf8f9: var(--iz-dark-surface-soft);
    --iz-palette-faf6f7: var(--iz-dark-surface);
    --iz-palette-fbfdfc: var(--iz-dark-surface-hover);
    --iz-palette-f5fbf8: color-mix(in srgb, #23a559 9%, var(--iz-dark-surface-raised));
    --iz-palette-f4fbf7: color-mix(in srgb, #23a559 9%, var(--iz-dark-surface-raised));
    --iz-palette-f8fbfa: var(--iz-dark-surface-soft);
    --iz-palette-fffafa: color-mix(in srgb, #ed4245 7%, var(--iz-dark-surface-raised));
    --iz-palette-fff9ed: color-mix(in srgb, #f0b232 12%, var(--iz-dark-surface-raised));
    --iz-palette-fff4dd: color-mix(in srgb, #f0b232 12%, var(--iz-dark-surface-raised));
    --iz-palette-fff5e4: color-mix(in srgb, #f0b232 12%, var(--iz-dark-surface-raised));
    --iz-palette-fff1d7: color-mix(in srgb, #f0b232 13%, var(--iz-dark-surface-raised));
    --iz-palette-fff4f5: color-mix(in srgb, #ed4245 11%, var(--iz-dark-surface-raised));
    --iz-palette-fff5f6: color-mix(in srgb, #ed4245 10%, var(--iz-dark-surface-raised));
    --iz-palette-fff3f4: color-mix(in srgb, #ed4245 11%, var(--iz-dark-surface-raised));
    --iz-palette-f6f1f2: color-mix(in srgb, #ed4245 7%, var(--iz-dark-surface-raised));
    --iz-palette-edf8f2: color-mix(in srgb, #23a559 12%, var(--iz-dark-surface-raised));
    --iz-palette-eaf8f0: color-mix(in srgb, #23a559 12%, var(--iz-dark-surface-raised));
    --iz-palette-e8f7f0: color-mix(in srgb, #23a559 12%, var(--iz-dark-surface-raised));
    --iz-palette-e6f5ed: color-mix(in srgb, #23a559 12%, var(--iz-dark-surface-raised));
    --iz-palette-e5f5ec: color-mix(in srgb, #23a559 12%, var(--iz-dark-surface-raised));
    --iz-palette-edf7f3: color-mix(in srgb, #23a559 10%, var(--iz-dark-surface-raised));
    --iz-palette-e8f2f5: color-mix(in srgb, #3b82a0 14%, var(--iz-dark-surface-raised));
    --iz-palette-eef3f6: color-mix(in srgb, #3b82a0 12%, var(--iz-dark-surface-raised));
    --iz-palette-f1f7fa: color-mix(in srgb, #3b82a0 10%, var(--iz-dark-surface-raised));
    --iz-palette-f0ebff: color-mix(in srgb, #8b5cf6 12%, var(--iz-dark-surface-raised));
    --iz-palette-f0edff: color-mix(in srgb, #8b5cf6 12%, var(--iz-dark-surface-raised));
    --iz-palette-e2e8eb: var(--iz-dark-border);
    --iz-palette-dfe6e9: var(--iz-dark-border);
    --iz-palette-dce4e8: var(--iz-dark-border);
    --iz-palette-dce5e9: var(--iz-dark-border);
    --iz-palette-e5ebee: var(--iz-dark-border);
    --iz-palette-e7dadd: var(--iz-dark-border);
    --iz-palette-eadfe1: var(--iz-dark-border);
    --iz-palette-eee4e6: var(--iz-dark-border);
    --iz-palette-edf1ef: var(--iz-dark-border);
}

html[data-iz-theme="dark"],
html[data-iz-theme="dark"] body,
html[data-iz-theme="dark"] .mud-layout,
html[data-iz-theme="dark"] .iz-main-content,
html[data-iz-theme="dark"] .iz-page-frame,
html[data-iz-theme="dark"] .agenda-page,
html[data-iz-theme="dark"] .station-page {
    color: var(--iz-dark-text) !important;
    background: var(--iz-dark-canvas) !important;
}

/* Superfícies MudBlazor: cartões, janelas, menus, tabelas e expansores. */
html[data-iz-theme="dark"] :is(
    .mud-paper:not(.mud-alert):not(.mud-drawer):not(.mud-appbar),
    .mud-card,
    .mud-dialog,
    .mud-dialog-title,
    .mud-dialog-content,
    .mud-dialog-actions,
    .mud-popover,
    .mud-menu,
    .mud-list,
    .mud-table,
    .mud-table-container,
    .mud-expand-panel,
    .mud-tabs,
    .mud-tabs-panels,
    .mud-picker,
    .mud-picker-content,
    .mud-picker-calendar-content
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface) !important;
    --mud-palette-text-primary: var(--iz-dark-text);
    --mud-palette-text-secondary: var(--iz-dark-muted);
    --mud-palette-action-default: var(--iz-dark-text-soft);
    --mud-palette-divider: var(--iz-dark-border);
    --mud-palette-surface: var(--iz-dark-surface);
    --mud-palette-background: var(--iz-dark-canvas);
}

html[data-iz-theme="dark"] :is(.mud-table-head, .mud-table-foot) .mud-table-cell,
html[data-iz-theme="dark"] .mud-table-row:hover,
html[data-iz-theme="dark"] .mud-simple-table table thead tr {
    color: var(--iz-dark-text) !important;
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] :is(.mud-table-cell, .mud-typography, .mud-input, .mud-input-label, .mud-select, .mud-select-input, .mud-checkbox, .mud-radio, .mud-button-label) {
    color: var(--iz-dark-text) !important;
}

html[data-iz-theme="dark"] :is(.mud-input-helper-text, .mud-table-pagination-caption, .mud-input-adornment, .mud-icon-root.mud-disabled) {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] :is(.mud-input-underline::before, .mud-input-outlined-border) {
    border-color: var(--iz-dark-border-strong) !important;
}

/* Formulários nativos e os campos personalizados usados por várias páginas. */
html[data-iz-theme="dark"] :is(input, textarea, select),
html[data-iz-theme="dark"] :is(.mud-input-slot, .mud-input-control-input-container, .search-box, .queue-search, .global-search-input) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background-color: var(--iz-dark-input) !important;
}

html[data-iz-theme="dark"] :is(input, textarea)::placeholder {
    color: #71857f !important;
    opacity: 1;
}

html[data-iz-theme="dark"] input:-webkit-autofill,
html[data-iz-theme="dark"] input:-webkit-autofill:hover,
html[data-iz-theme="dark"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--iz-dark-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--iz-dark-input) inset !important;
}

/* Texto estrutural. Estados e badges mantêm as suas cores semânticas. */
html[data-iz-theme="dark"] :is(.iz-page-frame, .mud-dialog, .mud-popover) :is(h1, h2, h3, h4, h5, h6, legend, label, strong, th, td) {
    color: var(--iz-dark-text) !important;
}

html[data-iz-theme="dark"] :is(.iz-page-frame, .mud-dialog, .mud-popover) :is(p, small, em) {
    color: var(--iz-dark-muted) !important;
}

/*
   Componentes antigos ainda têm cores de texto próprias. O valor corrente
   passa a ser claro em todo o conteúdo; estados semânticos continuam a poder
   definir uma cor mais específica nas suas próprias classes.
*/
html[data-iz-theme="dark"] :is(.iz-page-frame, .mud-dialog, .mud-popover, .iz-notification-panel) {
    --mud-palette-text-primary: var(--iz-dark-text);
    --mud-palette-text-secondary: var(--iz-dark-muted);
    --mud-palette-action-default: var(--iz-dark-text-soft);
    --mud-palette-divider: var(--iz-dark-border);
}

html[data-iz-theme="dark"] .iz-page-frame :is(
    .title,
    .subtitle,
    .name,
    .value,
    .description,
    .field-label,
    .section-title,
    .card-title,
    .dialog-title,
    .table-title,
    .empty-title
) {
    color: var(--iz-dark-text) !important;
}

html[data-iz-theme="dark"] .iz-page-frame :is(
    .caption,
    .hint,
    .helper,
    .meta,
    .muted,
    .field-hint,
    .section-subtitle,
    .card-subtitle,
    .empty-subtitle
) {
    color: var(--iz-dark-muted) !important;
}

/*
   Convenções de nomes usadas no projeto. Esta camada cobre também páginas
   futuras que sigam o design system (hero/panel/card/workspace/etc.).
*/
html[data-iz-theme="dark"] .iz-page-frame :is(
    [class$="-hero"],
    [class$="-panel"],
    [class$="-card"],
    [class$="-workspace"],
    [class$="-toolbar"],
    [class$="-filters"],
    [class$="-filterbar"],
    [class$="-content"],
    [class$="-list"],
    [class$="-shell"],
    [class$="-overview"],
    [class$="-summary"],
    [class$="-header"],
    [class$="-row"],
    [class$="-section"],
    [class$="-item"]
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface) !important;
    background-image: none !important;
    box-shadow: var(--iz-shadow-sm) !important;
}

html[data-iz-theme="dark"] .iz-page-frame :is(
    [class$="-hero"],
    [class$="-panel"],
    [class$="-card"],
    [class$="-workspace"],
    [class$="-content"],
    [class$="-shell"],
    [class$="-overview"],
    [class$="-summary"],
    [class$="-section"]
) :is(h1, h2, h3, h4, h5, h6, strong, label) {
    color: var(--iz-dark-text) !important;
}

html[data-iz-theme="dark"] .iz-page-frame :is(
    [class$="-hero"],
    [class$="-panel"],
    [class$="-card"],
    [class$="-workspace"],
    [class$="-content"],
    [class$="-shell"],
    [class$="-overview"],
    [class$="-summary"],
    [class$="-section"]
) :is(p, small, em) {
    color: var(--iz-dark-muted);
}

/* Não acrescentar sombra a linhas internas e elementos compactos. */
html[data-iz-theme="dark"] .iz-page-frame :is(
    [class$="-row"],
    [class$="-item"],
    [class$="-header"]
) {
    box-shadow: none !important;
}

/* Blocos elevados e zonas de trabalho recorrentes. */
html[data-iz-theme="dark"] .iz-page-frame :is(
    .dashboard-hero,
    .dashboard-kpi,
    .dashboard-section,
    .metric-card,
    .summary-card,
    .stat-card,
    .kpi-card,
    .production-hero,
    .production-summary,
    .production-section,
    .production-column,
    .work-card,
    .billing-row,
    .task-card,
    .station-context-item,
    .station-metrics article,
    .station-progress-panel,
    .station-notes,
    .station-tabs-shell,
    .station-overview,
    .work-details-section,
    .administrative-field-card,
    .entity-role-option,
    .preset-task-option,
    .previous-task,
    .previous-material
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}

/* Agenda diária/semanal/mensal. */
html[data-iz-theme="dark"] :is(
    .agenda-hero,
    .agenda-toolbar,
    .agenda-filters,
    .calendar-board,
    .day-column,
    .day-header,
    .day-content,
    .calendar-grid,
    .calendar-header,
    .calendar-day,
    .calendar-cell,
    .calendar-time,
    .planning-queue,
    .timeline-panel,
    .timeline-header,
    .timeline-body,
    .timeline-day,
    .timeline-slot,
    .insight-card,
    .legend-card,
    .list-view,
    .list-day,
    .list-date,
    .list-items
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface) !important;
}

html[data-iz-theme="dark"] :is(.day-column.is-today, .calendar-day.is-today, .timeline-day.is-today) {
    background: color-mix(in srgb, var(--iz-brand-primary) 13%, var(--iz-dark-surface)) !important;
}

html[data-iz-theme="dark"] :is(.appointment-card, .timeline-appointment, .queue-item, .list-appointment) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-surface-raised) !important;
}

html[data-iz-theme="dark"] :is(.appointment-card, .timeline-appointment, .queue-item, .list-appointment):hover {
    background: var(--iz-dark-surface-hover) !important;
}

html[data-iz-theme="dark"] :is(.view-switch, .queue-tabs, .capacity-track, .load-track, .station-progress-track) {
    background: var(--iz-dark-input) !important;
}

html[data-iz-theme="dark"] :is(.view-switch button.active, .queue-tabs button.active, .section-filter, .icon-button, .today-button, .btn-secondary, .add-day-button) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}

html[data-iz-theme="dark"] :is(
    button:not(.mud-button-filled-primary):not(.mud-button-filled-secondary),
    .mud-button-outlined,
    .mud-button-text,
    .mud-icon-button,
    .btn-secondary,
    .icon-button,
    .today-button
) {
    border-color: var(--iz-dark-border-strong);
}

html[data-iz-theme="dark"] :is(.mud-button-outlined, .mud-button-text, .btn-secondary, .icon-button, .today-button) {
    color: var(--iz-dark-text-soft) !important;
}

/* Diálogos próprios: marcações, receção, atribuição e email. */
html[data-iz-theme="dark"] :is(
    .appointment-dialog,
    .booking-dialog,
    .assign-work-dialog,
    .assign-diagnosis-dialog,
    .quick-vehicle-dialog,
    .email-document-summary,
    .email-internal-warning,
    .tracking-email-privacy,
    .dialog-hero,
    .form-section,
    .assign-person,
    .assign-note,
    .diagnosis-chief-note,
    .confirmation-toggle,
    .time-summary
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}

/* Navegação, pesquisa global, notificações e menus suspensos. */
html[data-iz-theme="dark"] :is(.iz-topbar, .iz-drawer-content, .iz-drawer-footer, .global-search-results, .iz-notification-panel) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-navigation) !important;
}

html[data-iz-theme="dark"] :is(.global-search-result, .iz-notification-item):hover {
    background: var(--iz-dark-surface-hover) !important;
}

/* Separadores e grelhas deixam de manter linhas claras. */
html[data-iz-theme="dark"] :is(
    .mud-divider,
    .day-header,
    .day-summary,
    .card-meta,
    .list-day,
    .list-items,
    .mud-table-row,
    .mud-table-cell,
    [class*="-divider"]
) {
    border-color: var(--iz-dark-border) !important;
}

/* Botões neutros: os botões de marca/estado continuam com as cores próprias. */
html[data-iz-theme="dark"] :is(.mud-button-outlined, .mud-icon-button, .mud-button-text) {
    border-color: var(--iz-dark-border-strong);
}

html[data-iz-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--iz-dark-navigation);
}

html[data-iz-theme="dark"] ::-webkit-scrollbar-thumb {
    border-color: var(--iz-dark-navigation);
    background: #4e5058;
}

html[data-iz-theme="dark"] ::selection {
    color: #fff;
    background: color-mix(in srgb, var(--iz-brand-primary) 75%, #000);
}

/*
   Camada de conforto visual
   -------------------------
   Os controlos MudBlazor distribuem o fundo por vários elementos. Pintar
   apenas o input nativo deixava caixas brancas dentro de cartões escuros.
   Estes seletores mantêm todos os níveis do controlo na mesma família de
   cinzentos, sem recorrer a preto absoluto.
*/
html[data-iz-theme="dark"] :is(
    .mud-input-control,
    .mud-input-control-input-container,
    .mud-input,
    .mud-input-root,
    .mud-input-outlined,
    .mud-input-filled,
    .mud-select,
    .mud-select-input,
    .mud-field,
    .mud-picker-input-button
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background-color: var(--iz-dark-input) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] :is(
    .mud-input-root input,
    .mud-input-root textarea,
    .mud-input-slot,
    .mud-select-input input
) {
    color: var(--iz-dark-text) !important;
    background: transparent !important;
}

html[data-iz-theme="dark"] :is(
    .mud-input-control:hover,
    .mud-input:hover,
    .mud-field:hover
) {
    border-color: var(--iz-dark-border-strong) !important;
    background-color: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] :is(
    .mud-input-label,
    .mud-field-label,
    .mud-select-input,
    .mud-input-adornment,
    .mud-input-adornment .mud-icon-root
) {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] :is(
    input[type="checkbox"],
    input[type="radio"]
) {
    accent-color: var(--iz-brand-primary);
}

html[data-iz-theme="dark"] :is(
    .mud-checkbox,
    .mud-radio,
    .mud-switch,
    .mud-input-control-boolean-input
) {
    color: var(--iz-dark-text-soft) !important;
    background: transparent !important;
}

html[data-iz-theme="dark"] :is(
    .mud-checkbox .mud-icon-root,
    .mud-radio .mud-icon-root,
    .mud-switch .mud-icon-root
) {
    color: currentColor !important;
}

html[data-iz-theme="dark"] :is(
    .mud-list-item,
    .mud-menu-item,
    .mud-select-item
) {
    color: var(--iz-dark-text-soft) !important;
    background-color: var(--iz-dark-surface-raised) !important;
}

html[data-iz-theme="dark"] :is(
    .mud-list-item:hover,
    .mud-menu-item:hover,
    .mud-select-item:hover,
    .mud-list-item-selected
) {
    color: var(--iz-dark-text) !important;
    background-color: var(--iz-dark-surface-hover) !important;
}

/* Formulários da ficha de obra: eliminar ilhas claras sem perder estados. */
html[data-iz-theme="dark"] :is(
    .work-details-section,
    .vehicle-section,
    .client-section,
    .work-section,
    .client-address,
    .client-address-fields
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] .vehicle-section {
    background: linear-gradient(145deg, var(--iz-dark-surface-raised), var(--iz-dark-surface)) !important;
}

html[data-iz-theme="dark"] .vehicle-flag {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] .vehicle-flag.selected.urgent {
    color: #ffb4ba !important;
    border-color: rgba(237, 66, 69, .48) !important;
    background: rgba(237, 66, 69, .14) !important;
}

html[data-iz-theme="dark"] .vehicle-flag.selected.tow {
    color: #ffd28a !important;
    border-color: rgba(240, 178, 50, .48) !important;
    background: rgba(240, 178, 50, .14) !important;
}

/* Painel inicial: o hero v2 e as faixas tinham gradientes claros próprios. */
html[data-iz-theme="dark"] .dashboard-hero-v2 {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background:
        radial-gradient(circle at 92% 16%, color-mix(in srgb, var(--iz-brand-primary) 16%, transparent) 0 110px, transparent 112px),
        linear-gradient(135deg, var(--iz-dark-surface-raised), var(--iz-dark-surface)) !important;
    box-shadow: var(--iz-shadow-md) !important;
}

html[data-iz-theme="dark"] .dashboard-hero-v2::after {
    border-color: color-mix(in srgb, var(--iz-brand-primary) 18%, transparent) !important;
}

html[data-iz-theme="dark"] :is(.quick-action.subtle, .refresh-action) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-surface-soft) !important;
    box-shadow: none !important;
}

html[data-iz-theme="dark"] :is(.quick-action.subtle, .refresh-action):hover {
    color: var(--iz-dark-text) !important;
    border-color: color-mix(in srgb, var(--iz-brand-primary) 45%, var(--iz-dark-border)) !important;
    background: var(--iz-dark-surface-hover) !important;
}

html[data-iz-theme="dark"] :is(.quick-action small, .last-update) {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] .attention-strip {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    box-shadow: var(--iz-shadow-sm) !important;
}

html[data-iz-theme="dark"] .attention-strip.has-alerts {
    border-color: rgba(240, 178, 50, .38) !important;
    background: linear-gradient(90deg, rgba(240, 178, 50, .12), var(--iz-dark-surface-raised) 38%) !important;
}

html[data-iz-theme="dark"] .attention-strip.is-calm {
    border-color: rgba(35, 165, 89, .35) !important;
    background: linear-gradient(90deg, rgba(35, 165, 89, .12), var(--iz-dark-surface-raised) 38%) !important;
}

html[data-iz-theme="dark"] :is(.attention-strip > a, .panel-link) {
    color: var(--iz-dark-text-soft) !important;
}

html[data-iz-theme="dark"] :is(
    .active-work-row:hover,
    .priority-row:hover,
    .team-row:hover,
    .delivery-row:hover
) {
    background: var(--iz-dark-surface-hover) !important;
}

/* Controlo e faturação: aviso, pesquisa, resumo e fila administrativa. */
html[data-iz-theme="dark"] :is(
    .billing-hero,
    .billing-notice,
    .billing-summary article,
    .billing-toolbar,
    .billing-toolbar label,
    .billing-panel,
    .billing-row,
    .billing-empty
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] .billing-hero {
    background: linear-gradient(135deg, var(--iz-dark-surface-raised), var(--iz-dark-surface)) !important;
}

html[data-iz-theme="dark"] .billing-notice {
    color: var(--iz-dark-text-soft) !important;
    border-color: rgba(35, 165, 89, .3) !important;
    background: rgba(35, 165, 89, .09) !important;
}

html[data-iz-theme="dark"] :is(
    .billing-hero p,
    .billing-notice small,
    .billing-summary small,
    .billing-row span,
    .billing-row small,
    .billing-empty
) {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] :is(
    .billing-toolbar button,
    .billing-hero a,
    .billing-hero button,
    .details-button
) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] .billing-toolbar button.active {
    color: var(--iz-dark-text) !important;
    border-color: color-mix(in srgb, var(--iz-brand-primary) 55%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, var(--iz-brand-primary) 18%, var(--iz-dark-surface)) !important;
}

html[data-iz-theme="dark"] .billing-row:hover {
    background: var(--iz-dark-surface-hover) !important;
}

html[data-iz-theme="dark"] :is(.billing-vehicle > strong, .billing-empty strong) {
    color: var(--iz-dark-text) !important;
}

/* Agenda: cabeçalhos, células e marcações deixam de criar blocos brancos. */
html[data-iz-theme="dark"] :is(
    .month-calendar,
    .month-weekday,
    .month-day,
    .calendar-grid,
    .calendar-grid-header,
    .calendar-time-cell,
    .calendar-day-column,
    .calendar-slot
) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface) !important;
}

html[data-iz-theme="dark"] .month-weekday,
html[data-iz-theme="dark"] .calendar-grid-header {
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] .month-day.outside {
    color: #747881 !important;
    background: var(--iz-dark-navigation) !important;
}

html[data-iz-theme="dark"] .month-day.today {
    border-color: color-mix(in srgb, var(--iz-brand-primary) 62%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, var(--iz-brand-primary) 9%, var(--iz-dark-surface)) !important;
}

html[data-iz-theme="dark"] :is(.month-day header, .month-day header button, .month-day-number) {
    color: var(--iz-dark-text-soft) !important;
}

html[data-iz-theme="dark"] :is(.month-booking, .calendar-booking, .calendar-event) {
    color: var(--iz-dark-text) !important;
    border-color: color-mix(in srgb, var(--iz-brand-secondary) 44%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, var(--iz-brand-secondary) 14%, var(--iz-dark-surface-raised)) !important;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .22) !important;
}

/* Ficha/gestão da obra: percurso, fecho e barra fixa de ações. */
html[data-iz-theme="dark"] :is(
    .work-form-summary,
    .work-form-summary article,
    .work-tracking,
    .work-status-step > span,
    .work-tracking-tools,
    .tracking-tool,
    .work-stage-action,
    .work-close-flow,
    .work-form-content,
    .work-form-actions,
    .work-form-tabs,
    .work-form-tabs .mud-tabs-tabbar
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] :is(.tracking-tool, .work-stage-action, .work-form-actions) {
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] .work-form-actions {
    box-shadow: 0 -10px 34px rgba(0, 0, 0, .4) !important;
    backdrop-filter: blur(14px);
}

html[data-iz-theme="dark"] .work-close-flow.ready-to-bill {
    border-color: rgba(35, 165, 89, .35) !important;
    background: color-mix(in srgb, #23a559 10%, var(--iz-dark-surface-raised)) !important;
}

/* Avisos: sem fundos creme/brancos e sempre com contraste suficiente. */
html[data-iz-theme="dark"] :is(
    .work-form-warning,
    .work-form-callout,
    .station-parts-warning,
    .station-attention,
    .parts-warning,
    .material-warning,
    .pending-material-warning,
    .work-alert,
    .warning-strip,
    .attention-needed
) {
    color: #f3d08b !important;
    border-color: rgba(240, 178, 50, .42) !important;
    background: linear-gradient(90deg, rgba(240, 178, 50, .14), var(--iz-dark-surface-raised) 55%) !important;
    background-image: linear-gradient(90deg, rgba(240, 178, 50, .14), var(--iz-dark-surface-raised) 55%) !important;
}

html[data-iz-theme="dark"] :is(
    .work-form-warning,
    .work-form-callout,
    .station-parts-warning,
    .station-attention,
    .parts-warning,
    .material-warning,
    .pending-material-warning,
    .work-alert,
    .warning-strip,
    .attention-needed
) :is(h1, h2, h3, h4, strong, span, small, p, em, label) {
    color: inherit !important;
}

html[data-iz-theme="dark"] :is(
    .work-form-warning,
    .work-form-callout,
    .station-parts-warning,
    .station-attention,
    .parts-warning,
    .material-warning,
    .pending-material-warning,
    .work-alert,
    .warning-strip,
    .attention-needed
) :is(button, a) {
    color: #f3d08b !important;
    border-color: rgba(240, 178, 50, .45) !important;
    background: var(--iz-dark-surface) !important;
}

html[data-iz-theme="dark"] :is(
    .station-parts-warning > span,
    .station-attention-title > span,
    .work-form-warning > span,
    .work-form-callout > span
) {
    color: #f3d08b !important;
    background: rgba(240, 178, 50, .17) !important;
}

html[data-iz-theme="dark"] .station-attention-list > span {
    color: #e6c580 !important;
    border-color: rgba(240, 178, 50, .32) !important;
    background: var(--iz-dark-surface) !important;
}

html[data-iz-theme="dark"] :is(.station-context, .station-context-item, .station-notes) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}

html[data-iz-theme="dark"] :is(.station-context-item strong, .station-context-item em, .station-context-item small) {
    color: var(--iz-dark-text-soft) !important;
}

html[data-iz-theme="dark"] :is(.mud-alert, .alert, [role="alert"]) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background-color: var(--iz-dark-surface-raised) !important;
}

html[data-iz-theme="dark"] :is(.mud-alert, .alert, [role="alert"]).mud-alert-filled-warning,
html[data-iz-theme="dark"] :is(.mud-alert, .alert, [role="alert"]).warning {
    color: #f3d08b !important;
    border-color: rgba(240, 178, 50, .42) !important;
    background: color-mix(in srgb, #f0b232 14%, var(--iz-dark-surface-raised)) !important;
}

/* Materiais e serviços: KPI, valores, editor e resumo financeiro. */
html[data-iz-theme="dark"] :is(
    .lines-kpis article,
    .lines-toolbar,
    .line-card,
    .line-card-values span,
    .line-editor,
    .totals-card,
    .totals-card header,
    .totals-card header > span,
    .margin-summary,
    .margin-summary span
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}

html[data-iz-theme="dark"] :is(
    .lines-kpis article,
    .line-card-values span,
    .totals-card header,
    .margin-summary span
) {
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] :is(.lines-kpis .total, .line-card-values .net, .line-actions .complete) {
    color: #7ee2ad !important;
    border-color: rgba(35, 165, 89, .35) !important;
    background: color-mix(in srgb, #23a559 13%, var(--iz-dark-surface-raised)) !important;
}

html[data-iz-theme="dark"] :is(.line-actions button, .line-cancel, .line-filters button.active) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] .totals-card dl div {
    border-color: var(--iz-dark-border) !important;
}

/* Receção da viatura: cartões e controlos escuros; o desenho mantém fundo claro. */
html[data-iz-theme="dark"] :is(
    .reception-sheet,
    .reception-state,
    .reception-card,
    .damage-tools,
    .damage-list-item,
    .fuel-box,
    .reception-photo,
    .reception-upload label,
    .signature-box,
    .signature-methods,
    .paper-signature,
    .signature-readonly,
    .reception-confirm,
    .reception-overview article,
    .reception-actions,
    .reception-action
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] :is(.damage-tools, .fuel-box, .signature-methods, .paper-signature, .signature-readonly, .reception-confirm) {
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] :is(.damage-type, .damage-severity, .signature-methods button, .reception-action) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-surface) !important;
}

html[data-iz-theme="dark"] :is(.damage-type.active, .signature-methods button.active) {
    color: var(--iz-dark-text) !important;
    border-color: color-mix(in srgb, var(--iz-brand-primary) 55%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, var(--iz-brand-primary) 18%, var(--iz-dark-surface)) !important;
}

html[data-iz-theme="dark"] .reception-checks :is(.mud-input-control, label) {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-soft) !important;
}

html[data-iz-theme="dark"] .damage-map {
    overflow: hidden;
    border: 1px solid var(--iz-dark-border);
    border-radius: 16px;
    background: #f2f3f5 !important;
}

html[data-iz-theme="dark"] .damage-map img {
    background: #f2f3f5 !important;
}

/* Correções de contraste para páginas e diálogos próprios no tema escuro. */
html[data-iz-theme="dark"] :is(.calendar-page,.calendar-hero,.schedule-card,.schedule-toolbar,.section-agendas,.schedule-legend,.calendar-search,.calendar-view-switch,.calendar-nav button,.hours-toggle,.time-column,.day-heading,.month-weekday,.month-day,.month-day.outside,.month-day.today){color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border)!important;background-color:var(--iz-dark-surface)!important;background-image:none!important}
html[data-iz-theme="dark"] .calendar-page{background:var(--iz-dark-canvas)!important}
html[data-iz-theme="dark"] .schedule-toolbar,html[data-iz-theme="dark"] .schedule-legend,html[data-iz-theme="dark"] .calendar-view-switch{background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .day-column{border-color:var(--iz-dark-border)!important;background:repeating-linear-gradient(to bottom,var(--iz-dark-surface) 0,var(--iz-dark-surface) 35px,var(--iz-dark-surface-soft) 35px,var(--iz-dark-surface-soft) 36px,var(--iz-dark-surface) 36px,var(--iz-dark-surface) 71px,var(--iz-dark-border) 71px,var(--iz-dark-border) 72px)!important}
html[data-iz-theme="dark"] .day-column.today,html[data-iz-theme="dark"] .day-heading.today,html[data-iz-theme="dark"] .month-day.today{background:color-mix(in srgb,var(--iz-brand-primary) 14%,var(--iz-dark-surface))!important}
html[data-iz-theme="dark"] .time-column{background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .day-heading,html[data-iz-theme="dark"] .day-heading strong,html[data-iz-theme="dark"] .day-heading em,html[data-iz-theme="dark"] .month-day>header button{color:var(--iz-dark-text-soft)!important}
html[data-iz-theme="dark"] .timed-booking,html[data-iz-theme="dark"] .month-booking{color:var(--iz-dark-text)!important;border-color:color-mix(in srgb,var(--section-accent,#2d846c) 55%,var(--iz-dark-border))!important;background:color-mix(in srgb,var(--section-accent,#2d846c) 19%,var(--iz-dark-surface-raised))!important}
html[data-iz-theme="dark"] .timed-booking.unconfirmed,html[data-iz-theme="dark"] .month-booking.unconfirmed{border-color:#8e682f!important;background:color-mix(in srgb,#b98022 20%,var(--iz-dark-surface-raised))!important}
html[data-iz-theme="dark"] .timed-booking .booking-main,html[data-iz-theme="dark"] .timed-booking .booking-main strong,html[data-iz-theme="dark"] .timed-booking .booking-description,html[data-iz-theme="dark"] .timed-booking .booking-main small,html[data-iz-theme="dark"] .timed-booking .booking-section,html[data-iz-theme="dark"] .month-booking strong,html[data-iz-theme="dark"] .month-booking span{color:var(--iz-dark-text-soft)!important}
html[data-iz-theme="dark"] .timed-booking .booking-time,html[data-iz-theme="dark"] .month-booking time{color:#a9e8d4!important}
html[data-iz-theme="dark"] .timed-booking.unconfirmed .booking-time{color:#f2c36e!important}
html[data-iz-theme="dark"] .time-slot:hover{background:rgba(73,180,146,.13)!important;color:#a9e8d4!important}
html[data-iz-theme="dark"] .month-day.outside{opacity:.55}

html[data-iz-theme="dark"] .booking-dialog .booking-section,html[data-iz-theme="dark"] .booking-dialog .booking-work-plan,html[data-iz-theme="dark"] .booking-dialog .booking-confirm,html[data-iz-theme="dark"] .booking-dialog .booking-work-items li{color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .booking-dialog .booking-work-empty,html[data-iz-theme="dark"] .booking-dialog .booking-task-empty{color:var(--iz-dark-muted)!important;border-color:var(--iz-dark-border-strong)!important;background:var(--iz-dark-surface)!important}
html[data-iz-theme="dark"] .booking-dialog .booking-validation{color:#f4d79c!important;border-color:#715728!important;background:color-mix(in srgb,#9c6b18 20%,var(--iz-dark-surface-raised))!important}
html[data-iz-theme="dark"] .booking-dialog .booking-header p,html[data-iz-theme="dark"] .booking-dialog .section-title small,html[data-iz-theme="dark"] .booking-dialog .booking-work-plan-heading small,html[data-iz-theme="dark"] .booking-dialog .booking-confirm small{color:var(--iz-dark-muted)!important}
html[data-iz-theme="dark"] .booking-dialog .booking-actions button:not(.save):not(.receive):not(.delete){color:var(--iz-dark-text-soft)!important;border-color:var(--iz-dark-border-strong)!important;background:var(--iz-dark-surface-soft)!important}

html[data-iz-theme="dark"] .employee-profile-modal,html[data-iz-theme="dark"] .employee-profile-header,html[data-iz-theme="dark"] .employee-profile-tabs,html[data-iz-theme="dark"] .employee-profile-footer,html[data-iz-theme="dark"] .employee-profile-body,html[data-iz-theme="dark"] .profile-section,html[data-iz-theme="dark"] .activity-list-card,html[data-iz-theme="dark"] .performance-card{color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface)!important}
html[data-iz-theme="dark"] .employee-profile-tabs{background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .employee-profile-tabs button,html[data-iz-theme="dark"] .employee-profile-footer .secondary{color:var(--iz-dark-text-soft)!important}
html[data-iz-theme="dark"] .employee-profile-tabs button.active,html[data-iz-theme="dark"] .employee-profile-tabs button span{color:#a9e8d4!important;background:color-mix(in srgb,var(--iz-brand-primary) 23%,var(--iz-dark-surface))!important}
html[data-iz-theme="dark"] .employee-profile-header>header,html[data-iz-theme="dark"] .employee-profile-modal header{border-color:var(--iz-dark-border)!important}
html[data-iz-theme="dark"] .edit-preset-grid button,html[data-iz-theme="dark"] .edit-section-grid span,html[data-iz-theme="dark"] .employee-group-tabs,html[data-iz-theme="dark"] .employee-group-tabs button{color:var(--iz-dark-text-soft)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .edit-preset-grid button.selected,html[data-iz-theme="dark"] .edit-section-grid input:checked+span,html[data-iz-theme="dark"] .employee-group-tabs button.active{color:#a9e8d4!important;background:color-mix(in srgb,var(--iz-brand-primary) 22%,var(--iz-dark-surface))!important}
html[data-iz-theme="dark"] .employee-profile-modal .completion-callout,html[data-iz-theme="dark"] .employee-profile-modal .guide-panel{color:#f2d393!important;border-color:#6c5428!important;background:color-mix(in srgb,#986917 19%,var(--iz-dark-surface-raised))!important}
html[data-iz-theme="dark"] .employee-profile-modal .employee-form-grid input,html[data-iz-theme="dark"] .employee-profile-modal .employee-form-grid select{color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border-strong)!important;background:var(--iz-dark-input)!important}
html[data-iz-theme="dark"] .employee-profile-modal .section-chips span{color:#a9e8d4!important;background:#20382f!important}

html[data-iz-theme="dark"] .supplier-page .security-note,html[data-iz-theme="dark"] .supplier-page .extracted-data>header,html[data-iz-theme="dark"] .supplier-page .lines-legend,html[data-iz-theme="dark"] .supplier-page .material-line,html[data-iz-theme="dark"] .supplier-page .calculated,html[data-iz-theme="dark"] .supplier-page .article-creator{color:var(--iz-dark-text-soft)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface-raised)!important}
html[data-iz-theme="dark"] .supplier-page .material-line.assigned,html[data-iz-theme="dark"] .supplier-page .invoice-item.selected{background:color-mix(in srgb,var(--iz-brand-primary) 18%,var(--iz-dark-surface-raised))!important}
html[data-iz-theme="dark"] .supplier-page :is(input:disabled,select:disabled,textarea:disabled){color:#c3c8ce!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface-soft)!important;opacity:1!important}
html[data-iz-theme="dark"] .supplier-page .status{filter:brightness(.78) saturate(.9)}
html[data-iz-theme="dark"] .supplier-page .assignment-done{color:#8bd9bd!important}

html[data-iz-theme="dark"] .workshop-summary article,html[data-iz-theme="dark"] .workshop-quick-views,html[data-iz-theme="dark"] .workshop-grid-surface,html[data-iz-theme="dark"] .workshop-grid .mud-table-pagination{color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface)!important}
html[data-iz-theme="dark"] .workshop-summary-icon{background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .workshop-summary-icon.danger{color:#ff989c!important;background:#392124!important}
html[data-iz-theme="dark"] .workshop-summary-icon.warning{color:#f3c876!important;background:#382d1b!important}
html[data-iz-theme="dark"] .workshop-grid .mud-table-container{width:100%!important;max-width:100%!important;overflow-x:hidden!important;background:var(--iz-dark-surface)!important}
html[data-iz-theme="dark"] .workshop-grid table{width:100%!important;min-width:0!important;table-layout:fixed!important}
html[data-iz-theme="dark"] .workshop-grid .mud-table-cell{min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;border-color:var(--iz-dark-border)!important;background:transparent!important}
html[data-iz-theme="dark"] .workshop-grid .mud-table-head .mud-table-cell{background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .workshop-vehicle-cell strong,html[data-iz-theme="dark"] .workshop-number,html[data-iz-theme="dark"] .workshop-client{color:var(--iz-dark-text)!important}
html[data-iz-theme="dark"] .workshop-status-chip{color:#ffc4c7!important;border-color:#644045!important;background:#342124!important}
html[data-iz-theme="dark"] .work-form-summary article,html[data-iz-theme="dark"] .work-form-summary article.complete,html[data-iz-theme="dark"] .work-form-summary article.pending,html[data-iz-theme="dark"] .work-form-vehicle,html[data-iz-theme="dark"] .work-tracking,html[data-iz-theme="dark"] .work-status-line,html[data-iz-theme="dark"] .work-form-page .mud-paper{color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface)!important}
html[data-iz-theme="dark"] .work-form-page :is(.customer-empty,.client-empty,.no-customer,.lookup-empty){color:var(--iz-dark-muted)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .manager-tools,html[data-iz-theme="dark"] .manager-section-tabs,html[data-iz-theme="dark"] .manager-empty{color:var(--iz-dark-text)!important;border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface)!important}
html[data-iz-theme="dark"] .manager-empty strong{color:var(--iz-dark-text)!important}
html[data-iz-theme="dark"] .employee-profile-modal header>button{color:var(--iz-dark-text-soft)!important;border:1px solid var(--iz-dark-border)!important;background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .employee-profile-footer .danger{color:#ffb9bd!important;border-color:#71383d!important;background:#321d20!important}
/* Notificações globais */
.mud-snackbar-container{z-index:2200!important;gap:10px!important;padding:12px!important}
.mud-snackbar-container .mud-snackbar{position:relative;overflow:hidden;min-height:54px!important;max-width:min(520px,calc(100vw - 24px));border:1px solid rgba(255,255,255,.22)!important;border-radius:16px!important;box-shadow:0 14px 34px rgba(9,24,23,.23),0 0 0 1px rgba(255,255,255,.08) inset!important;backdrop-filter:blur(14px);animation:iz-snackbar-in .32s cubic-bezier(.2,.8,.2,1) both}
.mud-snackbar-container .mud-snackbar:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:rgba(255,255,255,.8);opacity:.85}
.mud-snackbar-container .mud-snackbar-content{display:flex;align-items:center;gap:12px!important;padding:13px 16px!important;font-size:.9rem;font-weight:750;line-height:1.4;letter-spacing:.005em}
.mud-snackbar-container .mud-snackbar-icon{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:9px;background:rgba(255,255,255,.18)}
.mud-snackbar-container .mud-snackbar-close-button{align-self:center;margin:0 7px 0 0!important;border-radius:9px!important;transition:background .16s ease,transform .16s ease}
.mud-snackbar-container .mud-snackbar-close-button:hover{background:rgba(255,255,255,.18)!important;transform:scale(1.06)}
.mud-snackbar-container :is(.mud-snackbar-success,.mud-snackbar-filled-success){background:linear-gradient(120deg,#168b61,#20a878)!important;color:#fff!important}
.mud-snackbar-container :is(.mud-snackbar-info,.mud-snackbar-filled-info){background:linear-gradient(120deg,#267894,#308fa9)!important;color:#fff!important}
.mud-snackbar-container :is(.mud-snackbar-warning,.mud-snackbar-filled-warning){background:linear-gradient(120deg,#a76b13,#c98720)!important;color:#fff!important}
.mud-snackbar-container :is(.mud-snackbar-error,.mud-snackbar-filled-error){background:linear-gradient(120deg,#a9313c,#c83f50)!important;color:#fff!important}
.mud-snackbar-container :is(.mud-snackbar-normal,.mud-snackbar-filled-default){background:linear-gradient(120deg,#273b43,#365763)!important;color:#fff!important}
@keyframes iz-snackbar-in{from{opacity:0;transform:translate3d(18px,-8px,0) scale(.97)}to{opacity:1;transform:translate3d(0,0,0) scale(1)}}
@media(max-width:600px){.mud-snackbar-container{left:8px!important;right:8px!important;width:auto!important;padding:8px!important}.mud-snackbar-container .mud-snackbar{max-width:none;width:100%}.mud-snackbar-container .mud-snackbar-content{padding:11px 13px!important;font-size:.82rem}}
@media(prefers-reduced-motion:reduce){.mud-snackbar-container .mud-snackbar{animation:none}}
/* MudBlazor 8 renders the host as #mud-snackbar-container. */
#mud-snackbar-container{z-index:2200!important}
#mud-snackbar-container .mud-snackbar{min-height:54px!important;padding:7px 14px!important;border:1px solid rgba(255,255,255,.24)!important;border-radius:16px!important;box-shadow:0 14px 34px rgba(9,24,23,.25),0 0 0 1px rgba(255,255,255,.08) inset!important;backdrop-filter:blur(14px);animation:iz-snackbar-in .32s cubic-bezier(.2,.8,.2,1) both}
#mud-snackbar-container .mud-snackbar:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:rgba(255,255,255,.8);opacity:.85}
#mud-snackbar-container .mud-snackbar .mud-snackbar-content-message{padding:8px 0;font-size:.9rem;font-weight:750;line-height:1.4;letter-spacing:.005em}
#mud-snackbar-container .mud-snackbar .mud-snackbar-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;margin:0 11px 0 0;padding:0;border-radius:10px;background:rgba(255,255,255,.18)}
#mud-snackbar-container .mud-snackbar .mud-snackbar-content-action>button{min-width:34px;min-height:34px;border-radius:9px!important;transition:background .16s ease,transform .16s ease}
#mud-snackbar-container .mud-snackbar .mud-snackbar-content-action>button:hover{background:rgba(255,255,255,.18)!important;transform:scale(1.06)}
#mud-snackbar-container .mud-snackbar:is(.mud-theme-success,.mud-snackbar-success){background:linear-gradient(120deg,#168b61,#20a878)!important;color:#fff!important}
#mud-snackbar-container .mud-snackbar:is(.mud-theme-info,.mud-snackbar-info){background:linear-gradient(120deg,#267894,#308fa9)!important;color:#fff!important}
#mud-snackbar-container .mud-snackbar:is(.mud-theme-warning,.mud-snackbar-warning){background:linear-gradient(120deg,#a76b13,#c98720)!important;color:#fff!important}
#mud-snackbar-container .mud-snackbar:is(.mud-theme-error,.mud-snackbar-error){background:linear-gradient(120deg,#a9313c,#c83f50)!important;color:#fff!important}
#mud-snackbar-container .mud-snackbar:is(.mud-theme-dark,.mud-snackbar-normal){background:linear-gradient(120deg,#273b43,#365763)!important;color:#fff!important}
@media(max-width:600px){#mud-snackbar-container{left:8px!important;right:8px!important;width:auto!important}#mud-snackbar-container .mud-snackbar{min-width:0;max-width:none;width:100%}#mud-snackbar-container .mud-snackbar .mud-snackbar-content-message{font-size:.82rem}}
@media(prefers-reduced-motion:reduce){#mud-snackbar-container .mud-snackbar{animation:none}}
html[data-iz-theme="dark"] .employee-profile-footer .danger:hover{background:#452327!important}
html[data-iz-theme="dark"] .iz-account-menu{border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface)!important;box-shadow:0 18px 44px rgba(0,0,0,.48)!important}
html[data-iz-theme="dark"] .iz-account-menu-head{border-color:var(--iz-dark-border)!important;background:var(--iz-dark-surface-soft)!important}
html[data-iz-theme="dark"] .iz-account-menu-head-copy strong,html[data-iz-theme="dark"] .iz-account-menu .mud-menu-item{color:var(--iz-dark-text)!important}
html[data-iz-theme="dark"] .iz-account-menu .mud-menu-item:hover{background:var(--iz-dark-surface-hover)!important}
html[data-iz-theme="dark"] .iz-account-menu .mud-menu-item-icon{color:#88d9bf!important}
html[data-iz-theme="dark"] .iz-account-menu-divider{background:var(--iz-dark-border)!important}

/* Ficha da viatura: contraste no preenchimento técnico e espaço para a barra fixa. */
html[data-iz-theme="dark"] .vehicle-page{padding-bottom:132px!important}
html[data-iz-theme="dark"] .vehicle-catalog{
    color:var(--iz-dark-text)!important;
    border-color:color-mix(in srgb,var(--iz-brand-primary) 38%,var(--iz-dark-border))!important;
    background:linear-gradient(135deg,color-mix(in srgb,var(--iz-brand-primary) 17%,var(--iz-dark-surface-raised)),var(--iz-dark-surface))!important;
    box-shadow:0 12px 30px rgba(0,0,0,.2)!important;
}
html[data-iz-theme="dark"] .vehicle-catalog-heading h2{color:var(--iz-dark-text)!important}
html[data-iz-theme="dark"] .vehicle-catalog-heading p{color:var(--iz-dark-muted)!important}
html[data-iz-theme="dark"] .vehicle-catalog-heading span{color:#8fe0c3!important}
html[data-iz-theme="dark"] .vehicle-catalog-reset,
html[data-iz-theme="dark"] .vehicle-catalog-preview span{
    color:var(--iz-dark-text-soft)!important;
    border-color:var(--iz-dark-border-strong)!important;
    background:var(--iz-dark-surface-soft)!important;
}
html[data-iz-theme="dark"] .vehicle-catalog-apply:disabled{
    color:#9ca2aa!important;
    border-color:var(--iz-dark-border)!important;
    background:#242529!important;
}
html[data-iz-theme="dark"] .vehicle-actions{
    color:var(--iz-dark-text)!important;
    border-color:var(--iz-dark-border-strong)!important;
    background:rgba(24,25,28,.97)!important;
    box-shadow:0 18px 48px rgba(0,0,0,.55)!important;
}
html[data-iz-theme="dark"] .vehicle-actions>div:first-child span{color:var(--iz-dark-muted)!important}
html[data-iz-theme="dark"] .vehicle-delete{
    color:#ffb9bd!important;
    border-color:#71383d!important;
    background:#321d20!important;
}

@media(max-width:700px){html[data-iz-theme="dark"] .vehicle-page{padding-bottom:164px!important}}

/* Correções de contraste para superfícies legadas que mantinham fundos claros no modo escuro. */
html[data-iz-theme="dark"] :is(
    .handover-panel > header,
    .handover-checks label,
    .signature-box,
    .signature-box-actions button,
    .signature-expanded-head button,
    .signature-expanded-foot button,
    .delivery-summary article,
    .delivery-summary article > span,
    .employee-access-profile,
    .employee-group-tabs,
    .employee-group-tabs button,
    .employee-profile-body,
    .employee-profile-tabs,
    .profile-section,
    .profile-form-grid,
    .employee-toolbar,
    .employee-table th,
    .employee-table td,
    .section-selector,
    .section-form,
    .section-list article,
    .mywork-summary,
    .mywork-card,
    .mywork-tools,
    .section > span,
    .station-overview,
    .station-overview-status,
    .station-control,
    .station-progress-stats > *,
    .work-form-content,
    .work-form-tab-panel,
    .work-form-reception,
    .work-tracking,
    .work-tracking-heading,
    .work-tracking-tools,
    .manager-board,
    .manager-lane,
    .manager-lane-columns,
    .manager-lane-cards,
    .manager-card,
    .production-column,
    .diagnosis-lane,
    .diagnosis-card,
    .live-work-panel
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] :is(
    .handover-panel,
    .handover-panel footer,

    .handover-checks,
    .signature-box,
    .delivery-page .delivery-complete,

    .employee-profile-modal,

    .employee-profile-footer,
    .admin-panel,
    .employee-kpi-grid > *,
    .activity-list-card,
    .performance-card,
    .mywork-summary > *,
    .mywork-card .section,
    .mywork-card .instruction,
    .work-form-hero,
    .work-form-summary,
    .work-form-callout,
    .work-form-warning,
    .work-form-action-buttons,
    .work-form-page .mud-paper,
    .manager-summary > *,
    .manager-tools,
    .manager-material-queue,
    .material-queue-list,
    .diagnosis-cards,
    .diagnosis-request,
    .station-attention,
    .station-attention-list,
    .station-parts-warning,
    .station-notes,
    .station-tab-panels
) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface) !important;
    background-image: none !important;
}

html[data-iz-theme="dark"] :is(
    .delivery-page,
    .employee-profile-modal,
    .team-admin-page,
    .mywork-page,
    .station-page,
    .work-form-page,
    .manager-page
) :is(input, textarea, select) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background-color: var(--iz-dark-input) !important;
    color-scheme: dark;
}

html[data-iz-theme="dark"] :is(
    .delivery-page,
    .employee-profile-modal,
    .team-admin-page,
    .mywork-page,
    .station-page,
    .work-form-page,
    .manager-page
) :is(h1, h2, h3, h4, strong, label, .mud-typography) {
    color: var(--iz-dark-text) !important;
}

html[data-iz-theme="dark"] :is(
    .delivery-page,
    .employee-profile-modal,
    .team-admin-page,
    .mywork-page,
    .station-page,
    .work-form-page,
    .manager-page
) :is(p, small, em, .hint, .subtitle, .caption) {
    color: var(--iz-dark-muted) !important;
}

/* Superfícies de confirmação mantêm o significado, mas deixam de ficar quase brancas. */
html[data-iz-theme="dark"] :is(.handover-checks label.checked, .employee-status, .billing-state, .station-flags > *, .card-state, .material-state) {
    background-color: color-mix(in srgb, currentColor 15%, var(--iz-dark-surface-raised)) !important;
}

/* A área de assinatura fica branca de propósito para a tinta continuar visível. */
html[data-iz-theme="dark"] :is(.signature-box canvas, .signature-expanded canvas) {
    color: #17211e !important;
    background: #fff !important;
}

html[data-iz-theme="dark"] :is(.delivery-complete, .handover-checks label.checked, .diagnosis-ready, .employee-status.available, .billing-state.ok) {
    color: #a5e7c7 !important;
    border-color: color-mix(in srgb, #43b581 45%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, #18865c 18%, var(--iz-dark-surface-raised)) !important;
}

html[data-iz-theme="dark"] :is(.handover-warning, .station-parts-warning, .material-wait, .task-warning, .work-form-warning, .employee-status.incomplete, .billing-state.pending) {
    color: #ffdda1 !important;
    border-color: color-mix(in srgb, #e5a52f 45%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, #b97812 17%, var(--iz-dark-surface-raised)) !important;
}
/* Contraste adicional para os cartões que usam cores fixas nos estilos isolados. */
html[data-iz-theme="dark"] .delivery-page .delivery-kilometer-entry {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}
html[data-iz-theme="dark"] .delivery-page .delivery-kilometer-entry :is(small, em) {
    color: var(--iz-dark-muted) !important;
}
html[data-iz-theme="dark"] .delivery-page .delivery-kilometer-entry strong {
    color: var(--iz-dark-text) !important;
}

html[data-iz-theme="dark"] .station-tabs-shell :is(.mud-tabs-panels, .mud-tab-panel, .station-tab-panels),
html[data-iz-theme="dark"] .station-progress-stats > *,
html[data-iz-theme="dark"] .station-next-task {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}
html[data-iz-theme="dark"] .station-progress-stats :is(small, strong),
html[data-iz-theme="dark"] .station-next-task :is(small, strong) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .station-progress-stats small,
html[data-iz-theme="dark"] .station-next-task small {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] .mywork-card :is(.section > span, .tasks, .instruction) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-soft) !important;
}
html[data-iz-theme="dark"] .mywork-card :is(.section small, .tasks-title, .tasks > span, .instruction strong) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .mywork-card :is(.section small, .instruction small) {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] .manager-card .card-facts > span {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-soft) !important;
}
html[data-iz-theme="dark"] .manager-card .card-facts :is(small, strong) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .manager-card .card-facts small {
    color: var(--iz-dark-muted) !important;
}

html[data-iz-theme="dark"] .workshop-page .workshop-search {
    color: var(--iz-dark-text-muted, var(--iz-dark-muted)) !important;
    border: 1px solid var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-input) !important;
}
html[data-iz-theme="dark"] .workshop-page .workshop-search input {
    color: var(--iz-dark-text) !important;
    background: transparent !important;
}
html[data-iz-theme="dark"] .workshop-page .work-completion-estimate {
    color: #a5e7c7 !important;
    border-color: color-mix(in srgb, #43b581 42%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, #18865c 16%, var(--iz-dark-surface-raised)) !important;
}
html[data-iz-theme="dark"] .workshop-page .work-completion-estimate :is(strong, small) {
    color: inherit !important;
}
html[data-iz-theme="dark"] .workshop-page .work-completion-estimate.warning {
    color: #ffdda1 !important;
    border-color: color-mix(in srgb, #e5a52f 45%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, #b97812 17%, var(--iz-dark-surface-raised)) !important;
}
html[data-iz-theme="dark"] .workshop-page .work-completion-estimate.blocked {
    color: #ffb4ae !important;
    border-color: color-mix(in srgb, #e55b51 45%, var(--iz-dark-border)) !important;
    background: color-mix(in srgb, #b8322a 17%, var(--iz-dark-surface-raised)) !important;
}
html[data-iz-theme="dark"] .workshop-page .work-completion-estimate.muted {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-soft) !important;
}
html[data-iz-theme="dark"] .workshop-page .work-estimate-details,
html[data-iz-theme="dark"] .workshop-page .work-estimate-details summary,
html[data-iz-theme="dark"] .workshop-page .work-estimate-details div {
    color: var(--iz-dark-muted) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface) !important;
}
/* Painéis interiores das separações da ficha da obra. */
html[data-iz-theme="dark"] .station-tabs-shell,
html[data-iz-theme="dark"] .station-tabs-shell .mud-tabs-panels,
html[data-iz-theme="dark"] .station-tabs-shell .station-tab-panels,
html[data-iz-theme="dark"] .station-tabs-shell .mud-tab-panel,
html[data-iz-theme="dark"] .station-tabs-shell .mud-tabs-panel {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface) !important;
    background-image: none !important;
}

/* Tarefas e quadro de tempos usam várias cores claras fixas no CSS isolado. */
html[data-iz-theme="dark"] :is(.task-board, .task-toolbar, .time-history, .time-history-hero, .time-timeline) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface) !important;
    background-image: none !important;
}
html[data-iz-theme="dark"] :is(.task-dashboard article, .task-card, .time-history-metrics article, .time-session, .time-session-duration) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}
html[data-iz-theme="dark"] :is(.task-dashboard, .task-card, .time-history, .time-session) :is(h2, h3, strong, label, .mud-typography) {
    color: var(--iz-dark-text) !important;
}
html[data-iz-theme="dark"] :is(.task-dashboard, .task-card, .time-history, .time-session) :is(small, p, em, .task-heading, .task-state, .time-session-meta, .time-day-heading) {
    color: var(--iz-dark-muted) !important;
}
html[data-iz-theme="dark"] .task-card.completed {
    background-color: color-mix(in srgb, #23a559 10%, var(--iz-dark-surface-raised)) !important;
}
html[data-iz-theme="dark"] .time-session.active {
    background-color: color-mix(in srgb, #e5a52f 10%, var(--iz-dark-surface-raised)) !important;
}
html[data-iz-theme="dark"] .time-session-duration {
    border: 1px solid var(--iz-dark-border) !important;
}
/* Dark mode das tarefas no posto: o editor e a tarefa bloqueada têm fundos próprios. */
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .tasks-header,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .tasks-filterbar,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card.task-readonly .task-card-main,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card.task-readonly .task-assignment-grid,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-assignment-grid,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-estimate {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card :is(.task-title-line strong, .task-field > span, .task-estimate strong) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card :is(.task-secondary, .task-field > span, .task-estimate > span) {
    color: var(--iz-dark-muted) !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-instruction-preview {
    color: #b9e6f0 !important;
    border-color: #31515b !important;
    background: #18272c !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-instruction-preview :is(strong, p) {
    color: #b9e6f0 !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-state-button {
    background-color: #342a1c !important;
}

/* Preferências da agenda: pausas, horas e dias encerrados. */
html[data-iz-theme="dark"] .agenda-settings-page .agenda-settings-card,
html[data-iz-theme="dark"] .agenda-settings-page .timer-reminder-settings,
html[data-iz-theme="dark"] .agenda-settings-page .closed-days {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}
html[data-iz-theme="dark"] .agenda-settings-page :is(.timer-reminder-settings h2, .closed-days h3, .reminder-toggle strong, .time-settings label > span, .reminder-time > span, .reminder-repeat-settings label > span) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .agenda-settings-page :is(.timer-reminder-settings p, .closed-days p, .reminder-toggle small) {
    color: var(--iz-dark-muted) !important;
}
html[data-iz-theme="dark"] .agenda-settings-page :is(input[type="time"], .reminder-repeat-settings select) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-input) !important;
    color-scheme: dark;
}
html[data-iz-theme="dark"] .agenda-settings-page .closed-days label {
    color: var(--iz-dark-text-soft) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface) !important;
}
html[data-iz-theme="dark"] .agenda-settings-page .closed-days label.selected {
    color: #a5e7c7 !important;
    border-color: #287b5e !important;
    background: #18372d !important;
}

/* Catálogo de artigos: pesquisa e seleção da lista. */
html[data-iz-theme="dark"] .article-page .article-tools,
html[data-iz-theme="dark"] .article-page .article-tools > label,
html[data-iz-theme="dark"] .article-page .article-catalogue,
html[data-iz-theme="dark"] .article-page .catalogue-head,
html[data-iz-theme="dark"] .article-page .catalogue-row,
html[data-iz-theme="dark"] .article-page .article-editor,
html[data-iz-theme="dark"] .article-page .editor-body,
html[data-iz-theme="dark"] .article-page .form-section,
html[data-iz-theme="dark"] .article-page .data-section {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background-color: var(--iz-dark-surface) !important;
    background-image: none !important;
}
html[data-iz-theme="dark"] .article-page .article-tools > label,
html[data-iz-theme="dark"] .article-page .article-tools input {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border-strong) !important;
    background: var(--iz-dark-input) !important;
}
html[data-iz-theme="dark"] .article-page .article-tools input::placeholder {
    color: var(--iz-dark-muted) !important;
}
html[data-iz-theme="dark"] .article-page .catalogue-head {
    color: var(--iz-dark-muted) !important;
    background: var(--iz-dark-surface-soft) !important;
}
html[data-iz-theme="dark"] .article-page .catalogue-row :is(strong, b, span, small, .mud-icon-root) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .article-page .catalogue-row.selected,
html[data-iz-theme="dark"] .article-page .catalogue-row:hover {
    color: var(--iz-dark-text) !important;
    border-color: #34745f !important;
    background: #18352c !important;
}
html[data-iz-theme="dark"] .article-page .catalogue-row.selected :is(strong, b, span, small, .mud-icon-root) {
    color: #d8f4e7 !important;
}
html[data-iz-theme="dark"] .article-page :is(.editor-tabs, .form-section > header, .data-section > header, .editor-footer) {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
}
html[data-iz-theme="dark"] .article-page :is(.form-section h3, .data-section h3, .form-section header > span, .data-section header > span, .article-results > span) {
    color: var(--iz-dark-text-soft) !important;
}
html[data-iz-theme="dark"] .article-page :is(.form-section small, .data-section small, .catalogue-row small) {
    color: var(--iz-dark-muted) !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-card-main,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-assignment-grid,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-notes-panel,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card.task-readonly,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card.task-readonly .task-card-main,
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card.task-readonly .task-assignment-grid {
    color: var(--iz-dark-text) !important;
    border-color: var(--iz-dark-border) !important;
    background: var(--iz-dark-surface-raised) !important;
    background-image: none !important;
}
html[data-iz-theme="dark"] .station-page .station-tabs-shell .station-tasks .task-card .task-assignment-grid .task-estimate {
    color: var(--iz-dark-text-soft) !important;
    background: var(--iz-dark-surface-soft) !important;
}
/* Painel principal: contornos e separadores discretos para reduzir o aspeto carregado. */
html[data-iz-theme="dark"] .home-dashboard .dashboard-panel-v2 {
    border-color: #45474b !important;
    background-color: #303134 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14) !important;
}
html[data-iz-theme="dark"] .home-dashboard .panel-heading {
    border-color: #484a4e !important;
}
html[data-iz-theme="dark"] .home-dashboard :is(.active-work-row, .priority-row, .team-summary, .team-list, .delivery-list) {
    border-color: #414347 !important;
}
html[data-iz-theme="dark"] .home-dashboard :is(.active-work-row:hover, .priority-row:hover, .team-row:hover, .delivery-row:hover) {
    background-color: #393b3f !important;
}
html[data-iz-theme="dark"] .home-dashboard .team-summary {
    background: linear-gradient(110deg, #37393c, #303134) !important;
}
html[data-iz-theme="dark"] .home-dashboard :is(.maria-insight, .parts-status, .analytics-period select) {
    border-color: #4a4d52 !important;
    background-color: #383a3e !important;
}
html[data-iz-theme="dark"] .home-dashboard .parts-status:hover {
    border-color: color-mix(in srgb, var(--iz-brand-primary) 50%, #383b40) !important;
    background-color: #414347 !important;
}
html[data-iz-theme="dark"] .home-dashboard :is(.trend-bars, .progress-track, .section-load-track) {
    border-color: #55585e !important;
    background-color: #3a3c40 !important;
}
html[data-iz-theme="dark"] .home-dashboard .panel-link {
    border-color: #4b4e53 !important;
    background-color: #383a3e !important;
}