/* Controls stay in document flow and wrap when the global assistant is open. */
.wb-toolbar-identity-sr,.wb-toolbar-title-only {
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}
.wb-toolbar-panel { padding:10px 12px!important; border:1px solid hsl(var(--border))!important; background:hsl(var(--surface))!important; border-radius:10px!important; box-shadow:none!important; }
.wb-toolbar-line { display:flex!important;flex-wrap:wrap;align-items:center!important;gap:8px!important;min-width:0; }
.wb-toolbar-line>.relative { flex:1 1 240px;max-width:none!important;min-width:160px; }
.wb-toolbar-line>.relative input,.wb-tools-filter>.relative input { padding-left:32px!important; }
.wb-toolbar-actions { display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px!important;min-width:0; }
.wb-toolbar-line>.wb-toolbar-actions { margin-left:auto; }
.wb-toolbar-panel>.wb-toolbar-summary { margin-top:6px; }
.wb-toolbar-summary>p { margin:0!important;font-size:12px!important;line-height:18px!important;color:hsl(var(--muted-foreground)); }
.wb-toolbar-actions>button,.wb-toolbar-actions>a { min-height:32px; }
.wb-content-toolbar { display:flex!important;flex-direction:row!important;flex-wrap:wrap;align-items:center!important;justify-content:space-between;gap:8px;padding:12px 16px!important; }
.wb-content-toolbar>:not([hidden])~:not([hidden]) { margin-top:0!important; }
.wb-toolbar-caption { min-width:0; }
.wb-toolbar-caption h3 { font-size:14px;line-height:20px; }
.wb-toolbar-caption>.wb-toolbar-summary { margin-top:3px; }
.wb-document-toolbar { display:flex;flex-wrap:wrap;align-items:center!important;gap:8px!important; }
.wb-document-toolbar>.wb-toolbar-actions { margin-left:auto; }
.wb-tools-filter { display:flex;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;padding:10px 12px;border:1px solid hsl(var(--border));border-radius:10px;background:hsl(var(--surface)); }
.wb-tools-filter>.relative { flex:1 1 240px;max-width:none!important;min-width:180px; }
.wb-tools-context { display:flex;flex-basis:100%;flex-wrap:wrap;align-items:center;gap:8px!important;font-size:11px;color:hsl(var(--muted-foreground)); }
/* CRM: quantity, search and creation form one line; filters remain fully visible. */
.crm-filter-top { flex-wrap:wrap;gap:8px!important; }
.crm-filter-top>.crm-search { flex:1 1 240px;min-width:180px; }
.crm-filter-top>.wb-crm-summary { flex:0 0 auto; }
.wb-crm-summary .crm-mark,.wb-crm-summary>p { display:none!important; }
.wb-crm-summary .crm-total { font-size:12px!important;white-space:nowrap; }
.crm-filter-top>.crm-heading-actions { margin-left:auto; }
.crm-filter-top .crm-date-filter { flex-shrink:0; }
.crm-filters { border-radius:12px 12px 0 0; }
.crm-surface { container-type:inline-size;container-name:crm-panel; }
.crm-toolbar,.crm-toolbar-actions { flex-wrap:wrap;gap:8px;min-width:0; }
@container crm-panel (max-width:900px) { .crm-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@container crm-panel (max-width:520px) { .crm-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* Avoid a detached navigation strip in growth and in the site editor. */
.wb-growth-toolbar { justify-content:flex-start!important;min-height:0!important;border:0!important; }
.wb-growth-toolbar>.wb-growth-actions { display:flex;flex:1 1 auto;flex-wrap:wrap;width:100%;gap:8px!important; }
.wb-growth-mode { margin-right:auto; }
.wb-growth-toolbar .wb-growth-actions>button,.wb-growth-toolbar .wb-growth-actions>a { height:34px;font-size:12px; }
.wb-editor-toolbar { padding:7px 10px!important;min-height:0;border:1px solid hsl(var(--border));border-radius:10px;background:hsl(var(--surface)); }
/* The connected-page panel already contains this destination in both states. */
.wb-facebook-duplicate-header { display:contents!important; }
.wb-facebook-duplicate-header>button,.wb-facebook-duplicate-header>a { display:none!important; }
.wb-facebook-layout section.border-t[aria-label="Facebook 公共主页连接状态"] { padding:10px 12px;border:1px solid hsl(var(--border));border-radius:10px;background:hsl(var(--surface)); }
.wb-facebook-layout section.border-t[aria-label="Facebook 公共主页连接状态"]>div>div { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 12px; }
.wb-facebook-layout section.border-t[aria-label="Facebook 公共主页连接状态"] :is(h3,p) { grid-column:1;margin:0!important; }
.wb-facebook-layout section.border-t[aria-label="Facebook 公共主页连接状态"] :is(a,button) { grid-column:2;grid-row:1/span 3;margin:0!important;justify-self:end;align-self:center; }
/* Settings had padding on the hidden title wrapper instead of the page. */
.wb-settings-layout { padding:12px 18px!important; }
.wb-settings-layout>.wb-compact-settings { height:0!important;min-height:0!important;padding:0!important;margin:0!important; }
.wb-settings-layout>.wb-compact-settings+* { margin-top:0!important; }
.wb-settings-layout>:not([hidden])~:not([hidden]) { margin-top:12px; }
.wb-settings-layout>div:has(>a[href^="/settings/"]) { gap:3px;padding:0 0 3px; }
.wb-settings-layout>div:has(>a[href^="/settings/"])>a { padding:8px 11px;font-size:12px; }
/* Cost filters and refresh share the same surface; collector status stays visible. */
.platform-costs .pc-filters { flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border:1px solid hsl(var(--border));border-radius:10px;background:hsl(var(--surface)); }
.platform-costs .pc-filter-right { flex-wrap:wrap;gap:8px; }
.platform-costs .wb-cost-actions { display:flex;align-items:center;gap:7px!important; }
.platform-costs .wb-cost-actions button { height:32px; }
.platform-costs .pc-period { flex-wrap:wrap; }
.collector-health { padding:14px 16px!important; }
.collector-health__stats { gap:10px!important;margin-top:12px!important; }
.role-editor { gap:12px; }
.role-editor .role-intro { padding:12px 16px;gap:10px; }
.role-editor .role-eyebrow { display:none; }
.role-editor .role-intro h2 { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
.role-editor .role-intro p { margin:0;font-size:12px;line-height:20px; }
.role-editor .role-summary { gap:10px; }
.role-editor .role-summary>div { padding:12px 14px; }
.wb-tenant-header { display:flex;align-items:center!important;flex-wrap:wrap;gap:8px 16px!important; }
.wb-tenant-summary { flex:1 1 320px; }
.wb-tenant-summary>p { font-size:12px!important;line-height:18px;margin-top:5px!important; }
.wb-tenant-header>div:last-child { gap:6px; }
.wb-tenant-header button { height:32px;font-size:12px;padding-inline:11px; }
.channel-onboarding>.wb-channel-header { min-height:0;padding:0;margin:0; }
.channel-onboarding>.wb-channel-header:not(:has(a,button)) { display:contents; }
.channel-onboarding>.wb-channel-header+* { margin-top:0!important; }
.channel-onboarding>.wb-channel-header:has(a,button)+* { margin-top:8px!important; }
.channel-onboarding { gap:12px; }
/* Campaign view/edit/detail actions remain beside their local heading. */
.outreach-panel-heading>.wb-toolbar-actions { margin-left:auto; }
.outreach-panel-heading>.wb-toolbar-actions>.outreach-actions { gap:6px; }
.outreach-panel-heading h2 { margin:0; }
.outreach-panel-heading p { margin-top:4px; }
.outreach-page .outreach-btn { min-height:32px;padding:7px 11px;font-size:12px; }
/* TikTok account, quota and test restrictions keep their original text and rules. */
.wb-tiktok-account-body { padding:12px 14px!important; }
.wb-tiktok-account-body>:not([hidden])~:not([hidden]) { margin-top:8px!important; }
.wb-tiktok-account-row { gap:8px 12px!important; }
.wb-tiktok-identity { flex:0 1 220px;min-width:150px;font-size:12px; }
.wb-tiktok-identity p { margin-top:4px!important;font-size:12px!important; }
.wb-tiktok-account-fields { display:flex;flex-wrap:wrap;align-items:center;gap:8px!important; }
.wb-tiktok-account-fields>* { margin-top:0!important; }
.wb-tiktok-account-fields select { flex:1 1 180px;min-width:150px;height:34px!important;max-width:360px;font-size:12px; }
.wb-tiktok-account-card>:last-child { padding:10px 14px!important; }
.wb-tiktok-connection-card { padding:12px 14px!important;gap:10px!important; }
.wb-tiktok-publisher>:not([hidden])~:not([hidden]) { margin-top:10px; }
.wb-tiktok-refresh { display:contents!important; }
.wb-tiktok-tabs-heading { padding:0!important; }
/* Conversation identity and contextual actions share a row whenever space fits. */
.inbox-chat-header { display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 16px!important; }
.inbox-chat-header>:first-child { flex:1 1 230px;min-width:200px; }
.inbox-chat-header>:last-child { margin-top:0!important;min-width:0; }
.inbox-chat-header .inbox-toolbar { gap:4px!important;border:0;padding:2px!important;box-shadow:none;background:transparent; }
@media(max-width:1023px){
 .wb-toolbar-line>.wb-toolbar-actions { justify-content:flex-start; }
 .crm-filter-top>.crm-heading-actions { flex-wrap:wrap; }
 .pc-updated { display:none; }
}
@media(max-width:767px){
 .wb-toolbar-line>.relative,.crm-filter-top>.crm-search { flex-basis:100%;min-width:0; }
 .wb-toolbar-line>.wb-toolbar-actions,.crm-filter-top>.crm-heading-actions { margin-left:0; }
 .wb-toolbar-actions { justify-content:flex-start; }
 .wb-settings-layout { padding:10px 12px!important; }
 .wb-tiktok-identity { flex-basis:100%; }
 .wb-content-toolbar { padding:10px 12px!important; }
}

/* A focused visual layer over the verified workbench, shared by every theme. */
:root:not(.dark):has(.app-shell-premium) {
  --background: 220 24% 97%;
  --surface: 0 0% 100%; --card: 0 0% 100%; --popover: 0 0% 100%;
  --foreground: 222 27% 16%; --card-foreground: 222 27% 16%; --popover-foreground: 222 27% 16%;
  --muted: 220 20% 96%; --muted-foreground: 218 12% 43%;
  --border: 220 18% 89%; --input: 220 20% 96%; --shadow: 222 30% 16%;
  --glass-surface: 0 0% 100%; --glass-tint: 220 20% 97%; --glass-border: 220 18% 89%;
}
.app-shell-premium { --visual-edge: hsl(var(--border)); --visual-shadow: 0 1px 3px hsl(var(--shadow) / .035), 0 8px 24px -18px hsl(var(--shadow) / .12); background: hsl(var(--background))!important; }
.app-shell-premium::before,.app-shell-premium::after,
.app-shell-premium .dashboard-page::before,.app-shell-premium .dashboard-page::after,
.app-shell-premium .dashboard-panel::before,.app-shell-premium .dashboard-panel::after,
.app-shell-premium .dashboard-kpi-card::before,.app-shell-premium .dashboard-kpi-card::after,
.app-shell-premium .dashboard-command-panel::before { display:none!important; }

/* The dark navigation establishes a stable frame, without colouring the data. */
.app-shell-premium .app-sidebar.sidebar-refined {
  background:#141d2b!important; border-color:#141d2b!important; color:#d0d7e1;
  box-shadow:none!important; backdrop-filter:none!important;
}
.app-shell-premium .app-sidebar::after,.app-shell-premium .app-sidebar-header::after { display:none!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-sidebar-header { background:transparent; border-bottom:1px solid #ffffff0c; box-shadow:none; }
.app-shell-premium .app-sidebar.sidebar-refined .app-sidebar-brand { color:#f4f6fa!important; font-size:17px; letter-spacing:.025em; }
.app-shell-premium .app-sidebar.sidebar-refined .app-sidebar-subtitle { color:#99a7ba!important; letter-spacing:.04em; }
.app-shell-premium .app-sidebar.sidebar-refined .app-sidebar-logo { background:hsl(var(--primary))!important; border-radius:10px; box-shadow:0 2px 5px #0002; }
.app-shell-premium .app-sidebar.sidebar-refined .app-sidebar-nav { scrollbar-color:#435165 transparent; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-section-title { color:#94a3b8!important; font-size:10px; font-weight:500; letter-spacing:.08em; }
.app-shell-premium .app-sidebar .app-nav-section-title>span:empty { background:#ffffff12!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-item { color:#c4cfdd!important; border-radius:8px; font-size:13px; font-weight:450; border-color:transparent!important; box-shadow:none!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-icon { color:#9cacbf!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-icon-box { background:transparent!important; border:0!important; box-shadow:none!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-item:hover { background:#ffffff08!important; color:#fff!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-item-active,
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-item-active:hover { background:#ffffff12!important; color:#fff!important; font-weight:600; box-shadow:inset 2px 0 hsl(var(--primary))!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-item-active .app-nav-icon { color:#fff!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-meta { color:#b5c1d0!important; background:#ffffff08!important; border-color:#ffffff15!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-nav-pending { color:#efc89e!important; background:#d8a56718!important; }
.app-shell-premium .app-sidebar.sidebar-refined .tf-nav-badge { color:#f5d2a8!important; background:#e0ac5b20!important; border-color:#e0ac5b25!important; box-shadow:none!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-sidebar-footer { background:#141d2b!important; border-color:#ffffff0e!important; }
.app-shell-premium .app-sidebar.sidebar-refined .app-user-card { color:#f4f6fa; background:#ffffff05!important; border-color:#ffffff0f!important; border-radius:9px; box-shadow:none!important; }
.app-shell-premium .app-sidebar .app-user-card .text-muted-foreground { color:#a7b4c5!important; }
.app-shell-premium .app-sidebar-header>button { color:#99a7ba!important; }
.app-shell-premium .app-sidebar-header>button:hover { color:#fff!important; background:#ffffff10!important; }

/* Quiet chrome, clean content surfaces and one consistent control treatment. */
.app-shell-premium .app-topbar { background:hsl(var(--surface))!important; border-color:hsl(var(--border) / .72)!important; box-shadow:none!important; backdrop-filter:none!important; }
.app-shell-premium .app-topbar::after { display:none!important; }
.app-shell-premium .app-topbar .app-search { border:1px solid hsl(var(--border) / .7); border-radius:8px!important; box-shadow:none!important; background:hsl(var(--muted) / .55)!important; background-image:none!important; }
.app-shell-premium .global-ai-sidebar { background:hsl(var(--surface))!important; background-image:none!important; border-color:hsl(var(--border))!important; box-shadow:none!important; }
.app-shell-premium .global-ai-sidebar::before { display:none!important; }
.app-shell-premium :is(.wb-toolbar-panel,.wb-tools-filter,.wb-editor-toolbar,.crm-surface,.customs-query-panel,.customs-result-panel,.outreach-panel,.dashboard-panel,.dashboard-kpi-card) {
  background:hsl(var(--surface))!important; background-image:none!important; border-color:var(--visual-edge)!important; border-radius:11px!important; box-shadow:var(--visual-shadow)!important; backdrop-filter:none!important;
}
.app-shell-premium :is(.wb-toolbar-panel,.wb-tools-filter,.wb-editor-toolbar) { box-shadow:0 1px 2px hsl(var(--shadow) / .025)!important; }
.app-shell-premium :is(.wb-toolbar-panel,.wb-toolbar-actions,.crm-toolbar,.crm-filter-top,.customs-result-header) :is(button,a),
.app-shell-premium :is(.crm-button,.outreach-btn,.mail-flow-button) { border-radius:7px!important; letter-spacing:0; font-weight:500; }
.app-shell-premium :is(.bg-primary,.customs-search-submit,.lead-contact-trigger) { box-shadow:0 1px 2px hsl(var(--shadow) / .1)!important; }
.app-shell-premium :is(.wb-toolbar-panel,.crm-filter-grid,.crm-date-filter,.crm-toolbar,.customs-filter-grid) :is(input,select) { border-radius:6px!important; background-color:hsl(var(--surface))!important; border-color:hsl(var(--border))!important; }
.app-shell-premium :is(button,a,input,select,textarea):focus-visible { outline:2px solid hsl(var(--ring) / .7); outline-offset:2px; }

/* Tables: readable type, subtle horizontal rhythm and stronger company names. */
.app-shell-premium .crm-workbench { --crm-line:hsl(var(--border)); --crm-soft:hsl(var(--primary) / .045); }
.app-shell-premium .crm-filters { background:hsl(var(--surface))!important; }
.app-shell-premium .crm-search { border-color:hsl(var(--border)); background:hsl(var(--muted) / .35); }
.app-shell-premium .crm-filter-grid>label { font-size:11px; color:hsl(var(--muted-foreground)); }
.app-shell-premium .crm-workbench :is(select,.crm-button,.mail-flow-button) { font-size:12px!important; }
.app-shell-premium .crm-search input { font-size:13px; }
.app-shell-premium .crm-toolbar { background:hsl(var(--surface)); }
.app-shell-premium .crm-result-summary strong { color:hsl(var(--foreground)); font-weight:650; }
.app-shell-premium :is(.crm-table,.customs-table) { font-size:12px; }
.app-shell-premium :is(.crm-table,.customs-table) th { background:hsl(var(--muted) / .75)!important; color:hsl(var(--muted-foreground))!important; font-size:11px!important; font-weight:600; border-right:0!important; border-bottom-color:hsl(var(--border))!important; }
.app-shell-premium :is(.crm-table,.customs-table) td { background:hsl(var(--surface))!important; border-left:0!important; border-right:0!important; border-bottom-color:hsl(var(--border) / .55)!important; }
.app-shell-premium :is(.crm-table,.customs-table) tbody tr:nth-child(even) td { background:color-mix(in srgb,hsl(var(--muted)) 25%,hsl(var(--surface)))!important; }
.app-shell-premium :is(.crm-table,.customs-table) tbody tr:hover td { background:color-mix(in srgb,hsl(var(--primary)) 3%,hsl(var(--surface)))!important; }
.app-shell-premium .crm-table tbody tr.selected td { background:color-mix(in srgb,hsl(var(--primary)) 6%,hsl(var(--surface)))!important; }
.app-shell-premium .crm-company-link { font-size:13px; font-weight:600; letter-spacing:-.01em; color:hsl(var(--foreground)); }
.app-shell-premium .crm-company-summary { color:hsl(var(--muted-foreground)); font-size:11px; }
.app-shell-premium .crm-tags :is(button,span) { border-radius:4px; background:hsl(var(--muted)); color:hsl(var(--muted-foreground)); }
.app-shell-premium .crm-pagination { background:hsl(var(--surface))!important; border-top-color:hsl(var(--border)); }
.app-shell-premium .crm-table-wrap { border-radius:0; }
.app-shell-premium :is(.crm-columns-menu,.crm-export-menu) { background:hsl(var(--surface)); border-color:hsl(var(--border)); box-shadow:0 12px 32px hsl(var(--shadow) / .12); }
.app-shell-premium .customer-attribution { font-size:11px; }

/* Keep customs compact while removing the full-page colour wash. */
.app-shell-premium .customs-surface { --customs-line:hsl(var(--border)); --customs-tint:hsl(var(--primary) / .035); background:transparent!important; }
.app-shell-premium .customs-surface::before,.app-shell-premium .customs-surface::after { display:none!important; }
.app-shell-premium .customs-query-panel { border-color:hsl(var(--border))!important; }
.app-shell-premium .customs-result-header,.app-shell-premium .customs-result-footer { background:hsl(var(--surface))!important; }
.app-shell-premium .customs-surface .customs-page-header nav { border:0!important; background:transparent!important; box-shadow:none!important; }
.app-shell-premium .customs-surface .customs-page-header nav>[aria-current=page] { background:hsl(var(--primary) / .07)!important; color:hsl(var(--primary))!important; border-radius:6px!important; }
.app-shell-premium .customs-search-form { background:transparent!important; }

/* Dashboard numbers and panels use the same quiet depth as the working pages. */
.app-shell-premium .dashboard-command-panel { background:transparent!important; box-shadow:none!important; border:0!important; backdrop-filter:none!important; }
.app-shell-premium .dashboard-command-panel h1 { color:hsl(var(--foreground)); font-weight:650; }
.app-shell-premium .dashboard-mini-stat { background:hsl(var(--surface))!important; border-color:hsl(var(--border))!important; box-shadow:none!important; }
.app-shell-premium .dashboard-kpi-value { letter-spacing:-.045em; font-weight:650; font-variant-numeric:tabular-nums; }
.app-shell-premium .dashboard-kpi-grid>*:last-child .dashboard-kpi-value { font-size:24px; line-height:32px; letter-spacing:-.025em; }
.app-shell-premium .dashboard-kpi-card:hover { transform:none!important; border-color:hsl(var(--primary) / .3)!important; }
.app-shell-premium .dashboard-kpi-card :is(.bg-surface,.bg-muted,.bg-primary-soft,.bg-ai-soft) { box-shadow:none!important; background-image:none!important; border-color:hsl(var(--border) / .5)!important; }
.app-shell-premium .dashboard-kpi-card :is(.text-muted-foreground,.text-primary,.text-ai) { text-shadow:none; }
.app-shell-premium .wb-compact-page [class~="border-t-4"] { border-top-width:2px!important; background:hsl(var(--muted) / .5); border-radius:10px; }
.app-shell-premium .wb-compact-page [class~="border-t-4"] [class~="bg-card"] { background:hsl(var(--surface)); box-shadow:0 1px 3px hsl(var(--shadow) / .035); }
.app-shell-premium :is(.crm-table,.customs-table,.pc-user-table,.outreach-table) { font-variant-numeric:tabular-nums; }
@media(prefers-reduced-motion:reduce) { .app-shell-premium .dashboard-kpi-card { transition:none!important; } }
