/* Diode Vibe Admin — llm-pipeline-demo *main chat* theme: gray chrome, white shell, var(--highlight-color) accents (not settings fixed blue). */
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
@import url("https://fonts.googleapis.com/icon?family=Material+Icons+Outlined");

:root {
  /* Set from inline <style> in page <head> (see render_admin + DEPLOY_HIGHLIGHT_COLOR); default #F15C2E matches demo tenant. */
  --highlight-color: #f15c2e;
  --bg0: #f5f5f5;
  --bg1: #f9f9f9;
  --ink: #333333;
  --ink-muted: #5f6368;
  --line: #e0e0e0;
  --card: #ffffff;
  --card-edge: #e0e0e0;
  --accent: var(--highlight-color);
  --accent-hover: color-mix(in srgb, var(--highlight-color) 78%, #000000);
  --accent-soft: color-mix(in srgb, var(--highlight-color) 16%, #ffffff);
  --row-hover: #f9f9f9;
  --ok-bg: #e8f5e9;
  --ok-border: #a5d6a7;
  --err-bg: #fce8e6;
  --err-border: #e0a099;
  --scope-public: #2d6a4f;
  --scope-protected: #5c4d7a;
  --scope-private: #8b2942;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --radius-sm: 6px;
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  /* Keeps full-width header/banner alignment when a vertical scrollbar appears on long pages. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg0);
}

/* Main column: white card on #f5f5f5 like llm-pipeline-demo .container */
.page {
  max-width: min(96vw, 76rem);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  min-height: 100vh;
}

.workspace-settings-anchor {
  scroll-margin-top: 1rem;
}

.workspace-settings-general-tagline {
  margin-top: 1.25rem;
}

.workspace-settings-custom-domains-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.65rem;
  margin: 0 0 1rem;
}

.workspace-settings-custom-domains-h2 {
  margin: 0;
  line-height: 1.35;
}

/* Panel heading + tooltip: drop the label-row hover bridge (padding-top/margin-top) so the
   help icon aligns with the title; that bridge is for form labels, not h2 rows. */
.workspace-settings-custom-domains-heading .workspace-settings-custom-domains-title-tooltip.tooltip.tooltip--above-start {
  padding-top: 0;
  margin-top: 0;
}

.workspace-settings-custom-domains-title-tooltip {
  flex: 0 0 auto;
}

.custom-domain-steps {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.65rem;
  max-width: 42rem;
  line-height: 1.5;
  list-style-type: decimal;
  list-style-position: outside;
}

.custom-domain-steps li {
  margin-bottom: 0.35rem;
  padding-left: 0.25rem;
}

.custom-domain-steps li:last-child {
  margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/* Native <select> — use class `select-styled` on admin/global forms & tables  */
/* -------------------------------------------------------------------------- */
.select-styled,
select.select-styled {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 0.45rem 2.15rem 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: #fff;
  color: var(--ink);
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 1.2rem;
}

.select-styled:hover {
  border-color: #bdc1c6;
}

.select-styled:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-styled:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: var(--bg1);
}

.header {
  margin-bottom: 2.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-muted);
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  max-width: 36em;
}

/* Projects home — first-time setup (no deployment yet) */
.home-vibe-setup-banner {
  margin: 0 0 1.75rem;
  padding: 1.5rem 1.75rem 1.65rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--highlight-color) 35%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--highlight-color) 14%, #ffffff) 0%,
    color-mix(in srgb, var(--highlight-color) 6%, #ffffff) 100%
  );
  box-shadow: var(--shadow);
}

.home-vibe-setup-banner__inner {
  max-width: min(48rem, 100%);
}

.home-vibe-setup-banner__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.home-vibe-setup-banner__lede {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.home-vibe-setup-banner__note {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted);
  opacity: 0.92;
}

.home-vibe-setup-banner__cta.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}

.home-vibe-setup-banner__cta.btn:hover {
  color: #fff;
}

/* Match .btn on <a> inside .gs-content (globalsettings link rules would otherwise force orange text). */
.gs-shell .gs-content a.btn.home-vibe-setup-banner__cta,
.gs-shell .gs-content a.btn.home-vibe-setup-banner__cta:visited {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.gs-shell .gs-content a.btn.home-vibe-setup-banner__cta:hover,
.gs-shell .gs-content a.btn.home-vibe-setup-banner__cta:focus-visible {
  color: #fff;
  text-decoration: none;
}

/* /settings/vibe — detected client OS */
.vibe-platform-banner.panel {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

/* Nested under “Select your coding tool” — spacing only (outer .connect-panel supplies chrome). */
.connect-panel .vibe-platform-banner.vibe-platform-banner--below-tool.panel {
  margin-top: 1.1rem;
  margin-bottom: 0;
}

.vibe-platform-banner__icon-wrap {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg1);
  border: 1px solid var(--line);
}

.vibe-platform-banner__icon-wrap .material-icons {
  font-size: 1.85rem;
  line-height: 1;
  color: var(--ink);
}

.vibe-platform-banner__text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin: 0;
  padding-top: 0.15rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink-muted);
  flex: 1;
  min-width: min(100%, 12rem);
}

.vibe-platform-banner__text strong {
  color: var(--ink);
  font-weight: 600;
}

/* Inline platform picker — reuses .select-styled chevron, compact width */
.vibe-platform-banner__select.select-styled {
  display: inline-block;
  vertical-align: middle;
  width: auto;
  min-width: 9.25rem;
  max-width: min(100%, 14rem);
  flex: 0 1 auto;
  margin: 0;
  padding: 0.35rem 1.85rem 0.35rem 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background-position: right 0.35rem center;
  line-height: 1.35;
}

.vibe-unsupported-panel {
  margin-bottom: 1rem;
}

.connect-panel .vibe-unsupported-panel--below-platform {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.vibe-unsupported-panel__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}

.header-subtitle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 0.75rem;
}

/* Site header profile dropdown (_site_header.html) */
.admin-masthead-profile-wrap {
  position: relative;
}

.admin-masthead-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #dadce0;
  background: #f8f9fa;
}

.admin-masthead-profile-btn .material-icons {
  font-size: 1.5rem;
  line-height: 1;
}

.admin-masthead-profile-btn--avatar {
  overflow: hidden;
  background: #e8eaed;
}

.admin-masthead-profile-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.admin-masthead-profile-pop {
  position: absolute;
  right: 0;
  top: 44px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  z-index: 50;
}

.admin-masthead-profile-link {
  display: block;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
}

.admin-masthead-profile-link:hover {
  background: var(--accent-soft);
}

.header-settings-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.header-settings-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-settings-icon {
  font-size: 1.5rem !important;
}

/* -------------------------------------------------------------------------- */
/* Tooltips — reuse anywhere: .tooltip > .tooltip-trigger + .tooltip-popover   */
/* .tooltip--below-end: popover under trigger (left-aligned). */
/* .tooltip--above-start: popover above trigger (left-aligned) — form labels; avoids viewport clip on the left. */
/* .tooltip--above-end: popover above trigger (right-aligned) — use in tables / tight footers. */
/* z-index: high enough to paint above embedded host UI (e.g. Diode Collab quick-access / pinned zones). */
/* Modals use a higher band so dialogs still stack above tooltips. */
/* -------------------------------------------------------------------------- */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  --tooltip-bridge-w: min(20rem, calc(100vw - 2rem));
  --tooltip-bridge-h: min(18rem, 42vh);
}

/*
 * Bridge the dead zone between trigger and popover: the popover is position:absolute, so the
 * flex-sized .tooltip box does not include the gap. Moving the mouse across that gap leaves
 * .tooltip and the popover hides before the pointer reaches links. Extend the hover hitbox
 * across the gap without shifting layout (padding + negative margin cancel in flow).
 */
.tooltip.tooltip--above-start,
.tooltip.tooltip--above-end {
  padding-top: 12px;
  margin-top: -12px;
}

.tooltip:not(.tooltip--above-start):not(.tooltip--above-end):not(.tooltip--below-end) {
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.tooltip.tooltip--below-end {
  padding-bottom: 12px;
  margin-bottom: -12px;
}

/*
 * Popovers are often wider than the ? icon. The vertical padding bridge is only as wide as the
 * icon, so moving up-and-right (or down-and-right) exits :hover before the pointer reaches the
 * popover. ::before adds a wide invisible wedge (same max width as .tooltip-popover) only while
 * the tooltip is hovered/focused, so pointer-events stay off when idle and do not steal clicks.
 */
.tooltip.tooltip--above-start::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  bottom: 0;
  width: var(--tooltip-bridge-w);
  height: var(--tooltip-bridge-h);
  pointer-events: none;
}

.tooltip.tooltip--above-end::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  left: auto;
  bottom: 0;
  width: var(--tooltip-bridge-w);
  height: var(--tooltip-bridge-h);
  pointer-events: none;
}

.tooltip:not(.tooltip--above-start):not(.tooltip--above-end):not(.tooltip--below-end)::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  top: 100%;
  margin-top: -2px;
  width: var(--tooltip-bridge-w);
  height: var(--tooltip-bridge-h);
  pointer-events: none;
}

.tooltip.tooltip--below-end::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  left: auto;
  top: 100%;
  margin-top: -2px;
  width: var(--tooltip-bridge-w);
  height: var(--tooltip-bridge-h);
  pointer-events: none;
}

.tooltip:hover::before,
.tooltip:focus-within::before {
  pointer-events: auto;
}

.tooltip-trigger {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.1rem;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
  cursor: help;
  line-height: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.tooltip-trigger:hover,
.tooltip-trigger:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}

.tooltip-trigger-icon {
  font-size: 1.1rem !important;
  width: 1.1rem !important;
  height: 1.1rem !important;
}

.tooltip-popover {
  position: absolute;
  z-index: 500000;
  top: calc(100% + 2px);
  left: 0;
  width: max-content;
  max-width: min(20rem, calc(100vw - 2rem));
  padding: 0.55rem 0.7rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
  color: var(--card);
  background: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.14s ease, visibility 0.14s ease;
}

.tooltip--below-end .tooltip-popover {
  left: auto;
  right: 0;
}

.tooltip--above-start .tooltip-popover {
  top: auto;
  bottom: calc(100% + 2px);
  left: 0;
  right: auto;
}

.tooltip--above-end .tooltip-popover {
  top: auto;
  bottom: calc(100% + 2px);
  left: auto;
  right: 0;
}

.tooltip:hover .tooltip-popover,
.tooltip:focus-within .tooltip-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Dark popover: default .inline-code uses light --bg1 and breaks contrast with inherited light text. */
.tooltip-popover .inline-code,
.tooltip-popover code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--card);
  padding: 0.1rem 0.32rem;
  border-radius: 4px;
}

.tooltip-popover strong {
  color: var(--card);
  font-weight: 600;
}

/* Dark popover: default link blue is illegible on --ink background. */
.tooltip-popover a:link,
.tooltip-popover a:visited {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.tooltip-popover a:hover,
.tooltip-popover a:focus-visible {
  color: #fff;
  text-decoration-thickness: 2px;
  outline: none;
}

/* ssh allowlist row info: same .tooltip-popover width as everywhere else; break long diode ssh line inside */
.container-diode-sshd-allow-tooltip .tooltip-popover .container-diode-ssh-allow-example-cmd {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
}

.th-label-with-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.th-deploy-token,
.th-project-id {
  overflow: visible;
}

.panel {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
}

.panel h2 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 1rem;
}

