/* Visual inspirado em shadcn/ui (MIT) – https://ui.shadcn.com */
/* Neto Silva — camada visual "shadcn" (etapa 1: tokens + base).
   Última camada de tema: só aparência. Não altera lógica, dados nem a área TAEC.
   html:root body:not(.taec-workspace) = html:root body:not(.taec-workspace)  (especificidade acima do tema Azul). */

:root{
  /* Paleta da marca: azul (mesma identidade do tema Azul), acabamento shadcn */
  --background:#EEF3F8;
  --foreground:#10283D;
  --card:#FFFFFF;
  --card-foreground:#10283D;
  --popover:#FFFFFF;
  --popover-foreground:#10283D;
  /* no sistema antigo --muted sempre foi COR DE TEXTO; mantido assim para não quebrar telas.
     O fundo "muted" do shadcn fica em --muted-bg. */
  --muted:#52677A;
  --muted-bg:#E4EDF5;
  --muted-foreground:#52677A;
  --accent-bg:#F2F7FB;
  --border:rgba(16,40,61,.10);
  --input:rgba(16,40,61,.18);
  --ring:#2E8BD6;
  --primary:#0B5FA5;
  --primary-hover:#073B63;
  --primary-foreground:#FFFFFF;
  --secondary:#E4EDF5;
  --secondary-foreground:#0B2A45;
  --destructive:#D92D20;
  --success:#1F7A55;
  --warning:#B4540A;
  --info:#0B5FA5;
  --brand:#0B5FA5;
  --brand-strong:#073B63;
  --brand-bright:#2E8BD6;
  --navy:#071F35;
  --navy-2:#0B2A45;
  --cyan:#8BEAFF;
  --radius:.625rem;
  --radius-sm:calc(var(--radius) - 4px);
  --radius-md:calc(var(--radius) - 2px);
  --radius-lg:calc(var(--radius) + 4px);
  --shadow-sm:0 1px 2px rgba(7,31,53,.06);
  --font-sans:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --ease:150ms ease;

  /* variáveis antigas apontando para os tokens novos */
  --ink:var(--foreground);--paper:var(--background);--line:var(--border);--accent:var(--brand);
  --surface:var(--card);--focus:var(--ring);--font-ui:var(--font-sans);
  --ns-bg:var(--background);--ns-solid-2:var(--accent-bg);--ns-line:var(--border);--ns-line-2:var(--input);
  --ns-text:var(--foreground);--ns-text-2:var(--foreground);--ns-muted:var(--muted-foreground);
  --ns-red:var(--brand-bright);--ns-red-2:var(--brand-bright);--ns-red-deep:var(--brand-strong);--ns-red-soft:rgba(46,139,214,.10);--ns-red-text:var(--brand);--ns-shadow:var(--shadow-sm);
  --az-ink:var(--foreground);--az-text:var(--foreground);--az-muted:var(--muted-foreground);--az-line:var(--border);--az-line-2:var(--input);
  --az-ice:var(--muted-bg);--az-ice-2:var(--accent-bg);--az-shadow:var(--shadow-sm);
  --az-danger:var(--destructive);--az-danger-soft:#FDE3E1;--az-warn:var(--warning);--az-warn-soft:#FFF4DC;--az-ok:var(--success);--az-ok-soft:#E1F5EC;
  color-scheme:light;
}

