:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3ef;
  --line-soft: #edf2f7;
  --soft: #f8fafc;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #059669;
  --green-soft: #ecfdf5;
  --red: #dc2626;
  --red-soft: #fff1f2;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

.appShell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 42px;
}

.topBar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  padding: 10px 14px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #0f172a;
}
.brand b {
  display: block;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
}
.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.server {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.server i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}
.server.ready i { background: var(--green); }

.hero,
.activationCard,
.taskCard,
.floatingQueue,
.verifyLink,
.batchSubmitEntry,
.batchTool {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(420px, 1.06fr);
  gap: 20px;
  align-items: stretch;
  margin-top: 16px;
  padding: 24px;
}
.eyebrow {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 5px 10px;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
}
.hero h1 {
  margin: 12px 0 10px;
  color: #0f172a;
  font-size: clamp(32px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 900;
}
.hero p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 800;
}
.quickSteps {
  display: grid;
  gap: 10px;
}
.quickSteps div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fbfdff;
  padding: 14px;
}
.quickSteps b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #0f172a;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}
.quickSteps span {
  color: #1f2937;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 900;
}

.workArea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 346px;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.mainColumn {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}
.activationCard { overflow: hidden; }
.cardHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfdff;
  padding: 22px 24px;
}
.cardHead h2 {
  margin: 10px 0 0;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.16;
  font-weight: 900;
}
.cardHead p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  text-align: right;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 800;
}
.planChooser,
.activationForm {
  padding: 22px 24px;
}
.activationForm { padding-top: 0; }
.stepBlock + .sessionStep { margin-top: 24px; }
.stepTitle {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}
.stepTitle span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}
body[data-card="locked"] #cardStepBadge {
  background: var(--green-soft);
  color: var(--green);
}
.stepGuideText {
  margin: -4px 0 14px 47px;
  color: #475569;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 800;
}

.workflowGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.workflowTile {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 13px;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.workflowTile:hover { border-color: #bfdbfe; background: #fbfdff; }
.workflowTile input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.workflowTile:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
.workflowTile i {
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0f172a;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}
.workflowTile b {
  min-width: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
}
.workflowTile small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
}
body[data-card="locked"] .workflowTile {
  pointer-events: none;
  opacity: .65;
}

.field {
  display: grid;
  gap: 8px;
}
.field > span {
  color: #334155;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}
.inputShell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.inputShell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
body[data-card="locked"] .inputShell {
  border-color: rgba(5, 150, 105, .45);
  background: var(--green-soft);
}
.field input,
.field textarea,
.batchInputPanel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.inputShell input {
  min-height: 50px;
  border: 0;
  padding: 0 12px;
  font-size: 17px;
  font-family: Consolas, "SFMono-Regular", monospace;
}
.field textarea {
  min-height: 148px;
  padding: 14px;
  resize: vertical;
  background: #fbfdff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 14px;
  line-height: 1.55;
}
.field textarea:focus,
.batchInputPanel textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .08);
}
.field textarea.inputError {
  border-color: rgba(220, 38, 38, .55);
  background: var(--red-soft);
}

.darkButton,
.ghostButton,
.primary,
.autoButton,
.smartButton,
.secondary,
.dangerButton,
.metricButton,
.sessionLink,
.verifyLink a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 0;
  padding: 0 16px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.darkButton {
  min-width: 116px;
  background: #0f172a;
  color: #fff;
}
.darkButton.full { width: 100%; margin-top: 12px; }
.darkButton:hover,
.primary:hover { transform: translateY(-1px); }
.ghostButton {
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
}
.ghostButton:hover { background: var(--soft); }
.primary {
  min-width: 190px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}
.autoButton {
  min-width: 150px;
  border: 1px solid rgba(5, 150, 105, .28);
  background: var(--green-soft);
  color: var(--green);
}
.autoButton.running {
  border-color: rgba(217, 119, 6, .34);
  background: var(--amber-soft);
  color: var(--amber);
}
.smartButton {
  min-width: 150px;
  border: 1px solid rgba(124, 58, 237, .26);
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 10px 20px rgba(124, 58, 237, .18);
}
.smartButton.running {
  background: #6d28d9;
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: #475569;
}
.dangerButton {
  border: 1px solid rgba(220, 38, 38, .18);
  background: var(--red-soft);
  color: var(--red);
}
.metricButton,
.sessionLink {
  border: 1px solid #bfdbfe;
  background: var(--blue-soft);
  color: var(--blue);
}

