/* V1993 — decisões do dono de 20/10/2026 (lacunas L1 a L19 do manual de design), aplicadas no Frame.
   Carregado por último. Telas com desenho próprio (Início, Inteligência de Negócios, Time-Tracker) só recebem o que é geral
   (cores, aviso rápido, foco dos campos, estados dos botões). */
:root { --arz-er: #dc2626; }
html[data-theme="dark"] { --arz-er: #f87171; }

/* L1 · um azul só no escuro (#0a84ff): variáveis de destaque; as cores fixas #0a84ff foram trocadas no código */
html[data-theme="dark"]:not(#_):not(#__) { --accent-blue: #0a84ff; --accent-blue-rgb: 10, 132, 255; --accent-blue-glow: rgba(10, 132, 255, .15); --v2-az: #0a84ff; --v2-az-rgb: 10, 132, 255; --acs-azul: #0a84ff; }

/* L10 · claro: fundo #eceef3 e cartões brancos; cabeçalho e menu lateral continuam #f7f8fb (igual aos outros apps) */
html:not([data-theme="dark"]):not(#_):not(#__) { --bg-card: #ffffff; }
html:not([data-theme="dark"]):not(#_):not(#__) body .top-header, html:not([data-theme="dark"]):not(#_):not(#__) body .sidebar { background-color: #f7f8fb; --bg-card: #f7f8fb; }

/* L2 · Excluir no claro: #dc2626 */
html:not([data-theme="dark"]):not(#_):not(#__) { --accent-red: #dc2626; }
html:not([data-theme="dark"]):not(#_):not(#__) body :is(.perigo, .v2j-lk.perigo, .dcp-lnk.perigo, .pz-del, .xm-del) { color: #dc2626 !important; }
html:not([data-theme="dark"]):not(#_):not(#__) body .btn-perigo-solido { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }

/* L15 · texto do menu lateral: escuro #c8cbd4, claro #565d6c */
html[data-theme="dark"]:not(#_):not(#__):not(#___) body .sidebar :is(.submenu-link, .menu-chef):not(.active) { color: #c8cbd4; }
html:not([data-theme="dark"]):not(#_):not(#__):not(#___) body .sidebar :is(.submenu-link, .menu-chef):not(.active) { color: #565d6c; }
/* L17 · hover do menu lateral: só o texto vai para a cor principal, sem fundo */
html:not(#_):not(#__):not(#___) body .sidebar :is(.submenu-link, .menu-chef):not(.active):hover { color: var(--text-primary) !important; background: transparent !important; }

/* L16 · avatar do cabeçalho: degradê do botão primário */
html:not(#_):not(#__):not(#___) body .header-avatar { background: linear-gradient(120deg, #2f5eea, #4f8af7) !important; color: #fff !important; }

/* L7 · aviso rápido: pílula no centro, embaixo; fundo e borda do cartão; texto normal; sem cor de status */
html:not(#_):not(#__):not(#___) body #toast { left: 50%; bottom: 28px; top: auto; background: var(--bg-card) !important; color: var(--text-primary) !important; border: 1px solid var(--border-color) !important; border-radius: 999px !important; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }

/* Aviso "Uso em mais de um app": botão no azul do sistema (nunca roxo) */
html:not(#_):not(#__) body #arz-aviso-uso button { background: linear-gradient(120deg, #2f5eea, #4f8af7) !important; border-radius: 999px; }

/* L14 · pílula "Conta vinculada": azul suave */
html:not(#_):not(#__):not(#___) body .ff-selo.st-green { background: rgba(47, 94, 234, .12) !important; color: #1d4ed8 !important; }
html[data-theme="dark"]:not(#_):not(#__):not(#___) body .ff-selo.st-green { background: rgba(10, 132, 255, .16) !important; color: #5aa0ff !important; }

/* Botões do sistema (primário, secundário, ações das barras e janelas) */
/* L3 · pressionado: encolhe a 97% e escurece 6% */
html:not(#_):not(#__):not(#___) body :is(.btn-primary, .btn-secondary, .btn-primary-compacto, .btn-secondary-compacto, .btg, .ab, .iz-ab, .ns-b, .bt, .fz-novo, .fz-conv, .btn-perigo-solido):active:not(:disabled) { transform: scale(.97); filter: brightness(.94); }
/* L4 · desabilitado: 45%, cursor proibido, sem hover */
html:not(#_):not(#__):not(#___) body :is(.btn-primary, .btn-secondary, .btn-primary-compacto, .btn-secondary-compacto, .btg, .ab, .iz-ab, .ns-b, .bt, .fz-novo, .fz-conv, .btn-perigo-solido):is(:disabled, [aria-disabled="true"]):not([aria-busy="true"]) { opacity: .45 !important; cursor: not-allowed !important; filter: none !important; transform: none !important; box-shadow: none !important; }
/* L5 · carregando: anel girando, o texto continua */
html:not(#_):not(#__):not(#___) body :is(.btn-primary, .btn-secondary, .btn-primary-compacto, .btn-secondary-compacto, .btg, .ab, .iz-ab, .ns-b, .bt, .fz-novo, .fz-conv)[aria-busy="true"] { opacity: 1 !important; cursor: progress !important; }
html:not(#_):not(#__):not(#___) body :is(.btn-primary, .btn-secondary, .btn-primary-compacto, .btn-secondary-compacto, .btg, .ab, .iz-ab, .ns-b, .bt, .fz-novo, .fz-conv)[aria-busy="true"]::before { content: ""; display: inline-block; flex: none; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: arz1993g .8s linear infinite; }
@keyframes arz1993g { to { transform: rotate(360deg); } }
/* L8 · foco por teclado: anel azul de 2px, afastado 2px (só com Tab) */
html:not(#_):not(#__):not(#___) body :is(.btn-primary, .btn-secondary, .btn-primary-compacto, .btn-secondary-compacto, .btg, .ab, .iz-ab, .ns-b, .bt, .fz-novo, .fz-conv, .btn-perigo-solido, [class*="tb-f"], .fz-fb):focus-visible { outline: 2px solid #0a84ff !important; outline-offset: 2px !important; }

/* L19 · foco dos campos (C1): borda azul suave e fundo com 7% de azul, sem anel. O raio de cada campo não muda. */
html:not(#_):not(#__):not(#___) body :is(.input-element, .search-input, .in, .fj-in, .gz-in, .hz-in, .kz-in, .vz-in, .dcp-inp, .ed-desc, .uf-pers input, #aranuz-acesso-overlay input, #pjValue):focus:not(.arz-er) {
  border-color: rgba(10, 132, 255, .6) !important; box-shadow: none !important; outline: 0 !important;
   }
html:not(#_):not(#__):not(#___) body :is(.tb-s, .fz-sr, .bo-qa, .in-add, #dcp-root .dcp-busca, #dcp-root .dcp-idx-busca, .xz-bo-ga, .v2c .v2c-fld):focus-within:not(.er) {
  border-color: rgba(10, 132, 255, .6) !important; box-shadow: none !important;
   }

/* L6 · erro no campo: só a borda vermelha (claro #dc2626, escuro #f87171), sem frase; sai ao digitar */
html:not(#_):not(#__):not(#___) body .arz-er { border-color: var(--arz-er) !important; box-shadow: none !important; }

/* V1994 — Planejamento anual (item 27): valor editável com R$ e % ao lado */
html:not(#_):not(#__) body .v2 .pl-cd > .pl-vl { display: flex; align-items: baseline; gap: 4px; font-size: 17px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text-primary); }
html:not(#_):not(#__) body .v2 .pl-cd > .pl-vl em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
html:not(#_):not(#__) body .v2 .pl-cd > .pl-vl .pl-ed { flex: 0 1 auto; width: 9ch; min-width: 3ch; field-sizing: content; }

/* V1994 — menu do avatar (item 12 da auditoria): no claro o fundo ficava escuro e o texto sumia */
html:not([data-theme="dark"]):not(#_):not(#__) body #czAvPop .cz-mn { background: var(--bg-card) !important; border: 1px solid var(--border-color) !important; color: var(--text-primary) !important; box-shadow: 0 16px 40px rgba(20, 24, 40, .14) !important; }
html:not([data-theme="dark"]):not(#_):not(#__) body #czAvPop .cz-cf8-ai:not(.cz-t):hover { background: rgba(20, 24, 40, .05); }
html:not(#_):not(#__) body #czAvPop .cz-cf8-av { background: linear-gradient(120deg, #2f5eea, #4f8af7) !important; color: #fff !important; }
