/* Local Easy投-style adaptation. Original magnetic components and actions stay intact.
   Applies to embedded builder and results surfaces, never the standalone workbench. */
.main-magnetic-create-surface[hidden] { display: none !important; }
html.embedded-workspace .main-magnetic-result-help{background:#fff;border:1px solid #e5e6eb;border-radius:4px;margin:0 0 12px;font-size:12px}
html.embedded-workspace .main-magnetic-result-help>summary{padding:8px 12px;cursor:pointer;color:#4e5969}
html.embedded-workspace .main-magnetic-result-help .workflow-hint{margin:0;border:0;border-top:1px solid #e5e6eb;border-radius:0}
html.embedded-workspace .main-magnetic-result-handoff { padding: 12px 16px; margin: 0; }
html.embedded-workspace .main-magnetic-build-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; padding: 12px;
}
html.embedded-workspace .main-magnetic-build-header h2 { font-size: 18px; }
html.embedded-workspace .main-magnetic-build-header p { margin-top: 6px; font-size: 12px; }
html.embedded-workspace .main-magnetic-single-actions,
html.embedded-workspace .main-magnetic-codex-help {
  background: #fff; border: 1px solid #e5e6eb; border-radius: 4px; margin-bottom: 12px;
}
html.embedded-workspace .main-magnetic-single-actions > summary,
html.embedded-workspace .main-magnetic-codex-help > summary {
  padding: 12px; cursor: pointer; font-size: 13px; color: #165dff;
}
html.embedded-workspace .main-magnetic-primary-plan > .plan-table { margin-bottom: 12px; }
html.embedded-workspace:has(.batch-lookup) .main-shell {
  background: #f2f3f5;
}
html.embedded-workspace:has(.batch-lookup) .main-content {
  padding: 12px;
  max-width: none;
}
html.embedded-workspace:has(.batch-lookup) .topbar {
  height: 44px;
  padding: 0 16px;
  background: #fff;
}
html.embedded-workspace:has(.batch-lookup) .contextbar {
  min-height: 44px;
  padding: 8px 16px;
}
html.embedded-workspace:has(.batch-lookup) .page-heading {
  margin: 12px 0;
  gap: 12px;
  flex-wrap: wrap;
}
html.embedded-workspace:has(.batch-lookup) .page-heading h1 { font-size: 18px; }
html.embedded-workspace:has(.batch-lookup) .breadcrumb { margin-bottom: 6px; }
html.embedded-workspace:has(.batch-lookup) .page-heading p { margin-top: 5px; }
html.embedded-workspace:has(.batch-lookup) .surface {
  border-color: #e5e6eb;
  border-radius: 4px;
  margin-bottom: 12px;
  box-shadow: none;
}
html.embedded-workspace:has(.batch-lookup) .workflow-hint {
  margin-bottom: 12px;
  padding: 10px 12px;
}
html.embedded-workspace:has(.batch-lookup) .batch-lookup { padding: 12px; }
html.embedded-workspace:has(.batch-lookup) .lookup-form { gap: 12px; }
html.embedded-workspace:has(.batch-lookup) .section-title {
  min-height: 52px;
  padding: 12px;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}
html.embedded-workspace:has(.batch-lookup) .toolbar { gap: 8px; max-width: 100%; }
html.embedded-workspace:has(.batch-lookup) .ant-table-thead > tr > th {
  background: #f2f3f5 !important;
  color: #1d2129 !important;
  font-size: 12px !important;
}
html.embedded-workspace:has(.batch-lookup) .ant-table-cell { padding: 10px 12px !important; }
html.embedded-workspace:has(.batch-lookup) .receipt-metrics {
  background: #fff;
  padding: 12px 0;
}
html.embedded-workspace:has(.batch-lookup) .receipt-metrics .metric { padding: 0 16px; }
html.embedded-workspace:has(.batch-lookup) .receipt-metrics .metric strong { font-size: 20px; }
html.embedded-workspace:has(.batch-lookup) .receipt-filter-note { padding: 10px 12px; }
html.embedded-workspace:has(.batch-lookup) .receipt-metrics .metric > span,
html.embedded-workspace:has(.batch-lookup) .config-info,
html.embedded-workspace:has(.batch-lookup) .cell-title > span:last-child { font-size: 12px; }
html.embedded-workspace:has(.batch-lookup) .plan-batch-receipt .metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
html.embedded-workspace:has(.batch-lookup) .main-plan-row-detail {
  width: calc(100vw - 48px);
  max-width: 100%;
  min-width: 0;
}
@media (max-width: 600px) {
  html.embedded-workspace:has(.batch-lookup) .topbar {
    height: auto;
    min-height: 44px;
    padding: 8px 12px;
    flex-wrap: wrap;
  }
  html.embedded-workspace:has(.batch-lookup) .contextbar { padding: 8px 12px; }
  html.embedded-workspace:has(.batch-lookup) .main-content { padding: 8px; }
  html.embedded-workspace:has(.batch-lookup) .workflow-hint {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 8px;
  }
  html.embedded-workspace:has(.batch-lookup) .workflow-hint > div { flex: 1; min-width: 0; }
  html.embedded-workspace:has(.batch-lookup) .lookup-controls { width: 100%; min-width: 0; }
  html.embedded-workspace:has(.batch-lookup) .toolbar { width: 100%; }
  html.embedded-workspace:has(.batch-lookup) .toolbar > .ant-select,
  html.embedded-workspace:has(.batch-lookup) .toolbar > .ant-input-affix-wrapper {
    flex: 1 1 130px;
    min-width: 0;
  }
  html.embedded-workspace:has(.batch-lookup) .receipt-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }
  html.embedded-workspace:has(.batch-lookup) .receipt-metrics .metric:nth-child(even) { border-right: 0; }
  html.embedded-workspace:has(.batch-lookup) .plan-batch-receipt .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Account table in the embedded main UI; original actions and authorization remain. */
html.embedded-workspace:has(.main-magnetic-accounts) .main-content{padding:12px;max-width:none}
html.embedded-workspace:has(.main-magnetic-accounts) .main-shell{background:#f2f3f5}
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading{margin:12px 0;gap:8px}
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading h1{font-size:18px}
html.embedded-workspace .main-magnetic-account-summary{display:flex;flex-wrap:wrap;gap:12px 24px;margin-bottom:12px;padding:12px 16px;background:#fff;border:1px solid #e5e6eb;font-size:13px;color:#4e5969}
html.embedded-workspace .main-magnetic-account-summary strong{color:#165dff;margin-left:6px}
html.embedded-workspace .main-magnetic-account-summary span:last-child{margin-left:auto;color:#86909c;font-size:12px}
html.embedded-workspace .main-magnetic-accounts .surface{border:1px solid #e5e6eb;border-radius:4px;box-shadow:none;margin-bottom:12px}
html.embedded-workspace .main-magnetic-accounts .section-title{padding:12px 16px;gap:12px;flex-wrap:wrap}
html.embedded-workspace .main-magnetic-accounts h2{font-size:15px}
html.embedded-workspace .main-magnetic-accounts .connection-grid{display:flex;flex-direction:column;gap:8px;padding:0 16px 12px}
html.embedded-workspace .main-magnetic-accounts .connection-card{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr);gap:6px 20px;width:100%;padding:12px;text-align:left;border-radius:4px;box-shadow:none}
html.embedded-workspace .main-magnetic-accounts .connection-card p,html.embedded-workspace .main-magnetic-accounts .connection-card small{margin:0;font-size:12px}
html.embedded-workspace .main-magnetic-accounts .connection-card small:last-child{grid-column:1/-1}
html.embedded-workspace .main-magnetic-accounts .table-actions{display:flex;gap:10px;white-space:nowrap}
html.embedded-workspace .main-magnetic-accounts .main-magnetic-account-build{color:#165dff}
html.embedded-workspace .main-magnetic-accounts .main-magnetic-account-build:disabled{color:#c9cdd4}
html.embedded-workspace .main-magnetic-accounts .ant-table-thead>tr>th{background:#f2f3f5;font-size:13px}
html.embedded-workspace .main-magnetic-accounts .ant-table-tbody>tr>td{font-size:13px;padding:12px 16px}
@media(max-width:600px){html.embedded-workspace .main-magnetic-account-summary span:last-child{margin-left:0;width:100%}html.embedded-workspace .main-magnetic-accounts .connection-card{grid-template-columns:minmax(0,1fr)}html.embedded-workspace .main-magnetic-accounts .toolbar{flex-wrap:wrap;width:100%}html.embedded-workspace .main-magnetic-accounts .toolbar .ant-input-affix-wrapper{min-width:0;width:100%}}

/* Account page hierarchy: retain identity, context and capability notices, omit repeated introduction. */
html.embedded-workspace:has(.main-magnetic-accounts) .topbar {
  height:auto;min-height:40px;padding:6px 16px;gap:8px;background:#fff;
}
html.embedded-workspace:has(.main-magnetic-accounts) .contextbar {
  min-height:44px;padding:6px 16px;gap:10px;
}
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading {
  margin:10px 0;min-height:28px;align-items:center;
}
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading h1 {
  margin:0;font-size:16px;line-height:24px;
}
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading .breadcrumb,
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading p {display:none}
html.embedded-workspace:has(.main-magnetic-accounts) .page-heading-tag {padding:4px 8px}
html.embedded-workspace .main-magnetic-account-summary {padding:8px 12px;gap:8px 24px}
html.embedded-workspace .main-magnetic-accounts .section-title {min-height:52px;padding:8px 16px}
@media(max-width:600px) {
  html.embedded-workspace:has(.main-magnetic-accounts) .topbar {padding:8px 12px;flex-wrap:wrap}
  html.embedded-workspace:has(.main-magnetic-accounts) .company-name,
  html.embedded-workspace:has(.main-magnetic-accounts) .employee {min-width:0;max-width:100%;flex-wrap:wrap;gap:6px}
  html.embedded-workspace:has(.main-magnetic-accounts) .company-name strong,
  html.embedded-workspace:has(.main-magnetic-accounts) .employee>span {overflow-wrap:anywhere}
  html.embedded-workspace:has(.main-magnetic-accounts) .contextbar {display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px;padding:8px 12px}
  html.embedded-workspace:has(.main-magnetic-accounts) .contextbar>.ant-select {width:100%!important;min-width:0}
  html.embedded-workspace:has(.main-magnetic-accounts) .context-label {grid-column:1/-1;margin:0}
  html.embedded-workspace:has(.main-magnetic-accounts) .main-content {padding:8px}
  html.embedded-workspace:has(.main-magnetic-accounts) .page-heading {flex-direction:row;gap:8px}
}

@media(max-width:600px) {
  html.embedded-workspace:has(.main-magnetic-accounts) .employee .ant-tag {display:inline-flex}
  html.embedded-workspace .main-magnetic-accounts .section-title {flex-direction:row;align-items:center}
  html.embedded-workspace .main-magnetic-accounts .toolbar {width:auto}
  html.embedded-workspace .main-magnetic-accounts .toolbar:has(input[aria-label="搜索账户"]) {display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%;gap:8px}
  html.embedded-workspace .main-magnetic-accounts .toolbar:has(input[aria-label="搜索账户"]) .ant-input-affix-wrapper {grid-column:1/-1;grid-row:1;width:100%}
  html.embedded-workspace .main-magnetic-accounts .toolbar:has(input[aria-label="搜索账户"]) .ant-select {grid-column:1;grid-row:2;width:100%;min-width:0}
  html.embedded-workspace .main-magnetic-accounts .toolbar:has(input[aria-label="搜索账户"])>button {grid-column:2;grid-row:2}
}
