:root {
  --orange:#ff932a;
  --deep:#e67d17;
  --soft:#fff5e9;
  --ink:#303640;
  --muted:#8a919e;
  --line:#e9ebef;
  --bg:#f6f7fb;
  --green:#43a666;
  --red:#dc645e
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  font:13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink);
  background:var(--bg)
}

button,input,select {
  font:inherit
}

button {
  cursor:pointer;
  transition:background .15s;
  border:1px solid #dfe3e9;
  background:white;
  color:#505865;
  padding:7px 14px;
  border-radius:4px;
  white-space:nowrap
}

button:hover:not(:disabled) {
  background:#f8f9fb
}

button:disabled {
  opacity:.45;
  cursor:not-allowed
}

button:focus-visible,a:focus-visible {
  outline:2px solid var(--orange);
  outline-offset:3px
}

input,select {
  height:34px;
  border:1px solid #dfe3e9;
  border-radius:4px;
  padding:0 10px;
  background:white;
  color:#535c69;
  min-width:0
}

input:focus,select:focus {
  outline:0;
  border-color:var(--orange);
  box-shadow:0 0 0 2px #ff932a12
}

input::placeholder {
  color:#acb1ba
}

input[type=checkbox]{
  width:15px;
  height:15px;
  accent-color:var(--orange);
  vertical-align:middle;
  cursor:pointer;
  padding:0
}

h1,h2,h3,p {
  margin:0
}

.top {
  height:57px;
  display:flex;
  align-items:center;
  background:white;
  border-bottom:1px solid var(--line);
  padding:0 24px;
  gap:30px
}

.brand {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:21px;
  font-weight:750;
  letter-spacing:-.7px;
  min-width:191px
}

.brand-mark {
  color:var(--orange);
  font-size:33px;
  font-weight:850;
  line-height:1
}

.brand small {
  font-size:11px;
  font-weight:400;
  letter-spacing:0;
  background:#f8f9fa;
  padding:4px 7px;
  margin-left:3px;
  color:#7d848d
}

.top nav {
  display:flex;
  height:100%;
  gap:29px;
  font-size:14px;
  font-weight:600
}

.top nav span {
  display:flex;
  align-items:center
}

.top nav .active {
  color:var(--deep);
  border-bottom:2px solid var(--orange)
}

.top-right {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:9px;
  color:#666f7c;
  font-size:12px
}

.demo-tag {
  border:1px solid #f2d9b8;
  background:#fffaf3;
  color:#b17a33;
  border-radius:4px;
  padding:3px 9px;
  margin-right:15px
}

.avatar {
  display:grid;
  place-items:center;
  background:#eef1f7;
  color:#8b94a3;
  width:27px;
  height:27px;
  border-radius:50%;
  font-size:11px
}

.shell {
  display:grid;
  grid-template-columns:206px minmax(0,1fr);
  min-height:calc(100vh - 57px)
}

aside {
  padding:18px 18px 12px;
  border-right:1px solid var(--line);
  position:relative
}

aside section {
  margin-bottom:23px
}

h3 {
  font-size:13px;
  font-weight:600;
  margin-bottom:12px
}

h3>span {
  float:right;
  color:#a1a8b1
}

.menu {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:13px 8px;
  padding-left:14px;
  font-size:12px;
  color:#68717e
}

.menu .current {
  position:relative;
  border:0;
  padding:0;
  background:transparent;
  text-align:left;
  color:var(--deep);
  font-weight:600;
  font-size:12px
}

.menu .current:before {
  content:'';
  position:absolute;
  left:-8px;
  top:3px;
  height:13px;
  width:2px;
  background:var(--orange)
}

.orange {
  color:var(--deep)
}

.side-foot {
  font-size:11px;
  color:#a2a9b3;
  border-top:1px solid #e9ebef;
  padding:14px 0 0 8px
}

.workspace {
  padding:0 18px;
  min-width:0
}

.work-tabs {
  height:47px;
  display:flex;
  align-items:center;
  gap:6px;
  border-bottom:1px solid var(--line);
  margin-bottom:16px
}

.work-tabs>span {
  padding:6px 19px;
  font-size:12px;
  background:#f0f2f6;
  border-radius:3px;
  color:#717985
}

.work-tabs .selected {
  background:#fff0de;
  color:var(--deep)
}

.work-tabs b {
  font-weight:400;
  margin-left:12px
}

.work-tabs>button {
  margin-left:auto;
  font-size:12px
}

main {
  background:white;
  border-radius:9px;
  padding:22px 22px 0;
  min-height:600px
}

.page-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px
}

.page-title {
  display:flex;
  align-items:center;
  gap:10px
}

.fb {
  background:#1877f2;
  color:white;
  width:25px;
  height:25px;
  border-radius:6px;
  text-align:center;
  font-size:27px;
  font-family:Arial;
  font-weight:bold;
  line-height:31px;
  overflow:hidden
}

.page-title h1 {
  font-size:18px;
  font-weight:650
}

.subtitle {
  font-size:12px;
  color:var(--muted);
  border-left:1px solid var(--line);
  padding-left:12px;
  margin-left:4px
}

.primary {
  background:var(--orange);
  border-color:var(--orange);
  color:white
}

.primary:hover:not(:disabled) {
  background:#ef841e
}

