/* Client dashboard: retain the existing graphite/teal shell. */
.client-console section[aria-labelledby="files-mcp-title"] {display:none!important}
.client-console #models > .section-heading button {display:none!important}
.history-model-options {max-height:260px;overflow:auto}
.history-checkbox-grid label[hidden] {display:none!important}
.history-filter-grid input[type=search],.history-date-control input[type=text] {width:100%;min-width:0;box-sizing:border-box;background:var(--customer-field);color:inherit;border:1px solid var(--customer-border);border-radius:8px;padding:12px;font:inherit}
.history-date-control input[type=text] {padding-right:42px}
.docs-model-compact {display:block;margin:0}
.docs-model-compact label {display:grid;gap:6px;width:260px;font-size:12px}
.docs-model-compact select {background:var(--customer-field);color:inherit;border:1px solid var(--customer-border);border-radius:8px;padding:10px;min-width:0}
.client-setup-docs .docs-examples {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important;align-items:start}
.client-setup-docs .docs-examples article {grid-column:auto;min-width:0;position:relative;display:flex;flex-direction:column;gap:10px}
.client-setup-docs .docs-examples pre {max-height:15rem!important;min-height:0!important;overflow:auto;font-size:12px;line-height:1.6;padding-top:8px!important}
.client-setup-docs .docs-api-protocols .docs-examples {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.client-setup-docs .docs-api-protocols .docs-examples pre {
  flex-grow: 1;
}
.docs-examples article h3 {padding-right:0!important;margin:0!important}
.docs-examples article > button {position:static!important;align-self:flex-start;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;min-width:138px;min-height:36px}
.docs-examples button svg,.docs-connection-value button svg,.model-provider-copy svg {width:16px!important;height:16px!important;flex:none;fill:none;stroke:currentColor;stroke-width:2}
.example-official {font-size:11px;color:#75bcad;text-underline-offset:3px}
.model-provider-copy {display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-width:138px!important;white-space:nowrap}
.is-copied {color:#77c5b3!important;border-color:#69b5a5!important;background:#69b5a51a!important;box-shadow:0 0 0 2px #69b5a510}
.history-confirm {max-width:460px;width:calc(100% - 40px);box-sizing:border-box;padding:26px;background:var(--customer-surface,#181f23);color:var(--customer-text,#e7edef);border:1px solid #51615f;border-radius:14px;box-shadow:0 24px 80px #0008}
.history-confirm::backdrop {background:#0009;backdrop-filter:blur(3px)}
.history-confirm h2 {font-size:20px;margin:0 0 14px}
.history-confirm p {font-size:14px;line-height:1.6;color:inherit;opacity:.8}
.history-confirm > div {display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.history-confirm button {padding:10px 18px;border-radius:8px;background:transparent;color:inherit;border:1px solid #657a76;font:inherit;cursor:pointer}
.history-confirm button[data-confirm] {color:#89cebd;background:#69b5a519}
@media(max-width:650px){.client-setup-docs .docs-examples{grid-template-columns:minmax(0,1fr)!important}.client-setup-docs .docs-examples article{grid-column:1!important}.docs-model-compact label{width:100%}.history-filter-grid{grid-template-columns:minmax(0,1fr)!important}}
html[data-theme=light] .history-confirm {background:#f6f9f8;color:#172923}

.client-console #models > .model-id-section-head button {display:none!important}
.client-setup-docs .docs-examples pre {white-space:pre-wrap!important;overflow-wrap:anywhere;word-break:normal}


/* The full history uses the same usage-table component as Recent requests. */
.client-console.single-page.portal-layout .history-table-wrap {
  margin-top: 24px;
  max-height: none;
  overflow: visible;
  border: 0;
  border-radius: 0;
  container-type: normal;
}
.history-model-search {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 650;
}
.history-model-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--customer-border-strong);
  border-radius: 8px;
  background: var(--customer-field);
  color: var(--customer-text);
  font: inherit;
}
.history-model-empty {
  margin: 12px 0 0;
  color: var(--customer-muted);
  font-size: 12px;
}
.client-console.single-page.portal-layout .request-history-more {
  min-height: 40px;
  padding: 0 11px;
  border-color: var(--customer-border-strong);
  background: transparent;
  font-size: 11px;
}
/* A single rounded border, matching the original Clear history hover. */
.client-console.single-page.portal-layout :is(.request-history-more, .client-insights button, .client-insights .history-advanced > summary, .docs-examples button, .model-provider-copy):is(:hover, :focus-visible):not(:disabled) {
  border-color: var(--customer-accent);
  background: var(--customer-surface-raised);
  color: var(--customer-text);
  outline: none;
  box-shadow: none;
}
.client-console.single-page.portal-layout .client-insights :is(a, button, input, select, summary):focus-visible {
  outline: none;
  box-shadow: none;
}
.client-console.single-page.portal-layout :is(.history-date-control, .model-catalog-search):focus-within {
  outline: none;
  box-shadow: none;
}
.client-console.single-page.portal-layout :is(.history-filter-grid input, .history-filter-grid select, .history-model-search input, .docs-model-compact select, .model-catalog-search input):is(:hover, :focus) {
  border-color: var(--customer-accent);
  outline: none;
  box-shadow: none;
}
.client-console.single-page.portal-layout .history-date-control:focus-within > input {
  border-color: var(--customer-accent);
  outline: none;
  box-shadow: none;
}

.history-model-type {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 650;
}
.history-model-type select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--customer-border-strong);
  border-radius: 8px;
  background: var(--customer-field);
  color: var(--customer-text);
  font: inherit;
}
.client-console.single-page.portal-layout .history-model-type select:is(:hover, :focus) {
  border-color: var(--customer-accent);
  outline: none;
  box-shadow: none;
}
@media (min-width: 761px) {
  .history-advanced-panel {
    max-height: min(620px, calc(100dvh - 320px));
  }
  .history-advanced-panel .history-model-options {
    max-height: clamp(64px, calc(100dvh - 730px), 210px);
  }
}

/* Reuse the existing header row instead of a separate model-selector row. */
.client-setup-docs-heading > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.client-setup-docs-heading .client-setup-docs-actions {
  flex: 0 0 auto;
}
@media (max-width: 760px) {
  .client-setup-docs-actions .docs-model-compact label {
    width: 100%;
  }
}

/* Match setup headings and give the Model ID hint room above and below. */
.client-console.single-page.portal-layout .client-setup-docs-heading h2 {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -.45px;
}
.client-console.single-page.portal-layout .model-id-section-head p {
  margin: 12px 0 8px;
}

#models:not([data-catalog-mode="speech"]) > #speech,
#models[data-catalog-mode="speech"] .model-provider-explorer .model-catalog-panel {
  display:none!important;
}
#models[data-catalog-mode="speech"] .model-provider-layout {
  height:auto;
  min-height:0;
}
#models #speech {
  margin:0;
  min-width:0;
  border:1px solid var(--customer-border);
  border-radius:8px;
  overflow:hidden;
  background:var(--customer-field);
}
#models #speech .media-channel-list {
  padding:0;
}
#models #speech .media-channel-trigger {
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1fr) 12px;
  gap:12px;
  align-items:center;
  width:100%;
  min-height:50px;
  padding:8px 12px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:var(--customer-text);
  text-align:start;
  font:inherit;
  font-size:14px;
  cursor:pointer;
}
#models #speech .media-channel-identity {
  grid-template-columns:minmax(0,1fr);
}
#models #speech .media-channel-trigger:hover {
  background:color-mix(in srgb,var(--customer-text) 4%,transparent);
}
#models #speech .media-channel-row.is-selected .media-channel-trigger:hover {
  background:transparent;
}
#models #speech .media-channel-trigger:focus-visible {
  outline:2px solid var(--customer-accent);
  outline-offset:-2px;
}
#models #speech .media-channel-trigger:disabled {
  cursor:default;
  opacity:.55;
}
#models #speech .media-channel-active {
  margin:0;
  width:auto;
  padding:20px 24px;
  border-radius:0;
}
#models [data-capability="local-speech"][aria-busy="true"] {
  cursor:progress;
}
@media(max-width:760px) {
  #models #speech .media-channel-active {padding:16px 18px}
}
#models #speech .media-request-preview {
  padding:10px 12px;
}
.customer-keys .customer-keys-list {
  grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));
}
.customer-keys .customer-key-feedback:not(:empty) {
  display:block;
  margin-top:8px;
  font-size:12px;
  color:var(--customer-muted);
}

