/* =========================================================
   Carlos Cruz · Theme System v6.33.1
   Camada exclusivamente visual. Não altera rotas, ações ou regras.
   ========================================================= */
:root{
  --cc-bg:#f7f5f2;
  --cc-surface:#ffffff;
  --cc-surface-2:#fcfaf7;
  --cc-surface-3:#f2eee9;
  --cc-text:#111111;
  --cc-text-soft:#344054;
  --cc-muted:#6b7280;
  --cc-muted-2:#98a2b3;
  --cc-border:#e8e2db;
  --cc-border-strong:#ddd4ca;
  --cc-gold:#d2a575;
  --cc-gold-hover:#be8e5b;
  --cc-gold-soft:#f3e4d2;
  --cc-overlay:rgba(17,17,17,.58);
  --cc-shadow-xs:0 1px 2px rgba(16,24,40,.04);
  --cc-shadow-sm:0 8px 24px rgba(16,24,40,.055);
  --cc-shadow-lg:0 24px 64px rgba(16,24,40,.14);
  --cc-focus:0 0 0 3px rgba(210,165,117,.22);
  --cc-radius-sm:10px;
  --cc-radius-md:14px;
  --cc-radius-lg:20px;
  --cc-topbar:rgba(255,255,255,.94);
}

html[data-theme="dark"]{
  --cc-bg:#0f1115;
  --cc-surface:#171a1f;
  --cc-surface-2:#1c2026;
  --cc-surface-3:#232830;
  --cc-text:#f4f4f5;
  --cc-text-soft:#d1d5db;
  --cc-muted:#a1a1aa;
  --cc-muted-2:#7f8793;
  --cc-border:#2b3139;
  --cc-border-strong:#3a424d;
  --cc-gold:#d7ad82;
  --cc-gold-hover:#e3bd97;
  --cc-gold-soft:#382d24;
  --cc-overlay:rgba(0,0,0,.72);
  --cc-shadow-xs:0 1px 2px rgba(0,0,0,.22);
  --cc-shadow-sm:0 10px 30px rgba(0,0,0,.24);
  --cc-shadow-lg:0 28px 80px rgba(0,0,0,.42);
  --cc-focus:0 0 0 3px rgba(215,173,130,.26);
  --cc-topbar:rgba(23,26,31,.92);

  --bg:var(--cc-bg);
  --surface:var(--cc-surface);
  --surface-2:var(--cc-surface-2);
  --text:var(--cc-text);
  --muted:var(--cc-muted);
  --line:var(--cc-border);
  --primary:var(--cc-gold);
  --primary-dark:var(--cc-gold-hover);

  --brand-ink:var(--cc-text);
  --brand-ink-soft:var(--cc-text-soft);
  --brand-gold:var(--cc-gold);
  --brand-gold-hover:var(--cc-gold-hover);
  --brand-gold-soft:var(--cc-gold-soft);
  --brand-canvas:var(--cc-bg);
  --brand-surface:var(--cc-surface);
  --brand-border:var(--cc-border);
  --brand-muted:var(--cc-muted);

  --finance-gold:var(--cc-gold);
  --finance-gold-soft:var(--cc-gold-soft);
  --finance-ink:var(--cc-text);
  --finance-muted:var(--cc-muted);
  --finance-border:var(--cc-border);
  --finance-bg:var(--cc-bg);

  --sm-bg:var(--cc-bg);
  --sm-panel:var(--cc-surface);
  --sm-text:var(--cc-text);
  --sm-muted:var(--cc-muted);
  --sm-border:var(--cc-border);
  --sm-shadow:var(--cc-shadow-sm);
}

html{background:var(--cc-bg);scrollbar-color:var(--cc-border-strong) transparent}
body{background:var(--cc-bg);color:var(--cc-text);transition:background-color .18s ease,color .18s ease}
::selection{background:rgba(210,165,117,.34);color:var(--cc-text)}

/* Progressive visual normalization */
:where(button,a,input,select,textarea,summary){-webkit-tap-highlight-color:transparent}
:where(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--cc-gold)!important;outline-offset:2px!important;box-shadow:var(--cc-focus)!important}
:where(input,select,textarea){transition:border-color .16s ease,background-color .16s ease,color .16s ease,box-shadow .16s ease}
:where(.btn,.sm-btn,.theme-trigger){transition:transform .16s ease,background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease}
@media (hover:hover){:where(.btn,.sm-btn):not(:disabled):hover{transform:translateY(-1px)}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Theme picker */
.theme-switcher{position:relative;z-index:95;font-family:"Geist",Inter,system-ui,sans-serif;color:var(--cc-text)}
.theme-switcher-inline{flex:0 0 auto}
.theme-switcher-floating{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:13000}
.theme-trigger{height:40px;display:inline-flex;align-items:center;gap:8px;padding:0 11px;border:1px solid var(--cc-border);border-radius:12px;background:var(--cc-surface);color:var(--cc-text-soft);box-shadow:var(--cc-shadow-xs);cursor:pointer;font:650 12px/1 "Geist",Inter,system-ui,sans-serif}
.theme-trigger:hover{background:var(--cc-surface-2);border-color:var(--cc-border-strong)}
.theme-trigger-icon{width:20px;height:20px;display:grid;place-items:center;font-size:16px;color:var(--cc-gold)}
.theme-trigger-chevron{color:var(--cc-muted-2);font-size:15px;transform:translateY(-1px);transition:transform .16s ease}
.theme-switcher.is-open .theme-trigger-chevron{transform:rotate(180deg) translateY(1px)}
.theme-menu{position:absolute;right:0;top:calc(100% + 8px);width:244px;padding:7px;border:1px solid var(--cc-border);border-radius:15px;background:var(--cc-surface);box-shadow:var(--cc-shadow-lg);opacity:0;visibility:hidden;transform:translateY(-4px);transition:.16s ease}
.theme-switcher.is-open .theme-menu{opacity:1;visibility:visible;transform:translateY(0)}
.theme-menu button{width:100%;display:grid;grid-template-columns:28px minmax(0,1fr) 20px;gap:9px;align-items:center;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--cc-text);text-align:left;cursor:pointer}
.theme-menu button:hover{background:var(--cc-surface-2)}
.theme-menu button>span:first-child{width:28px;height:28px;display:grid;place-items:center;border:1px solid var(--cc-border);border-radius:9px;background:var(--cc-surface-2);color:var(--cc-gold);font-size:15px}
.theme-menu strong,.theme-menu small{display:block}.theme-menu strong{font-size:12px}.theme-menu small{margin-top:2px;color:var(--cc-muted);font-size:10px;font-weight:500}.theme-menu i{font-style:normal;color:var(--cc-gold);opacity:0}.theme-menu button.is-active{background:var(--cc-gold-soft)}.theme-menu button.is-active i{opacity:1}
.theme-switcher-floating .theme-trigger{height:44px;box-shadow:var(--cc-shadow-lg)}

/* Admin semantic bridge */
.admin-ui-v2{
  --admin-bg:var(--cc-bg);
  --admin-card:var(--cc-surface);
  --admin-text:var(--cc-text);
  --admin-muted:var(--cc-muted);
  --admin-border:var(--cc-border);
  --admin-primary:var(--cc-gold);
  --admin-primary-hover:var(--cc-gold-hover);
  --admin-shadow:var(--cc-shadow-sm);
}
.admin-ui-v2 .admin-shell,.admin-ui-v2 .main-area{background:var(--cc-bg)}
.admin-ui-v2 .sidebar{background:var(--cc-surface);border-color:var(--cc-border)}
.admin-ui-v2 .admin-topbar{background:var(--cc-topbar);border-color:var(--cc-border);box-shadow:0 1px 0 rgba(127,127,127,.03)}
.admin-ui-v2 .sidebar-account,.admin-ui-v2 .menu-toggle,.admin-ui-v2 .topbar-profile,.admin-ui-v2 .notification-bell,.admin-ui-v2 .btn-secondary{background:var(--cc-surface);border-color:var(--cc-border);color:var(--cc-text-soft)}
.admin-ui-v2 .sidebar-account{background:var(--cc-surface-2)}
.admin-ui-v2 .nav-section-label,.admin-ui-v2 .topbar-breadcrumb,.admin-ui-v2 .topbar-breadcrumb a,.admin-ui-v2 .btn-ghost{color:var(--cc-muted)}
.admin-ui-v2 .nav-item{color:var(--cc-muted)}
.admin-ui-v2 .nav-item:hover,.admin-ui-v2 .btn-secondary:hover,.admin-ui-v2 .btn-ghost:hover,.admin-ui-v2 .notification-bell:hover{background:var(--cc-surface-2);color:var(--cc-text)}
.admin-ui-v2 .nav-item.is-active{background:var(--cc-gold-soft);color:var(--cc-gold)}
.admin-ui-v2 .avatar,.admin-ui-v2 .avatar-sidebar{background:var(--cc-gold-soft);color:var(--cc-gold)}
.admin-ui-v2 .admin-content{width:100%}

