/* Stand PRO — Escuro Grafite (B11, 22/10/2026; Felipe: "Pode seguir com a B11: Ajustes do aplicativo (3º tema...)").
   O 3º tema do Desktop (Classes gerais\Tema.cs, AplicarPaletaDarkGrafite, linhas 570-624) no site: superfícies cinza
   grafite neutras e o azul só nas ações. Só age com <html data-theme="dark" data-escuro="grafite"> — o portal-theme-init.js e
   o tema-init.js põem o atributo antes de pintar e o tema-escolha.js troca na hora. O Escuro Azul (o escuro de sempre do
   site) e o Claro não mudam. Seções: 1. núcleo (variáveis); 2. cor petróleo fixa sem tema; 3. varredura do escuro (gerada a partir
   dos CSS do ar); 4. painel do plano de fundo; 5. ajustes à mão. */

/* ===== 1. Núcleo ===== */
/* Base do site (site.css): páginas públicas e o fundo da página do portal. */
html[data-theme="dark"][data-escuro="grafite"] {
  color-scheme: dark;
  --bg: #181818;              /* Background — faixas escuras (topo, destaque, rodapé) */
  --bg-elevated: #252525;     /* SurfaceAlt */
  --bg-soft: #303030;
  --surface: #181818;         /* Background — fundo da página */
  --surface-strong: #222222;  /* Surface — cartões */
  --surface-alt: #1f2023;     /* ChromeTopo — faixa alternada */
  --ink: #f2f2f2;             /* OnSurface */
  --ink-soft: #b5b5b5;
  --muted-inverse: #c2c2c2;
  --line: rgba(235, 235, 235, .13);
  --line-dark: rgba(235, 235, 235, .14);
}

/* Portal: a paleta (portal-palette.css, portal-theme.css, portal-refresh.css) e o menu lateral (portal-shell.css).
   Nomes do Desktop entre parênteses. O destaque de texto, contorno e realce é o azul de foco (Focus #3B82F6); o botão
   de ação é o azul do Desktop (Primary #2563EB) com texto branco — o #2563EB como texto sobre o cinza fica ilegível (3,1:1). */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page,
html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page] {
  --portal-bg: #181818;              /* Background */
  --portal-panel: #222222;           /* Surface */
  --portal-raised: #252525;          /* SurfaceAlt (zebra) */
  --portal-text: #f2f2f2;            /* OnSurface */
  --portal-muted: #a1a1a1;           /* OnSurfaceMuted */
  --portal-line: #3a3a3a;            /* GridLine / Border */
  --portal-strong-line: #55585c;     /* BorderStrong */
  --portal-menu: #1d2122;            /* ChromeMenu */
  --portal-submenu: #17191b;         /* ChromeSubMenu */
  --portal-top: #1f2023;             /* ChromeTopo */
  --portal-input: #171717;           /* InputBackground */
  --portal-readonly: #2a2a2a;        /* ReadOnlyBackground */
  --portal-grid-head: #2b2b2b;       /* GridHeaderBackground */
  --portal-accent: #3b82f6;          /* Focus */
  --portal-on-accent: #ffffff;       /* OnPrimary */
  --portal-selected: #234a73;        /* SurfaceSelected */
  --portal-selected-text: #ffffff;   /* OnSurfaceSelected */
  --portal-info: #24344d;            /* PrimaryLight */
  --rf-accent-solid: #2563eb;        /* Primary */
  --rf-accent-solid-hover: #1d4ed8;  /* PrimaryDark */
  --rf-on-accent: #ffffff;           /* OnPrimary */
  --rf-line-hover: #3b82f6;          /* Focus */
  --rf-ring: rgba(59, 130, 246, .28);
  --rf-row-hover: rgba(59, 130, 246, .08);
  --portal-accent-soft: rgba(59, 130, 246, .16); /* reserva verde-água do deposit-manager.css */
  --rf-icon: #adadad;
  --rf-neutral-bg: #343434;          /* Neutral */
  --rf-neutral-fg: #e8e8e8;          /* OnNeutral */
  --rf-success-bg: #244334;          /* SaveHighlight */
  --rf-warning-bg: #3d3420;          /* StatusWarn */
  --rf-warning-fg: #ffd27a;          /* StatusWarnFg */
  --rf-danger-bg: #3a1f23;           /* StatusError */
  --rf-danger-fg: #ffb4b4;           /* StatusErrorFg */
  --rf-kpi-ok: #22c55e;              /* Success */
  --rf-kpi-alert: #ef4444;           /* Destructive */
  --shell-bg-1: #1d2122;             /* ChromeMenu */
  --shell-bg-2: #1d2122;
  --shell-bg-3: #17191b;             /* ChromeSubMenu */
  --shell-text: #dddddd;
  --shell-muted: #a1a1a1;            /* OnSurfaceMuted */
  --shell-accent: #3b82f6;           /* Focus */
  --shell-accent-strong: #2563eb;    /* Primary */
  --shell-selected: #234a73;         /* SurfaceSelected */
  --shell-link: #bfbfbf;
  --shell-link-active: #ffffff;      /* OnSurfaceSelected */
  --shell-icon-bg: rgba(59, 130, 246, .14);
  --shell-rail: rgba(59, 130, 246, .25);
  --shell-background: linear-gradient(180deg, var(--shell-bg-1) 0%, var(--shell-bg-2) 55%, var(--shell-bg-3) 100%);
}