.panel .panel-heading-with-tooltip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.panel .panel-heading-with-tooltip h2 {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.panel .panel-heading-with-tooltip .field-label-tooltip {
  flex-shrink: 0;
}

.panel--form-wide {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.panel--form-wide .feedback {
  margin-top: 1rem;
}

.panel--form-wide .form-page-actions + .feedback.feedback--below-submit {
  margin-top: 0.5rem;
}

/* First workspace: signed in, no membership yet (/workspace/new) */
.gs-shell--welcome-coding-tool .panel--welcome-coding-tool {
  max-width: 36rem;
}

.gs-shell--welcome-coding-tool .welcome-coding-tool-header .tagline {
  max-width: 36rem;
}

.gs-shell--welcome-coding-tool .welcome-coding-tool-form.form-page {
  margin-top: 0.5rem;
}

.gs-shell--workspace-new .panel--workspace-new {
  max-width: min(28rem, 100%);
  margin-left: 0;
  margin-right: auto;
}

.gs-shell--workspace-new .workspace-new-header .tagline {
  margin-top: 0.35rem;
}

.workspace-new-intro {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  margin: 0 0 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--highlight-color) 28%, var(--card-edge));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--highlight-color) 10%, var(--card)) 0%,
    color-mix(in srgb, var(--accent-soft) 40%, var(--card)) 100%
  );
}

.workspace-new-intro-icon {
  font-size: 1.65rem !important;
  width: 1.65rem !important;
  height: 1.65rem !important;
  color: var(--highlight-color);
  flex-shrink: 0;
  margin-top: 0.08rem;
}

.workspace-new-intro-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.workspace-new-intro-text strong {
  color: var(--ink);
  font-weight: 600;
}

.gs-shell--workspace-new .workspace-new-form.form-page {
  gap: 0.35rem;
}

.panel--workspace-new .form-page-actions {
  margin-top: 1rem;
}

.form-page {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 768px) {
  .form-page {
    /* minmax(0,…) so wide children (e.g. URL tables) don’t force the grid wider than the viewport */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .form-page .field--full {
    grid-column: 1 / -1;
  }
}

.form-page .field input[type="text"],
.form-page .field input[type="email"],
.form-page .field input[type="number"],
.form-page .field select {
  max-width: none;
}

/* Match primary controls to Publish scope width (same cap as .field select outside form-page). */
.form-page .field.field--control-match-scope input[type="text"],
.form-page .field.field--control-match-scope input[type="email"],
.form-page .field.field--control-match-scope input[type="number"],
.form-page .field.field--control-match-scope select {
  width: 100%;
  max-width: 16rem;
  box-sizing: border-box;
}

.form-page .field.field--control-match-scope.field--project-name-control input[type="text"],
.form-page .field.field--control-match-scope.field--project-name-control input[type="email"] {
  max-width: 32rem;
}

.form-page .field textarea {
  width: 100%;
  min-height: 4rem;
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-page .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.page-form-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.page-form-hint--header {
  margin-top: 0.65rem;
  max-width: 36em;
}

.form-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-start;
  align-items: center;
  margin-top: 0.25rem;
}

.form-page-actions .btn {
  margin-top: 0;
}

a.btn-secondary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

tbody tr.empty-row td a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

tbody tr.empty-row td a:hover {
  text-decoration: underline;
}

/* Disclosure blocks use the same form grid gap as other `.field` rows (edit project, etc.). */
.field-disclosure {
  margin-bottom: 0;
}

.field-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
}

.field-summary-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.field-summary-value {
  flex: 1 1 12rem;
  min-width: 0;
  color: var(--ink);
  word-break: break-word;
}

/* Inline “Change” on create-project summaries: real <a>, shares .connect-app-link */
.field-summary-row .disclosure-change-link {
  flex-shrink: 0;
  align-self: baseline;
}

/* Agent coding: label column + row (description+copy left, Show/Change right, like other disclosures) */
.field-summary-row--agent-coding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.65rem;
  row-gap: 0.35rem;
}