.info {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 13px;
  background:#fffaf2;
  border:1px solid #f7e7cd;
  border-radius:5px;
  color:#967247;
  font-size:12px
}

.info>span {
  font-size:16px;
  color:#df9e45
}

.info strong {
  font-weight:400
}

.info .text-button {
  margin-left:auto;
  color:#b98540
}

.text-button {
  border:0;
  background:transparent!important;
  color:var(--deep);
  padding:0
}

.tabbar {
  display:flex;
  gap:29px;
  margin:18px 0 16px;
  border-bottom:1px solid var(--line)
}

.tabbar button {
  border:0;
  border-radius:0;
  background:transparent;
  padding:11px 0 13px;
  color:#67717e
}

.tabbar button[aria-selected=true] {
  border-bottom:2px solid var(--orange);
  color:var(--deep);
  font-weight:600
}

.tabbar span {
  background:#f2f3f6;
  color:#8b929d;
  font-size:11px;
  padding:1px 6px;
  margin-left:5px;
  border-radius:4px
}

.tabbar button[aria-selected=true] span {
  background:var(--soft);
  color:var(--deep)
}

.filters {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  background:#f7f8fa;
  padding:12px;
  border-radius:5px
}

.filters input {
  flex:1;
  min-width:150px;
  max-width:280px
}

.filters select {
  flex:1;
  min-width:120px;
  max-width:180px
}

.filters button {
  height:34px;
  padding:0 17px
}

.toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:17px 0 13px;
  gap:12px;
  font-size:12px
}

.bulk {
  display:flex;
  gap:12px;
  align-items:center
}

.bulk button {
  font-size:12px;
  padding:6px 11px
}

.bulk>span {
  color:#959ca6
}

.sync-note {
  color:#959ca6;
  font-size:11px
}

.table-wrap {
  overflow:auto;
  border:1px solid var(--line);
  border-radius:5px
}

table {
  width:100%;
  border-collapse:collapse;
  white-space:nowrap;
  font-size:12px;
  text-align:left;
  min-width:1150px
}

th {
  background:#f7f8fa;
  font-weight:500;
  color:#69717e;
  height:42px;
  padding:0 13px;
  border-bottom:1px solid var(--line)
}

td {
  padding:16px 13px;
  border-bottom:1px solid #eff1f4;
  height:76px;
  vertical-align:middle
}

tr:last-child td {
  border-bottom:0
}

tbody tr:hover {
  background:#fffdf9
}

th:first-child,td:first-child {
  width:35px;
  padding:0 8px 0 15px
}

.account-name {
  font-weight:550;
  color:#343d49;
  font-size:13px
}

.sub {
  font-size:11px;
  color:#939ba7;
  margin-top:4px
}

.mono {
  font-variant-numeric:tabular-nums;
  letter-spacing:.2px
}

.status {
  display:inline-flex;
  gap:6px;
  align-items:center;
  white-space:nowrap;
  font-size:12px
}

.status:before {
  content:'';
  width:5px;
  height:5px;
  border-radius:50%;
  background:currentColor
}

.valid {
  color:var(--green)
}

.invalid {
  color:var(--red)
}

.neutral {
  color:#9097a1
}

.warn {
  color:#d49837
}

.row-actions {
  display:flex;
  gap:12px;
  align-items:center
}

.row-actions button {
  font-size:12px;
  border:0;
  background:none;
  padding:0;
  color:var(--deep)
}

.row-actions button.muted {
  color:#87909b
}

.sticky {
  position:sticky;
  right:0;
  background:#fff;
  box-shadow:-5px 0 10px -10px #7d899b;
  min-width:163px
}

th.sticky {
  background:#f7f8fa
}

.remark {
  max-width:120px;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#8a919d;
  display:block
}

.remark button {
  padding:0;
  border:0;
  background:transparent;
  color:#c1a887;
  margin-left:6px
}

.pagination {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  height:67px;
  font-size:12px;
  color:#8b939d
}

.pagination button {
  padding:2px 8px
}

.pagination .page-number {
  border-color:var(--orange);
  color:var(--deep)
}

.pagination>span:first-child {
  margin-right:8px
}

.bottom-note {
  border-top:1px solid #eff1f4;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 0;
  font-size:11px;
  color:#9ba2ac;
  gap:10px
}

.bottom-note button {
  font-size:11px;
  color:#979eaa
}

footer {
  display:flex;
  justify-content:space-between;
  font-size:11px;
  color:#a7adb6;
  padding:18px 5px
}

.empty {
  text-align:center;
  padding:65px 20px;
  color:#a1a7b1
}

.empty strong {
  display:block;
  color:#6c7684;
  font-size:14px;
  margin-bottom:6px
}

dialog {
  padding:0;
  border:0;
  border-radius:9px;
  width:650px;
  max-width:calc(100vw - 40px);
  max-height:88vh;
  color:var(--ink);
  box-shadow:0 15px 70px #18233433
}

dialog::backdrop {
  background:#222c4059;
  backdrop-filter:blur(1px)
}

dialog.wide {
  width:920px
}

.modal-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:19px 24px;
  border-bottom:1px solid var(--line)
}

.modal-head h2 {
  font-size:16px;
  font-weight:600
}

.icon-button {
  border:0;
  background:transparent;
  font-size:22px;
  color:#9ba1aa;
  padding:0 2px;
  line-height:1
}

