/* ===== 通用页面元素、作品、公告、充值、API 对接、弹窗 ===== */
/* =========================================================
   通用页面元素
   ========================================================= */
.page-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-title h2 { margin: 6px 0 5px; font-size: 21px; letter-spacing: -.02em; }
.section-title p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 380px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
}
.empty-card h3 { margin: 1em 0; }
.empty-card p { margin: 1em 0; }
.works-empty-icon { width: 32px; height: 32px; }

.segments { display: flex; flex-wrap: wrap; gap: 7px; }
.segments button {
  min-width: 54px;
  height: 36px;
  padding: 0 11px;
  color: #475569;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
}
.segments button.active { color: var(--blue); background: var(--pale); border-color: #aebfff; font-weight: 700; }

/* =========================================================
   我的作品
   ========================================================= */
.works-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
}
.works-filters { display: flex; align-items: center; gap: 10px; }
.works-bar .segments button { font-size: 0; }
.works-bar .segments button::after { content: "全部"; font-size: 13px; }
.works-bar .segments button:nth-child(2)::after { content: "视频"; }
.success-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  color: #526178;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.success-filter .icon { width: 15px; height: 15px; }
.success-filter.active { color: #047857; background: #ecfdf5; border-color: #86d4b2; font-weight: 700; }
.select-all-works {
  height: 36px;
  padding: 0 11px;
  color: #475569;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.works-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  color: #334155;
  background: #f5f8ff;
  border: 1px solid #dbe4ff;
  border-radius: 11px;
  font-size: 12px;
}
.works-bulk .spacer { flex: 1; }
.works-bulk button {
  height: 32px;
  padding: 0 11px;
  color: var(--blue);
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  font-size: 12px;
}
.works-bulk button.danger { color: #b91c1c; border-color: #fecaca; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.work-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
  transition: box-shadow .18s, transform .18s;
}
.work-card:hover { box-shadow: 0 13px 30px rgba(11, 21, 48, .08); transform: translateY(-1px); }
.work-preview { position: relative; aspect-ratio: 1.2; background: #eef2f8; }
.work-preview img { width: 100%; height: 100%; object-fit: cover; }
.work-preview .play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.work-preview .play-badge span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: rgba(11, 21, 48, .55);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  backdrop-filter: blur(3px);
}
.work-preview .play-badge .icon { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 7px;
  font-size: 11px;
}
.status.success { color: #047857; background: #ecfdf5; }
.status.failed { color: #b91c1c; background: #fef2f2; }
.status.expired { color: #475569; background: #f1f5f9; }
.work-check {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(11, 21, 48, .18);
  border-radius: 7px;
  opacity: 0;
  transition: opacity .15s;
}
.work-card:hover .work-check,
.work-check.checked { opacity: 1; }
.work-check.checked { background: var(--blue); border-color: var(--blue); }
.work-check .icon { width: 13px; height: 13px; }
.work-info { padding: 14px; }
.work-info p {
  display: -webkit-box;
  height: 40px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.work-info small { display: block; margin-top: 7px; color: #94a3b8; font-size: 10px; }
.work-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity .15s;
}
.work-card:hover .work-actions { opacity: 1; }
.work-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #334155;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.work-actions button:hover { color: var(--blue); border-color: #bdcaff; }
.work-actions button.danger:hover { color: #b91c1c; border-color: #fecaca; }

/* =========================================================
   平台公告
   ========================================================= */
.announcement-feed { display: grid; gap: 16px; max-width: 980px; }
.announcement-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.announcement-card > div { padding: 22px; }
.announcement-card span { color: #94a3b8; font-size: 11px; }
.announcement-card h2 { display: flex; align-items: center; gap: 8px; margin: 7px 0 10px; font-size: 20px; }
.announcement-card p { margin: 0; color: #475569; line-height: 1.8; white-space: pre-wrap; }
.announcement-card.unread { border-color: #b8c7ff; box-shadow: 0 8px 24px rgba(49, 94, 251, .05); }
.unread-label { padding: 3px 7px; color: #b91c1c; background: #fee2e2; border-radius: 99px; font-size: 10px; }
.announcement-read-control {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 44px;
  margin-top: 17px;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
}
.announcement-read-control input { position: absolute; opacity: 0; }
.announcement-read-control > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: transparent;
  border: 1px solid #aebfff;
  border-radius: 6px;
}
.announcement-read-control input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.announcement-read-control input:focus-visible + span { outline: 3px solid rgba(49, 94, 251, .19); outline-offset: 2px; }
.announcement-read-control input:disabled ~ strong { color: #64748b; }
.announcement-read-control:has(input:disabled) { cursor: default; }

/* =========================================================
   充值与账户
   ========================================================= */
.metric-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.metric {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 150px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.metric > span { color: var(--muted); }
.metric strong { margin-top: 15px; font-size: 40px; letter-spacing: -.04em; line-height: normal; }
.metric small { color: var(--muted); }
.hero-metric {
  color: #fff;
  background: linear-gradient(135deg, #172554, #315efb);
  border-color: #e2e8f0;
}
.hero-metric > span { color: #cbd7ff; }
.hero-metric small { color: #cbd7ff; padding-right: 124px; }
.hero-metric .secondary-button { position: absolute; right: 20px; bottom: 20px; }
.settings-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 18px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.settings-card .profile { display: flex; align-items: center; gap: 15px; }
.settings-card h3 { margin: 0 0 5px; }
.settings-card p { margin: 0; color: var(--muted); }
.large-avatar {
  display: block;
  flex: none;
  width: 52px;
  height: 52px;
  color: #fff;
  background: #172554;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
}
.account-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  color: #047857;
  background: #ecfdf5;
  border-radius: 9px;
  font-size: 13px;
  white-space: nowrap;
}
.account-status .icon { width: 15px; height: 15px; align-self: flex-start; }
.account-activity-card {
  margin-top: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.account-activity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}
.account-activity-head .eyebrow { margin-top: 4px; }
.account-activity-head h2 { margin: 7px 0 5px; font-size: 21px; }
.account-activity-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.account-activity-head .secondary-button { flex: none; }
.activity-filters { display: flex; gap: 7px; padding: 0 24px 16px; overflow: auto; scrollbar-width: thin; }
.activity-filters button {
  min-height: 38px;
  padding: 0 13px;
  color: #526178;
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 650;
}
.activity-filters button:hover,
.activity-filters button.active { color: var(--blue); background: var(--pale); border-color: #bdcaff; }
.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 190px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.activity-empty .icon { width: 24px; height: 24px; }
.activity-empty strong { color: #334155; font-size: 16px; }
.activity-empty span { font-size: 12px; }
.activity-retention-note {
  margin: 0;
  padding: 12px 24px;
  color: #7b8798;
  background: #fbfcfe;
  border-top: 1px solid #edf1f6;
  font-size: 11px;
  line-height: 1.5;
}
.activity-table { border-top: 1px solid var(--border); }
.activity-row {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(180px, 1.15fr) minmax(230px, 1.55fr) 92px minmax(105px, .7fr);
  align-items: center;
  gap: 18px;
  padding: 15px 24px;
  font-size: 13px;
  border-bottom: 1px solid #edf1f6;
}
.activity-row:last-child { border-bottom: 0; }
.activity-header { min-height: 44px; padding-top: 11px; padding-bottom: 11px; color: #64748b; background: #f8fafc; font-size: 11px; font-weight: 700; }
.activity-row strong { display: block; color: #1e293b; line-height: 1.45; font-weight: 600; }
.activity-row small { display: block; margin-top: 4px; color: #8492a7; font-size: 11px; line-height: 1.4; }
.activity-row time { color: #64748b; font-size: 11px; font-variant-numeric: tabular-nums; }
.activity-row .amount { color: var(--coral); font-weight: 700; text-align: right; }
.activity-row .amount.positive { color: #047857; }
.activity-footer { padding: 14px 24px; color: #94a3b8; font-size: 11px; border-top: 1px solid #edf1f6; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 18px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.contact-card .empty-icon { flex: none; width: 56px; height: 56px; margin: 0; border-radius: 18px; }
.contact-card h3 { margin: 0 0 5px; }
.contact-card p { margin: 0; color: var(--muted); }

/* =========================================================
   API 对接
   ========================================================= */
.api-doc-download-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f7f9ff, #fff);
  border: 1px solid #c7d4ff;
  border-radius: 14px;
}
.api-doc-download-card > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.api-doc-download-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--blue);
  background: #e9efff;
  border-radius: 11px;
}
.api-doc-download-icon .icon { width: 21px; height: 21px; }
.api-doc-download-card strong { color: #1e293b; font-size: 14px; }
.api-doc-download-card span { color: #64748b; font-size: 12px; line-height: 1.5; }
.api-doc-download-card > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  color: #fff;
  background: var(--blue);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.api-doc-download-card > button:hover:not(:disabled) { background: #244de1; }
.api-doc-download-card > button:disabled { cursor: wait; opacity: .72; }
.api-doc-download-card > button .icon { width: 17px; height: 17px; }
.developer-key-panel {
  margin-top: 0;
  margin-bottom: 20px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
}
.developer-key-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.developer-key-heading h2 { margin: 6px 0 4px; font-size: 24px; }
.developer-key-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: normal; }
.developer-key-heading > span { padding: 7px 10px; color: var(--blue); background: var(--pale); border-radius: 8px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.key-create { display: flex; align-items: flex-end; gap: 10px; margin: 20px 0; }
.key-create label { flex: 1; max-width: 430px; font-size: 12px; font-weight: 700; }
.key-create input {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #000;
  font-size: 12px;
  outline: none;
}
.key-create input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 94, 251, .07); }
.key-create .primary-button { height: 44px; }
.key-create .primary-button .icon { width: 17px; height: 17px; }
.key-list { border-top: 1px solid var(--border); }
.key-list article {
  display: grid;
  grid-template-columns: 38px minmax(190px, 1fr) minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 15px 2px;
  border-bottom: 1px solid #edf1f6;
}
.key-list article > div:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.key-symbol { display: grid; place-items: center; width: 36px; height: 36px; color: #526178; background: #f3f6fb; border-radius: 10px; }
.key-symbol .icon { width: 18px; height: 18px; }
.key-list strong { display: block; font-size: 13px; }
.key-list code { color: #64748b; font-size: 12px; }
.key-time { display: flex; flex-direction: column; gap: 4px; color: #64748b; font-size: 11px; }
.key-time small { color: #94a3b8; }
.configured { padding: 6px 9px; color: #047857; background: #ecfdf5; border-radius: 8px; font-size: 11px; white-space: nowrap; }
.revoke-key { display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; color: #be123c; background: #fff1f2; border: 0; border-radius: 8px; }
.revoke-key .icon { width: 15px; height: 15px; }
.empty-key {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100px;
  color: var(--muted);
  font-size: 13px;
}
.empty-key .icon { width: 24px; height: 24px; }
.new-key-result { margin: 14px 0; padding: 14px; background: #f0fdf4; border: 1px solid #a7e1bd; border-radius: 12px; }
.new-key-result > div:first-child { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; color: #047857; }
.new-key-result > div:first-child .icon { width: 18px; height: 18px; }
.new-key-result span { display: flex; flex-direction: column; gap: 2px; }
.new-key-result small { color: #43815d; }
.new-key-result .code-line { background: #fff; }
.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding-left: 13px;
  overflow: hidden;
  background: #f5f7fb;
  border-radius: 10px;
}
.code-line code { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.code-line button { width: 46px; height: 100%; color: var(--blue); background: 0 0; border: 0; }
.code-line button .icon { width: 16px; height: 16px; margin: auto; }

.api-docs-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 650px;
  margin-top: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 17px;
}
.api-doc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 14px;
  background: #fbfcfe;
  border-right: 1px solid var(--border);
}
.api-doc-nav strong { padding: 5px 10px 13px; color: var(--ink); font-size: 16px; }
.api-doc-nav button {
  height: 39px;
  padding: 0 10px;
  color: var(--muted);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
}
.api-doc-nav button:hover { color: var(--blue); background: #f6f8fd; }
.api-doc-nav button.active { color: var(--blue); background: var(--pale); font-weight: 700; }
.api-doc-body { min-width: 0; padding: 28px 34px; }
.api-base-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 26px;
  padding: 14px 16px;
  color: #fff;
  background: #0b1530;
  border-radius: 12px;
}
.api-base-banner > div { display: flex; flex: 0 1 auto; flex-direction: column; gap: 5px; min-width: 0; }
.api-base-banner span { color: #9fb2d6; font-size: 10px; }
.api-base-banner code { color: #fff; font-size: 13px; overflow-wrap: anywhere; }
.api-base-banner button, .code-example button {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 10px;
  color: #dce7ff;
  background: #ffffff16;
  border: 0;
  border-radius: 8px;
}
.api-base-banner button { font-size: 16px; }
.api-base-banner button .icon { width: 16px; height: 16px; }
.api-base-banner button:hover, .code-example button:hover { background: rgba(255, 255, 255, .14); }
.api-section { display: none; padding-top: 4px; scroll-margin-top: 90px; }
.api-section.active { display: block; }
.api-section > .eyebrow { line-height: 17px; }
.api-section h2 { margin: 7px 0 12px; font-size: 28px; }
.api-section h3 { margin: 25px 0 10px; font-size: 15px; }
.api-section > p { margin: 14px 0; color: #53627a; font-size: 14px; line-height: 1.8; }
.api-section > ul, .api-section > ol { margin: 14px 0; padding-left: 20px; color: #53627a; font-size: 14px; line-height: 1.8; }
.api-section code { overflow-wrap: anywhere; }
.docs-success {
  display: block;
  position: relative;
  margin: 18px 0;
  padding: 14px 14px 14px 44px;
  color: #047857;
  background: #f0fdf4;
  border: 1px solid #a7e1bd;
  border-radius: 11px;
}
.docs-success > .icon { flex: none; width: 18px; height: 18px; }
.docs-success p { margin: 4px 0 0; color: #357a54; font-size: 12px; line-height: 1.55; }
.docs-warning {
  /* 图标绝对定位、正文走普通块流：flex/grid 都会把裸文本和每个内联 <code>
     当独立 item 挤成一字一行，block 布局没这个问题。 */
  display: block;
  position: relative;
  margin: 18px 0 0;
  padding: 13px 13px 13px 40px;
  color: #8a5a12;
  background: #fff9ed;
  border: 1px solid #f4dfb4;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}
.docs-warning > .icon { flex: none; width: 18px; height: 18px; }
.inline-code {
  padding: 13px;
  color: var(--ink);
  background: #f4f6fa;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}
.code-example { margin-top: 26px; overflow: hidden; background: #0b1530; border-radius: 12px; }
.code-example > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  color: #b9c8e5;
  border-bottom: 1px solid #ffffff18;
  font-size: 12px;
}
.code-example > div strong { font-size: 12px; font-weight: 700; }
.code-example button { font-size: 12px; }
.code-example button .icon { width: 15px; height: 15px; }
.code-example pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #d8e5ff;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.75;
}
.endpoint {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 15px 0;
  padding: 12px 14px;
  background: #f6f8fb;
  border-radius: 10px;
}
.endpoint b { padding: 5px 7px; color: #08733b; background: #dff7e8; border-radius: 6px; font-size: 11px; }
.endpoint code { font-size: 13px; }
.endpoint span { margin-left: auto; color: var(--muted); font-size: 11px; }
.param-table {
  display: grid;
  grid-template-columns: 170px 170px 1fr;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.param-table > * { margin: 0; padding: 11px 13px; border-bottom: 1px solid #edf1f6; font-size: 12px; }
.param-table b { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.param-table span { color: var(--blue); }
.param-table p { color: #64748b; }
.status-docs, .error-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.status-docs > *, .error-grid > * { margin: 0; padding: 12px 14px; border-bottom: 1px solid #edf1f6; font-size: 13px; }
.status-docs span { display: flex; align-items: center; gap: 8px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.status-docs i { width: 8px; height: 8px; background: #94a3b8; border-radius: 50%; }
.status-docs i.running { background: #315efb; }
.status-docs i.done { background: #16a34a; }
.status-docs i.failed { background: #dc2626; }
.error-grid b { color: #b45309; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.error-shapes { display: grid; gap: 8px; margin: 16px 0; }
.error-shapes code {
  display: block;
  padding: 12px 14px;
  color: #475569;
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.docs-model-table { margin-top: 20px; overflow: auto; border: 1px solid var(--border); border-radius: 11px; }
.docs-model-table table { width: 100%; min-width: 700px; border-collapse: collapse; }
.docs-model-table th, .docs-model-table td { padding: 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid #edf1f6; font-size: 12px; }
.docs-model-table th { color: #64748b; background: #f8fafc; }
.model-capability-list { display: flex; flex-direction: column; gap: 4px; min-width: 210px; color: #526178; }
.model-capability-list span { line-height: 1.45; }
.response-example {
  margin: 10px 0 20px;
  padding: 16px;
  overflow: auto;
  color: #d8e5ff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #0b1530;
  border-radius: 11px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.75;
}

/* =========================================================
   弹窗 / 提示
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 21, 48, .42);
  backdrop-filter: blur(3px);
  animation: fade-in .16s ease-out;
}
.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(11, 21, 48, .24);
  animation: modal-in .2s ease-out;
}
.modal.wide { width: min(760px, 100%); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #64748b;
  background: #f8fafc;
  border: 0;
  border-radius: 9px;
}
.modal-close:hover { color: #0f172a; background: #eef2f7; }
.modal h2 { margin: 8px 42px 6px 0; font-size: 22px; }
.modal .modal-sub { color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal .modal-media { width: 100%; max-height: 420px; margin-top: 18px; object-fit: contain; background: #eef2f8; border-radius: 13px; }
.modal .modal-details { display: grid; grid-template-columns: 76px 1fr; gap: 10px 14px; margin-top: 18px; color: #334155; font-size: 13px; line-height: 1.6; }
.modal .modal-details dt { color: var(--muted); }
.modal .modal-details dd { margin: 0; overflow-wrap: anywhere; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal .danger-button { color: #b91c1c; background: #fff; border-color: #fecaca; }
.modal .danger-button:hover { background: #fef2f2; border-color: #fca5a5; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

.toast-root {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  padding: 11px 16px;
  color: #fff;
  background: rgba(11, 21, 48, .93);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(11, 21, 48, .25);
  font-size: 13px;
  animation: toast-in .2s ease-out;
}
.toast .icon { color: #7ee2b8; }
.toast.error .icon { color: #fca5a5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* =========================================================
   真实 API 连接 / 任务状态
   ========================================================= */
.developer-key-heading > span.connected { color: #047857; background: #ecfdf5; }
.developer-key-heading > span.error { color: #b91c1c; background: #fef2f2; }
.api-connection-panel .key-create { flex-wrap: wrap; }
.api-connection-panel .key-create label { min-width: 260px; }
.api-connection-panel .key-create .secondary-button { height: 44px; }
.key-create .danger-button { color: #b91c1c; background: #fff; border-color: #fecaca; }
.key-create .danger-button:hover { background: #fef2f2; border-color: #fca5a5; }
.api-key-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: -4px 0 14px;
  padding: 11px 13px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
}
.api-key-status.ok { color: #047857; background: #f0fdf4; border-color: #bbf7d0; }
.api-key-status.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.api-key-status > span { display: inline-flex; align-items: center; gap: 6px; }
.api-key-mask { color: #334155; }
.api-key-mask code { font-size: 12px; }
.api-key-status .icon { width: 15px; height: 15px; }
.api-key-error { font-weight: 600; }
.api-key-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.api-key-help a { color: var(--blue); font-weight: 600; }

.model-brief { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: #7c8aa0; font-size: 10px; line-height: 1.35; }
.model-brief .model-price { color: var(--blue); font-size: 11px; font-weight: 700; }
.model-price-discount { display: inline-flex; flex-direction: column; gap: 1px; align-items: flex-start; line-height: 1.25; }
.model-price-original { color: #94a3b8; font-size: 10px; font-weight: 600; text-decoration: line-through; }
.model-price-current { color: var(--blue); font-size: 12px; font-weight: 800; }
.model-rail-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 220px;
  padding: 22px 16px;
  color: var(--muted);
  text-align: center;
  background: #fbfcfe;
  border: 1px dashed #d7dfec;
  border-radius: 12px;
}
.model-rail-empty .icon { width: 26px; height: 26px; color: #94a3b8; }
.model-rail-empty strong { color: #334155; font-size: 13px; }
.model-rail-empty span { max-width: 260px; font-size: 11px; line-height: 1.6; }
.model-rail-empty.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.model-rail-empty .primary-button,
.model-rail-empty .secondary-button { margin-top: 4px; min-height: 34px; padding: 0 12px; font-size: 11px; }

.reference-empty {
  padding: 10px 12px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 9px;
}

.choice-field.is-disabled { opacity: .55; }

.task-status.cancelled { color: #64748b; background: #f1f5f9; }
.task-error {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 9px 0 0;
  padding: 8px 9px;
  color: #b91c1c;
  background: #fef2f2;
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.task-error .icon { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.task-preview video { width: 100%; height: 100%; object-fit: cover; }

.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  color: #fff;
  background: linear-gradient(135deg, #315efb, #6d5efc);
  cursor: pointer;
}
.media-placeholder .icon { width: 26px; height: 26px; fill: currentColor; }
.media-placeholder small { font-size: 10px; opacity: .86; }
.media-placeholder.media-error { color: #94a3b8; background: #f8fafc; }
.media-error { display: flex; align-items: center; gap: 6px; padding: 10px; color: #b91c1c; font-size: 10.5px; line-height: 1.5; text-align: left; }
.media-error .icon { flex: none; width: 14px; height: 14px; fill: none; }
.work-preview .media-placeholder { background: linear-gradient(135deg, #1d4ed8, #6d28d9); }
.work-preview .media-placeholder.work-pending { cursor: default; background: linear-gradient(135deg, #64748b, #475569); }
.work-preview .media-placeholder.work-pending.failed { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.work-preview .media-placeholder.work-expired { cursor: default; background: linear-gradient(135deg, #64748b, #334155); }
.work-preview .media-placeholder.work-expired .icon { fill: none; }
.work-actions button:disabled { opacity: .5; cursor: not-allowed; }
.work-actions button:disabled:hover { color: #334155; border-color: var(--border); }
.modal-media .media-placeholder.work-pending { min-height: 180px; cursor: default; border-radius: 13px; }
.modal-media .media-placeholder.work-pending.failed { background: linear-gradient(135deg, #b91c1c, #7f1d1d); }
.modal-media .media-placeholder.work-expired { min-height: 180px; cursor: default; border-radius: 13px; background: linear-gradient(135deg, #64748b, #334155); }
.modal-media .media-placeholder.work-expired .icon { fill: none; }
.modal-media video { width: 100%; max-height: min(420px, 58vh); margin-top: 18px; background: #eef2f8; border-radius: 13px; display: block; }

.docs-model-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 4px;
  padding: 14px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #d7dfec;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.docs-model-empty.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.docs-model-empty .icon { flex: none; width: 16px; height: 16px; }