.field-agent-coding-row-rest {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.field-agent-coding-summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.field-summary-row--agent-coding .field-agent-coding-summary .field-summary-value {
  flex: 0 1 auto;
}

.field-summary-row--agent-coding .field-agent-coding-summary .btn-icon {
  flex-shrink: 0;
  align-self: baseline;
}

.field-summary-row--agent-coding .field-agent-coding-row-rest .disclosure-toggle {
  flex-shrink: 0;
  margin-left: auto;
  align-self: baseline;
}

@media (max-width: 42rem) {
  .field-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .field-summary-label {
    width: 100%;
  }

  .field-summary-value {
    flex: none;
    width: 100%;
  }

  .field-summary-row .disclosure-change-link {
    align-self: flex-start;
  }

  .field-summary-row--agent-coding {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .field-agent-coding-row-rest {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .field-summary-row--agent-coding .field-agent-coding-row-rest .disclosure-toggle {
    margin-left: 0;
    align-self: flex-start;
  }
}

.field-editor-panel {
  margin-top: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg1);
}

.field-editor-panel[hidden] {
  display: none !important;
}

.field-editor-panel .field-hint {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.field-editor-panel input[type="text"],
.field-editor-panel select,
.field-editor-panel textarea {
  width: 100%;
  max-width: none;
}

/* Inline input + trailing help tooltip (create project external port) */
.field-input-with-tooltip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 28rem;
}

.field-input-with-tooltip input[type="number"],
.field-input-with-tooltip input[type="text"],
.field-input-with-tooltip select {
  flex: 1 1 auto;
  min-width: 0;
}

.field-input-with-tooltip .field-input-tooltip {
  flex-shrink: 0;
  align-self: center;
}

.form-page .field-input-with-tooltip input[type="number"] {
  max-width: none;
}

/* No overflow-x: auto here — it clips absolutely positioned tooltips (overflow-y becomes non-visible).
   Wide tables still scroll with the page when column mins exceed the viewport. */
.table-wrap {
  margin: 0 -0.25rem;
  border-radius: var(--radius-sm);
  overflow: visible;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-muted);
  padding: 0.65rem 0.85rem;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

tbody td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Grey hover only for non-clickable rows (e.g. empty state). Project rows use accent on td — do not set tr-level bg; td backgrounds win over tr in tables. */
tbody tr:not(.project-row):hover td {
  background: var(--row-hover);
}

.cell-name {
  font-weight: 600;
  color: var(--ink);
}

/* min-width: 0 lets the grid shrink with the panel so a single row doesn’t force an inner scrollbar */
.projects-table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

/* Workspace → Users & invites: two-column members table (avoid index URL column widths on role) */
.projects-table.projects-table--members {
  table-layout: auto;
}

.projects-table.projects-table--members thead th:nth-child(2),
.projects-table.projects-table--members tbody td:nth-child(2) {
  min-width: 12rem;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.projects-table.projects-table--members thead th:nth-child(1),
.projects-table.projects-table--members tbody td:nth-child(1) {
  max-width: none;
}

.ws-members-display-name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.ws-members-sub {
  display: block;
  word-break: break-word;
  font-size: 0.85rem;
  line-height: 1.45;
}

.ws-members-role-form {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin: 0;
}

.ws-members-role-readonly {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.35;
  text-transform: capitalize;
  color: var(--ink);
}

/* Workspace settings → Users: invitations (no list bullets) */
.ws-inv-panel .ws-inv-hint {
  margin-top: 0.35rem;
  max-width: 40rem;
}

.ws-inv-create-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.35rem;
}

.ws-inv-create-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.ws-inv-create-row .ws-inv-create-role {
  min-width: 9rem;
}

.ws-inv-meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  min-width: 0;
}

.ws-inv-join-role {
  font-size: 0.88rem;
  color: var(--muted, #5f6368);
  text-transform: none;
}

.ws-inv-used-role {
  font-weight: 500;
  color: var(--ink);
}

.ws-inv-subheading {
  margin: 1.25rem 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.ws-inv-pending-list,
.ws-inv-used-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ws-inv-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  background: var(--bg0);
}

.ws-inv-card-url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.ws-inv-card-url-row .btn-icon {
  flex-shrink: 0;
}

.ws-inv-link-snippet {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  word-break: break-all;
  color: var(--ink);
}

.ws-inv-no-stored-link {
  margin: 0 0 0.55rem;
  max-width: 36rem;
  font-size: 0.88rem;
}

.ws-inv-url-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.ws-inv-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ws-inv-expires {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.ws-inv-card--used {
  background: var(--bg1);
  padding: 0.55rem 0.85rem;
}

.ws-inv-used-line {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.ws-inv-empty {
  margin: 0;
}

.ws-members-role-select.select-styled {
  font-size: 1rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  min-width: 10.5rem;
  line-height: 1.35;
  background-position: right 0.4rem center;
  background-size: 1.25rem;
}

.ws-members-role-save {
  margin-top: 0;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

.ws-inv-by-name-hint {
  margin-top: 0.35rem;
  max-width: 40rem;
}

.ws-inv-by-name-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.75rem 0 0;
  max-width: 36rem;
}

.ws-inv-by-name-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ws-inv-by-name-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0;
}

.ws-inv-by-name-combobox {
  position: relative;
  width: 100%;
}

.ws-inv-by-name-input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.ws-inv-by-name-input:focus {
  outline: 2px solid var(--highlight-color, #f15c2e);
  outline-offset: 0;
}

.ws-inv-by-name-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ws-inv-by-name-list[hidden] {
  display: none !important;
}

.ws-inv-by-name-option,
.ws-inv-by-name-empty {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.35;
}

.ws-inv-by-name-option:hover,
.ws-inv-by-name-option:focus {
  background: var(--bg1, #f8f9fa);
}

.ws-inv-by-name-empty {
  cursor: default;
  color: var(--ink-muted);
}

.ws-inv-by-name-option-primary {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.ws-inv-by-name-option-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.ws-inv-by-name-role {
  min-width: 9rem;
}

.projects-table thead th:nth-child(1),
.projects-table .cell-name {
  min-width: 11rem;
  max-width: calc(20rem + 30px);
  width: 24%;
}

.projects-table .cell-name-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  vertical-align: top;
}

.projects-table .cell-name-text {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-table .cell-url,
.projects-table thead th:nth-child(3) {
  position: relative;
  min-width: 10rem;
  max-width: 18rem;
  width: 28%;
  vertical-align: top;
}

/* URL + copy: single line; column max-width caps width; clip flexes inside cell */
.projects-table .cell-url:not(.cell-url--empty) {
  white-space: nowrap;
}

.projects-table .cell-url--empty {
  white-space: normal;
}

.projects-table tbody td.cell-url.cell-url--empty {
  overflow: visible;
}

.projects-table .cell-url-missing-wrap {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.2rem;
  max-width: 100%;
}

.projects-table .cell-url-missing-wrap .cell-url-awaiting-tooltip {
  flex-shrink: 0;
  margin-top: 0.02rem;
}

.projects-table .cell-url-missing {
  display: block;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ink-muted);
  font-style: italic;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.projects-table .cell-url-init-log-row {
  margin-top: 0.35rem;
}

.projects-table .cell-url--diode-error .cell-url-diode-cli-error-wrap {
  display: block;
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
}

.projects-table .cell-url-diode-cli-error-action {
  color: #c5221f;
  font-weight: 600;
  text-decoration: none;
}

.projects-table .cell-url-diode-cli-error-action:hover {
  text-decoration: underline;
}

.projects-table .cell-url-diode-cli-error-plain {
  color: #c5221f;
  font-weight: 600;
  cursor: default;
}

.projects-table .cell-url-pending {
  display: inline-block;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--accent);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.02em;
  animation: cell-url-pending-pulse 1.6s ease-in-out infinite;
}

@keyframes cell-url-pending-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .projects-table .cell-url-pending {
    animation: none;
  }
}

/* Optimistic “create project” row on workspace home until POST completes */
.projects-table tr.project-row--creating {
  cursor: default;
}

.projects-table tr.project-row--creating .cell-creating-pending {
  display: inline-block;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  animation: cell-url-pending-pulse 1.6s ease-in-out infinite;
}

.projects-table tr.project-row--creating .cell-creating-pending--subtle {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.75;
  animation: cell-url-pending-pulse 1.6s ease-in-out infinite;
}

.projects-table tr.project-row--creating .cell-creating-muted {
  color: var(--text-muted, #6b7280);
  font-size: 0.88rem;
}

@media (prefers-reduced-motion: reduce) {
  .projects-table tr.project-row--creating .cell-creating-pending,
  .projects-table tr.project-row--creating .cell-creating-pending--subtle {
    animation: none;
  }
}

.projects-table .cell-url-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
  vertical-align: top;
}

.projects-table .cell-url-clip {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects-table .cell-url-inner .btn-copy-url {
  flex-shrink: 0;
  margin-left: 0;
}

.projects-table .cell-name-inner .btn-open-site-url {
  flex-shrink: 0;
  margin-left: 0;
}

.url-copy-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.projects-table thead th:nth-child(2),
.projects-table .cell-last-deployed {
  min-width: 7.5rem;
  max-width: 13rem;
  width: 16%;
  white-space: normal;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects-table thead th.th-last-deployed .th-last-deployed-icon {
  display: none;
}

.projects-table .cell-last-deployed-at {
  font: inherit;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.projects-table thead th:nth-child(4),
.projects-table tbody td.cell-scope {
  min-width: 5rem;
  max-width: 7.5rem;
  width: 12%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.projects-table thead th:nth-child(5),
.projects-table .cell-project-id {
  position: relative;
  min-width: 10rem;
  max-width: 18rem;
  width: 26%;
  vertical-align: top;
}

/* Medium (~800px): hide Scope; Name, Last deployment, URL, Project ID.
   Last deployment header: clock icon + screen-reader “Last deployment”. */
@media (max-width: 50rem) {
  .projects-table:not(.projects-table--members) thead th:nth-child(4),
  .projects-table:not(.projects-table--members) tbody td:nth-child(4) {
    display: none;
  }

  .projects-table:not(.projects-table--members) thead th.th-last-deployed {
    position: relative;
  }

  .projects-table:not(.projects-table--members) thead th.th-last-deployed .th-last-deployed-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .projects-table:not(.projects-table--members) thead th.th-last-deployed .th-last-deployed-icon {
    display: inline-block;
    font-size: 1.35rem;
    vertical-align: middle;
    line-height: 1;
    color: var(--ink-muted);
  }
}

/* Narrower: also hide URL — Name, Last deployment, Project ID only. */
@media (max-width: 42rem) {
  .projects-table:not(.projects-table--members) thead th:nth-child(3),
  .projects-table:not(.projects-table--members) thead th:nth-child(4),
  .projects-table:not(.projects-table--members) tbody td:nth-child(3),
  .projects-table:not(.projects-table--members) tbody td:nth-child(4) {
    display: none;
  }

  .projects-table:not(.projects-table--members) .cell-name-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .projects-table:not(.projects-table--members) .cell-short-secret--full {
    display: none;
  }

  .projects-table:not(.projects-table--members) .cell-short-secret--narrow {
    display: inline;
  }
}

.projects-table .cell-project-id-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  max-width: 100%;
  font-size: 0.8rem;
}

.projects-table .cell-id-value-with-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
}

.projects-table .cell-id-value-with-copy .cell-short-secret {
  flex: 0 1 auto;
  min-width: 0;
}

.projects-table .cell-short-secret--narrow {
  display: none;
}

.projects-table .cell-token-subrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
}

.projects-table .cell-token-subrow-label {
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.projects-table .cell-deploy-token-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  max-width: 100%;
}

.projects-table .cell-deploy-token-hint {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.projects-table .cell-short-secret {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}

.projects-table .cell-deploy-token-inner .btn-copy-token,
.projects-table .cell-token-subrow .btn-copy-token,
.projects-table .cell-id-value-with-copy .btn-copy-token,
.projects-table .cell-id-value-with-copy .btn-copy-project-id {
  flex-shrink: 0;
  margin-left: 0;
}

.projects-table .cell-deploy-token-missing {
  color: var(--ink-muted);
  font-style: italic;
}

.id-copy-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.field-readonly-with-copy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Edit project: UUID + copy immediately after code; optional token + copy to the right (wraps). */
.field-project-uuid-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem 1rem;
}

.field-readonly-inline {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 100%;
}

.field-readonly-inline .field-readonly-code--inline {
  flex: 0 1 auto;
  min-width: 0;
  word-break: break-all;
}

.field-readonly-inline .btn-icon {
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* Disclosure: title + Change/Show on one line; summary readout below. */
.field-disclosure-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
}

.field-disclosure-heading-row .field-label-static {
  margin-bottom: 0;
}

.field-disclosure-heading-row .field-static-readout-link {
  flex-shrink: 0;
  font-size: 0.9rem;
}

/* Help icon + title share one visual line (baseline flex misaligns the ? with display titles). */
.field-disclosure-heading-row--with-help {
  align-items: center;
}

.field-disclosure-heading-row--with-help .field-label-tooltip {
  flex-shrink: 0;
}

/* Disclosure readouts: value row matches UUID / readonly rhythm. */
.field-static-readout-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem 1rem;
}

.field-static-readout-row .field-static-readout-text {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
}

.field-static-readout-row .field-readonly-inline {
  flex: 1 1 12rem;
  min-width: 0;
}

/* Short value + copy icon: tight inner wrap (not the full-width readout / uuid row). */
.field-readonly-value-copy-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}

.field-readonly-value-copy-wrap .field-readonly-code--inline {
  flex: 0 1 auto;
  min-width: 0;
  word-break: break-all;
}

.field-readonly-value-copy-wrap .btn-icon {
  flex-shrink: 0;
  margin-top: 0;
}

.field-static-readout-row .field-readonly-value-copy-wrap .field-static-readout-text {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

.field-readonly-copy-inline {
  display: block;
  line-height: 1.5;
}

.field-readonly-copy-inline .field-readonly-code--copy-inline {
  display: inline;
  word-break: break-all;
  padding: 0;
  background: transparent;
  font-size: 0.85rem;
  vertical-align: baseline;
}

.field-readonly-copy-inline .btn-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.field-readonly-copy-inline.field-readonly-copy-inline--collab-https {
  margin-top: 0.5rem;
}

.field--container-env .container-env-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.field--container-env .container-env-key {
  flex: 0 0 30%;
  width: 30%;
  min-width: 0;
  max-width: 30%;
  box-sizing: border-box;
}

.field--container-env .container-env-val-wrap {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-sizing: border-box;
}

.field--container-env .container-env-val-wrap .container-env-val {
  min-width: 0;
  flex: 1 1 auto;
  max-width: none;
}

.field--container-env .container-env-remove {
  flex: 0 0 auto;
}

.field--container-env .container-env-reveal[hidden] {
  display: none !important;
}

.field--container-diode-binds .container-env-row,
.field--container-diode-binds .container-diode-bind-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.field--container-diode-binds .container-diode-bind-kind {
  flex: 0 0 10.25rem;
  min-width: 7.5rem;
  max-width: 12rem;
}

.field--container-diode-binds .container-diode-bind-fields-bind,
.field--container-diode-binds .container-diode-bind-fields-sshd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}

.field--container-diode-binds .container-diode-bind-fields-bind[hidden],
.field--container-diode-binds .container-diode-bind-fields-sshd[hidden] {
  display: none !important;
}

.field--container-diode-binds .container-diode-sshd-allowed-id {
  flex: 0 1 30rem;
  min-width: 0;
  max-width: 45rem;
  box-sizing: border-box;
}

.field--container-diode-binds .container-diode-sshd-allow-tooltip {
  flex: 0 0 auto;
}

.field--container-diode-binds .container-diode-bind-local,
.field--container-diode-binds .container-diode-bind-remote-port {
  flex: 0 0 8.125rem;
  min-width: 0;
  max-width: 10rem;
  box-sizing: border-box;
}

.field--container-diode-binds .container-diode-bind-remote-id {
  flex: 0 1 30rem;
  min-width: 0;
  max-width: 45rem;
  box-sizing: border-box;
}

.field--container-diode-binds .container-env-remove {
  flex: 0 0 auto;
}

.field-readonly-copy-inline .field-readonly-link-project-url,
.field-readonly-copy-inline .field-readonly-link-collab-https {
  color: var(--accent, #0b57d0);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.field-readonly-copy-inline .field-readonly-link-project-url:hover,
.field-readonly-copy-inline .field-readonly-link-collab-https:hover {
  text-decoration-thickness: 2px;
}

.field-url-placeholder {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.field-readonly-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.85rem;
  word-break: break-all;
  flex: 1 1 auto;
  min-width: 0;
}

.deploy-token-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.deploy-token-reveal {
  width: 100%;
  min-height: 3rem;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}

.token-copy-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.scope {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.scope-public {
  background: rgba(45, 106, 79, 0.12);
  color: var(--scope-public);
}

.scope-protected {
  background: rgba(92, 77, 122, 0.12);
  color: var(--scope-protected);
}

.scope-private {
  background: rgba(139, 41, 66, 0.12);
  color: var(--scope-private);
}

.empty-row td {
  text-align: center;
  color: var(--ink-muted);
  font-style: italic;
  padding: 1.75rem 1rem;
}

.projects-hint {
  margin: -0.35rem 0 1rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.projects-hint-icon {
  font-size: 1rem !important;
  vertical-align: text-bottom;
  margin: 0 0.05rem;
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  margin: -0.35rem 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

a.btn-icon {
  text-decoration: none;
  box-sizing: border-box;
}

.btn-icon .material-icons,
.btn-icon .material-icons-outlined {
  font-size: 1.35rem;
}

.btn-icon:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-icon:disabled:hover {
  background: transparent;
  color: var(--ink-muted);
}

.modal-body-restricted {
  margin-bottom: 1rem;
}

.restricted-allowlist {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  line-height: 1.5;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.restricted-allowlist-empty {
  list-style: none;
  margin-left: -1.25rem;
  font-style: italic;
}

.modal-actions-stack {
  flex-direction: column;
  align-items: stretch;
}

.modal-actions-stack .btn {
  width: 100%;
  justify-content: center;
}

tbody tr.project-row {
  cursor: pointer;
  outline: none;
}

tbody tr.project-row td {
  transition: background-color 0.12s ease;
}

tbody tr.project-row:hover td,
tbody tr.project-row:focus-visible td {
  background: var(--accent-soft);
}

tbody tr.project-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Form */
.form-grid {
  display: grid;
  gap: 1rem;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

/* Label + trailing help (allowlist format) */
.field-label-with-tooltip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.field .field-label-with-tooltip > label {
  display: inline;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.field .field-label-with-tooltip > .field-label-static {
  display: inline;
  margin-bottom: 0;
}

.field-label-with-tooltip .field-label-tooltip {
  flex-shrink: 0;
  align-self: center;
}

/* Short select labels + per-option help tooltips (deployment type, …) */
.deployment-kind-tooltips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.deployment-kind-tip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.deployment-kind-tip-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.field-label-optional {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="password"],
.field select {
  width: 100%;
  max-width: 28rem;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: #a39a8c;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field select {
  cursor: pointer;
  max-width: 16rem;
}

.field.vibe-tool-field select {
  max-width: min(100%, 25rem);
}

/* `.field select` uses `background: #fff` shorthand, which strips `.select-styled`’s chevron background-image. */
.field select.select-styled,
.form-page .field select.select-styled {
  width: auto;
  max-width: 28rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  padding: 0.45rem 2.15rem 0.45rem 0.65rem;
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 1.2rem;
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
  padding: 0.65rem 1.35rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover {
  background: var(--accent-hover);
}

.btn:active {
  transform: scale(0.98);
}

button.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Primary actions that stay disabled until the user enters new data or changes the form */
button.btn.btn-pending-changes:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

button.btn.btn-pending-changes:disabled:hover {
  background: var(--accent);
  transform: none;
}

button.btn.btn-secondary.btn-pending-changes:disabled:hover {
  background: transparent;
  color: var(--ink-muted);
  border-color: var(--line);
}

button.btn.btn-danger.btn-pending-changes:disabled:hover {
  background: transparent;
  color: #5c2018;
  border-color: var(--err-border);
}

.feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.45;
  display: none;
}

.feedback.visible {
  display: block;
}

.feedback.ok {
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  color: #1e3d28;
}

.feedback.err {
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  color: #5c2018;
}

.settings-network-form {
  margin-top: 0.75rem;
  max-width: 52rem;
}

.settings-network-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg0);
}

.settings-network-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.settings-network-table caption {
  text-align: left;
}

.settings-network-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg1);
}

.settings-network-table tbody th,
.settings-network-table tbody td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.settings-network-table tbody tr:last-child th,
.settings-network-table tbody tr:last-child td {
  border-bottom: none;
}

.settings-network-table tbody th[scope="row"] {
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  width: 1%;
  color: var(--ink);
}

.settings-network-table tbody td:first-of-type {
  color: var(--ink-muted);
  width: 8.5rem;
  white-space: nowrap;
}

.settings-network-table tbody td:last-child {
  width: auto;
  min-width: 12rem;
}

.settings-network-table .inline-code {
  font-size: 0.85em;
}

.settings-network-form textarea,
.settings-network-form .settings-network-inline-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
}

.settings-network-form select.select-styled {
  min-width: 10rem;
  max-width: 22rem;
}

.settings-network-inline-input {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg0);
  color: var(--ink);
}

.settings-network-status {
  min-height: 1.25rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* —— Projects panel: create —— */
.projects-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.projects-panel-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

/* Home: live probe of local Diode HTTP /config (hub or workspace apps CLI) */
@keyframes diode-cli-status-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
  }

  50% {
    opacity: 0.55;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.45);
  }
}

.diode-cli-status-tooltip-wrap {
  flex-shrink: 0;
  align-self: center;
}

.diode-cli-status-tooltip-wrap .tooltip-popover {
  /* Near-instant show like other admin tooltips (avoid native title delay). */
  transition: opacity 0.06s ease, visibility 0.06s ease;
}

.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator {
  padding: 0;
  border: none;
  border-radius: 50%;
  min-width: 0.55rem;
  min-height: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  box-sizing: border-box;
  cursor: help;
  flex-shrink: 0;
  line-height: 0;
}

.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator:hover,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator:focus-visible {
  color: inherit;
  filter: brightness(1.1);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--ok:hover,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--ok:focus-visible {
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--down:hover,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--down:focus-visible {
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
}

.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--unknown:hover,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--unknown:focus-visible {
  background: #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

/* Grey states: gentle pulse while Diode is not ready yet (suggests transition toward green). */
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--down,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--unknown {
  animation: diode-cli-status-pulse 1.35s ease-in-out infinite;
}

.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--down:hover,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--down:focus-visible,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--unknown:hover,
.diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--unknown:focus-visible {
  animation-play-state: paused;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--down,
  .diode-cli-status-tooltip-wrap .tooltip-trigger.diode-cli-status-indicator.diode-cli-status-indicator--unknown {
    animation: none;
  }
}

.diode-cli-status-indicator {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #cbd5e1;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
  cursor: default;
}

.diode-cli-status-indicator--ok {
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.diode-cli-status-indicator--down {
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15);
}

.diode-cli-status-indicator--unknown {
  background: #cbd5e1;
}

.projects-panel-header h2 {
  margin-bottom: 0;
}

/* Theme-colored gear — workspace settings (admin / owner); index.html */
.projects-heading-settings {
  flex-shrink: 0;
  color: var(--highlight-color);
}

.projects-heading-settings:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.projects-heading-settings .material-icons {
  font-size: 1.45rem;
}

.projects-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.projects-toolbar-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
}

/* Material icon baseline vs. button cap height — keep gear optically centered */
.projects-toolbar-actions .header-settings-icon {
  line-height: 1;
  display: block;
}

/* Shared “configure vibe app” link (dropdown panel, modal, table) */
.connect-app-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  line-height: 1.35;
}

button.connect-app-link {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  line-height: 1.35;
}

.connect-app-link:hover,
button.connect-app-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* Create project: Nexus LLM pick under auto-generate checkbox */
.form-page .cp-nexus-llm-wrap {
  margin: 0.65rem 0 0;
  width: 100%;
}

.form-page .cp-nexus-llm-heading-block {
  margin: 0 0 0.5rem;
}

#cp-create-nexus-llm-tooltip-body .ws-agent-llm-team-override-row {
  margin: 0.5rem 0 0;
}

/* Create project: low balance warning when auto-generate is checked */
.form-page .cp-nexus-low-balance-warn {
  margin: 0.85rem 0 0;
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
}

.form-page .cp-nexus-low-balance-warn .ws-credit-banner__text {
  font-weight: 500;
  line-height: 1.45;
}

.form-page .cp-nexus-low-balance-modal-hint {
  margin: 0 0 0.35rem;
}

/* Create project — Nexus bootstrap modal: stop-in-progress overlay */
#cp-nexus-bootstrap-modal .gs-docker-ssh-test-modal-sheet {
  position: relative;
}

.cp-nexus-modal-stopping {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  border-radius: inherit;
  pointer-events: auto;
}

.cp-nexus-modal-stopping[hidden] {
  display: none !important;
}

.cp-nexus-modal-stopping-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  max-width: 22rem;
  padding: 0 1rem;
}

.cp-nexus-modal-stopping-title {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.cp-nexus-modal--stopping .modal-actions .btn {
  pointer-events: none;
  opacity: 0.55;
}

.cp-nexus-modal--stopping #cp-nexus-modal-stop {
  visibility: hidden;
}

.form-page .cp-nexus-low-balance-warn .ws-credit-banner__text a {
  font-weight: 600;
  margin-left: 0.35rem;
}

/* Create project: deployment type — bordered shell; same width cap as External Diode port (16rem). */
.create-project-deployment-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  margin-top: 0.45rem;
  width: 100%;
}