#modal-body {
  padding:22px 24px;
  overflow:auto;
  max-height:calc(88vh - 139px)
}

.modal-footer {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding:15px 24px;
  border-top:1px solid var(--line);
  background:#fdfdfe
}

.modal-footer .left {
  margin-right:auto;
  color:#929aa5;
  font-size:12px
}

.modal-footer button {
  min-width:85px
}

.steps {
  display:flex;
  align-items:center;
  margin:0 0 26px;
  color:#9ba2ad;
  font-size:12px;
  gap:12px
}

.step {
  display:flex;
  gap:8px;
  align-items:center;
  white-space:nowrap
}

.step i {
  font-style:normal;
  display:grid;
  place-items:center;
  width:23px;
  height:23px;
  background:#f0f2f5;
  border-radius:50%
}

.step.active {
  color:var(--deep)
}

.step.active i {
  background:#fff0db
}

.step-line {
  height:1px;
  background:var(--line);
  flex:1
}

.modal-intro {
  color:#858d99;
  margin-bottom:16px;
  font-size:12px
}

.auth-card {
  border:1px solid var(--line);
  border-radius:6px;
  padding:18px;
  display:flex;
  gap:15px;
  align-items:flex-start;
  margin-bottom:18px
}

.auth-card .fb {
  flex-shrink:0;
  width:34px;
  height:34px;
  font-size:36px;
  line-height:42px
}

.auth-card h3 {
  margin:0 0 5px;
  font-size:14px
}

.auth-card p {
  font-size:12px;
  color:#8c95a1;
  line-height:1.8
}

.field-label {
  display:block;
  margin:17px 0;
  color:#626c79;
  font-size:12px
}

.field-label input,.field-label select {
  width:100%;
  margin-top:8px;
  height:37px
}

.notice-box {
  background:#f7f8fb;
  border-radius:5px;
  padding:13px 15px;
  color:#858d99;
  font-size:12px;
  line-height:1.85
}

.notice-box strong {
  color:#5f6a79;
  font-weight:550
}

.notice-box.warning {
  background:#fff8ec;
  color:#a2814f
}

.picker-top {
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:17px
}

.picker-top strong {
  font-size:13px
}

.picker-top .sub {
  margin-top:0
}

.picker-top button {
  margin-left:auto;
  font-size:12px
}

.picker-filters {
  display:flex;
  gap:10px;
  margin-bottom:14px
}

.picker-filters input {
  flex:1
}

.picker-table {
  max-height:330px;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:4px
}

.picker-table table {
  min-width:700px
}

.picker-table th {
  position:sticky;
  top:0;
  z-index:1
}

.picker-table td {
  height:63px;
  padding:12px
}

.added {
  display:inline-block;
  padding:2px 7px;
  background:#f0f8f3;
  color:#539d6b;
  border-radius:3px;
  font-size:11px
}

.unadded {
  color:#929ba7;
  font-size:11px
}

.count-text {
  font-size:12px;
  color:#8b939f;
  margin-top:12px
}

.count-text b {
  color:var(--deep);
  font-weight:550
}

.confirm-title {
  font-size:15px;
  font-weight:550;
  margin-bottom:10px
}

.confirm-copy {
  color:#788290;
  line-height:1.9;
  font-size:13px
}

.danger {
  background:#df6a60;
  color:white;
  border-color:#df6a60
}

.danger:hover:not(:disabled) {
  background:#cf5a50
}

.toast {
  position:fixed;
  top:76px;
  left:50%;
  transform:translateX(-50%);
  z-index:9;
  padding:11px 21px;
  background:#fff;
  border:1px solid #d9ebdf;
  box-shadow:0 5px 25px #2937471c;
  color:#488e60;
  border-radius:6px;
  display:none;
  font-size:13px
}

.toast.show {
  display:block
}

.flow {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin:10px 0 20px
}

.flow>div {
  background:#fafbfc;
  border:1px solid var(--line);
  border-radius:5px;
  padding:14px
}

.flow b {
  display:block;
  color:var(--deep);
  margin-bottom:7px
}

.flow p {
  font-size:12px;
  color:#8b929d
}

.check-row {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  margin-top:18px;
  color:#7e8793
}

.error-note {
  color:var(--red);
  font-size:12px;
  margin-top:10px
}

.summary-strip {
  display:flex;
  gap:22px;
  margin-bottom:18px;
  border-bottom:1px solid var(--line);
  padding-bottom:14px;
  font-size:12px;
  color:#9099a5
}

.summary-strip b {
  font-size:17px;
  color:#475363;
  margin:0 4px;
  font-weight:550
}

@media(min-width:1650px) {
  main {
    min-height:650px
  }
  td {
    height:83px
  }
  .workspace {
    padding:0 24px
  }
  main {
    padding:24px 25px 0
  }
  .shell {
    grid-template-columns:222px minmax(0,1fr)
  }

}

@media(max-width:1100px) {
  .shell {
    grid-template-columns:180px minmax(0,1fr)
  }
  aside {
    padding:16px 12px
  }
  .workspace {
    padding:0 12px
  }
  .sync-note {
    display:none
  }
  .top {
    padding:0 17px;
    gap:15px
  }
  .brand {
    min-width:162px
  }
  .brand small {
    display:none
  }
  .demo-tag {
    margin-right:0
  }
  main {
    padding:17px 16px 0
  }
  .info strong {
    display:none
  }

}

