.chat-new-button{display:inline-flex;align-items:center;gap:6px;margin-left:auto;border:0;background:transparent;color:#0066ff;border-radius:9px;padding:8px 10px;font:600 12px Inter,sans-serif;cursor:pointer}.chat-new-button:hover{background:#eaf2ff}.chat-new-button+.chat-favorite-button{margin-left:4px}
.space-tasks{grid-column:1}.space-tasks>header>div small{display:block;color:#64748b;font-size:12px;margin-top:4px}.space-task-list{display:grid}.space-task-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto 12px;gap:10px;align-items:center;width:100%;border:0;border-bottom:1px solid #eff6ff;background:#fff;color:#64748b;text-align:left;padding:14px 17px}.space-task-row:last-child{border-bottom:0}.space-task-row:hover{background:#f8fafc}.space-task-row>span:first-child{display:grid;place-items:center;width:27px;height:27px;border-radius:8px;background:#eff6ff;color:#0066ff;font-size:17px}.space-task-row b{display:block;color:#334155;font-size:14px;font-weight:500;line-height:1.4}.space-task-row small{display:block;font-size:12px;margin-top:4px}.space-task-row time{font-size:12px;white-space:nowrap}.space-task-row i{font-style:normal}.space-task-empty{padding:22px;color:#64748b;font-size:14px}
.company-profile-intro{padding:30px;border-radius:18px;background:linear-gradient(135deg,#062d78,#0066ff 58%,#6b5cf6);color:#fff;margin-bottom:22px;overflow:hidden;position:relative}.company-profile-intro:after{content:'';position:absolute;width:210px;height:210px;border-radius:50%;right:-70px;top:-90px;background:#22c6f744}.company-profile-intro>span{font-size:12px;letter-spacing:.1em;color:#a8e8ff}.company-profile-intro h2{max-width:720px;font-size:25px;line-height:1.35;letter-spacing:-.6px;margin:14px 0 10px}.company-profile-intro p{max-width:760px;color:#dbeafe;line-height:1.65;margin:0}.company-profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;background:#f8fafc;border-radius:16px;padding:24px}.company-profile-form label{display:flex;flex-direction:column;gap:8px;color:#475569;font-size:14px}.company-profile-form input,.company-profile-form textarea{box-sizing:border-box;width:100%;border:1px solid #dbe4ef;border-radius:9px;background:#fff;color:#0f172a;padding:12px 13px;font:400 14px Inter,sans-serif}.company-profile-form textarea{resize:vertical;line-height:1.6}.company-profile-form small{font-size:12px;color:#64748b;line-height:1.5}.company-about{grid-column:1/-1}
.budget-kpis{margin-bottom:18px}.usage-charts{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:16px;margin:18px 0}.usage-charts>article{background:#f8fafc;border-radius:16px;padding:22px;min-width:0}.usage-charts header{display:flex;justify-content:space-between;gap:14px;align-items:start}.usage-charts h2{font-size:17px;margin:0 0 5px;color:#0f172a}.usage-charts header small{color:#64748b}.usage-charts header strong{color:#0066ff}.usage-line{height:160px;display:flex;align-items:end;gap:9px;margin-top:25px;border-bottom:1px solid #dbe4ef}.usage-line i{flex:1;min-width:8px;background:linear-gradient(180deg,#22c6f7,#0066ff);border-radius:6px 6px 0 0}.usage-charts footer{display:flex;justify-content:space-between;color:#94a3b8;font-size:11px;margin-top:8px}.team-usage{display:grid;gap:15px;margin-top:24px}.team-usage>span{display:grid;grid-template-columns:82px minmax(80px,1fr) 38px;gap:10px;align-items:center;font-size:12px}.team-usage b{font-weight:500}.team-usage i{height:8px;border-radius:99px;background:#e2e8f0;overflow:hidden}.team-usage em{display:block;height:100%;border-radius:inherit;background:#0066ff}.team-usage strong{font-weight:600}
.team-admin{background:#f8fafc;border-radius:16px;padding:22px;margin-bottom:20px}.team-admin>header{display:flex;justify-content:space-between;align-items:center;gap:18px}.team-admin h2{font-size:18px;margin:0 0 5px}.team-admin p{font-size:13px;color:#64748b;margin:0}.team-admin>header button{flex:none}#teamAdminList{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}#teamAdminList article{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:11px;align-items:center;background:#fff;border-radius:11px;padding:13px}.team-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eaf2ff;color:#0066ff;font-weight:700;font-size:12px}#teamAdminList b{display:block;font-size:14px}#teamAdminList small{display:block;color:#64748b;font-size:12px;margin-top:4px}#teamAdminList em{font-style:normal;color:#64748b;font-size:11px;text-align:right}.team-dialog p[role=alert]{color:#b42318;font-size:13px}
.flow-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:22px}.flow-summary article{background:#f8fafc;border-radius:13px;padding:18px}.flow-summary span{display:block;color:#64748b;font-size:11px;letter-spacing:.08em}.flow-summary strong{display:block;color:#0f172a;font-size:28px;margin:10px 0 5px}.flow-summary small{color:#64748b}.flow-open{border:0!important;background:transparent!important;text-align:left!important;padding:0!important;min-width:0}.flow-list .edit-flow,.flow-list .toggle-flow{min-height:40px;padding:10px 14px;font-weight:500}.flow-list .edit-flow{color:#0066ff;border-color:#cfe0ff;background:#f5f9ff}.flow-list .toggle-flow{min-width:85px}.flow-actions button{min-height:42px;padding:10px 15px!important;font-weight:600}.flow-form #addFlowStep{display:inline-flex;border:1px solid #cfe0ff;padding:9px 12px;color:#0066ff;background:#f5f9ff}.flow-form .inline-label{padding:13px 15px;background:#f8fafc;border-radius:9px}.flow-step>button{width:34px;height:34px;border-radius:8px!important}.flow-step>button:hover{background:#fee2e2;color:#b42318}
.view-toggle{margin-left:auto!important;display:flex!important;gap:4px!important;background:#f1f5f9;padding:3px;border-radius:8px}.view-toggle button{padding:7px 9px!important;border-radius:6px!important;color:#64748b!important}.view-toggle button.active{background:#fff!important;color:#0066ff!important;box-shadow:0 1px 3px #0f172a12}.workspace-grid.document-list-view{grid-template-columns:1fr}.workspace-grid.document-list-view>article{min-height:0;display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-rows:auto auto;gap:2px 14px;align-items:center;padding:14px 17px}.workspace-grid.document-list-view article>header{grid-row:1/3;display:block}.workspace-grid.document-list-view article>header em{display:none}.workspace-grid.document-list-view h3{margin:0;grid-column:2}.workspace-grid.document-list-view p{margin:3px 0;grid-column:2}.workspace-grid.document-list-view footer{grid-column:3;grid-row:1/3;margin:0}

html[data-theme="dark"]{color-scheme:dark;--ink:#e5edff;--line:#24324a}html[data-theme="dark"] body,html[data-theme="dark"] .app,html[data-theme="dark"] .b-main,html[data-theme="dark"] .p-work,html[data-theme="dark"] .page,html[data-theme="dark"] .workspace-page,html[data-theme="dark"] .shared-library{background:#08101f;color:#dbe7ff}html[data-theme="dark"] .b-sidebar,html[data-theme="dark"] .p-sidebar{background:#0d1728}html[data-theme="dark"] .product-rail{background:#091222}html[data-theme="dark"] .nav-section>summary:hover,html[data-theme="dark"] .b-sidebar nav button:hover,html[data-theme="dark"] .b-sidebar nav button.active{background:#132544!important}html[data-theme="dark"] .nav-section-title,html[data-theme="dark"] .b-sidebar .nav-section>summary{color:#63a1ff}html[data-theme="dark"] .b-sidebar nav button,html[data-theme="dark"] .sidebar-group>summary{color:#b5c4dd}html[data-theme="dark"] .space-card,html[data-theme="dark"] .space-task-row,html[data-theme="dark"] .space-document-link,html[data-theme="dark"] .workspace-grid>article,html[data-theme="dark"] .workspace-list,html[data-theme="dark"] .kanban-card,html[data-theme="dark"] .flow-list>article,html[data-theme="dark"] .connector-grid article,html[data-theme="dark"] .security-grid article,html[data-theme="dark"] .data-table,html[data-theme="dark"] .corp-messages article.ai-msg{background:#111c2f!important;border-color:#24324a!important}html[data-theme="dark"] .space-card>header,html[data-theme="dark"] .team-admin,html[data-theme="dark"] .company-profile-form,html[data-theme="dark"] .usage-charts>article,html[data-theme="dark"] .flow-summary article,html[data-theme="dark"] .kanban-column,html[data-theme="dark"] .simulation-note,html[data-theme="dark"] .flow-test,html[data-theme="dark"] .flow-step{background:#0d182a!important;border-color:#24324a!important}html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] b,html[data-theme="dark"] strong,html[data-theme="dark"] .space-conversation-open b,html[data-theme="dark"] .corp-messages article.ai-msg p{color:#e7efff!important}html[data-theme="dark"] p,html[data-theme="dark"] small,html[data-theme="dark"] label,html[data-theme="dark"] em,html[data-theme="dark"] span{border-color:#24324a}html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select,html[data-theme="dark"] .workspace-toolbar,html[data-theme="dark"] .composer,html[data-theme="dark"] .channel-compose{background:#111c2f!important;color:#e7efff!important;border-color:#34435d!important}html[data-theme="dark"] button{border-color:#34435d}html[data-theme="dark"] .view-toggle,html[data-theme="dark"] .task-status-label select{background:#0a1425!important}html[data-theme="dark"] .view-toggle button.active{background:#1b2a43!important}html[data-theme="dark"] #teamAdminList article{background:#111c2f}html[data-theme="dark"] .business-mobile-bar,html[data-theme="dark"] .corp-chat>header{background:#0d1728!important}html[data-theme="dark"] .mobile-bottom{background:#0d1728;border-color:#24324a}

@media(max-width:900px){.usage-charts{grid-template-columns:1fr}.company-profile-form{grid-template-columns:1fr}.company-about{grid-column:auto}#teamAdminList{grid-template-columns:1fr}.flow-summary{grid-template-columns:1fr}.workspace-toolbar .view-toggle{margin-top:8px!important}.space-tasks{grid-column:auto}}
@media(max-width:760px){.chat-new-button span{display:none}.chat-new-button{width:38px;height:36px;justify-content:center;padding:0}.company-profile-intro{padding:23px}.company-profile-intro h2{font-size:21px}.team-admin>header{align-items:flex-start;flex-direction:column}.team-admin>header button{width:100%}#teamAdminList article{grid-template-columns:36px minmax(0,1fr)}#teamAdminList em{grid-column:2;text-align:left}.flow-list>article{grid-template-columns:34px minmax(0,1fr)!important}.flow-list .flow-status{grid-column:2}.flow-list .edit-flow,.flow-list .toggle-flow{grid-column:2;width:100%}.workspace-grid.document-list-view>article{grid-template-columns:40px minmax(0,1fr);}.workspace-grid.document-list-view footer{grid-column:2;grid-row:auto;margin-top:8px}.space-task-row{grid-template-columns:28px minmax(0,1fr) 12px}.space-task-row time{display:none}}

/* Theme control lives with the product identity, not inside Help. */
.b-sidebar>header{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;gap:8px!important;align-items:center}
.sidebar-theme-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:6px!important;width:auto!important;min-width:38px;min-height:38px;padding:7px!important;border:1px solid #e2e8f0!important;border-radius:10px!important;background:#f8fafc!important;color:#475569!important;font:600 11px Inter,sans-serif!important;white-space:nowrap}
.sidebar-theme-toggle:hover{background:#eaf2ff!important;color:#0066ff!important}.theme-icon{font-size:16px;line-height:1}.theme-label{display:none}.drawer-close{grid-column:3}

/* Complete dark theme: background, raised surfaces, controls and readable text. */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#e8efff;
  --muted:#9babc3;
  --line:#283852;
  --dark-bg:#07101f;
  --dark-shell:#0a1425;
  --dark-surface:#101c30;
  --dark-raised:#14233a;
  --dark-hover:#172945;
  --dark-line:#283852;
}
/* The login screen (and the recovery dialog reachable from it) must never go dark,
   but several dark-theme rules key off `html[data-theme="dark"] <tag>` with
   !important and no `.login-mode` exclusion, so their text and inputs still turn
   near-white-on-white / dark-on-dark and become unreadable. Restore the exact
   light-theme values for the parts of the login flow those rules reach. */
html[data-theme="dark"] body.login-mode{--ink:#15202c;--muted:#73808c;--line:#dde3e7;color-scheme:light}
html[data-theme="dark"] .login-panel h1,
html[data-theme="dark"] .login-panel h2,
html[data-theme="dark"] .login-panel b,
html[data-theme="dark"] .login-panel strong,
html[data-theme="dark"] .recovery-dialog h2,
html[data-theme="dark"] .recovery-dialog b,
html[data-theme="dark"] .recovery-dialog strong{color:#0f172a!important}
html[data-theme="dark"] .login-panel p,
html[data-theme="dark"] .login-panel small,
html[data-theme="dark"] .recovery-dialog p,
html[data-theme="dark"] .recovery-dialog small{color:#64748b!important;border-color:#dde3e7!important}
html[data-theme="dark"] .login-panel label,
html[data-theme="dark"] .recovery-dialog label{color:#334155!important;border-color:#dde3e7!important}
html[data-theme="dark"] .login-panel p.login-demo-note{color:#94a3b8!important}
html[data-theme="dark"] .login-story p{color:#e2edff!important}
html[data-theme="dark"] .login-panel input,
html[data-theme="dark"] .login-panel textarea,
html[data-theme="dark"] .login-panel select,
html[data-theme="dark"] .recovery-dialog input{background:#fff!important;color:#0f172a!important;border-color:#dfe5ec!important}
html[data-theme="dark"] .login-panel button:not(.login-submit),
html[data-theme="dark"] .recovery-dialog button:not(.login-submit){border-color:#e2e8f0!important}
html[data-theme="dark"] body:not(.login-mode),
html[data-theme="dark"] .app,
html[data-theme="dark"] .p-work,
html[data-theme="dark"] .b-main,
html[data-theme="dark"] .pview,
html[data-theme="dark"] .bview,
html[data-theme="dark"] .page,
html[data-theme="dark"] .workspace-page,
html[data-theme="dark"] .shared-library,
html[data-theme="dark"] .documents,
html[data-theme="dark"] .personal-space-page,
html[data-theme="dark"] .profile-page,
html[data-theme="dark"] .support-page,
html[data-theme="dark"] .product-home,
html[data-theme="dark"] .business-home,
html[data-theme="dark"] .agent-studio-home,
html[data-theme="dark"] .channel-directory,
html[data-theme="dark"] .dm-page,
html[data-theme="dark"] .studio{background:var(--dark-bg)!important;color:var(--ink)!important}

html[data-theme="dark"] .b-sidebar,
html[data-theme="dark"] .p-sidebar,
html[data-theme="dark"] .product-rail,
html[data-theme="dark"] .prototype-switcher,
html[data-theme="dark"] .mobile-bar,
html[data-theme="dark"] .business-mobile-bar,
html[data-theme="dark"] .mobile-bottom{background:var(--dark-shell)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .b-sidebar .company-logo,
html[data-theme="dark"] .business-mobile-bar .brand-menu{background:transparent!important}
html[data-theme="dark"] .sidebar-theme-toggle{background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#c7d5ed!important}
html[data-theme="dark"] .sidebar-theme-toggle:hover{background:var(--dark-hover)!important;color:#7db0ff!important}
html[data-theme="dark"] .b-sidebar nav button,
html[data-theme="dark"] .sidebar-group>summary,
html[data-theme="dark"] .main-links button,
html[data-theme="dark"] .tree button{color:#b6c4da!important}
html[data-theme="dark"] .b-sidebar nav button:hover,
html[data-theme="dark"] .b-sidebar nav button.active,
html[data-theme="dark"] .sidebar-group summary:hover,
html[data-theme="dark"] .sidebar-group .sidebar-chat-link.active,
html[data-theme="dark"] .main-links button:hover,
html[data-theme="dark"] .main-links button.active{background:var(--dark-hover)!important;color:#78adff!important}
html[data-theme="dark"] .b-sidebar nav>span,
html[data-theme="dark"] .nav-section-title,
html[data-theme="dark"] .b-sidebar .nav-section>summary{color:#6fa7ff!important}

/* Chat and model/agent selection. */
html[data-theme="dark"] .chat-layout,
html[data-theme="dark"] .chat-flow,
html[data-theme="dark"] .corp-chat,
html[data-theme="dark"] .corp-chat>main,
html[data-theme="dark"] .corp-chat>main.has-messages,
html[data-theme="dark"] .messages,
html[data-theme="dark"] .corp-messages,
html[data-theme="dark"] .chat-flow{background:var(--dark-bg)!important;color:var(--ink)!important}
html[data-theme="dark"] .work-head,
html[data-theme="dark"] .corp-chat>header,
html[data-theme="dark"] .corp-composer{background:var(--dark-shell)!important;border-color:var(--dark-line)!important}
html[data-theme="dark"] .composer,
html[data-theme="dark"] .business-composer,
html[data-theme="dark"] .channel-compose,
html[data-theme="dark"] .dm-chat>form,
html[data-theme="dark"] #supportForm{background:var(--dark-surface)!important;border-color:#344765!important;box-shadow:0 10px 34px #0005,0 0 0 3px #101c30!important}
html[data-theme="dark"] .composer textarea,
html[data-theme="dark"] .channel-compose textarea,
html[data-theme="dark"] .dm-chat textarea,
html[data-theme="dark"] #supportPrompt{background:transparent!important;color:var(--ink)!important}
html[data-theme="dark"] .picker,
html[data-theme="dark"] .chat-attachment-menu,
html[data-theme="dark"] .chat-document-picker,
html[data-theme="dark"] .chat-document-list,
html[data-theme="dark"] .document-picker-search{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .picker>label,
html[data-theme="dark"] .picker>button:hover,
html[data-theme="dark"] .chat-document-list button:hover,
html[data-theme="dark"] .chat-attachment-menu button:hover{background:var(--dark-hover)!important}
html[data-theme="dark"] .corp-messages article.ai-msg,
html[data-theme="dark"] .messages article.ai-msg,
html[data-theme="dark"] .doc-chip,
html[data-theme="dark"] .message-attachment,
html[data-theme="dark"] .mock-chart,
html[data-theme="dark"] .mock-table-wrap{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .corp-messages article.user-msg{background:#075ed9!important;color:#fff!important}
html[data-theme="dark"] .corp-messages article.user-msg p,
html[data-theme="dark"] .corp-messages article.user-msg time{color:#fff!important}
html[data-theme="dark"] .starter-grid button,
html[data-theme="dark"] .chat-new-button:hover,
html[data-theme="dark"] .chat-favorite-button:hover{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:#cbd7ea!important}

/* Channels, threads and direct messages. */
html[data-theme="dark"] .channel-layout,
html[data-theme="dark"] .channel-chat,
html[data-theme="dark"] .channel-chat>main,
html[data-theme="dark"] .channel-messages,
html[data-theme="dark"] .thread,
html[data-theme="dark"] .thread-messages,
html[data-theme="dark"] .dm-chat,
html[data-theme="dark"] .dm-chat>main{background:var(--dark-bg)!important;color:var(--ink)!important;border-color:var(--dark-line)!important}
html[data-theme="dark"] .channel-list,
html[data-theme="dark"] .dm-list{background:var(--dark-shell)!important;border-color:var(--dark-line)!important}
html[data-theme="dark"] .channel-chat>header,
html[data-theme="dark"] .thread>header,
html[data-theme="dark"] .dm-chat>header,
html[data-theme="dark"] .directory-toolbar{background:var(--dark-shell)!important;border-color:var(--dark-line)!important}
html[data-theme="dark"] .channel-list>header button,
html[data-theme="dark"] .channel-chat>header button,
html[data-theme="dark"] .channel-switcher,
html[data-theme="dark"] .emoji-tray,
html[data-theme="dark"] .format-toolbar{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:#c8d5e8!important}
html[data-theme="dark"] .channel-list>button:hover,
html[data-theme="dark"] .channel-list>button.active,
html[data-theme="dark"] .dm-list button:hover,
html[data-theme="dark"] .dm-list button.active{background:var(--dark-hover)!important;color:var(--ink)!important}
html[data-theme="dark"] .day{border-color:var(--dark-line)!important}
html[data-theme="dark"] .day span{background:var(--dark-bg)!important;color:var(--muted)!important}
html[data-theme="dark"] .analysis-card,
html[data-theme="dark"] .shared-file,
html[data-theme="dark"] .channel-directory-row,
html[data-theme="dark"] .dm-chat main article p{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .channel-directory-row:hover,
html[data-theme="dark"] .dm-chat main article.sent p{background:var(--dark-hover)!important}

/* Documents, spaces, dashboards, Kanban, flows and administration. */
html[data-theme="dark"] .space-card,
html[data-theme="dark"] .space-task-row,
html[data-theme="dark"] .space-document-link,
html[data-theme="dark"] .workspace-grid>article,
html[data-theme="dark"] .workspace-list,
html[data-theme="dark"] .workspace-list article,
html[data-theme="dark"] .drive-toolbar,
html[data-theme="dark"] .drive-folders article,
html[data-theme="dark"] .quick-grid>button,
html[data-theme="dark"] .business-quick>button,
html[data-theme="dark"] .personal-history button,
html[data-theme="dark"] .kanban-card,
html[data-theme="dark"] .flow-list>article,
html[data-theme="dark"] .connector-grid article,
html[data-theme="dark"] .security-grid article,
html[data-theme="dark"] .data-table,
html[data-theme="dark"] .people-table,
html[data-theme="dark"] .budget-hero,
html[data-theme="dark"] .kpi-grid article,
html[data-theme="dark"] .profile-form,
html[data-theme="dark"] .profile-options,
html[data-theme="dark"] .profile-summary,
html[data-theme="dark"] .training-hero{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .space-card>header,
html[data-theme="dark"] .workspace-toolbar,
html[data-theme="dark"] .team-admin,
html[data-theme="dark"] .company-profile-form,
html[data-theme="dark"] .usage-charts>article,
html[data-theme="dark"] .flow-summary article,
html[data-theme="dark"] .kanban-column,
html[data-theme="dark"] .simulation-note,
html[data-theme="dark"] .flow-test,
html[data-theme="dark"] .flow-step,
html[data-theme="dark"] #teamAdminList article,
html[data-theme="dark"] .support-conversation,
html[data-theme="dark"] .support-next,
html[data-theme="dark"] #supportRequests article{background:var(--dark-shell)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .workspace-list article:hover,
html[data-theme="dark"] .space-task-row:hover,
html[data-theme="dark"] .personal-history button:hover{background:var(--dark-hover)!important}
html[data-theme="dark"] .view-toggle,
html[data-theme="dark"] .task-status-label select,
html[data-theme="dark"] .board-toolbar select,
html[data-theme="dark"] .board-toolbar button,
html[data-theme="dark"] .team-button{background:var(--dark-shell)!important;border-color:var(--dark-line)!important;color:#b9c7dc!important}
html[data-theme="dark"] .view-toggle button.active{background:var(--dark-raised)!important;color:#75aaff!important;box-shadow:none!important}

/* Channel header member cluster: stacked avatar chips instead of raw initials text. */
.people-avatars{display:flex;align-items:center;margin-right:8px}
.people-avatars .avatar,.people-avatars .avatar-more{width:24px;height:24px;border-radius:50%;font-size:10px;font-weight:700;border:2px solid #fff;margin-left:-8px;flex:none}
.people-avatars .avatar:first-child{margin-left:0}
.people-avatars .avatar-more{display:grid;place-items:center;background:#eef2f6;color:#64748b}
html[data-theme="dark"] .people-avatars .avatar,
html[data-theme="dark"] .people-avatars .avatar-more{border-color:var(--dark-shell)!important}
html[data-theme="dark"] .people-avatars .avatar-more{background:var(--dark-raised)!important;color:#c7d5ed!important}

/* Secondary action buttons in page/section headers (period pickers, "Nova conversa", "Arquivo"...). */
html[data-theme="dark"] .page-head>button:not(.primary),
html[data-theme="dark"] .workspace-head>button:not(.primary),
html[data-theme="dark"] .workspace-actions button:not(.primary){background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#c7d5ed!important}
html[data-theme="dark"] .page-head>button:not(.primary):hover,
html[data-theme="dark"] .workspace-head>button:not(.primary):hover,
html[data-theme="dark"] .workspace-actions button:not(.primary):hover{background:var(--dark-hover)!important}

/* Full audit sweep: every remaining light/white surface found by walking the whole
   DOM in dark mode and flagging computed backgrounds close to white. Grouped by
   the two repeating patterns in this codebase: small icon/badge chips (soft tint
   background behind a glyph or short label) and larger card/button surfaces. */

/* Icon and badge chips. */
html[data-theme="dark"] .agent-bg,
html[data-theme="dark"] .agent-orb,
html[data-theme="dark"] .item-icon,
html[data-theme="dark"] .flow-icon,
html[data-theme="dark"] .space-chat-icon,
html[data-theme="dark"] .support-avatar,
html[data-theme="dark"] .agent-origin,
html[data-theme="dark"] .support-mode,
html[data-theme="dark"] .channel-symbol,
html[data-theme="dark"] .privacy-badge,
html[data-theme="dark"] .domain-badge,
html[data-theme="dark"] .team-mark,
html[data-theme="dark"] .profile-role,
html[data-theme="dark"] .flow-status,
html[data-theme="dark"] .quick-grid i,
html[data-theme="dark"] .b-sidebar nav em,
html[data-theme="dark"] .mock-table th,
html[data-theme="dark"] .chat-attach-button,
html[data-theme="dark"] .connect-action,
html[data-theme="dark"] .config-summary span,
html[data-theme="dark"] .doc-chip>span,
html[data-theme="dark"] .shared-file>span{background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#8ab6ff!important}

/* Cards, lists, dialogs and action buttons with a hardcoded light/white background. */
html[data-theme="dark"] .select-row,
html[data-theme="dark"] .readiness,
html[data-theme="dark"] .source-list,
html[data-theme="dark"] .access-list,
html[data-theme="dark"] .feed-list,
html[data-theme="dark"] .shared-tree,
html[data-theme="dark"] .recent-page-list,
html[data-theme="dark"] .continue-card,
html[data-theme="dark"] .support-message,
html[data-theme="dark"] .channel-actions,
html[data-theme="dark"] .attachment-preview,
html[data-theme="dark"] .chat-attachment-preview,
html[data-theme="dark"] .admin-grid>article,
html[data-theme="dark"] .budget-grid>article,
html[data-theme="dark"] .workspace-toolbar label,
html[data-theme="dark"] label.search,
html[data-theme="dark"] .workspace-grid footer button,
html[data-theme="dark"] .people-table article>button,
html[data-theme="dark"] .chat-document-picker>nav button,
html[data-theme="dark"] .mock-upload,
html[data-theme="dark"] .dm-people-button,
html[data-theme="dark"] .open-folder,
html[data-theme="dark"] .open-shared-folder,
html[data-theme="dark"] .share-action,
html[data-theme="dark"] #krewiaLogout,
html[data-theme="dark"] #closeRecovery,
html[data-theme="dark"] #newDm,
html[data-theme="dark"] #minimizeDm,
html[data-theme="dark"] #direct-messages>header>button,
html[data-theme="dark"] #backAgentStudio,
html[data-theme="dark"] #testAgent,
html[data-theme="dark"] #agent-editor .page-head>button,
html[data-theme="dark"] #closeChatDocumentPicker{background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#c7d5ed!important}
html[data-theme="dark"] .chat-document-picker>nav button.active{background:var(--dark-hover)!important;color:#78adff!important}

/* Second audit pass: stragglers found after re-scanning with the fixes above applied. */
html[data-theme="dark"] .chat-attachment-menu>button>span,
html[data-theme="dark"] .flow-form legend b,
html[data-theme="dark"] .support-suggestions button,
html[data-theme="dark"] .model-guide-dialog>header>button{background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#8ab6ff!important}
html[data-theme="dark"] .dm-chat>header button,
html[data-theme="dark"] .flow-form .inline-label,
html[data-theme="dark"] .connector-grid article>button,
html[data-theme="dark"] .security-grid article>button,
html[data-theme="dark"] .chat-favorite-button{background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#c7d5ed!important}
html[data-theme="dark"] .chat-favorite-button:hover,
html[data-theme="dark"] .chat-favorite-button.active,
html[data-theme="dark"] .shared-tree>aside button.active,
html[data-theme="dark"] .business-bottom button.active{background:var(--dark-hover)!important;color:#78adff!important}
html[data-theme="dark"] .space-task-row>span:first-child{background:var(--dark-raised)!important;color:#8ab6ff!important}
html[data-theme="dark"] .bars i,
html[data-theme="dark"] .mock-chart i{background:var(--dark-line)!important}

/* Agent studio and common elevated surfaces. */
html[data-theme="dark"] .studio-head,
html[data-theme="dark"] .studio-tabs,
html[data-theme="dark"] .studio-body,
html[data-theme="dark"] .studio-panel,
html[data-theme="dark"] .studio-surface,
html[data-theme="dark"] .agent-form,
html[data-theme="dark"] .agent-test{background:var(--dark-bg)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .studio-summary,
html[data-theme="dark"] .studio-summary article,
html[data-theme="dark"] .studio-catalog article:not(.featured),
html[data-theme="dark"] .source-list article,
html[data-theme="dark"] .config-summary,
html[data-theme="dark"] .access-list article,
html[data-theme="dark"] .test-window{background:var(--dark-surface)!important;border-color:var(--dark-line)!important;color:var(--ink)!important}
html[data-theme="dark"] .hub-agent-catalog article h3,
html[data-theme="dark"] .hub-agent-catalog article p{color:#fff!important}

/* Forms, tables, dialogs and secondary text. */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{background:var(--dark-surface)!important;color:var(--ink)!important;border-color:#344765!important}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#7586a1!important}
html[data-theme="dark"] .favorite-dialog,
html[data-theme="dark"] .work-dialog,
html[data-theme="dark"] .experience-dialog,
html[data-theme="dark"] .recovery-dialog,
html[data-theme="dark"] .modal>div{background:var(--dark-surface)!important;color:var(--ink)!important;border-color:var(--dark-line)!important}
html[data-theme="dark"] .favorite-dialog footer,
html[data-theme="dark"] .work-dialog footer{border-color:var(--dark-line)!important}
html[data-theme="dark"] .favorite-dialog footer button:not(.primary),
html[data-theme="dark"] .text-action,
html[data-theme="dark"] .flow-list button,
html[data-theme="dark"] .flow-actions button{background:var(--dark-raised)!important;border-color:var(--dark-line)!important;color:#c4d1e5!important}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] b,
html[data-theme="dark"] strong,
html[data-theme="dark"] .page-head h1,
html[data-theme="dark"] .space-conversation-open b{color:#edf3ff!important}
html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] label,
html[data-theme="dark"] time,
html[data-theme="dark"] .people,
html[data-theme="dark"] .space-conversation-open small{color:var(--muted)!important}
html[data-theme="dark"] .primary,
html[data-theme="dark"] button.primary{background:#0b6cff!important;color:#fff!important;border-color:#0b6cff!important}

@media(max-width:760px){
  html[data-theme="dark"] .b-sidebar{background:var(--dark-shell)!important}
}

/* Model transparency without making the primary selector technical. */
.picker>button.model-guide-link{display:flex;grid-template-columns:1fr!important;justify-content:flex-start;width:calc(100% - 10px);margin:8px 5px 3px;padding:12px!important;border-top:1px solid #e2e8f0!important;border-radius:0!important;color:#0066ff!important;background:transparent!important;font-size:12px;font-weight:600}.picker>button.model-guide-link:hover{background:#f5f9ff!important;border-radius:8px!important}
.model-guide-dialog{width:min(760px,calc(100vw - 28px));max-height:88dvh;overflow:auto;border:0;border-radius:20px;padding:0;background:#fff;color:#0f172a;box-shadow:0 28px 90px #14213d3d}.model-guide-dialog::backdrop{background:#07101f99;backdrop-filter:blur(4px)}.model-guide-dialog>header{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:25px 28px 19px;border-bottom:1px solid #e8edf4}.model-guide-dialog>header small{display:block;color:#0066ff;font-size:11px;font-weight:700;letter-spacing:.1em;margin-bottom:7px}.model-guide-dialog h2{font-size:24px;letter-spacing:-.6px;margin:0}.model-guide-dialog>header>button{width:35px;height:35px;border:0;border-radius:50%;background:#eff5ff;color:#0066ff;font-size:22px}.model-guide-intro{font-size:14px;line-height:1.65;color:#5b6b82;margin:20px 28px}.model-tier-list{display:grid;gap:10px;padding:0 28px 25px}.model-tier-list>article{display:grid;grid-template-columns:48px minmax(0,1fr);gap:15px;padding:18px;border:1px solid #e3eaf3;border-radius:14px;background:#fbfcff}.model-tier-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:13px;color:#fff;font-size:20px}.model-tier-icon.automatic{background:linear-gradient(145deg,#0066ff,#6b5cf6)}.model-tier-icon.advanced{background:linear-gradient(145deg,#3023ae,#8b5cf6)}.model-tier-list article header{display:flex;align-items:center;justify-content:space-between;gap:12px}.model-tier-list h3{font-size:17px;margin:0}.model-tier-list article header em{font-style:normal;font-size:11px;color:#0066ff;background:#eaf2ff;border-radius:99px;padding:5px 8px}.model-tier-list article p{font-size:13px;line-height:1.6;color:#5b6b82;margin:8px 0 12px}.model-chips{display:flex;flex-wrap:wrap;gap:6px}.model-chips span{font-size:11px;color:#52647c;background:#eef3f9;border-radius:6px;padding:5px 7px}.model-models{display:flex;flex-direction:column;gap:5px;border-top:1px solid #e6ebf2;padding-top:11px}.model-models b{font-size:11px;color:#34445d}.model-models span{font-size:12px;line-height:1.5;color:#64748b}.model-guide-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 28px 24px;background:#f8faff}.model-guide-dialog>footer p{max-width:540px;font-size:11px;line-height:1.55;color:#64748b;margin:0}.model-guide-dialog>footer button{flex:none}
html[data-theme="dark"] .picker>button.model-guide-link{border-color:var(--dark-line)!important;color:#78adff!important}html[data-theme="dark"] .picker>button.model-guide-link:hover{background:var(--dark-hover)!important}html[data-theme="dark"] .model-guide-dialog,html[data-theme="dark"] .model-tier-list>article{background:var(--dark-surface)!important;color:#edf3ff!important;border-color:var(--dark-line)!important}html[data-theme="dark"] .model-guide-dialog>header,html[data-theme="dark"] .model-models{border-color:var(--dark-line)!important}html[data-theme="dark"] .model-guide-intro,html[data-theme="dark"] .model-tier-list article p,html[data-theme="dark"] .model-models span{color:#aebdd3!important}html[data-theme="dark"] .model-chips span,html[data-theme="dark"] .model-tier-list article header em{background:var(--dark-raised)!important;color:#8ab6ff!important}html[data-theme="dark"] .model-guide-dialog>footer{background:var(--dark-shell)!important}
@media(max-width:600px){.model-guide-dialog>header{padding:21px 18px 16px}.model-guide-dialog h2{font-size:21px}.model-guide-intro{margin:17px 18px}.model-tier-list{padding:0 18px 20px}.model-tier-list>article{grid-template-columns:39px minmax(0,1fr);padding:14px;gap:11px}.model-tier-icon{width:39px;height:39px;border-radius:11px}.model-tier-list article header{align-items:start;flex-direction:column;gap:6px}.model-guide-dialog>footer{align-items:stretch;flex-direction:column;padding:16px 18px 20px}.model-guide-dialog>footer button{width:100%}}

/* Meu espaço: prioridade às tarefas e categorias com identidade Krewia. */
.personal-space-page .space-card>header h2{display:inline-flex;align-items:center;width:max-content;min-height:31px;margin:0;padding:6px 10px;border-radius:8px;color:#fff;font-size:13px;font-weight:700;letter-spacing:.015em;box-shadow:0 5px 14px #0066ff1c}
.personal-space-page .space-tasks>header h2{background:linear-gradient(135deg,#0066ff,#2456db)}
.personal-space-page .space-recent>header h2{background:linear-gradient(135deg,#069bd2,#22c6f7)}
.personal-space-page .space-favorites>header h2{background:linear-gradient(135deg,#6654e8,#8b5cf6)}
.personal-space-page .space-documents>header h2{background:linear-gradient(135deg,#075fe8,#5968ec)}
html[data-theme="dark"] .personal-space-page .space-card>header h2{color:#fff!important}