.notice {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: #475569;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}
.notice.collapsed { display: none; }
.notice.ok { border-color: rgba(5, 150, 105, .22); background: var(--green-soft); color: #047857; }
.notice.error { border-color: rgba(220, 38, 38, .22); background: var(--red-soft); color: var(--red); }
.notice.warn { border-color: rgba(217, 119, 6, .24); background: var(--amber-soft); color: var(--amber); }

.sessionStep {
  max-height: none;
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  border-color: var(--line-soft);
}
.sessionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sessionHead .stepTitle { margin: 0; }
.secureBadge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.simpleGuide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.simpleGuide div {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fbfdff;
  padding: 12px;
}
.simpleGuide b {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}
.simpleGuide span {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}
.sessionGuide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #fbfdff;
  padding: 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 800;
}
.sessionMiniGuide {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  border-left: 3px solid var(--blue);
  background: #f8fafc;
  padding: 12px 14px;
}
.sessionMiniGuide span {
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}
.accountLine {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}
.accountLine span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.accountLine b { word-break: break-all; }
.actionRow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.statusBanner {
  margin-top: 12px;
  display: none;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
  color: #475569;
  padding: 12px 14px;
  line-height: 1.5;
  font-weight: 900;
}
body[data-card="locked"] .statusBanner,
body[data-process="pending"] .statusBanner,
body[data-process="processing"] .statusBanner,
body[data-process="done"] .statusBanner,
body[data-process="failed"] .statusBanner,
body[data-process="cancelled"] .statusBanner {
  display: flex;
}
.statusBanner.ok { border-color: rgba(5, 150, 105, .22); background: var(--green-soft); color: #047857; }
.statusBanner.error { border-color: rgba(220, 38, 38, .22); background: var(--red-soft); color: var(--red); }
.statusBanner.warn { border-color: rgba(217, 119, 6, .24); background: var(--amber-soft); color: var(--amber); }

.sideColumn {
  display: grid;
  gap: 14px;
}
.batchSubmitEntry {
  display: grid;
  gap: 8px;
  padding: 16px;
}
.batchSubmitEntry span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}
.batchSubmitEntry b {
  color: #0f172a;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 900;
}
.batchSubmitEntry p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 800;
}
.batchSubmitEntry a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
}
.statusPanel {
  display: grid;
  gap: 0;
}
.sideColumn,
.statusPanel,
.statusPanel .floatingQueue {
  position: static !important;
}
.taskCard,
.floatingQueue {
  padding: 18px;
}
.sideHead {
  display: grid;
  gap: 7px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 12px;
}
.sideHead h2,
.floatingQueueHead h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 900;
}
.sideHead p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}
.jobMeta {
  display: grid;
  gap: 8px;
}
.jobMeta > div {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfdff;
  padding: 11px 12px;
}
.jobMeta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
}
.jobMeta b {
  display: block;
  margin-top: 5px;
  color: #0f172a;
  font-size: 16px;
  word-break: break-word;
}
.jobActions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.smallButton {
  min-height: 36px;
  width: 100%;
  padding: 0 12px;
}
.jobActions small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.jobMeta .wide { padding: 13px; }
.bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}
.bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width .25s ease;
}
#step3ProgressText {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.resultBox {
  color: #475569;
  line-height: 1.55;
  white-space: pre-line;
  font-weight: 800;
}

.statusPanel .floatingQueue {
  margin-top: 16px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 16px 0 0;
}
.floatingQueueHead {
  display: grid;
  gap: 7px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.floatingQueueHead span {
  display: block;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}
.queueSummary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.queueSummary div,
.queueCard {
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: #fbfdff;
  padding: 13px;
}
.queueSummary span,
.queueCard span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}
.queueSummary b,
.queueCard b {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 23px;
  line-height: 1.2;
  font-weight: 900;
}
.queueMiniList {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.statusPanel .queueMiniList {
  display: none;
}
.queueMini {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #475569;
  padding: 7px 11px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}
.queueMini b { color: var(--green); }
.queueGrid {
  display: grid;
  gap: 10px;
}
.queueCard.active {
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .07);
}
.queueCard span {
  margin-top: 6px;
  color: #475569;
  font-weight: 800;
}
.fullQueueButton { width: 100%; margin-top: 12px; }

