/* 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; }
}