@media(max-width:720px) {
  aside {
    display:none
  }
  .shell {
    grid-template-columns:1fr
  }
  .top nav {
    display:none
  }
  .top-right {
    font-size:0
  }
  .top-right .avatar {
    display:none
  }
  .demo-tag {
    font-size:10px
  }
  .brand {
    font-size:18px
  }
  .workspace {
    padding:0 9px
  }
  .subtitle {
    display:none
  }
  .page-head {
    margin-bottom:14px
  }
  .info {
    align-items:flex-start
  }
  .info .text-button {
    display:none
  }
  .filters input {
    max-width:none;
    width:100%
  }
  .filters select {
    max-width:none
  }
  .toolbar {
    font-size:11px
  }
  .bottom-note {
    align-items:flex-start
  }
  .bottom-note>span {
    max-width:70%
  }
  footer span {
    display:none
  }
  .flow {
    grid-template-columns:1fr
  }
  .steps {
    gap:6px;
    font-size:11px
  }
  .step {
    gap:4px
  }
  .picker-filters {
    flex-wrap:wrap
  }
  .picker-top {
    flex-wrap:wrap
  }
  .picker-top button {
    margin-left:0
  }
  .modal-footer {
    padding:13px 16px
  }
  .modal-head {
    padding:17px 16px
  }
  #modal-body {
    padding:18px 16px
  }
  .info strong {
    display:inline
  }

}

/* 沿用现有广告账户页的搜索栏与操作入口。 */
.filters {
  flex-wrap:nowrap;
  gap:12px;
  padding:8px;
  margin-bottom:16px;
  overflow:visible;
  position:relative;
  z-index:3
}

.batch-search {
  display:flex;
  flex:1 1 330px;
  min-width:265px
}

.filters .batch-search select {
  flex:0 0 125px;
  min-width:125px;
  max-width:none;
  border-radius:4px 0 0 4px;
  border-right:0;
  padding:0 9px;
  font-size:12px
}

.filters .batch-search input {
  flex:1 1 auto;
  min-width:140px;
  width:auto;
  max-width:none;
  border-radius:0 4px 4px 0;
  font-size:12px
}

.filters #auth-filter {
  flex:1 1 220px;
  min-width:150px;
  max-width:none;
  font-size:12px
}

.filters #search-button,.filters #reset-filters {
  flex:0 0 auto;
  padding:0 17px
}

.batch-actions {
  position:relative;
  flex-shrink:0
}

.filters #batch-toggle {
  padding:0 12px;
  min-width:120px
}

#batch-toggle[aria-expanded=true] {
  border-color:var(--orange);
  color:var(--deep)
}

#batch-menu {
  position:absolute;
  left:0;
  top:calc(100% + 5px);
  min-width:128px;
  padding:5px 0;
  background:white;
  box-shadow:0 5px 19px #26384d24;
  border-radius:5px;
  z-index:8
}

#batch-menu[hidden] {
  display:none
}

#batch-menu button {
  display:block;
  width:100%;
  height:34px;
  padding:0 15px;
  text-align:left;
  border:0;
  border-radius:0;
  font-size:13px
}

#batch-menu button:hover {
  background:var(--soft);
  color:var(--deep)
}

.selected-row td,.selected-row .sticky {
  background:#fffaf0
}

.row-actions {
  gap:12px
}

.row-actions button {
  color:var(--deep)
}

@media(max-width:1500px) {
  .filters {
    flex-wrap:wrap
  }
  .batch-search {
    flex-basis:calc(50% - 6px)
  }
  .filters #auth-filter {
    flex:1 1 260px
  }
  .filters .batch-search input {
    min-width:100px
  }

}

@media(max-width:720px) {
  .batch-search {
    flex-basis:100%;
    min-width:0
  }
  .filters {
    gap:8px
  }
  .filters #auth-filter {
    flex-basis:100%
  }
  .filters #search-button,.filters #reset-filters {
    flex:1
  }
  .filters #batch-toggle {
    min-width:110px
  }
  .filters .batch-search select {
    min-width:120px;
    flex-basis:120px
  }

}

/* 企业授权范围只在查看弹窗中展示，不增加主列表字段。 */
.auth-link {
  font-size:12px;
  white-space:nowrap;
  text-decoration:underline;
  text-underline-offset:3px
}

.business-summary {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  background:#fafbfc;
  border:1px solid var(--line);
  border-radius:5px;
  padding:14px 16px;
  margin-bottom:12px
}

.business-summary .sub {
  display:block;
  margin-top:7px
}

.demo-controls {
  background:#fafbfc;
  border:1px dashed #d9dfe5;
  border-radius:5px;
  padding:13px 16px;
  margin:16px 0
}

.demo-controls .field-label {
  margin:10px 0 0
}

.demo-controls select {
  width:100%;
  margin-top:8px
}

.demo-caption {
  font-size:11px;
  color:#8b939f;
  line-height:1.7;
  margin:12px 0 0
}

.readiness {
  border:1px solid var(--line);
  border-radius:5px;
  margin:16px 0
}

.readiness>div {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:13px 14px;
  font-size:12px;
  border-bottom:1px solid var(--line)
}

.readiness>div:last-child {
  border:0
}

.readiness b {
  font-weight:500
}

.readiness .pending {
  color:#b68137
}

.readiness .ready {
  color:#488e60
}