/* ===== 2. Cor petróleo fixa em regras sem tema (valem nos dois temas): os fundos escuros viram grafite; no portal o verde-água
   de destaque vira o azul do Desktop; nas páginas públicas o verde-água da marca fica. Mesmo peso do original (:where) e este
   arquivo vem depois dele (último do <head> no portal; nas públicas, antes só do temas.css). ===== */
/* site.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .site-header,
:where(html[data-theme="dark"][data-escuro="grafite"]) .hero,
:where(html[data-theme="dark"][data-escuro="grafite"]) .closing-cta { --bg: #181818; --bg-elevated: #252525; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .button-dark { background: #252525; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .hero { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .product-rail b { background: #303030; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .source-strip { background: #2c2c2c; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .section-contrast { background: #252525; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .security-brand-mark { background: rgba(24, 24, 24, .34); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .plan-limit-grid .featured { background: #2d2d2d; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .closing-cta { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .site-footer { background: #191919; }

/* portal.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-welcome-backdrop { background: rgba(23, 23, 23, .82); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-welcome-brand { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-welcome-copy li::before { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-welcome-icon { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-sidebar { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-nav a[aria-current="page"] { background: rgba(59, 130, 246, .13); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-nav a .nav-beta-badge { background: rgba(59, 130, 246, .15); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-avatar { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .desktop-download-icon { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .desktop-download-copy small { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .metrics-kicker { color: #3b82f6 !important; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .metrics-periods .portal-button[aria-pressed="true"] { background: #2f2f2f; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .metrics-conversion-grid strong { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-panel-header a { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .storage-bar span { background: #2563eb; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .trial-card { background: #2e2e2e; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .professional-trial-offer { border: 1px solid rgba(59, 130, 246, .3); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-table-wrap:focus-visible { outline: 3px solid #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .user-dot { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-button { background: #2f2f2f; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-back-link { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-field input:focus,
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-field select:focus,
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-field textarea:focus,
:where(html[data-theme="dark"][data-escuro="grafite"]) .protected-change input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-step-list li > span { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .success-mark { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-kicker { color: #3b82f6 !important; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-kicker span { background: #2563eb; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-module-nav a[aria-current="page"] { background: #2f2f2f; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-module-nav span { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-search:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-empty-state > span { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-item-dialog::backdrop { background: rgba(22, 22, 22, .62); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .beta-dialog-header small { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-request-quantity input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-request-status.partial { color: #3b82f6; }
@media (max-width: 760px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .portal-welcome-continue { background: #2f2f2f; }
}

/* sgq-landing.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-header { background: color-mix(in srgb, #181818 94%, transparent); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-hero { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-context { background: #2c2c2c; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-flow-section,
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-trust-section { background: #252525; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-plan-grid .featured { background: #2d2d2d; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-compliance-note { background: rgba(24, 24, 24, .32); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .sgq-closing { background: #181818; }

/* pages.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .inner-header { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .page-hero { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .security-symbol-panel { background: rgba(37, 37, 37, .8); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .timeline li::before { background: #2c2c2c; }

/* auth.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .auth-brand-panel { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .auth-submit { background: #2f2f2f; }
@media (max-width: 960px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .auth-brand { background: #181818; }
}
@media (max-width: 960px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .auth-story,
  :where(html[data-theme="dark"][data-escuro="grafite"]) .auth-page-registration .auth-story { background: #181818; }
}
@media (max-width: 960px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .auth-footnote { background: #181818; }
}

/* portal-navigation.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-module-group[open] { border-color: rgba(59, 130, 246, .188); background: rgba(59, 130, 246, .02); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-module-group[open] > summary { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-module-group .nav-beta-badge { background: rgba(59, 130, 246, .125); color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-module-links { border-left: 1px solid rgba(59, 130, 246, .251); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-module-group summary:focus-visible { outline: 2px solid #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-collapse-toggle { border: 1px solid rgba(59, 130, 246, .251); background: #292929; }
@media (max-width: 760px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .portal-sidebar-close { border: 1px solid rgba(59, 130, 246, .251); background: #292929; }
}

/* experience.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-header { background: #181818; }

/* inventory-manager.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .inventory-edit-dialog::backdrop { background: rgba(28, 28, 28, .651); }

/* desktop-preview.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .desktop-preview-open > span { background: #292929; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .desktop-preview-dialog::backdrop { background: rgba(23, 23, 23, .851); }

/* request-native-fields.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .request-model-dialog::backdrop { background: rgba(28, 28, 28, .667); }

/* registration-layout.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .auth-page-registration .auth-points li > span { border: 1px solid rgba(59, 130, 246, .314); }

/* request-manager.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .request-close-dialog::backdrop { background: rgba(28, 28, 28, .651); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .new-request-dialog::backdrop { background: rgba(28, 28, 28, .651); }

/* tela-inicial-primeiros-passos.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.ti-pp-conferencia::backdrop { background: rgba(26, 26, 26, .45); }

/* material-operations.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .material-eyebrow { color: #3b82f6; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .material-item-picker .model-input-row input[readonly]:focus-visible { outline: 2px solid #3b82f6; }
/* 07/11/2026 (onda 11 da melhoria — LC2-07): os selos da janela Pendências quase não se liam (3,7:1 e 2,5:1). Sem o :where, para
   passar na frente das cores do escuro (material-operations.css); texto claro sobre o fundo do selo, todos acima de 6,9:1. */