.verifyLink {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  padding: 20px 22px;
}
.activationCard .verifyLink {
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
  background: #fbfdff;
  padding: 20px 24px 22px;
}
.verifyLink h2,
.batchHeader h2 {
  margin: 0;
  color: #0f172a;
  font-size: 21px;
  font-weight: 900;
}
.verifyLink p,
.batchHeader p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 800;
}
.verifyLink a {
  flex: 0 0 auto;
  border: 1px solid #bfdbfe;
  background: var(--blue-soft);
  color: var(--blue);
}

.batchTool {
  margin-top: 18px;
  overflow: hidden;
}
.batchTool summary {
  list-style: none;
  padding: 18px 22px;
  color: #334155;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.batchTool summary::-webkit-details-marker { display: none; }
.batchHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fbfdff;
  padding: 20px 22px;
}
.batchStats {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 11px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.batchStats b { color: #0f172a; }
.batchBody {
  display: grid;
  grid-template-columns: minmax(280px, .38fr) minmax(0, .62fr);
}
.batchInputPanel {
  border-right: 1px solid var(--line-soft);
  background: #fff;
  padding: 20px;
}
.batchInputPanel textarea {
  min-height: 250px;
  padding: 13px;
  resize: vertical;
  background: #fbfdff;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.5;
}
.batchResultPanel {
  background: #fbfdff;
  padding: 20px;
}
.emptyResult {
  min-height: 250px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 900;
}
.batchTableWrap {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.batchTableWrap table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13px;
}
.batchTableWrap th,
.batchTableWrap td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
.batchTableWrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 900;
}
.statusPill {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}
.statusPill.ok { background: var(--green-soft); color: #047857; }
.statusPill.warn { background: #f1f5f9; color: #64748b; }
.statusPill.error { background: var(--red-soft); color: var(--red); }
.batchQueueText {
  display: inline-block;
  min-width: 190px;
  white-space: normal;
  color: #0f766e;
  font-weight: 800;
  line-height: 1.45;
}
.useButton {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 0 10px;
  font-weight: 900;
  cursor: pointer;
}
.useButton:disabled { opacity: .5; cursor: not-allowed; }

.maintenancePage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f3f6fb;
}
.maintenancePanel {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 34px;
  text-align: center;
}
.maintenancePanel img {
  width: 54px;
  height: 54px;
}
.maintenancePanel span {
  display: block;
  margin-top: 14px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}
.maintenancePanel h1 {
  margin: 8px 0 10px;
  color: #0f172a;
  font-size: 30px;
  line-height: 1.2;
}
.maintenancePanel p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
  font-weight: 800;
}

.verificationModal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .46);
}
.verificationModal[hidden] { display: none; }
.verificationDialog {
  position: relative;
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  padding: 26px;
}
.verificationClose {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modalEyebrow {
  margin: 0 0 8px;
  color: #047857;
  font-size: 13px;
  font-weight: 900;
}
.verificationDialog h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.25;
}
.verificationDialog p {
  margin: 12px 0 0;
  color: #475569;
  line-height: 1.55;
  font-weight: 800;
}
#verificationSessionText {
  width: 100%;
  min-height: 118px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  padding: 12px;
  resize: vertical;
  font: 13px/1.45 Consolas, "SFMono-Regular", monospace;
}
.verificationInfo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.verificationInfo div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
}
.verificationInfo span,
.verificationSessionBlock span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}
.verificationInfo b {
  color: #0f172a;
  font-size: 14px;
  word-break: break-all;
}
.verificationSessionBlock {
  display: block;
  margin-top: 14px;
}
.verificationActions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (min-width: 1180px) {
  .sideColumn {
    position: static;
    align-self: start;
  }
}