.info strong {
  display:inline
}

/* Match the platform's manager → account picker interaction. */
.tabbar {
  display:flex;
  gap:28px;
  border-bottom:1px solid var(--line);
  margin-top:8px
}

.tabbar button {
  border:0;
  border-radius:0;
  padding:15px 0;
  background:transparent
}

.tabbar button.active {
  color:var(--deep);
  border-bottom:2px solid var(--orange)
}

.picker-kinds {
  display:flex;
  gap:24px;
  border-bottom:1px solid var(--line);
  margin-bottom:14px
}

.picker-kinds button {
  border:0;
  border-radius:0;
  background:transparent;
  padding:8px 2px 10px;
  color:#727b88;
  position:relative
}

.picker-kinds button.active {
  color:var(--deep);
  font-weight:600
}

.picker-kinds button.active:after {
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:2px;
  background:var(--orange)
}

.field-hint {
  color:#8d96a2;
  font-size:12px;
  margin:7px 0 14px
}

.picker-context {
  margin-bottom:14px;
  font-size:12px;
  color:#636b76
}

.picker-context .sub {
  display:block;
  margin-top:5px
}

.picker-controls {
  background:#f7f8fa;
  border-radius:5px;
  padding:10px;
  margin-bottom:16px
}

.picker-query {
  display:flex;
  gap:12px
}

.picker-query input,.picker-query select {
  flex:1;
  width:0
}

.picker-buttons {
  display:flex;
  align-items:center;
  gap:16px;
  margin-top:9px
}

.outline-orange {
  color:var(--deep);
  border-color:var(--orange)
}

.picker-pagination {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:16px
}

.picker-pagination button {
  padding:1px 7px
}

.picker-pagination select {
  height:29px
}

.picker-table {
  max-height:370px;
  min-height:225px;
  overflow:auto
}

.picker-table table {
  min-width:0;
  width:100%
}

.picker-table th:first-child {
  width:60px
}

.picker-table th:nth-child(2) {
  width:140px
}

.picker-table th:nth-child(4) {
  width:230px
}

.picker-table th {
  position:sticky;
  top:0;
  background:#f7f8fa;
  z-index:1
}

.business-table th:first-child {
  min-width:170px
}

.business-table th:last-child {
  min-width:0
}

.business-row-actions {
  flex-wrap:wrap;
  gap:6px 12px
}

/* Batch query is a second-level dialog matching the existing account workflow. */
#picker-batch-dialog { width:600px; }
#picker-batch-dialog .modal-head { border-bottom:0; }
#picker-batch-dialog .picker-batch-body { padding:0 24px 16px; }
#picker-batch-dialog .picker-batch-tabs { display:flex; gap:32px; border-bottom:1px solid var(--line); margin-bottom:16px; }
#picker-batch-dialog [role=tab] { border:0; border-bottom:2px solid transparent; border-radius:0; padding:12px 0; background:transparent; }
#picker-batch-dialog [role=tab][aria-selected=true] { color:var(--orange,#ff9226); border-bottom-color:var(--orange,#ff9226); }
#picker-batch-dialog textarea { display:block; width:100%; height:186px; max-height:40vh; padding:12px; border:1px solid var(--line); border-radius:4px; font:inherit; resize:vertical; }
#picker-batch-dialog .modal-footer { border-top:0; background:white; padding:24px; }

@media(max-width:760px) {
  .picker-query {
    flex-wrap:wrap
  }
  .picker-query input,.picker-query select {
    flex:auto;
    width:42%
  }
  .picker-buttons {
    gap:8px;
    flex-wrap:wrap
  }

}

/* Existing platform deduction-report flow. Local form only; no reporting engine. */
dialog.report-dialog {
  width:680px;
  max-width:calc(100vw - 32px);
  color:#262626;
  font-size:14px;
  border-radius:7px
}

dialog.report-dialog .modal-head {
  padding:18px 24px 16px;
  border-bottom:0
}

dialog.report-dialog h2,#template-modal h2 {
  font-size:18px;
  font-weight:600
}

dialog.report-dialog #modal-body {
  padding:0 24px
}

dialog.report-dialog .modal-footer {
  padding:18px 24px 24px;
  border-top:0;
  gap:10px
}

dialog.report-dialog .primary,#template-modal .primary {
  background:#ff9b2a;
  border-color:#ff9b2a
}

dialog.report-dialog button,#template-modal button {
  height:34px;
  padding:5px 15px;
  color:inherit
}

dialog.report-dialog button.primary,#template-modal button.primary {
  color:white
}

dialog.report-dialog .icon-button,#template-modal .icon-button {
  padding:0;
  width:22px;
  height:26px;
  color:#999;
  font-size:24px
}

.report-priority {
  padding:8px;
  color:#985207;
  background:#fff6eb;
  border:1px solid #ffe0b6;
  border-radius:3px;
  white-space:nowrap;
  font-size:14px
}

.report-template-bar {
  display:flex;
  justify-content:flex-end;
  margin:14px 0 2px
}

.report-row {
  display:flex;
  align-items:center;
  min-height:34px;
  margin-bottom:18px
}

.report-enable-row {
  margin-bottom:18px
}

.report-enable-row:last-of-type {
  margin-bottom:0
}

.report-label {
  width:110px;
  flex-shrink:0;
  white-space:nowrap
}