html[data-theme="dark"][data-escuro="grafite"] .material-pending-status { background: rgba(59, 130, 246, .18); color: #93c5fd; }
html[data-theme="dark"][data-escuro="grafite"] .material-pending-status[data-status="PARCIAL"] { background: rgba(245, 158, 11, .18); color: #fcd34d; }
html[data-theme="dark"][data-escuro="grafite"] .material-pending-status[data-status="INCONSISTENTE"] { background: rgba(239, 68, 68, .18); color: #fca5a5; }

/* collaborator-registration.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .registration-kind a[aria-current="page"] { background: #303030; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .collaborator-registration .registration-progress li[aria-current="step"] span { box-shadow: 0 0 0 3px rgba(59, 130, 246, .082); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .collaborator-registration .field input:focus { border-color: #3b82f6; }

/* tela-inicial-area.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.ti-area-janela::backdrop,
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.ti-area-escolha::backdrop { background: rgb(26 26 26 / .45); }

/* kanban-showcase.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .kb-window { background: #1c1c1c; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .kb-window-bar { background: #232323; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .kb-window-bar i { background: #3e3e3e; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .kb-window-bar span { background: #1c1c1c; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .kb-shot-phone { background: #151515; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .kb-device-frame { background: #151515; }

/* picker-catalog.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .picker-photo.is-zoomed .picker-photo-frame { background: rgba(28, 28, 28, .92); }

/* tela-inicial-sugestao.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .ti-sug-texto:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .ti-sug-tipo:focus { box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .ti-sug-visor-topo { background: #222222; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .ti-sug-visor-fechar:focus-visible { outline: 2px solid #3b82f6; }

/* permissoes.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .permissions-workspace .perm-value:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }

/* registration-choice.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .registration-choice-card:hover,
:where(html[data-theme="dark"][data-escuro="grafite"]) .registration-choice-card:focus-visible { box-shadow: 0 10px 26px rgba(59, 130, 246, .14); }

/* stock-import.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-import-dialog::backdrop { background: rgba(28, 28, 28, .651); }

/* dashboard.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .dash-dialogo::backdrop { background: rgba(21, 21, 21, .45); }

/* order-photos.css */
@media(max-width:760px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .photo-panel { --photo-fundo: rgb(37 99 235 / .13); }
}
@media(min-width:761px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .photo-panel { --photo-fundo: rgb(37 99 235 / .13); }
}

/* audit-history.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.audit-breaks-dialog::backdrop { background: rgba(26, 26, 26, .45); }

/* notificacoes.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.notify-center-dialog::backdrop { background: rgba(26, 26, 26, .45); }

/* pendencias.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.pending-reason-dialog::backdrop { background: rgba(26, 26, 26, .45); }

/* dhr-unidade.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .dhr-kpis { background: rgba(59, 130, 246, .08); }

/* mfa-ativar.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.portal-mfa-ativar::backdrop { background: rgba(26, 26, 26, .45); }

/* operational-pending.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.operational-pending-dialog::backdrop { background: rgb(26 26 26 / .45); }

/* portal-message.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) dialog.portal-message::backdrop { background: rgba(26, 26, 26, .45); }

/* portal-universal-manager.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .portal-universal-manager .inventory-edit-dialog::backdrop { background: rgba(28, 28, 28, .69); }

/* stock-landing.css */
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-header[data-scrolled] { background: rgba(26, 26, 26, .96); }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-hero { background: #181818; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-start-steps li > span { background: #2e2e2e; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-compare { background: #232323; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-security { background: #2e2e2e; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-final { background: #1b1b1b; }
:where(html[data-theme="dark"][data-escuro="grafite"]) .stock-footer { background: #1a1a1a; }
@media (max-width: 720px) {
  :where(html[data-theme="dark"][data-escuro="grafite"]) .stock-mobile-cta { background: rgba(26, 26, 26, .97); }
}

/* ===== 3. Varredura do escuro: cada regra html[data-theme="dark"] com cor fixa, nas cores do grafite (gerado a partir dos
   CSS do ar de 22/10/2026). CSS ligado antes no <head>: mesmo peso (:where). CSS que entra depois: um atributo a mais. ===== */
/* portal-theme.css */
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(input,select,textarea,.beta-search) { background: #171717; border-color: #55585c; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(input,textarea)::placeholder { color: #a1a1a1; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page input[readonly] { background: #252525; color: #adadad; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.portal-button.secondary, .portal-logout, .portal-mobile-toggle, .portal-theme-toggle, .beta-dialog-close, .stock-request-remove) { border-color: #55585c; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page .portal-button:not(.secondary):not(.stock-request-remove) { background: #2563eb; color: #ffffff; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.portal-next-step, .preview-banner, .portal-alert.info, .form-feedback[data-type="info"]) { background: #24344d; color: #f2f2f2; border-color: #55585c; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.portal-next-step a, .portal-panel-header a, .portal-back-link) { color: #3b82f6; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page .beta-kicker { color: #3b82f6 !important; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.pill,.pill.inactive) { background: #343434; color: #e8e8e8; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.pill.active,.form-feedback[data-type="success"]) { background: #244334; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.beta-pill,.portal-alert.warning,.protected-change,.form-feedback[data-type="warning"]) { background: #3d3420; color: #ffd27a; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.portal-alert.danger,.form-feedback[data-type="error"]) { background: #3a1f23; color: #ffb4b4; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.portal-avatar,.user-dot,.success-mark) { background: #234a73; color: #ffffff; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page .storage-bar { background: #3a3a3a; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page .loading-block { background: linear-gradient(90deg,#222222 25%,#343434 50%,#222222 75%); }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.stock-request-suggestions button:hover,.stock-request-suggestions button:focus-visible) { background: #234a73; }

/* portal-palette.css */
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :is(.portal-next-step a,.portal-panel-header a,.portal-back-link,.beta-module-nav span) { color: #3b82f6; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page .beta-kicker { color: #3b82f6 !important; }
html[data-theme="dark"]:where([data-escuro="grafite"]) .portal-page :where(a,button,input,select,textarea,summary):focus-visible { outline-color: #3b82f6; }

/* stage-board.css */
[data-theme="dark"]:where([data-escuro="grafite"]) .board-card-proposal.is-expired { background: #353535; color: #c0c0c0; }

/* regras-campos.css (entra depois: atributo a mais) */
html[data-theme="dark"][data-escuro="grafite"] .portal-page .regras-campos-modo select.regra-sim { background: #3a1f23; color: #ffb4b4; }
html[data-theme="dark"][data-escuro="grafite"] .portal-page .regras-campos-modo select.regra-perguntar { background: #234a73; color: #ffffff; border-color: #55585c; }
html[data-theme="dark"][data-escuro="grafite"] .portal-page .regras-campos-modo select.regra-notificar { background: #3d3420; color: #ffd27a; }
html[data-theme="dark"][data-escuro="grafite"] .portal-page .regras-campos-nota { color: #ffd27a; }

/* portal-refresh.css (entra depois: atributo a mais) */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page] .portal-button:disabled:nth-child(n):nth-child(n):nth-child(n) { color: #a1a1a1; }
html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page] .portal-welcome-icon { background: #234a73; color: #ffffff; }

/* order-panels.css (entra depois: atributo a mais) */
[data-theme="dark"][data-escuro="grafite"] .order-doc-kind.is-file { background: #353535; color: #c0c0c0; }
[data-theme="dark"][data-escuro="grafite"] .order-step-number { background: #24344d; color: #f2f2f2; }
[data-theme="dark"][data-escuro="grafite"] .dm-code { background: #24344d; color: #f2f2f2; }
[data-theme="dark"][data-escuro="grafite"] .dm-chip.is-off { background: #353535; color: #c0c0c0; }
[data-theme="dark"][data-escuro="grafite"] .order-approval-badge { background: #353535; color: #c0c0c0; }

/* recalls.css */
html[data-theme="dark"]:where([data-escuro="grafite"]) .recall-status-cancelado,
html[data-theme="dark"]:where([data-escuro="grafite"]) .recall-status { background: #3c3c3c; }

/* dashboard.css (entra depois: atributo a mais) */
html[data-theme="dark"][data-escuro="grafite"] .dash-ranking-trilho { background: var(--portal-line, #3a3a3a); }

/* riscos.css */
html[data-theme="dark"]:where([data-escuro="grafite"]) :is(.risco-cinza, .risco-status-vazio),
html[data-theme="dark"]:where([data-escuro="grafite"]) .risco-dialog input.risco-calculado[data-nivel="cinza"] { background: #353535; color: #c0c0c0; }

/* ecns.css */
html[data-theme="dark"]:where([data-escuro="grafite"]) .ecn-cinza { background: #353535; color: #c0c0c0; }

/* pms-atividades.css */
html[data-theme="dark"]:where([data-escuro="grafite"]) .pms-status-cancelada { background: #353535; color: #c0c0c0; }

/* temas.css (entra depois: atributo a mais) */
html[data-theme="dark"][data-escuro="grafite"] .button-dark { background: #3d3d3d; }
html[data-theme="dark"][data-escuro="grafite"] body.auth-page { --ink: #f2f2f2; --ink-soft: #aeaeae; --line: #3a3a3a; --surface: #181818; --surface-strong: #222222; --surface-alt: #252525; --teal-dark: #3b82f6; --ux-focus: #3b82f6; background: #181818; color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .auth-main { background: #181818; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .back-link { color: #b8b8b8; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .back-link:hover { color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .auth-card h1 { color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.auth-intro, .auth-switch, .auth-context, .checkbox, .form-section p.section-help, .field small, .registration-choice-help) { color: #aeaeae; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .auth-main .inline-help { color: #b8b8b8; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.auth-link, .password-toggle, .eyebrow.dark) { color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .form-section { background: #222222; border-color: #3a3a3a; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .form-section legend { color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.form-section legend span, .form-subsection summary span) { color: #a1a1a1; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .form-subsection { border-top-color: #3a3a3a; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .form-subsection summary { color: #d3d3d3; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .form-subsection summary:hover { color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.field label, .field > span:first-child) { color: #dcdcdc; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.field input, .field select, .field textarea) { background: #171717; color: #f2f2f2; border-color: #55585c; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.field input, .field select, .field textarea):hover { border-color: #5b5b5b; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page :is(.field input, .field select, .field textarea):focus { background: #171717; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .field :is(input, textarea)::placeholder { color: #727272; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px #171717 inset; -webkit-text-fill-color: #f2f2f2; caret-color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .checkbox input { accent-color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .auth-submit { background: #2563eb; color: #ffffff; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .auth-submit:hover:not(:disabled) { background: #1d4ed8; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-security-note { background: #24344d; color: #c6c6c6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-security-note strong { color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-reassurance li { background: #24344d; border-color: #55585c; color: #ffffff; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress li { color: #a1a1a1; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress li::before { background: #3a3a3a; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress span { border-color: #55585c; background: #181818; color: #aeaeae; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress li:is([aria-current="step"], [data-complete]) { color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress li[aria-current="step"] span { border-color: #3b82f6; background: #2563eb; color: #ffffff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress li[data-complete] span { border-color: #3b82f6; background: rgba(37, 99, 235, .15); color: #ffffff; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-progress li:is([data-complete], [aria-current="step"])::before { background: #2563eb; }
html[data-theme="dark"][data-escuro="grafite"] .collaborator-registration .registration-progress { background: #222222; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-actions { background: #181818; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-summary { border-color: #3a3a3a; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-summary div { border-color: #3a3a3a; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-summary dt { color: #a1a1a1; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-summary dd { color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .form-feedback[data-type="info"] { background: #24344d; color: #d2d2d2; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-kind a { border-color: #55585c; color: #c6c6c6; }
html[data-theme="dark"][data-escuro="grafite"] .auth-page .registration-kind a[aria-current="page"] { background: #2563eb; border-color: #3b82f6; color: #ffffff; }
html[data-theme="dark"][data-escuro="grafite"] .collaborator-registration [data-join-preview] { background: #24344d; color: #d2d2d2; }

/* portal-fundo.css (entra depois: atributo a mais) */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page].fp-ligado { --fp-veu-cor: rgb(24 24 24 / var(--fp-veu, .35)); --portal-panel: rgb(34 34 34 / var(--fp-alfa, .85)); --portal-raised: rgb(37 37 37 / var(--fp-alfa, .85)); --portal-grid-head: rgb(43 43 43 / var(--fp-alfa, .85)); --portal-info: rgb(36 52 77 / var(--fp-alfa, .85)); --portal-top: rgb(31 32 35 / var(--fp-menu-alfa, .45)); --shell-background: linear-gradient(180deg, rgb(29 33 34 / var(--fp-menu-alfa, .45)), rgb(23 25 27 / var(--fp-menu-alfa, .45))); --fp-solido: #222222; }
@media (max-width: 760px) {
  html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page].fp-ligado { --shell-background: linear-gradient(180deg, #1d2122, #17191b); }
}
html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page].fp-ligado :is(dialog, .portal-notify-panel, .stock-request-suggestions, [role="listbox"], [role="menu"]) { --portal-panel: #222222; --portal-top: #1f2023; --portal-raised: #252525; --portal-grid-head: #2b2b2b; --portal-info: #24344d; }
html[data-theme="dark"][data-escuro="grafite"] .fp-bv-galeria .fp-bv-nenhum { background: #252525; color: #dadada; }

/* ===== 4. Painel "Plano de fundo" (portal-fundo.css; escuro nos dois temas, posto pelo script) ===== */
html[data-theme="dark"][data-escuro="grafite"] .fp-bv-galeria button { background: #181818; }
html[data-theme="dark"][data-escuro="grafite"] .fp-bv-galeria button[aria-checked="true"] { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); }
html[data-theme="dark"][data-escuro="grafite"] .fp-bv-galeria button:focus-visible { outline: 2px solid #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .fp-painel { border: 1px solid #55585c; background: #222222; color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .fp-painel p { color: #b0b0b0; }
html[data-theme="dark"][data-escuro="grafite"] .fp-tipos button { border: 1px solid #55585c; color: #dadada; }
html[data-theme="dark"][data-escuro="grafite"] .fp-tipos button[aria-pressed="true"] { border-color: #3b82f6; background: #234a73; }
html[data-theme="dark"][data-escuro="grafite"] .fp-galeria button { background: #181818; }
html[data-theme="dark"][data-escuro="grafite"] .fp-galeria button[aria-pressed="true"] { border-color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .fp-galeria .fp-nenhum { color: #b0b0b0; }
html[data-theme="dark"][data-escuro="grafite"] .fp-linha input[type="range"] { accent-color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .fp-arquivo,
html[data-theme="dark"][data-escuro="grafite"] .fp-tirar { border: 1px solid #55585c; color: #f2f2f2; }
html[data-theme="dark"][data-escuro="grafite"] .fp-arquivo:hover,
html[data-theme="dark"][data-escuro="grafite"] .fp-tirar:hover { border-color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .fp-painel :is(button, .fp-arquivo):focus-visible { outline: 2px solid #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] .fp-painel .fp-status { color: #dadada; }

/* ===== 5. Ajustes à mão (portal) ===== */
/* Menu lateral: ícone do grupo aberto, selo "Beta" e avatar da empresa têm verde-água fixo nos dois temas (portal-shell.css). */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page .portal-module-group[open] .portal-nav-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
html[data-theme="dark"][data-escuro="grafite"] body.portal-page .portal-module-group .nav-beta-badge { background: rgba(59, 130, 246, .16); }
html[data-theme="dark"][data-escuro="grafite"] body.portal-page .portal-company-avatar { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

/* Destaque como fundo de texto branco: o azul de ação do Desktop (Primary #2563EB), para o texto branco ler bem. */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page :is(.beta-module-nav a[aria-current="page"], .planilhas-painel [data-todos].is-active, .ti-selo-novo, .sub-tag.is-chosen) { background: #2563eb; }
html[data-theme="dark"][data-escuro="grafite"] body.portal-page .planilhas-painel [data-todos].is-active { border-color: #2563eb; }
/* Textos que usam a cor do botão (--rf-accent-solid): no grafite usam o azul de foco, que lê sobre o cinza. */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page :is(.portal-convite-status[data-tipo="ok"], .portal-convite-renew-open, .portal-notify-open, .portal-notify-phone.is-on .portal-notify-phone-text, .portal-notify-phone-btn, .portal-notify-center) { color: #3b82f6; }
/* 28/10/2026 (melhoria CEL-07): a prioridade do sininho e da Central volta a ter cor própria no grafite — crítica, alta e média com as
   cores do tema escuro (portal-notifications.css e notificacoes.css), como no Claro e no Escuro Azul, e "VISTO" no cinza. O azul fica só
   na baixa/normal, o mesmo de antes e dos links do aviso ("Abrir", "Ver todas as notificações"), como no Claro e no Escuro Azul. */
html[data-theme="dark"][data-escuro="grafite"] body.portal-page :is(.notify-center-prio-cell, .notify-center-prio, .portal-notify-prio).is-normal { color: #3b82f6; }
html[data-theme="dark"][data-escuro="grafite"] body.portal-page[data-portal-page] .overview-panel h2 { color: #3b82f6; }