/* Generic components used across admin/client */
html[data-theme="dark"] :where(.card,.panel,.metric-card,.table-panel,.client-project-card,.task-card,.client-service-category-card,.service-category-select-card,.workspace-access-item,.client-workspace-public,.client-workspace-public-card,.task-created-choice-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)}
html[data-theme="dark"] :where(.date-chip,.badge-neutral,.kanban-count,.client-project-card,.client-project-strip,.workspace-secret-toggle){background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.kanban-column,.client-kanban-column){background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] :where(.kanban-empty,.empty-state,.muted,td small,.list-row small,.client-user-name){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.list-row,th,td){border-color:var(--cc-border)!important}
html[data-theme="dark"] table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important}
html[data-theme="dark"] table tbody tr:hover{background:rgba(255,255,255,.025)!important}
html[data-theme="dark"] :where(input,select,textarea,.client-secret-wrap){background:var(--cc-surface-2)!important;color:var(--cc-text)!important;border-color:var(--cc-border-strong)!important}
html[data-theme="dark"] :where(input,textarea)::placeholder{color:#737b86!important}
html[data-theme="dark"] option{background:var(--cc-surface);color:var(--cc-text)}
html[data-theme="dark"] hr{border-color:var(--cc-border)}

/* Dashboard / clients */
html[data-theme="dark"] :where(.dashboard-v2 .dashboard-hero,.dashboard-v2 .dashboard-metric-card,.dashboard-v2 .dashboard-card,.dashboard-v2 .quick-create-menu,.client-page-hero,.client-detail-hero,.client-toolbar-card,.client-table-card,.client-detail-tabs,.client-detail-metrics article,.client-info-card,.client-project-card,.client-users-card,.client-activity-card,.client-danger-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] :where(.dashboard-v2 .dashboard-hero,.client-page-hero,.client-detail-hero){background:linear-gradient(135deg,var(--cc-surface) 0%,var(--cc-surface-2) 100%)!important}
html[data-theme="dark"] :where(.dashboard-v2 .dashboard-table th,.client-data-table th){background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] :where(.dashboard-v2 .client-project-cell strong,.dashboard-v2 .due-date,.client-contact-cell strong,.client-count-pill){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.client-search-control input,.client-select-control select,.client-action-menu summary,.client-action-popover){background:var(--cc-surface-2)!important;color:var(--cc-text)!important;border-color:var(--cc-border)!important}

/* Client shell */
.client-topbar{background:var(--cc-topbar)!important;border-color:var(--cc-border)!important}
.client-dashboard{background:var(--cc-bg)}
html[data-theme="dark"] .client-brand-wrap strong{color:var(--cc-text)!important}
html[data-theme="dark"] :where(.client-project-card,.client-finance-summary>div,.client-finance-row,.notification-row){background:var(--cc-surface)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .notification-row.is-unread{background:#211d19!important}
html[data-theme="dark"] .client-modal-dialog{background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .client-modal-close{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}

/* Finance */
html[data-theme="dark"] :where(.finance-metric,.finance-card,.finance-plan-card,.finance-reminder-card,.finance-modal-dialog,.finance-subnav,.finance-filter-presets a,.finance-project-plan,.payment-return-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] :where(.finance-page input,.finance-page select,.finance-page textarea,.finance-inline-create input,.finance-inline-create select){background:var(--cc-surface-2)!important;color:var(--cc-text)!important;border-color:var(--cc-border-strong)!important}
html[data-theme="dark"] :where(.finance-card p,.finance-metric span,.finance-metric small,.finance-page .muted){color:var(--cc-muted)!important}
html[data-theme="dark"] .payment-return-body{background:var(--cc-bg)!important;color:var(--cc-text)!important}

/* E-commerce BI */
html[data-theme="dark"] :where(.ebi-hero,.ebi-controlbar,.ebi-card,.ebi-ai-priority,.ebi-goal-history article,.ebi-column-filter-row th,.ebi-pricing-settings fieldset){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .ebi-hero{background:linear-gradient(135deg,var(--cc-surface),var(--cc-surface-2))!important}
html[data-theme="dark"] :where(.ebi-controlbar input,.ebi-controlbar select,.ebi-import-form input,.ebi-import-form select,.ebi-goal-form input,.ebi-bling-actions select,.ebi-search input,.ebi-column-filter-row input,.ebi-column-filter-row select,.ebi-manual-grid input,.ebi-manual-grid select,.ebi-marketplace-price-form select,.ebi-marketplace-price-form input[type=file],.ebi-smart-goal-form input,.ebi-projection-form select){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.ebi-hero p,.ebi-card-head p,.ebi-controlbar label span,.ebi-import-form label span,.ebi-goal-form label span){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.ebi-workspace-nav button.is-active,.ebi-pricing-subnav button.is-active){background:var(--cc-surface)!important;color:var(--cc-text)!important}

/* Paid traffic / Google Ads */
html[data-theme="dark"] :where(.gads-hero,.gads-setup-card,.gads-panel,.gads-csv-form,.traffic-filter-panel,.traffic-keyword-panel){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] .gads-hero{background:linear-gradient(135deg,var(--cc-surface),var(--cc-surface-2))!important}
html[data-theme="dark"] :where(.gads-csv-form input,.gads-csv-form select,.traffic-api-period-filter input,.traffic-api-period-filter select,.gads-visible-create .gads-check-row){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.gads-hero p,.gads-status-list span,.traffic-platform-filter>span){color:var(--cc-muted)!important}

/* Social media */
html[data-theme="dark"] .sm-body{background:var(--cc-bg)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.sm-panel,.sm-card,.sm-usage-card,.sm-calendar,.sm-modal-card,.client-social-entry){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] :where(.sm-btn-secondary,.sm-icon-btn,.sm-segment button,.sm-filters input,.sm-filters select,.sm-modal-card input,.sm-modal-card select,.sm-modal-card textarea){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.sm-subtitle,.sm-muted){color:var(--cc-muted)!important}

/* Planner / assistant / meetings */
html[data-theme="dark"] :where(.aip-hero,.aip-card,.aip-result-card,.aia-card,.aia-panel,.meetings-toolbar-card,.agenda-shell,.agenda-mini-card,.agenda-event-popover){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] .aip-hero{background:linear-gradient(135deg,var(--cc-surface),var(--cc-surface-2))!important}
html[data-theme="dark"] :where(.aip-hero h1,.aip-card h2,.aip-result-head h2,.imgtool-card-head h2,.imgtool-results h2){color:var(--cc-text)!important}
html[data-theme="dark"] :where(.aip-hero p,.aip-card p,.aip-result-head p,.meetings-title-wrap p){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.aip-field input,.aip-field select,.aip-field textarea,.aia-page input,.aia-page select,.aia-page textarea){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.agenda-mini-head,.agenda-upcoming-item,.agenda-toolbar){border-color:var(--cc-border)!important}
html[data-theme="dark"] .agenda-upcoming-item:hover{background:var(--cc-surface-2)!important}

/* Meeting AI */
html[data-theme="dark"] .mai-page{--mai-ink:var(--cc-text);--mai-muted:var(--cc-muted);--mai-line:var(--cc-border);--mai-bg:var(--cc-bg);--mai-gold:var(--cc-gold)}
html[data-theme="dark"] :where(.mai-hero,.mai-detail-head,.mai-toolbar,.mai-panel,.mai-content,.mai-empty,.mai-card,.mai-stat,.mai-modal-dialog){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] :where(.mai-page input,.mai-page select,.mai-page textarea){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}

/* My tasks */
html[data-theme="dark"] :where(.mytasks-toolbar,.mytasks-card,.mytasks-list-card,.mytasks-agenda,.mytasks-calendar,.mytasks-quick-edit,.mytasks-filter-panel){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.mytasks-page input,.mytasks-page select,.mytasks-page textarea){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}

/* Image compressor / tracking */
html[data-theme="dark"] :where(.imgtool-hero,.imgtool-card,.imgtool-results,.trk-card,.trk-kpi){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
html[data-theme="dark"] .imgtool-hero{background:linear-gradient(135deg,var(--cc-surface),var(--cc-surface-2))!important}
html[data-theme="dark"] :where(.imgtool-drop,.trk-form-grid input,.trk-form-grid select,.trk-form-grid textarea,.trk-toolbar select,.trk-toolbar input){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.imgtool-hero h1,.trk-card h2,.trk-kpi strong){color:var(--cc-text)!important}
html[data-theme="dark"] :where(.imgtool-hero p,.imgtool-card-head p,.trk-hero p,.trk-card p,.trk-toolbar label,.trk-kpi span){color:var(--cc-muted)!important}

/* Proposals */
html[data-theme="dark"] :where(.proposal-admin-hero,.proposal-detail-hero,.proposal-stat-grid article,.proposal-panel,.proposal-form-card,.proposal-category-admin,.proposal-module-tabs a,.proposal-public-card,.proposal-public-section){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.proposal-admin-hero,.proposal-detail-hero){background:linear-gradient(135deg,var(--cc-surface),var(--cc-surface-2))!important}
html[data-theme="dark"] .proposal-public-body{background:var(--cc-bg)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.proposal-form-page input,.proposal-form-page select,.proposal-form-page textarea,.proposal-category-settings select,.proposal-service-category-form select){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.proposal-admin-hero p,.proposal-form-top p,.proposal-detail-hero p,.proposal-panel-head p,.proposal-form-head p){color:var(--cc-muted)!important}

/* Morning brief */
html[data-theme="dark"] :where(.morning-brief-dialog,.morning-brief-head,.morning-task-card,.morning-brief-foot){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .morning-brief-head{background:linear-gradient(135deg,var(--cc-surface),var(--cc-surface-2))!important}
html[data-theme="dark"] :where(.morning-brief-stat,.morning-brief-close){background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.morning-brief-head p,.morning-brief-stat small,.morning-brief-list-title span,.morning-brief-foot p){color:var(--cc-muted)!important}

/* Auth, setup and error screens */
.auth-form-zone{background:var(--cc-bg)!important}
.auth-card{background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-lg)!important}
.auth-card-footer{border-color:var(--cc-border)!important}
html[data-theme="dark"] .auth-page{background:#0b0c0f!important}
html[data-theme="dark"] .field label{color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.alert-success,.alert-danger){filter:saturate(.8) brightness(.86)}

/* Dark-mode text repair for legacy hardcoded colors */
html[data-theme="dark"] :where(h1,h2,h3,h4,h5,h6,strong,.brand-copy strong,.client-identity-copy strong,.client-detail-title-line h1,.client-section-head h2){color:var(--cc-text)}
html[data-theme="dark"] :where(p,small,label,.client-identity-copy small,.client-contact-cell small){border-color:var(--cc-border)}

/* Scrollbars */
*{scrollbar-width:thin;scrollbar-color:var(--cc-border-strong) transparent}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{background:var(--cc-border-strong);border:3px solid transparent;border-radius:999px;background-clip:padding-box}

/* Compact responsive behavior for theme picker */
@media(max-width:1180px){.admin-topbar .theme-trigger-label{display:none}.admin-topbar .theme-trigger{width:40px;padding:0;justify-content:center}.admin-topbar .theme-trigger-chevron{display:none}}
@media(max-width:720px){.client-topbar .theme-trigger-label{display:none}.client-topbar .theme-trigger{width:40px;padding:0;justify-content:center}.client-topbar .theme-trigger-chevron{display:none}.theme-menu{position:fixed;top:auto;right:12px;bottom:12px;width:min(280px,calc(100vw - 24px))}.theme-switcher-floating{right:12px;bottom:12px}}

/* =========================================================
   Carlos Cruz · Modern UI v6.32.0
   Refinamento visual inspirado em padrões SaaS modernos.
   Camada exclusivamente visual: sem alterações funcionais.
   ========================================================= */
:root{
  --cc-bg:#f6f7f9;
  --cc-surface:#ffffff;
  --cc-surface-2:#fafbfc;
  --cc-surface-3:#f1f3f5;
  --cc-surface-raised:#ffffff;
  --cc-text:#111318;
  --cc-text-soft:#3f4752;
  --cc-muted:#6c7582;
  --cc-muted-2:#8d96a3;
  --cc-border:#e3e7ec;
  --cc-border-strong:#d5dae1;
  --cc-gold:#d2a575;
  --cc-gold-hover:#c18f5c;
  --cc-gold-soft:#f7eee4;
  --cc-accent-text:#9f642c;
  --cc-success:#16845b;
  --cc-success-soft:#e9f7f0;
  --cc-warning:#a96516;
  --cc-warning-soft:#fff5e6;
  --cc-danger:#c73b45;
  --cc-danger-soft:#fff0f1;
  --cc-info:#3972b8;
  --cc-info-soft:#edf4fd;
  --cc-overlay:rgba(13,17,23,.56);
  --cc-shadow-xs:0 1px 2px rgba(15,23,42,.035);
  --cc-shadow-sm:0 1px 2px rgba(15,23,42,.035),0 8px 28px rgba(15,23,42,.045);
  --cc-shadow-md:0 12px 34px rgba(15,23,42,.08);
  --cc-shadow-lg:0 24px 70px rgba(15,23,42,.16);
  --cc-focus:0 0 0 3px rgba(159,100,44,.16);
  --cc-radius-xs:8px;
  --cc-radius-sm:10px;
  --cc-radius-md:14px;
  --cc-radius-lg:18px;
  --cc-topbar:rgba(255,255,255,.88);
}

html[data-theme="dark"]{
  --cc-bg:#0b0d10;
  --cc-surface:#111419;
  --cc-surface-2:#171b21;
  --cc-surface-3:#1d232b;
  --cc-surface-raised:#15191f;
  --cc-text:#f5f7fa;
  --cc-text-soft:#d5dbe3;
  --cc-muted:#a8b0bc;
  --cc-muted-2:#7f8997;
  --cc-border:#272d36;
  --cc-border-strong:#363e49;
  --cc-gold:#e1b783;
  --cc-gold-hover:#edc796;
  --cc-gold-soft:rgba(225,183,131,.13);
  --cc-accent-text:#e8bd88;
  --cc-success:#63d5a5;
  --cc-success-soft:rgba(49,174,124,.14);
  --cc-warning:#f3ba67;
  --cc-warning-soft:rgba(224,150,51,.14);
  --cc-danger:#ff858d;
  --cc-danger-soft:rgba(226,76,88,.14);
  --cc-info:#84b8f4;
  --cc-info-soft:rgba(78,139,211,.15);
  --cc-overlay:rgba(0,0,0,.72);
  --cc-shadow-xs:0 1px 2px rgba(0,0,0,.28);
  --cc-shadow-sm:0 1px 2px rgba(0,0,0,.28),0 12px 30px rgba(0,0,0,.18);
  --cc-shadow-md:0 16px 42px rgba(0,0,0,.28);
  --cc-shadow-lg:0 28px 80px rgba(0,0,0,.45);
  --cc-focus:0 0 0 3px rgba(225,183,131,.20);
  --cc-topbar:rgba(17,20,25,.88);

  --bg:var(--cc-bg);
  --surface:var(--cc-surface);
  --surface-2:var(--cc-surface-2);
  --text:var(--cc-text);
  --muted:var(--cc-muted);
  --line:var(--cc-border);
  --primary:var(--cc-gold);
  --primary-dark:var(--cc-gold-hover);

  --brand-ink:var(--cc-text);
  --brand-ink-soft:var(--cc-text-soft);
  --brand-gold:var(--cc-gold);
  --brand-gold-hover:var(--cc-gold-hover);
  --brand-gold-soft:var(--cc-gold-soft);
  --brand-canvas:var(--cc-bg);
  --brand-surface:var(--cc-surface);
  --brand-border:var(--cc-border);
  --brand-muted:var(--cc-muted);

  --finance-gold:var(--cc-gold);
  --finance-gold-soft:var(--cc-gold-soft);
  --finance-ink:var(--cc-text);
  --finance-muted:var(--cc-muted);
  --finance-border:var(--cc-border);
  --finance-bg:var(--cc-bg);

  --sm-bg:var(--cc-bg);
  --sm-panel:var(--cc-surface);
  --sm-text:var(--cc-text);
  --sm-muted:var(--cc-muted);
  --sm-border:var(--cc-border);
  --sm-shadow:var(--cc-shadow-sm);
}

/* Base / typography */
html{background:var(--cc-bg);color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
body{font-family:"Geist",Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--cc-bg);color:var(--cc-text);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body,button,input,select,textarea{font-feature-settings:"ss01" 1,"cv02" 1}
h1,h2,h3,h4,h5,h6{letter-spacing:-.025em;color:var(--cc-text)}
p{color:inherit}
a{transition:color .15s ease,background-color .15s ease,border-color .15s ease,opacity .15s ease}
::selection{background:rgba(210,165,117,.35);color:var(--cc-text)}

/* Consistent form system */
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){border-radius:10px!important;border-color:var(--cc-border-strong)!important;background:var(--cc-surface)!important;color:var(--cc-text)!important;box-shadow:0 1px 1px rgba(15,23,42,.02) inset}
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea):hover{border-color:color-mix(in srgb,var(--cc-border-strong) 68%,var(--cc-text) 32%)!important}
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{border-color:var(--cc-gold)!important;box-shadow:var(--cc-focus)!important}
:where(input,textarea)::placeholder{color:var(--cc-muted-2)!important;opacity:1}
html[data-theme="dark"] :where(input[type="date"],input[type="time"],input[type="datetime-local"]){color-scheme:dark}

/* Modern buttons without changing actions */
:where(.btn,.sm-btn,.theme-trigger){border-radius:10px;font-weight:650;box-shadow:none}
:where(.btn-primary,.sm-btn-primary){background:var(--cc-gold)!important;border-color:var(--cc-gold)!important;color:#17120d!important;box-shadow:0 1px 1px rgba(60,37,16,.08)!important}
:where(.btn-primary,.sm-btn-primary):hover{background:var(--cc-gold-hover)!important;border-color:var(--cc-gold-hover)!important;color:#17120d!important}
:where(.btn-secondary,.sm-btn-secondary){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
:where(.btn-secondary,.sm-btn-secondary):hover{background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
:where(.btn-ghost){color:var(--cc-muted)!important}
:where(.btn-ghost):hover{background:var(--cc-surface-2)!important;color:var(--cc-text)!important}
:where(.btn-danger){background:var(--cc-danger-soft)!important;border-color:color-mix(in srgb,var(--cc-danger) 28%,transparent)!important;color:var(--cc-danger)!important}

/* Admin shell: lighter chrome, denser hierarchy */
.admin-ui-v2{
  --admin-bg:var(--cc-bg);
  --admin-card:var(--cc-surface);
  --admin-text:var(--cc-text);
  --admin-muted:var(--cc-muted);
  --admin-border:var(--cc-border);
  --admin-primary:var(--cc-gold);
  --admin-primary-hover:var(--cc-gold-hover);
  --admin-success:var(--cc-success);
  --admin-warning:var(--cc-warning);
  --admin-danger:var(--cc-danger);
  --admin-info:var(--cc-info);
  --admin-radius:14px;
  --admin-shadow:var(--cc-shadow-xs);
}
.admin-ui-v2 .sidebar{background:var(--cc-surface)!important;border-right:1px solid var(--cc-border)!important;box-shadow:none!important}
.admin-ui-v2 .sidebar-brand{min-height:68px;border-color:var(--cc-border)!important}
.admin-ui-v2 .sidebar-scroll{padding-top:10px}
.admin-ui-v2 .nav-section-label{font-size:10px!important;letter-spacing:.10em!important;color:var(--cc-muted-2)!important}
.admin-ui-v2 .nav-item{min-height:39px;border-radius:9px!important;color:var(--cc-muted)!important;font-weight:570!important}
.admin-ui-v2 .nav-item:hover{background:var(--cc-surface-2)!important;color:var(--cc-text)!important}
.admin-ui-v2 .nav-item.is-active{background:var(--cc-gold-soft)!important;color:var(--cc-accent-text)!important;box-shadow:inset 2px 0 0 var(--cc-gold)}
.admin-ui-v2 .nav-item.is-active .material-symbols-outlined{color:var(--cc-gold)!important}
.admin-ui-v2 .nav-count{background:var(--cc-surface-3)!important;color:var(--cc-text-soft)!important;border:1px solid var(--cc-border)!important}
.admin-ui-v2 .sidebar-account{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;border-radius:13px!important}
.admin-ui-v2 .sidebar-foot{border-color:var(--cc-border)!important;color:var(--cc-muted)!important}
.admin-ui-v2 .admin-topbar{height:68px;background:var(--cc-topbar)!important;border-color:var(--cc-border)!important;box-shadow:none!important;backdrop-filter:blur(18px) saturate(150%);-webkit-backdrop-filter:blur(18px) saturate(150%)}
.admin-ui-v2 .topbar-profile,.admin-ui-v2 .notification-bell,.admin-ui-v2 .menu-toggle{background:var(--cc-surface)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-xs)!important}
.admin-ui-v2 .topbar-profile{border-radius:12px!important}
.admin-ui-v2 .notification-bell{border-radius:10px!important;color:var(--cc-muted)!important}
.admin-ui-v2 .notification-bell:hover{background:var(--cc-surface-2)!important;color:var(--cc-text)!important}
.admin-ui-v2 .notification-bell b{border-color:var(--cc-surface)!important}
.admin-ui-v2 .admin-content{padding:clamp(18px,2.2vw,30px)!important}
.admin-ui-v2 .panel,.admin-ui-v2 .card{border-color:var(--cc-border)!important;background:var(--cc-surface)!important;border-radius:var(--cc-radius-md)!important;box-shadow:var(--cc-shadow-xs)!important}

/* Dashboard */
.dashboard-v2 .dashboard-hero{padding:24px 26px!important;border-radius:16px!important;background:linear-gradient(180deg,var(--cc-surface) 0%,var(--cc-surface-2) 100%)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-xs)!important}
.dashboard-v2 .dashboard-kicker{background:var(--cc-gold-soft)!important;border-color:color-mix(in srgb,var(--cc-gold) 34%,transparent)!important;color:var(--cc-accent-text)!important}
.dashboard-v2 .dashboard-metrics{gap:12px!important}
.dashboard-v2 .dashboard-metric-card{min-height:132px!important;border-radius:14px!important;background:var(--cc-surface)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-xs)!important}
.dashboard-v2 .dashboard-metric-card:hover{border-color:var(--cc-border-strong)!important;box-shadow:var(--cc-shadow-sm)!important;transform:translateY(-1px)}
.dashboard-v2 .metric-icon{border-radius:10px!important}
.dashboard-v2 .dashboard-card{border-radius:14px!important;background:var(--cc-surface)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-xs)!important}
.dashboard-v2 .summary-stat{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}
.dashboard-v2 .distribution-track{background:var(--cc-surface-3)!important}
.dashboard-v2 .recent-client-row{border-color:var(--cc-border)!important}
.dashboard-v2 .recent-client-row:hover{background:var(--cc-surface-2)!important}
.dashboard-v2 .dashboard-table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
.dashboard-v2 .dashboard-table td{border-color:var(--cc-border)!important}
.dashboard-v2 .dashboard-table tbody tr:hover{background:var(--cc-surface-2)!important}
.dashboard-v2 .quick-create-menu{background:var(--cc-surface-raised)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-md)!important}
.dashboard-v2 .quick-create-menu a:hover{background:var(--cc-surface-2)!important}

/* Theme picker v2 */
.theme-switcher{color:var(--cc-text)}
.theme-trigger{height:40px;min-width:40px;padding:0 10px;border-radius:10px;background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important;box-shadow:var(--cc-shadow-xs)!important}
.theme-trigger:hover{background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
.theme-trigger-icon{width:19px;height:19px;color:var(--cc-text-soft)}
.theme-trigger-icon svg,.theme-menu svg{width:18px;height:18px;display:block;stroke:currentColor}
.theme-trigger-label{font-size:12px;font-weight:600}
.theme-trigger-chevron{font-size:13px;color:var(--cc-muted-2)}
.theme-menu{width:274px;padding:8px;border-radius:14px;background:var(--cc-surface-raised)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-lg)!important}
.theme-menu-head{padding:8px 9px 9px;border-bottom:1px solid var(--cc-border);margin-bottom:5px}
.theme-menu-head strong{display:block;font-size:12px;color:var(--cc-text)}
.theme-menu-head small{display:block;margin-top:3px;font-size:10px;line-height:1.4;color:var(--cc-muted)}
.theme-menu button{grid-template-columns:32px minmax(0,1fr) 20px;padding:9px;border-radius:9px;color:var(--cc-text)}
.theme-menu button>span:first-child{width:30px;height:30px;border-radius:8px;background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;color:var(--cc-muted)!important}
.theme-menu button:hover{background:var(--cc-surface-2)!important}
.theme-menu button.is-active{background:var(--cc-gold-soft)!important}
.theme-menu button.is-active>span:first-child{color:var(--cc-gold)!important;border-color:color-mix(in srgb,var(--cc-gold) 34%,var(--cc-border))!important}
.theme-menu button.is-active strong{color:var(--cc-accent-text)!important}
.theme-menu i{color:var(--cc-gold)!important}

/* Shared surfaces */
:where(.metric-card,.table-panel,.client-project-card,.client-service-category-card,.service-category-select-card,.workspace-access-item,.client-workspace-public-card,.task-created-choice-card){border-radius:var(--cc-radius-md)!important}
:where(.table-panel,.panel,.metric-card){border-color:var(--cc-border)!important}
:where(table) th{color:var(--cc-muted)!important}
:where(table) td{color:var(--cc-text-soft)}
:where(.badge-neutral,.date-chip,.kanban-count){background:var(--cc-surface-3)!important;color:var(--cc-text-soft)!important;border-color:var(--cc-border)!important}

/* Client area */
.client-topbar{background:var(--cc-topbar)!important;backdrop-filter:blur(18px) saturate(150%);-webkit-backdrop-filter:blur(18px) saturate(150%);border-color:var(--cc-border)!important}
.client-dashboard{background:var(--cc-bg)!important}
:where(.client-page-hero,.client-detail-hero,.client-toolbar-card,.client-table-card,.client-info-card,.client-project-card,.client-users-card,.client-activity-card,.client-danger-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-xs)!important;border-radius:var(--cc-radius-md)!important}
:where(.client-page-hero,.client-detail-hero){background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important}
.client-data-table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
.client-data-table td{border-color:var(--cc-border)!important}

/* Module variable bridges */
.mai-page{--mai-gold:var(--cc-gold);--mai-ink:var(--cc-text);--mai-muted:var(--cc-muted);--mai-line:var(--cc-border);--mai-bg:var(--cc-bg)}
.finance-page,.payment-return-body{--finance-gold:var(--cc-gold);--finance-gold-soft:var(--cc-gold-soft);--finance-ink:var(--cc-text);--finance-muted:var(--cc-muted);--finance-border:var(--cc-border);--finance-bg:var(--cc-bg)}
.sm-body,.sm-page{--sm-bg:var(--cc-bg);--sm-panel:var(--cc-surface);--sm-text:var(--cc-text);--sm-muted:var(--cc-muted);--sm-border:var(--cc-border);--sm-shadow:var(--cc-shadow-sm)}

/* Finance */
:where(.finance-hero,.finance-metric,.finance-card,.finance-plan-card,.finance-reminder-card,.finance-modal-dialog,.finance-subnav,.payment-return-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
.finance-hero{border-radius:16px!important;background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important}
.finance-metric,.finance-card,.finance-plan-card{border-radius:14px!important}
.finance-table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
.finance-table td{border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}

/* E-commerce BI */
:where(.ebi-hero,.ebi-controlbar,.ebi-card,.ebi-workspace-panel,.ebi-stock-detail-card,.ebi-ai-priority){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
.ebi-hero{background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important;border-radius:16px!important}
.ebi-card{border-radius:14px!important}
.ebi-table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
.ebi-table td{border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
.ebi-tabs,.ebi-workspace-nav,.ebi-pricing-subnav{border-color:var(--cc-border)!important}

/* Traffic / Google Ads */
:where(.gads-hero,.gads-setup-card,.gads-panel,.traffic-filter-panel,.traffic-platform-card,.traffic-keyword-panel,.gads-chart-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
.gads-hero{background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important;border-radius:16px!important}
:where(.gads-panel,.traffic-filter-panel,.traffic-platform-card,.traffic-keyword-panel){border-radius:14px!important}
:where(.gads-table,.traffic-detail-table,.traffic-keyword-table) th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
:where(.gads-table,.traffic-detail-table,.traffic-keyword-table) td{border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
.traffic-keyword-wrap{background:var(--cc-surface-2)!important}
.traffic-keyword-table td:first-child{background:var(--cc-surface)!important}
.traffic-keyword-table th:first-child{background:var(--cc-surface-2)!important}

/* Social media */
.sm-body{background:var(--cc-bg)!important;color:var(--cc-text)!important}
:where(.sm-usage-card,.sm-calendar-wrap,.sm-calendar,.sm-modal-panel,.client-social-entry){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
:where(.sm-toolbar,.sm-filters,.sm-segment){border-color:var(--cc-border)!important}
.sm-month-day,.sm-day,.sm-time-head,.sm-hour-cell{border-color:var(--cc-border)!important}

/* AI planner + assistant */
:where(.aip-hero,.aip-card,.aip-result-card,.aia-hero,.aia-card,.aia-result-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important;border-radius:14px!important}
.aip-hero,.aia-hero{background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important}
:where(.aip-scope-option,.aip-insight,.aia-safety,.aia-example,.aia-context-note){background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}

/* Meetings */
:where(.meetings-toolbar-card,.agenda-mini-card,.agenda-tip-card,.agenda-main-card,.meeting-modal-card,.meeting-detail-card){border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-xs)!important}
:where(.meetings-toolbar-card,.agenda-mini-card,.agenda-main-card,.meeting-modal-card,.meeting-detail-card){background:var(--cc-surface)!important;color:var(--cc-text)!important}
.agenda-tip-card{background:#111318!important;color:#f7f8fa!important}
.agenda-toolbar,.agenda-week-head,.agenda-time-axis{background:var(--cc-surface)!important;border-color:var(--cc-border)!important}
.agenda-day-head,.agenda-time-head,.agenda-day-column{border-color:var(--cc-border)!important}
.agenda-day-head{color:var(--cc-muted)!important}
.agenda-day-head b{color:var(--cc-text-soft)!important}
.agenda-day-column{background:repeating-linear-gradient(to bottom,var(--cc-surface) 0,var(--cc-surface) 31px,var(--cc-border) 31px,var(--cc-border) 32px)!important}
.agenda-day-column:hover{background:repeating-linear-gradient(to bottom,var(--cc-surface-2) 0,var(--cc-surface-2) 31px,color-mix(in srgb,var(--cc-gold) 24%,var(--cc-border)) 31px,color-mix(in srgb,var(--cc-gold) 24%,var(--cc-border)) 32px)!important}
.agenda-today-btn,.meeting-modal-x{background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
.meeting-invite-box,.meeting-detail-time{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}

/* Meeting AI */
:where(.mai-hero,.mai-detail-head,.mai-toolbar,.mai-panel,.mai-content,.mai-empty,.mai-card,.mai-stat,.mai-modal-card){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
:where(.mai-hero,.mai-detail-head){border-radius:16px!important}
.mai-filter-tabs a{color:var(--cc-muted)!important}
.mai-filter-tabs a.is-active{background:var(--cc-text)!important;color:var(--cc-bg)!important}
.mai-search{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}
.mai-badges>span{background:var(--cc-surface-3)!important;color:var(--cc-text-soft)!important}

/* My tasks / Agenda */
.mytasks-switch{border-color:var(--cc-border)!important}
.mytasks-switch-item,.mytasks-calendar-toolbar,.mytasks-finance-summary a,.mytasks-schedule-scroll,.mytasks-month,.mytasks-overflow-item,.mytasks-event-dialog{background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important;box-shadow:var(--cc-shadow-xs)!important}
.mytasks-switch-item.is-active{background:var(--cc-text)!important;color:var(--cc-bg)!important;border-color:var(--cc-text)!important}
.mytasks-period-tabs a,.mytasks-nav-btn,.mytasks-today-btn,.mytasks-source-filters button{background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-muted)!important}
.mytasks-period-tabs a.is-active{background:var(--cc-gold)!important;border-color:var(--cc-gold)!important;color:#17120d!important}
.mytasks-source-filters button.is-active{background:var(--cc-gold-soft)!important;border-color:color-mix(in srgb,var(--cc-gold) 45%,var(--cc-border))!important;color:var(--cc-accent-text)!important}
.mytasks-plan-banner,.mytasks-ai-card{background:var(--cc-gold-soft)!important;border-color:color-mix(in srgb,var(--cc-gold) 34%,var(--cc-border))!important}
.mytasks-schedule-corner,.mytasks-day-head,.mytasks-time-axis,.mytasks-day-column,.mytasks-month-weekday{background:var(--cc-surface)!important;border-color:var(--cc-border)!important}
.mytasks-day-head.is-today{background:var(--cc-gold-soft)!important}
.mytasks-time-label,.mytasks-slot-line{border-color:var(--cc-border)!important;color:var(--cc-muted)!important}
.mytasks-slot-line{background:var(--cc-border)!important}
.mytasks-slot-line:nth-of-type(2n){background:var(--cc-border-strong)!important}
.mytasks-offhours{background:repeating-linear-gradient(135deg,var(--cc-surface-2),var(--cc-surface-2) 3px,var(--cc-surface-3) 3px,var(--cc-surface-3) 6px)!important}
.mytasks-lunch-band{background:repeating-linear-gradient(135deg,var(--cc-gold-soft),var(--cc-gold-soft) 3px,color-mix(in srgb,var(--cc-gold) 22%,var(--cc-surface)) 3px,color-mix(in srgb,var(--cc-gold) 22%,var(--cc-surface)) 6px)!important}
.mytasks-month-day{border-color:var(--cc-border)!important}
.mytasks-month-day.is-outside{background:var(--cc-surface-2)!important;color:var(--cc-muted-2)!important}

/* Proposals + CRM */
:where(.proposal-admin-hero,.proposal-detail-hero,.proposal-stat-grid article,.proposal-panel,.proposal-form-card,.proposal-list-row,.proposal-category-admin,.proposal-module-tabs,.proposal-public-section,.crm-column){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
:where(.proposal-admin-hero,.proposal-detail-hero){background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important;border-radius:16px!important}
.proposal-list-row{background:var(--cc-surface-2)!important}
.proposal-list-icon{background:var(--cc-text)!important;color:var(--cc-gold)!important}
.proposal-module-tabs a{color:var(--cc-muted)!important}
.proposal-module-tabs a.is-active{background:var(--cc-gold-soft)!important;color:var(--cc-accent-text)!important}
.crm-board-wrap{scrollbar-color:var(--cc-border-strong) transparent}

/* Image compressor + tracking */
:where(.imgtool-hero,.imgtool-card,.imgtool-results,.trk-card,.trk-kpi){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important;box-shadow:var(--cc-shadow-xs)!important}
.imgtool-hero{background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important;border-radius:16px!important}
.imgtool-drop,.trk-privacy,.trk-code{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
.trk-table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
.trk-table td{border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}

/* Morning brief */
:where(.morning-brief-dialog,.morning-brief-head,.morning-task-card,.morning-brief-foot){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
.morning-brief-dialog{border-radius:18px!important;box-shadow:var(--cc-shadow-lg)!important}
.morning-brief-head{background:linear-gradient(180deg,var(--cc-surface),var(--cc-surface-2))!important}
.morning-brief-stat,.morning-brief-close{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
.morning-badge,.morning-label{background:var(--cc-surface-3)!important;color:var(--cc-text-soft)!important}

/* Auth / setup */
.auth-page{background:var(--cc-bg)!important}
.auth-visual{background:#111318!important;color:#f7f8fa!important}
.auth-form-zone{background:var(--cc-bg)!important}
.auth-card{border-radius:18px!important;background:var(--cc-surface)!important;border-color:var(--cc-border)!important;box-shadow:var(--cc-shadow-md)!important}
.auth-card :where(h1,h2,h3,strong){color:var(--cc-text)!important}
.auth-card :where(p,small){color:var(--cc-muted)!important}

/* Dark-mode readability repair: scoped and deliberate */
html[data-theme="dark"] :where(
  .admin-ui-v2,.client-dashboard,.finance-page,.ebi-page,.gads-page,.gads-client-page,
  .sm-page,.aip-page,.aia-page,.meetings-page,.mai-page,.mytasks-page,
  .proposal-admin-page,.proposal-form-page,.proposal-detail-page,.proposal-public-body,
  .imgtool-page,.trk-page
) :where(h1,h2,h3,h4,h5,h6,strong,legend,dt){color:var(--cc-text)!important}

html[data-theme="dark"] :where(
  .admin-ui-v2,.client-dashboard,.finance-page,.ebi-page,.gads-page,.gads-client-page,
  .sm-page,.aip-page,.aia-page,.meetings-page,.mai-page,.mytasks-page,
  .proposal-admin-page,.proposal-form-page,.proposal-detail-page,.proposal-public-body,
  .imgtool-page,.trk-page
) :where(p,small,label,dd,.muted,.subtitle,.description){color:var(--cc-muted)!important}

html[data-theme="dark"] :where(
  .proposal-list-main>span,.proposal-list-main small,.proposal-list-value small,
  .meeting-detail-description,.meeting-modal-head p,.meeting-check small,
  .morning-task-description,.morning-task-meta,.morning-task-title small,
  .mytasks-event-description,.mytasks-plan-banner small,.mytasks-overflow-item small,
  .traffic-keyword-footer,.traffic-platform-filter>span,.gads-last-update,
  .trk-privacy,.imgtool-info,.imgtool-tip,.imgtool-security,
  .mai-meta>span,.mai-detail-meta>span,.mai-date small,
  .aip-result-meta,.aia-result-meta
){color:var(--cc-muted)!important}

html[data-theme="dark"] :where(
  .proposal-list-main>span,.traffic-keyword-table td:first-child strong,
  .meeting-field>span,.mytasks-day-head strong,.mytasks-date-picker,
  .client-contact-cell strong,.dashboard-v2 .due-date
){color:var(--cc-text-soft)!important}

/* Dark surfaces that legacy module CSS paints white */
html[data-theme="dark"] :where(
  .finance-action-popover,.finance-action-menu,.finance-kind-option,.finance-filter-presets a,
  .ebi-search,.ebi-note,.ebi-readonly,.ebi-table-tools,.ebi-help-disclosure,
  .gads-csv-form,.gads-link-form,.gads-oauth-note,.traffic-api-period-filter,.traffic-keyword-toolbar label,
  .sm-toolbar,.sm-filters,.sm-segment,.sm-post-card,.sm-month-day,.sm-time-grid,
  .aip-scope-option,.aip-insight,.aia-input-wrap,.aia-example,.aia-context-note,
  .agenda-date-box,.agenda-upcoming-item,.meeting-invite-box,
  .mai-search,.mai-status,.mai-badges>span,.mai-upload,
  .mytasks-quick-edit,.task-recurrence-block,.task-card-block,
  .proposal-service-admin,.proposal-service-picker,.proposal-custom-item,.proposal-public-condition-card,.crm-column-head,
  .imgtool-options,.imgtool-info,.trk-privacy,.trk-install,.trk-code
){background-color:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}

/* Semantic status colors: readable in both modes */
:where(.badge-success,.finance-status-paid,.is-success,.status-success,.ebi-status.is-ok,.gads-status-list .is-ok){background:var(--cc-success-soft)!important;color:var(--cc-success)!important}
:where(.badge-warning,.finance-status-pending,.status-warning,.is-progress,.is-analyzing){background:var(--cc-warning-soft)!important;color:var(--cc-warning)!important}
:where(.badge-danger,.finance-status-overdue,.is-error,.status-error,.is-overdue){color:var(--cc-danger)!important}
:where(.finance-status-overdue,.status-error,.gads-oauth-message.is-error){background:var(--cc-danger-soft)!important}
:where(.badge-info,.status-info,.is-info){background:var(--cc-info-soft)!important;color:var(--cc-info)!important}

/* Calendar event colors tuned for dark readability */
html[data-theme="dark"] .event-client{background:#302215!important;border-color:#6e4c2c!important;color:#f1c797!important}
html[data-theme="dark"] .event-personal{background:#18253b!important;border-color:#345783!important;color:#b8d4fa!important}
html[data-theme="dark"] .event-meeting{background:#241d39!important;border-color:#51427a!important;color:#d7c9ff!important}
html[data-theme="dark"] :where(.event-finance,.event-finance_income,.event-finance_receivable){background:#172d24!important;border-color:#2e684e!important;color:#a9e8ca!important}
html[data-theme="dark"] .event-finance_expense{background:#371e1d!important;border-color:#7c403d!important;color:#ffc0bb!important}
html[data-theme="dark"] .event-ai{background:#341e2b!important;border-color:#74445e!important;color:#f2bfd3!important}
html[data-theme="dark"] .event-ai_rest{background:#21252b!important;border-color:#414851!important;color:#c8ced6!important}
html[data-theme="dark"] .agenda-event{background:#332516!important;border-left-color:var(--cc-gold)!important;color:#f0cfaa!important}
html[data-theme="dark"] .agenda-event small{color:#c6a27d!important}

/* Native chart/canvas surrounding contrast */
html[data-theme="dark"] :where(canvas){filter:saturate(.94) brightness(.98)}

/* Scrollbars */
*{scrollbar-color:var(--cc-border-strong) transparent}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:var(--cc-border-strong);border:3px solid transparent;background-clip:padding-box}

@media(max-width:1180px){
  .admin-topbar .theme-trigger-label{display:none}
  .admin-topbar .theme-trigger{width:40px;padding:0;justify-content:center}
  .admin-topbar .theme-trigger-chevron{display:none}
}
@media(max-width:720px){
  .admin-ui-v2 .admin-content{padding:14px!important}
  .dashboard-v2 .dashboard-hero{padding:20px!important}
  .client-topbar .theme-trigger-label{display:none}
  .client-topbar .theme-trigger{width:40px;padding:0;justify-content:center}
  .client-topbar .theme-trigger-chevron{display:none}
  .theme-menu{position:fixed;top:auto;right:12px;bottom:12px;width:min(292px,calc(100vw - 24px))}
}

/* v6.32 contrast audit — legacy explicit color repairs */
html[data-theme="dark"] :where(
  .ebi-hero p,.ebi-controlbar label span,.ebi-import-form label span,.ebi-goal-form label span,
  .ebi-card-head p,.ebi-csv-help,.ebi-note,.ebi-bling-status span,.ebi-metric-card small,
  .ebi-metric-card em:not(.is-up):not(.is-down),.ebi-tabs button:not(.is-active),.ebi-table th,
  .ebi-empty,.ebi-mini-metrics small,.ebi-stock-alerts small,.ebi-goal-row em,.ebi-indicator-list span,
  .ebi-readonly,.ebi-ai-form .ebi-check small,.ebi-ai-score-card p,.ebi-ai-meta span,.ebi-ai-meta b,
  .ebi-ai-reason,.ebi-ai-disclaimer,.ebi-ai-private-note
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.ebi-csv-help strong,.ebi-empty strong,.ebi-ai-score-ring strong,.ebi-table td strong){color:var(--cc-text)!important}
html[data-theme="dark"] .ebi-tabs button.is-active{color:var(--cc-text)!important;background:var(--cc-surface)!important}
html[data-theme="dark"] :where(.ebi-source-badge,.ebi-hero .eyebrow,.ebi-card-head small){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .gads-hero p,.gads-status-list span,.gads-link-form label span,.gads-filters label span,.gads-panel-head p,
  .gads-table th,.gads-metrics small,.gads-chart-card p,.gads-empty,.gads-oauth-note,.gads-oauth-note small,
  .gads-csv-form label>span,.gads-csv-help,.gads-csv-help p,.traffic-platform-filter>span,.traffic-platform-card small,
  .traffic-data-note,.traffic-source-period,.traffic-api-period-filter label>span,.traffic-keyword-footer
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.gads-empty strong,.traffic-platform-card>div,.traffic-keyword-table td:first-child strong){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.gads-kicker,.gads-csv-kicker,.gads-csv-source,.gads-readonly-badge){color:var(--cc-accent-text)!important}
html[data-theme="dark"] .traffic-filter-btn{color:var(--cc-muted)!important;background:var(--cc-surface)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .traffic-filter-btn:hover{color:var(--cc-text)!important;background:var(--cc-surface-2)!important}
html[data-theme="dark"] .traffic-filter-btn.is-active{color:var(--cc-accent-text)!important;background:var(--cc-gold-soft)!important;border-color:color-mix(in srgb,var(--cc-gold) 40%,var(--cc-border))!important}

html[data-theme="dark"] :where(
  .proposal-stat-grid small,.proposal-panel-head p,.proposal-form-head p,.proposal-list-main>span,.proposal-list-main small,
  .proposal-list-value small,.proposal-empty p,.proposal-service-admin p,.proposal-back,.proposal-item-controls label,
  .proposal-switch small,.proposal-public-url small,.proposal-public-url span,.proposal-detail-items article p,
  .proposal-detail-items article small,.proposal-panel.compact dt,.proposal-panel.compact.danger p,.proposal-public-header small,
  .proposal-public-client,.proposal-public-intro,.proposal-public-service-copy p,.proposal-public-service-copy small,
  .proposal-public-condition-card p,.proposal-public-note p,.proposal-public-footer p,.proposal-public-footer span,
  .proposal-accept-card>p,.proposal-accept-check
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.proposal-form-grid label,.proposal-public-body,.proposal-public-service-copy strong,.proposal-detail-items article strong){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.proposal-kicker,.proposal-service-category,.proposal-public-eyebrow,.proposal-public-section-head small,.proposal-public-condition-card small,.proposal-public-note small){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .finance-filters label>span,.finance-table th,.finance-client-link small,.finance-charge-title small,.finance-action-popover label,
  .finance-form-explain p,.client-finance-summary small,.client-finance-row-main small,.payment-return-card>p,.payment-return-detail small,
  .finance-modal-summary small,.finance-subnav a,.finance-cashflow-row small,.finance-account-list small,.finance-table-sub
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.finance-client-link,.finance-empty strong,.finance-form-explain,.finance-reminder-card strong,.finance-reminder-option){color:var(--cc-text)!important}
html[data-theme="dark"] :where(.finance-plan-card>a,.finance-form-explain code,.finance-modal-head .eyebrow){color:var(--cc-accent-text)!important}
html[data-theme="dark"] .finance-subnav a.is-active{color:var(--cc-accent-text)!important;background:var(--cc-gold-soft)!important}

html[data-theme="dark"] :where(
  .aip-hero p,.aip-card p,.aip-result-head p,.aip-hero-badge small,.aip-voice-status,.aip-context-options small,
  .aip-result-meta span,.aip-insight small,.aip-priority-grid small,.aip-weeks small,.aip-weeks ul,.aip-day-head span,
  .aip-time small,.aip-block-tags span,.aip-apply-bar small,.aip-recommendations li,.aip-history-list small,.aip-empty,.aip-task-due
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.aip-field>span,.aip-scope-option span,.aip-hero h1,.aip-card h2,.aip-result-head h2){color:var(--cc-text)!important}
html[data-theme="dark"] :where(.aip-eyebrow,.aip-hero-badge .material-symbols-outlined){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .aia-eyebrow,.aia-card-head p,.aia-context-note,.aia-result-list p,.aia-details p,.aia-result-meta,
  .aia-rules p,.aia-history p,.aia-history small,.aia-rule-tip p,.aia-safety p,.aia-empty
){color:var(--cc-muted)!important}
html[data-theme="dark"] .aia-examples button{color:var(--cc-text-soft)!important;background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .aia-examples button:hover{color:var(--cc-text)!important;background:var(--cc-surface-3)!important}
html[data-theme="dark"] .aia-secure{color:var(--cc-success)!important}

html[data-theme="dark"] :where(
  .mai-filter-tabs a,.mai-search .material-symbols-outlined,.mai-meta>span,.mai-detail-meta>span,.mai-badges>span,
  .mai-form-grid label>span,.mai-back-row a,.mai-detail-status-row,.mai-processing-strip,.mai-upload span,.mai-tabs button,
  .mai-version,.mai-task-card>p,.mai-task-meta b,.mai-task-meta small,.mai-task-card blockquote,.mai-speaker span,.mai-speaker time,
  .mai-transcript p
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.mai-prose,.mai-search input,.mai-form input,.mai-form select,.mai-form textarea,.mai-import-form textarea,.mai-question-form textarea){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.mai-kicker,.mai-meta .material-symbols-outlined,.mai-detail-meta .material-symbols-outlined){color:var(--cc-accent-text)!important}
html[data-theme="dark"] .mai-status{color:var(--cc-muted)!important;background:var(--cc-surface-3)!important}
html[data-theme="dark"] :where(.mai-status.is-complete,.mai-status.is-received){color:var(--cc-success)!important;background:var(--cc-success-soft)!important}
html[data-theme="dark"] :where(.mai-status.is-progress,.mai-status.is-analyzing){color:var(--cc-warning)!important;background:var(--cc-warning-soft)!important}
html[data-theme="dark"] .mai-status.is-error{color:var(--cc-danger)!important;background:var(--cc-danger-soft)!important}

html[data-theme="dark"] :where(
  .mytasks-switch-item,.mytasks-source-filters button:not(.is-active),.mytasks-plan-banner small,.mytasks-day-head small,
  .mytasks-time-label,.mytasks-month-weekday,.mytasks-month-date small,.mytasks-month-more,.mytasks-overflow-item small,
  .mytasks-event-description,.mytasks-event-body dt,.mytasks-quick-edit-grid label>small:not(.field-error),
  .task-recurrence-days>span,.task-recurrence-day-grid span
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.mytasks-date-picker,.mytasks-day-head strong,.mytasks-quick-edit-grid label){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.mytasks-plan-banner a,.mytasks-date-picker .material-symbols-outlined){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .meeting-modal-head p,.meeting-modal-x,.meeting-check small,.meeting-detail-time small,.meeting-detail-description,
  .agenda-nav-buttons a,.agenda-day-head,.agenda-upcoming-copy small,.agenda-empty-mini
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.meeting-field>span,.agenda-day-head b,.agenda-upcoming-copy strong){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.meetings-kicker,.agenda-view-badge,.agenda-date-box){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .imgtool-hero p,.imgtool-card-head p,.imgtool-drop span:last-child,.imgtool-file-summary span,.imgtool-preview small,
  .imgtool-info,.imgtool-tip p,.imgtool-security p,.imgtool-summary-cards span,.imgtool-result-main>small,
  .trk-hero p,.trk-card p,.trk-site small,.trk-toolbar label,.trk-kpi span,.trk-table th,.trk-empty,.trk-note,.trk-privacy
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.imgtool-card-head h2,.imgtool-results h2,.imgtool-options label>span){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.imgtool-page .eyebrow,.imgtool-card-head small,.imgtool-tip>span){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .dashboard-v2 .metric-card-top,.dashboard-v2 .summary-stat span,.dashboard-v2 .distribution-row span,.dashboard-v2 .ticket-id,
  .client-detail-meta>span,.client-detail-tabs a:not(.is-active),.client-detail-metrics small,.client-info-item>.material-symbols-outlined,
  .client-status-pill.is-inactive,.client-action-menu summary,.client-detail-back
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.dashboard-v2 .client-project-cell strong,.dashboard-v2 .due-date,.client-contact-cell strong,.client-info-item strong,.client-count-pill){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.client-detail-tabs a.is-active,.dashboard-v2 .dashboard-link){color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(
  .morning-brief-head p,.morning-brief-stat small,.morning-brief-list-title span,.morning-task-title small,
  .morning-task-meta,.morning-task-description,.morning-label,.morning-brief-empty,.morning-brief-foot p
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.morning-task-title strong,.morning-brief-empty strong){color:var(--cc-text)!important}
html[data-theme="dark"] .morning-brief-kicker{color:var(--cc-accent-text)!important}

/* =========================================================
   v6.33.1 · Dark-mode color repair for remaining admin modules
   Refina contraste, superfícies e legibilidade das telas ainda claras.
   ========================================================= */
html[data-theme="dark"]{
  --cc-accent-text:#f0c79c;
}

html[data-theme="dark"] :where(.proposal-module-tabs a){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-muted)!important;
}
html[data-theme="dark"] :where(.proposal-module-tabs a.is-active){
  background:var(--cc-gold-soft)!important;
  border-color:color-mix(in srgb,var(--cc-gold) 38%,var(--cc-border))!important;
  color:var(--cc-accent-text)!important;
}

/* CRM Comercial */
html[data-theme="dark"] :where(.crm-stat-grid article,.crm-filters input,.crm-filters select,.crm-modal-dialog,.crm-side-card,.crm-history-item,.crm-stage-control,.crm-drag-ghost){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .crm-stat-grid article>.material-symbols-outlined,
html[data-theme="dark"] .crm-side-card-head>span{
  background:var(--cc-gold-soft)!important;
  color:var(--cc-accent-text)!important;
}
html[data-theme="dark"] :where(.crm-stat-grid small,.crm-card-meta span,.crm-owner,.crm-history-item small,.crm-side-card p,.crm-stage-help,.crm-followup-late,.crm-modal-head p,.crm-lead-open>small,.crm-lead-open>p){
  color:var(--cc-muted)!important;
}
html[data-theme="dark"] .crm-board{background:transparent!important;box-shadow:none!important}
html[data-theme="dark"] .crm-column{
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
  box-shadow:var(--cc-shadow-xs)!important;
}
html[data-theme="dark"] .crm-column-head{border-color:var(--cc-border)!important}
html[data-theme="dark"] .crm-column-head strong,
html[data-theme="dark"] .crm-lead-open>strong,
html[data-theme="dark"] .crm-side-card h3,
html[data-theme="dark"] .crm-form-grid label,
html[data-theme="dark"] .crm-stage-select-label{
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .crm-column-head [data-stage-count],
html[data-theme="dark"] .crm-card-source{
  background:var(--cc-gold-soft)!important;
  color:var(--cc-accent-text)!important;
}
html[data-theme="dark"] .crm-column-cards,
html[data-theme="dark"] .crm-lead-side{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
}
html[data-theme="dark"] .crm-column-cards.is-drag-over,
html[data-theme="dark"] .crm-column.is-pointer-target .crm-column-cards{
  background:rgba(215,173,130,.08)!important;
  outline-color:rgba(215,173,130,.75)!important;
}
html[data-theme="dark"] .crm-lead-card,
html[data-theme="dark"] .crm-drag-ghost{
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
  box-shadow:var(--cc-shadow-sm)!important;
}
html[data-theme="dark"] .crm-lead-card:hover{
  border-color:var(--cc-border-strong)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.24)!important;
}
html[data-theme="dark"] .crm-lead-card.has-late-followup{border-color:#92534b!important}
html[data-theme="dark"] .crm-card-meta span .material-symbols-outlined,
html[data-theme="dark"] .crm-column-head>.material-symbols-outlined,
html[data-theme="dark"] .crm-card-drag-icon{color:var(--cc-muted)!important}
html[data-theme="dark"] .crm-proposal-badge{
  background:rgba(26,127,78,.16)!important;
  color:#8fe1b2!important;
}
html[data-theme="dark"] .crm-owner{border-color:var(--cc-border)!important}
html[data-theme="dark"] .crm-add-card{color:var(--cc-muted)!important}
html[data-theme="dark"] .crm-add-card:hover{background:var(--cc-surface-3)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .crm-modal-head,
html[data-theme="dark"] .crm-modal-head>button,
html[data-theme="dark"] .crm-side-card select,
html[data-theme="dark"] .crm-side-card textarea,
html[data-theme="dark"] .crm-stage-select-label select,
html[data-theme="dark"] .crm-form-grid input,
html[data-theme="dark"] .crm-form-grid select,
html[data-theme="dark"] .crm-form-grid textarea{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border-strong)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .crm-history-item{
  background:var(--cc-surface-2)!important;
  border-left-color:var(--cc-gold)!important;
}
html[data-theme="dark"] .crm-history-empty{color:var(--cc-muted)!important}

/* Minhas tarefas / modal da agenda */
html[data-theme="dark"] .mytasks-event-dialog,
html[data-theme="dark"] .mytasks-event-dialog header button,
html[data-theme="dark"] .mytasks-quick-edit-grid input,
html[data-theme="dark"] .mytasks-quick-edit-grid select,
html[data-theme="dark"] .mytasks-quick-edit-grid textarea,
html[data-theme="dark"] .task-recurrence-block,
html[data-theme="dark"] .task-recurrence-toggle,
html[data-theme="dark"] .task-recurrence-day-grid span{
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .mytasks-event-dialog header,
html[data-theme="dark"] .mytasks-event-dialog footer,
html[data-theme="dark"] .mytasks-quick-edit-actions{border-color:var(--cc-border)!important}
html[data-theme="dark"] .mytasks-event-description,
html[data-theme="dark"] .mytasks-quick-edit-grid label>small:not(.field-error),
html[data-theme="dark"] .task-recurrence-days>span,
html[data-theme="dark"] .task-recurrence-day-grid span{color:var(--cc-muted)!important}
html[data-theme="dark"] .mytasks-event-body dl{border-color:var(--cc-border)!important}
html[data-theme="dark"] .mytasks-event-body dt,
html[data-theme="dark"] .mytasks-event-body dd{
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .mytasks-event-body dt{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important}
html[data-theme="dark"] .mytasks-event-body dd{background:var(--cc-surface)!important}
html[data-theme="dark"] .task-recurrence-day-grid label:has(input:checked) span{
  background:var(--cc-gold)!important;
  border-color:var(--cc-gold)!important;
  color:#111!important;
  box-shadow:none!important;
}
html[data-theme="dark"] [data-task-duration-display]{background:var(--cc-surface-2)!important;color:var(--cc-text)!important}

/* Planejador IA */
html[data-theme="dark"] .aip-hero-badge,
html[data-theme="dark"] .aip-scope-option span,
html[data-theme="dark"] .aip-context-options label,
html[data-theme="dark"] .aip-weekdays span,
html[data-theme="dark"] .aip-result-meta span,
html[data-theme="dark"] .aip-insight,
html[data-theme="dark"] .aip-priority-grid article,
html[data-theme="dark"] .aip-day-head span,
html[data-theme="dark"] .aip-block,
html[data-theme="dark"] .aip-block-tags span,
html[data-theme="dark"] .aip-apply-bar,
html[data-theme="dark"] .aip-history-list article,
html[data-theme="dark"] .aip-empty,
html[data-theme="dark"] .aip-warning{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .aip-hero-badge .material-symbols-outlined,
html[data-theme="dark"] .aip-card-head>.material-symbols-outlined,
html[data-theme="dark"] .aip-insight .material-symbols-outlined{color:var(--cc-accent-text)!important}
html[data-theme="dark"] .aip-hero-badge small,
html[data-theme="dark"] .aip-context-options small,
html[data-theme="dark"] .aip-priority-grid small,
html[data-theme="dark"] .aip-weeks small,
html[data-theme="dark"] .aip-day-head p,
html[data-theme="dark"] .aip-time small,
html[data-theme="dark"] .aip-apply-bar small,
html[data-theme="dark"] .aip-history-list small,
html[data-theme="dark"] .aip-empty{color:var(--cc-muted)!important}
html[data-theme="dark"] .aip-scope-option input:checked+span,
html[data-theme="dark"] .aip-weekdays input:checked+span,
html[data-theme="dark"] .aip-block-check label:has(input:checked){
  background:var(--cc-gold)!important;
  border-color:var(--cc-gold)!important;
  color:#111!important;
}
html[data-theme="dark"] .aip-block-check label:has(input:checked) span{color:#111!important;opacity:1!important}
html[data-theme="dark"] .aip-focus,
html[data-theme="dark"] .aip-block.type-focus{background:var(--cc-surface-3)!important;border-color:var(--cc-border-strong)!important}
html[data-theme="dark"] .aip-history-list article.is-current{background:rgba(215,173,130,.10)!important;border-color:rgba(215,173,130,.34)!important}
html[data-theme="dark"] .aip-warning{background:rgba(215,173,130,.10)!important;color:#f2d6b3!important}

/* Assistente IA */
html[data-theme="dark"] .aia-hero{background:linear-gradient(135deg,#161a20 0%,#1f252d 100%)!important;border:1px solid var(--cc-border)!important}
html[data-theme="dark"] .aia-stats div,
html[data-theme="dark"] .aia-secure,
html[data-theme="dark"] .aia-input-wrap textarea,
html[data-theme="dark"] .aia-mic,
html[data-theme="dark"] .aia-examples button,
html[data-theme="dark"] .aia-warning,
html[data-theme="dark"] .aia-result-list article,
html[data-theme="dark"] .aia-confirm-box,
html[data-theme="dark"] .aia-action-preview span,
html[data-theme="dark"] .aia-rules article,
html[data-theme="dark"] .aia-history article,
html[data-theme="dark"] .aia-rule-tip,
html[data-theme="dark"] .aia-safety>div>span{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .aia-input-wrap textarea:focus{background:var(--cc-surface)!important;border-color:var(--cc-gold)!important;box-shadow:var(--cc-focus)!important}
html[data-theme="dark"] .aia-mic.is-listening{background:var(--cc-gold)!important;color:#111!important}
html[data-theme="dark"] :where(.aia-card-head p,.aia-context-note,.aia-result-list p,.aia-details p,.aia-result-meta,.aia-rules p,.aia-history p,.aia-history small,.aia-rule-tip p,.aia-safety p,.aia-empty){color:var(--cc-muted)!important}
html[data-theme="dark"] .aia-secure{color:#95dbb2!important;background:rgba(26,127,78,.16)!important}
html[data-theme="dark"] .aia-warning{background:rgba(215,173,130,.10)!important;color:#f2d6b3!important}
html[data-theme="dark"] .aia-confirm-box>p,
html[data-theme="dark"] .aia-result-list strong,
html[data-theme="dark"] .aia-rules strong,
html[data-theme="dark"] .aia-history strong{color:var(--cc-text)!important}

/* Tráfego pago / CSV */
html[data-theme="dark"] .gads-csv-panel{background:linear-gradient(135deg,var(--cc-surface) 0%,var(--cc-surface-2) 100%)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .gads-csv-form,
html[data-theme="dark"] .gads-visible-create .gads-check-row,
html[data-theme="dark"] .traffic-platform-card,
html[data-theme="dark"] .traffic-data-note,
html[data-theme="dark"] .traffic-source-count,
html[data-theme="dark"] .traffic-keyword-total,
html[data-theme="dark"] .traffic-keyword-wrap,
html[data-theme="dark"] .traffic-keyword-table,
html[data-theme="dark"] .traffic-keyword-toolbar label{
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .gads-csv-form input,
html[data-theme="dark"] .gads-csv-form select,
html[data-theme="dark"] .traffic-api-period-filter input,
html[data-theme="dark"] .traffic-api-period-filter select,
html[data-theme="dark"] .traffic-keyword-toolbar input{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border-strong)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .gads-csv-help,
html[data-theme="dark"] .traffic-data-note{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important}
html[data-theme="dark"] .gads-csv-help p,
html[data-theme="dark"] .gads-csv-form small,
html[data-theme="dark"] .traffic-platform-card small,
html[data-theme="dark"] .traffic-source-period,
html[data-theme="dark"] .traffic-keyword-footer,
html[data-theme="dark"] .traffic-keyword-toolbar small{color:var(--cc-muted)!important}
html[data-theme="dark"] .traffic-keyword-table th,
html[data-theme="dark"] .traffic-keyword-table th:first-child,
html[data-theme="dark"] .traffic-keyword-table td:first-child{background:var(--cc-surface-2)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .traffic-keyword-table td{border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
html[data-theme="dark"] .traffic-keyword-table td:first-child strong{color:var(--cc-text)!important}
html[data-theme="dark"] .traffic-filter-btn.is-active{color:#111!important}

/* Redes sociais */
html[data-theme="dark"] .sm-toolbar,
html[data-theme="dark"] .sm-calendar-wrap,
html[data-theme="dark"] .sm-modal-panel,
html[data-theme="dark"] .sm-empty-state,
html[data-theme="dark"] .sm-post-info,
html[data-theme="dark"] .sm-chip,
html[data-theme="dark"] .sm-month-day,
html[data-theme="dark"] .sm-month-head,
html[data-theme="dark"] .sm-day-end,
html[data-theme="dark"] .sm-time-head,
html[data-theme="dark"] .sm-hour-label,
html[data-theme="dark"] .sm-hour-cell,
html[data-theme="dark"] .sm-segment,
html[data-theme="dark"] .sm-filters button,
html[data-theme="dark"] .sm-btn-secondary,
html[data-theme="dark"] .sm-icon-btn,
html[data-theme="dark"] .sm-modal-close{
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .sm-period-title,
html[data-theme="dark"] .sm-time-head-day strong,
html[data-theme="dark"] .sm-post-info h2{color:var(--cc-text)!important}
html[data-theme="dark"] .sm-subtitle,
html[data-theme="dark"] .sm-time-head-day,
html[data-theme="dark"] .sm-hour-label,
html[data-theme="dark"] .sm-day-end,
html[data-theme="dark"] .sm-post-meta,
html[data-theme="dark"] .sm-history-item,
html[data-theme="dark"] .sm-empty-state p,
html[data-theme="dark"] .sm-more,
html[data-theme="dark"] .sm-post-card-platforms{color:var(--cc-muted)!important}
html[data-theme="dark"] .sm-segment{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .sm-segment button,
html[data-theme="dark"] .sm-filters button{background:transparent!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .sm-segment button.is-active{background:var(--cc-surface)!important;color:var(--cc-text)!important;box-shadow:none!important}
html[data-theme="dark"] .sm-filters button.is-active{background:rgba(48,196,206,.16)!important;border-color:rgba(48,196,206,.42)!important;color:#8ddfe4!important}
html[data-theme="dark"] .sm-time-head,
html[data-theme="dark"] .sm-time-head.sm-time-label,
html[data-theme="dark"] .sm-hour-label{border-color:var(--cc-border)!important}
html[data-theme="dark"] .sm-hour-cell{border-left-color:var(--cc-border)!important;border-top-color:rgba(255,255,255,.06)!important}
html[data-theme="dark"] .sm-hour-cell::after{border-top-color:rgba(255,255,255,.08)!important}
html[data-theme="dark"] .sm-month-head,
html[data-theme="dark"] .sm-day-end,
html[data-theme="dark"] .sm-month-day.is-outside{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .sm-month-post.status-draft,
html[data-theme="dark"] .sm-post-card.status-draft{background:var(--cc-surface-3)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}

/* Compressor de imagens */
html[data-theme="dark"] .imgtool-drop,
html[data-theme="dark"] .imgtool-file-summary,
html[data-theme="dark"] .imgtool-preview,
html[data-theme="dark"] .imgtool-preview.is-more,
html[data-theme="dark"] .imgtool-options select,
html[data-theme="dark"] .imgtool-info,
html[data-theme="dark"] .imgtool-security,
html[data-theme="dark"] .imgtool-summary-cards article,
html[data-theme="dark"] .imgtool-result-row,
html[data-theme="dark"] .imgtool-errors{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .imgtool-drop:hover,
html[data-theme="dark"] .imgtool-drop.is-dragging{background:rgba(215,173,130,.10)!important;border-color:rgba(215,173,130,.5)!important}
html[data-theme="dark"] :where(.imgtool-drop span:last-child,.imgtool-file-summary span,.imgtool-preview small,.imgtool-info,.imgtool-tip p,.imgtool-security p,.imgtool-summary-cards span,.imgtool-result-main>small){color:var(--cc-muted)!important}
html[data-theme="dark"] .imgtool-preview img,
html[data-theme="dark"] .imgtool-result-image{background:var(--cc-surface-3)!important}
html[data-theme="dark"] .imgtool-errors{background:rgba(215,173,130,.10)!important;color:#f2d6b3!important}

/* Tracking de sites */
html[data-theme="dark"] .trk-site,
html[data-theme="dark"] .trk-note,
html[data-theme="dark"] .trk-privacy,
html[data-theme="dark"] .trk-code,
html[data-theme="dark"] .trk-form-grid input,
html[data-theme="dark"] .trk-form-grid select,
html[data-theme="dark"] .trk-form-grid textarea,
html[data-theme="dark"] .trk-toolbar select,
html[data-theme="dark"] .trk-toolbar input,
html[data-theme="dark"] .trk-table,
html[data-theme="dark"] .trk-bar{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .trk-site small,
html[data-theme="dark"] .trk-note,
html[data-theme="dark"] .trk-toolbar label,
html[data-theme="dark"] .trk-privacy,
html[data-theme="dark"] .trk-empty,
html[data-theme="dark"] .trk-kpi span{color:var(--cc-muted)!important}
html[data-theme="dark"] .trk-table th{background:var(--cc-surface-2)!important;color:var(--cc-muted)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .trk-table td{border-color:var(--cc-border)!important;color:var(--cc-text-soft)!important}
html[data-theme="dark"] .trk-code textarea{background:#0e1217!important;color:#f4f4f5!important}
html[data-theme="dark"] .trk-bar i{background:var(--cc-gold)!important}

/* =========================================================
   v6.33.2 · Planner visibility + mobile topbar
   ========================================================= */
html[data-theme="dark"] .aip-schedule{
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .aip-schedule .aip-day{
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .aip-schedule .aip-timeline{
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .aip-apply-bar{
  background:var(--cc-surface-2)!important;
  border:1px solid var(--cc-border)!important;
}
html[data-theme="dark"] .aip-apply-bar strong{color:var(--cc-text)!important}
html[data-theme="dark"] .aip-apply-bar small{color:var(--cc-muted)!important}

@media(max-width:720px){
  .admin-ui-v2 .admin-topbar{gap:8px!important;padding:0 10px!important}
  .admin-ui-v2 .topbar-left{flex:1 1 auto;min-width:0;gap:8px!important}
  .admin-ui-v2 .topbar-user{flex:0 0 auto;gap:6px!important}
  .admin-ui-v2 .topbar-breadcrumb{min-width:0;max-width:min(42vw,180px);overflow:hidden}
  .admin-ui-v2 .topbar-breadcrumb>.material-symbols-outlined{display:none}
  .admin-ui-v2 .topbar-breadcrumb strong{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
  .admin-ui-v2 .menu-toggle,.admin-ui-v2 .notification-bell{flex:0 0 40px}
  .admin-ui-v2 .theme-trigger{flex:0 0 40px}
  .admin-ui-v2 [data-pwa-install]{width:40px!important;min-width:40px!important;padding:0!important;overflow:hidden;white-space:nowrap}
  .admin-ui-v2 [data-pwa-install-label]{display:none!important}
}
@media(max-width:560px){
  .admin-ui-v2 .topbar-profile,.admin-ui-v2 .topbar-logout{display:none!important}
  .admin-ui-v2 .topbar-breadcrumb{max-width:calc(100vw - 190px)}
}

/* =========================================================
   v6.33.3 · E-commerce BI dark-mode completion
   Remove superfícies claras remanescentes no dashboard/BI.
   ========================================================= */
html[data-theme="dark"] :where(
  .ebi-metric-card,
  .ebi-mini-metrics article,
  .ebi-marketplace-metrics article,
  .ebi-goal-history article,
  .ebi-channel-goals label,
  .ebi-manual-result>div,
  .ebi-marketplace-source-status>div,
  .ebi-fee-grid fieldset,
  .ebi-import-supported span,
  .ebi-workspace-nav,
  .ebi-tabs,
  .ebi-pricing-subnav
){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
  box-shadow:var(--cc-shadow-xs)!important;
}
html[data-theme="dark"] :where(
  .ebi-metric-card small,.ebi-metric-card em,
  .ebi-mini-metrics small,
  .ebi-marketplace-metrics small,.ebi-marketplace-metrics span,
  .ebi-goal-history small,.ebi-goal-history span,
  .ebi-channel-goals-head small,.ebi-channel-goals label em,
  .ebi-manual-result small,
  .ebi-marketplace-source-status span,.ebi-marketplace-source-status small,
  .ebi-fee-grid fieldset>small,.ebi-fee-grid label,.ebi-fee-grid p,
  .ebi-import-supported span
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(
  .ebi-metric-card strong,.ebi-mini-metrics strong,.ebi-marketplace-metrics strong,
  .ebi-goal-history strong,.ebi-channel-goals label b,.ebi-manual-result strong,
  .ebi-marketplace-source-status strong,.ebi-fee-grid legend
){color:var(--cc-text)!important}
html[data-theme="dark"] :where(
  .ebi-workspace-nav button,.ebi-tabs button,.ebi-pricing-subnav button
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(
  .ebi-workspace-nav button.is-active,.ebi-tabs button.is-active,.ebi-pricing-subnav button.is-active
){
  background:var(--cc-surface-3)!important;
  color:var(--cc-text)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .ebi-metric-card>.material-symbols-outlined{
  background:var(--cc-gold-soft)!important;
  color:var(--cc-accent-text)!important;
}
html[data-theme="dark"] .ebi-goal-history article.is-suggestion,
html[data-theme="dark"] .ebi-marketplace-source-status>div.is-ready{
  background:rgba(215,173,130,.08)!important;
  border-color:rgba(215,173,130,.28)!important;
}

/* =========================================================
   v6.37.0 · dark-mode final repair (finance + task cards)
   ========================================================= */
html[data-theme="dark"] :where(
  .finance-form-card,.finance-kind-option>span,.finance-form-explain,.finance-existing-files,
  .finance-stack-form input,.finance-stack-form select,.finance-stack-form textarea,
  .finance-inline-create input,.finance-inline-create select,.finance-inline-create textarea,
  .finance-form-grid input,.finance-form-grid select,.finance-form-grid textarea,
  .task-member-option,.task-card-resource-row,.task-comment-body,.task-checklist-editor,
  .task-cover-none span,.task-existing-files>span,.custom-presets,.personal-task-banner
){
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] .finance-kind-option input:checked+span{
  background:rgba(215,173,130,.10)!important;
  border-color:rgba(215,173,130,.62)!important;
  color:var(--cc-text)!important;
  box-shadow:0 0 0 3px rgba(215,173,130,.08)!important;
}
html[data-theme="dark"] .finance-form-explain{
  background:var(--cc-surface-3)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] :where(
  .finance-form-explain p,.finance-kind-option small,.finance-section-title small,
  .finance-stack-form label>span,.finance-inline-create label>span,.finance-report-filter label>span,
  .finance-month-picker>span,.task-member-option small,.personal-task-banner small,
  .task-card-resource-row small,.task-comment-body small
){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.finance-section-title strong,.finance-kind-option strong,.task-member-option strong,.personal-task-banner strong){color:var(--cc-text)!important}
html[data-theme="dark"] .finance-section-title{border-color:var(--cc-border)!important}
html[data-theme="dark"] .finance-section-title .material-symbols-outlined{
  background:var(--cc-gold-soft)!important;
  color:var(--cc-accent-text)!important;
}
html[data-theme="dark"] .task-member-option:has(input:checked){
  background:rgba(93,135,225,.12)!important;
  border-color:rgba(121,157,232,.52)!important;
}
html[data-theme="dark"] .task-member-avatar,
html[data-theme="dark"] .task-comment-avatar{
  background:#222a34!important;
  color:#dce5f1!important;
}
html[data-theme="dark"] .task-cover-swatch:has(input:checked) span{box-shadow:0 0 0 2px var(--cc-surface),inset 0 0 0 1px rgba(255,255,255,.12)!important}
html[data-theme="dark"] .task-existing-files>span{color:var(--cc-text-soft)!important}
html[data-theme="dark"] .personal-task-banner{
  background:rgba(215,173,130,.10)!important;
  border-color:rgba(215,173,130,.38)!important;
}
html[data-theme="dark"] .personal-task-banner>.material-symbols-outlined{color:var(--cc-accent-text)!important}
html[data-theme="dark"] .task-created-choice-card>p:not(.eyebrow){color:var(--cc-muted)!important}

/* v6.37.0 · audit extra de superfícies legadas claras */
html[data-theme="dark"] :where(
  .finance-metric,.finance-card,.finance-plan-card,.client-finance-summary>div,.client-finance-row,
  .finance-reminder-card,.finance-modal-dialog,.finance-subnav,.finance-quick-actions>a,
  .finance-account-admin-list>article,.finance-mini-edit>form,.finance-project-plan,.finance-filter-presets a,
  .custom-builder-item,.custom-choice,.sku-display-item,.setting-card,.notification-client-page .notification-panel,
  .custom-preset-button,.sku-image-options,.client-workspace-public,.client-workspace-public-card,
  .client-service-category-card,.client-service-awaiting,.service-category-select-card,
  .client-service-admin-card,.client-secret-wrap,.client-secret-wrap button
){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] :where(.finance-mini-edit input,.finance-action-popover input,.finance-action-popover select,.finance-action-popover textarea){
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border-strong)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] :where(.finance-table th,.finance-table tbody tr:hover){background:var(--cc-surface-2)!important}
html[data-theme="dark"] .finance-table td{border-color:var(--cc-border)!important}
html[data-theme="dark"] :where(.finance-client-link,.finance-empty strong,.finance-plan-value,.finance-account-admin-head strong){color:var(--cc-text)!important}

/* =========================================================
   v6.37.2 · Clientes / Central do Cliente — dark mode completo
   Remove superfícies claras herdadas do admin-redesign e garante contraste.
   ========================================================= */
html[data-theme="dark"] :where(
  .client-workspace-section,
  .client-workspace-card,
  .workspace-item-row,
  .workspace-note-item,
  .workspace-access-item
){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
  box-shadow:var(--cc-shadow-xs)!important;
}

html[data-theme="dark"] :where(
  .client-workspace-form,
  .workspace-edit-form,
  .workspace-access-editor,
  .workspace-secret-wrap
){
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}

html[data-theme="dark"] :where(
  .client-workspace-form input:not([type="checkbox"]):not([type="radio"]),
  .client-workspace-form select,
  .client-workspace-form textarea,
  .client-workspace-edit-form input:not([type="checkbox"]):not([type="radio"]),
  .client-workspace-edit-form select,
  .client-workspace-edit-form textarea,
  .workspace-edit-form input:not([type="checkbox"]):not([type="radio"]),
  .workspace-edit-form select,
  .workspace-edit-form textarea,
  .workspace-access-editor input:not([type="checkbox"]):not([type="radio"]),
  .workspace-access-editor select,
  .workspace-access-editor textarea
){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border-strong)!important;
  color:var(--cc-text)!important;
  box-shadow:none!important;
}

html[data-theme="dark"] :where(
  .client-workspace-form input::placeholder,
  .client-workspace-form textarea::placeholder,
  .workspace-edit-form input::placeholder,
  .workspace-edit-form textarea::placeholder,
  .workspace-access-editor input::placeholder,
  .workspace-access-editor textarea::placeholder
){
  color:var(--cc-muted)!important;
  opacity:.82!important;
}

html[data-theme="dark"] :where(
  .client-workspace-heading h2,
  .client-workspace-card-head h3,
  .workspace-item-copy strong,
  .workspace-note-meta strong,
  .workspace-check-row strong,
  .workspace-access-editor-head strong,
  .workspace-access-field>strong
){color:var(--cc-text)!important}

html[data-theme="dark"] :where(
  .client-workspace-heading p,
  .client-workspace-card-head p,
  .client-workspace-form label>span,
  .workspace-visible-check,
  .workspace-visible-check>span,
  .workspace-item-copy small,
  .workspace-note-item p,
  .workspace-check-row small,
  .workspace-access-field>span,
  .workspace-empty-inline,
  .workspace-edit-details>summary,
  .workspace-edit-form label>span
){color:var(--cc-muted)!important}

html[data-theme="dark"] .client-workspace-eyebrow{color:var(--cc-accent-text)!important}

html[data-theme="dark"] :where(.client-workspace-icon,.workspace-item-leading){
  background:var(--cc-surface-3)!important;
  color:var(--cc-text-soft)!important;
}
html[data-theme="dark"] :where(.client-workspace-icon.gold,.workspace-item-leading){
  background:var(--cc-gold-soft)!important;
  color:var(--cc-accent-text)!important;
}

html[data-theme="dark"] :where(.workspace-icon-button,.workspace-item-actions .workspace-edit-details>summary,.workspace-secret-toggle){
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text-soft)!important;
}
html[data-theme="dark"] :where(.workspace-icon-button:hover,.workspace-item-actions .workspace-edit-details>summary:hover,.workspace-secret-toggle:hover){
  background:var(--cc-surface-3)!important;
  border-color:var(--cc-border-strong)!important;
  color:var(--cc-accent-text)!important;
}
html[data-theme="dark"] .workspace-icon-button.danger:hover{
  background:rgba(220,38,38,.12)!important;
  border-color:rgba(248,113,113,.42)!important;
  color:#fca5a5!important;
}

html[data-theme="dark"] .workspace-visibility{
  background:var(--cc-surface-3)!important;
  color:var(--cc-muted)!important;
}
html[data-theme="dark"] .workspace-visibility.visible{
  background:rgba(34,197,94,.13)!important;
  color:#86efac!important;
}
html[data-theme="dark"] .workspace-visibility.private{
  background:var(--cc-surface-3)!important;
  color:var(--cc-muted)!important;
}
html[data-theme="dark"] .workspace-empty-inline{
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
}
html[data-theme="dark"] :where(.workspace-check-row,.workspace-note-actions){border-color:var(--cc-border)!important}
html[data-theme="dark"] .workspace-check-row.is-done strong{color:var(--cc-muted)!important}
html[data-theme="dark"] .workspace-secret-wrap input{color:var(--cc-text)!important}

/* Clientes — menus/controles que ainda herdavam branco no tema escuro. */
html[data-theme="dark"] :where(
  .client-search-control input,
  .client-select-control select,
  .client-action-menu summary,
  .client-action-popover,
  .client-detail-tabs,
  .client-avatar-logo,
  .client-detail-logo,
  .client-count-pill
){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text-soft)!important;
}
html[data-theme="dark"] :where(.client-action-menu summary:hover,.client-action-popover a:hover,.client-delete-action:hover,.client-project-row:hover,.client-user-row:hover){
  background:var(--cc-surface-3)!important;
}
html[data-theme="dark"] :where(.client-info-item>.material-symbols-outlined,.client-section-empty>.material-symbols-outlined){
  background:var(--cc-surface-3)!important;
  color:var(--cc-muted)!important;
}
html[data-theme="dark"] .client-danger-card{
  background:rgba(127,29,29,.10)!important;
  border-color:rgba(248,113,113,.22)!important;
}

/* =========================================================
   v6.48.0 · Perfil de marketing + auditoria dark de Tráfego Pago
   ========================================================= */
html[data-theme="dark"] :where(
  .marketing-profile-section,.marketing-profile-group,.marketing-profile-status,.marketing-profile-actions
){
  background:var(--cc-surface)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
  box-shadow:var(--cc-shadow-xs)!important;
}
html[data-theme="dark"] .marketing-profile-fields{background:var(--cc-surface-2)!important;border-color:var(--cc-border)!important}
html[data-theme="dark"] .marketing-profile-group>summary:hover{background:var(--cc-surface-2)!important}
html[data-theme="dark"] :where(.marketing-profile-fields input,.marketing-profile-fields textarea){background:var(--cc-surface)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.marketing-profile-heading p,.marketing-profile-group>summary small,.marketing-profile-callout p,.marketing-profile-actions p,.marketing-profile-status small,.marketing-profile-score span){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.marketing-profile-heading h2,.marketing-profile-group>summary strong,.marketing-profile-actions p strong,.marketing-profile-fields label>span){color:var(--cc-text)!important}
html[data-theme="dark"] .marketing-profile-callout{background:rgba(215,173,130,.08)!important;border-color:rgba(215,173,130,.26)!important}
html[data-theme="dark"] .marketing-profile-progress{background:var(--cc-surface-3)!important}

/* Google/Meta Ads: componentes ainda claros no painel do cliente e no admin. */
html[data-theme="dark"] :where(
  .gads-metrics article,
  .gads-filters,
  .gads-account-table-wrap,
  .gads-empty,
  .gads-oauth-note,
  .gads-oauth-message.is-info,
  .traffic-filter-btn,
  .gads-visible-create .gads-check-row,
  .traffic-source-count,
  .traffic-keyword-total,
  .traffic-keyword-page-btn:hover:not(:disabled)
){
  background:var(--cc-surface-2)!important;
  border-color:var(--cc-border)!important;
  color:var(--cc-text)!important;
}
html[data-theme="dark"] :where(
  .gads-link-form input,.gads-link-form select,
  .gads-filters input,.gads-filters select,
  .gads-csv-form input,.gads-csv-form select,
  .traffic-api-period-filter input,.traffic-api-period-filter select,
  .traffic-keyword-toolbar input
){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.gads-metrics small,.gads-metrics span,.gads-panel-head p,.gads-status-list span,.gads-table td small,.gads-last-update,.traffic-source-heading,.traffic-api-period-filter label>span,.traffic-platform-filter>span){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.gads-metrics strong,.gads-chart-card h3,.gads-panel-head h2,.gads-setup-head strong,.gads-table td strong,.gads-empty strong){color:var(--cc-text)!important}
html[data-theme="dark"] :where(.gads-status-list,.gads-status-list>div,.traffic-api-period-filter,.gads-account-table-wrap){border-color:var(--cc-border)!important}
html[data-theme="dark"] .traffic-filter-btn:not(.is-active):hover{background:var(--cc-surface-3)!important;color:var(--cc-text)!important;border-color:var(--cc-border-strong)!important}
html[data-theme="dark"] .traffic-filter-btn.is-active{background:var(--cc-gold)!important;border-color:var(--cc-gold)!important;color:#111!important}
html[data-theme="dark"] .gads-readonly-badge{background:var(--cc-gold-soft)!important;color:var(--cc-accent-text,#f2d6b3)!important}
html[data-theme="dark"] .gads-oauth-note{background:rgba(215,173,130,.08)!important;color:var(--cc-text-soft)!important}
html[data-theme="dark"] .gads-oauth-note small{color:var(--cc-muted)!important}
html[data-theme="dark"] .gads-empty{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .traffic-keyword-heat:not(.is-strong){color:var(--cc-text-soft)!important}
html[data-theme="dark"] .traffic-keyword-table th button:hover{background:rgba(255,255,255,.04)!important}
html[data-theme="dark"] :where(.traffic-platform-pill.is-google,.traffic-platform-pill.is-meta,.traffic-source-badge.is-api){background:rgba(66,133,244,.13)!important;color:#9fc2ff!important}
html[data-theme="dark"] :where(.traffic-source-badge.is-csv,.gads-source-badge.is-csv){background:rgba(215,173,130,.13)!important;color:#efc79f!important}
html[data-theme="dark"] .traffic-source-badge.is-csv_legacy{background:rgba(139,92,246,.14)!important;color:#c4b5fd!important}

/* v6.50.8 · Redes sociais — cobertura completa do modo dark */
html[data-theme="dark"] .sm-page{color-scheme:dark}
html[data-theme="dark"] :where(.sm-admin-clientbar,.sm-field input,.sm-field textarea,.sm-field select,.sm-platform-fieldset,.sm-reel-script-field,.sm-script,.sm-reference-preview-item,.sm-import-dropzone,.sm-import-template,.sm-content-brief section,.sm-copy-btn,.sm-import-dialog){background:var(--cc-surface)!important;border-color:var(--cc-border)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.sm-field input,.sm-field textarea,.sm-field select){background:var(--cc-surface-2)!important;border-color:var(--cc-border-strong)!important;color:var(--cc-text)!important}
html[data-theme="dark"] :where(.sm-field input::placeholder,.sm-field textarea::placeholder){color:var(--cc-muted)!important}
html[data-theme="dark"] :where(.sm-field>span,.sm-field legend,.sm-import-template p,.sm-content-brief section>div,.sm-script>div,.sm-caption){color:var(--cc-text-soft)!important}
html[data-theme="dark"] :where(.sm-field small,.sm-import-heading p:not(.sm-eyebrow),.sm-editor-section-title p){color:var(--cc-muted)!important}
html[data-theme="dark"] .sm-content-brief section{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .sm-import-dropzone,html[data-theme="dark"] .sm-import-template{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .sm-copy-btn:hover{border-color:var(--cc-gold)!important;color:var(--cc-gold)!important}
html[data-theme="dark"] .sm-script{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .sm-reel-script-field{background:var(--cc-surface-2)!important}
html[data-theme="dark"] .sm-admin-clientbar{background:var(--cc-surface)!important}
html[data-theme="dark"] .sm-service-state{border:1px solid var(--cc-border)!important}
html[data-theme="dark"] .sm-post-card.status-active{background:rgba(48,196,206,.12)!important;border-color:rgba(48,196,206,.32)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .sm-month-post.status-active{background:rgba(48,196,206,.12)!important;border-left-color:#58cbd2!important;color:var(--cc-text)!important}
html[data-theme="dark"] .sm-chip.status-active{background:rgba(48,196,206,.12)!important;color:#8ddfe4!important}
html[data-theme="dark"] .sm-import-result{background:rgba(24,134,75,.14)!important;border-color:rgba(80,191,122,.34)!important;color:#9be1b5!important}
html[data-theme="dark"] .sm-field select option{background:var(--cc-surface-2)!important;color:var(--cc-text)!important}
html[data-theme="dark"] .sm-btn-danger-outline{background:var(--cc-surface)!important;border-color:rgba(244,123,123,.38)!important;color:#ff9d9d!important}
html[data-theme="dark"] .sm-reference-file-icon{background:var(--cc-surface-3)!important;color:var(--cc-text-soft)!important}