.report-label i,.template-field i {
  font-style:normal;
  color:#ff4d4f
}

.report-radios {
  display:flex;
  align-items:center;
  gap:16px;
  white-space:nowrap
}

.report-radios label {
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer
}

.report-radios input[type=radio] {
  appearance:none;
  width:16px;
  height:16px;
  border:1px solid #d9d9d9;
  border-radius:50%;
  margin:0;
  padding:0;
  box-shadow:none
}

.report-radios input[type=radio]:checked {
  border:5px solid #ff9b2a
}

.report-help {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font:10px sans-serif;
  background:#c5c6ca;
  color:#fff;
  border-radius:50%;
  width:13px;
  height:13px;
  cursor:help
}

.report-inline {
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  min-width:0
}

.report-inline select {
  width:120px;
  flex-shrink:0;
  font-size:14px;
  color:#262626
}

.report-input-group {
  display:flex;
  align-items:stretch;
  min-width:0;
  height:34px;
  white-space:nowrap
}

.report-input-group span {
  padding:5px 11px;
  background:#fafafa;
  border:1px solid #d9d9d9
}

.report-input-group span:first-child {
  border-radius:3px 0 0 3px
}

.report-input-group span:last-child {
  border-radius:0 3px 3px 0
}

.report-inline input[type=number] {
  width:75px;
  flex-shrink:0;
  color:#262626;
  font-size:14px
}

.report-input-group input[type=number] {
  border-radius:0;
  border-left:0;
  border-right:0
}

.report-mode-row {
  margin-bottom:8px
}

.report-detail-row {
  margin-bottom:0
}

.report-detail-row .report-inline {
  gap:10px;
  flex-wrap:wrap
}

.report-detail-row .report-input-group input {
  width:65px
}

.report-detail-row .report-input-group span {
  padding:5px 10px
}

.report-switch {
  width:44px!important;
  min-width:44px;
  height:22px!important;
  border:0!important;
  border-radius:16px!important;
  background:#c6c6c6!important;
  padding:2px!important;
  position:relative
}

.report-switch span {
  display:block;
  background:white;
  border-radius:50%;
  width:18px;
  height:18px;
  box-shadow:0 2px 4px #0002;
  transition:transform .15s
}

.report-switch.on {
  background:#ff9b2a!important
}

.report-switch.on span {
  transform:translateX(22px)
}

.report-error {
  color:#e04444;
  font-size:12px;
  margin:12px 0 0
}

.report-error[hidden] {
  display:none
}

.report-batch-hint {
  font-size:12px;
  color:#8a6c42;
  margin:10px 0 0
}

#template-modal {
  width:500px;
  max-width:calc(100vw - 32px);
  border-radius:7px;
  font-size:14px;
  color:#262626
}

#template-modal::backdrop {
  background:#0006
}

#template-modal .modal-head {
  border:0;
  padding:18px 24px
}

.template-body {
  padding:4px 24px 0
}

.template-field {
  display:flex;
  align-items:center
}

.template-field>span {
  white-space:nowrap;
  width:80px;
  flex-shrink:0
}

.template-field select {
  flex:1;
  width:0;
  font-size:14px
}

.template-explain {
  margin:0 0 0 80px;
  line-height:22px
}

.template-demo {
  margin:8px 0 0 80px;
  color:#909399;
  font-size:11px
}

#template-modal .modal-footer {
  border-top:0;
  padding:18px 24px 24px;
  gap:10px
}

@media(max-width:700px) {
  .report-priority {
    white-space:normal
  }
  .report-row {
    align-items:flex-start
  }
  .report-radios,.report-inline {
    flex-wrap:wrap
  }
  .report-radios {
    gap:10px
  }
  .report-label {
    width:105px
  }
  .report-detail-row .report-label {
    display:none
  }
  .report-detail-row {
    padding-left:0
  }

}

/* Match the existing two-row account query area and common account metadata. */
.filters:has(.account-filter-top) {
  display:block
}

.account-filter-top {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:8px
}

.account-filter-top input,.account-filter-top select,.filters .account-filter-top #auth-filter {
  width:100%;
  min-width:0;
  max-width:none;
  font-size:12px
}

.account-filter-bottom {
  display:flex;
  align-items:center;
  gap:12px
}

.account-filter-bottom .batch-search {
  flex:1 1 0;
  min-width:0
}

.account-filter-bottom .batch-search input {
  min-width:0
}

.account-filter-bottom .batch-actions {
  flex-shrink:0
}

.ad-account-table {
  min-width:1720px;
  table-layout:fixed;
  width:100%
}

