:root {
  color-scheme: light;
  --bg: #edf3f8;
  --card: #ffffff;
  --line: #d8e2ee;
  --line-strong: #bfcede;
  --text: #162033;
  --muted: #66758a;
  --muted-2: #8a99ab;
  --brand: #1f6feb;
  --brand-dark: #1557c0;
  --danger: #b42318;
  --danger-dark: #941b12;
  --warn: #b54708;
  --ok: #067647;
  --log-bg: #0c1422;
  --log-line: #273246;
  --log-text: #d7e3f4;
  --result: #c4b5fd;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(32, 48, 72, 0.08);
}

.fed-app-shell,
.fed-app-shell > *,
.fed-topbar,
.fed-topbar *,
.fed-left-panel,
.fed-left-panel *,
.fed-right-panel,
.fed-right-panel *,
.fed-viewer-area,
.fed-viewer-status,
#viewer.fed-viewer {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.fed-topbar button,
.fed-left-panel button,
.fed-right-panel button,
.fed-left-panel input,
.fed-left-panel select,
.fed-left-panel textarea,
.fed-right-panel input,
.fed-right-panel select,
.fed-right-panel textarea {
  font: inherit;
}

.fed-topbar button,
.fed-left-panel button,
.fed-right-panel button {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  box-shadow: inset 0 -1px rgba(0, 0, 0, 0.14);
  transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.fed-topbar button:hover:not(:disabled),
.fed-left-panel button:hover:not(:disabled),
.fed-right-panel button:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.fed-topbar button:disabled,
.fed-left-panel button:disabled,
.fed-right-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.fed-topbar button.fed-secondary,
.fed-left-panel button.fed-secondary,
.fed-right-panel button.fed-secondary {
  color: #1c2b41;
  border: 1px solid var(--line-strong);
  background: #f8fbff;
  box-shadow: none;
}

.fed-topbar button.fed-secondary:hover:not(:disabled),
.fed-left-panel button.fed-secondary:hover:not(:disabled),
.fed-right-panel button.fed-secondary:hover:not(:disabled) {
  background: #edf4ff;
}

.fed-topbar button.fed-dark,
.fed-left-panel button.fed-dark,
.fed-right-panel button.fed-dark {
  color: #fff;
  border-color: #51627b;
  background: #162033;
}

.fed-topbar button.fed-active-api {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.fed-left-panel button.fed-ghost,
.fed-right-panel button.fed-ghost {
  padding: 6px 9px;
  color: #26364e;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow: none;
}

.fed-left-panel button.fed-wide,
.fed-right-panel button.fed-wide {
  width: 100%;
}

.fed-left-panel input,
.fed-left-panel select,
.fed-left-panel textarea,
.fed-right-panel input,
.fed-right-panel select,
.fed-right-panel textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.fed-left-panel input[type="color"],
.fed-right-panel input[type="color"] {
  width: 168px;
  max-width: 100%;
  padding: 4px 10px;
}

.fed-left-panel textarea,
.fed-right-panel textarea {
  resize: vertical;
  line-height: 1.35;
}

.fed-left-panel input:focus,
.fed-left-panel select:focus,
.fed-left-panel textarea:focus,
.fed-right-panel input:focus,
.fed-right-panel select:focus,
.fed-right-panel textarea:focus {
  border-color: #74a7ff;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.fed-left-panel label,
.fed-right-panel label {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.fed-left-panel label > span,
.fed-right-panel label > span,
.fed-file-box span {
  color: var(--muted);
  font-size: 12px;
}

.fed-app-shell {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  height: 100%;
}

.fed-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  color: #fff;
  background: #102033;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 10;
}

.fed-eyebrow {
  color: #b3c5dc;
  font-size: 13px;
  line-height: 1.1;
}

.fed-topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1;
}

.fed-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fed-locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(179, 197, 220, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.fed-topbar .fed-locale-option {
  min-width: 44px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #d9e7f6;
  background: transparent;
  box-shadow: none;
}

.fed-topbar .fed-locale-option:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: none;
}

.fed-topbar .fed-locale-option.fed-active-locale {
  color: #102033;
  background: #fff;
}

.fed-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
}

.fed-workspace.fed-api-open {
  grid-template-columns: minmax(300px, 340px) minmax(480px, 1fr) minmax(380px, 420px);
}

.fed-left-panel,
.fed-right-panel {
  padding: 14px;
  background: #f4f8fc;
  min-width: 0;
}

.fed-left-panel {
  border-right: 1px solid var(--line);
}

.fed-right-panel {
  border-left: 1px solid var(--line);
}

.fed-right-hidden {
  display: none !important;
}

.fed-panel-scroll {
  min-height: 0;
  overflow: auto;
}

.fed-panel-column {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fed-card {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.fed-panel-column .fed-card {
  margin-bottom: 0;
}

.fed-right-top {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.fed-log-card {
  flex: 0 0 32%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fed-card h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.fed-card-title-row,
.fed-inline-actions,
.fed-small-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fed-inner-title-row {
  margin-bottom: 8px;
}

.fed-inline-actions {
  justify-content: flex-start;
}

.fed-badge,
.fed-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  color: #35506d;
  background: #e8f1ff;
  font-size: 12px;
  font-weight: 650;
}

.fed-badge.fed-soft {
  color: #58677a;
  background: #f1f5f9;
}

.fed-badge.fed-ok {
  color: var(--ok);
  background: #e8f8ef;
}

.fed-badge.fed-warn {
  color: var(--warn);
  background: #fff3e6;
}

.fed-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fed-event-form {
  align-items: end;
}

.fed-create-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.fed-create-actions label {
  margin-bottom: 0;
}

.fed-create-actions button {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  white-space: nowrap;
}

.fed-left-panel .fed-checkline,
.fed-right-panel .fed-checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #24344a;
}

.fed-left-panel .fed-checkline input,
.fed-right-panel .fed-checkline input {
  width: auto;
  min-height: auto;
}

.fed-file-box {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #b8c9dd;
  border-radius: 10px;
  background: #f8fbff;
  cursor: pointer;
}

.fed-file-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.fed-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted-2);
  font-size: 12px;
}

.fed-divider::before,
.fed-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.fed-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.fed-viewer-area {
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #e9f0f6;
}

.fed-viewer-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.fed-viewer-status strong {
  display: block;
  font-size: 15px;
}

.fed-viewer-status span:not(.fed-pill) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

#viewer.fed-viewer {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}

#viewer.fed-viewer > * {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.fed-tabbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.fed-right-panel .fed-tab {
  min-height: 38px;
  color: #344054;
  border: 1px solid var(--line-strong);
  background: #f8fbff;
  box-shadow: none;
}