@media (max-width: 1040px) {
  .appShell {
    width: min(100% - 24px, 1120px);
  }
  .hero,
  .workArea {
    grid-template-columns: 1fr;
  }
  .sideColumn {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  body {
    background: #f6f8fc;
  }
  .appShell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0 28px;
  }
  .topBar,
  .cardHead,
  .sessionHead,
  .sessionGuide,
  .verifyLink,
  .batchHeader {
    align-items: stretch;
    flex-direction: column;
  }
  .hero,
  .activationCard,
  .taskCard,
  .floatingQueue,
  .verifyLink,
  .batchTool {
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
  }
  .topBar {
    position: static;
    gap: 10px;
    min-height: auto;
    padding: 10px;
  }
  .brand {
    width: 100%;
  }
  .brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .brand b {
    font-size: 18px;
  }
  .brand small {
    font-size: 12px;
  }
  .server {
    width: 100%;
    justify-content: center;
    min-height: 32px;
  }
  .hero,
  .planChooser,
  .activationForm,
  .taskCard,
  .floatingQueue,
  .verifyLink,
  .batchInputPanel,
  .batchResultPanel {
    padding: 14px;
  }
  .hero {
    gap: 12px;
    margin-top: 10px;
  }
  .hero h1 {
    margin: 8px 0 6px;
    font-size: 25px;
    line-height: 1.2;
  }
  .hero p {
    font-size: 14px;
    line-height: 1.55;
  }
  .eyebrow {
    font-size: 12px;
  }
  .quickSteps {
    gap: 8px;
  }
  .quickSteps div {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 10px;
    border-radius: 12px;
  }
  .quickSteps b {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
  }
  .quickSteps span {
    font-size: 14px;
    line-height: 1.45;
  }
  .cardHead,
  .batchHeader {
    padding: 14px;
  }
  .cardHead h2 {
    font-size: 25px;
  }
  .cardHead p {
    display: none;
    max-width: 100%;
    text-align: left;
  }
  .workflowGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .workflowTile {
    min-height: 70px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
  }
  .workflowTile i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 13px;
  }
  .workflowTile b {
    font-size: 14px;
  }
  .workflowTile small {
    font-size: 11px;
  }
  .simpleGuide {
    display: none;
  }
  .queueSummary,
  .batchBody {
    grid-template-columns: 1fr;
  }
  .planChooser + .activationForm {
    border-top: 1px solid var(--line-soft);
  }
  .stepBlock,
  .sessionStep {
    padding: 0;
  }
  .stepBlock + .sessionStep {
    margin-top: 18px;
  }
  .stepTitle {
    gap: 9px;
    font-size: 20px;
  }
  .stepTitle span {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .stepGuideText {
    margin-left: 0;
    font-size: 14px;
  }
  .inputShell {
    grid-template-columns: 1fr;
  }
  .inputShell input,
  .field input {
    min-height: 48px;
    font-size: 16px;
  }
  .field textarea {
    min-height: 126px;
    font-size: 14px;
    line-height: 1.55;
  }
  .sessionGuide {
    gap: 10px;
  }
  .sessionGuide span {
    font-size: 14px;
    line-height: 1.5;
  }
  .sessionMiniGuide {
    margin: 10px 0;
    padding: 10px 11px;
  }
  .sessionMiniGuide span {
    font-size: 12px;
  }
  .accountLine {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: auto;
    padding: 11px 12px;
  }
  .accountLine b {
    text-align: left;
  }
  .actionRow {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .darkButton,
  .ghostButton,
  .primary,
  .secondary,
  .dangerButton,
  .sessionLink,
  .verifyLink a {
    width: 100%;
  }
  .statusPanel {
    gap: 0;
  }
  .sideHead {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
  .sideHead h2,
  .floatingQueueHead h2 {
    font-size: 22px;
  }
  .sideHead p {
    display: none;
  }
  .jobMeta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .jobMeta > div {
    padding: 9px 10px;
    border-radius: 11px;
  }
  .jobMeta span {
    font-size: 11px;
  }
  .jobMeta b {
    margin-top: 4px;
    font-size: 15px;
  }
  .jobActions,
  .jobMeta .wide {
    grid-column: 1 / -1;
  }
  .jobMeta .wide {
    padding: 11px;
  }
  .resultBox {
    font-size: 13px;
    line-height: 1.5;
  }
  .statusPanel .floatingQueue {
    margin-top: 14px;
    padding-top: 14px;
  }
  .queueSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
  }
  .queueSummary div,
  .queueCard {
    padding: 10px;
    border-radius: 11px;
  }
  .queueSummary b,
  .queueCard b {
    font-size: 19px;
  }
  .queueGrid {
    gap: 8px;
  }
  .fullQueueButton {
    margin-top: 10px;
  }
  .activationCard .verifyLink {
    padding: 14px;
  }
  .verifyLink h2,
  .batchHeader h2 {
    font-size: 20px;
  }
  .verifyLink p,
  .batchHeader p {
    font-size: 13px;
  }
  .batchInputPanel {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .batchInputPanel textarea {
    min-height: 150px;
  }
  .batchTableWrap {
    max-height: 260px;
  }
}

@media (max-width: 460px) {
  .appShell {
    width: min(100% - 18px, 1120px);
    padding-top: 10px;
  }
  .brand b { font-size: 17px; }
  .brand small { font-size: 12px; }
  .hero h1 { font-size: 23px; }
  .cardHead h2 { font-size: 23px; }
  .hero,
  .planChooser,
  .activationForm,
  .taskCard,
  .floatingQueue,
  .verifyLink,
  .batchInputPanel,
  .batchResultPanel,
  .activationCard .verifyLink {
    padding: 12px;
  }
  .workflowGrid {
    gap: 7px;
  }
  .workflowTile {
    min-height: 66px;
    padding: 9px;
  }
  .workflowTile b {
    font-size: 13px;
  }
  .stepTitle {
    font-size: 19px;
  }
  .field textarea {
    min-height: 116px;
  }
  .queueSummary b,
  .queueCard b {
    font-size: 18px;
  }
}

.batchSubmitPage {
  max-width: 1440px;
}
.batchSubmitHero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}
.batchSubmitHero h1 {
  margin: 10px 0 8px;
  color: #0f172a;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 900;
}
.batchSubmitHero p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 800;
}
.backHome {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--blue);
  background: var(--blue-soft);
  text-decoration: none;
  font-weight: 900;
}
.batchSubmitGrid {
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.batchPanel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}
.batchInputPanelWide,
.batchResultPanelWide {
  margin-top: 18px;
}
.batchPanelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.batchPanel h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 900;
}
.batchPanel .muted {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  font-weight: 800;
}
.batchTemplate {
  margin: 0 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  color: #334155;
  font: 800 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}