.ad-account-table th,.ad-account-table td {
  border-right:1px solid var(--line);
  padding:12px 10px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.ad-account-table th:first-child,.ad-account-table td:first-child{
  width:42px;
  min-width:42px;
  max-width:42px;
  padding:12px 0;
  overflow:visible;
  text-overflow:clip;
  text-align:center
}

.ad-account-table th:nth-child(2) {
  width:190px
}

.ad-account-table th:nth-child(3) {
  width:160px
}

.ad-account-table th:nth-child(4) {
  width:180px
}

.ad-account-table th:nth-child(5) {
  width:170px
}

.ad-account-table th:nth-child(6) {
  width:100px
}

.ad-account-table th:nth-child(7) {
  width:100px
}

.ad-account-table th:nth-child(8) {
  width:140px
}

.ad-account-table th:nth-child(9) {
  width:155px
}

.ad-account-table th:last-child {
  width:230px
}

.ad-account-table .sticky {
  right:0;
  box-shadow:-3px 0 5px #30364008
}

.ad-account-table .account-name {
  overflow:hidden;
  text-overflow:ellipsis
}

.ad-account-table .row-actions {
  flex-wrap:wrap;
  gap:6px 12px
}

@media(max-width:1100px) {
  .account-filter-top {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
  .account-filter-bottom {
    flex-wrap:wrap
  }
  .account-filter-bottom .batch-search {
    flex-basis:calc(50% - 6px)
  }

}

@media(max-width:720px) {
  .account-filter-top {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .account-filter-bottom .batch-search {
    flex-basis:100%
  }

}

dialog.account-add-dialog {
  width:520px;
  max-width:calc(100vw - 32px);
  border-radius:7px;
  font-size:14px;
  color:#262626
}

.account-add-dialog .modal-head {
  padding:18px 24px;
  border:0
}

.account-add-dialog h2 {
  font-size:18px
}

.account-add-dialog #modal-body {
  padding:4px 24px 10px
}

.account-add-field {
  display:flex;
  align-items:center;
  gap:20px;
  min-height:40px
}

.account-add-field>span {
  flex-shrink:0;
  white-space:nowrap;
  width:90px
}

.account-add-field i {
  font-style:normal;
  color:#ff4d4f
}

.account-add-field select {
  flex:1;
  width:0;
  height:34px
}

.account-add-dialog .modal-footer {
  padding:18px 24px 24px;
  border:0;
  gap:10px
}

.account-add-dialog .modal-footer button {
  min-width:64px;
  height:34px;
  padding:5px 15px
}

.account-add-empty {
  color:#909399;
  font-size:12px;
  margin:10px 0 0 110px
}

.account-add-dialog #account-parent-error {
  margin-left:110px
}

/* Keep the platform orange selection with a consistently white check mark. */
input[type=checkbox]{
  appearance:none;
  -webkit-appearance:none;
  display:inline-grid;
  place-content:center;
  flex-shrink:0;
  width:16px;
  height:16px;
  margin:0;
  border:1px solid #d9d9d9;
  border-radius:4px;
  background:#fff;
  position:relative
}

input[type=checkbox]:checked,input[type=checkbox]:indeterminate {
  background:var(--orange);
  border-color:var(--orange)
}

input[type=checkbox]:checked::after {
  content:"";
  width:4px;
  height:8px;
  border:solid #fff;
  border-width:0 2px 2px 0;
  transform:translateY(-1px) rotate(45deg)
}

input[type=checkbox]:indeterminate::after {
  content:"";
  width:8px;
  height:2px;
  background:#fff
}

input[type=checkbox]:focus-visible {
  outline:2px solid var(--orange);
  outline-offset:3px
}

input[type=checkbox]:disabled {
  cursor:not-allowed;
  opacity:.45
}

.business-table th:first-child,.business-table td:first-child {
  width:42px;
  min-width:42px;
  max-width:42px;
  padding:12px 0;
  overflow:visible;
  text-overflow:clip;
  text-align:center
}

.business-table th:nth-child(2) {
  min-width:0
}

/* Batch dialogs follow the existing platform's compact confirmation and note form. */
dialog.batch-remark-dialog {
  width:600px;
  max-width:calc(100vw - 32px);
  border-radius:6px;
  color:#262626;
  font-size:14px
}

.batch-remark-dialog .modal-head {
  padding:18px 24px 20px;
  border:0
}

.batch-remark-dialog h2 {
  font-size:18px
}

.batch-remark-dialog #modal-body {
  padding:0 24px
}

.batch-remark-text {
  display:block;
  box-sizing:border-box;
  width:100%;
  height:100px;
  min-height:100px;
  border:1px solid #d9d9d9;
  border-radius:3px;
  padding:8px 11px;
  font:inherit;
  line-height:22px;
  color:#262626;
  resize:vertical
}

.batch-remark-text::placeholder {
  color:#bfbfbf
}

.batch-remark-text:focus {
  outline:none;
  border-color:var(--orange)
}

.batch-remark-count {
  text-align:right;
  color:#909399;
  font-size:14px;
  line-height:24px
}

.batch-remark-dialog .modal-footer {
  padding:6px 24px 24px;
  border:0;
  gap:10px
}

dialog.batch-remove-dialog {
  width:416px;
  max-width:calc(100vw - 32px);
  border-radius:6px;
  color:#262626;
  font-size:14px
}

.batch-remove-dialog .modal-head {
  padding:18px 24px 8px 58px;
  border:0;
  position:relative
}

.batch-remove-dialog .modal-head::before {
  content:"!";
  position:absolute;
  left:24px;
  top:18px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#faad14;
  color:white;
  font-size:16px;
  font-weight:bold;
  text-align:center;
  line-height:22px
}

.batch-remove-dialog h2 {
  font-size:18px;
  line-height:24px
}

.batch-remove-dialog #close-modal {
  display:none
}

.batch-remove-dialog #modal-body {
  padding:0 24px 0 58px
}

.batch-remove-copy {
  margin:0;
  line-height:22px
}

.batch-remove-blocked {
  margin:10px 0 0;
  font-size:12px;
  line-height:20px;
  color:#b77926
}