@media (min-width:861px) {
  .client-setup-docs .docs-api-basics .docs-examples {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch;
  }
}

#models .model-provider-explorer .catalog-model-line {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:8px 12px;
  min-height:58px;
  padding:10px 14px;
  border-radius:8px;
  background:var(--customer-surface-soft);
  color:var(--customer-text);
}
#models .catalog-model-identity {
  display:grid;
  gap:3px;
  min-width:0;
}
#models .catalog-model-identity > code {
  font-family:SFMono-Regular,Consolas,monospace;
  font-size:14px;
  font-weight:650;
  line-height:1.45;
  overflow-wrap:anywhere;
}
#models .model-provider-explorer .catalog-model-toggle {
  display: flex;
  align-self: stretch;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
#models .catalog-model-chevron {
  flex: 0 0 auto;
  color: var(--customer-accent);
}
#models .catalog-model-toggle[aria-expanded="true"] .catalog-model-chevron {
  transform: rotate(90deg);
}
#models .catalog-model-toggle:focus-visible {
  outline: 2px solid var(--customer-accent);
  outline-offset: 2px;
}
#models .model-provider-explorer .catalog-model-line:has(.catalog-model-toggle:is(:hover, :focus-visible, [aria-expanded="true"])) {
  background: var(--customer-surface-raised);
  box-shadow: inset 0 0 0 1px var(--customer-accent);
}
#models .model-catalog-search[hidden],
#models .ld-search-example[hidden] { display: none; }
#models .ld-search-example {
  min-width: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--customer-border);
}
#models .ld-search-example :is(.ld-request-tools, .ld-example-languages) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#models .ld-search-example .ld-request-tools {
  align-items: center;
  justify-content: space-between;
}
#models .ld-search-example pre {
  max-width: 100%;
  margin: 12px 0 0;
  overflow: auto;
}
#models .catalog-model-actions {
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
  gap:8px 12px;
}
#models .catalog-model-actions .model-channel-copy {
  min-width:40px;
  min-height:36px;
}
#root[data-restoring-scroll] { overflow-anchor: none; }
#models .catalog-labeled-model .catalog-model-identity > code {
  color: var(--customer-text);
  font-weight: 750;
}
#models .catalog-labeled-model .catalog-model-actions { max-width: none; }
#models .catalog-labeled-model .catalog-model-actions .model-channel-copy {
  box-sizing: border-box;
  width: max-content;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  min-height: 38px;
  max-height: none;
  padding-inline: 10px;
  border-radius: 9px;
  color: var(--customer-text);
  line-height: 1.25;
}
#models .catalog-labeled-model .catalog-model-actions .model-channel-copy svg { flex: 0 0 14px; }
@media(max-width:760px) {
  .client-console.single-page.portal-layout #models .model-provider-explorer .model-provider-layout .model-catalog-tabs {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px;
  }
  .client-console.single-page.portal-layout #models .model-provider-explorer .model-provider-layout .model-catalog-tabs button:nth-child(n) {
    width:100%;
    white-space:normal;
    min-width:0;
  }
  #models .catalog-model-line:has(.model-example-link) {
    column-gap:8px;
  }
  #models .catalog-model-actions {
    max-width:134px;
  }
  #models .catalog-model-actions .model-channel-copy {
    min-height:44px;
    min-width:44px;
  }
  #models .model-provider-explorer .catalog-labeled-model .catalog-model-line { padding: 6px 8px; gap: 2px 6px; }
  #models .catalog-labeled-model .catalog-model-line:has(.model-example-link) .catalog-model-actions { display: contents; }
  #models .catalog-labeled-model .catalog-model-line:has(.model-example-link) .catalog-model-identity { grid-area: 1 / 1; align-self: end; }
  #models .catalog-labeled-model .model-example-link { grid-area: 2 / 1; margin-top: 0; align-self: start; line-height: 1.3; }
  #models .catalog-labeled-model .catalog-model-actions .model-channel-copy {
    min-height: 44px;
    padding-inline: 7px;
  }
  #models .catalog-labeled-model .catalog-model-line:has(.model-example-link) .model-channel-copy { grid-area: 1 / 2 / span 2; }
  #models .catalog-labeled-model .catalog-model-actions .model-channel-copy svg { display: none; }
}
@media(max-width:860px) {
  .client-setup-docs .docs-examples {grid-template-columns:minmax(0,1fr)!important}
}