.fed-right-panel .fed-tab.fed-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.fed-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.fed-subsection {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.fed-api-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe6f2;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.fed-api-panel.fed-empty {
  border-style: dashed;
  color: var(--muted);
  background: #f8fbff;
  font-size: 13px;
}

.fed-api-picker-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 10px;
  align-items: end;
}

.fed-api-selected-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d9e7f5;
  border-radius: 10px;
  background: #f5f9ff;
  color: #344054;
  font-size: 13px;
  line-height: 1.45;
}

.fed-api-selected-meta strong {
  display: block;
  margin-bottom: 4px;
  color: #162033;
  font-size: 14px;
}

.fed-api-selected-meta code {
  color: #5b6b80;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}


.fed-api-doc-desc {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.fed-api-doc-extra {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.fed-api-args-wrap {
  margin-bottom: 0;
}

.fed-api-args-wrap textarea {
  min-height: 118px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.fed-api-meta-tone {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ok);
  background: #e8f8ef;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.fed-api-meta-tone.fed-warn {
  color: var(--warn);
  background: #fff3e6;
}

.fed-api-meta-tone.fed-danger {
  color: var(--danger);
  background: #ffebe8;
}

.fed-api-param-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e3ebf5;
  border-radius: 10px;
  background: #fff;
}

.fed-api-param-panel.fed-empty {
  min-height: 44px;
  align-items: center;
  color: var(--muted-2);
  background: #fbfdff;
}

.fed-api-panel-note {
  padding: 9px 10px;
  border: 1px dashed #bfd0e4;
  border-radius: 10px;
  color: #5d6d83;
  background: #f8fbff;
  font-size: 12px;
  line-height: 1.55;
}

.fed-api-group {
  display: grid;
  gap: 8px;
}

.fed-api-group h3 {
  margin: 0;
  color: #344054;
  font-size: 15px;
  font-weight: 800;
}

.fed-api-card-list {
  display: grid;
  gap: 12px;
}

.fed-api-card {
  padding: 12px;
  border: 1px solid #d9e4f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(16, 33, 50, 0.04);
}

.fed-right-panel .fed-api-action-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

.fed-right-panel .fed-api-action-button:hover:not(:disabled) {
  background: var(--brand-dark);
}

.fed-right-panel .fed-api-action-button.fed-warn,
.fed-right-panel .fed-api-action-button.fed-danger {
  background: var(--danger);
}

.fed-right-panel .fed-api-action-button.fed-warn:hover:not(:disabled),
.fed-right-panel .fed-api-action-button.fed-danger:hover:not(:disabled) {
  background: var(--danger-dark);
}

.fed-api-method {
  margin-top: 9px;
  color: #667085;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.fed-api-param-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.fed-right-panel .fed-api-param {
  margin-bottom: 0;
}

.fed-right-panel .fed-api-param.fed-inline-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.fed-right-panel .fed-api-param.fed-inline-check span {
  grid-column: 2;
  grid-row: 1;
}

.fed-right-panel .fed-api-param.fed-inline-check input {
  grid-column: 1;
  grid-row: 1;
  width: auto;
  min-height: auto;
}

.fed-api-no-args {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.fed-log-hint {
  margin: -4px 0 8px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.fed-event-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--log-line);
  border-radius: 10px;
  color: var(--log-text);
  background: var(--log-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.fed-log-item {
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.fed-log-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #9ecbff;
  font-weight: 700;
}

.fed-log-time {
  color: #a6b4c6;
  font-weight: 400;
}

.fed-log-item.fed-success .fed-log-head { color: #7ee2a8; }
.fed-log-item.fed-error .fed-log-head { color: #ffb4ab; }
.fed-log-item.fed-event .fed-log-head { color: #ffd27d; }
.fed-log-item.fed-warn .fed-log-head { color: #ffdc9b; }
.fed-log-item.fed-api .fed-log-head { color: #8ec5ff; }
.fed-log-item.fed-result .fed-log-head { color: var(--result); }


@media (max-width: 1280px) {
  .fed-workspace {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  }

  .fed-workspace.fed-api-open {
    grid-template-columns: minmax(280px, 320px) minmax(420px, 1fr) minmax(340px, 380px);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .fed-app-shell {
    height: auto;
    min-height: 100%;
  }

  .fed-topbar,
  .fed-workspace,
  .fed-workspace.fed-api-open {
    display: block;
  }

  .fed-topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .fed-viewer-area {
    height: 70vh;
  }

  .fed-right-panel {
    max-height: 80vh;
  }

  .fed-two-col,
  .fed-api-picker-grid {
    grid-template-columns: 1fr;
  }
}

.fed-eyebrow::after { content: ""; }

/* v11: keep the API drawer tidy. Prevent long doc signatures/options from creating ugly nested horizontal scrollbars. */
.fed-workspace.fed-api-open {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(440px, 480px);
}

.fed-right-panel {
  overflow: hidden;
}

.fed-right-panel .fed-card,
.fed-right-panel .fed-tab-panel,
.fed-right-panel .fed-api-panel,
.fed-right-panel label,
.fed-right-panel select,
.fed-right-panel input,
.fed-right-panel textarea,
.fed-right-panel code,
.fed-right-panel span,
.fed-right-panel div {
  min-width: 0;
  max-width: 100%;
}

.fed-right-panel select,
.fed-right-panel input,
.fed-right-panel textarea {
  text-overflow: ellipsis;
}

.fed-tab-panel {
  overflow-x: hidden;
  padding-right: 0;
}

.fed-api-panel {
  overflow: hidden;
  padding: 12px;
}

.fed-api-picker-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.fed-api-picker-grid > label {
  overflow: hidden;
}

.fed-api-selected-meta {
  display: block;
  overflow: hidden;
}

.fed-api-selected-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fed-api-selected-meta code {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.fed-api-doc-desc {
  margin-top: 8px;
  overflow: hidden;
}

@supports (-webkit-line-clamp: 2) {
  .fed-api-doc-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

.fed-api-doc-extra span {
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fed-event-log {
  overflow-x: hidden;
}

.fed-log-item,
.fed-log-head,
.fed-log-item pre {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fed-right-top {
  min-height: 0;
}

.fed-log-card {
  flex-basis: 34%;
  min-height: 190px;
}

/* Keep necessary vertical scrollbars slim rather than letting nested panes look like tables. */
.fed-panel-scroll,
.fed-tab-panel,
.fed-event-log {
  scrollbar-width: thin;
  scrollbar-color: #c3ceda transparent;
}

.fed-panel-scroll::-webkit-scrollbar,
.fed-tab-panel::-webkit-scrollbar,
.fed-event-log::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.fed-panel-scroll::-webkit-scrollbar-thumb,
.fed-tab-panel::-webkit-scrollbar-thumb,
.fed-event-log::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c3ceda;
}

.fed-panel-scroll::-webkit-scrollbar-track,
.fed-tab-panel::-webkit-scrollbar-track,
.fed-event-log::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1280px) {
  .fed-workspace.fed-api-open {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(380px, 420px);
  }
}


/* v12: Figma redesign shell polish. Keep SDK viewer DOM isolated; only demo top/left/right chrome is restyled. */
:root {
  --bg: #f5f7fb;
  --card: rgba(255, 255, 255, 0.94);
  --line: #e4e9f2;
  --line-strong: #cfd8e6;
  --text: #101828;
  --muted: #667085;
  --muted-2: #98a2b3;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-ring: rgba(37, 99, 235, 0.16);
  --sidebar: #f8fafc;
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.fed-app-shell {
  grid-template-rows: 74px minmax(0, 1fr);
}

.fed-topbar {
  padding: 12px 20px;
  color: var(--text);
  background: var(--topbar-bg);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 10px 26px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.fed-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.fed-brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 52%, #06b6d4 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.fed-eyebrow {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.fed-topbar h1 {
  margin-top: 3px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.fed-topbar-actions {
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.78);
}

.fed-topbar button,
.fed-left-panel button,
.fed-right-panel button {
  min-height: 40px;
  border-radius: 12px;
  font-weight: 720;
  box-shadow: none;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.fed-topbar button {
  color: #0f172a;
  border: 1px solid #d8e0ec;
  background: #ffffff;
}

.fed-topbar button:hover:not(:disabled) {
  color: #0b1220;
  background: #f8fafc;
  border-color: #bfd0e7;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.fed-topbar button:not(.fed-secondary):not(.fed-dark),
.fed-topbar button.fed-active-api {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.20);
}

.fed-topbar button.fed-active-api:hover:not(:disabled),
.fed-topbar button:not(.fed-secondary):not(.fed-dark):hover:not(:disabled) {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.24);
}

.fed-topbar button.fed-secondary,
.fed-topbar button.fed-dark,
.fed-topbar button.fed-secondary.fed-dark {
  color: #1e293b;
  border: 1px solid #d8e0ec;
  background: #ffffff;
}

.fed-topbar button#btn-close {
  color: #334155;
}

.fed-topbar button#btn-close:hover:not(:disabled) {
  color: #b42318;
  border-color: #fecaca;
  background: #fff5f5;
}

.fed-workspace {
  grid-template-columns: minmax(286px, 328px) minmax(0, 1fr);
  background: transparent;
}

.fed-workspace.fed-api-open {
  grid-template-columns: minmax(286px, 328px) minmax(0, 1fr) minmax(408px, 448px);
}

.fed-left-panel,
.fed-right-panel {
  padding: 16px;
  background: rgba(248, 250, 252, 0.82);
}

.fed-left-panel {
  border-right: 1px solid rgba(226, 232, 240, 0.9);
}

.fed-right-panel {
  border-left: 1px solid rgba(226, 232, 240, 0.9);
}

.fed-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.fed-card h2 {
  color: #101828;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.fed-card-title-row {
  margin-bottom: 12px;
}

.fed-card-title-row h2 {
  margin-bottom: 0;
}

.fed-badge,
.fed-pill {
  min-height: 24px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 760;
}

.fed-badge.fed-ok {
  color: #047857;
  border-color: #b7f0d3;
  background: #ecfdf3;
}

.fed-badge.fed-soft {
  color: #64748b;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.fed-left-panel label > span,
.fed-right-panel label > span,
.fed-file-box span {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.fed-left-panel input,
.fed-left-panel select,
.fed-left-panel textarea,
.fed-right-panel input,
.fed-right-panel select,
.fed-right-panel textarea {
  min-height: 42px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 9px 12px;
  color: #101828;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.fed-left-panel input:focus,
.fed-left-panel select:focus,
.fed-left-panel textarea:focus,
.fed-right-panel input:focus,
.fed-right-panel select:focus,
.fed-right-panel textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px var(--brand-ring), 0 1px 1px rgba(15, 23, 42, 0.03);
}

.fed-file-box {
  gap: 10px;
  padding: 18px;
  border: 1.5px dashed #bfd0e7;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.82)),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 36%);
}

.fed-file-box:hover {
  border-color: #3b82f6;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.16), transparent 36%);
}

.fed-file-box strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.35;
}

.fed-left-panel button:not(.fed-secondary):not(.fed-ghost),
.fed-right-panel button:not(.fed-secondary):not(.fed-ghost):not(.fed-tab) {
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.fed-left-panel button:not(.fed-secondary):not(.fed-ghost):hover:not(:disabled),
.fed-right-panel button:not(.fed-secondary):not(.fed-ghost):not(.fed-tab):hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.fed-left-panel button.fed-secondary,
.fed-right-panel button.fed-secondary {
  color: #334155;
  border: 1px solid #d8e0ec;
  background: #ffffff;
}

.fed-left-panel button.fed-secondary:hover:not(:disabled),
.fed-right-panel button.fed-secondary:hover:not(:disabled) {
  color: #1d4ed8;
  border-color: #bfd0e7;
  background: #f8fbff;
}

.fed-left-panel .fed-checkline,
.fed-right-panel .fed-checkline {
  padding: 4px 0;
  color: #344054;
  font-weight: 560;
}

.fed-hint,
.fed-log-hint {
  color: #667085;
}

.fed-divider {
  margin: 18px 0;
}

.fed-viewer-area {
  background: #eef3f8;
}

.fed-viewer-status {
  padding: 11px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.fed-viewer-status strong {
  color: #101828;
  font-weight: 800;
}

.fed-right-panel .fed-tabbar {
  gap: 6px;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f1f5f9;
}

.fed-right-panel .fed-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: #475467;
  background: transparent;
  box-shadow: none;
}

.fed-right-panel .fed-tab:hover:not(:disabled) {
  color: #1d4ed8;
  background: #ffffff;
  transform: none;
}

.fed-right-panel .fed-tab.fed-active {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.20);
}

.fed-right-top {
  gap: 14px;
}

.fed-tab-panel {
  padding: 2px 0 0;
}

.fed-api-panel {
  gap: 14px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.fed-api-panel.fed-empty {
  background: #ffffff;
}

.fed-api-selected-meta,
.fed-api-param-panel,
.fed-api-panel-note {
  border-radius: 14px;
  border-color: #e2e8f0;
  background: #f8fafc;
}

.fed-api-selected-meta strong {
  color: #0f172a;
  font-weight: 800;
}

.fed-api-doc-desc {
  color: #475467;
}

.fed-log-card {
  flex-basis: 32%;
  min-height: 190px;
}

.fed-event-log {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.fed-log-item {
  border-radius: 12px;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.68);
}

.fed-left-panel button.fed-ghost,
.fed-right-panel button.fed-ghost {
  min-height: 34px;
  border-radius: 10px;
  color: #475467;
  background: #ffffff;
}

.fed-left-panel button.fed-ghost:hover:not(:disabled),
.fed-right-panel button.fed-ghost:hover:not(:disabled) {
  color: #1d4ed8;
  border-color: #bfd0e7;
  background: #f8fbff;
}

@media (max-width: 1280px) {
  .fed-workspace.fed-api-open {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) minmax(380px, 420px);
  }

  .fed-topbar h1 {
    font-size: 18px;
  }
}


/* v13: Design System - C Style. Reference the provided moodboard only for color, spacing, and overall calm UI tone. */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d6dae1;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #98a2b3;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eef4ff;
  --brand-ring: rgba(37, 99, 235, 0.16);
  --ok: #16a34a;
  --sidebar: #f7f8fa;
  --topbar-bg: #ffffff;
  --log-bg: #0f172a;
  --log-line: rgba(255,255,255,0.08);
  --log-text: #dbe7ff;
  --radius: 20px;
  --shadow: none;
  --shadow-soft: none;
}

body {
  background: var(--bg);
}

.fed-app-shell {
  grid-template-rows: 70px minmax(0, 1fr);
}

.fed-topbar {
  padding: 12px 20px;
  color: var(--text);
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.fed-brand {
  gap: 0;
  min-width: 300px;
}

.fed-brand-mark {
  display: none;
}

.fed-eyebrow {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.fed-topbar h1 {
  margin-top: 4px;
  color: var(--text);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fed-topbar-actions {
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fed-topbar button,
.fed-left-panel button,
.fed-right-panel button {
  min-height: 40px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: none !important;
  transform: none !important;
}

.fed-topbar button {
  color: var(--text);
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 18px;
}

.fed-topbar button:hover:not(:disabled) {
  color: var(--text);
  border-color: #d1d5db;
  background: #fafafa;
}

.fed-topbar button:not(.fed-secondary):not(.fed-dark),
.fed-topbar button.fed-active-api {
  color: #fff;
  border-color: #111827;
  background: #111827;
}

.fed-topbar button.fed-active-api:hover:not(:disabled),
.fed-topbar button:not(.fed-secondary):not(.fed-dark):hover:not(:disabled) {
  color: #fff;
  border-color: #0b1220;
  background: #0b1220;
}

.fed-topbar button.fed-secondary,
.fed-topbar button.fed-dark,
.fed-topbar button.fed-secondary.fed-dark {
  color: var(--text);
  border: 1px solid var(--line);
  background: #fff;
}

.fed-topbar button#btn-close:hover:not(:disabled) {
  color: #b42318;
  border-color: #f1c1c1;
  background: #fff5f5;
}

.fed-workspace {
  grid-template-columns: minmax(320px, 340px) minmax(0, 1fr);
  gap: 0;
}

.fed-workspace.fed-api-open {
  grid-template-columns: minmax(320px, 340px) minmax(0, 1fr) minmax(390px, 410px);
}

.fed-left-panel,
.fed-right-panel {
  padding: 22px 16px 16px;
  background: var(--bg);
}

.fed-left-panel { border-right: 1px solid var(--line); }
.fed-right-panel { border-left: 1px solid var(--line); }

.fed-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

.fed-card h2 {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.fed-card-title-row {
  margin-bottom: 14px;
}

.fed-badge,
.fed-pill {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 12px;
  color: #4b5563;
  background: #f3f4f6;
  font-weight: 700;
}

.fed-badge.fed-ok {
  color: var(--ok);
  background: #e9f9ee;
}

.fed-badge.fed-soft {
  color: #4b5563;
  background: #f3f4f6;
}

.fed-left-panel label > span,
.fed-right-panel label > span,
.fed-file-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.fed-left-panel input,
.fed-left-panel select,
.fed-left-panel textarea,
.fed-right-panel input,
.fed-right-panel select,
.fed-right-panel textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
}

.fed-file-box {
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfbfc;
}

.fed-file-box:hover {
  border-color: #cfd5dd;
  background: #fafbfd;
}

.fed-file-box strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

.fed-left-panel button:not(.fed-secondary):not(.fed-ghost),
.fed-right-panel button:not(.fed-secondary):not(.fed-ghost):not(.fed-tab) {
  color: #fff;
  border: 0;
  background: var(--brand);
}

.fed-left-panel button:not(.fed-secondary):not(.fed-ghost):hover:not(:disabled),
.fed-right-panel button:not(.fed-secondary):not(.fed-ghost):not(.fed-tab):hover:not(:disabled) {
  background: var(--brand-dark);
}

.fed-left-panel button.fed-secondary,
.fed-right-panel button.fed-secondary,
.fed-left-panel button.fed-ghost,
.fed-right-panel button.fed-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: #fff;
}

.fed-left-panel button.fed-secondary:hover:not(:disabled),
.fed-right-panel button.fed-secondary:hover:not(:disabled),
.fed-left-panel button.fed-ghost:hover:not(:disabled),
.fed-right-panel button.fed-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: #d1d5db;
  background: #fafafa;
}

.fed-checkline { font-weight: 500; }
.fed-divider::before, .fed-divider::after { background: var(--line); }
.fed-divider { color: #9ca3af; }
.fed-hint, .fed-log-hint { color: var(--muted); }

.fed-viewer-area {
  margin: 22px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.fed-viewer-status {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.fed-viewer-status strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

#viewer.fed-viewer { background: #fff; }

.fed-right-panel .fed-tabbar {
  gap: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f3f4f6;
}

.fed-right-panel .fed-tab {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  color: #4b5563;
  background: transparent;
}

.fed-right-panel .fed-tab:hover:not(:disabled) {
  color: var(--text);
  background: #fff;
}

.fed-right-panel .fed-tab.fed-active {
  color: #fff;
  background: #111827;
}

.fed-api-panel {
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.fed-api-panel.fed-empty { background: #fff; }

.fed-api-selected-meta,
.fed-api-param-panel,
.fed-api-panel-note {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f9fafb;
}

.fed-api-selected-meta strong { color: var(--text); }
.fed-api-doc-desc { color: #4b5563; }

.fed-log-card {
  min-height: 250px;
}

.fed-event-log {
  border: 0;
  border-radius: 18px;
  background: #111827;
}

.fed-log-item {
  border-radius: 12px;
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.fed-log-head { color: #93c5fd; }
.fed-log-item.fed-event .fed-log-head { color: #f8cc6b; }
.fed-log-item.fed-error .fed-log-head { color: #fda4af; }
.fed-log-item.fed-success .fed-log-head { color: #86efac; }

@media (max-width: 1280px) {
  .fed-workspace.fed-api-open {
    grid-template-columns: minmax(280px, 300px) minmax(0, 1fr) minmax(360px, 390px);
  }
}


/* v14: tighter C-style refinement: hierarchy, inspector density, and empty document state. */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --dark-action: #111827;
  --success: #16a34a;
}

.fed-app-shell {
  grid-template-rows: 68px minmax(0, 1fr);
}

.fed-topbar {
  padding: 10px 28px;
}

.fed-brand {
  min-width: 360px;
}

.fed-eyebrow {
  font-size: 12px;
  line-height: 1.05;
}

.fed-topbar h1 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.05;
}

.fed-topbar-actions {
  gap: 10px;
}

.fed-topbar button {
  min-width: 96px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
}

.fed-topbar button:not(.fed-secondary):not(.fed-dark),
.fed-topbar button.fed-active-api {
  background: var(--dark-action);
  border-color: var(--dark-action);
}

.fed-topbar button:not(.fed-secondary):not(.fed-dark):hover:not(:disabled),
.fed-topbar button.fed-active-api:hover:not(:disabled) {
  background: #0b1220;
  border-color: #0b1220;
}

.fed-workspace {
  grid-template-columns: minmax(324px, 344px) minmax(0, 1fr);
}

.fed-workspace.fed-api-open {
  grid-template-columns: minmax(324px, 344px) minmax(0, 1fr) minmax(392px, 416px);
}

.fed-left-panel,
.fed-right-panel {
  padding: 22px 18px 18px;
}

.fed-card {
  border-radius: 18px;
  padding: 18px;
}

.fed-section-kicker {
  margin-bottom: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.fed-card-title-row {
  align-items: flex-start;
  gap: 12px;
}

.fed-card-title-row h2,
.fed-card > h2,
.fed-tab-panel h2 {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.fed-badge,
.fed-pill {
  min-height: 26px;
  padding: 0 12px;
  font-size: 12px;
}

.fed-badge.fed-ok {
  color: var(--success);
  background: #e8f8ee;
}

.fed-file-box {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  min-height: 108px;
  padding: 16px;
  background: #fbfcfe;
}

.fed-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--brand) !important;
  background: #eaf1ff;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0;
}

.fed-file-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.fed-file-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

.fed-file-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#file-name {
  color: #6b7280;
  font-size: 12px;
}

.fed-left-panel button.fed-wide,
.fed-right-panel button.fed-wide {
  min-height: 44px;
  border-radius: 12px;
}

.fed-divider {
  margin: 20px 0 16px;
  justify-content: flex-start;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.fed-divider::before {
  display: none;
}

.fed-divider::after {
  margin-left: 8px;
}

.fed-left-panel label,
.fed-right-panel label {
  gap: 7px;
  margin-bottom: 12px;
}

.fed-left-panel input,
.fed-left-panel select,
.fed-left-panel textarea,
.fed-right-panel input,
.fed-right-panel select,
.fed-right-panel textarea {
  min-height: 42px;
  border-radius: 10px;
  font-size: 13px;
}

.fed-left-panel input::placeholder,
.fed-right-panel input::placeholder,
.fed-right-panel textarea::placeholder {
  color: #9ca3af;
}

.fed-left-panel .fed-checkline,
.fed-right-panel .fed-checkline {
  gap: 10px;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 13px;
}

.fed-left-panel .fed-checkline input,
.fed-right-panel .fed-checkline input {
  width: 16px;
  height: 16px;
  accent-color: #111827;
}

.fed-hint {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.55;
}

.fed-viewer-area {
  margin: 22px 18px 18px;
  border-radius: 0;
  background: #fff;
}

.fed-viewer-status {
  min-height: 54px;
  padding: 10px 18px;
}

.fed-viewer-status strong {
  font-size: 15px;
  line-height: 1.2;
}

.fed-viewer-status span:not(.fed-pill) {
  color: var(--muted);
  font-size: 12px;
}

#viewer.fed-viewer:not(.fed-has-doc) {
  background: #fff;
}

#viewer.fed-viewer:not(.fed-has-doc)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(420px, 76%);
  height: 250px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#viewer.fed-viewer:not(.fed-has-doc)::after {
  content: "DOC\A\A未打开文档\A选择本地文件，或通过 URL 加载 DOCX / XLSX / PPTX。";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(360px, 68%);
  color: #6b7280;
  text-align: center;
  white-space: pre-line;
  line-height: 1.55;
  font-size: 14px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.fed-right-panel .fed-card-title-row h2 {
  font-size: 20px;
}

.fed-right-panel .fed-tabbar {
  border-radius: 14px;
}

.fed-right-panel .fed-tab {
  font-size: 14px;
  font-weight: 800;
}

.fed-right-top .fed-hint {
  margin: 0 0 16px;
  line-height: 1.55;
}

.fed-api-panel {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
}

.fed-api-picker-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.fed-api-selected-meta,
.fed-api-param-panel,
.fed-api-panel-note {
  background: #fafafa;
}

.fed-api-selected-meta {
  padding: 12px;
}

.fed-api-selected-meta strong {
  font-size: 14px;
}

.fed-api-doc-desc,
.fed-api-doc-extra {
  font-size: 12px;
}

.fed-api-args-wrap textarea {
  min-height: 104px;
}

.fed-log-card {
  flex-basis: 36%;
  min-height: 230px;
}

.fed-log-card .fed-card-title-row h2 {
  font-size: 18px;
}

.fed-small-actions {
  gap: 8px;
}

.fed-left-panel button.fed-ghost,
.fed-right-panel button.fed-ghost {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.fed-event-log {
  padding: 12px;
  border-radius: 18px;
}

.fed-log-item {
  padding: 10px 11px;
  margin-bottom: 10px;
}

@media (max-width: 1280px) {
  .fed-workspace.fed-api-open {
    grid-template-columns: minmax(288px, 308px) minmax(0, 1fr) minmax(360px, 392px);
  }

  .fed-topbar {
    padding-left: 18px;
    padding-right: 18px;
  }

  .fed-brand {
    min-width: 280px;
  }
}


/* v15: Upload-only left rail + compact inspector. The document viewport keeps priority when API is open. */
:root {
  --left-rail: 268px;
  --right-rail: 356px;
}

.fed-workspace {
  grid-template-columns: var(--left-rail) minmax(0, 1fr);
}

.fed-workspace.fed-api-open {
  grid-template-columns: var(--left-rail) minmax(0, 1fr) var(--right-rail);
}

.fed-left-panel {
  padding: 18px 12px 14px;
}

.fed-right-panel {
  padding: 18px 12px 14px;
}

.fed-left-panel .fed-card,
.fed-right-panel .fed-card {
  padding: 16px;
  border-radius: 18px;
}

.fed-left-panel .fed-card-title-row {
  margin-bottom: 12px;
}

.fed-left-panel .fed-card h2 {
  font-size: 18px;
}

.fed-file-box {
  min-height: 96px;
  padding: 14px;
  gap: 12px;
}

.fed-file-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.fed-file-copy strong {
  font-size: 14px;
}

.fed-left-panel button.fed-wide {
  min-height: 42px;
}

.fed-viewer-area {
  margin: 18px 12px 14px;
}

.fed-workspace.fed-api-open .fed-viewer-area {
  margin-left: 10px;
  margin-right: 10px;
}

.fed-right-top .fed-hint {
  margin-bottom: 12px;
  font-size: 12px;
}

.fed-right-panel .fed-card-title-row h2 {
  font-size: 18px;
}

.fed-api-panel {
  padding: 14px;
}

.fed-api-picker-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.fed-api-args-wrap textarea {
  min-height: 88px;
}

.fed-log-card {
  flex-basis: 34%;
  min-height: 210px;
}

#viewer.fed-viewer:not(.fed-has-doc)::before {
  width: min(420px, 76%);
}

#viewer.fed-viewer:not(.fed-has-doc)::after {
  content: "DOC\A\A未打开文档\A请选择本地文件加载 DOCX / XLSX / PPTX。";
}

@media (max-width: 1440px) {
  :root {
    --left-rail: 248px;
    --right-rail: 336px;
  }

  .fed-left-panel,
  .fed-right-panel {
    padding-left: 10px;
    padding-right: 10px;
  }

  .fed-left-panel .fed-card,
  .fed-right-panel .fed-card {
    padding: 14px;
  }

  .fed-viewer-area,
  .fed-workspace.fed-api-open .fed-viewer-area {
    margin-left: 8px;
    margin-right: 8px;
  }
}

@media (max-width: 1180px) {
  :root {
    --left-rail: 228px;
    --right-rail: 320px;
  }

  .fed-brand {
    min-width: 220px;
  }

  .fed-topbar-actions {
    gap: 8px;
  }

  .fed-topbar button {
    padding-left: 12px;
    padding-right: 12px;
  }
}


/* v16: restore a usable left rail, keep the inspector wide, and make the left rail collapsible. */
:root {
  --left-rail: 320px;
  --right-rail: 448px;
}

.fed-topbar-actions {
  gap: 10px;
}

.fed-topbar button#btn-toggle-left.fed-active-side {
  color: #fff;
  border-color: #111827;
  background: #111827;
}

.fed-workspace,
.fed-workspace.fed-api-open {
  transition: grid-template-columns 0.18s ease;
}

.fed-workspace {
  grid-template-columns: var(--left-rail) minmax(0, 1fr);
}

.fed-workspace.fed-api-open {
  grid-template-columns: var(--left-rail) minmax(0, 1fr) var(--right-rail);
}

.fed-workspace.fed-left-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.fed-workspace.fed-left-collapsed.fed-api-open {
  grid-template-columns: minmax(0, 1fr) var(--right-rail);
}

.fed-workspace.fed-left-collapsed .fed-left-panel {
  display: none;
}

.fed-left-panel {
  padding: 20px 16px 16px;
}

.fed-right-panel {
  padding: 20px 16px 16px;
}

.fed-left-panel .fed-card {
  padding: 18px;
}

.fed-title-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.fed-card-title-row h2 {
  white-space: nowrap;
}

.fed-left-panel .fed-card-title-row {
  align-items: flex-start;
  gap: 12px;
}

.fed-left-panel .fed-card-title-row .fed-badge {
  flex: 0 0 auto;
}

.fed-file-box {
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 104px;
  padding: 16px;
}

.fed-file-icon {
  width: 48px;
  height: 48px;
}

/* The SDK toolbar already shows document state; remove the extra demo header above the viewer. */
.fed-viewer-area {
  grid-template-rows: minmax(0, 1fr);
  margin: 16px 16px 16px;
}

.fed-viewer-status {
  display: none !important;
}

.fed-workspace.fed-api-open .fed-viewer-area {
  margin-left: 14px;
  margin-right: 14px;
}

.fed-right-panel .fed-card,
.fed-right-panel .fed-api-panel {
  padding: 16px;
}

.fed-api-picker-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.fed-log-card {
  min-height: 240px;
}

@media (max-width: 1440px) {
  :root {
    --left-rail: 300px;
    --right-rail: 428px;
  }

  .fed-left-panel,
  .fed-right-panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .fed-left-panel .fed-card,
  .fed-right-panel .fed-card {
    padding: 16px;
  }
}

@media (max-width: 1180px) {
  :root {
    --left-rail: 288px;
    --right-rail: 400px;
  }

  .fed-api-picker-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep locale options from inheriting the primary topbar button treatment. */
.fed-topbar .fed-locale-switch {
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.fed-topbar .fed-locale-switch button.fed-locale-option {
  min-width: 48px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: #344054;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.fed-topbar .fed-locale-switch button.fed-locale-option:hover:not(:disabled) {
  color: #162033;
  background: #e8f1ff;
  transform: none;
  box-shadow: none;
}

.fed-topbar .fed-locale-switch button.fed-locale-option.fed-active-locale,
.fed-topbar .fed-locale-switch button.fed-locale-option.fed-active-locale:hover:not(:disabled) {
  color: #fff;
  background: #162033;
  box-shadow: 0 1px 2px rgba(16, 32, 51, 0.18);
}
