/* Matchboard shared visual system. Loaded last so business screens keep their existing layout logic. */
:root{
  --mb-bg:#f2f5f7;
  --mb-surface:#fff;
  --mb-surface-soft:#f8fafb;
  --mb-line:#dfe7eb;
  --mb-line-strong:#cddade;
  --mb-text:#173243;
  --mb-muted:#708694;
  --mb-navy:#102c3d;
  --mb-navy-2:#173b4e;
  --mb-teal:#0b9184;
  --mb-teal-dark:#08746b;
  --mb-teal-soft:#e8f6f3;
  --mb-blue:#3478e5;
  --mb-radius:14px;
  --mb-shadow:0 8px 24px rgba(18,48,64,.065);
  --mb-shadow-hover:0 13px 32px rgba(18,48,64,.105);
}
html{background:var(--mb-bg);color-scheme:light}
body{background:var(--mb-bg)!important;color:var(--mb-text);font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased}
::selection{background:#bceae1;color:#143443}
:where(button,input,select,textarea,a):focus-visible{outline:3px solid rgba(11,145,132,.18)!important;outline-offset:2px}

/* Navigation shell */
.app-shell>.sidebar,.dashboard>aside{
  background:linear-gradient(90deg,#0b2434 0%,#102f42 56%,#17485a 100%)!important;
  border-right:1px solid rgba(255,255,255,.055);
  box-shadow:8px 0 28px rgba(19,45,61,.06);
}
.brand{letter-spacing:-.2px}
.brand-logo{filter:drop-shadow(0 5px 10px rgba(0,25,55,.24))}
.brand b,.dashboard .brand>span{font-weight:760!important}
.dashboard.active{grid-template-columns:244px minmax(0,1fr)}
.dashboard aside>#workspaceSelector{box-sizing:border-box;width:100%;margin:18px 0 20px;padding:12px;border:1px solid rgba(132,181,197,.25);border-radius:10px;background:rgba(255,255,255,.055);box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
.dashboard aside>#workspaceSelector label{display:block;margin-bottom:7px;color:#a7bac8;font-size:11px}
.dashboard aside>#workspaceSelector select{width:100%;border:0;background:#20374a;color:#fff;font-size:13px;font-weight:400;outline:0;padding:5px 0;cursor:pointer}
.dashboard aside>#workspaceSelector+nav{margin-top:0}
@media(max-width:900px){.dashboard.active{grid-template-columns:1fr}}

/* Keep the buyer and workspace entry shells on identical desktop geometry. */
@media(min-width:901px){
  .app-shell>.sidebar,#dashboard>aside{box-sizing:border-box;padding:96px 18px 26px!important}
  .app-shell>.sidebar>.brand,#dashboard>aside>.brand{box-sizing:border-box;display:flex;align-items:center;flex:0 0 48px;height:48px;margin:0 0 28px!important;padding:0 6px!important;gap:12px!important}
  .app-shell>.sidebar>.brand b,#dashboard>aside>.brand>span{font-size:16px!important;line-height:1.2}
  .app-shell>.sidebar>.brand small,#dashboard>aside>.brand small{margin-top:3px!important;font-size:11px!important;line-height:1.2}
  .app-shell>.sidebar>#workspaceSelector,#dashboard>aside>#workspaceSelector{box-sizing:border-box;width:100%;min-height:82px;margin:0 0 20px!important;padding:12px!important}
  .app-shell>.sidebar>#workspaceNav,#dashboard>aside>#workspaceNav{margin-top:34px!important}
  .app-shell>main,#dashboard>main{box-sizing:border-box;padding:0 30px 36px!important}
}
.new-compare{border-radius:10px!important;background:linear-gradient(135deg,#13aa9c,#0b9184)!important;box-shadow:0 7px 18px rgba(4,145,131,.22)!important;transition:.2s ease}
.new-compare:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(4,145,131,.28)!important}
.page-tabs button,.dashboard nav button,#workspaceNav button{transition:background .18s,color .18s,transform .18s!important}
.page-tabs button:hover,.dashboard nav button:hover,#workspaceNav button:hover{transform:translateX(2px)}
.page-tabs button.active,.dashboard nav button.active,#workspaceNav button.active{
  background:linear-gradient(90deg,rgba(21,101,105,.92),rgba(26,72,88,.9))!important;
  color:#8ef1df!important;
  box-shadow:inset 3px 0 0 #43dac7;
}
#workspaceSelector{border-color:rgba(132,181,197,.25)!important;background:rgba(255,255,255,.055)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
#workspaceSelector select{background:transparent!important}

/* Page chrome */
.app-shell>main,.dashboard>main{background:radial-gradient(circle at 98% 0,rgba(27,170,155,.055),transparent 22%),var(--mb-bg)!important}
.topbar,#workspaceRoot .ws-header,.dashboard main>header{
  min-height:0!important;
  margin:14px 0 16px!important;
  padding:14px 17px!important;
  border:1px solid var(--mb-line)!important;
  border-radius:var(--mb-radius)!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:var(--mb-shadow)!important;
}
.topbar h1,#workspaceRoot .ws-header h1,.dashboard main>header h1{margin:0 0 3px!important;font-size:23px!important;line-height:1.25;letter-spacing:-.55px;color:var(--mb-text)!important}
.topbar p,#workspaceRoot .ws-header p,.dashboard main>header p{margin:0!important;color:var(--mb-muted)!important;line-height:1.55!important}
.top-account,.ws-user{border-left:1px solid var(--mb-line);padding-left:13px!important}

/* Controls */
button,.primary,.ghost,.filter-btn,.ws-btn{transition:background .18s,border-color .18s,color .18s,box-shadow .18s,transform .18s!important}
.primary,.ws-btn.primary{
  background:linear-gradient(135deg,#0da093,#0a8278)!important;
  border-color:#0b887e!important;
  color:#fff!important;
  box-shadow:0 5px 13px rgba(7,137,125,.16)!important;
}
.primary:hover,.ws-btn.primary:hover{transform:translateY(-1px);background:linear-gradient(135deg,#0b9589,#08736a)!important;box-shadow:0 8px 18px rgba(7,137,125,.23)!important}
.ghost,.filter-btn,.ws-btn:not(.primary){background:#fff!important;border-color:var(--mb-line-strong)!important;color:#405d6e!important}
.ghost:hover,.filter-btn:hover,.ws-btn:not(.primary):hover{background:#f5faf9!important;border-color:#8fc5bd!important;color:#08776d!important}
input,select,textarea{transition:border-color .18s,box-shadow .18s,background .18s}
input:hover,select:hover,textarea:hover{border-color:#b9cbd2!important}
input:focus,select:focus,textarea:focus{border-color:#51aea3!important;box-shadow:0 0 0 3px rgba(11,145,132,.1)!important;outline:0}

/* 总后台、子后台所有日期框：缩小日期文字并为日历图标保留空间。 */
input[type="date"]{
  box-sizing:border-box!important;
  min-width:120px;
  padding-left:10px!important;
  padding-right:8px!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper{
  padding:0!important;
  font-size:13px!important;
}
input[type="date"]::-webkit-calendar-picker-indicator{
  flex:0 0 auto;
  margin-left:4px;
}

/* Shared surfaces */
.api-card,.workspace-card,.daily-table-card,.overview-card,.summary-control-card,.pull-card,
.buyer-create-card,.buyer-list-card,.ws-card,.dashboard .table-card,.dashboard .toolbar,
.dashboard .intro,.dashboard .config-list,.dashboard .config-actions,.dashboard .drop-card{
  border:1px solid var(--mb-line)!important;
  border-radius:var(--mb-radius)!important;
  background:var(--mb-surface)!important;
  box-shadow:var(--mb-shadow)!important;
}
.ws-card,.overview-card,.dashboard .table-card{overflow:hidden}
.ws-card{margin-bottom:15px!important}
.ws-card-head,.table-head,.overview-card-title{
  background:linear-gradient(180deg,#fff,#fbfcfd)!important;
  border-bottom:1px solid #e9eff2!important;
}
.ws-card-head{padding:16px 18px!important}
.ws-card-head h2,.table-head h2,.overview-card-title h3{font-weight:750!important;letter-spacing:-.2px;color:#1b394a!important}

/* Data cards */
.overview-kpis article,.buyer-overview-kpis article,.metrics article,.summary article,.ws-kpi{
  position:relative;
  overflow:hidden;
  border:1px solid var(--mb-line)!important;
  border-radius:12px!important;
  background:linear-gradient(145deg,#fff 55%,#f7fafb)!important;
  box-shadow:0 5px 17px rgba(18,48,64,.055)!important;
}
.overview-kpis article:before,.buyer-overview-kpis article:before,.metrics article:before,.summary article:before,.ws-kpi:before{
  content:"";position:absolute;left:0;top:0;width:100%;height:3px;background:linear-gradient(90deg,#16a99a,#5acbbf);opacity:.76
}
.overview-kpis article:hover,.buyer-overview-kpis article:hover,.metrics article:hover,.ws-kpi:hover{transform:translateY(-2px);box-shadow:var(--mb-shadow-hover)!important}
.overview-kpis article,.buyer-overview-kpis article,.metrics article,.ws-kpi{transition:transform .2s,box-shadow .2s}
.ws-kpi:first-child{background:linear-gradient(135deg,#16394c,#146067)!important;border-color:#195565!important}
.ws-kpi:first-child:before{background:#58decd}
.ws-kpi b{font-weight:760!important;font-variant-numeric:tabular-nums}
.overview-kpis,.buyer-overview-kpis{grid-template-columns:repeat(5,minmax(150px,1fr))!important}
#overviewPage .overview-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
#overviewPage .overview-grid>.overview-card{min-width:0}
#overviewPage .overview-grid>.overview-card:first-child{grid-column:span 3}
#overviewPage .overview-grid>.overview-card:last-child{grid-column:span 2}
@media(max-width:1100px){#overviewPage .overview-grid{grid-template-columns:1fr}#overviewPage .overview-grid>.overview-card{grid-column:1/-1}}
.overview-kpis article.spend-highlight,.buyer-overview-kpis article.spend-highlight{background:linear-gradient(135deg,#16394c,#146067)!important;border-color:#195565!important;color:#fff!important;box-shadow:0 10px 24px rgba(16,75,83,.16)!important}
.overview-kpis article.spend-highlight:before,.buyer-overview-kpis article.spend-highlight:before{background:#58decd!important}
.overview-kpis article.spend-highlight span,.overview-kpis article.spend-highlight small,.buyer-overview-kpis article.spend-highlight span,.buyer-overview-kpis article.spend-highlight small{color:#c4dadd!important}
.overview-kpis article.spend-highlight b,.buyer-overview-kpis article.spend-highlight b{color:#fff!important}

/* Workspace management: compact cards and legible tables */
#workspaceRoot{max-width:100%;padding-bottom:28px!important}
.ws-team-strip{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(220px,280px));
  justify-content:start;
  align-items:stretch!important;
  gap:12px!important;
  padding:16px 18px!important;
  background:#fbfcfd;
}
.ws-team-strip>span{grid-column:1/-1;margin:0!important;padding:14px 0;color:#7f929e!important;text-align:center}
.ws-team-pill{
  min-height:62px;
  justify-content:space-between;
  padding:12px 13px!important;
  border-color:#dce7eb!important;
  border-radius:10px!important;
  background:linear-gradient(145deg,#fff,#f5f9fa)!important;
  box-shadow:0 4px 12px rgba(25,55,70,.045);
}
.ws-team-pill:before{content:"";width:8px;height:8px;border-radius:50%;background:#20ad9d;box-shadow:0 0 0 4px #e3f6f2;flex:0 0 auto}
.ws-team-pill>div{margin-right:auto}.ws-team-pill b{font-size:13px!important}.ws-team-pill small{line-height:1.5}
.ws-table-scroll{background:#fff}
.ws-table th,.ws-table td{padding:13px 15px!important;border-bottom-color:#e9eff2!important}
.ws-table th{background:#f4f8f9!important;color:#617b8a!important;font-weight:700!important;text-transform:none;box-shadow:inset 0 -1px 0 #dde7ea}
.ws-table tbody tr:nth-child(even) td{background:#fcfdfd}
.ws-table tbody tr:hover td{background:#f1faf8!important}
.ws-table tbody tr:last-child td{border-bottom:0!important}
.ws-table td.ws-name{color:#193d50!important;font-weight:720!important}
.ws-table-tools,.ws-pager{background:#fbfcfd}
.ws-tag{border:1px solid transparent;border-radius:999px!important;padding:3px 8px!important;font-weight:620}
.ws-tag.good{border-color:#d3eee5}.ws-tag.warn{border-color:#f3e4c4}.ws-tag.off{border-color:#e5e8ea}
.ws-count-heading{display:flex;align-items:center;gap:8px}.ws-count-heading .ws-heading-count{flex:0 0 auto;margin:0;font-size:10px;letter-spacing:0}
.ws-empty{position:relative;padding:58px 22px!important;background:linear-gradient(180deg,#fff,#fafcfc)}
.ws-empty:before{content:"";display:block;width:96px;height:58px;margin:0 auto 15px;border-radius:18px;background-color:#edf9f7;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='58' viewBox='0 0 96 58' fill='none'%3E%3Cpath d='M9 40C17 35 21 30 29 33C37 36 41 27 49 25C57 23 61 29 69 21C74 16 79 14 87 12' stroke='%2363D2C5' stroke-opacity='.22' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M9 40C17 35 21 30 29 33C37 36 41 27 49 25C57 23 61 29 69 21C74 16 79 14 87 12' stroke='%230C988A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;box-shadow:inset 0 0 0 1px #d4ece8,0 8px 22px rgba(12,152,138,.10)}
.ws-filter-card{box-shadow:0 5px 16px rgba(18,48,64,.045)!important}
.ws-report-filters{background:#fff;scrollbar-width:thin}
.ws-report-filters>.ws-filter-control{background:#fbfcfd!important}
.ws-dialog{border:1px solid #d6e1e5!important;border-radius:18px!important;box-shadow:0 28px 70px rgba(10,34,49,.24)!important}
.ws-dialog-head{background:linear-gradient(180deg,#fff,#fafcfd)}
.ws-dialog .ws-dialog-foot{background:#f7fafb!important}

/* Legacy/admin tables */
.table-wrap,.overview-table-wrap{scrollbar-width:thin;scrollbar-color:#b9cbd1 transparent}
table th{background:#f4f8f9!important;color:#627d8c!important;font-weight:700!important}
table td{border-bottom-color:#e9eff2!important}
tbody tr:hover td{background:#f2faf8!important}
.toolbar{border-color:var(--mb-line)!important;background:rgba(255,255,255,.96)!important;box-shadow:0 5px 16px rgba(18,48,64,.045)!important}
.overview-hero,.buyer-overview-hero{
  border-radius:14px!important;
  background:linear-gradient(115deg,#12354a 0%,#115e61 72%,#0b8278 100%)!important;
  box-shadow:0 10px 27px rgba(16,65,75,.15)!important;
}
.api-intro{border-radius:14px!important;background:linear-gradient(115deg,#12354a,#115f62)!important;box-shadow:0 10px 26px rgba(17,61,73,.14)!important}
.config-row,.buyer-item{border-color:#e1e9ec!important;border-radius:10px!important;background:#fbfcfd!important;transition:border-color .18s,box-shadow .18s,transform .18s}
.config-row:hover,.buyer-item:hover{border-color:#a9cec8!important;box-shadow:0 7px 18px rgba(18,65,73,.07);transform:translateY(-1px)}

/* Automatic pull plans remain compact but gain clearer grouping. */
.schedule-status-card{border-radius:14px!important;box-shadow:0 7px 20px rgba(24,70,83,.055)!important}
.schedule-status-card .schedule-main{font-variant-numeric:tabular-nums}

/* Child dashboard */
.dashboard main>header{position:relative!important;top:auto!important;z-index:5}
.dashboard .account{border-top-color:rgba(255,255,255,.1)!important}
.dashboard .table-card,.dashboard .toolbar,.dashboard .intro,.dashboard .config-list,.dashboard .config-actions{margin-bottom:15px}
.dashboard .metrics article b,.buyer-overview-kpis article b{font-variant-numeric:tabular-nums;letter-spacing:-.45px}

/* 子后台统计卡片保持独立，不再使用连体网格外框。 */
.dashboard .metrics{
  gap:12px!important;
  overflow:visible!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.dashboard .metrics>article{
  border:1px solid var(--mb-line)!important;
  border-radius:12px!important;
}

/* 每日数据详情：日期筛选和数据源摘要合并为一个板块 */
.daily-detail-control-panel{
  display:grid;
  grid-template-columns:minmax(520px,.85fr) minmax(570px,2.15fr);
  gap:14px;
  align-items:stretch;
  margin-top:14px;
  padding:12px;
  border:1px solid var(--mb-line,#dce7ea);
  border-radius:14px;
  background:#fff;
  box-shadow:0 6px 20px rgba(18,48,64,.055);
}
.daily-detail-date-bar{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  overflow:visible!important;
  gap:10px!important;
  align-content:center!important;
  min-width:0;
  margin:0!important;
  padding:4px 2px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.toolbar-date-filter{
  flex:0 0 auto;
  width:auto;
  padding:0!important;
  border-right:0!important;
}
.daily-detail-date-bar>input[type="date"]{
  width:120px;
  min-width:120px;
  height:38px;
  border:1px solid #d3dde2;
  border-radius:8px;
  padding:0 10px;
  background:#fff;
  color:inherit;
  font:inherit;
}
.toolbar-date-filter>.sync-countdown,.toolbar-date-filter>.countdown{display:none!important}
.daily-detail-date-bar>.daily-detail-load-status{
  order:10;
  flex:0 0 100%;
  width:100%;
  margin:0!important;
  padding-top:2px;
  align-self:auto!important;
  color:#71818a;
  font-size:11px;
  line-height:1.5;
  text-align:left;
  white-space:normal!important;
}
.daily-detail-date-bar>.daily-detail-load-status:empty,
#resultCount[hidden],#syncResultCount[hidden]{display:none!important}
.match-view-select{
  width:108px;
  min-width:108px;
  height:38px;
  border:1px solid #d7dee4;
  border-radius:7px;
  background:#fff;
  color:#43505c;
  padding:0 10px;
  font:inherit;
}
.daily-detail-source-overview{
  align-self:stretch;
  margin:0!important;
}
.daily-detail-source-overview>div{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  background:#f8fbfb!important;
}

@media(max-width:1400px){
  .daily-detail-control-panel{grid-template-columns:1fr}
}

@media(max-width:1100px){
  .topbar,#workspaceRoot .ws-header,.dashboard main>header{align-items:flex-start!important}
  .ws-team-strip{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
}
@media(max-width:720px){
  .topbar,#workspaceRoot .ws-header,.dashboard main>header{margin:10px 0 12px!important;padding:13px!important;border-radius:12px!important}
  .topbar h1,#workspaceRoot .ws-header h1,.dashboard main>header h1{font-size:20px!important}
  .top-account,.ws-user{border-left:0;padding-left:0!important}
  .ws-card{border-radius:12px!important}.ws-card-head{padding:14px!important}
  .ws-team-strip{grid-template-columns:1fr;padding:13px!important}
  .ws-table th,.ws-table td{padding:11px 12px!important}
  .overview-kpis article,.buyer-overview-kpis article,.metrics article,.ws-kpi{border-radius:10px!important}
}

@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* Daily and selected-range KPI hierarchy. */
.ws-kpi-section{margin:0 0 14px}.ws-kpi-section-head{display:flex;align-items:baseline;gap:9px;margin:0 2px 9px}.ws-kpi-section-head b{font-size:15px;color:#1b3c4d}.ws-kpi-section-head small{font-size:11px;color:#80939f}.ws-kpi-section .ws-kpis{margin-bottom:0}

/* Keep every desktop workspace title on one left-aligned, gently inset rail. */
@media(min-width:901px){
  .sidebar .page-tabs button,
  #dashboard aside nav button,
  #workspaceNav button{
    display:flex;
    align-items:center;
    justify-content:flex-start!important;
    padding-left:30px!important;
    padding-right:14px!important;
    text-align:left!important;
  }
  #workspaceNav small{
    padding-left:30px;
    padding-right:14px;
    text-align:left;
  }
}

/* Unified custom select: soft menu, teal selection, no native blue popup. */
.mb-select{position:relative;display:inline-flex;align-items:center;min-width:112px;height:36px;vertical-align:middle;isolation:isolate}
.mb-native-select{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;opacity:0!important;pointer-events:none!important}
.mb-select-trigger{position:relative!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0 35px 0 13px!important;border:1px solid #d5e2e5!important;border-radius:10px!important;background:#fff!important;box-shadow:0 2px 7px rgba(18,54,68,.035)!important;color:#263f50!important;font:inherit!important;font-size:12px!important;font-weight:500!important;text-align:left!important;white-space:nowrap!important;cursor:pointer!important;transition:border-color .18s,box-shadow .18s,background .18s!important}
.mb-select-trigger>span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mb-select-trigger:after{content:'';position:absolute;right:14px;top:50%;width:6px;height:6px;border-right:1.7px solid #496473;border-bottom:1.7px solid #496473;transform:translateY(-68%) rotate(45deg);transition:transform .18s}
.mb-select.open .mb-select-trigger,.mb-select-trigger:focus-visible{border-color:#38bdae!important;box-shadow:0 0 0 3px rgba(34,179,164,.13)!important;outline:0!important}
.mb-select.open .mb-select-trigger:after{transform:translateY(-30%) rotate(225deg)}
.mb-select-trigger.placeholder{color:#738894!important}.mb-select-trigger:disabled{cursor:not-allowed!important;background:#f3f6f7!important;color:#9aa8af!important}
.mb-select-menu{box-sizing:border-box;position:fixed;z-index:12000;max-height:286px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:7px;border:1px solid #dce5e8;border-radius:12px;background:rgba(255,255,255,.985);box-shadow:0 14px 38px rgba(18,47,61,.17),0 3px 10px rgba(18,47,61,.07);scrollbar-width:thin;scrollbar-color:#c4d4d8 transparent}
.mb-select-menu[hidden]{display:none!important}
.mb-select-search{box-sizing:border-box;width:100%;height:36px;margin:0 0 6px;padding:0 11px;border:1px solid #d5e2e5;border-radius:8px;background:#fff;color:#294553;font:inherit;font-size:12px;outline:0}.mb-select-search:focus{border-color:#38bdae;box-shadow:inset 0 0 0 1px #38bdae}.mb-select-options{display:grid;gap:0}
.mb-select-option{display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0 12px!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;color:#314956!important;font:inherit!important;font-size:12px!important;font-weight:500!important;text-align:left!important;white-space:nowrap!important;cursor:pointer!important;transform:none!important}
.mb-select-option:hover,.mb-select-option:focus-visible{background:#f0f7f6!important;color:#087f75!important;outline:0!important}
.mb-select-option.selected{background:#e4f5f2!important;color:#087f75!important;font-weight:700!important}
.mb-select-option:disabled{opacity:.45;cursor:not-allowed!important}.mb-select-group{padding:9px 12px 5px;color:#8797a0;font-size:10px;font-weight:700}
label>.mb-select,.ws-field>.mb-select,#workspaceSelector>.mb-select,#workspaceSelector label+.mb-select{width:100%}
.ws-filter-card .mb-select,.ws-filters .mb-select{min-width:120px}.table-pagination .mb-select{width:76px;min-width:76px;height:38px}.table-pagination .mb-select-trigger{height:38px!important;min-height:38px!important;padding-left:10px!important}
.ws-report-filters .mb-select:hover,.ws-report-filters .mb-select.open{z-index:3}.ws-report-filters .mb-select:hover>.mb-select-trigger,.ws-report-filters .mb-select.open>.mb-select-trigger{border-color:#38bdae!important;box-shadow:inset 0 0 0 1px #38bdae!important}
#workspaceSelector .mb-select{height:34px}.source-auto-controls .mb-select{width:auto;min-width:145px}.summary-control-card .mb-select{width:auto;min-width:135px}
#workspaceSelector .mb-select-trigger{border-color:rgba(163,195,207,.26)!important;background:#20374a!important;box-shadow:none!important;color:#fff!important}.mb-select-menu .mb-select-option{color:#314956!important}
@media(max-width:720px){.mb-select-menu{border-radius:10px}.mb-select-option{height:42px!important;min-height:42px!important}}

/* Unified data lists: centered rhythm and clearer row hierarchy. */
table th,
table td,
.ws-table th,
.ws-table td,
.ws-table th:first-child,
.ws-table td:first-child,
.ws-table td.ws-name,
.ws-table td.ws-text,
.campaign-cell,
.api-history-dialog .history-message{
  text-align:center!important;
  vertical-align:middle!important;
}
table thead th,.ws-table thead th{
  height:44px;
  padding-top:10px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid #dce7ea!important;
  background:linear-gradient(180deg,#f7fafb 0%,#f2f7f8 100%)!important;
  color:#5e7887!important;
  font-size:11px!important;
  font-weight:750!important;
  letter-spacing:.012em;
}
table tbody td,.ws-table tbody td{
  min-height:48px;
  padding-top:13px!important;
  padding-bottom:13px!important;
  color:#344f5f;
  line-height:1.55;
  transition:background-color .16s ease,color .16s ease;
}
table tbody tr:nth-child(even) td,.ws-table tbody tr:nth-child(even) td{background:#fbfdfd}
table tbody tr:hover td,.ws-table tbody tr:hover td{background:#edf9f7!important;color:#1d4650}
table tbody tr:last-child td,.ws-table tbody tr:last-child td{border-bottom:0!important}
table td small,.ws-table td small{margin:4px auto 0!important;text-align:center!important}
table td .ws-tag,.ws-table td .ws-tag{margin-left:auto!important;margin-right:auto!important}

/* 总后台与子后台的手动匹配页：导出、清除操作使用常规字重。 */
#exportCsv,#clearImportedData,#buyerManualExport,#buyerManualClear{font-weight:400!important}

/* 总后台手动匹配无数据时不启用冻结列横向偏移，表头字段无缝衔接。 */
.workspace-card .table-wrap.manual-table-empty .sticky-col,.workspace-card .table-wrap.manual-table-empty .sticky-name{left:auto!important}

/* Shared manual-match empty state for the admin and child dashboards. */
#emptyState.empty-state{box-sizing:border-box;padding:0;color:inherit}
#manualRows .manual-empty-cell{height:410px;padding:0!important;border-bottom:0!important;background:#fff!important;text-align:center!important;vertical-align:top}
.manual-empty-state{position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:min(460px,calc(100vw - 320px));min-width:300px;margin:78px auto 0;padding:28px 34px;border:1px solid #d9ece8;border-radius:18px;background:linear-gradient(145deg,#fbfefd 0%,#f1faf8 100%);box-shadow:0 12px 34px rgba(18,75,75,.08);font-size:inherit;color:inherit}
.manual-empty-icon{display:grid;place-items:center;width:64px;height:64px;margin-bottom:20px;border:1px solid #aee2d9;border-radius:18px;background:linear-gradient(145deg,#0d716f,#0a9b8c);box-shadow:0 10px 22px rgba(11,143,130,.2)}
.manual-empty-icon svg{width:37px;height:37px;overflow:visible;fill:none;stroke:#fff;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}
.manual-empty-state b{display:block;margin:0;color:#1f4450;font-size:16px;font-weight:700;line-height:1.5}
.manual-empty-state p{margin:9px 0 0;color:#789099;font-size:12px;line-height:1.7}
@media(max-width:700px){#manualRows .manual-empty-cell{height:330px}.manual-empty-state{width:min(380px,calc(100vw - 48px));min-width:0;margin-top:52px;padding:24px}.manual-empty-icon{width:56px;height:56px;border-radius:16px}.manual-empty-icon svg{width:32px;height:32px}}
.ws-table td.ws-text{white-space:normal;line-height:1.6}
.ws-table td:last-child,.ws-table th:last-child,table td:last-child,table th:last-child{padding-left:18px!important;padding-right:18px!important}
.ws-table-scroll,.table-wrap,.daily-table-wrap,.overview-table-wrap,.buyer-compare-table-wrap,.summary-compare-wrap{
  border-color:#dfe8eb!important;
  scrollbar-color:#b8cbd0 transparent;
}
.ws-table-scroll{background:#fff}
.ws-card:has(.ws-table),.daily-table-card,.table-card{box-shadow:0 7px 22px rgba(20,57,72,.045)!important}
.summary-total td,.sync-total td,.result-summary-row td{
  background:#e9f3f4!important;
  color:#193f49!important;
  font-weight:800!important;
  border-top:1px solid #c8dcdf!important;
}
@media(max-width:720px){
  table thead th,.ws-table thead th{height:40px}
  table tbody td,.ws-table tbody td{min-height:44px;padding-top:11px!important;padding-bottom:11px!important}
}

/* Search fields and dropdown triggers share the 36px report-filter height. Height only. */
input[type="search"],
input[placeholder*="搜索"],
input[placeholder*="查找"],
input[placeholder*="筛选"],
#manualAccountSearch,
#accountSearch,
#manualSearch,
#search,
#campaignSearch,
#adminBmSearch,
#adminAdjustSearch,
#buyerBmSearch,
.search,
.campaign-search,
select:not([multiple]):not(.mb-native-select),
.mb-select,
.mb-select-trigger,
.checklist-select>summary,
.plain-buyer-select>summary,
.buyer-compare-picker>summary{
  box-sizing:border-box;
  height:38px!important;
  min-height:38px!important;
}

/* Global account and team management, shared by all business workspaces. */
.sidebar [data-page="admin"],#adminPage{display:none!important}
#workspaceGlobalNav{margin:18px 0 0;padding:18px 0 0;border-top:1px solid rgba(166,195,207,.15)}
#workspaceGlobalNav[hidden]{display:none!important}
#workspaceGlobalNav button{display:flex;align-items:center;gap:11px;width:100%;padding:13px 30px;border:0;border-radius:9px;background:transparent;color:#a9bdcd;font:inherit;font-weight:650;text-align:left;cursor:pointer;transition:background .18s,color .18s,transform .18s}
#workspaceGlobalNav button:hover{background:#203d50;color:#fff;transform:translateX(2px)}
#workspaceGlobalNav button.active{background:linear-gradient(90deg,rgba(21,101,105,.92),rgba(26,72,88,.9));color:#8ef1df;box-shadow:inset 3px 0 0 #43dac7}
.ws-global-nav-icon{display:grid;place-items:center;width:22px;height:22px;border:1px solid currentColor;border-radius:7px;font-size:13px;line-height:1}
.ws-org-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.ws-org-kpis article{position:relative;overflow:hidden;padding:19px 20px;border:1px solid #dce7ea;border-radius:13px;background:#fff;box-shadow:0 6px 20px rgba(18,48,64,.045)}
.ws-org-kpis article:first-child{background:linear-gradient(135deg,#17384b,#15535b);border-color:#1c4d5c;color:#fff}
.ws-org-kpis article:before{content:"";position:absolute;left:0;top:0;width:100%;height:3px;background:#55cdbf}
.ws-org-kpis span{display:block;color:#78909d;font-size:11px}.ws-org-kpis article:first-child span{color:#b4d1d7}
.ws-org-kpis b{display:block;margin:8px 0 6px;font-size:26px;line-height:1;font-variant-numeric:tabular-nums}
.ws-org-kpis small{color:#8a9ba4;font-size:10px}.ws-org-kpis article:first-child small{color:#a8c8cc}
.ws-org-team-grid{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:12px;padding:16px 18px 19px}
.ws-org-team{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:11px;padding:14px;border:1px solid #dfe9ec;border-radius:11px;background:linear-gradient(180deg,#fff,#fbfdfd);transition:border-color .18s,box-shadow .18s,transform .18s}
.ws-org-team:hover{border-color:#b8d9d5;box-shadow:0 8px 22px rgba(18,55,70,.07);transform:translateY(-1px)}
.ws-org-team.disabled{opacity:.65}.ws-org-team-mark{width:9px;height:9px;border-radius:50%;background:#1fbaa8;box-shadow:0 0 0 5px #e5f7f4}
.ws-org-team>div:nth-child(2){min-width:0}.ws-org-team>div:nth-child(2)>b{display:block;overflow:hidden;color:#244454;text-overflow:ellipsis;white-space:nowrap}.ws-org-team>div:nth-child(2)>small{display:block;margin-top:5px;color:#8798a1;font-size:10px}
.ws-org-leader{display:grid;grid-template-columns:30px auto;column-gap:7px;align-items:center;min-width:100px}.ws-org-leader>span{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#e7f5f2;color:#16897d;font-weight:800}.ws-org-leader small{color:#98a6ad;font-size:9px}.ws-org-leader b{color:#526b77;font-size:11px}
.ws-org-empty{padding:25px;text-align:center;color:#8a9aa3;font-size:11px}
.ws-account-filters{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1px solid #e7edef;background:#f8fbfb}
.ws-account-filters input,.ws-account-filters select{width:150px;border:1px solid #d5e2e5;border-radius:9px;background:#fff;padding:0 12px;color:#314b5a;font:inherit;outline:0}
.ws-account-filters input{width:240px}.ws-account-filters input:focus,.ws-account-filters select:focus{border-color:#38bdae;box-shadow:0 0 0 3px rgba(34,179,164,.13)}
.ws-account-identity{display:flex;align-items:center;justify-content:center;gap:10px}.ws-account-identity>span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#17384b;color:#fff;font-weight:800}
.ws-account-identity>div{text-align:left}.ws-account-identity b{display:block;color:#244454}.ws-account-identity small{display:block;margin-top:4px!important;color:#8a9ba4;font-size:9px}
.ws-module-tags{display:inline-flex;width:max-content;max-width:100%;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}.ws-module-tags .ws-tag{flex:0 0 auto;margin:0!important}.ws-row-actions{display:flex;align-items:center;justify-content:center;gap:7px;flex-wrap:wrap}.ws-account-table .ws-row-actions .ws-btn{min-width:64px;height:36px;padding:0 14px;border:1px solid transparent!important;border-radius:9px;color:#fff!important;font-weight:600!important;box-shadow:0 4px 11px rgba(24,65,72,.13);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}.ws-account-table .ws-row-actions .ws-btn[data-action="account"]{background:linear-gradient(135deg,#087c73,#19a99a)!important;border-color:#087c73!important}.ws-account-table .ws-row-actions .ws-btn[data-action="toggle-account"]{background:linear-gradient(135deg,#315866,#527986)!important;border-color:#315866!important}.ws-account-table tr[data-status="disabled"] .ws-row-actions .ws-btn[data-action="toggle-account"]{background:linear-gradient(135deg,#118b7f,#42b6a6)!important;border-color:#118b7f!important}.ws-account-table .ws-row-actions .ws-btn.ws-danger-link{background:linear-gradient(135deg,#a9565d,#c86d70)!important;border-color:#a9565d!important}.ws-account-table .ws-row-actions .ws-btn:hover,.ws-account-table .ws-row-actions .ws-btn:focus-visible{color:#fff!important;filter:brightness(.94);transform:translateY(-1px);box-shadow:0 6px 15px rgba(24,65,72,.2)}.ws-account-table .ws-row-actions .ws-btn:active{color:#fff!important;filter:brightness(.88);transform:translateY(0)}.ws-account-table .ws-row-actions .ws-btn:disabled{color:#70848c!important;background:#edf2f3!important;border-color:#d9e3e5!important;box-shadow:none!important;filter:none;transform:none}
.ws-account-table .ws-account-role,.ws-account-table .ws-module-text{color:#405d6b;font-weight:400}.ws-account-table .ws-account-status{font-weight:650}.ws-account-table .ws-account-status.is-enabled{color:#078c6f}.ws-account-table .ws-account-status.is-disabled{color:#7e8d94}.ws-account-table .ws-row-actions .ws-btn,.ws-account-table .ws-row-actions .ws-btn[data-action="account"],.ws-account-table .ws-row-actions .ws-btn[data-action="toggle-account"],.ws-account-table tr[data-status="disabled"] .ws-row-actions .ws-btn[data-action="toggle-account"],.ws-account-table .ws-row-actions .ws-btn.ws-danger-link{min-width:0;height:auto;padding:4px 6px;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#355968!important;font-weight:400!important;filter:none!important;transform:none!important}.ws-account-table .ws-row-actions .ws-btn.ws-danger-link{color:#c44d55!important}.ws-account-table .ws-row-actions .ws-btn:hover,.ws-account-table .ws-row-actions .ws-btn:focus-visible,.ws-account-table .ws-row-actions .ws-btn:active{border:0!important;background:transparent!important;box-shadow:none!important;color:#087f73!important;filter:none!important;transform:none!important;text-decoration:underline}.ws-account-table .ws-row-actions .ws-btn.ws-danger-link:hover,.ws-account-table .ws-row-actions .ws-btn.ws-danger-link:focus-visible{color:#a9343f!important}
.ws-account-form-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.ws-account-form-grid>label:nth-child(-n+3){grid-column:span 2}.ws-account-form-grid>label:nth-child(4),.ws-account-form-grid>label:nth-child(5){grid-column:span 3}.ws-account-form-grid>.wide{grid-column:1/-1}.ws-account-modules{grid-template-columns:repeat(3,minmax(0,1fr))}.ws-permission-option.locked{background:#f4f6f7;color:#88969d}.ws-module-lock{display:grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#e5eaec;color:#778890;font-size:10px;font-weight:700}
.ws-dialog:has(.ws-account-form-grid) form{padding-right:40px}.ws-dialog:has(.ws-account-form-grid) .ws-dialog-foot{margin-right:-40px;padding-right:40px}
.ws-finance-boundary{border:1px solid #dbe8e8}.ws-finance-boundary b{margin-right:8px;color:#24565b}
@media(max-width:1100px){.ws-org-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ws-org-team-grid{grid-template-columns:repeat(2,minmax(250px,1fr))}.ws-account-modules{grid-template-columns:1fr}}
@media(max-width:720px){#workspaceGlobalNav button{padding-left:20px}.ws-org-kpis,.ws-org-team-grid{grid-template-columns:1fr}.ws-account-filters{align-items:stretch;flex-direction:column}.ws-account-filters input,.ws-account-filters select{width:100%}.ws-org-team{grid-template-columns:auto minmax(0,1fr) auto}.ws-org-leader{display:none}.ws-header-actions>.ws-btn{flex:1}}

/* 侧边栏默认使用常规字重，仅当前选中的导航项强调。 */
.sidebar .new-compare,.sidebar .page-tabs button,#dashboard aside nav button,#workspaceNav button,#workspaceGlobalNav button,#workspaceSelector .mb-select-trigger{font-weight:400!important}
.sidebar .page-tabs button.active,#dashboard aside nav button.active,#workspaceNav button.active,#workspaceGlobalNav button.active{font-weight:700!important}
.sidebar .page-tabs button,#dashboard aside nav button,#workspaceNav button{display:flex;align-items:center;gap:11px}
.nav-item-icon,.sidebar button[data-page]:before{display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;color:currentColor;font-size:16px;font-weight:400!important;line-height:1}
.sidebar button[data-page]:before{content:'·'}
.sidebar button[data-page="overview"]:before{content:'▥'}.sidebar button[data-page="manual"]:before{content:'⇩'}.sidebar button[data-page="summary"]:before{content:'◷'}.sidebar button[data-page="sync"]:before{content:'↻'}.sidebar button[data-page="config"]:before{content:'⚙'}.sidebar button[data-page="admin"]:before{content:'♙'}
#dashboard aside button[data-page]:before{display:inline-grid;place-items:center;flex:0 0 18px;width:18px;height:18px;color:currentColor;content:'·';font-size:16px;font-weight:400!important;line-height:1}#dashboard aside button[data-page="overview"]:before{content:'▥'}#dashboard aside button[data-page="manual"]:before{content:'⇩'}#dashboard aside button[data-page="summary"]:before{content:'◷'}#dashboard aside button[data-page="sync"]:before{content:'↻'}#dashboard aside button[data-page="config"]:before{content:'⚙'}
body:not(.mb-unified-layout).ws-account-team-active.ws-active .sidebar>.page-tabs{display:flex!important}
body:not(.mb-unified-layout).ws-account-team-active.ws-active .sidebar>.new-compare{display:block!important}

/* 字段表头底色由 adaptive-list-layout.css 统一，避免末列脱离分区。 */

/* 每日数据详情：分组表头滚动吸顶后仍保留与字段表头之间的分割线。 */
.workspace-card thead .group-head th,
#syncPage .table-wrap thead .buyer-group-head th{
  border-bottom:1px solid #d6e4e6!important;
  box-shadow:inset 0 -1px 0 #d6e4e6;
}
.workspace-card thead .group-head+tr th,
#syncPage .table-wrap thead .buyer-group-head+tr th{
  border-top:1px solid #bfd2d6!important;
  box-shadow:inset 0 1px 0 #bfd2d6;
}

/* 子后台每日数据详情筛选栏沿用总后台比例：业务筛选约 2/3，Adjust 筛选约 1/3。 */
@media(min-width:1351px){
  #syncPage .sync-filters{
    min-height:56px;
    padding:10px calc(33% + 10px) 10px 14px;
    gap:12px;
  }
  #syncPage .sync-filters>.buyer-adjust-filters{
    width:33%;
    padding:10px 12px;
  }
}
#syncPage .toolbar-date-filter{
  display:contents!important;
}
#syncPage .toolbar-date-filter>input[type="date"],
#syncPage .toolbar-date-filter>button{
  flex:0 0 auto!important;
  margin:0!important;
  border-radius:8px!important;
}
#syncPage .toolbar-date-filter>input[type="date"]{
  width:120px!important;
  min-width:120px!important;
}
#syncPage .buyer-segmented[hidden]{display:none!important}

/* 批量广告户搜索始终限制在输入框内，内容通过内部滚动查看。 */
#searchInput,
#accountSearch,
#manualAccountSearch{
  box-sizing:border-box!important;
  resize:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  white-space:pre-wrap!important;
  overflow-wrap:normal!important;
  line-height:18px!important;
  contain:paint;
}
#searchInput{
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  padding-top:8px!important;
  padding-bottom:8px!important;
}
#accountSearch,
#manualAccountSearch{
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  padding-top:8px!important;
  padding-bottom:8px!important;
  scrollbar-width:none;
}
#accountSearch::-webkit-scrollbar,
#manualAccountSearch::-webkit-scrollbar{
  display:none;
  width:0;
  height:0;
}

/* “所有收入”数据列与普通数据列同底色，仅保留数值加粗。 */
#dataBody td.total-revenue,
#syncPage .table-wrap tbody td.total-revenue{
  background:#fff!important;
  background-image:none!important;
  color:#17212b!important;
  font-weight:800!important;
}
#dataBody tr:hover td.total-revenue,
#syncPage .table-wrap tbody tr:hover td.total-revenue{
  background:#f2faf8!important;
}

/* 数据行仅强调花费、0D 收入和所有收入；1D 收入保持常规字重。 */
#dataBody .data-row td:nth-child(4),
#dataBody .data-row td:nth-child(18),
#dataBody .data-row td:nth-child(20),
#syncRows tr:not(.sync-total) td:nth-child(3),
#syncRows tr:not(.sync-total) td:nth-child(17),
#syncRows tr:not(.sync-total) td:nth-child(19),
#manualRows .manual-data-row td:nth-child(4),
#manualRows .manual-data-row td:nth-child(18),
#manualRows .manual-data-row td:nth-child(20){font-weight:800!important}
#dataBody .data-row td:nth-child(19),
#syncRows tr:not(.sync-total) td:nth-child(18),
#manualRows .manual-data-row td:nth-child(19){font-weight:400!important}

/* 所有导航图标使用统一的圆角方框容器。 */
.nav-item-icon,.sidebar button[data-page]:before,#dashboard aside button[data-page]:before,#workspaceGlobalNav .ws-global-nav-icon{box-sizing:border-box!important;display:inline-grid!important;place-items:center!important;flex:0 0 22px!important;width:22px!important;height:22px!important;border:1px solid rgba(174,202,214,.58)!important;border-radius:6px!important;background:rgba(255,255,255,.025)!important;color:inherit!important;font-size:12px!important;font-weight:400!important;line-height:1!important;transition:border-color .18s,background-color .18s,box-shadow .18s!important}
.nav-item-icon svg{display:block;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.sidebar button[data-page]:hover:before,#dashboard aside button[data-page]:hover:before,#workspaceNav button:hover .nav-item-icon,#workspaceGlobalNav button:hover .ws-global-nav-icon{border-color:rgba(203,229,235,.78)!important;background:rgba(255,255,255,.065)!important}
.sidebar button[data-page].active:before,#dashboard aside button[data-page].active:before,#workspaceNav button.active .nav-item-icon,#workspaceGlobalNav button.active .ws-global-nav-icon{border-color:#65ddcf!important;background:rgba(67,218,199,.13)!important;box-shadow:0 0 0 2px rgba(67,218,199,.06)!important}

/* Account dialog: keep the outer size and tighten only its inner layout. */
@media (min-width:901px){
  .ws-dialog .ws-account-form-grid>label:nth-child(2),
  .ws-dialog .ws-account-form-grid>label:nth-child(4){
    position:relative;
    left:-18px;
    width:calc(100% + 18px);
  }
  .ws-dialog .ws-account-form-grid .ws-account-modules{
    width:min(720px,100%);
    justify-self:center;
  }
}

/* Team dialog: three compact rows centered as one coherent form. */
.ws-dialog .ws-team-form-grid{
  grid-template-columns:1fr;
  gap:12px;
  box-sizing:border-box;
  width:min(560px,100%);
  margin:0 auto;
  padding:18px;
  border:1px solid #e0e9ec;
  border-radius:12px;
  background:#f8fbfb;
}
.ws-dialog .ws-team-form-grid>label.ws-field{
  display:grid;
  grid-template-columns:96px minmax(0,1fr);
  column-gap:12px;
  align-items:center;
}
.ws-dialog .ws-team-form-grid>label.ws-field>.ws-field-label{
  line-height:1.4;
  text-align:right;
  color:#607884;
  font-weight:700;
}
.ws-dialog .ws-team-form-grid>label.ws-field>input,
.ws-dialog .ws-team-form-grid>label.ws-field>select,
.ws-dialog .ws-team-form-grid>label.ws-field>.mb-select{
  grid-column:2;
  justify-self:start;
  width:calc(100% - 48px);
}
.ws-dialog:has(.ws-team-form-grid) .ws-dialog-foot{
  justify-content:center;
}
@media (max-width:700px){.ws-dialog .ws-team-form-grid{padding:14px}}

/* Dialog edge and action alignment refinements. */
.ws-dialog{
  scrollbar-gutter:auto;
}
.ws-report-filters .ws-filter-actions .ws-btn,
.ws-dialog:has(.ws-account-form-grid) .ws-dialog-foot .ws-btn,
.ws-dialog:has(.ws-team-form-grid) .ws-dialog-foot .ws-btn{
  min-width:96px;
  height:40px;
  padding-inline:22px;
}
.ws-report-filters .ws-filter-actions .ws-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding-block:0;
}
@media (min-width:901px){
  .ws-dialog .ws-account-form-grid #wsAccountPreview{
    left:18px;
  }
}
.ws-dialog .ws-account-form-grid #wsAccountPreview{
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  min-height:54px;
  text-align:center;
}

/* Account dialog alignment: preserve the outer size while using the full control span. */
@media (min-width:901px){
  .ws-dialog .ws-account-form-grid .ws-account-modules{
    width:100%;
    justify-self:stretch;
  }
  .ws-dialog .ws-account-form-grid #wsAccountPreview{
    position:relative;
    left:8px;
  }
  .ws-dialog:has(.ws-account-form-grid) .ws-dialog-foot{
    justify-content:center;
  }
}

/* Destructive data actions; account actions are owned by auth-client.css. */
.ws-danger-link,
.ws-btn[data-action^="delete-"],
.buyer-remove:not(:disabled),
.remove-config:not(:disabled),
.ws-source-remove:not(:disabled){
  border-color:#efc7c7!important;
  background:#fff1f1!important;
  color:#bd5151!important;
  box-shadow:0 3px 9px rgba(190,81,81,.08)!important;
}
.ws-danger-link:hover,
.ws-btn[data-action^="delete-"]:hover,
.buyer-remove:not(:disabled):hover,
.remove-config:not(:disabled):hover,
.ws-source-remove:not(:disabled):hover{
  border-color:#e6aaaa!important;
  background:#ffe5e5!important;
  color:#a93f3f!important;
}

/* 总后台每日详情：所有宽内容都收在主栏内，宽表只在自身区域滚动。 */
body:has(#apiSyncPage.active) .app-shell{overflow-x:hidden}
body:has(#apiSyncPage.active) .app-shell>main{
  width:100%;
  max-width:calc(100vw - 244px);
  min-width:0;
  overflow-x:hidden;
}
body:has(#apiSyncPage.active) .topbar,
body:has(#apiSyncPage.active) #apiSyncPage,
body:has(#apiSyncPage.active) .pull-schedules,
body:has(#apiSyncPage.active) #summaryCards,
body:has(#apiSyncPage.active) .workspace-card{
  width:100%;
  max-width:100%;
  min-width:0;
}
body:has(#apiSyncPage.active) .topbar,
body:has(#apiSyncPage.active) .top-actions{flex-wrap:wrap}
body:has(#apiSyncPage.active) .top-actions{min-width:0;justify-content:flex-end}
body:has(#apiSyncPage.active) .pull-schedules{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
body:has(#apiSyncPage.active) #summaryCards{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
body:has(#apiSyncPage.active) #summaryCards>.metric{min-width:0}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:visible;
}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters>.toolbar{
  box-sizing:border-box;
  display:flex;
  width:100%;
  min-width:0;
  flex:0 1 auto;
  flex-wrap:nowrap;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}
body:has(#apiSyncPage.active) .combined-data-filters .toolbar-date-filter{
  display:contents!important;
  flex:0 0 auto;
  width:auto;
  min-width:0;
}
body:has(#apiSyncPage.active) .combined-data-filters .data-filter-divider{display:none}
body:has(#apiSyncPage.active) .combined-data-filters>.adjust-local-filter{
  box-sizing:border-box;
  display:flex;
  width:100%;
  min-width:0;
  padding:10px 14px;
  border-top:1px solid #d9e7e5;
  justify-content:flex-start;
  flex-wrap:wrap;
}
body:has(#apiSyncPage.active) .adjust-local-filter>.adjust-filter-field{
  flex:1 1 180px;
  width:auto;
  min-width:160px;
  max-width:320px;
}
body:has(#apiSyncPage.active) .adjust-local-filter>.adjust-filter-field:first-of-type{
  width:auto;
  min-width:220px;
}
body:has(#apiSyncPage.active) .workspace-card>.table-wrap{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:auto;
  overscroll-behavior-inline:contain;
}
@media(max-width:1500px){
  body:has(#apiSyncPage.active) #summaryCards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1100px){
  body:has(#apiSyncPage.active) .pull-schedules{grid-template-columns:minmax(0,1fr)}
  body:has(#apiSyncPage.active) #summaryCards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  body:has(#apiSyncPage.active) .app-shell>main{max-width:100vw}
}

/* 超宽屏保持业务筛选与 Adjust 筛选同一横行。 */
@media(min-width:2400px){
body:has(#apiSyncPage.active) .combined-data-filters{
  display:flex;
  align-items:stretch;
  flex-wrap:nowrap;
  width:100%;
  min-width:0;
  overflow:visible;
}
body:has(#apiSyncPage.active) .combined-data-filters>.toolbar{
  box-sizing:border-box;
  display:flex;
  flex:1 1 auto;
  flex-wrap:nowrap;
  align-items:center;
  width:auto;
  min-width:0;
  gap:10px;
}
body:has(#apiSyncPage.active) .combined-data-filters .toolbar-date-filter{
  display:contents!important;
  flex:0 0 auto;
  width:auto;
  min-width:0;
}
body:has(#apiSyncPage.active) .combined-data-filters .data-filter-divider{
  display:block;
  flex:0 0 1px;
  width:1px;
}
body:has(#apiSyncPage.active) .combined-data-filters>.adjust-local-filter{
  box-sizing:border-box;
  display:flex;
  flex:0 1 34%;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-end;
  width:auto;
  min-width:540px;
  padding:10px 12px;
  border-top:0;
  border-left:1px solid #d9e7e5;
}
body:has(#apiSyncPage.active) .adjust-local-filter>.adjust-filter-field{
  flex:1 1 0;
  width:auto;
  min-width:130px;
  max-width:none;
}
body:has(#apiSyncPage.active) .adjust-local-filter>.adjust-filter-field:first-of-type{
  width:auto;
  min-width:180px;
}
}

/* 全系统时间筛选：日期框等宽，起止日期统一使用“ - ”分隔。 */
.summary-control-card>input[type="date"],
.daily-detail-date-bar>input[type="date"],
.ws-report-filters>input[type="date"],
#summaryPage>.toolbar>input[type="date"],
.buyer-compare-controls input[type="date"]{
  box-sizing:border-box!important;
  flex:0 0 120px!important;
  width:120px!important;
  min-width:120px!important;
  max-width:120px!important;
  height:38px!important;
  min-height:38px!important;
}
/* Daily detail controls: one readable 13px / 38px control system everywhere. */
html body :is(.daily-detail-date-bar,.combined-data-filters,#syncPage .sync-filters) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select,button,.mb-select,.mb-select-trigger,.checklist-select>summary){
  box-sizing:border-box!important;
  height:38px!important;
  min-height:38px!important;
  font-size:13px!important;
}
html body :is(.daily-detail-date-bar,.combined-data-filters,#syncPage .sync-filters) :is(input,textarea,select,button,.mb-select-trigger,.checklist-select>summary){
  border-radius:9px!important;
}
html body :is(#toggleFilters,#buyerToggleFilters){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 82px!important;
  width:82px!important;
  min-width:82px!important;
  max-width:82px!important;
  padding:0 10px!important;
  font-size:13px!important;
  line-height:1!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
}
html body :is(.daily-detail-date-bar,.combined-data-filters,#syncPage .sync-filters) textarea{
  padding-top:0!important;
  padding-bottom:0!important;
  line-height:36px!important;
  resize:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}

/* Daily detail buyer values are labels, not action buttons or status pills. */
html body :is(#apiSyncPage,#syncPage,#workspaceRoot) :is(.buyer-assignment,.buyer-assignment-text){
  display:inline!important;
  box-sizing:border-box!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font:inherit!important;
  font-size:13px!important;
  font-weight:400!important;
  line-height:inherit!important;
  cursor:default!important;
  transform:none!important;
}
html body :is(#apiSyncPage,#syncPage,#workspaceRoot) .buyer-assignment-text.assigned{color:#087d72!important}
html body :is(#apiSyncPage,#syncPage,#workspaceRoot) .buyer-assignment-text.unassigned{color:#b06a18!important}

/* Every admin, buyer and workspace date input uses one fixed width. */
html body input[type="date"]{
  box-sizing:border-box!important;
  flex:0 0 120px!important;
  width:120px!important;
  min-width:120px!important;
  max-width:120px!important;
}

/* Global no-overlap safeguards for enhanced selects and responsive filter bars. */
.mb-select:has(>.mb-select)>.mb-select-trigger{display:none!important}
.mb-select:has(>.mb-select)>.mb-select{width:100%!important;min-width:0!important;height:100%!important}
:is(.combined-data-filters,.combined-data-filters>.toolbar,.adjust-local-filter,.manual-sync-filters,.buyer-adjust-filters,.ws-report-filters){min-width:0}
@media(max-width:2399px){
  body:has(#apiSyncPage.active) .combined-data-filters{
    display:flex!important;
    align-items:stretch!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:thin;
  }
  body:has(#apiSyncPage.active) .combined-data-filters>.toolbar{
    box-sizing:border-box!important;
    flex:1 1 68%!important;
    width:auto!important;
    min-width:1120px!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    gap:clamp(5px,.45vw,9px)!important;
    padding-left:clamp(8px,.7vw,14px)!important;
    padding-right:clamp(8px,.7vw,14px)!important;
  }
  body:has(#apiSyncPage.active) .combined-data-filters>.toolbar>.search{
    flex:1 1 150px!important;
    width:auto!important;
    min-width:105px!important;
  }
  body:has(#apiSyncPage.active) .combined-data-filters>.toolbar>.campaign-search{
    flex:1 1 135px!important;
    width:auto!important;
    min-width:100px!important;
  }
  body:has(#apiSyncPage.active) .combined-data-filters>.toolbar>:is(.checklist-select,.mb-select){
    flex:1 1 104px!important;
    width:auto!important;
    min-width:76px!important;
    max-width:132px!important;
  }
  body:has(#apiSyncPage.active) .combined-data-filters>.adjust-local-filter{
    box-sizing:border-box!important;
    display:flex!important;
    width:auto!important;
    min-width:390px!important;
    flex:1 1 32%!important;
    flex-wrap:nowrap!important;
    justify-content:flex-start!important;
    gap:clamp(5px,.45vw,9px)!important;
    padding:10px clamp(8px,.65vw,12px)!important;
    border-top:0!important;
    border-left:1px solid #d9e7e5!important;
    overflow:visible!important;
  }
  body:has(#apiSyncPage.active) .combined-data-filters>.data-filter-divider{display:block!important;flex:0 0 1px!important}
  body:has(#apiSyncPage.active) .adjust-local-filter>span{flex:0 1 118px!important;min-width:88px!important;max-width:118px!important;overflow:hidden;text-overflow:ellipsis}
  body:has(#apiSyncPage.active) .adjust-local-filter>.adjust-filter-field{
    flex:1 1 100px!important;
    width:auto!important;
    min-width:86px!important;
    max-width:none!important;
  }
  body:has(#apiSyncPage.active) .adjust-local-filter>.adjust-filter-field:first-of-type{min-width:112px!important}
  #manualPage .manual-sync-filters{
    box-sizing:border-box!important;
    padding-right:14px!important;
    flex-wrap:wrap!important;
    overflow:visible!important;
  }
  #manualPage .manual-sync-filters>.buyer-adjust-filters{
    position:relative!important;
    inset:auto!important;
    order:20!important;
    box-sizing:border-box!important;
    flex:1 0 calc(100% + 28px)!important;
    width:calc(100% + 28px)!important;
    margin:0 -14px -11px!important;
    padding:11px 14px!important;
    border-top:1px solid #b8d4d0!important;
    border-left:0!important;
  }
  #syncPage .sync-filters{padding-right:14px!important}
}

/* 手动匹配筛选统一：匹配条件后紧跟 Adjust 应用、国家/地区和渠道，始终保持一行。 */
body:has(#apiSyncPage.active) .combined-data-filters{
  display:block!important;
  overflow:visible!important;
}
body:has(#apiSyncPage.active) .combined-data-filters>.toolbar{
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  gap:9px!important;
  padding:10px 14px!important;
  scrollbar-width:thin;
}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters>.toolbar>#adjustLocalFilter{
  display:contents!important;
}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters>.toolbar>#adjustLocalFilter>span{
  flex:0 0 128px!important;
  min-width:128px!important;
  max-width:128px!important;
  white-space:nowrap!important;
}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters>.toolbar>#adjustLocalFilter>.adjust-filter-field{
  flex:0 0 150px!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters>.toolbar>#adjustLocalFilter>.adjust-filter-field:first-of-type{
  flex-basis:170px!important;
  width:170px!important;
  min-width:170px!important;
  max-width:170px!important;
}
body:has(#manualPage.active,#apiSyncPage.active) .combined-data-filters>.data-filter-divider{display:none!important}

#manualPage .manual-sync-filters{
  box-sizing:border-box!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  min-height:60px!important;
  padding:11px 14px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  gap:9px!important;
  scrollbar-width:thin;
}
#manualPage .manual-sync-filters>.buyer-adjust-filters{
  display:contents!important;
  position:static!important;
  inset:auto!important;
  order:initial!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}
#manualPage .manual-sync-filters>.buyer-adjust-filters>b{
  flex:0 0 128px!important;
  min-width:128px!important;
  justify-content:flex-start!important;
}
#manualPage .manual-sync-filters>.buyer-adjust-filters>.checklist-select{
  flex:0 0 150px!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
}
#manualPage .manual-sync-filters>.buyer-adjust-filters>.checklist-select:first-of-type{
  flex-basis:170px!important;
  width:170px!important;
  min-width:170px!important;
  max-width:170px!important;
}
#manualPage .manual-sync-filters>#manualResultCount{
  display:none!important;
}

/* Keep buyer/admin filter controls anchored to the left. Date-range and
   enhanced-select widgets are rendered as spans, so only result counters
   may consume the remaining space in a filter row. */
html body :is(#syncPage,#manualPage) .sync-filters{
  justify-content:flex-start!important;
}
html body :is(#syncPage,#manualPage) .sync-filters span:not(#syncResultCount):not(#manualResultCount){
  margin-left:0!important;
}
html body :is(#syncPage,#manualPage) .sync-filters>:is(.mb-date-range,.mb-select,.checklist-select){
  margin-left:0!important;
}
html body #syncPage .buyer-adjust-filters>.checklist-select{
  box-sizing:border-box!important;
  width:auto!important;
  min-width:0!important;
  max-width:100%!important;
}

/* Keep the complete green outline visible while a custom select is hovered or open. */
html body .mb-select:hover > .mb-select-trigger,
html body .mb-select.open > .mb-select-trigger{
  border-top-color:#38bdae!important;
  border-right-color:#38bdae!important;
  border-bottom-color:#38bdae!important;
  border-left-color:#38bdae!important;
  box-shadow:inset 0 0 0 1px #38bdae!important;
  transition:none!important;
}

/* Typography hierarchy: titles use size, not bold weight. */
html body :is(h1,h2,h3,h4,h5,h6),
html body :is(h1,h2,h3,h4,h5,h6) :is(b,strong),
html body :is(
  .api-intro>div>b,
  .api-card-head b,
  .intro>div>b,
  .drop-copy>b,
  .match-mark>b,
  .buyer-overview-hero>div>b,
  .buyer-overview-total-head>b,
  .source-auto-heading b,
  .pull-card-head b,
  .ws-source-schedule-main>b,
  .ws-empty>b,
  .manual-empty-state>b,
  .empty-state>b,
  .buyer-form-section>b,
  .api-binding-title,
  .brand>div>b
){
  font-weight:400!important;
}

/* Navigation and actions follow the same regular-weight visual language. */
html body button,
html body button :is(b,strong),
html body :is(.ws-btn,.primary,.ghost,.filter-btn,.mini-btn,.source-sync,.sync-button),
html body :is(.badge,.admin-badge,.ws-tag,.ws-source-schedule-state,.history-status,.source-alert-repeat){
  font-weight:400!important;
}

/* Final specificity guard for legacy rules that also use !important. */
html body :is(h1,h2,h3,h4,h5,h6):not(#mb-bold-title),
html body :is(h1,h2,h3,h4,h5,h6) :is(b,strong):not(#mb-bold-title-child),
html body :is(
  .api-intro>div>b,
  .api-card-head b,
  .intro>div>b,
  .drop-copy>b,
  .match-mark>b,
  .buyer-overview-hero>div>b,
  .buyer-overview-total-head>b,
  .source-auto-heading b,
  .pull-card-head b,
  .ws-source-schedule-main>b,
  .ws-empty>b,
  .manual-empty-state>b,
  .empty-state>b,
  .buyer-form-section>b,
  .api-binding-title,
  .brand>div>b
):not(#mb-bold-structural-title),
html body button:not(#mb-bold-action):not(#mb-bold-action-force),
html body button :is(b,strong):not(#mb-bold-action-child),
html body :is(.ws-btn,.primary,.ghost,.filter-btn,.mini-btn,.source-sync,.sync-button):not(#mb-bold-control),
html body :is(.badge,.admin-badge,.ws-tag,.ws-source-schedule-state,.history-status,.source-alert-repeat):not(#mb-bold-status){
  font-weight:400!important;
}

/* Daily-summary controls always begin at the left edge in admin and buyer. */
html body :is(.summary-control-card,#summaryPage>.toolbar){
  justify-content:flex-start!important;
  text-align:left!important;
}
html body :is(.summary-control-card,#summaryPage>.toolbar)>.mb-date-range:first-of-type{
  margin-left:0!important;
}

/* Keep every large-title annotation on the title's right edge and bottom-align it. */
html body :is(
  .topbar>div:first-child,
  #workspaceRoot .ws-header>div:first-child,
  .dashboard main>header>div:first-child,
  .overview-hero>div:first-child,
  .buyer-overview-hero>div:first-child,
  .api-intro>div:first-child,
  .dashboard .intro>div:first-child,
  .ws-card-head>div:first-child,
  .buyer-form-head>div:first-child,
  .daily-table-head>div:first-child,
  .overview-card-title,
  .overview-total-head,
  .buyer-overview-total-head,
  .ws-kpi-section-head,
  .source-auto-heading>div:first-child,
  .history-head>div:first-child,
  .history-title-row>div:first-child,
  .buyer-compare-title,
  .ws-child-bm-head>div
){
  display:flex!important;
  align-items:flex-end!important;
  gap:9px!important;
  min-width:0!important;
  flex-wrap:nowrap!important;
}
html body :is(
  .topbar>div:first-child,
  #workspaceRoot .ws-header>div:first-child,
  .dashboard main>header>div:first-child,
  .overview-hero>div:first-child,
  .buyer-overview-hero>div:first-child,
  .api-intro>div:first-child,
  .dashboard .intro>div:first-child,
  .ws-card-head>div:first-child,
  .buyer-form-head>div:first-child,
  .daily-table-head>div:first-child,
  .overview-card-title,
  .overview-total-head,
  .buyer-overview-total-head,
  .ws-kpi-section-head,
  .source-auto-heading>div:first-child,
  .history-head>div:first-child,
  .history-title-row>div:first-child,
  .buyer-compare-title,
  .ws-child-bm-head>div
) > :is(h1,h2,h3,b){
  flex:0 0 auto!important;
  margin:0!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
html body :is(
  .topbar>div:first-child,
  #workspaceRoot .ws-header>div:first-child,
  .dashboard main>header>div:first-child,
  .overview-hero>div:first-child,
  .buyer-overview-hero>div:first-child,
  .api-intro>div:first-child,
  .dashboard .intro>div:first-child,
  .ws-card-head>div:first-child,
  .buyer-form-head>div:first-child,
  .daily-table-head>div:first-child,
  .overview-card-title,
  .overview-total-head,
  .buyer-overview-total-head,
  .ws-kpi-section-head,
  .source-auto-heading>div:first-child,
  .history-head>div:first-child,
  .history-title-row>div:first-child,
  .buyer-compare-title,
  .ws-child-bm-head>div
) > :is(p,small){
  min-width:0!important;
  margin:0 0 1px!important;
  overflow:hidden!important;
  font-size:11px!important;
  line-height:1.25!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html body :is(.overview-hero,.buyer-overview-hero,.api-intro){padding-block:13px!important}
html body :is(.topbar,#workspaceRoot .ws-header,.dashboard main>header){padding-block:11px!important;margin-top:12px!important;margin-bottom:13px!important}
html body .ws-card-head{padding-block:12px!important}
html body .table-head h2:has(>small){display:flex!important;align-items:flex-end!important;gap:9px!important;min-width:0!important;white-space:nowrap!important}
html body .table-head h2>small{min-width:0!important;margin:0 0 1px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