.create-project-deployment-select-wrap {
  display: flex;
  align-items: stretch;
  flex: 0 1 16rem;
  width: 100%;
  max-width: 16rem;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.create-project-deployment-select-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-page .field .create-project-deployment-select-wrap select.select-styled.create-project-deployment-select {
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.65rem 2.15rem 0.65rem 0.75rem;
  font-size: 1rem;
  line-height: 1.45;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 1.2rem;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.form-page .field .create-project-deployment-select-wrap select.select-styled.create-project-deployment-select:hover {
  border: none;
  box-shadow: none;
}

.form-page .field .create-project-deployment-select-wrap select.select-styled.create-project-deployment-select:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.create-project-deployment-more {
  flex: 0 0 auto;
  font-size: 0.875rem;
  white-space: nowrap;
  margin-bottom: 0.15rem;
}

/* Vibe /settings: “these Agent coding instructions” link + copy icon */
.vibe-agent-instructions-link-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  vertical-align: middle;
}

.vibe-agent-instructions-link-copy .btn-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

/* Vibe /settings: inline UUID + deploy token copy in “Verify it works” */
.vibe-verify-copy-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  vertical-align: middle;
  margin-left: 0.15rem;
}

.vibe-verify-copy-inline .btn-icon {
  flex-shrink: 0;
  vertical-align: middle;
}

.vibe-verify-copy-label {
  font-weight: 600;
  margin-right: 0.1rem;
}

.connect-app-link--header {
  flex-shrink: 0;
  margin-top: 0.08rem;
  text-align: right;
}

.connect-app-link--cell {
  display: inline-block;
  font-size: 0.82rem;
}

.cell-last-deployed-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.2rem;
  line-height: 1.25;
}

.cell-last-deployed-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
  max-width: 100%;
}

.cell-last-deployed-inner--timer-only {
  justify-content: flex-start;
}