.batch-remove-dialog .modal-footer {
  padding:12px 24px 24px;
  border:0;
  gap:8px
}

.batch-remark-dialog .modal-footer button,.batch-remove-dialog .modal-footer button {
  height:34px;
  min-width:64px;
  padding:5px 15px;
  font-size:14px
}

/* Enterprise-first authorization flow: automatic data sources, no page management. */
.ad-account-table { min-width:1280px; }
.ad-account-table th:nth-child(2) { width:190px; }
.ad-account-table th:nth-child(3) { width:90px; }
.ad-account-table th:nth-child(4) { width:180px; }
.ad-account-table th:nth-child(5) { width:85px; }
.ad-account-table th:nth-child(6) { width:155px; }
.ad-account-table th:nth-child(7) { width:120px; }
.ad-account-table th:nth-child(8) { width:155px; }
.ad-account-table th:last-child { width:170px; }
.ad-account-table .row-actions { display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; }
.ad-account-table .row-actions button { text-align:left; padding:0; }
.source-summary { max-width:165px; overflow:hidden; text-overflow:ellipsis; }
.status.pending { color:#b57822; background:#fff7e7; }
.detail-grid { display:grid; grid-template-columns:120px minmax(0,1fr); gap:16px; margin:10px 0 24px; }
.detail-grid dt { color:var(--muted); }
.detail-grid dd { margin:0; overflow-wrap:anywhere; }
.connection-results { border:1px solid var(--line); border-radius:6px; margin-top:18px; }
.connection-row { display:grid; grid-template-columns:minmax(0,1fr) 140px auto; align-items:center; gap:16px; padding:16px; }
.connection-row + .connection-row { border-top:1px solid var(--line); }
.demo-controls { margin:20px 0; color:var(--muted); font-size:12px; }
.demo-controls summary { cursor:pointer; }
.demo-controls .field-label { margin-top:12px; }
/* Fit enterprise fields within the existing content area. */
.business-table { min-width:0; width:100%; table-layout:fixed; }
.business-table th,.business-table td { min-width:0; white-space:normal; overflow-wrap:anywhere; padding:12px 10px; }
.business-table th:nth-child(2) { width:18%; }
.business-table th:nth-child(3) { width:16%; }
.business-table th:nth-child(4) { width:9%; }
.business-table th:nth-child(5) { width:10%; }
.business-table th:nth-child(6) { width:auto; }
.business-table th:nth-child(7) { width:17%; }
.business-table th:last-child { width:136px; min-width:0; }
.business-table .sticky { position:static; min-width:0; box-shadow:none; }
.business-table .business-row-actions { gap:6px 12px; }
.business-table .remark { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:1100px) {
 .business-table th,.business-table td { padding:10px 8px; }
 .business-table th:last-child { width:116px; }
}
.picker-table table { min-width:940px; }
.picker-table th:nth-child(2) { width:85px; }
.picker-table th:nth-child(4) { width:155px; }
.picker-table th:nth-child(5) { width:85px; }
.picker-table th:nth-child(6) { width:155px; }

/* Account asset picker: fit columns to the dialog and use one scroll area. */
dialog.account-picker-dialog { width:920px; max-height:calc(100dvh - 40px); }
dialog.account-picker-dialog[open] { display:flex; flex-direction:column; }
.account-picker-dialog .modal-head,.account-picker-dialog .modal-footer { flex:none; }
.account-picker-dialog #modal-body { min-height:0; max-height:none; overflow:auto; padding:16px 24px; }
.account-picker-dialog .picker-context { margin:0 0 10px; }
.account-picker-dialog .picker-controls { margin-bottom:12px; }
.account-picker-dialog .picker-table { min-height:0; max-height:none; overflow:visible; }
.account-picker-dialog .picker-table table { width:100%; min-width:0; table-layout:fixed; }
.account-picker-dialog .picker-table th,.account-picker-dialog .picker-table td { min-width:0; padding:8px; white-space:normal; overflow-wrap:anywhere; }
.account-picker-dialog .picker-table th { height:38px; }
.account-picker-dialog .picker-table td { height:46px; }
.account-picker-dialog .picker-table th:first-child,.account-picker-dialog .picker-table td:first-child { width:40px; text-align:center; }
.account-picker-dialog .picker-table th:nth-child(2) { width:78px; }
.account-picker-dialog .picker-table th:nth-child(3) { width:27%; }
.account-picker-dialog .picker-table th:nth-child(4) { width:154px; }
.account-picker-dialog .picker-table th:nth-child(5) { width:78px; }
.account-picker-dialog .picker-table th:nth-child(6) { width:auto; }
.account-picker-dialog .picker-pagination { margin-top:12px; }
.account-picker-dialog .demo-caption { margin:8px 0 0; }
@media(max-width:700px) {
 .account-picker-dialog .picker-query { flex-wrap:wrap; gap:8px; }
 .account-picker-dialog .picker-query input,.account-picker-dialog .picker-query select { flex:1 1 140px; }
 .account-picker-dialog .picker-buttons { flex-wrap:wrap; gap:8px; }
 .account-picker-dialog .picker-table th:nth-child(2) { width:60px; }
 .account-picker-dialog .picker-table th:nth-child(4) { width:21%; }
 .account-picker-dialog .picker-table th:nth-child(5) { width:60px; }
}
