.header-actions { display: flex; align-items: center; gap: 10px; }
.header-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 16px; border-color: #dedfe7; background: var(--card); color: var(--text-2); font-size: 13px; font-weight: 500; }
.header-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.header-action:hover { border-color: #aeb8e7; color: var(--blue); background: #f8f9ff; }
.header-action-primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 2px 5px #283ecb14; }
.header-action-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); color: #fff; }
.footer { align-items: center; }
.workspace-dialog { width: 960px; max-width: calc(100vw - 64px); max-height: calc(100dvh - 64px); padding: 0; overflow: hidden; border: 1px solid #e5e6ec; border-radius: 20px; background: #fff; box-shadow: 0 24px 100px #16204430; }
.workspace-dialog::backdrop { background: #18213866; backdrop-filter: blur(6px); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; border-bottom: 1px solid #eceef3; }
.workspace-title { display: flex; align-items: center; gap: 14px; }
.workspace-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid #e4e8fa; border-radius: 13px; background: #f3f5ff; color: var(--blue); }
.workspace-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.workspace-title h2 { margin: 0 0 3px; font-size: 21px; font-weight: 600; letter-spacing: -.4px; }
.workspace-title p { margin: 0; color: var(--muted); font-size: 13px; }
.workspace-heading .close-dialog { display: grid; place-items: center; width: 32px; min-height: 32px; margin: 0; padding: 0; border-radius: 8px; font-size: 24px; }
.batch-workspace { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); height: 438px; max-height: calc(100dvh - 240px); }
.batch-import { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 24px; border-right: 1px solid #eceef3; background: #fafbfe; }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.section-label label, .section-label h3 { margin: 0; color: #30384b; font-size: 14px; font-weight: 600; }
.section-label > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.batch-format { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; font-size: 11px; color: #9297a4; }
.batch-format code { font: 11px var(--mono); color: #656e81; }
#batch-accounts { flex: 1; min-height: 120px; width: 100%; padding: 14px; resize: none; border: 1px solid #dde1eb; border-radius: 11px; background: #fff; color: #30384b; font: 12px/1.9 var(--mono); transition: border-color .2s, box-shadow .2s; }
#batch-accounts::placeholder { color: #a8adbb; }
#batch-accounts:focus { outline: none; border-color: #8998e2; box-shadow: 0 0 0 3px #283ecb0c; }
#batch-accounts:disabled { background: #f4f5f9; }
.batch-input-meta { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 20px; color: #969cab; font-size: 11px; }
#batch-submit { flex: none; min-height: 40px; font-size: 13px; }
.batch-output { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 24px 28px; }
#batch-progress { display: block; width: 100%; height: 3px; margin: 12px 0 10px; appearance: none; border: 0; border-radius: 2px; overflow: hidden; background: #eef0f6; }
#batch-progress::-webkit-progress-bar { background: #eef0f6; }
#batch-progress::-webkit-progress-value { background: var(--blue); transition: width .25s; }
#batch-progress::-moz-progress-bar { background: var(--blue); }
.batch-result-area { position: relative; flex: 1; min-height: 0; overflow-y: auto; }
.batch-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #a8afbf; }
.batch-empty svg { width: 44px; height: 44px; margin-bottom: 12px; fill: none; stroke: #c4cada; stroke-width: 1.2; stroke-linecap: round; }
.batch-empty p { margin: 0 0 5px; font-size: 13px; color: #858e9f; }
.batch-empty > span { font-size: 12px; color: #adb3bf; }
.batch-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.batch-table th { position: sticky; top: 0; z-index: 1; padding: 9px 0; background: #fff; border-bottom: 1px solid #eceef3; color: #969dab; font-size: 11px; font-weight: 500; }
.batch-table th:last-child, .batch-table td:last-child { width: 86px; text-align: right; }
.batch-table td { padding: 12px 0; border-bottom: 1px solid #f0f1f5; vertical-align: middle; }
.batch-email { display: block; max-width: 340px; overflow-wrap: anywhere; color: #41495a; font-weight: 500; }
.batch-error { display: block; margin-top: 4px; max-width: 330px; font-size: 11px; color: #9a7880; overflow-wrap: anywhere; }
.batch-state { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #f1f3f7; color: #8991a0; font-size: 11px; white-space: nowrap; }
.batch-state[data-state="checking"], .batch-state[data-state="running"] { background: #eef1ff; color: var(--blue); }
.batch-state[data-state="succeeded"] { background: #edf7f0; color: #42815b; }
.batch-state[data-state="failed"], .batch-state[data-state="expired"] { background: #fbefee; color: #b46764; }
.batch-state[data-state="needs_attention"] { background: #fcf5e9; color: #a0824b; }
.batch-result-actions { display: flex; align-items: center; gap: 16px; flex: none; padding-top: 18px; }
.batch-result-actions .secondary { min-height: 34px; padding: 0 13px; border-radius: 8px; font-size: 12px; }
.batch-result-actions .text-button { font-size: 12px; }
#batch-clear { margin-left: auto; }
.workspace-footer { padding: 0 28px; border-top: 1px solid #eceef3; background: #fcfcfe; }
.workspace-footer p { display: flex; align-items: center; height: 46px; margin: 0; color: #9299a8; font-size: 11px; line-height: 1.6; }
#batch-notice[data-tone="error"] { color: #b46764; }
#batch-notice[data-tone="success"] { color: #42815b; }
#api-dialog { width: 760px; }
.api-content { padding: 22px 28px 16px; }
.api-origin { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid #e8ebf2; border-radius: 10px; background: #fafbfe; }
.api-origin > span { font-size: 12px; color: #8a93a3; }
.api-origin code { font: 13px var(--mono); color: #414b64; }
.api-origin .text-button { margin-left: auto; min-height: 24px; font-size: 12px; }
.api-tabs { display: flex; gap: 26px; margin-top: 20px; border-bottom: 1px solid #eceef3; }
.api-tabs button { position: relative; min-height: 42px; padding: 0 0 12px; border: 0; border-radius: 0; background: transparent; color: #8b93a3; font-size: 13px; }
.api-tabs button[aria-selected="true"] { color: var(--blue); font-weight: 600; }
.api-tabs button[aria-selected="true"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); content: ""; }
.api-request { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
#api-method { padding: 3px 7px; border-radius: 5px; background: #edf7f0; color: #42815b; font: 600 10px var(--mono); }
#api-method[data-method="GET"] { background: #eef1ff; color: var(--blue); }
#api-method[data-method="DELETE"] { background: #fbefee; color: #b46764; }
#api-path { color: #586175; font: 12px var(--mono); }
#api-copy { margin-left: auto; min-height: 26px; font-size: 12px; }
#api-code { height: 152px; margin: 10px 0 16px; padding: 18px 20px; overflow: auto; border: 1px solid #222b41; border-radius: 11px; background: #20283b; color: #e3e8f5; font: 12px/1.9 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.api-response { display: flex; align-items: flex-start; gap: 16px; height: 74px; padding: 12px 14px; overflow: auto; border: 1px solid #eceef3; border-radius: 9px; }
.api-response > span { flex: none; padding-top: 2px; color: #939bab; font-size: 11px; }
#api-response { margin: 0; color: #647086; font: 11px/1.9 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
#api-note { height: 44px; margin: 12px 0 0; color: #9299a8; font-size: 12px; line-height: 1.8; }

@media (max-width: 700px) {
  .workspace-dialog { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; }
  .workspace-heading { gap: 12px; padding: 20px; }
  .workspace-title { gap: 10px; min-width: 0; }
  .workspace-title h2 { font-size: 18px; }
  .workspace-title p { font-size: 12px; }
  .workspace-icon { width: 36px; height: 36px; border-radius: 10px; }
  .batch-workspace { grid-template-columns: minmax(0, 1fr); height: auto; max-height: none; }
  .batch-import { padding: 20px; border-right: 0; border-bottom: 1px solid #eceef3; }
  #batch-accounts { height: 150px; flex: none; }
  .batch-output { padding: 20px; min-height: 270px; }
  .batch-result-area { max-height: 240px; min-height: 120px; }
  .workspace-footer { padding: 0 20px; }
  .workspace-footer p { height: 72px; overflow: auto; }
  .api-content { padding: 20px; }
  .api-origin { gap: 10px; flex-wrap: wrap; padding: 12px; }
  .api-origin code { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
  #api-code { height: 190px; padding: 14px; font-size: 11px; }
  #api-note { height: 84px; overflow: auto; }
}