.projects-table .cell-last-deployed-at--muted {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.projects-table .btn-deployment-status {
  flex-shrink: 0;
}

.projects-table .btn-last-deploy-failed {
  flex-shrink: 0;
  color: var(--danger, #b3261e);
  text-decoration: none;
}

.projects-table .btn-last-deploy-failed:hover,
.projects-table .btn-last-deploy-failed:focus-visible {
  color: var(--danger-hover, #8c1d18);
}

.modal-sheet--deployment-status {
  max-width: 40rem;
}

.pending-create-log-label {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.pending-create-log-pre {
  margin: 0;
  max-height: min(28rem, 55vh);
  overflow: auto;
  padding: 0.65rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--panel-subtle, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--line, #ccc);
  border-radius: var(--radius-sm, 4px);
}

.pending-create-log-err {
  color: var(--danger, #b91c1c);
  margin-top: 0.5rem;
}

.projects-table tr.project-row--creating button.btn-pending-create-log {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  width: auto;
  max-width: 100%;
}

.projects-table tr.project-row--creating button.btn-pending-create-log:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.modal-body-deployment-status {
  margin-top: 0.35rem;
}

.deployment-status-table-wrap {
  overflow-x: auto;
  margin-top: 0.65rem;
}

.deployment-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.deployment-status-table th,
.deployment-status-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.deployment-status-table th {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.deployment-status-table-detail {
  word-break: break-word;
  max-width: 24rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 1.4;
  max-height: calc(1.4em * 3);
}

.deployment-status-table-jobid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  white-space: nowrap;
}

.deployment-status-empty {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

button.deployment-job-id-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

button.deployment-job-id-btn:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.modal-sheet--deployment-job {
  max-width: 32rem;
  /* Flex column: scroll only the body so header + footer (Close) stay visible and aligned */
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 44rem);
  overflow: hidden;
  box-sizing: border-box;
}

.modal-sheet--deployment-job .modal-head {
  flex-shrink: 0;
}

.modal-sheet--deployment-job .modal-body--deployment-job {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.modal-sheet--deployment-job > .modal-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line, #e0e0e0);
}

.modal-body--deployment-job .deployment-job-detail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.modal-body--deployment-job .deployment-job-detail-dl dt {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 600;
}

.modal-body--deployment-job .deployment-job-detail-dl dd {
  margin: 0;
  word-break: break-word;
}

.deployment-job-detail-actions {
  margin-top: 0.75rem;
}

.deployment-job-detail-download-wrap {
  margin: 0.5rem 0 0;
}

.deployment-job-detail-container-note {
  margin-top: 0.5rem;
}

.deployment-job-revert-confirm-input {
  width: 100%;
  max-width: 16rem;
  margin-top: 0.35rem;
}

.deployment-job-revert-err {
  color: var(--danger, #b00020);
  margin-top: 0.5rem;
}

.modal-sheet--project-move {
  max-width: 28rem;
}

.modal-body--project-move .project-move-confirm-intro {
  margin: 0 0 0.5rem;
}

.modal-body--project-move .project-move-confirm-summary {
  margin: 0 0 0.75rem;
}

.modal-body--project-move .project-move-please-note-heading {
  margin: 0.75rem 0 0.35rem;
}

.modal-body--project-move .project-move-please-note-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  list-style: disc;
}

.modal-body--project-move select.select-styled.project-move-select {
  width: 100%;
  max-width: 100%;
}

.modal-actions--project-move-footer {
  margin-top: 1rem;
  justify-content: flex-end;
}

.project-move-checklist {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.9rem;
}

.project-move-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.35rem 0;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--panel-muted, rgba(0, 0, 0, 0.04));
}

.project-move-checklist-icon {
  flex-shrink: 0;
  width: 1.35rem;
  min-height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.06rem;
}

.project-move-checklist-icon-glyph {
  font-size: 1.15rem !important;
  width: 1.15rem !important;
  height: 1.15rem !important;
  color: var(--ok, #1b7f4c);
}

.project-move-checklist-icon-glyph--err {
  color: var(--danger, #b00020);
}

.project-move-checklist-icon-empty {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.project-move-checklist-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 2px solid color-mix(in srgb, var(--line, #e0e0e0) 85%, transparent);
  border-top-color: var(--highlight-color, #f15c2e);
  border-radius: 50%;
  animation: gs-diode-friendly-register-spin 0.75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .project-move-checklist-spinner {
    animation: none;
    border-color: color-mix(in srgb, var(--highlight-color, #f15c2e) 55%, var(--line, #e0e0e0));
  }
}

.project-move-checklist-label {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.project-move-checklist-item--failed .project-move-checklist-label {
  color: var(--danger, #b00020);
}

.project-move-success-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.75rem 0 0;
}

/* Primary <a class="btn"> in workspace shell — beat .gs-content a { color: highlight } (was invisible on accent fill). */
.gs-shell .gs-content a.btn.project-move-primary-btn,
.gs-shell .gs-content a.btn.project-move-primary-btn:visited {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.gs-shell .gs-content a.btn.project-move-primary-btn:hover,
.gs-shell .gs-content a.btn.project-move-primary-btn:focus-visible {
  color: #fff;
  text-decoration: none;
}

.project-move-authoritative-line {
  margin: 0.35rem 0 0.5rem;
}

.project-move-err {
  color: var(--danger, #b00020);
}

.edit-project-move-zone {
  margin-bottom: 1rem;
}

/* Long copy: keep hover bridge wide enough to reach the popover from the help icon. */
.edit-project-move-zone .project-move-info-tooltip {
  --tooltip-bridge-w: min(28rem, calc(100vw - 2rem));
}

.edit-project-move-zone .project-move-info-tooltip .tooltip-popover {
  max-width: min(28rem, calc(100vw - 2rem));
}

/* Project edit — compact Project URLs table (tighter than workspace Custom URLs; fits form column) */
#edit-project-form .field.field--full {
  min-width: 0;
}

/* Deployment type: match trailing rhythm of UUID / disclosure readouts (plain <p> sat tight on the grid gap). */
#edit-project-form .edit-project-deployment-type-summary {
  margin-bottom: 0.35rem;
}

#edit-project-form #panel-agent-coding .edit-project-agent-vibe-field select.select-styled {
  max-width: min(24rem, 100%);
}

/* Nexus LLM provider/model (create + edit): same width cap as Publish scope. */
#create-project-form .project-nexus-llm-field.field--control-match-scope select.select-styled,
#edit-project-form .project-nexus-llm-field.field--control-match-scope select.select-styled {
  width: 100%;
  max-width: 16rem;
  box-sizing: border-box;
}

#create-project-form .project-nexus-llm-fields,
#edit-project-form .project-nexus-llm-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 16rem));
  gap: 0.75rem 1rem;
  width: 100%;
  max-width: 100%;
}

#edit-nexus-llm-tooltip-body .ws-agent-llm-team-override-row {
  margin: 0.5rem 0 0;
}

/* Agent coding: lighter chrome + download above textarea (right-aligned) */
#edit-project-form #panel-agent-coding.field-editor-panel--agent-coding {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
}

#edit-project-form #panel-agent-coding .edit-project-agent-vibe-hint {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

.edit-project-agent-skills-lead {
  margin-top: 0.65rem;
  margin-bottom: 0.65rem;
}

.edit-project-agent-skills-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.edit-project-agent-skills-copy-wrap {
  min-width: 0;
}

.edit-project-agent-skills-download {
  font-weight: 500;
}

/* Cap at form column; clip long URLs (visible overflow caused page-level horizontal scroll). */
.edit-project-form-panel .edit-project-site-urls-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0.35rem 0 0;
  overflow-x: clip;
  box-sizing: border-box;
  min-width: 0;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-table {
  font-size: 0.75rem;
  table-layout: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-table thead th {
  padding: 0.22rem 0.3rem;
  font-size: 0.625rem;
  line-height: 1.2;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-table tbody td {
  padding: 0.22rem 0.3rem;
  vertical-align: top;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-cell--url {
  min-width: 0;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .edit-project-site-url-cell-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .edit-project-site-url-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* Match copy control height to URL line box (0.72rem × lh 1.3) so a single-line URL row
   doesn’t get extra blank space below the text from a taller 1.5rem button. */
.edit-project-form-panel .edit-project-site-urls-table-wrap .edit-project-site-url-cell-inner > .btn-icon {
  flex: 0 0 auto;
  align-self: flex-start;
  box-sizing: border-box;
  width: 1.35rem;
  height: calc(0.72rem * 1.3);
  min-width: 1.35rem;
  min-height: calc(0.72rem * 1.3);
  padding: 0;
  /* Neutralize .btn-icon margin: -0.35rem 0 (pulls the glyph low vs adjacent code). */
  margin: 0;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .edit-project-site-url-cell-inner > .btn-icon .material-icons {
  font-size: 0.75rem;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-cell--url .gs-https-url-text {
  font-size: 0.72rem;
  line-height: 1.3;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-cell--url .gs-https-url-text a.gs-edit-project-url-link {
  color: var(--accent);
  text-decoration: none;
  font: inherit;
}

.edit-project-form-panel .edit-project-site-urls-table-wrap .gs-friendly-hosts-cell--url .gs-https-url-text a.gs-edit-project-url-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.edit-project-panel-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin: 0;
  width: 100%;
}

/* Head must span both form columns or status only reaches mid-panel. */
@media (min-width: 768px) {
  .form-page .edit-project-panel-head {
    grid-column: 1 / -1;
  }
}

.edit-project-panel-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
  width: 100%;
}

.edit-project-name-field {
  margin-top: 0;
}

.edit-project-name-field--head {
  min-width: 0;
  margin-bottom: 0;
}

.edit-project-name-field label {
  font-weight: 600;
}

.edit-project-container-status-corner {
  justify-self: end;
  max-width: 100%;
  padding-top: 0.15rem;
}

.edit-project-container-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.45rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: right;
}

.edit-project-container-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.edit-project-container-status-dot--ok {
  background: #22c55e;
}

.edit-project-container-status-dot--muted {
  background: var(--ink-muted);
}

.edit-project-container-status-open {
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.35;
}

.edit-project-container-status-open:hover {
  color: var(--accent-hover, var(--accent));
  text-decoration: underline;
}

.edit-project-container-status-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.edit-project-container-status-line--suspended {
  opacity: 0.55;
}

.edit-project-container-status-open:disabled,
.edit-project-container-status-open[aria-disabled="true"] {
  opacity: 1;
  color: var(--ink-muted);
  cursor: not-allowed;
  text-decoration: none;
}

.edit-project-container-status-open:disabled:hover,
.edit-project-container-status-open[aria-disabled="true"]:hover {
  color: var(--ink-muted);
  text-decoration: none;
}

.edit-project-container-info--credit-suspended .edit-deployment-log-title {
  color: var(--ink-muted);
}

.edit-project-container-info-unavailable {
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  opacity: 0.92;
}

.edit-project-container-info-unavailable-msg {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.45;
}

.edit-container-status-modal-body {
  margin-bottom: 0.5rem;
}

.edit-project-container-stats-block {
  margin-top: 1rem;
}

.edit-container-modal-stats-block {
  margin-top: 0.85rem;
}

.edit-project-container-stats-heading {
  margin: 0 0 0.35rem;
}

.edit-project-container-stats-active {
  margin: 0;
}

.edit-project-container-stats-stopped-msg {
  margin: 0;
  max-width: 44rem;
}

.edit-project-container-logs-block {
  margin-top: 1rem;
}

.edit-project-container-logs-heading {
  margin: 0 0 0.35rem;
}

.edit-project-container-logs-block .edit-project-container-info-actions {
  margin-top: 0;
}

.edit-container-modal-test-result {
  margin: 0.45rem 0 0;
  max-width: 40rem;
}

.edit-project-ch-poll-meta {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.edit-project-ch-error-code {
  font-size: 0.85rem;
  word-break: break-word;
}

.edit-project-ch-lead {
  margin: 0 0 0.75rem;
}

.edit-container-status-modal-body .edit-project-ch-lead {
  margin-bottom: 0.3rem;
}

.edit-container-status-modal-body .edit-project-ch-last-deployed--modal-host-adjacent {
  margin: 0 0 0.75rem;
}

.edit-project-ch-dl {
  margin: 0;
  display: grid;
  gap: 0.45rem 1rem;
  max-width: 42rem;
}

.edit-project-ch-row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.edit-project-ch-row dt {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 500;
}

.edit-project-ch-row dd {
  margin: 0;
  word-break: break-word;
}

.edit-project-ch-err {
  cursor: help;
}

.edit-project-ch-error-detail {
  margin: 0 0 0.65rem;
}

.edit-project-ch-last-deployed {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.edit-project-ch-runtime-log {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.edit-container-status-modal-body .edit-project-ch-runtime-log {
  margin-top: 0.15rem;
}

/* Title row + close; poll meta on second row; bottom border is the modal “hr”. */
.modal-head.edit-container-status-modal-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.4rem;
}

.edit-container-status-modal-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.modal-head.edit-container-status-modal-head .edit-project-ch-poll-meta--modal-in-head {
  margin: 0;
}

.edit-container-status-modal-head-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex: 1;
  min-width: 0;
}

.edit-container-status-modal-head .edit-container-status-modal-title {
  margin: 0;
  flex: 0 1 auto;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.35rem;
  row-gap: 0.15rem;
}

.edit-container-status-modal-title-warn {
  margin-left: 0.1rem;
}

.edit-container-status-modal-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.edit-container-status-modal-head-actions .edit-container-control-loading.edit-project-container-info-inline-loading {
  margin: 0;
  min-height: 2rem;
}

.edit-container-status-modal-head-btn {
  margin-top: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.edit-container-control-feedback {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink-muted);
  min-height: 1.25em;
}

.edit-container-status-modal-body .edit-container-control-feedback:empty {
  min-height: 0;
  margin: 0;
}

.edit-container-control-feedback--err {
  color: var(--danger, #c62828);
}

/* Edit project — container deployment log (matches modal table; scrollable) */
.edit-project-deployment-log {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.edit-deployment-log-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.edit-deployment-log-heading-row .edit-deployment-log-title {
  margin: 0;
}

.edit-deployment-log-heading-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-left: auto;
}

.edit-deployment-log-upload-status {
  margin: 0;
  max-width: 14rem;
}

.edit-deployment-log-upload-status--err {
  color: var(--danger, #b00020);
}

/* Title + adjacent text link (e.g. Most recent deployment archive + Download) — keep link beside heading, not viewport edge */
.edit-deployment-log-title-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.55rem;
  row-gap: 0.25rem;
}

.edit-deployment-log-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.edit-deployment-log-lead {
  margin: 0 0 0.35rem;
  max-width: 44rem;
}

.edit-deployment-log-scroll {
  max-height: 18rem;
  margin-top: 0.5rem;
}

/* Edit project — activity log: scroll vertically only; clip wide rows (overflow-x: auto on .deployment-status-table-wrap bleeds to the page). */
.edit-project-deployment-log #edit-deployment-log-wrap.deployment-status-table-wrap {
  overflow-x: clip;
  overflow-y: auto;
  max-width: 100%;
}

.edit-project-deployment-log .deployment-status-table {
  table-layout: fixed;
  width: 100%;
}

.edit-project-deployment-log .deployment-status-table th,
.edit-project-deployment-log .deployment-status-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.edit-project-deployment-log .deployment-status-table-jobid {
  white-space: normal;
  word-break: break-all;
}

/* Sections below the form share the panel column — prevent min-content width from widening the page. */
.edit-project-form-panel {
  min-width: 0;
  max-width: 100%;
}

.edit-project-form-panel > .field--full {
  min-width: 0;
  max-width: 100%;
}

/* Edit project — deployment details (source tarball tree + file preview) */
.edit-project-deployment-details {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* Edit project — container information (workspace diode ssh to runtime client) */
.edit-project-container-info {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* Title + help icon inline (do not use space-between here — tooltips must stay next to the title). */
.edit-project-container-info-heading-row {
  margin-bottom: 0.5rem;
}

.edit-project-container-info-title-help,
.edit-project-diode-mounting-title-help {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.edit-project-container-info-title-help .edit-deployment-log-title,
.edit-project-diode-mounting-title-help .edit-deployment-log-title {
  margin-bottom: 0;
}

.edit-project-container-info-title-help .field-label-tooltip,
.edit-project-diode-mounting-title-help .field-label-tooltip {
  flex-shrink: 0;
}

.edit-project-container-info-test-row {
  margin: 0.35rem 0 0;
}

.edit-project-container-info-test-link {
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.88;
}

.edit-project-container-info-test-link:hover,
.edit-project-container-info-test-link:focus-visible {
  opacity: 1;
}

.edit-project-container-info-test-link--busy,
.edit-project-container-info-test-link--blocked {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

.edit-project-container-info-test-result {
  margin: 0.5rem 0 0;
  max-width: 40rem;
}

.edit-project-container-info-inline-loading,
.edit-project-container-info-logs-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-muted, #5f6368);
}

.edit-project-container-info-inline-loading[hidden],
.edit-project-container-info-logs-loading[hidden] {
  display: none !important;
}

.edit-project-container-info-inline-loading {
  margin: 0 0 0.45rem;
}


.edit-project-container-info-logs-loading {
  margin: 0.5rem 0 0.35rem;
}

.edit-project-container-info-spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1.5px solid color-mix(in srgb, var(--line, #e0e0e0) 85%, transparent);
  border-top-color: var(--highlight-color, #f15c2e);
  border-radius: 50%;
  animation: gs-diode-friendly-register-spin 0.75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .edit-project-container-info-spinner {
    animation: none;
    border-color: color-mix(in srgb, var(--highlight-color, #f15c2e) 55%, var(--line, #e0e0e0));
  }
}

.edit-project-container-info-summary {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  line-height: 1.45;
  min-height: 1.25em;
}

.edit-project-container-info-summary--ok {
  color: var(--ok-text, #1b5e20);
}

.edit-project-container-info-summary--err {
  color: var(--danger, #b00020);
}

.edit-project-container-info-summary--pending {
  color: var(--ink-muted, #5f6368);
}

.edit-project-container-info-stats {
  display: grid;
  grid-template-columns: minmax(5rem, 7.5rem) 1fr;
  gap: 0.4rem 0.75rem;
  margin: 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  line-height: 1.4;
  background: var(--surface-raised, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--line);
  border-radius: 6px;
  box-sizing: border-box;
}

.edit-project-container-info-stats:empty {
  display: none;
}

.edit-project-container-info-stats dt {
  margin: 0;
  font-weight: 600;
  color: var(--ink-muted, #5f6368);
}

.edit-project-container-info-stats dd {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}

.edit-project-container-info-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.65rem 0 0;
}

.edit-project-container-info-pre {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface-raised, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
}

.edit-project-container-info-pre--logs {
  max-height: 22rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.edit-project-container-info-logs-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin: 0.35rem 0 0.35rem;
  max-width: min(100%, 42rem);
}

.edit-project-container-info-logs-toolbar[hidden] {
  display: none !important;
}

.edit-project-container-info-logs-search-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted, #5f6368);
}

.edit-project-container-info-logs-search {
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 22rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.35;
  border: 1px solid var(--line, #dadce0);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--ink, #202124);
  box-sizing: border-box;
}

.edit-project-container-info-logs-search:focus {
  outline: 2px solid color-mix(in srgb, var(--highlight-color, #f15c2e) 45%, transparent);
  outline-offset: 1px;
}

.edit-project-container-info-logs-search-status {
  font-size: 0.78rem;
  color: var(--ink-muted, #5f6368);
  white-space: nowrap;
}

/* Same spinner animation as Global / Workspace “Apply friendly name” (globalsettings.css). */
@keyframes gs-diode-friendly-register-spin {
  to {
    transform: rotate(360deg);
  }
}

.edit-project-workspace-client-starting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0.65rem 0 0;
  max-width: min(100%, 42rem);
}

/* `display: flex` beats the UA [hidden] rule; keep waiting row off when JS sets hidden. */
#edit-project-workspace-client-waiting[hidden],
.edit-project-workspace-client-starting[hidden] {
  display: none !important;
}

.edit-project-workspace-client-starting-progress.gs-diode-friendly-register-progress {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
}

.edit-project-workspace-client-starting .gs-diode-friendly-register-spinner {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 1.5px solid color-mix(in srgb, var(--line, #e0e0e0) 85%, transparent);
  border-top-color: var(--highlight-color, #f15c2e);
  border-radius: 50%;
  animation: gs-diode-friendly-register-spin 0.75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .edit-project-workspace-client-starting .gs-diode-friendly-register-spinner {
    animation: none;
    border-color: color-mix(in srgb, var(--highlight-color, #f15c2e) 55%, var(--line, #e0e0e0));
  }
}

.edit-project-workspace-client-starting-msg {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  color: var(--ink-muted, #5f6368);
}

.edit-project-tarball-actions {
  margin: 0.35rem 0 0;
}

/* Edit project — Diode mounting (same top rule as deployment archive / container info) */
.edit-project-diode-mounting {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.edit-project-diode-mounting-runtime,
.edit-project-diode-mounting-command {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  font-size: 0.95rem;
}

.edit-project-diode-mounting-runtime {
  margin: 0.5rem 0 0;
}

.edit-project-diode-mounting-runtime-label {
  font-weight: 400;
  color: var(--gs-text-muted, inherit);
}

.edit-project-diode-mounting-runtime-code {
  word-break: break-all;
}

.edit-project-diode-mounting-runtime-missing {
  margin: 0;
}

.edit-project-diode-mounting-command {
  margin-top: 0.65rem;
}

.edit-project-diode-mounting-lead {
  margin-top: 0.35rem;
}

.edit-project-diode-mounting-cache-meta {
  margin: 0;
  font-size: 0.9rem;
}


.edit-project-diode-mounting-command .edit-project-diode-commands-text {
  /* Match runtime <code class="inline-code">: same padding/border via .inline-code; no extra line-height or focus ring. */
  margin: 0;
  width: 100%;
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 18rem;
  overflow-y: auto;
  overflow-x: hidden;
  tab-size: 4;
  line-height: normal;
}

.edit-project-diode-mounting-refresh-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}

.edit-project-diode-mounting-refresh-row .edit-project-diode-commands-refresh-status {
  margin: 0;
}

/* Diode command block: same <code class="inline-code"> chip as runtime ID; block + pre-wrap for multiline. */
.edit-project-diode-commands-text {
  display: block;
  box-sizing: border-box;
}

.edit-project-diode-commands-text--empty::before {
  content: "No command cached yet.";
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--font-display, ui-sans-serif, system-ui, sans-serif);
  white-space: normal;
}

.edit-project-tarball-panel {
  margin-top: 0.35rem;
}

.edit-project-tarball-file-list {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0 0.35rem 1.25rem;
  max-height: 14rem;
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink);
}

.edit-project-tarball-file-list a {
  word-break: break-all;
}

.edit-project-tarball-preview-err {
  color: var(--danger, #b00020);
}

.edit-project-tarball-preview-actions {
  justify-content: flex-start;
  width: 100%;
}

.edit-project-tarball-preview-actions [data-edit-tarball-preview-dismiss='1'] {
  margin-left: auto;
}

.modal-connect-hint {
  margin: 0 0 0.25rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.btn-create-project {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 0.55rem 1.15rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

a.btn-create-project {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-create-project:hover {
  background: var(--accent-hover);
}

.btn-create-project:active {
  transform: scale(0.98);
}

/* —— Create project modal —— */
body.modal-open {
  overflow: hidden;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 600000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.modal-root[hidden] {
  display: none !important;
}

.modal-root.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: min(90vh, 36rem);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  padding: 1.35rem 1.5rem 1.5rem;
  outline: none;
}

.modal-sheet.pending-create-log-modal-sheet {
  width: 75%;
  max-width: 75vw;
  max-height: min(88vh, 44rem);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
}

.modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.35rem -0.35rem 0 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: var(--bg1);
  color: var(--ink);
}

.modal-form .field input[type="text"],
.modal-form .field input[type="number"],
.modal-form .field select,
.modal-form .field textarea {
  max-width: none;
}

.modal-form .field textarea {
  width: 100%;
  min-height: 3.25rem;
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.modal-actions .btn {
  margin-top: 0;
}

.btn-secondary {
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--bg1);
  color: var(--ink);
  border-color: var(--ink-muted);
}

.btn-danger {
  margin-top: 0.35rem;
  background: transparent;
  color: #5c2018;
  border: 1px solid var(--err-border);
}

.btn-danger:hover {
  background: var(--err-bg);
  color: #5c2018;
  border-color: #5c2018;
}

.btn-secondary.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary.btn-with-icon .material-icons {
  font-size: 1.15rem;
  line-height: 1;
}

.btn-danger.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-danger.btn-with-icon .material-icons {
  font-size: 1.15rem;
  line-height: 1;
}

.btn-icon.btn-icon--destructive:hover {
  background: var(--err-bg);
  color: #5c2018;
}

.btn-icon.btn-icon--destructive:focus-visible {
  outline-color: #5c2018;
}

.edit-danger-zone {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.modal-sheet .feedback {
  margin-top: 1rem;
}

.field-readonly {
  margin-bottom: 0.25rem;
}

.field-label-static {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.field-readonly-value {
  margin: 0;
  font-size: 0.95rem;
  word-break: break-all;
}

.field-readonly-value code {
  font-size: 0.85rem;
}

.field-hint {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.field-hint.field-hint--with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.65rem;
}

/* —— Connect MCP page —— */
.back-nav {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.back-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.back-nav a:hover {
  text-decoration: underline;
}

.header--sub {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
}

.connect-panel .connect-h2 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.connect-h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.25rem 0 0.65rem;
  color: var(--ink-muted);
}

.connect-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--ink-muted);
}

.connect-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.connect-steps li {
  margin-bottom: 0.35rem;
}

.connect-steps--tight > li {
  margin-bottom: 1rem;
}

.connect-steps--tight > li:last-child {
  margin-bottom: 0;
}

.connect-substeps {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
  list-style: disc;
  color: var(--ink-muted);
}

.connect-substeps li {
  margin-bottom: 0.25rem;
}

.connect-steps--mcp {
  margin-top: 0.5rem;
}

.connect-mcp-config {
  margin-top: 0.25rem;
}

.connect-mcp-disclaimer {
  margin-bottom: 0.35rem;
}

.connect-mcp-json-block {
  margin-top: 0.75rem;
}

.connect-panel kbd {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  padding: 0.08em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg1);
  color: var(--ink);
}

.connect-step-json {
  margin-bottom: 0.85rem;
}

.connect-step-json .connect-json-lead {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

.connect-step-json .copy-block {
  margin-bottom: 0.65rem;
}

.connect-step-json .connect-json-follow {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.inline-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  background: var(--bg1);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.connect-note {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.connect-foot {
  margin-bottom: 0;
}

.connect-warn {
  border-color: var(--err-border);
  background: linear-gradient(180deg, var(--err-bg) 0%, var(--card) 100%);
}

.connect-warn .connect-h2 {
  color: #5c2018;
}

.connect-picker .vibe-app-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.vibe-app-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.vibe-app-select {
  width: 100%;
  max-width: 28rem;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.vibe-app-select:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
  border-color: var(--accent);
}

.copy-block {
  margin-bottom: 1rem;
}

.copy-block:last-child {
  margin-bottom: 0;
}

.copy-block > .copy-block-hint {
  margin-top: 0.35rem;
}

.copy-block-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.copy-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.copy-label-with-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}

/* Large copy fields: icon sits inside the bordered box (top-right) */
.copy-area-wrap {
  position: relative;
}

.copy-area-wrap .copy-area,
.copy-area-wrap .deploy-token-reveal {
  padding-right: 2.75rem;
}

/* Later `textarea.copy-area.copy-area-json` sets padding shorthand; keep room for overlay copy. */
.copy-area-wrap textarea.copy-area.copy-area-json {
  padding-right: 2.75rem;
}

.copy-area-wrap .btn-icon {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  margin: 0;
  background: color-mix(in srgb, var(--bg0) 94%, transparent);
}

.copy-area-wrap .btn-icon:hover,
.copy-area-wrap .btn-icon:focus-visible {
  background: var(--accent-soft);
}

/* Match standalone .btn-icon:disabled feedback (faded / grey) after copy — do not keep frosted bg */
.copy-area-wrap .btn-icon:disabled,
.copy-area-wrap .btn-icon:disabled:hover {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
  color: var(--ink-muted);
}

.copy-area {
  display: block;
  width: 100%;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg0);
  color: var(--ink);
  resize: vertical;
  box-sizing: border-box;
  /* Short copy fields (URLs, site base): vertically balance one line inside min-height */
  --copy-area-min-h: 2.75rem;
  min-height: var(--copy-area-min-h);
}

/* Multiline CLI / JSON: keep normal padding and top-aligned text */
textarea.copy-area.copy-area-cli,
textarea.copy-area.copy-area-json {
  padding: 0.65rem 0.75rem;
}

textarea.copy-area:not(.copy-area-cli):not(.copy-area-json) {
  padding-inline: 0.75rem;
  padding-block: max(0.65rem, calc((var(--copy-area-min-h) - 1lh) / 2));
}

.copy-area-sm {
  --copy-area-min-h: 2.25rem;
  min-height: var(--copy-area-min-h);
}

.copy-area-json {
  min-height: 8rem;
}

.copy-area-cli {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 2.5rem;
}

textarea.copy-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Site shell + top bar (shared with global settings via _site_header.html / _site_footer.html). */
.gs-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  margin: 0;
}

/* Global settings + workspace settings: fixed header/footer; sidebar + main band fills the middle; only main scrolls. */
.gs-shell--globalsettings,
.gs-shell--workspace-settings {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.gs-shell--globalsettings .ws-credit-banner,
.gs-shell--workspace-settings .ws-credit-banner {
  flex-shrink: 0;
}

.gs-shell--globalsettings .gs-layout,
.gs-shell--workspace-settings .gs-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.gs-shell--globalsettings .gs-sidebar,
.gs-shell--workspace-settings .gs-sidebar {
  align-self: stretch;
  min-height: 0;
}

.gs-shell--globalsettings .gs-content,
.gs-shell--workspace-settings .gs-content {
  min-height: 0;
}

.gs-shell > .page {
  flex: 1 0 auto;
  padding-bottom: 2.5rem;
}

/* Sidebar + main content (global settings, workspace settings, workspace home without sidebar). */
.gs-layout {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.gs-sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 16px 0;
  flex-shrink: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.gs-sidebar-heading {
  padding: 8px 20px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f6368;
}

.gs-nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #5f6368;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}

.gs-nav-item:hover {
  background: #f8f9fa;
  color: #202124;
}

.gs-nav-item.active {
  background: #fef6f3;
  color: var(--highlight-color);
  border-left-color: var(--highlight-color);
  font-weight: 500;
}

.gs-nav-item .material-icons {
  font-size: 20px;
  margin-right: 12px;
  color: inherit;
  flex-shrink: 0;
}

.gs-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 28px 32px 40px;
  box-sizing: border-box;
  /* Reserve inline-end gutter when a vertical scrollbar appears (avoids layout shift). */
  scrollbar-gutter: stable;
}

/* Workspace home + settings: clip accidental horizontal bleed from tables/URLs (footer sits outside .gs-content). */
.gs-shell--workspace-home .gs-content,
.gs-shell--workspace-settings .gs-content {
  overflow-x: clip;
}

.gs-content .panel {
  max-width: none;
  width: 100%;
}

.gs-content > .header.header--sub {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 52rem) {
  .gs-shell--workspace-settings .gs-layout,
  .gs-shell--globalsettings .gs-layout {
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .gs-shell--workspace-settings .gs-sidebar,
  .gs-shell--globalsettings .gs-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    padding: 12px 0;
    flex-shrink: 0;
  }

  .gs-shell--workspace-settings .gs-sidebar .gs-nav-item,
  .gs-shell--globalsettings .gs-nav-item {
    padding: 10px 16px;
    flex: 1 1 auto;
    min-width: 10rem;
  }

  .gs-shell--workspace-settings .gs-content,
  .gs-shell--globalsettings .gs-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

.gs-shell .admin-footer {
  background: #f5f5f5;
  margin-top: 0;
  flex-shrink: 0;
}

.gs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.gs-topbar-brand {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.gs-topbar-brand img {
  max-height: 28px;
  max-width: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  align-self: center;
  transform: translateY(var(--gs-header-brand-img-offset-y, 0px));
}

.gs-topbar-lockup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  min-width: 0;
  line-height: 1.2;
}

/* Topbar lockup: match .gs-nav-item sidebar labels (e.g. “General”) — 14px body stack */
.gs-topbar-subtitle,
.gs-topbar-page-title {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-muted);
}

.gs-topbar-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 22rem);
}

.gs-topbar-page-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(36vw, 16rem);
}

.gs-topbar-sep {
  font-size: 14px;
  color: #bdc1c6;
  font-weight: 400;
  user-select: none;
  line-height: 1;
  flex-shrink: 0;
}

@media (max-width: 42rem) {
  .gs-topbar-subtitle,
  .gs-topbar-sep {
    display: none;
  }
}

.gs-topbar-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.deploy-version-mark {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink, #202124);
  line-height: 1.3;
}

.gs-topbar-links > a {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  align-self: center;
}

/* Workspace picker: custom combobox (link-like trigger + anchored panel) */
.site-hdr-ws-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(18rem, 42vw);
  position: relative;
}

.gs-topbar-links .site-hdr-ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--highlight-color, #f15c2e);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}

.gs-topbar-links .site-hdr-ws-btn-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.gs-topbar-links .site-hdr-ws-btn-chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-top: 0.12rem;
  border-left: 0.28rem solid transparent;
  border-right: 0.28rem solid transparent;
  border-top: 0.38rem solid currentColor;
}

.gs-topbar-links .site-hdr-ws-btn:hover {
  color: var(--accent-hover, color-mix(in srgb, var(--highlight-color, #f15c2e) 78%, #000000));
}

.gs-topbar-links .site-hdr-ws-btn:focus-visible {
  outline: 2px solid var(--highlight-color, #f15c2e);
  outline-offset: 2px;
}

.gs-topbar-links .site-hdr-ws-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.gs-topbar-links .site-hdr-ws-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: max(100%, 12rem);
  max-width: min(24rem, 92vw);
  overflow: hidden;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Our `display: flex` beats UA `[hidden]` in some browsers — force closed state. */
.gs-topbar-links .site-hdr-ws-pop[hidden] {
  display: none !important;
}

.gs-topbar-links .site-hdr-ws-search-row {
  flex-shrink: 0;
  padding: 8px;
  border-bottom: 1px solid #e8eaed;
}

.gs-topbar-links .site-hdr-ws-search {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
}

.gs-topbar-links .site-hdr-ws-search:focus {
  outline: 2px solid var(--highlight-color, #f15c2e);
  outline-offset: 0;
}

.gs-topbar-links .site-hdr-ws-list {
  padding: 4px 0;
  overflow-y: visible;
  max-height: none;
}

.gs-topbar-links .site-hdr-ws-wrap--scroll .site-hdr-ws-list {
  max-height: 22rem;
  overflow-y: auto;
}

.gs-topbar-links .site-hdr-ws-option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--ink, #202124);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.gs-topbar-links .site-hdr-ws-option:hover,
.gs-topbar-links .site-hdr-ws-option:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.gs-topbar-links .site-hdr-ws-option--current {
  font-weight: 600;
}

/* `display: block` above beats UA `[hidden]` — force filtered-out rows off. */
.gs-topbar-links .site-hdr-ws-option[hidden] {
  display: none !important;
}

.gs-topbar-links .site-hdr-ws-add {
  display: block;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 10px 14px;
  border-top: 1px solid #e8eaed;
  color: var(--highlight-color, #f15c2e);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}

.gs-topbar-links .site-hdr-ws-add:hover {
  background: var(--accent-soft);
}

.gs-topbar-links .site-hdr-ws-add:focus-visible {
  background: var(--accent-soft);
  outline: 2px solid var(--highlight-color, #f15c2e);
  outline-offset: 2px;
}

/* Workspace home — project list filter (same visual language as workspace switcher) */
.projects-filter-wrap {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: min(14rem, 46vw);
  position: relative;
  flex-shrink: 0;
  align-self: center;
}

.projects-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--highlight-color, #f15c2e);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}

.projects-filter-btn-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.projects-filter-btn-chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-top: 0.12rem;
  border-left: 0.28rem solid transparent;
  border-right: 0.28rem solid transparent;
  border-top: 0.38rem solid currentColor;
}

.projects-filter-btn:hover {
  color: var(--accent-hover, color-mix(in srgb, var(--highlight-color, #f15c2e) 78%, #000000));
}

.projects-filter-btn:focus-visible {
  outline: 2px solid var(--highlight-color, #f15c2e);
  outline-offset: 2px;
}

.projects-filter-pop {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: max(100%, 10.5rem);
  max-width: min(20rem, 92vw);
  overflow: hidden;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.projects-filter-pop[hidden] {
  display: none !important;
}

.projects-filter-list {
  padding: 4px 0;
}

.projects-filter-option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--ink, #202124);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.projects-filter-option:hover,
.projects-filter-option:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.projects-filter-option--current {
  font-weight: 600;
}

.site-hdr-text-link {
  color: #1967d2;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.site-hdr-text-link:hover {
  text-decoration: underline;
}

.gs-topbar-profile {
  margin: 0;
}

/* Profile (/profile) — avatar, display name, workspaces */
.profile-panel {
  margin-bottom: 1.25rem;
}

.profile-section-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.profile-avatar-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.profile-avatar-frame {
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg1);
  border: 1px solid var(--line);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: center;
  padding: 8px;
  line-height: 1.3;
}

.profile-avatar-actions .profile-hint,
.profile-avatar-actions .profile-feedback {
  margin-top: 8px;
  margin-bottom: 0;
}

/* Profile avatar upload + crop (CropperJS), aligned with llm-pipeline-demo pattern */
.profile-avatar-upload-modal {
  display: none;
  position: fixed;
  z-index: 700000;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
}
.profile-avatar-upload-modal.is-open {
  display: flex;
}
.profile-avatar-upload-modal__sheet {
  background: var(--surface, #fff);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}
.profile-avatar-upload-modal__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.profile-avatar-upload-modal__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.profile-avatar-upload-modal__close {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.5rem;
  line-height: 1;
}
.profile-avatar-upload-modal__close:hover {
  background: var(--bg1);
}
.profile-avatar-upload-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.profile-avatar-upload-modal__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
}
.profile-avatar-upload-modal__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.profile-avatar-upload-modal__help {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
.profile-avatar-upload-modal__crop-hint {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
  display: none;
}
.profile-avatar-upload-modal__crop-hint.is-visible {
  display: block;
}
.profile-avatar-upload-modal__crop-wrap {
  margin-top: 12px;
  max-width: 100%;
  max-height: min(500px, 55vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg1);
}

/* Circular crop preview (CropperJS keeps a square region; we mask UI to a circle). */
.profile-avatar-upload-modal__crop-wrap.profile-avatar-cropper-wrap--circular .cropper-crop-box {
  border-radius: 50%;
  border: none !important;
}
.profile-avatar-upload-modal__crop-wrap.profile-avatar-cropper-wrap--circular .cropper-view-box {
  border-radius: 50%;
  outline: none !important;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 0 0 4px var(--highlight-color, #f15c2e);
}
.profile-avatar-upload-modal__crop-wrap.profile-avatar-cropper-wrap--circular .cropper-face {
  border-radius: 50%;
}
.profile-avatar-upload-modal__crop-wrap.profile-avatar-cropper-wrap--circular .cropper-point {
  opacity: 0.95;
}

.profile-avatar-upload-modal__msg {
  margin-top: 12px;
  font-size: 0.8125rem;
  min-height: 1.25em;
}

.profile-unpaid-workspace-modal .profile-avatar-upload-modal__sheet {
  max-width: 26rem;
}
.profile-unpaid-workspace-modal__body {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink, #202124);
}
.profile-unpaid-workspace-modal__actions {
  justify-content: flex-end;
  margin-top: 0;
}
.cropper-container .cropper-view-box {
  outline-color: rgba(0, 0, 0, 0.12);
}

.profile-sub-code {
  display: block;
  word-break: break-all;
  font-size: 0.875rem;
  margin-top: 6px;
}

.profile-ws-current {
  color: var(--accent);
  font-weight: 600;
}

.profile-ws-id {
  font-size: 0.8125rem;
}

.profile-ws-table .profile-ws-actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}

.profile-ws-table .profile-ws-leave--blocked {
  opacity: 0.38;
  cursor: not-allowed;
  border-color: transparent;
  color: var(--ink-muted);
}

.profile-name-form label,
.profile-new-ws-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.profile-name-row,
.profile-new-ws-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.profile-new-ws-row--vibe .select-styled {
  flex: 1 1 18rem;
  max-width: 28rem;
  min-width: 12rem;
}

.profile-name-input {
  flex: 1 1 14rem;
  max-width: 28rem;
  padding: 8px 10px;
  border: 1px solid #dadce0;
  border-radius: var(--radius-sm);
  font: inherit;
}

/* Match display name field: global .select-styled uses width:100% which would span the whole row */
.profile-name-form .profile-name-row > .select-styled {
  flex: 1 1 14rem;
  max-width: 28rem;
  width: auto;
  min-width: 0;
}

/* Watermark-style placeholder (Add workspace / workspace new) */
.profile-new-ws-form .profile-name-input::placeholder {
  color: var(--ink-muted);
  opacity: 0.5;
}

.gs-shell--workspace-new .workspace-new-form .field input[type="text"]::placeholder,
.gs-shell--workspace-new .workspace-new-form .field input[type="email"]::placeholder {
  color: var(--ink-muted);
  opacity: 0.5;
}

.gs-shell--workspace-new .workspace-new-form .field .select-styled {
  width: 100%;
  max-width: 28rem;
}

.profile-name-form .profile-feedback,
.profile-new-ws-form .profile-feedback {
  margin-top: 8px;
  margin-bottom: 0;
}

.profile-footer-links {
  margin-top: 1.5rem;
}

/* Login: wordmark is in the card only — hide duplicate header bar */
.gs-shell--login .gs-topbar {
  display: none;
}

/* Login: centered card */
.gs-shell--login .login-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Footer: “Protected by” uses fixed Diode wordmark at /assets/diode-orange.png (not tenant brand). */
.admin-footer {
  margin-top: 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 1rem;
  border-top: 1px solid var(--line);
}
.admin-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1.25rem;
  max-width: 100%;
  margin: 0;
  padding: 0 32px;
  box-sizing: border-box;
}
.admin-footer-beta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  align-self: center;
}
.admin-footer-main {
  flex: 1 1 16rem;
  text-align: center;
  min-width: 0;
}
.admin-footer-powered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.admin-footer-diode-logo {
  height: 14px;
  width: auto;
  vertical-align: middle;
  display: inline-block;
}
.admin-footer-legal {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
.admin-footer-legal a {
  color: #1967d2;
  text-decoration: none;
}
.admin-footer-legal a:hover {
  text-decoration: underline;
}

/* Narrow: less inset on main column; projects home stays edge-to-edge (see .deploy-admin-home). */
@media (max-width: 42rem) {
  .gs-content {
    padding-top: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    /* Don’t reserve scrollbar gutter on one side — avoids a persistent “padding” strip on the right */
    scrollbar-gutter: auto;
  }

  .admin-footer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .deploy-admin-home .gs-content {
    padding-left: 0;
    padding-right: 0;
  }

  .page {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 520px) {
  .page {
    padding-bottom: 3rem;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .gs-shell > .page {
    padding-bottom: 1.5rem;
  }

  .projects-panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-toolbar {
    align-items: stretch;
    width: 100%;
  }

  .projects-toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .connect-app-link--header {
    text-align: left;
    width: 100%;
  }

  .projects-toolbar-actions .btn-create-project {
    flex: 1;
    min-width: 0;
  }
}

/* One-time notice after “Create project and copy instructions” (sessionStorage → home) */
.home-project-created-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 20px;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  background: #e8f5e9;
  color: #1b5e20;
}

.home-project-created-banner__row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem 0.65rem;
}

.home-project-created-banner__text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.home-project-created-banner__text strong {
  font-weight: 600;
}

.home-project-created-banner__dismiss {
  flex-shrink: 0;
  margin: 0;
  color: inherit;
  opacity: 0.75;
}

.home-project-created-banner__dismiss:hover,
.home-project-created-banner__dismiss:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.home-project-created-banner__dismiss .material-icons {
  font-size: 1.25rem;
}

/* Low / depleted workspace credit (owner & admin; multi-workspace) */
.ws-credit-banner {
  margin: 0;
  --ws-credit-banner-pad-v: 0.65rem;
  /* Match `.gs-topbar` horizontal padding so banner copy lines up with the masthead on every workspace page. */
  --ws-credit-banner-pad-h: 20px;
  padding: var(--ws-credit-banner-pad-v) var(--ws-credit-banner-pad-h);
  border-bottom: 1px solid var(--line, #e8eaed);
}

.ws-credit-banner__inner {
  /* Full width under the topbar — same inset as header; avoids a separate 1200px column that shifts with scrollbar/breakpoints. */
  max-width: none;
  width: 100%;
  margin: 0;
}

.ws-credit-banner__row--dismissible {
  display: flex;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.ws-credit-banner__row--dismissible .ws-credit-banner__text {
  flex: 1;
  min-width: 0;
}

.ws-credit-banner__dismiss {
  flex-shrink: 0;
  /* Neutralize .btn-icon margin:-0.35rem 0 so the glyph sits on the banner’s vertical center. */
  margin: 0;
  color: inherit;
  opacity: 0.75;
}

.ws-credit-banner__dismiss:hover,
.ws-credit-banner__dismiss:focus-visible {
  opacity: 1;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.ws-credit-banner--low .ws-credit-banner__dismiss .material-icons {
  font-size: 1.25rem;
}

.ws-credit-banner__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ws-credit-banner__text a {
  font-weight: 600;
  text-underline-offset: 0.12em;
}

.ws-credit-banner--critical {
  background: #fce8e6;
  color: #9e1f16;
  border-color: #f5c4be;
}

/* Workspace suspended for billing — stronger than low-balance warning */
.ws-credit-banner--suspended {
  background: #a50e0e;
  color: #fff;
  border-color: #7a0b0b;
}

.ws-credit-banner--suspended .ws-credit-banner__text a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ws-credit-banner--suspended .ws-credit-banner__text a:hover,
.ws-credit-banner--suspended .ws-credit-banner__text a:focus-visible {
  color: #ffe8e6;
}

.ws-credit-banner--critical .ws-credit-banner__text a {
  color: var(--highlight-color, #f15c2e);
}

.ws-credit-banner--low {
  background: #fef7e0;
  color: #8a5700;
  border-color: #fdd663;
}

.ws-credit-banner--low .ws-credit-banner__text a {
  color: #b45309;
}

.ws-credit-banner--critical .ws-credit-banner__text a:hover,
.ws-credit-banner--critical .ws-credit-banner__text a:focus-visible,
.ws-credit-banner--low .ws-credit-banner__text a:hover,
.ws-credit-banner--low .ws-credit-banner__text a:focus-visible {
  text-decoration: underline;
}