/* ---------- base ---------- */
html:root body:not(.taec-workspace){background:var(--background)!important;color:var(--foreground)!important;font:14px/1.5 var(--font-sans)!important;animation:none!important;-webkit-font-smoothing:antialiased}
html:root body:not(.taec-workspace) ::selection{background:rgba(46,139,214,.22);color:var(--foreground)}
html:root body:not(.taec-workspace) main#main{background:transparent!important}
html:root body:not(.taec-workspace) #main>*,html:root body:not(.taec-workspace) #main>*:nth-child(n){animation:none!important}
html:root body:not(.taec-workspace) :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:2px solid var(--ring)!important;outline-offset:2px!important;box-shadow:none!important}
html:root body:not(.taec-workspace) :is(button,a,.btn,input,select,textarea){transition:background-color var(--ease),border-color var(--ease),color var(--ease),box-shadow var(--ease)!important}
html:root body:not(.taec-workspace) *{scrollbar-color:#C2D0DC transparent}
html:root body:not(.taec-workspace) ::-webkit-scrollbar{width:10px;height:10px}html:root body:not(.taec-workspace) ::-webkit-scrollbar-thumb{background:#C2D0DC;border-radius:10px;border:2px solid var(--background)}

/* ---------- tipografia ---------- */
html:root body:not(.taec-workspace) :is(#main,dialog) :is(h1,h2,h3,h4){font-family:var(--font-sans)!important;color:var(--foreground)!important;font-style:normal!important;letter-spacing:-.01em!important}
html:root body:not(.taec-workspace) #main h1{font-size:24px!important;font-weight:600!important;line-height:1.25!important}
html:root body:not(.taec-workspace) #main h2{font-size:18px!important;font-weight:600!important;line-height:1.35!important}
html:root body:not(.taec-workspace) #main h3,html:root body:not(.taec-workspace) dialog h3{font-size:16px!important;font-weight:600!important}
html:root body:not(.taec-workspace) :is(main,dialog) :is(p,.hint,.footnote,small,.kicker){color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) #main :is(.eyebrow,.ns-eyebrow){color:var(--muted-foreground)!important;font:500 12px var(--font-sans)!important;letter-spacing:.02em!important;text-transform:none!important}
html:root body:not(.taec-workspace) #main>.top{color:var(--muted-foreground)!important;letter-spacing:0!important;border-color:var(--border)!important}
html:root body:not(.taec-workspace) :is(main,dialog) :is(b,strong){color:var(--foreground)}
html:root body:not(.taec-workspace) main a:not(.btn),html:root body:not(.taec-workspace) .ns-link{color:var(--brand)!important}
html:root body:not(.taec-workspace) main a:not(.btn):hover,html:root body:not(.taec-workspace) .ns-link:hover{color:var(--brand-strong)!important}
html:root body:not(.taec-workspace) label{color:var(--foreground)!important;font:500 13px/1.4 var(--font-sans)!important}

/* ---------- menu lateral azul-marinho e barra de cima (o layout novo é a etapa 2) ---------- */
html:root body:not(.taec-workspace) aside{background:var(--navy)!important;border-right:1px solid rgba(139,234,255,.10)!important;box-shadow:none!important;color:#CFE0EE!important}
html:root body:not(.taec-workspace) aside::after{content:none!important}
html:root body:not(.taec-workspace) aside .brand-logo{content:url('logo-noir.png')!important;animation:none!important;filter:none!important}
html:root body:not(.taec-workspace) aside :is(small,.aside-note,.aside-note *,p,span){color:#9FC3DD!important}
html:root body:not(.taec-workspace) aside .aside-note strong{color:#fff!important}
html:root body:not(.taec-workspace) aside :is(nav button.nav-item,.hub-nav),html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav{color:#B8CCDD!important;background:transparent!important;border-color:transparent!important;border-radius:var(--radius-md)!important;font:500 14px var(--font-sans)!important}
html:root body:not(.taec-workspace) aside :is(nav button.nav-item,.hub-nav) span,html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav span{color:inherit!important}
html:root body:not(.taec-workspace) aside :is(nav button.nav-item,.hub-nav):hover:not(.active),html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav:hover{background:rgba(139,234,255,.07)!important;color:#fff!important}
html:root body:not(.taec-workspace) aside :is(nav button.nav-item,.hub-nav).active,html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav.active{background:rgba(139,234,255,.10)!important;color:#fff!important;box-shadow:inset 2px 0 0 var(--cyan)!important;font-weight:600!important}
html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav .hub-nav-icon,html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav:hover .hub-nav-icon{background:transparent!important;color:inherit!important;box-shadow:none!important;border-color:transparent!important}
html:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav.active .hub-nav-icon{background:transparent!important;color:var(--cyan)!important;box-shadow:none!important}
html:root body:not(.taec-workspace) aside :is(hr,.aside-sep){border-color:rgba(139,234,255,.12)!important}
html:root body:not(.taec-workspace) .hub-menu-toggle{background:var(--navy)!important;color:#fff!important;border:1px solid transparent!important}
html:root body:not(.taec-workspace) :is(#cloudBar,.hub-workspace-bar){background:rgba(255,255,255,.8)!important;backdrop-filter:blur(8px);border-bottom:1px solid var(--border)!important;color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) #cloudState{background:transparent!important;border:0!important;color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) #cloudState[data-status=saved]{color:var(--success)!important}
html:root body:not(.taec-workspace) #cloudState[data-status=saving]{color:var(--warning)!important}
html:root body:not(.taec-workspace) #cloudState:is([data-status=error],[data-status=offline]){color:var(--destructive)!important;background:transparent!important}

/* ---------- botões (shadcn Button) ---------- */
/* default do sistema antigo (.btn) = variante "outline" */
html:root body:not(.taec-workspace) .btn,html:root body:not(.taec-workspace) main button.btn,html:root body:not(.taec-workspace) dialog .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:8px 16px!important;background:transparent!important;color:var(--foreground)!important;border:1px solid var(--input)!important;border-radius:var(--radius-md)!important;font:500 14px/1.25 var(--font-sans)!important;box-shadow:var(--shadow-sm)!important;transform:none!important;backdrop-filter:none!important;white-space:nowrap}
html:root body:not(.taec-workspace) .btn:hover:not(:disabled){background:var(--accent-bg)!important;border-color:var(--input)!important;color:var(--foreground)!important;transform:none!important}
html:root body:not(.taec-workspace) :is(.btn.primary,.btn.lime){background:var(--primary)!important;color:var(--primary-foreground)!important;border-color:var(--primary)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) :is(.btn.primary,.btn.lime):hover:not(:disabled){background:var(--primary-hover)!important;border-color:var(--primary-hover)!important;color:var(--primary-foreground)!important}
html:root body:not(.taec-workspace) .btn.small,html:root body:not(.taec-workspace) .btn.sm{min-height:32px;padding:5px 12px!important;font-size:13px!important}
html:root body:not(.taec-workspace) :is(.btn.danger,.btn.delete,.btn.red,button.danger,[data-danger]){color:var(--destructive)!important;border-color:rgba(217,45,32,.30)!important}
html:root body:not(.taec-workspace) :is(.btn.danger,.btn.delete,.btn.red):hover:not(:disabled){background:rgba(217,45,32,.06)!important}
html:root body:not(.taec-workspace) :is(.btn,button):disabled{opacity:.5!important;cursor:not-allowed!important;box-shadow:none!important}
/* botões "ghost": só texto */
html:root body:not(.taec-workspace) #cloudBar .btn{border-radius:var(--radius-md)!important}
html:root body:not(.taec-workspace) .ns-priv-btn{min-width:36px}

/* ---------- campos (Input / Textarea / Select / Label) ---------- */
html:root body:not(.taec-workspace) :is(main,dialog,#cloudBar) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){background:var(--card)!important;color:var(--foreground)!important;border:1px solid var(--input)!important;border-radius:var(--radius-md)!important;min-height:36px;padding:7px 12px!important;font:14px/1.4 var(--font-sans)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) :is(main,dialog) textarea{min-height:80px}
html:root body:not(.taec-workspace) :is(main,dialog) :is(input,select,textarea)::placeholder{color:var(--muted-foreground)!important;opacity:1}
html:root body:not(.taec-workspace) :is(main,dialog) :is(input,select,textarea):focus{border-color:var(--ring)!important;box-shadow:0 0 0 3px rgba(46,139,214,.22)!important;outline:none!important}
html:root body:not(.taec-workspace) :is(main,dialog) :is(input,select,textarea)[aria-invalid=true]{border-color:var(--destructive)!important;box-shadow:0 0 0 3px rgba(217,45,32,.18)!important}
html:root body:not(.taec-workspace) :is(main,dialog) :is(input,select,textarea):disabled{opacity:.5;cursor:not-allowed}
html:root body:not(.taec-workspace) select option,html:root body:not(.taec-workspace) select optgroup{background:var(--popover);color:var(--foreground)}
html:root body:not(.taec-workspace) :is(input[type=checkbox],input[type=radio],input[type=range],progress){accent-color:var(--primary)!important}

/* ---------- cards (shadcn Card) ---------- */
html:root body:not(.taec-workspace) main :is(.card,.stat,.metric-card,.welcome,.summary,.hub-record,.work-card,.agenda-card,.agenda-day,.client-event-card,.cf-event,.hub-event-card,.calc-result,.sf-panel,.named-cost-panel,.quote,.crm-deal,.crm-stat,.editing-card,.dashboard-list-row,.cash-month,.calc-history-row,.event-details,.contract-review,.status-chart,.daily-row,.hub-quick,.catalog-note,.work-item-editor,.work-delivery,.service-row,.quote-item,.event-cost-row,details,.ns-kpi,.ns-card){background:var(--card)!important;color:var(--card-foreground)!important;border:1px solid var(--border)!important;box-shadow:none!important}
html:root body:not(.taec-workspace) main :is(.card,.stat,.metric-card,.calc-result,.sf-panel,.hub-quick,.ns-kpi,.ns-card,.welcome,.summary){border-radius:var(--radius-lg)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) main :is(.card,.ns-card,.sf-panel,.hub-quick){padding:24px}
html:root body:not(.taec-workspace) main :is(.card,.stat,.metric-card,.ns-kpi,.ns-card,.hub-record,.work-card,.crm-deal,.editing-card,.agenda-card):hover{transform:none!important;box-shadow:var(--shadow-sm)!important;border-color:var(--border)!important}
html:root body:not(.taec-workspace) main :is(.hub-record,.work-card,.crm-deal,.editing-card,.agenda-card):hover{border-color:rgba(46,139,214,.40)!important}
/* linhas dentro de card: sem caixa dentro de caixa */
html:root body:not(.taec-workspace) main :is(.card,.ns-card) :is(.hub-record,.daily-row,.quote,.dashboard-list-row,details){background:transparent!important;box-shadow:none!important}
html:root body:not(.taec-workspace) main :is(.card,.ns-card) :is(.hub-record,.quote,.dashboard-list-row){border-width:0 0 1px!important;border-radius:0!important}
/* tirar as faixas coloridas do topo dos cards */
html:root body:not(.taec-workspace) main :is(.hub-four-status,.daily-counts,.stats,.dashboard-metrics,.finance-metrics,.cf-metrics,.crm-stats,.reportstats,.production-counts)>*{background:var(--card)!important;border:1px solid var(--border)!important;box-shadow:var(--shadow-sm)!important;border-radius:var(--radius-lg)!important}
html:root body:not(.taec-workspace) main :is(.hub-four-status,.daily-counts,.stats,.dashboard-metrics,.finance-metrics,.cf-metrics,.crm-stats,.reportstats,.production-counts)>*::before,html:root body:not(.taec-workspace) main .stat::before,html:root body:not(.taec-workspace) main .metric-card{border-top-width:1px!important}
html:root body:not(.taec-workspace) main :is(.hub-four-status,.daily-counts,.stats,.dashboard-metrics,.finance-metrics,.cf-metrics,.crm-stats,.reportstats,.production-counts)>*::before,html:root body:not(.taec-workspace) main .stat::before{content:none!important}
html:root body:not(.taec-workspace) main .metric-card{border-top-color:var(--border)!important}
html:root body:not(.taec-workspace) main :is(.stat,.metric-card) :is(strong,b,.value),html:root body:not(.taec-workspace) .ns-kpi :is(.ns-count,b),html:root body:not(.taec-workspace) .ns-big{font-family:var(--font-sans)!important;color:var(--foreground)!important;font-weight:600!important;letter-spacing:-.02em!important;font-variant-numeric:tabular-nums}
html:root body:not(.taec-workspace) main :is(.crm-column,.kb-column,.editing-column){background:var(--accent-bg)!important;border:1px solid var(--border)!important;border-radius:var(--radius-lg)!important}
html:root body:not(.taec-workspace) main :is(.crm-column,.kb-column,.editing-column)::before{content:none!important}
html:root body:not(.taec-workspace) main :is(.catalog-note,.work-next,.welcome,.internal-profit,.queue-kanban-info,.work-progress,.work-empty-check,.work-position,.work-note,.agenda-sync-status,.personal-scope,.personal-month,.daily-label,.production-counts>div,.quote-item,.named-cost-panel,.finance-metrics>div,.quote-document-actions,.clause-detail){background:var(--accent-bg)!important;color:var(--foreground)!important;border-color:var(--border)!important}
html:root body:not(.taec-workspace) main :is(.work-priority,.calc-warning,.agenda-conflict,.conflict,.work-empty-check){background:#FFF4DC!important;color:var(--warning)!important;border-color:rgba(180,84,10,.25)!important}

/* capa do Início: azul-marinho, sem animação */
html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading),html:root body:not(.taec-workspace) #main .ns-greet{background:linear-gradient(135deg,var(--navy) 0%,var(--navy-2) 60%,#073B63 100%)!important;border:0!important;border-radius:var(--radius-lg)!important;box-shadow:var(--shadow-sm)!important;padding:28px 32px!important;min-height:0!important;color:#fff!important}
html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading)::before,html:root body:not(.taec-workspace) #main .ns-greet::before{content:none!important}
html:root body:not(.taec-workspace) #main>.heading :is(h1,h2),html:root body:not(.taec-workspace) #main .ns-greet :is(h1,.ns-h1){color:#fff!important;font:600 28px/1.2 var(--font-sans)!important;letter-spacing:-.02em!important}
html:root body:not(.taec-workspace) #main>.heading :is(h1,h2) :is(em,.az-hl),html:root body:not(.taec-workspace) #main .ns-greet :is(h1,.ns-h1) em{background:none!important;color:var(--cyan)!important;-webkit-text-fill-color:var(--cyan)!important;animation:none!important;font-style:normal!important}
html:root body:not(.taec-workspace) #main>.heading :is(.eyebrow,.ns-eyebrow),html:root body:not(.taec-workspace) #main .ns-greet :is(.eyebrow,.ns-eyebrow){color:var(--cyan)!important}
html:root body:not(.taec-workspace) #main>.heading p,html:root body:not(.taec-workspace) #main .ns-greet :is(p,small,span:not(.az-hl)):not(.btn *){color:#B8CCDD!important}
html:root body:not(.taec-workspace) #main .ns-greet :is(b,strong),html:root body:not(.taec-workspace) #main .ns-greet .ns-clock,html:root body:not(.taec-workspace) #main .ns-greet .ns-clock *{color:#fff!important}
html:root body:not(.taec-workspace) #main .ns-greet .ns-clock small{color:#9FC3DD!important}
html:root body:not(.taec-workspace) #main :is(#main>.heading:not(.ns-old-heading),.ns-greet) .btn:not(.primary):not(.lime){background:rgba(255,255,255,.06)!important;color:#fff!important;border-color:rgba(139,234,255,.28)!important}
html:root body:not(.taec-workspace) #main :is(#main>.heading:not(.ns-old-heading),.ns-greet) .btn:not(.primary):not(.lime):hover{background:rgba(139,234,255,.14)!important}
html:root body:not(.taec-workspace) #main :is(#main>.heading:not(.ns-old-heading),.ns-greet) :is(.btn.primary,.btn.lime){background:#fff!important;color:var(--navy-2)!important;border-color:#fff!important}
html:root body:not(.taec-workspace) #main :is(#main>.heading:not(.ns-old-heading),.ns-greet) :is(.btn.primary,.btn.lime):hover:not(:disabled){background:#E4EDF5!important;border-color:#E4EDF5!important;color:var(--navy-2)!important}
/* abertura de câmera da capa: animação original mantida (gira e abre/fecha) */
html:root body:not(.taec-workspace) #main .ns-hero .az-quick{background:var(--card)!important;border:1px solid var(--border)!important;border-radius:var(--radius-lg)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) #main .ns-hero .az-quick::before{content:none!important}
html:root body:not(.taec-workspace) #main section.az-charts{border-top:1px solid var(--border)!important}
html:root body:not(.taec-workspace) .az-charts-head .eyebrow{color:var(--muted-foreground)!important;font:500 12px var(--font-sans)!important;letter-spacing:0!important}
html:root body:not(.taec-workspace) #main .az-alert-stat :is(b,strong){color:var(--destructive)!important}

/* KPIs, barras e ícones do Início */
html:root body:not(.taec-workspace) .ns-bar,html:root body:not(.taec-workspace) .metric-bar-track,html:root body:not(.taec-workspace) .work-progress{background:var(--muted-bg)!important}
html:root body:not(.taec-workspace) .ns-kpi .ns-bar span,html:root body:not(.taec-workspace) .ns-kpi.ns-tone-red .ns-bar span,html:root body:not(.taec-workspace) .ns-kpi.ns-tone-violet .ns-bar span{background:var(--primary)!important}
html:root body:not(.taec-workspace) .ns-kpi.ns-tone-green .ns-bar span{background:var(--success)!important}
html:root body:not(.taec-workspace) .ns-kpi.ns-tone-gold .ns-bar span{background:#E3A23B!important}
html:root body:not(.taec-workspace) .ns-kpi i,html:root body:not(.taec-workspace) .ns-kpi.ns-tone-red i,html:root body:not(.taec-workspace) .ns-kpi i.ns-tone-red,html:root body:not(.taec-workspace) .ns-kpi.ns-tone-violet i,html:root body:not(.taec-workspace) .ns-kpi.ns-tone-gold i{background:var(--muted-bg)!important;color:var(--muted-foreground)!important;border-radius:var(--radius-md)!important}
html:root body:not(.taec-workspace) .ns-alert i.ns-tone-red{color:var(--destructive)!important;background:#FDE3E1!important}
html:root body:not(.taec-workspace) .ns-alert i.ns-tone-gold{color:var(--warning)!important;background:#FFF4DC!important}
html:root body:not(.taec-workspace) .ns-alert i:not(.ns-tone-red):not(.ns-tone-gold){background:var(--muted-bg)!important;color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) .ns-date{background:var(--muted-bg)!important;border-color:var(--border)!important;color:var(--foreground)!important}
html:root body:not(.taec-workspace) .ns-date :is(b,small,span){color:inherit!important;font-family:var(--font-sans)!important}
html:root body:not(.taec-workspace) .ns-date small{color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) :is(.ns-ev,.ns-alert):hover{background:var(--accent-bg)!important}
html:root body:not(.taec-workspace) .ns-donut circle:first-child{stroke:var(--muted-bg)}
html:root body:not(.taec-workspace) .ns-plot svg path[stroke="rgba(255,255,255,.06)"],html:root body:not(.taec-workspace) .ns-plot svg path[stroke="rgba(16,40,61,.07)"]{stroke:rgba(16,40,61,.07)}
html:root body:not(.taec-workspace) .ns-fun .f0{background:#CFE6F7!important}html:root body:not(.taec-workspace) .ns-fun .f1{background:#9FCDEE!important}html:root body:not(.taec-workspace) .ns-fun .f2{background:#5EA9E0!important}html:root body:not(.taec-workspace) .ns-fun .f3{background:#0B5FA5!important}


/* seletor de modo (Fotografia / Social Media) no padrão Tabs */
html:root body:not(.taec-workspace) .ns-modo{background:var(--muted-bg)!important;border:0!important;border-radius:var(--radius-lg)!important;padding:3px!important;box-shadow:none!important;gap:2px}
html:root body:not(.taec-workspace) .ns-modo button{background:transparent!important;color:var(--muted-foreground)!important;border:1px solid transparent!important;border-radius:var(--radius-md)!important;box-shadow:none!important;font:500 13px var(--font-sans)!important}
html:root body:not(.taec-workspace) .ns-modo button:hover{color:var(--foreground)!important}
html:root body:not(.taec-workspace) .ns-modo button.on,html:root body:not(.taec-workspace) .ns-modo button[aria-pressed=true]{background:var(--card)!important;color:var(--foreground)!important;border-color:var(--input)!important;box-shadow:var(--shadow-sm)!important}
/* caixinhas de data da linha do tempo das famílias */
html:root body:not(.taec-workspace) .ns-familia-date{background:var(--muted-bg)!important;border:1px solid var(--border)!important;color:var(--foreground)!important}
html:root body:not(.taec-workspace) .ns-familia-date :is(b,strong,span){color:inherit!important}
html:root body:not(.taec-workspace) .ns-familia-date small{color:var(--muted-foreground)!important}

/* ---------- Badge ---------- */
html:root body:not(.taec-workspace) :is(.pill,.hub-badge,.ns-tag,.ns-chip),html:root body:not(.taec-workspace) main span.event{display:inline-flex;align-items:center;gap:4px;background:var(--secondary)!important;color:var(--secondary-foreground)!important;border:1px solid transparent!important;border-radius:var(--radius-md)!important;padding:2px 8px!important;font:500 12px/1.4 var(--font-sans)!important}
html:root body:not(.taec-workspace) main :is(.pill,.hub-badge):is(.late,.overdue,.danger,.red,.error),html:root body:not(.taec-workspace) .ns-chip.down{background:#FDE3E1!important;color:var(--destructive)!important;border-color:rgba(217,45,32,.18)!important}
html:root body:not(.taec-workspace) main :is(.pill,.hub-badge):is(.warn,.warning,.pending,.soon,.amber){background:#FFF4DC!important;color:var(--warning)!important;border-color:rgba(180,84,10,.20)!important}
html:root body:not(.taec-workspace) main :is(.pill,.hub-badge):is(.ok,.paid,.done,.success,.green,.approved),html:root body:not(.taec-workspace) .ns-chip.up{background:#E1F5EC!important;color:var(--success)!important;border-color:rgba(31,122,85,.20)!important}
html:root body:not(.taec-workspace) main :is(.pill,.hub-badge).sent{background:rgba(46,139,214,.12)!important;color:var(--info)!important;border-color:rgba(46,139,214,.25)!important}
html:root body:not(.taec-workspace) main :is(.late,.overdue,.is-late,.error,[data-tone=danger]):not(.pill):not(.hub-badge){color:var(--destructive)!important}

/* ---------- abas ---------- */
html:root body:not(.taec-workspace) main .hub-tabs{background:var(--muted-bg)!important;border:0!important;border-radius:var(--radius-lg)!important;padding:3px!important;box-shadow:none!important}
html:root body:not(.taec-workspace) main .hub-tabs button{border-radius:var(--radius-md)!important;color:var(--muted-foreground)!important;background:transparent!important;border:1px solid transparent!important;font:500 14px var(--font-sans)!important}
html:root body:not(.taec-workspace) main .hub-tabs button:hover{color:var(--foreground)!important;background:transparent!important}
html:root body:not(.taec-workspace) main .hub-tabs :is(button[aria-current=page],button.active){background:var(--card)!important;color:var(--foreground)!important;border-color:var(--input)!important;box-shadow:var(--shadow-sm)!important}

/* ---------- tabelas ---------- */
html:root body:not(.taec-workspace) main table{color:var(--foreground)!important;font-size:14px}
html:root body:not(.taec-workspace) main th{background:transparent!important;color:var(--muted-foreground)!important;font:500 13px var(--font-sans)!important;border-color:var(--border)!important}
html:root body:not(.taec-workspace) main td{border-color:var(--border)!important}
html:root body:not(.taec-workspace) main :is(tbody tr,tr):hover td{background:var(--accent-bg)!important}
html:root body:not(.taec-workspace) .tablewrap{border-color:var(--border)!important;border-radius:var(--radius-lg)!important}

/* ---------- dialog e toast (aparência; comportamento novo é a etapa 3) ---------- */
html:root body:not(.taec-workspace) dialog{background:var(--card)!important;color:var(--foreground)!important;border:1px solid var(--border)!important;border-radius:var(--radius-lg)!important;box-shadow:0 24px 60px -20px rgba(7,31,53,.45)!important;animation:none!important}
html:root body:not(.taec-workspace) dialog::backdrop{background:rgba(7,31,53,.45)!important;backdrop-filter:none!important}
html:root body:not(.taec-workspace) dialog :is(.catalog-note,.named-cost-panel,.work-check-preset,.sumline){background:var(--accent-bg)!important;color:var(--foreground)!important;border-color:var(--border)!important}
html:root body:not(.taec-workspace) .work-dialog-actions{background:var(--card)!important;border-color:var(--border)!important}
html:root body:not(.taec-workspace) .toast{background:var(--navy-2)!important;color:#fff!important;border:1px solid rgba(139,234,255,.2)!important;border-radius:var(--radius-md)!important;box-shadow:0 12px 30px -10px rgba(7,31,53,.55)!important;font:500 14px var(--font-sans)!important}

/* ---------- login ---------- */
html:root body:not(.taec-workspace) #cloudGate:not([hidden]){background:linear-gradient(135deg,var(--navy),var(--navy-2) 55%,#073B63)!important;animation:none!important;color:var(--foreground)!important}
html:root body:not(.taec-workspace) #cloudGate::before,html:root body:not(.taec-workspace) #cloudGate .cloud-panel::before{content:none!important}
html:root body:not(.taec-workspace) #cloudGate .cloud-panel{background:var(--card)!important;border:1px solid var(--border)!important;border-radius:var(--radius-lg)!important;box-shadow:var(--shadow-sm)!important;padding:32px!important}
html:root body:not(.taec-workspace) #cloudGate .cloud-panel>img{content:url('logo-claro.png')!important;filter:none!important;opacity:1!important;width:170px!important;margin-bottom:24px!important}
html:root body:not(.taec-workspace) #cloudGate h1{font:600 24px/1.25 var(--font-sans)!important;letter-spacing:-.01em!important;color:var(--foreground)!important}
html:root body:not(.taec-workspace) #cloudGate :is(#cloudMessage,.hint,p){color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) #cloudGate label{color:var(--foreground)!important;font:500 13px var(--font-sans)!important}
html:root body:not(.taec-workspace) #cloudGate input{height:36px!important;background:var(--card)!important;color:var(--foreground)!important;border:1px solid var(--input)!important;border-radius:var(--radius-md)!important;font-size:14px!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) #cloudGate input:focus{border-color:var(--ring)!important;box-shadow:0 0 0 3px rgba(46,139,214,.22)!important}
html:root body:not(.taec-workspace) #cloudGate .btn{min-height:36px!important;border-radius:var(--radius-md)!important;font:500 14px var(--font-sans)!important;background:transparent!important;color:var(--foreground)!important;border:1px solid var(--input)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) #cloudGate .btn:hover:not(:disabled){background:var(--accent-bg)!important}
html:root body:not(.taec-workspace) #cloudGate .btn.primary{background:var(--primary)!important;color:var(--primary-foreground)!important;border-color:var(--primary)!important}
html:root body:not(.taec-workspace) #cloudGate .btn.primary:hover:not(:disabled){background:var(--primary-hover)!important}
html:root body:not(.taec-workspace) #cloudGate #passwordForgot{color:var(--muted-foreground)!important;border:0!important;background:transparent!important;box-shadow:none!important}
html:root body:not(.taec-workspace) #cloudGate #passwordForgot:hover{color:var(--foreground)!important}
html:root body:not(.taec-workspace) #cloudGate :is(#cloudLogin,#cloudReload,#cloudExport,#cloudUseRemote){background:transparent!important;color:var(--foreground)!important;border:1px solid var(--input)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) #cloudGate :is(#cloudLogin,#cloudReload,#cloudExport,#cloudUseRemote):hover:not(:disabled){background:var(--accent-bg)!important}
html:root body:not(.taec-workspace) #cloudGate #passwordLoginForm>button[type=submit]{background:var(--primary)!important;color:var(--primary-foreground)!important;border-color:var(--primary)!important}
html:root body:not(.taec-workspace) #cloudGate .cloud-panel>.actions{border-color:var(--border)!important}

/* ---------- celular ---------- */
@media(max-width:720px){
  html:root body:not(.taec-workspace) main :is(.card,.ns-card,.sf-panel,.hub-quick){padding:16px}
  html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading),html:root body:not(.taec-workspace) #main .ns-greet{padding:16px!important}
  html:root body:not(.taec-workspace) #main .ns-greet :is(h1,.ns-h1){font-size:22px!important}
}
@media (prefers-reduced-motion:reduce){html:root body:not(.taec-workspace) *{transition:none!important}}
@media print{html body{background:#fff!important;color:#000!important}}
html:root body:not(.taec-workspace) :is(dialog,#passwordSetupDialog) :is(p,.hint,small){color:var(--muted-foreground)!important}
html:root body:not(.taec-workspace) .ns-modo button{-webkit-text-fill-color:currentColor!important}

/* =====================================================================
   ETAPAS 2 a 7 — componentes (usados pelo ui-shadcn.js)
   ===================================================================== */
html:root body:not(.taec-workspace) .ns-i{width:16px;height:16px;flex:none;vertical-align:-3px}

/* ---------- Tooltip ---------- */
.ns-tooltip{position:fixed;z-index:10060;pointer-events:none;background:var(--navy-2);color:#fff;font:500 12px/1.2 var(--font-sans);padding:6px 8px;border-radius:var(--radius-sm);box-shadow:0 4px 12px rgba(7,31,53,.25);white-space:nowrap;animation:nsFade .12s ease-out}
.ns-tooltip[hidden]{display:none}

/* ---------- Sidebar ---------- */
html:root body:not(.taec-workspace) aside{transition:width var(--ease),padding var(--ease)!important}
html:root body:not(.taec-workspace) .ns-collapse{position:absolute;top:22px;right:12px;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:var(--radius-md);background:transparent;color:#9FC3DD;cursor:pointer;z-index:2}
html:root body:not(.taec-workspace) .ns-collapse:hover{background:rgba(139,234,255,.08);color:#fff}
html:root body:not(.taec-workspace) aside .ns-user{display:flex;align-items:center;gap:10px;margin-top:16px;padding:12px 8px 4px;border-top:1px solid rgba(139,234,255,.12);flex-shrink:0}
html:root body:not(.taec-workspace) aside .ns-avatar{width:32px;height:32px;flex:none;border-radius:50%;display:grid;place-items:center;background:var(--cyan);color:var(--navy)!important;font:700 13px var(--font-sans)}
html:root body:not(.taec-workspace) aside .ns-user-txt{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.3}
html:root body:not(.taec-workspace) aside .ns-user-txt b{color:#fff!important;font:600 13px var(--font-sans)}
html:root body:not(.taec-workspace) aside .ns-user-txt small{color:#9FC3DD!important;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html:root body:not(.taec-workspace) aside .ns-user-out{width:32px;height:32px;display:inline-grid;place-items:center;border:0;border-radius:var(--radius-md);background:transparent;color:#9FC3DD;cursor:pointer}
html:root body:not(.taec-workspace) aside .ns-user-out:hover{background:rgba(139,234,255,.08);color:#fff}
@media(min-width:721px){
  html:root body:not(.taec-workspace) aside .brand-logo{max-width:150px!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) aside{width:72px!important;padding:16px 12px!important;overflow:visible!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) aside .brand-logo,html.ns-sb-collapsed:root body:not(.taec-workspace) aside .aside-note,html.ns-sb-collapsed:root body:not(.taec-workspace) aside .nav-label,html.ns-sb-collapsed:root body:not(.taec-workspace) aside .nav-group-label,html.ns-sb-collapsed:root body:not(.taec-workspace) aside .ns-user-txt,html.ns-sb-collapsed:root body:not(.taec-workspace) aside .taec-sidebar-brand{display:none!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) .ns-collapse{position:static;margin:4px auto 18px;display:flex}
  html.ns-sb-collapsed:root body:not(.taec-workspace) aside #workspaceMainNav{overflow:visible!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav{justify-content:center!important;padding:10px!important;width:48px!important;min-height:44px;margin:0 auto!important;gap:0!important;font-size:0!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) aside #workspaceMainNav .hub-nav .hub-nav-icon{margin:0!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) aside .ns-user{flex-direction:column;padding:12px 0 0;gap:8px}
  html.ns-sb-collapsed:root body:not(.taec-workspace) main,html.ns-sb-collapsed:root body:not(.taec-workspace) main#main{margin-left:72px!important}
  html.ns-sb-collapsed:root body:not(.taec-workspace) #cloudBar{margin-left:72px!important}
  html:root body:not(.taec-workspace) main,html:root body:not(.taec-workspace) #cloudBar{transition:margin-left var(--ease)}
}

/* celular: barra de cima + menu por cima (sheet) */
@media(max-width:720px){
  html:root body:not(.taec-workspace) .ns-collapse,html:root body:not(.taec-workspace) aside .ns-user{display:none!important}
  html:root body:not(.taec-workspace) aside{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;filter:none!important}
  html:root body:not(.taec-workspace) aside .hub-menu-toggle{display:inline-flex!important;align-items:center;gap:8px;background:transparent!important;border:1px solid rgba(139,234,255,.25)!important;border-radius:var(--radius-md)!important;color:#fff!important;font:500 13px var(--font-sans)!important;min-height:40px;padding:8px 12px!important}
  html:root body:not(.taec-workspace) aside .hub-menu-toggle .ns-tg-txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:34vw}
  html:root body:not(.taec-workspace) aside.hub-menu-expanded nav#workspaceMainNav{position:fixed!important;inset:0 auto 0 0!important;width:min(84vw,300px)!important;max-height:none!important;display:flex!important;flex-direction:column!important;gap:2px!important;padding:24px 12px!important;background:var(--navy)!important;z-index:1001!important;overflow-y:auto!important;box-shadow:12px 0 40px rgba(7,31,53,.45)!important;animation:nsSheet .18s ease-out}
  html:root body:not(.taec-workspace) aside.hub-menu-expanded nav#workspaceMainNav .hub-nav{justify-content:flex-start!important;text-align:left!important;min-height:44px!important}
  html:root body:not(.taec-workspace) .ns-sheet-overlay{position:fixed;inset:0;background:rgba(7,31,53,.5);z-index:1000;animation:nsFade .18s ease-out}
  html.ns-sheet-open{overflow:hidden}
}
@keyframes nsSheet{from{transform:translateX(-100%)}to{transform:none}}
@keyframes nsFade{from{opacity:0}to{opacity:1}}
html:root body:not(.taec-workspace) .ns-sheet-overlay[hidden]{display:none!important}

/* ---------- Sonner (avisos) ---------- */
html.ns-ui:root body:not(.taec-workspace) #toast{position:fixed!important;opacity:0!important;pointer-events:none!important;left:-9999px!important}
.ns-toaster{position:fixed;right:16px;bottom:16px;z-index:10050;display:flex;flex-direction:column;gap:8px;width:min(380px,calc(100vw - 32px));pointer-events:none}
.ns-toast{pointer-events:auto;display:grid;grid-template-columns:20px 1fr 24px;gap:10px;align-items:start;background:var(--card);color:var(--foreground);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 10px 30px -10px rgba(7,31,53,.35);padding:12px 12px 12px 14px;font:500 13px/1.45 var(--font-sans);animation:nsToastIn .18s ease-out}
.ns-toast.ns-out{opacity:0;transform:translateY(6px);transition:opacity .15s,transform .15s}
.ns-toast-icon{display:grid;place-items:center;margin-top:1px}
.ns-toast-icon .ns-i{width:18px;height:18px}
.ns-toast-success .ns-toast-icon{color:var(--success)}.ns-toast-error .ns-toast-icon{color:var(--destructive)}.ns-toast-warning .ns-toast-icon{color:var(--warning)}.ns-toast-info .ns-toast-icon{color:var(--brand-bright)}
.ns-toast-error{border-color:rgba(217,45,32,.3)}
.ns-toast-text{overflow-wrap:anywhere}
.ns-toast-close{width:24px;height:24px;display:grid;place-items:center;border:0;background:transparent;border-radius:var(--radius-sm);color:var(--muted-foreground);cursor:pointer}
.ns-toast-close:hover{background:var(--accent-bg);color:var(--foreground)}
@keyframes nsToastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:720px){.ns-toaster{left:16px;right:16px;bottom:12px;width:auto}}

/* ---------- Dialog de confirmação (substitui confirm()) ---------- */
html:root body:not(.taec-workspace) dialog.ns-alert-dialog{width:min(440px,92vw);padding:24px!important}
html:root body:not(.taec-workspace) dialog.ns-alert-dialog h2{font:600 18px/1.3 var(--font-sans)!important;margin:0 0 8px!important}
html:root body:not(.taec-workspace) dialog.ns-alert-dialog .ns-dlg-msg{margin:0 0 20px!important;font-size:14px!important;line-height:1.55;white-space:normal}
html:root body:not(.taec-workspace) dialog.ns-alert-dialog .ns-dlg-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
html:root body:not(.taec-workspace) dialog.ns-alert-dialog .btn.primary.danger{background:var(--destructive)!important;border-color:var(--destructive)!important;color:#fff!important}
html:root body:not(.taec-workspace) dialog.ns-alert-dialog .btn.primary.danger:hover{background:#B42318!important;border-color:#B42318!important}
@media(max-width:480px){html:root body:not(.taec-workspace) dialog.ns-alert-dialog .ns-dlg-actions{flex-direction:column-reverse}html:root body:not(.taec-workspace) dialog.ns-alert-dialog .ns-dlg-actions .btn{width:100%}}

/* ---------- Carregando: câmera (substitui o skeleton) e erro na tela de entrada ---------- */
html:root body:not(.taec-workspace) #cloudGate .ns-cam{display:none;flex-direction:column;align-items:center;gap:14px;margin:8px 0 18px}
html:root body:not(.taec-workspace) #cloudGate .ns-busy .ns-cam{display:flex}
html:root body:not(.taec-workspace) #cloudGate .ns-busy :is(.actions,#passwordLoginForm,.hint,h1){display:none!important}
html:root body:not(.taec-workspace) #cloudGate .ns-busy #cloudMessage{text-align:center;font-size:12px!important;margin:0!important;opacity:.8}
html:root body:not(.taec-workspace) #cloudGate .ns-busy>img{margin-left:auto!important;margin-right:auto!important}
.ns-cam-svg{width:132px;height:132px;overflow:visible;filter:drop-shadow(0 12px 24px rgba(7,31,53,.35))}
.ns-cam-ticks{fill:none;stroke:#0B5FA5;stroke-width:5;stroke-dasharray:1 2;opacity:.55;transform-origin:60px 60px;animation:nsCamSpin 14s linear infinite}
.ns-cam-ring{fill:none;stroke:#2E8BD6;stroke-width:2.5;stroke-dasharray:18 8;transform-origin:60px 60px;animation:nsCamSpin 6s linear infinite reverse}
.ns-cam-blades{transform-origin:60px 60px;animation:nsCamIris 2.6s cubic-bezier(.6,0,.2,1) infinite}
.ns-cam-blades path{fill:#0B2A45;stroke:#5EC4F5;stroke-width:.8;stroke-linejoin:round;opacity:.92}
.ns-cam-core{fill:#071F35;stroke:#8BEAFF;stroke-width:1.2;transform-origin:60px 60px;animation:nsCamCore 2.6s cubic-bezier(.6,0,.2,1) infinite}
@keyframes nsCamSpin{to{transform:rotate(360deg)}}
@keyframes nsCamIris{0%,100%{transform:rotate(0) scale(1)}45%,55%{transform:rotate(34deg) scale(.62)}}
@keyframes nsCamCore{0%,100%{transform:scale(1)}45%,55%{transform:scale(1.6)}}
.ns-cam-line{margin:0!important;font:600 15px var(--font-sans)!important;color:var(--foreground)!important;letter-spacing:-.01em;min-height:20px;animation:nsFade .4s ease-out}
.ns-cam-bar{width:220px;max-width:100%;height:4px;border-radius:99px;background:var(--muted-bg);overflow:hidden;position:relative}
.ns-cam-bar span{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#2E8BD6,#8BEAFF);transition:width .35s ease}
.ns-cam-indet .ns-cam-bar span{width:35%!important;position:absolute;animation:nsCamBar 1.3s ease-in-out infinite}
@keyframes nsCamBar{0%{left:-35%}100%{left:100%}}
.ns-flash{position:fixed;inset:0;z-index:100000;background:#fff;pointer-events:none;animation:nsFlash .6s ease-out forwards}
@keyframes nsFlash{0%{opacity:.9}100%{opacity:0}}
html:root body:not(.taec-workspace) #cloudGate .ns-error #cloudMessage{color:var(--destructive)!important;background:#FDE3E1;border:1px solid rgba(217,45,32,.25);border-radius:var(--radius-md);padding:10px 12px}
html:root body:not(.taec-workspace) #cloudGate .ns-error #cloudReload{background:var(--primary)!important;color:#fff!important;border-color:var(--primary)!important}
@media (prefers-reduced-motion:reduce){.ns-cam-ticks,.ns-cam-ring,.ns-cam-blades,.ns-cam-core,.ns-cam-indet .ns-cam-bar span{animation:none!important}}

/* ---------- Dropdown Menu ---------- */
html:root body:not(.taec-workspace) .ns-dd{position:relative;display:inline-flex}
html:root body:not(.taec-workspace) .ns-dd-trigger{width:32px;min-width:32px;min-height:32px!important;padding:0!important}
html:root body:not(.taec-workspace) .ns-dd-menu{position:absolute;right:0;top:calc(100% + 4px);z-index:60;min-width:208px;background:var(--popover);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:0 10px 30px -10px rgba(7,31,53,.35);padding:4px;display:flex;flex-direction:column;animation:nsToastIn .12s ease-out}
html:root body:not(.taec-workspace) .ns-dd-menu.ns-up{top:auto;bottom:calc(100% + 4px)}
html:root body:not(.taec-workspace) .ns-dd-menu[hidden]{display:none!important}
html:root body:not(.taec-workspace) .ns-dd-menu .ns-dd-item{display:flex!important;align-items:center;justify-content:flex-start!important;gap:8px;width:100%;min-height:32px!important;padding:6px 8px!important;border:0!important;border-radius:var(--radius-sm)!important;background:transparent!important;box-shadow:none!important;color:var(--foreground)!important;font:400 14px var(--font-sans)!important;text-align:left;margin:0!important}
html:root body:not(.taec-workspace) .ns-dd-menu .ns-dd-item .ns-i{color:var(--muted-foreground)}
html:root body:not(.taec-workspace) .ns-dd-menu .ns-dd-item:is(:hover,:focus-visible){background:var(--accent-bg)!important;outline:none!important}
html:root body:not(.taec-workspace) .ns-dd-menu .ns-dd-item.ns-dd-danger,html:root body:not(.taec-workspace) .ns-dd-menu .ns-dd-item.ns-dd-danger .ns-i{color:var(--destructive)!important}
html:root body:not(.taec-workspace) .ns-dd-menu .ns-dd-item.ns-dd-danger:is(:hover,:focus-visible){background:#FDE3E1!important}
html:root body:not(.taec-workspace) .ns-dd-sep{height:1px;background:var(--border);margin:4px -4px}

/* ---------- Orçamentos (CRM) ---------- */
html:root body:not(.taec-workspace) main .crm-columns{gap:16px!important}
html:root body:not(.taec-workspace) main .crm-column{overflow:visible!important;border-top-width:1px!important;border-top-color:var(--border)!important;padding:16px!important}
html:root body:not(.taec-workspace) main .crm-column>:is(h2,h3){display:flex!important;align-items:center;gap:8px;font:600 14px var(--font-sans)!important;letter-spacing:0!important}
html:root body:not(.taec-workspace) main .crm-column>:is(h2,h3)::before{content:"";width:8px;height:8px;border-radius:50%;background:#94A3B8;flex:none}
html:root body:not(.taec-workspace) main .crm-column[data-ns-stage^="Envi"]>:is(h2,h3)::before{background:var(--brand-bright)}
html:root body:not(.taec-workspace) main .crm-column[data-ns-stage^="Aprov"]>:is(h2,h3)::before{background:var(--success)}
html:root body:not(.taec-workspace) main .crm-column:is([data-ns-stage^="Não"],[data-ns-stage^="Recus"],[data-ns-stage^="Perd"])>:is(h2,h3)::before{background:var(--destructive)}
html:root body:not(.taec-workspace) main .crm-column>:is(h2,h3) span{margin-left:auto;background:var(--secondary);color:var(--secondary-foreground)!important;border-radius:999px;padding:1px 8px;font:500 12px var(--font-sans)!important}
html:root body:not(.taec-workspace) main .crm-deal{overflow:visible!important;padding:16px!important;border-radius:var(--radius-lg)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) main .crm-deal select{min-height:32px!important;font-size:13px!important;padding:4px 10px!important;width:auto!important}
html:root body:not(.taec-workspace) main .crm-deal .ns-empty-row{display:none!important}
html:root body:not(.taec-workspace) main .crm-deal :is(.deal-value,strong){font-variant-numeric:tabular-nums}
html:root body:not(.taec-workspace) main :is(.crm-empty,.crm-column>p,.crm-column .hint:only-of-type){border:1px dashed var(--input);border-radius:var(--radius-md);padding:20px 12px!important;text-align:center;color:var(--muted-foreground)!important;background:transparent!important;font-size:13px!important}
html:root body:not(.taec-workspace) main .crm-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
html:root body:not(.taec-workspace) main #crmSearch{padding-left:34px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2352677A' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:10px center!important;min-width:240px}
@media(max-width:720px){
  html:root body:not(.taec-workspace) main .crm-columns{display:flex!important;align-items:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px;grid-template-columns:none!important}
  html:root body:not(.taec-workspace) main .crm-column{flex:0 0 86%;scroll-snap-align:start}
  html:root body:not(.taec-workspace) main #crmSearch{min-width:0;width:100%!important}
}

/* ---------- estados vazios ---------- */
html:root body:not(.taec-workspace) main :is(.empty,.metric-empty){border:1px dashed var(--input)!important;border-radius:var(--radius-lg)!important;background:transparent!important;padding:40px 20px!important}
html:root body:not(.taec-workspace) main .empty .icon{color:var(--muted-foreground)!important}

/* ---------- tabelas: no celular viram cartões ---------- */
@media(max-width:720px){
  html:root body:not(.taec-workspace) main table.ns-rt,html:root body:not(.taec-workspace) main table.ns-rt tbody{display:block;width:100%}
  html:root body:not(.taec-workspace) main table.ns-rt thead,html:root body:not(.taec-workspace) main table.ns-rt tr:has(>th){display:none!important}
  html:root body:not(.taec-workspace) main table.ns-rt tr{display:block;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--card);padding:8px 12px;margin-bottom:8px}
  html:root body:not(.taec-workspace) main table.ns-rt td{display:flex;justify-content:space-between;gap:12px;align-items:baseline;border:0!important;padding:6px 0!important;text-align:right;white-space:normal}
  html:root body:not(.taec-workspace) main table.ns-rt td[data-label]::before{content:attr(data-label);color:var(--muted-foreground);font-size:12px;font-weight:500;text-align:left;flex:none;max-width:45%}
  html:root body:not(.taec-workspace) main table.ns-rt td:not([data-label]),html:root body:not(.taec-workspace) main table.ns-rt td[data-label=""]{justify-content:flex-end}
  html:root body:not(.taec-workspace) main .tablewrap{border:0!important;overflow:visible!important}
}

/* ---------- Catálogo e pacotes / Meu negócio ---------- */
html:root body:not(.taec-workspace) main .catalog-note{border-radius:var(--radius-md)!important;font-size:13px!important}
html:root body:not(.taec-workspace) main table td:is(.price,.money){font-variant-numeric:tabular-nums}
html:root body:not(.taec-workspace) main form :is(.grid,.form-grid){gap:16px!important}
html:root body:not(.taec-workspace) main .card>:is(h2,h3):first-child{margin-bottom:4px!important}
html:root body:not(.taec-workspace) main .card>:is(h2,h3):first-child+p{margin-bottom:16px!important}

/* títulos com botão dentro de cards (não são a capa): botões normais */
html:root body:not(.taec-workspace) #main :not(#main)>.heading:not(.ns-old-heading) :is(.btn.primary,.btn.lime){background:var(--primary)!important;color:var(--primary-foreground)!important;border-color:var(--primary)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) #main :not(#main)>.heading:not(.ns-old-heading) .btn:not(.primary):not(.lime){background:transparent!important;color:var(--foreground)!important;border-color:var(--input)!important;box-shadow:var(--shadow-sm)!important}
@media(max-width:720px){html:root body:not(.taec-workspace) main#main{overflow-x:clip}html:root body:not(.taec-workspace) main table.ns-rt td[colspan]{justify-content:flex-start;text-align:left}}
/* seletor "Por cliente / Por evento" e legenda da agenda */
html:root body:not(.taec-workspace) main .ns-view-switch{background:var(--muted-bg)!important;border:0!important;border-radius:var(--radius-lg)!important;padding:3px!important;gap:2px}
html:root body:not(.taec-workspace) main .ns-view-switch button{background:transparent!important;color:var(--muted-foreground)!important;border:1px solid transparent!important;border-radius:var(--radius-md)!important;box-shadow:none!important;font:500 13px var(--font-sans)!important}
html:root body:not(.taec-workspace) main .ns-view-switch button[aria-selected=true]{background:var(--card)!important;color:var(--foreground)!important;border-color:var(--input)!important;box-shadow:var(--shadow-sm)!important}
html:root body:not(.taec-workspace) main .agenda-legend span.deadline{background:#FFF4DC!important;color:var(--warning)!important}

/* ---------- Capa: visor de câmera (cantos de enquadramento + REC) ---------- */
html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading),html:root body:not(.taec-workspace) #main .ns-greet{min-height:200px!important;padding:36px 40px 32px!important}
html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading) :is(h1,h2),html:root body:not(.taec-workspace) #main .ns-greet :is(h1,.ns-h1){font-size:32px!important;letter-spacing:-.025em!important}
/* cantos de enquadramento que "respiram" */
html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading)::before,html:root body:not(.taec-workspace) #main .ns-greet::before{content:""!important;position:absolute;inset:14px;z-index:0!important;pointer-events:none;opacity:.6;mask-image:none!important;-webkit-mask-image:none!important;
  background:
    linear-gradient(var(--cyan),var(--cyan)) top left/20px 1.5px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) top left/1.5px 20px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) top right/20px 1.5px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) top right/1.5px 20px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) bottom left/20px 1.5px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) bottom left/1.5px 20px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) bottom right/20px 1.5px no-repeat,
    linear-gradient(var(--cyan),var(--cyan)) bottom right/1.5px 20px no-repeat!important;
  animation:nsFrame 6s ease-in-out infinite!important}
@keyframes nsFrame{0%,100%{inset:14px;opacity:.6}50%{inset:20px;opacity:.35}}
/* visor: REC piscando + dados da câmera */
html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading)::after,html:root body:not(.taec-workspace) #main .ns-greet::after{content:"REC   ISO 400  ·  1/250  ·  f/2.8"!important;position:absolute;top:26px;right:36px;z-index:0;pointer-events:none;white-space:pre;
  font:500 11px/1 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:.08em;color:rgba(207,224,238,.75);
  padding-left:16px;background:radial-gradient(circle,#FF4D4D 0 3.5px,transparent 4px) left center/8px 8px no-repeat;
  animation:nsRec 1.6s steps(1,end) infinite}
@keyframes nsRec{0%{background-size:8px 8px}50%{background-size:0 0}}
@media(max-width:720px){
  html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading),html:root body:not(.taec-workspace) #main .ns-greet{min-height:0!important;padding:28px 20px 20px!important}
  html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading) :is(h1,h2),html:root body:not(.taec-workspace) #main .ns-greet :is(h1,.ns-h1){font-size:24px!important}
  html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading)::before,html:root body:not(.taec-workspace) #main .ns-greet::before{inset:10px}
  html:root body:not(.taec-workspace) #main>.heading:not(.ns-old-heading)::after,html:root body:not(.taec-workspace) #main .ns-greet::after{content:"REC"!important;top:16px;right:20px}
}
@media (prefers-reduced-motion:reduce){html:root body:not(.taec-workspace) #main>.heading::before,html:root body:not(.taec-workspace) #main .ns-greet::before,html:root body:not(.taec-workspace) #main>.heading::after,html:root body:not(.taec-workspace) #main .ns-greet::after{animation:none!important}}