.batchFormGrid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: start;
}
.batchWorkflowField {
  width: min(220px, 100%);
  flex: 0 0 220px;
}
.batchSplitInputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.batchField {
  display: grid;
  gap: 7px;
}
.batchField label {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
.batchField select,
.batchField textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 800;
  outline: none;
}
.batchField select {
  min-height: 46px;
  padding: 0 12px;
}
.batchField textarea {
  min-height: 430px;
  padding: 12px;
  resize: vertical;
}
.batchActionBar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.batchActionBar button,
.batchSmallButton {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  padding: 0 14px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.batchActionBar .primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.batchActionBar .autoButton {
  border-color: rgba(5, 150, 105, .28);
  background: var(--green-soft);
  color: var(--green);
}
.batchActionBar .autoButton.running {
  border-color: rgba(217, 119, 6, .34);
  background: var(--amber-soft);
  color: var(--amber);
}
.batchActionBar button:disabled,
.batchSmallButton:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.batchNotice {
  min-height: 42px;
  display: flex;
  align-items: center;
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 900;
}
.batchNotice.ok { border-color: rgba(5, 150, 105, .22); background: var(--green-soft); color: #047857; }
.batchNotice.warn { border-color: rgba(217, 119, 6, .24); background: var(--amber-soft); color: var(--amber); }
.batchNotice.error { border-color: rgba(220, 38, 38, .22); background: var(--red-soft); color: var(--red); }
.batchSubmitStats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}
.batchSubmitStats div {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}
.batchSubmitStats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.batchSubmitStats b {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
}
.batchSubmitTableWrap {
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.batchSubmitTable {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}
.batchSubmitTable th,
.batchSubmitTable td {
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 800;
}
.batchSubmitTable th {
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}
.batchSubmitTable tr:last-child td {
  border-bottom: 0;
}
.batchCode {
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
}
.batchBadge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.batchBadge.ok { background: var(--green-soft); color: #047857; }
.batchBadge.warn { background: var(--amber-soft); color: var(--amber); }
.batchBadge.error { background: var(--red-soft); color: var(--red); }
.batchBadge.idle { background: #f1f5f9; color: #475569; }

@media (max-width: 980px) {
  .batchSubmitHero,
  .batchSubmitGrid,
  .batchFormGrid,
  .batchSplitInputs {
    grid-template-columns: 1fr;
  }
  .batchPanelHead {
    display: grid;
  }
  .batchWorkflowField {
    width: 100%;
    flex-basis: auto;
  }
  .batchSubmitStats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .batchSubmitHero,
  .batchPanel {
    padding: 14px;
    border-radius: 14px;
  }
  .batchSubmitHero h1 {
    font-size: 26px;
  }
  .batchField textarea {
    min-height: 260px;
  }
  .batchActionBar button,
  .batchSmallButton,
  .backHome {
    width: 100%;
  }
  .batchSubmitStats {
    grid-template-columns: 1fr;
  }
}
