/* Generated by api/scripts/build_static_css_bundle.py. Do not edit directly. */


:root[data-font-style="Inter"] {
    --font-sans: Inter, system-ui, sans-serif;
}

:root[data-font-style="Poppins"] {
    --font-sans: Poppins, system-ui, sans-serif;
}

:root[data-font-style="Nunito"] {
    --font-sans: Nunito, system-ui, sans-serif;
}

:root[data-font-style="Futura"] {
    --font-sans: Futura, system-ui, sans-serif;
}

:root[data-font-style="SF Pro"] {
    --font-sans: "SF Pro", system-ui, sans-serif;
}

:root[data-font-style="Roboto"] {
    --font-sans: Roboto, system-ui, sans-serif;
}

:root[data-font-style="Quicksand"] {
    --font-sans: Quicksand, system-ui, sans-serif;
}

:root[data-font-style="Merriweather"] {
    --font-sans: Merriweather, Georgia, serif;
}

:root[data-font-style="Righteous"] {
    --font-sans: Righteous, system-ui, sans-serif;
}

:root[data-font-style="Press Start 2P"] {
    --font-sans: "Press Start 2P", monospace;
}

:root[data-font-style="Jetbrains Mono"] {
    --font-sans: "JetBrains Mono", monospace;
}

@font-face {
    font-family: "Inter";
    src: url("/static/fonts/Inter-VariableFont.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("/static/fonts/Poppins-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("/static/fonts/Poppins-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Nunito";
    src: url("/static/fonts/Nunito-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Nunito";
    src: url("/static/fonts/Nunito-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("/static/fonts/Futura-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Futura";
    src: url("/static/fonts/Futura-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro";
    src: url("/static/fonts/SFPro-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "SF Pro";
    src: url("/static/fonts/SFPro-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Roboto";
    src: url("/static/fonts/Roboto-VariableFont.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Quicksand";
    src: url("/static/fonts/Quicksand-VariableFont.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: "Merriweather";
    src: url("/static/fonts/Merriweather-VariableFont.woff2") format("woff2");
    font-weight: 300 900;
    font-display: swap;
}

@font-face {
    font-family: "Righteous";
    src: url("/static/fonts/Righteous-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Press Start 2P";
    src: url("/static/fonts/PressStart2P-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}


@font-face {
    font-family: "JetBrains Mono";
    src: url("/static/fonts/JetBrainsMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("/static/fonts/JetBrainsMono-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

:root {
  --bg-page: #17111b;
  --bg-page-alt: #0b1526;
  --bg-surface: rgba(12, 20, 35, 1);
  --bg-surface-strong: rgba(10, 17, 30, 0.94);
  --bg-surface-hover: rgba(20, 30, 48, 0.92);
  --bg-surface-hover-alt: rgba(28, 40, 62, 0.95);
  --tinted: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(15, 23, 42, 0.75);
  --bg-input-strong: rgba(15, 23, 42, 0.82);
  --bg-overlay: rgba(4, 10, 18, 0.9);
  --bg-overlay-soft: rgba(4, 10, 18, 0.75);
  --bg-tab-active: rgba(15, 23, 42, 0.38);
  --bg-sidetab-active: rgba(25, 25, 50, 0.65);
  --bg-hover-subtle: rgba(148, 163, 184, 0.06);
  --bg-hover-subtle-strong: rgba(148, 163, 184, 0.08);
  --bg-dropdown-item-hover: rgba(35, 50, 75, 0.65);
  --bg-add-tab: rgba(15, 23, 42, 0.8);
  --bg-settings-title: rgba(20, 30, 48, 0.9);
  --bg-danger: rgba(127, 29, 29, 0.92);
  --bg-danger-hover: rgba(153, 27, 27, 0.96);
  --bg-danger-soft: rgba(220, 38, 38, 0.18);
  --bg-danger-soft-hover: rgba(220, 38, 38, 0.26);
  --bg-disabled: rgba(148, 163, 184, 0.12);

  --text-primary: #eaf2ff;
  --text-secondary: #97a8c2;
  --text-label: #dbe7f7;
  --text-placeholder: #8196b4;
  --text-on-accent: #ffffff;
  --text-badge: #cfe3ff;
  --text-settings-title: #dceafe;
  --text-danger: #fecaca;
  --text-danger-soft: #fca5a5;
  --text-icon: #cbd5f5;

  --border-muted: rgba(148, 163, 184, 0.18);
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-faint: rgba(148, 163, 184, 0.1);
  --border-soft: rgba(148, 163, 184, 0.08);
  --border-input-focus: rgba(96, 165, 250, 0.55);
  --border-accent: rgba(96, 165, 250, 0.28);
  --border-accent-strong: rgba(96, 165, 250, 0.9);
  --border-success: rgba(34, 197, 94, 0.35);
  --border-danger: rgba(239, 68, 68, 0.35);
  --border-danger-strong: rgba(239, 68, 68, 0.4);
  --border-danger-soft: rgba(220, 38, 38, 0.4);
  --border-badge: rgba(148, 163, 184, 0.22);

  --shadow: 0 22px 60px rgba(0, 0, 50, 0.35);
  --shadow-sm: 0 4px 20px rgba(0, 0, 50, 0.35);
  --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-focus: 0 0 0 4px rgba(96, 165, 250, 0.14);

  --scrollbar-thumb: rgba(40, 60, 90, 0.55);
  --scrollbar-thumb-hover: rgba(55, 80, 120, 0.65);
  --scrollbar-track: rgba(12, 20, 35, 0.9);

  --accent: #60a5fa;
  --discord-link-icon-color: #e0e3ff;

  --action-approve: #16a34a;
  --action-pending: #2563eb;
  --action-deny: #f59e0b;
  --action-suspend: #dc2626;
  --action-reactivate: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;

  --panel-radius: 10px;
  --panel-radius-xs: 0px;
  --panel-radius-sm: 8px;
  --panel-radius-lg: 14px;

  --button-radius: 10px;
  --button-radius-xs: 4px;
  --button-radius-sm: 8px;
  --button-radius-lg: 14px;

  --font-sans: Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

:root[data-panel-style="square"] {
  --panel-radius: 0px;
  --panel-radius-xs: 0px;
  --panel-radius-sm: 0px;
  --panel-radius-lg: 0px;
}

:root[data-panel-style="sharp"] {
  --panel-radius: 6px;
  --panel-radius-xs: 0px;
  --panel-radius-sm: 4px;
  --panel-radius-lg: 8px;
}

:root[data-panel-style="soft"] {
  --panel-radius: 18px;
  --panel-radius-xs: 5px;
  --panel-radius-sm: 16px;
  --panel-radius-lg: 20px;
}

:root[data-panel-style="round"] {
  --panel-radius: 22px;
  --panel-radius-xs: 10px;
  --panel-radius-sm: 20px;
  --panel-radius-lg: 24px;
}

:root[data-button-style="square"] {
  --button-radius: 0px;
  --button-radius-xs: 0px;
  --button-radius-sm: 0px;
  --button-radius-lg: 0px;
}

:root[data-button-style="sharp"] {
  --button-radius: 6px;
  --button-radius-xs: 0px;
  --button-radius-sm: 4px;
  --button-radius-lg: 8px;
}

:root[data-button-style="soft"] {
  --button-radius: 18px;
  --button-radius-xs: 8px;
  --button-radius-sm: 16px;
  --button-radius-lg: 20px;
}

:root[data-button-style="round"] {
  --button-radius: 22px;
  --button-radius-xs: 12px;
  --button-radius-sm: 20px;
  --button-radius-lg: 24px;
}


* {
  box-sizing: border-box;
  min-width: 0;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 12%, transparent), transparent 24%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 12%, transparent), transparent 22%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page-alt) 45%, var(--bg-page) 100%);
}

html {
  scrollbar-gutter: stable;
}

body {
  height: 100%;
  padding: clamp(10px, 1.4vw, 24px) clamp(8px, 1.2vw, 18px) 100px;
  overflow-x: hidden;
}

label {
  margin-bottom: 7px;
  font-size: clamp(0.74rem, 0.85vw, 0.86rem);
  font-weight: 700;
  color: var(--text-label);
}

a,
a:visited {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 65%, transparent);
  text-underline-offset: 0.16em;
}

a:hover,
a:focus-visible {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border-radius: var(--panel-radius);
  font-size: clamp(0.82rem, 0.94vw, 0.94rem);
  font-family: var(--font-sans);
}

.select-fit-content {
  width: auto;
  min-width: fit-content;
  max-width: 100%;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  padding: 12px 13px;
  border: 1px solid var(--border-muted);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-input-focus);
  box-shadow: var(--shadow-focus);
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}


.app-shell {
  position: fixed;
  inset: 8px;
  height: auto;
  margin: 0;
}

.settings-card,
.card,
.tab-pane,
.title-block,
.stack,
.stack-gap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 100%;
  gap: 12px;
}

.settings-card,
.card {
  flex: 0 0 auto;
  padding: 8px;
  box-shadow: var(--accent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 16px;
  overflow: hidden;
  height: auto;
}

.tab-pane {
  flex: 1 1 auto;
}


.tab-pane-scroll,
.scroll-y {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.tab-pane-scroll {
  flex: 0 0 var(--scroll-size, auto);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 0;
  padding-bottom: 10px;
}


.detail-layout {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 10px;
  flex-wrap: wrap;
}

.section-grid {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
}

.cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.title-block {
  gap: 4px;
  min-width: 0;
}

.stack,
.stack-gap {
  gap: 12px;
}

.actions-row,
.action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-row {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  position: sticky;
  bottom: 0;
}


.card,
.modal-card,
.settings-card {
  border: 1px solid var(--border-muted);
  border-radius: var(--panel-radius);
  color: var(--text-primary);
  max-width: 97.5%;
}

.card {
  background: var(--bg-page);
  border-color: var(--border-accent);
}

.settings-card {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

.modal-card {
  background: color-mix(in srgb, var(--bg-surface) 100%, transparent);
  box-shadow: var(--shadow);
}

.workflow-tree-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 320px;
  min-height: 180px;
  padding: 28px;
  border: 1px dashed var(--border-muted);
  border-radius: var(--panel-radius);
  background: var(--tinted);
  color: var(--text-secondary);
  text-align: center;
}


/* Button primitives */

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  width: auto;
  padding: 12px 14px;
  border: 1px solid var(--border-muted);
  border-radius: var(--button-radius);
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-sans);
  font-size: clamp(0.82rem, 0.94vw, 0.94rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.9;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    filter 0.14s ease,
    opacity 0.14s ease,
    transform 0.14s ease,
    box-shadow 0.14s ease;
}

button:hover {
  filter: brightness(.9);
}

button:disabled,
button.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
  filter: grayscale(0.2);
}

button:disabled:hover,
button.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover-subtle);
  border-color: var(--border-accent);
  filter: none;
}

.btn-clear {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-clear:hover {
  background: var(--bg-hover-subtle);
  border-color: var(--border-accent);
  color: var(--text-primary);
  filter: none;
}

.btn-dashed {
  background: transparent;
  border: 1px dashed var(--border-muted);
  color: var(--text-secondary);
  border-radius: 6px;
}

.btn-dashed:hover {
  background: var(--bg-hover-subtle);
  border-color: var(--border-accent);
  color: var(--text-primary);
  filter: none;
}

.btn-danger {
  background: var(--bg-danger);
  border-color: var(--border-danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: var(--bg-danger-hover);
  filter: none;
}

.btn-icon,
.settings-gear,
.settings-gear-inline,
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.btn-icon {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--accent);
}

.btn-icon:hover {
  background: var(--bg-hover-subtle);
  border-color: var(--border-accent);
  filter: none;
}

.settings-gear,
.settings-gear-inline,
.modal-close {
  border: none !important;
}

.settings-gear {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 26px !important;
  height: 26px !important;
  margin: 0 !important;
  z-index: 2;
  color: var(--text-primary);
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/gear.svg') no-repeat center;
  mask: url('/static/images/svgs/gear.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.pencil-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/pencil.svg') no-repeat center;
  mask: url('/static/images/svgs/pencil.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.play-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/play.svg') no-repeat center;
  mask: url('/static/images/svgs/play.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.trash-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: var(--accent);
  -webkit-mask: url('/static/images/svgs/trash.svg') no-repeat center;
  mask: url('/static/images/svgs/trash.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

button.trash-icon:disabled,
button.trash-icon.is-disabled {
  background-color: var(--muted);
  border-color: var(--border-subtle);
  opacity: 0.45;
  filter: none;
}

.refresh-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/refresh.svg') no-repeat center;
  mask: url('/static/images/svgs/refresh.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.folder-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/folder.svg') no-repeat center;
  mask: url('/static/images/svgs/folder.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.clear-icon {
  width: 16px !important;
  height: 16px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/clear.svg') no-repeat center;
  mask: url('/static/images/svgs/clear.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.stop-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/stop.svg') no-repeat center;
  mask: url('/static/images/svgs/stop.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.expand-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/expand.svg') no-repeat center;
  mask: url('/static/images/svgs/expand.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.minimize-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/minimize.svg') no-repeat center;
  mask: url('/static/images/svgs/minimize.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.search-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/search.svg') no-repeat center;
  mask: url('/static/images/svgs/search.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.fit-screen-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/fit-screen.svg') no-repeat center;
  mask: url('/static/images/svgs/fit-screen.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.chat-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/chat.svg') no-repeat center;
  mask: url('/static/images/svgs/chat.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.graph-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/graph.svg') no-repeat center;
  mask: url('/static/images/svgs/graph.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.save-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('/static/images/svgs/save.svg') no-repeat center;
  mask: url('/static/images/svgs/save.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.pdf-icon,
.document-icon,
.spreadsheet-icon,
.code-icon,
.markdown-icon,
.web-file-icon,
.data-file-icon,
.text-file-icon,
.generic-file-icon {
  width: 14px !important;
  height: 14px !important;
  display: inline-block;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: middle;
}

.pdf-icon {
  -webkit-mask-image: url('/static/images/svgs/file-pdf.svg');
  mask-image: url('/static/images/svgs/file-pdf.svg');
}

.document-icon {
  -webkit-mask-image: url('/static/images/svgs/file-document.svg');
  mask-image: url('/static/images/svgs/file-document.svg');
}

.spreadsheet-icon {
  -webkit-mask-image: url('/static/images/svgs/file-spreadsheet.svg');
  mask-image: url('/static/images/svgs/file-spreadsheet.svg');
}

.code-icon {
  -webkit-mask-image: url('/static/images/svgs/file-code.svg');
  mask-image: url('/static/images/svgs/file-code.svg');
}

.markdown-icon {
  -webkit-mask-image: url('/static/images/svgs/file-markdown.svg');
  mask-image: url('/static/images/svgs/file-markdown.svg');
}

.web-file-icon {
  -webkit-mask-image: url('/static/images/svgs/file-web.svg');
  mask-image: url('/static/images/svgs/file-web.svg');
}

.data-file-icon {
  -webkit-mask-image: url('/static/images/svgs/file-data.svg');
  mask-image: url('/static/images/svgs/file-data.svg');
}

.text-file-icon {
  -webkit-mask-image: url('/static/images/svgs/file-text.svg');
  mask-image: url('/static/images/svgs/file-text.svg');
}

.generic-file-icon {
  -webkit-mask-image: url('/static/images/svgs/file-generic.svg');
  mask-image: url('/static/images/svgs/file-generic.svg');
}

button.pencil-icon,
button.play-icon,
button.trash-icon,
button.refresh-icon,
button.clear-icon,
button.stop-icon,
button.expand-icon,
button.minimize-icon,
button.folder-icon,
button.save-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-btn-size, 28px) !important;
  min-width: var(--icon-btn-size, 28px) !important;
  max-width: var(--icon-btn-size, 28px) !important;
  height: var(--icon-btn-size, 28px) !important;
  padding: 0;
  line-height: 0;
  overflow: visible;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

.settings-gear-inline {
  position: static;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  flex: 0 0 auto;
  color: var(--accent);
}

.settings-gear svg {
  width: 26px;
  height: 26px;
  fill: var(--text-icon);
}

.settings-gear:hover svg {
  fill: var(--text-on-accent);
}

.modal-close {
  width: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}

.modal-close:hover {
  background: var(--bg-hover-subtle-strong);
  color: var(--text-primary);
  filter: none;
}

#buttonStyleSelector {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}

.button-style-btn {
  width: 56px;
  min-width: 56px;
  height: 24px;
  padding: 0;
  filter: brightness(.8);
}

.button-style-btn[data-button-style="square"] {
  border-radius: 0;
}

.button-style-btn[data-button-style="sharp"] {
  border-radius: 6px;
}

.button-style-btn[data-button-style=""] {
  border-radius: 10px;
}

.button-style-btn[data-button-style="soft"] {
  border-radius: 18px;
}

.button-style-btn[data-button-style="round"] {
  border-radius: 22px;
}

.button-style-btn.active {
  filter: brightness(1.1);
  box-shadow: 0 0 0 1px var(--accent);
}



.danger-text-title{
  color: var(--danger) !important;
  font-weight: 500 !important;
  font-family: "system-ui" !important;
  font-size: 2.25rem;
}

.danger-text-warning{
  color: var(--text-primary) !important;
  font-weight: 400 !important;
  font-family: "system-ui" !important;
}

.delete-inner{
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 20px 100px 20px;
}

.delete-warning-block {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border-danger);
  background: color-mix(in srgb, var(--bg-danger) 26%, transparent);
  text-align: center;
}

.delete-warning-block .danger-text-title,
.delete-warning-block .danger-text-warning {
  margin: 0;
}

.delete-confirm-copy {
  display: grid;
  gap: 6px;
}

.delete-confirm-title {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
  overflow-y: auto;
}

.form-field {
  padding: 10px;
  gap: 8px;
}

.form-field > label {
  display: block;
  margin-bottom: 8px;
}

.form-field-full {
  grid-column: 1 / -1;
  padding: 8px;
}

.form-field textarea {
  min-height: 92px;
}

.settings-title {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-faint);
  background: var(--bg-settings-title);
  color: var(--text-primary);
  font-weight: 800;
}

.settings-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-faint);
  background: var(--bg-settings-title);
  border-radius: inherit inherit 0 0;
}

.settings-card-header .settings-title {
  padding: 0;
  border-bottom: none;
  background: transparent;
}

.settings-card-body {
  min-width: 0;
  padding: 12px 14px 14px;
  gap: 14px;
}

.settings-card > .settings-title,
.settings-card > .settings-card-header {
  margin: -8px -8px 0;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.llmlab-orgtag {
  display: inline-block;
  width: var(--llmlab-orgtag-size, 22px);
  height: var(--llmlab-orgtag-size, 22px);
  flex: 0 0 auto;
  background: url("/static/images/llmlab-orgtag.png") center / contain no-repeat;
  vertical-align: middle;
}

.community-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--button-radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.community-action-button:hover,
.community-action-button:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  outline: none;
  text-decoration: none;
}

.community-action-button:focus-visible {
  box-shadow: var(--shadow), var(--shadow-focus);
}

.discord-link {
  color: var(--discord-link-icon-color);
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 72%, var(--border-muted));
}

.discord-link:hover,
.discord-link:focus-visible {
  color: var(--discord-link-icon-color);
}

.discord-link-icon {
  display: block;
  width: 21px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("/static/images/external_logos/discord_logo.svg") center / contain no-repeat;
  mask: url("/static/images/external_logos/discord_logo.svg") center / contain no-repeat;
}

.llmlab-logo {
  display: block;
  width: var(--llmlab-logo-width, 72px);
  height: var(--llmlab-logo-height, 48px);
  flex: 0 0 auto;
  background: var(--llmlab-logo-background, linear-gradient(135deg, var(--accent), var(--text-primary)));
  -webkit-mask: url('/static/images/logo.svg') no-repeat center;
  mask: url('/static/images/logo.svg') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.community-action-star {
  border: 1px solid var(--border-muted);
  background: color-mix(in srgb, var(--bg-surface-strong) 92%, transparent 8%);
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.community-action-star:hover,
.community-action-star:focus-visible {
  color: var(--text-primary);
}

.community-action-star.is-selected {
  color: #facc15;
}

.community-action-star.is-selected:hover,
.community-action-star.is-selected:focus-visible {
  color: #facc15;
}

.community-action-star-icon {
  display: block;
  transform: translateY(-1px);
  line-height: 1;
}

/**************************** TABS ******************************/

.tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-muted);


  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);

  flex: 0 0 auto;
}


.tabs::-webkit-scrollbar {
  height: 6px;
}


.tab {
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  align-self: center;

  padding: 10px 16px;
  margin: 0;

  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  box-shadow: none;
  border-radius: 0 !important;

  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;

  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}


.tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover-subtle);
}

.tab:focus {
  outline: none;
}

.tab:focus-visible {
  color: var(--text-primary);
  background: var(--bg-hover-subtle-strong);
}

.tab.active {
  color: var(--text-primary);
  background: var(--bg-tab-active);
  border-bottom-color: var(--border-accent-strong);
}

.tab.active:hover {
  background: var(--bg-tab-active);
}

.tabs-scrollable-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tabs-scroller {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-muted);
}


/**** SIDETABS ****/

.sidetabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0px 0;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-surface-strong);
}

.sidetabs-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
}

.sidetab {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 14px 18px;
  margin: 0;
  text-align: left;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 !important;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease, border-color 0.14s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidetab:hover {
  color: var(--text-primary);
  background: var(--bg-hover-subtle);
}

.sidetab.active {
  color: var(--text-primary);
  background: var(--bg-tab-active);
  border-left-color: var(--border-accent-strong);
}

.sidetab-label {
  display: inline;
}

.sidetab-short {
  display: none;
}





/******************************** SYMBOLS *******************/

.caret {
  display: inline-block;
  color: var(--muted);
  font-size: 0.78rem;
  flex: 0 0 auto;
}


.caret-asc {
  transform: rotate(180deg);
}

.idle {
  opacity: 0.25;
}


/***************************** CHECKBOXES *************************/
.checkbox-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.checkbox-row {
  display: inline-flex !important;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  align-self: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 0;
  max-width: 520px;
  text-align: left;
}

:is(.checkbox-row, .permission-row, .kb-permission-option, .wf-node-kb-row) input[type="checkbox"],
.rules-router-enable-checkbox {
  appearance: none;
  -webkit-appearance: none;

  width: 14px;
  height: 14px;

  margin: 0;
  padding: 0;

  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);

  display: inline-grid;
  place-content: center;

  flex: 0 0 auto;
  box-shadow: 0 2px 3px var(--accent);
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

:is(.checkbox-row, .permission-row, .kb-permission-option, .wf-node-kb-row) input[type="checkbox"]::before,
.rules-router-enable-checkbox::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: scale(0);
  border-radius: 999px;
}

:is(.checkbox-row, .permission-row, .kb-permission-option, .wf-node-kb-row) input[type="checkbox"]:checked::before,
.rules-router-enable-checkbox:checked::before {
  transform: scale(1);
}

:is(.checkbox-row, .permission-row, .kb-permission-option, .wf-node-kb-row) input[type="checkbox"]:hover,
.rules-router-enable-checkbox:hover {
  filter: none;
  border-color: var(--border-accent);
  background: var(--bg-hover-subtle);
  box-shadow: 0 0 0 1px var(--border-accent), 0 2px 3px var(--accent);
}

:is(.checkbox-row, .permission-row, .kb-permission-option, .wf-node-kb-row) input[type="checkbox"]:disabled,
.rules-router-enable-checkbox:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}

.checkbox-row > span:not(.info-tag) {
  display: block;
  flex: 1 1 auto;
  white-space: normal;
}

.checkbox-row-full {
  width: 100%;
  max-width: none;
}

.checkbox-row-center {
  justify-content: center;
  text-align: center;
}

.checkbox-row-center > span:not(.info-tag) {
  text-align: center;
}

.settings-row.settings-row-stack,
.settings-row-stack {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.settings-table {
  display: grid;
}

.settings-row {
  display: grid;
  grid-template-columns: 220px 180px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--border-soft);
}

.settings-row:first-child {
  border-top: none;
}

.settings-label {
  color: var(--text-secondary);
  font-weight: 700;
}

.settings-help {
  color: var(--text-placeholder);
  font-size: 0.84rem;
}

.settings-row-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}


.settings-control-block,
.settings-control-fill,
.settings-control-fill > label,
.settings-control-fill > input,
.settings-control-fill > select {
  width: 100%;
  min-width: 0;
}

.field-row-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  min-width: 0;
}

.field-inline,
.field-inline-compact {
  display: inline-grid;
  align-items: center;
  justify-content: start;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
}

.field-inline {
  grid-template-columns: max-content max-content;
  gap: 10px;
}

.field-inline-compact {
  grid-template-columns: max-content auto;
  gap: 8px;
}

.field-inline-form {
  display: inline-grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.field-inline-form .field-label {
  margin: 0;
  white-space: nowrap;
}

.field-inline-form .field-control {
  width: var(--field-control-width, clamp(150px, 20vw, 260px));
  min-width: 0;
}

.field-inline-form.field-inline-form-wide .field-control {
  width: var(--field-control-width, clamp(220px, 28vw, 420px));
}

.field-inline-form.field-inline-form-full {
  grid-template-columns: max-content minmax(0, 1fr);
  width: 100%;
  flex: 1 1 100%;
}

.field-inline-form.field-inline-form-full .field-control {
  width: 100%;
}

.field-label {
  display: flex;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  min-width: 0;
  align-items: center !important;
}

.field-inline .field-label {
  white-space: normal;
}

.field-inline-compact .field-label {
  white-space: nowrap;
}

.field-control {
  min-width: 0;
}

.settings-label-caps {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.mode-toggle-btn {
  min-width: 48px;
  padding: 4px 9px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

.mode-toggle-btn:hover {
  background: var(--bg-hover-subtle);
  border-color: var(--border-accent);
  color: var(--text-primary);
  filter: none;
}

.mode-toggle-btn.is-active {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, var(--border-muted));
  color: var(--text-on-accent);
}

.mode-toggle-btn.is-active:hover {
  background: var(--accent);
  color: var(--text-on-accent);
}

.mode-toggle-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.settings-help-compact {
  font-size: 0.8rem;
  line-height: 1.35;
}

.settings-help-relaxed {
  line-height: 1.45;
}

.meta-card {
  min-width: 0;
  padding: 14px 16px;
  border-radius: var(--panel-radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-strong);
}

.meta-value {
  margin-top: 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.permission-check-row {
  display: grid;
  grid-template-columns: minmax(170px, 28%) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
}

.permission-check-label {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: center;
  min-width: 0;
  padding: 2px 0;
}

.permission-check-label-text {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
}

.permission-check-description {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: normal;
}

.permission-check-panel {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  min-width: 0;
}

.permission-check-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 220px;
  overflow-x: auto;
  overflow-y: auto;
  padding: 2px 8px 6px 4px;
  scroll-padding-inline: 4px;
  box-sizing: border-box;
}

.permission-check-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, minmax(28px, auto));
  grid-auto-columns: minmax(180px, 1fr);
  gap: 8px 14px;
  width: max-content;
  min-width: 100%;
  padding-inline: 1px 0;
  box-sizing: border-box;
  align-content: start;
}

.permission-check-empty {
  color: var(--text-secondary);
  font-size: 0.68rem;
  line-height: 1.3;
}

.permission-check-grid :is(.checkbox-row, .permission-row) {
  display: inline-grid !important;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding-right: 2px;
}

.permission-check-grid :is(.checkbox-row, .permission-row) input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.permission-check-grid :is(.checkbox-row, .permission-row) input[type="checkbox"]::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.permission-check-grid :is(.checkbox-row, .permission-row) input[type="checkbox"]:disabled {
  opacity: 0.65;
}

.permission-check-grid :is(.checkbox-row, .permission-row) span {
  font-size: 0.7rem;
  line-height: 1.2;
  min-width: 0;
  white-space: nowrap;
}


.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  z-index: 5;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(760px, 94vw);
  max-height: calc(100dvh - 24px);
  padding: 18px;
  overflow: hidden;
}

.modal-card-full {
  width: 87vw;
  height: 87vh;
  max-width: 750px;
  max-height: none;
  min-height: 0;
}

.modal-title {
  margin-bottom: 14px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

.modal-header,
.modal-header h1,
.modal-header h2,
.modal-header h3 {
  color: var(--text-primary);
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}


.hidden {
  display: none !important;
}

.right-align {
  display: flex;
  justify-content: flex-end;
}

.min-w-0 {
  min-width: 0;
}

.subtle {
  color: var(--text-secondary);
}

.detail-title {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-description {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.8;
}

.ellipsis {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animated-ellipsis-label {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.animated-ellipsis-suffix {
  display: inline-block;
  width: 3ch;
  text-align: left;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 8px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.info-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: help;
  box-shadow: none;
}

.warning-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 38%, var(--border-subtle));
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger, #dc2626) 9%, var(--bg-surface));
  color: color-mix(in srgb, var(--danger, #dc2626) 78%, var(--text-primary));
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: help;
  box-shadow: none;
}

.info-tag::before {
  content: "?";
}

.warning-tag::before {
  content: "!";
}

.info-tag:hover,
.info-tag:focus,
.info-tag.is-open {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--bg-hover-subtle);
  filter: none;
}

.warning-tag:hover,
.warning-tag:focus,
.warning-tag.is-open {
  color: color-mix(in srgb, var(--danger, #dc2626) 85%, var(--text-primary));
  border-color: color-mix(in srgb, var(--danger, #dc2626) 55%, var(--border-accent));
  background: color-mix(in srgb, var(--danger, #dc2626) 15%, var(--bg-hover-subtle));
  filter: none;
}

.info-tag::after,
.warning-tag::after {
  content: attr(data-info);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 28%, var(--border-subtle));
  border-radius: var(--panel-radius-xs);
  background: var(--bg-surface-strong);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.info-tag::after {
  border: 1px solid var(--border-subtle);
}

.warning-tag::after {
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 28%, var(--border-subtle));
}

.info-tag:hover::after,
.info-tag:focus::after,
.info-tag.is-open::after {
  opacity: 1;
}

.warning-tag:hover::after,
.warning-tag:focus::after,
.warning-tag.is-open::after {
  opacity: 1;
}

.info-tag[data-tooltip-placement="bottom"]::after,
.warning-tag[data-tooltip-placement="bottom"]::after {
  top: calc(100% + 8px);
  bottom: auto;
}

.info-tag[data-tooltip-side="left"]::after,
.warning-tag[data-tooltip-side="left"]::after {
  left: auto;
  right: 0;
  transform: none;
}

.info-tag[data-tooltip-side="right"]::after,
.warning-tag[data-tooltip-side="right"]::after {
  left: 0;
  right: auto;
  transform: none;
}

.info-tag-tooltip-measure,
.warning-tag-tooltip-measure {
  position: fixed;
  top: 0;
  left: -9999px;
  width: max-content;
  max-width: 260px;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--panel-radius-xs);
  background: var(--bg-surface-strong);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  visibility: hidden;
  pointer-events: none;
}

.info-tag-tooltip-measure {
  border: 1px solid var(--border-subtle);
}

.warning-tag-tooltip-measure {
  border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 28%, var(--border-subtle));
}

.name-reveal-trigger {
  position: relative;
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  vertical-align: bottom;
  cursor: help;
}

.name-reveal-trigger > .name-reveal-text {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-reveal-trigger:focus-visible {
  border-radius: 3px;
  outline: 1px solid var(--border-accent);
  outline-offset: 2px;
}

.name-reveal-trigger::after {
  content: attr(data-info);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-xs);
  background: var(--bg-surface-strong);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.name-reveal-trigger:hover::after,
.name-reveal-trigger:focus::after,
.name-reveal-trigger.is-open::after {
  opacity: 1;
}

.name-reveal-trigger[data-tooltip-placement="bottom"]::after {
  top: calc(100% + 8px);
  bottom: auto;
}

.name-reveal-trigger[data-tooltip-side="left"]::after {
  left: auto;
  right: 0;
  transform: none;
}

.name-reveal-trigger[data-tooltip-side="right"]::after {
  left: 0;
  right: auto;
  transform: none;
}

.name-reveal-tooltip-measure {
  position: fixed;
  top: 0;
  left: -9999px;
  width: max-content;
  max-width: 280px;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--panel-radius-xs);
  background: var(--bg-surface-strong);
  color: var(--text-primary);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  visibility: hidden;
  pointer-events: none;
}


.auth-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

html[data-suppress-auth-overlay="oauth-callback"] .auth-overlay {
    display: none;
}

.auth-card {
    width: min(420px, 92vw);
    padding: 28px;
    border-radius: var(--panel-radius);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    text-align: center;
    gap: 20px;
}

.auth-card h2 {
    margin-top: 0;
    color: var(--text-primary);
}

.auth-card p {
    margin: 0;
}


.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid var(--border-muted);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.llmlab-notification-modal {
    z-index: 10000;
}

.llmlab-notification-card {
    width: min(560px, 92vw);
}

.llmlab-notification-eyebrow {
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.llmlab-notification-title {
    margin: 0;
}

.llmlab-notification-body {
    line-height: 1.55;
    white-space: pre-line;
}

.llmlab-notification-body p {
    margin: 0;
}

.llmlab-notification-checkbox {
    padding-block: 4px;
    overflow: visible;
    align-items: flex-end;
    gap: 10px;
    margin-top: 16px;
    font-weight: 600;
}

.llmlab-notification-checkbox input {
    margin-top: 3px;
}


.llmlab-input-prompt-card {
    width: min(560px, 92vw);
}

.llmlab-input-prompt-fields {
    gap: 12px;
}

.llmlab-input-prompt-field {
    gap: 6px;
}

.llmlab-input-prompt-label {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.llmlab-input-prompt-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    color: var(--text-primary);
    font: inherit;
}

.llmlab-input-prompt-input:focus {
    border-color: var(--border-accent);
    box-shadow: none;
    outline: none;
}

.llmlab-input-prompt-error {
    color: var(--text-danger, #c53b2c);
    font-size: 0.8rem;
    line-height: 1.4;
}


.llmlab-dek-recovery-card {
    width: min(640px, 94vw);
}

.llmlab-dek-recovery-options {
    margin-top: 16px;
}

.llmlab-dek-recovery-options .llmlab-notification-checkbox {
    margin-top: 0;
    padding-block: 0;
}

.llmlab-dek-recovery-input-label {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.llmlab-dek-recovery-input {
    min-height: 132px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    font-family: var(--font-mono, monospace);
}

.llmlab-dek-recovery-input:focus {
    border-color: var(--border-accent);
    box-shadow: none;
}

.llmlab-dek-recovery-alternate-note {
    padding: 12px 14px;
    border: 1px solid var(--border-danger);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-danger-soft);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-line;
}


.llmlab-dek-secrets-card {
    width: min(640px, 94vw);
}

.llmlab-dek-secrets-note {
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-line;
}

.llmlab-dek-secret-label {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.llmlab-dek-secrets-value {
    min-height: 96px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    font-family: var(--font-mono, monospace);
}

.llmlab-dek-secrets-value-phrase {
    min-height: 118px;
}

.llmlab-dek-secrets-body #llmlabDekSecretsTrustRow {
    width: 100%;
    max-width: none;
    justify-content: flex-end;
}


.billing-stripe-modal {
  width: min(560px, calc(100vw - 32px));
}

.billing-stripe-modal-header {
  align-items: flex-start;
}

.billing-stripe-modal-body {
  gap: 14px;
}

.billing-stripe-note {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-sm);
  background: var(--bg-surface);
  font-size: 0.8rem;
  line-height: 1.45;
}

.billing-stripe-loading,
.billing-stripe-error {
  padding: 12px;
  border-radius: var(--panel-radius-sm);
  font-size: 0.82rem;
}

.billing-stripe-loading {
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.billing-stripe-error {
  border: 1px solid color-mix(in srgb, var(--red, #dc2626) 65%, transparent);
  background: color-mix(in srgb, var(--red, #dc2626) 12%, transparent);
  color: var(--text-primary);
}

.billing-stripe-form {
  display: grid;
  gap: 14px;
}

.billing-stripe-form-shell {
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-sm);
  background: var(--bg-surface);
}

.billing-stripe-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


.dropdown {
    width: max-content;
    max-width: 220px;
    max-height: 200px;
    padding: 6px;

    display: grid;
    gap: 4px;
    align-items: stretch;

    border-radius: var(--panel-radius-lg);
    border: 1px solid var(--border-muted);
    background: color-mix(in srgb, var(--bg-surface) 100%, transparent);
    box-shadow: var(--shadow-dropdown);
    z-index: 15;
    overflow: auto;
}

.dropdown-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

     height: 34px;
    padding: 0 12px;
    width: fit-content;
    max-width: 200px;

    border-radius: var(--panel-radius-lg);
    border: 1px solid var(--border-muted);
    background: var(--bg-input-strong);
    color: var(--text-primary);
    box-shadow: none;
}

.dropdown-button-label {
    flex: 1 1 auto;
    display: block;
    text-align: left;
}

.dropdown-button:hover {
    background: var(--bg-surface-hover-alt);
}

.dropdown.down {
    top: calc(100% + 6px);
    bottom: auto;
}

.dropdown.up {
    bottom: calc(100% + 6px);
    top: auto;
}

.dropdown.right {
    left: 0;
    right: auto;
}

.dropdown.left {
    right: 0;
    left: auto;
}

.dropdown-item {
    width: max-content;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 15;

    padding: 10px 12px;
    border: 0;
    border-radius: var(--panel-radius);

    opacity: 0.9;
    color: var(--text-primary);
    background: color-mix(in srgb, var(--bg-surface) 100%, transparent);
    box-shadow: none;
}

.dropdown-item:hover {
    background: var(--bg-dropdown-item-hover);
}



.admin-members-table {
    display: grid;
    grid-template-columns: max-content max-content max-content max-content max-content max-content max-content;
    width: max-content;
    min-width: 100%;
    align-items: center;
    justify-content: center;
}

.admin-members-table-wrapper {
    width: 100%;
    max-height: min(60vh, 520px);
    overflow: auto;
}

.admin-org-members-card {
    margin: 8px 20px 0;
    overflow: hidden;
}

.admin-org-members-card > .settings-card-header .settings-title {
    border-radius: 0;
}

#adminOrgMembersSection #adminMembersTable {
    padding: 12px 14px 14px;
}

.admin-members-head-cell {
    font-weight: 600;
    padding-bottom: 8px;
    background: var(--bg-surface-strong);
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-members-head-cell,
.admin-members-cell {
    padding: 8px 12px;
    white-space: nowrap;
    text-align: center;
    color: var(--text-primary);
}

.admin-members-head-cell:nth-child(7n + 1),
.admin-members-cell:nth-child(7n + 1) {
    text-align: left;
}

.admin-members-head-controls {
    justify-content: center;
}

.admin-members-head-controls-left {
    justify-content: flex-start;
}

.admin-members-sort-button {
    border: 0;
    width: 100%;
    min-width: 0;
    background: var(--bg-surface-strong);
    box-shadow: none;
    color: inherit;
    font: inherit;
    text-align: inherit;
    justify-content: center;
    cursor: pointer;
    border-radius: 0;
}

.admin-members-head-cell.admin-members-sort-button:nth-child(7n + 1) {
    justify-content: flex-start;
}



.admin-members-list-footer {
    padding: 12px 4px 2px;
    text-align: center;
}

.status-active { color: var(--action-approve); }
.status-pending { color: var(--action-pending); }
.status-denied { color: var(--action-deny); }
.status-suspended { color: var(--action-suspend); }



/* actions */
.admin-members-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-org-members-header {
    margin-bottom: 0;
}

.admin-org-members-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.members-header-text-action {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.members-header-text-action:hover,
.members-header-text-action.is-active {
    color: var(--text-primary);
}

.admin-member-external-id-input {
    width: 180px;
    min-width: 180px;
}

.admin-add-external-member-modal-card {
    width: min(520px, 92vw);
}

.admin-add-external-member-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.admin-org-activity-modal-card {
    width: min(1180px, 94vw);
    max-width: 94vw;
    height: min(84vh, 860px);
    max-height: 84vh;
}

.admin-org-activity-modal-body {
    min-height: 0;
    overflow: hidden;
}

.admin-org-activity-modal-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface-strong);
    overflow: hidden;
}

#adminOrgSettingsActivityContent {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.admin-org-activity-table-container {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: scroll;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    --tracking-log-row-height: 72px;
}

.admin-org-activity-table {
    table-layout: fixed;
}

.admin-org-activity-summary-cell {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: var(--tracking-log-row-height);
    width: 100%;
    min-width: 0;
}

.admin-org-activity-summary-text,
.admin-org-activity-cell-stack,
.admin-org-activity-table .tracking-log-cell-inner {
    min-width: 0;
    width: 100%;
}

.admin-org-activity-table .tracking-log-meta-primary,
.admin-org-activity-table .tracking-log-meta-secondary {
    max-width: 100%;
}

.admin-org-activity-details-toggle {
    flex: 0 0 auto;
}

.admin-org-activity-details-row td {
    padding: 0;
}

.admin-org-activity-details {
    padding: 12px;
    background: var(--bg-surface);
}

.admin-org-activity-changed-fields {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.admin-org-activity-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.admin-org-activity-detail-block {
    min-width: 0;
}

.admin-org-activity-json {
    margin: 6px 0 0;
    padding: 10px;
    background: var(--bg-surface-strong);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.82rem;
}

.admin-org-activity-footer {
    display: flex;
    justify-content: center;
    padding: 12px;
    position: sticky;
    left: 0;
    bottom: 0;
    border-top: 1px solid var(--border-soft);
}


.admin-org-security-card {
    flex: 0 0 auto;
    margin: 0;
    overflow: hidden;
    align-self: stretch;
}

.admin-org-security-header {
    flex-wrap: nowrap;
    gap: 8px;
}

.admin-org-security-header .settings-title {
    min-width: 0;
}

.admin-org-security-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.admin-org-security-content {
    padding: 12px 14px 14px;
}

.admin-org-security-sections {
    display: grid;
    gap: 16px;
}

.admin-org-security-block {
    display: grid;
    gap: 10px;
}

.admin-org-security-block-header {
    display: grid;
    gap: 4px;
}

.admin-org-security-table-shell {
    overflow: hidden;
}

.admin-org-security-table-container {
    max-height: min(38vh, 340px);
    --tracking-log-row-height: 66px;
}

.admin-org-security-table {
    table-layout: fixed;
    width: 100%;
}

.admin-org-security-table td,
.admin-org-security-table th {
    min-width: 0;
}

.admin-org-security-table .tracking-log-meta-primary,
.admin-org-security-table .tracking-log-meta-secondary,
.admin-org-security-table .tracking-log-cell-inner {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.admin-org-security-table td:last-child,
.admin-org-security-table th:last-child {
    width: 88px;
}

.admin-org-security-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-org-security-status.is-normal {
    color: var(--text-primary);
}

.admin-org-security-status.is-low {
    color: var(--action-pending);
}

.admin-org-security-status.is-flagged {
    color: color-mix(in srgb, var(--action-pending) 72%, white 28%);
}

.admin-org-security-status.is-blocked {
    color: var(--action-deny);
}

.admin-org-security-actions {
    min-height: 0;
    justify-content: center;
    align-items: flex-start;
}

.admin-org-security-compact-cell {
    justify-content: center;
}



.permissions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    align-items: start;
    padding: 8px;
    max-height: 180px;
}

.admin-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-badge);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--text-badge);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.permissions-list .checkbox-row {
    font-size: 0.78rem;
    gap: 8px;
    max-width: none;
}



.tab-pane[data-tab-group="admin"][data-pane="permissions"] {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.admin-permissions-pane {
  display: grid;
  flex: 1 1 auto;
  grid-template-rows: minmax(0, 3.5fr) minmax(0, 5.5fr);
  gap: 10px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.admin-permissions-card,
.admin-checks-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  overflow: hidden;
  margin-bottom: 0;
  align-self: stretch;
}

.admin-permissions-card-body,
.admin-checks-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding-top: 4px;
  overflow: hidden;
}

.admin-permissions-card .settings-card-header .settings-title,
.admin-checks-card > .settings-title {
  font-size: 0.82rem;
}

.admin-permissions-grid-header,
.admin-permissions-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 15ch) minmax(0, 1fr) 28px;
  gap: 10px;
}

.admin-permissions-grid-header {
  flex: 0 0 auto;
  padding: 0 2px 4px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.78;
}

.admin-permissions-list,
.admin-checks-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.admin-permissions-row {
  display: grid;
  flex: 0 0 auto;
  min-height: 38px;
  align-items: start;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.14s ease;
}

.admin-permissions-row:hover {
  background: var(--bg-hover-subtle);
}

.admin-permissions-row:last-child {
  border-bottom: none;
}

.admin-permissions-cell {
  min-width: 0;
  font-size: 0.7rem;
  line-height: 1.3;
}

.admin-permissions-label-cell {
  display: flex;
  align-items: flex-start;
}

.admin-permissions-label-text {
  display: block;
  min-width: 0;
  color: var(--text-primary);
  font-weight: 600;
  white-space: normal;
  word-break: break-word;
}

.admin-permissions-description {
  overflow: hidden;
}

.admin-permissions-description-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  word-break: break-word;
}

.admin-permissions-action {
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0;
}

.admin-permissions-action .btn-icon.trash-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  opacity: 0.8;
}

.admin-permissions-action .btn-icon.trash-icon:hover {
  opacity: 1;
}

.admin-permission-modal-card {
  width: min(520px, 92vw);
}

.permission-check-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.54fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border-subtle);
}

.permission-check-row:last-child {
  border-bottom: none;
}

.permission-check-label {
  min-width: 0;
}

.permission-check-label-text {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.permission-check-description {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.4;
}

.permission-check-panel {
  min-width: 0;
}

.admin-checks-list .permission-check-scroll {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 6px 0;
}

.admin-checks-list .permission-check-grid {
  grid-auto-columns: minmax(188px, 1fr);
}

.admin-permissions-list .admin-empty-state,
.admin-checks-list .admin-empty-state {
  padding: 12px 2px;
}

.admin-check-owner-only {
  margin-top: 6px;
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


.admin-secrets-card {
  padding: 12px 14px 8px;
}

.admin-secrets-grid-header,
.admin-secret-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 20fr) minmax(0, 35fr) minmax(0, 20fr) minmax(0, 15fr) minmax(0, 10fr);
  gap: 16px;
  align-items: center;
}

.admin-secrets-grid-header {
  padding: 0 2px 6px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.78;
}

.admin-secrets-list {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: 320px;
  padding-right: 4px;
}

.admin-secret-row {
  min-height: 38px;
  padding: 0 2px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.14s ease;
}

.admin-secret-row:hover {
  background: var(--bg-hover-subtle);
}

.admin-secret-row:last-child {
  border-bottom: none;
}

.admin-secret-cell {
  font-size: 0.7rem;
  line-height: 1.2;
}

.admin-secret-preview {
  color: var(--text-placeholder);
  font-family: "JetBrains Mono", monospace;
}

.admin-secret-label {
  color: var(--text-primary);
  font-weight: 600;
}

.admin-secret-action {
  gap: 0;
}

.admin-secret-action .trash-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  opacity: 0.8;
}

.admin-secret-action .trash-icon:hover {
  opacity: 1;
}

.admin-secret-modal-card {
  width: min(560px, 92vw);
}

.admin-secret-value-input {
  font-family: "JetBrains Mono", monospace;
}


.admin-privacy-pane {
  --admin-privacy-encryption-list-height: 202px;
  --admin-privacy-card-min-height: 430px;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(var(--admin-privacy-card-min-height), auto) minmax(165px, auto);
  gap: 10px;
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-privacy-title-bar {
  padding: 10px 12px;
  flex: 0 0 auto;
}

.admin-privacy-card-scroll,
.admin-privacy-settings-scroll {
  overflow: hidden;
}

.admin-privacy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.94fr);
  gap: 10px;
  padding: 10px 12px 8px;
  min-height: 100%;
  align-items: stretch;
}

.admin-privacy-card {
  min-height: var(--admin-privacy-card-min-height);
}

.admin-privacy-encryption-column,
.admin-privacy-docs-column {
  min-width: 0;
  min-height: 0;
}

.admin-privacy-section-copy {
  font-size: 0.78rem;
  line-height: 1.4;
}

.admin-encryption-list {
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-xs);
  overflow: hidden;
  flex: 0 0 auto;
}

.admin-encryption-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--border-soft);
}

.admin-encryption-row:first-child {
  border-top: none;
}

.admin-encryption-row-main {
  min-width: 0;
}

.admin-encryption-row-label-wrap {
  min-width: 0;
}

.admin-encryption-row-label {
  min-width: 0;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-privacy-docs-title {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-encrypted-docs-list-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-xs);
  overflow: hidden;
  background: var(--bg-surface);
}

.admin-encrypted-docs-list-wrap-inline {
  flex: 0 0 auto;
  min-height: var(--admin-privacy-encryption-list-height);
  height: var(--admin-privacy-encryption-list-height);
  max-height: var(--admin-privacy-encryption-list-height);
}

.admin-encrypted-docs-head,
.admin-encrypted-docs-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.admin-encrypted-docs-head {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
}

.admin-encrypted-docs-head-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-encrypted-docs-head-cell .table-head-controls {
  justify-content: flex-start;
}

[data-encrypted-docs-header-host] {
  display: block;
  width: 100%;
}

.admin-encrypted-docs-row {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-encrypted-docs-row:last-child {
  border-bottom: none;
}

.admin-encrypted-docs-cell {
  min-width: 0;
}

.admin-encrypted-docs-primary {
  color: var(--text-primary);
  font-size: 0.76rem;
}

.admin-encrypted-docs-meta {
  font-size: 0.7rem;
}

.admin-encrypted-docs-list-wrap-inline .admin-empty-state {
  padding: 12px 10px;
  font-size: 0.76rem;
}

.admin-privacy-footer {
  gap: 12px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.admin-privacy-footer-full {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border-subtle);
}

.admin-privacy-summary {
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-privacy-actions {
  gap: 8px;
  margin-left: auto;
}

.admin-privacy-actions button {
  padding-top: 5px;
  padding-bottom: 5px;
}

.admin-privacy-settings-row {
  grid-template-columns: 210px 160px 1fr;
  padding: 9px 10px;
}

.admin-privacy-settings-card {
  min-height: 165px;
}

.admin-privacy-settings-row .settings-label {
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-private-dek-toggle-row {
  width: fit-content;
}

.admin-private-dek-modal {
  width: min(620px, 94vw);
}

.admin-private-dek-note {
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-private-dek-note-tight {
  margin-top: -4px;
}

.admin-private-dek-toggle {
  width: 100%;
  max-width: none;
}

.admin-private-dek-toggle-inline {
  width: fit-content;
  max-width: fit-content;
  padding-block: 2px;
}

.admin-private-dek-toggle-left {
  justify-content: flex-start;
}

.admin-private-dek-divider {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.admin-private-dek-secret-head {
  gap: 12px;
  flex-wrap: wrap;
}

.admin-private-dek-secret-label {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.admin-private-dek-value {
  min-height: 96px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-xs);
  background: var(--bg-surface);
  font-family: var(--font-mono, monospace);
}

.admin-private-dek-value-phrase {
  min-height: 118px;
}

.admin-private-dek-value:focus {
  border-color: var(--border-accent);
  box-shadow: none;
}


.admin-usage-pane {
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
}

.admin-usage-card {
  flex: 0 0 auto;
  padding-bottom: 12px;
}

.admin-usage-card-header {
  flex-wrap: nowrap;
  gap: 8px;
}

.admin-usage-card-header .settings-title {
  min-width: 0;
}

#adminTrackingSetCapButton {
  margin-left: auto;
}

.admin-usage-cap-button-label-compact {
  display: none;
}

.admin-usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
}

.admin-usage-subsummary {
  padding: 10px 14px 0;
}

.admin-usage-actions {
  padding: 12px 14px 0;
}

.admin-usage-plan-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
}

.admin-usage-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 14px 0;
}

.admin-usage-table-block {
  min-width: 0;
}

.admin-usage-table-title {
  color: var(--text-primary);
  font-size: 0.85rem;
}

.admin-usage-table {
  display: grid;
  grid-template-columns: 0.9fr 0.8fr 1.5fr;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-sm);
  overflow: hidden;
  background: var(--bg-panel-alt);
}

.admin-usage-table-breakdown {
  grid-template-columns: 5fr 2fr 3fr;
}

.admin-usage-table-recent {
  grid-template-columns: 22fr 56fr 22fr;
}

.admin-usage-scroll {
  max-height: 220px;
  overflow: auto;
}

.admin-usage-table-head,
.admin-usage-table-cell {
  padding: 9px 10px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-faint);
}

.admin-usage-table-head {
  position: sticky;
  top: 0;
  background: var(--bg-settings-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
}

.admin-usage-table-head-sortable {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-tracking-recent-header-host],
[data-vector-storage-header-host] {
  display: block;
  width: 100%;
}

.admin-usage-table-cell {
  color: var(--text-primary);
}

.admin-usage-col-events,
.admin-usage-col-charge,
.admin-usage-col-when {
  text-align: center;
}

.admin-usage-col-activity {
  min-width: 0;
}

.admin-usage-col-activity.admin-usage-recent-expandable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-usage-recent-expandable {
  cursor: pointer;
}

.admin-usage-recent-detail-shell {
  grid-column: 1 / -1;
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--border-faint);
  background: color-mix(in srgb, var(--bg-panel-alt) 78%, var(--bg-settings-title) 22%);
}

.admin-usage-recent-detail-title {
  margin-bottom: 8px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.admin-usage-recent-detail-list {
  display: grid;
  gap: 8px;
}

.admin-usage-recent-detail-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
}

.admin-usage-recent-detail-copy {
  min-width: 0;
}

.admin-usage-recent-detail-label {
  color: var(--text-primary);
  line-height: 1.35;
}

.admin-usage-recent-detail-meta {
  margin-top: 2px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.admin-usage-recent-detail-charge {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--text-primary);
}

.admin-usage-table-rows {
  display: contents;
}

.admin-usage-table-rows-full {
  grid-column: 1 / -1;
}

.admin-usage-empty {
  grid-column: 1 / -1;
  padding: 12px;
  font-size: 0.82rem;
}

#adminVectorStorageModal {
  z-index: 7;
}

.admin-usage-vector-modal {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(82vh, 820px);
}

.admin-usage-vector-shell {
  flex: 1 1 auto;
  min-height: 280px;
  min-width: 0;
  position: relative;
  --admin-usage-vector-columns: 70px 1.1fr 1.35fr 0.95fr 0.9fr 0.9fr 2fr 0.9fr;
}

.admin-usage-vector-table {
  display: grid;
  grid-template-columns: var(--admin-usage-vector-columns);
  min-width: 1120px;
  background: var(--bg-panel-alt);
}

.admin-usage-vector-scroll-x {
  overflow-x: auto;
  overflow-y: hidden;
}

.admin-usage-vector-scroll {
  min-height: 280px;
  max-height: min(54vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
}

.admin-usage-vector-table-head {
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
  border-radius: var(--panel-radius-sm) var(--panel-radius-sm) 0 0;
  overflow: hidden;
}

.admin-usage-vector-table-body {
  border: 1px solid var(--border-subtle);
  border-radius: 0 0 var(--panel-radius-sm) var(--panel-radius-sm);
  overflow: hidden;
}

.admin-usage-vector-head,
.admin-usage-vector-cell {
  padding: 10px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-faint);
}

.admin-usage-vector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-settings-title);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-usage-vector-cell {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  min-width: 0;
}

.admin-usage-vector-cell > * {
  min-width: 0;
}

.admin-usage-vector-cell:not(.admin-usage-vector-check-cell):not(.admin-usage-vector-action-cell) {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.admin-usage-vector-check-head,
.admin-usage-vector-check-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-usage-vector-action-head {
  justify-content: center;
}

.admin-usage-vector-modal-actions {
  margin-left: auto;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.admin-usage-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 6px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
}

.admin-usage-sort-button:hover {
  filter: none;
}

.admin-usage-sort-button.is-active .caret {
  color: var(--text-primary);
}

.admin-usage-vector-action-cell {
  align-items: center;
  justify-content: center;
}

.admin-usage-vector-checkbox {
  width: 14px;
  height: 14px;
}

.admin-usage-vector-cell strong {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-usage-vector-meta {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  line-height: 1.35;
}

.admin-usage-vector-preview {
  white-space: normal;
  line-height: 1.4;
}




#adminPanelModal .tabs {
    gap: 0;
    margin-bottom: 10px;
}

#adminPanelModal .tab {
    padding: 8px 12px;
    font-size: 0.79rem;
}

.admin-loading-panel {
    position: relative;
}

.admin-loading-panel.is-loading {
    pointer-events: none;
}

.admin-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border-radius: inherit;
    background: color-mix(in srgb, var(--bg-surface) 74%, transparent);
    backdrop-filter: blur(1px);
    z-index: 3;
}

.admin-loading-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.admin-loading-overlay .loading-spinner {
    width: 28px;
    height: 28px;
    border-width: 3px;
}

.admin-loading-message {
    font-size: 0.8rem;
    line-height: 1.35;
}

#adminPanelModal .modal-card-full {
    overflow: hidden;
}

#adminPanelModal [data-tab-group="admin"][data-pane] {
    min-height: 0;
    overflow: auto;
}

#adminPanelModal .tab-pane-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}


.private-dek-prompt-modal {
  width: min(560px, 94vw);
  overflow: visible;
}

.private-dek-prompt-body {
  overflow: visible;
}

.private-dek-prompt-context {
  font-size: 0.8rem;
  line-height: 1.35;
}

.private-dek-prompt-note,
.private-dek-prompt-hint {
  font-size: 0.9rem;
  line-height: 1.45;
}

.private-dek-prompt-hint {
  margin-top: -4px;
  font-size: 0.82rem;
}

.private-dek-prompt-secret-label {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.private-dek-prompt-value {
  min-height: 108px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-xs);
  background: var(--bg-surface);
  font-family: var(--font-mono, monospace);
}

.private-dek-prompt-value:focus {
  border-color: var(--border-accent);
  box-shadow: none;
}


.coming-feature-tab-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    min-width: max-content;
}

.coming-feature-tab-wrap .tab {
    min-width: max-content;
}

.coming-feature-tab-wrap .tab.disabled {
    pointer-events: none;
}

.coming-feature-overlay {
    position: absolute;
    inset: 0;
    top: 80%;
    transform: translateY(-50%);
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    padding: 2px 8px;
    border: 1px solid var(--border-muted);
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--bg-surface-strong) 72%, transparent 28%);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    overflow: visible !important;
}

.dev-plan-modal-card {
    width: min(1100px, 92vw);
    max-width: 1100px;
    height: min(88vh, 900px);
    max-height: calc(100dvh - 24px);
}

.dev-plan-modal-header {
    align-items: center;
}

.dev-plan-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.dev-plan-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.dev-plan-view-toggle-btn {
    appearance: none;
    -webkit-appearance: none;
    min-width: 128px;
    padding: 8px 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}

.dev-plan-view-toggle-btn:hover,
.dev-plan-view-toggle-btn:focus-visible {
    background: var(--bg-hover-subtle);
    color: var(--text-primary);
    outline: none;
}

.dev-plan-view-toggle-btn.active {
    background: var(--accent);
    color: var(--text-on-accent);
}

.dev-plan-view-toggle-btn.active:hover,
.dev-plan-view-toggle-btn.active:focus-visible {
    background: var(--accent);
    color: var(--text-on-accent);
}

.dev-plan-submit-card {
    padding: 14px 16px;
}

.dev-plan-list-wrap {
    --dev-plan-list-surface-bg: color-mix(in srgb, var(--bg-page) 68%, var(--bg-surface) 32%);
    --dev-plan-list-row-bg: color-mix(in srgb, var(--bg-page) 92%, transparent 8%);

    display: flex;
    flex: 1 0 clamp(260px, 38vh, 400px);
    flex-direction: column;
    min-height: 260px;
    max-width: 100%;
    overflow: auto;
    border: none;
    border-radius: calc(var(--panel-radius) - 4px);
    background: var(--dev-plan-list-surface-bg);
}

.dev-plan-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 780px;
    padding: 12px;
}

.dev-plan-list-header,
.dev-plan-list-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.15fr) minmax(280px, 1.85fr) minmax(96px, 0.55fr) minmax(150px, 0.75fr);
    column-gap: 14px;
    align-items: center;
}

.dev-plan-list-header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 16px;
    background: var(--dev-plan-list-surface-bg);
}

.dev-plan-list-heading {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
}

.dev-plan-list-row {
    min-height: 64px;
    padding: 11px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--dev-plan-list-row-bg);
    transition: background 0.14s ease, border-color 0.14s ease;
}

.dev-plan-list-row:hover {
    border-color: var(--border-muted);
    background: color-mix(in srgb, var(--bg-hover-subtle) 84%, transparent 16%);
}

.dev-plan-list-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.dev-plan-name-cell,
.dev-plan-description-cell,
.dev-plan-date-cell {
    overflow-wrap: anywhere;
}

.dev-plan-name-cell {
    font-weight: 700;
}

.dev-plan-name-text {
    display: block;
    max-width: 40ch;
    text-align: center;
}

.dev-plan-description-cell {
    color: var(--text-secondary);
}

.dev-plan-date-cell {
    white-space: nowrap;
}

.dev-plan-actions-cell {
    white-space: nowrap;
}

.dev-plan-feature-action-stack,
.dev-plan-star-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.dev-plan-action-stack {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dev-plan-star-button {
    min-width: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.35rem;
    line-height: 1;
    box-shadow: none;
    opacity: 1;
}

.dev-plan-star-button:hover {
    background: color-mix(in srgb, var(--bg-hover-subtle-strong) 80%, transparent 20%);
    color: var(--text-primary);
    filter: none;
}

.dev-plan-star-button.is-selected {
    color: #facc15;
}

.dev-plan-star-button.is-selected:hover {
    color: #facc15;
}

.dev-plan-like-count,
.dev-plan-star-count {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
}

.dev-plan-like-count {
    min-width: 2ch;
    text-align: center;
}

.dev-plan-complete-button {
    min-height: 34px;
    white-space: nowrap;
}

.dev-plan-complete-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--border-success);
    border-radius: var(--button-radius-sm);
    background: color-mix(in srgb, var(--success) 16%, transparent);
    color: var(--success);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.dev-plan-status {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
    padding: 28px;
    border: 1px dashed var(--border-muted);
    border-radius: calc(var(--panel-radius) - 4px);
    background: color-mix(in srgb, var(--bg-surface) 78%, transparent 22%);
    text-align: center;
}

.dev-plan-status.is-error {
    border-color: color-mix(in srgb, var(--border-danger, #ef4444) 75%, var(--border-muted));
}

.dev-plan-status.is-compact {
    min-height: 0;
    padding: 12px 14px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.dev-plan-status-message {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.45;
}

.dev-plan-submit-card {
    flex: 0 0 auto;
    gap: 14px;
}

.dev-plan-submit-card > .title-block,
.dev-plan-submit-card > .dev-plan-submit-fields {
    flex: 0 0 auto;
}

.dev-plan-submit-card > .title-block {
    margin-bottom: 2px;
}

.dev-plan-submit-fields {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    grid-template-areas:
        "name description"
        "type description";
    gap: 14px 18px;
    align-items: stretch;
}

.dev-plan-submit-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
}

.dev-plan-submit-field .field-label {
    align-items: flex-start !important;
}

.dev-plan-submit-field .field-control {
    width: 100%;
}

.dev-plan-submit-field-name {
    grid-area: name;
}

.dev-plan-submit-field-type {
    grid-area: type;
}

.dev-plan-submit-field-description {
    grid-area: description;
}

.dev-plan-submit-textarea {
    flex: 1 1 auto;
    min-height: 130px;
    resize: vertical;
}

.dev-plan-submit-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}


.org-list {
  display: grid;
  gap: 10px;
  overflow: hidden;
}

.org-switcher-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-lg);
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.org-switcher-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.org-switcher-item.active {
  border-color: var(--border-success);
}

.org-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.org-switcher-name {
  font-weight: 700;
  color: var(--text-primary);
  min-width: 0;
}

.org-switcher-meta {
  font-size: 0.84rem;
}

.scheduled-org-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}


#joinOrCreateOrgList {
    overflow-y: auto;
    max-height: calc(100dvh - 300px);
}

.org-list-item {
    display: grid;
    grid-template-columns: 120px 95px 110px minmax(0, 1fr) 130px;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    background: var(--bg-surface);
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
    overflow: hidden;
    cursor: pointer;
}

.org-list-item-name {
    font-weight: 700;
    color: var(--text);
}

.org-list-item-members {
    font-size: 0.84rem;
}

.org-list-item-status {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-badge);
}

.org-list-item-description {
    font-size: 0.86rem;
}

.org-list-item-owner {
    font-size: 0.84rem;
    text-align: right;
    max-width: 130px;
}

.org-list-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}

.org-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.95;

}

.org-tag-img {
    width: 20px;
    height: 20px;
}


.active {
    color: var(--action-reactivate);
}

.pending {
    color: var(--action-deny)
}

.denied {
    color: #f87171;
}

.suspended {
    color: var(--action-suspend);
}

.none {
    color: var(--muted);
}


/* Preserve the custom checkbox shadow inside the modal body. */
#createOrgModal .checkbox-container {
  padding-inline-start: 3px;
}


.table-column-filter-modal-overlay {
  z-index: 21000;
}

.table-head-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.table-head-filter-button,
.table-head-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
}

.table-head-filter-button {
  padding: 0;
  min-width: 0;
  display: inline-flex;
  align-items: flex-start;
  flex: 1 1 auto;
  cursor: pointer;
  text-align: left;
}

.table-head-filter-sup {
  margin-left: 2px;
  font-size: 0.62rem;
  line-height: 1;
  color: var(--text-secondary);
}

.table-head-sort-button {
  padding: 0;
  width: 16px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.table-head-sort-button:hover {
  filter: none;
}

.table-head-sort-button.is-active .caret {
  color: var(--text-primary);
}

.table-column-filter-modal-card {
  width: min(640px, 92vw);
  max-height: 84vh;
}

.table-column-filter-values {
  display: grid;
  gap: 10px;
  max-height: 44vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 2px;
}

#sharedTableFilterValues .checkbox-row > span {
  overflow-wrap: anywhere;
}


.tracking-logs-overlay {
  z-index: 2000;
}

.tracking-logs-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(96vw, 1560px);
  height: min(92vh, 860px);
  max-width: 96vw;
  max-height: 92vh;
  min-width: min(960px, 96vw);
  min-height: 520px;
}

.tracking-logs-table-shell {
  min-height: 0;
  flex: 1 1 auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-sm);
  background: var(--bg-surface-strong);
  overflow: hidden;
}

.tracking-logs-table-container {
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg-surface-strong) 92%, white 8%) 0,
      color-mix(in srgb, var(--bg-surface-strong) 92%, white 8%) 67px,
      var(--bg-surface-strong) 67px,
      var(--bg-surface-strong) 100%
    );
  --tracking-log-row-height: 96px;
}

.tracking-logs-table {
  width: max(1800px, 100%);
  border-collapse: collapse;
  table-layout: fixed;
}

.tracking-logs-table th,
.tracking-logs-table td {
  vertical-align: top;
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  background: var(--bg-surface-strong);
}

.tracking-logs-table th:last-child,
.tracking-logs-table td:last-child {
  border-right: 0;
}

.tracking-logs-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg-surface-strong) 92%, white 8%);
  text-align: left;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.tracking-logs-table thead th.is-dragging {
  opacity: 0.72;
}

.tracking-logs-table thead th.is-drag-before {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--accent-primary) 75%, white 25%);
}

.tracking-logs-table thead th.is-drag-after {
  box-shadow: inset -3px 0 0 color-mix(in srgb, var(--accent-primary) 75%, white 25%);
}

.tracking-log-header-cell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding-right: 18px;
}

.tracking-log-header-cell .table-head-controls {
  flex: 1 1 auto;
}

.tracking-log-column-drag-handle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  color: var(--text-secondary);
  cursor: grab;
  user-select: none;
}

.tracking-log-column-drag-handle:active {
  cursor: grabbing;
}

.tracking-log-header-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: flex-start;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  text-align: left;
}

.tracking-log-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  width: 16px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
}

.tracking-log-sort-button:hover {
  filter: none;
}

.tracking-log-sort-button.is-active .caret {
  color: var(--text-primary);
}

.tracking-log-header-meta {
  margin-left: 8px;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-secondary);
}

.tracking-log-column-resizer,
.tracking-log-row-resizer {
  position: absolute;
  z-index: 3;
}

.tracking-log-column-resizer {
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
}

.tracking-log-column-resizer::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--border-subtle);
  opacity: 0.8;
}

.tracking-log-row-resizer {
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 8px;
  cursor: row-resize;
}

.tracking-log-row-resizer::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: 50%;
  height: 1px;
  transform: translateY(-50%);
  background: var(--border-subtle);
  opacity: 0.8;
}

.tracking-log-column-resizer:hover,
.tracking-log-row-resizer:hover {
  background: color-mix(in srgb, var(--accent-primary) 20%, transparent);
}

.tracking-logs-table td select,
.tracking-logs-table td textarea {
  width: 100%;
  min-width: 140px;
  box-sizing: border-box;
}

.tracking-logs-table td select.select-fit-content {
  width: auto;
  min-width: fit-content;
  max-width: 100%;
}

.tracking-log-textarea {
  min-height: calc(var(--tracking-log-row-height) - 20px);
  resize: vertical;
}

.tracking-log-inline-help {
  margin-top: 6px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.tracking-log-training-menu {
  position: relative;
}

.tracking-log-training-summary {
  cursor: pointer;
  color: var(--accent-primary);
  user-select: none;
}

.tracking-log-training-summary::marker,
.tracking-log-training-summary::-webkit-details-marker {
  color: var(--text-secondary);
}

.tracking-log-training-popover {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-sm);
  background: color-mix(in srgb, var(--bg-surface-strong) 96%, white 4%);
}

.tracking-log-training-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.tracking-log-training-option {
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
}

.tracking-log-training-option input[type="checkbox"] {
  margin-top: 2px;
}

.tracking-log-training-option .llmlab-orgtag {
  --llmlab-orgtag-size: 18px;
}

.tracking-log-training-option input:disabled + span {
  opacity: 0.62;
}

.tracking-log-meta-primary {
  font-weight: 600;
  line-height: 1.35;
}

.tracking-log-meta-secondary {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.tracking-log-cell-inner {
  min-height: var(--tracking-log-row-height);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.tracking-log-details summary {
  cursor: pointer;
  color: var(--accent-primary);
  font-weight: 600;
}

.tracking-log-details pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: var(--panel-radius-sm);
  background: rgba(0, 0, 0, 0.22);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.tracking-logs-panel-resizer {
  position: absolute;
  z-index: 5;
}

.tracking-logs-panel-resizer-right {
  top: 0;
  right: -4px;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
}

.tracking-logs-panel-resizer-bottom {
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 10px;
  cursor: ns-resize;
}

.tracking-logs-panel-resizer-corner {
  right: -4px;
  bottom: -4px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
}

.tracking-logs-panel-resizer:hover {
  background: color-mix(in srgb, var(--accent-primary) 22%, transparent);
}


.documents-editor-pane::-webkit-scrollbar {
  width: 6px;
}

.documents-editor-pane {
  min-width: 0;
  min-height: 0;
}

.documents-empty-card,
.document-editor-card {
  min-height: 100%;
  box-sizing: border-box;
}

.documents-empty-card {
  display: grid;
  place-items: center;
  padding: 28px;
}

.documents-empty-copy {
  color: var(--text-secondary);
  text-align: center;
}

.document-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.document-tab-label {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-editor-card {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.document-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.document-editor-header .title-block {
  display: flex;
  flex: 1 1 0;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
}

.document-editor-header .title-block .detail-title,
.document-editor-header .title-block .detail-description {
  margin: 0;
}

.document-editor-header .title-block .detail-description {
  flex: 1 1 280px;
  min-width: 0;
}

.document-status-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.document-contract-title-row {
  max-width: none;
}

.document-contract-title-row > span:not(.info-tag) {
  color: var(--text-primary);
  font-weight: 800;
}

.document-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.document-table-add-btn {
  margin-left: auto;
}

.document-content-contract-title {
  color: var(--text-primary);
  font-weight: 800;
  min-width: 0;
}

.document-table-scroll {
  min-width: 0;
  overflow-x: auto;
}

.document-contract-fields-table {
  width: max(100%, 424px);
  min-width: 424px;
  table-layout: fixed;
  border-collapse: collapse;
}

.document-contract-fields-table th,
.document-contract-fields-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-faint);
  text-align: left;
  vertical-align: top;
}

.document-contract-fields-table th {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
}

.document-contract-key-col {
  width: 76px;
}

.document-contract-description-col {
  width: 116px;
}

.document-contract-rules-col {
  width: 180px;
}

.document-contract-action-col {
  width: 52px;
}

.document-contract-fields-table .field-control {
  width: 100%;
  box-sizing: border-box;
}

.document-contract-fields-table textarea.field-control {
  min-height: 72px;
  resize: vertical;
}

.document-content-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.document-content-table-scroll {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border-faint);
  border-radius: var(--panel-radius-sm);
}

.document-content-table {
  min-width: 100%;
}

.document-content-table-row {
  display: grid;
  min-width: 100%;
}

.document-content-table-row + .document-content-table-row {
  border-top: 1px solid var(--border-faint);
}

.document-content-table-header {
  background: var(--bg-settings-title);
}

.document-content-table-cell {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--border-faint);
}

.document-content-table-header .document-content-table-cell {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
}

.document-content-table-header .name-reveal-trigger {
  display: block;
  width: 100%;
  max-width: 100%;
}

.document-content-action-cell {
  position: sticky;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-right: none;
  background: var(--bg-surface-strong);
  box-shadow: -1px 0 0 var(--border-faint);
}

.document-content-table-header .document-content-action-cell {
  z-index: 2;
  background: var(--bg-settings-title);
}

.document-content-cell-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  text-align: left;
  white-space: normal;
  opacity: 1;
}

.document-content-cell-preview:hover {
  color: var(--accent);
  filter: none;
}

.document-content-cell-preview-readonly {
  grid-template-columns: minmax(0, 1fr);
  cursor: default;
}

.document-content-cell-preview-readonly:hover {
  color: var(--text-primary);
}

.document-content-cell-preview-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-content-cell-preview-empty {
  color: var(--text-secondary);
  font-style: italic;
}

.document-content-cell-input {
  width: 100%;
  min-height: 96px;
  box-sizing: border-box;
  resize: vertical;
}

.document-contract-card-collapsed {
  padding-bottom: 0;
}

.document-contract-card-collapsed > .settings-card-header {
  border-bottom: none;
  border-radius: inherit;
}

.documents-modal-copy {
  color: var(--text-secondary);
  line-height: 1.5;
}


.integration-welcome-builder,
.integration-welcome-presets {
    gap: 14px;
}

.integration-welcome-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.integration-welcome-preset-list {
    display: grid;
    gap: 10px;
}

.integration-welcome-preset-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--button-radius);
    background: color-mix(in srgb, var(--bg-surface) 84%, #ffffff 16%);
}

.integration-welcome-preset-text {
    min-height: 72px;
    resize: vertical;
}

.integration-welcome-weight-field {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.integration-welcome-weight-field input {
    width: 100%;
}

.integration-welcome-preset-row .trash-icon {
    margin-top: 4px;
}

.integration-welcome-empty {
    padding: 14px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--button-radius);
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}


.integration-theme-color-grid {
    display: grid;
    grid-template-columns: repeat(2, 270px);
    gap: 4px 8px;
    justify-content: start;
}

.integration-theme-color-card {
    padding: 3px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--button-radius);
    background: color-mix(in srgb, var(--bg-surface) 84%, #ffffff 16%);
}

.integration-theme-color-card {
    width: 270px;
    max-width: 100%;
    min-width: 0;
    justify-self: start;
}

.integration-theme-color-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 120px;
    gap: 6px;
    align-items: center;
    justify-content: start;
}

.integration-color-swatch-shell {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-surface) 82%, #ffffff 18%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--bg-overlay) 30%, transparent 70%);
}

.integration-color-swatch-shell input[type="color"] {
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.integration-color-swatch-shell input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.integration-color-swatch-shell input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 999px;
}

.integration-color-text-input {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    font-size: 11px;
    line-height: 1.2;
    padding-inline: 6px;
    font-family: var(--font-mono, "SFMono-Regular", Consolas, monospace);
}

.integration-widget-preview {
    --preview-radius: 22px;
    padding: 20px;
    border: 1px solid var(--border-subtle);
    border-radius: calc(var(--button-radius) * 1.4);
    background:
        radial-gradient(circle at top right, var(--accent-soft) 0%, transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--bg-surface) 88%, #000000 12%) 0%, var(--bg-surface-strong) 100%);
    overflow: visible;
    container-type: inline-size;
}

.integration-widget-preview-layout {
    display: grid;
    grid-template-columns: minmax(280px, 392px) minmax(0, 548px);
    gap: 18px;
    align-items: start;
}

.integration-widget-preview-stack {
    display: grid;
    gap: 16px;
    align-content: start;
    justify-items: start;
    max-width: 100%;
}

.integration-widget-preview-theme-cluster {
    display: grid;
    gap: 12px;
    align-content: start;
    min-width: 0;
    width: 548px;
    max-width: 100%;
}

.integration-widget-preview-theme-copy {
    display: grid;
    gap: 4px;
}

.integration-widget-preview-theme-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.integration-widget-preview-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: end;
}

.integration-widget-preview-launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.integration-widget-preview-launcher-control,
.integration-widget-preview-icon {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-overlay);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.integration-widget-preview-launcher-dot {
    width: 52px;
    height: 52px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.integration-widget-preview-launcher-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-overlay);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    box-shadow: var(--shadow-sm);
}

.integration-widget-preview-launcher-dot::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: var(--shadow);
}

.integration-widget-preview-panel {
    width: min(100%, 392px);
    max-width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: var(--preview-radius);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    backdrop-filter: var(--backdrop);
    color: var(--text-primary);
    overflow: hidden;
}

.integration-widget-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.integration-widget-preview-header-actions {
    display: inline-flex;
    gap: 8px;
}

.integration-widget-preview-settings {
    margin: 0 16px 12px;
    padding: 12px;
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    background: var(--bg-surface-strong);
}

.integration-widget-preview-settings-header,
.integration-widget-preview-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.integration-widget-preview-settings-header {
    margin-bottom: 10px;
}

.integration-widget-preview-settings-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.integration-widget-preview-settings-close {
    color: var(--text-secondary);
    font-size: 12px;
}

.integration-widget-preview-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.integration-widget-preview-pill {
    padding: 7px 10px;
    border: 1px solid var(--border-muted);
    border-radius: 999px;
    background: var(--bg-hover-subtle);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
}

.integration-widget-preview-pill.active {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.integration-widget-preview-toggle-row {
    color: var(--text-primary);
    font-size: 12px;
}

.integration-widget-preview-toggle {
    width: 46px;
    height: 28px;
    padding: 3px;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    background: var(--bg-input-strong);
    display: inline-flex;
    align-items: center;
}

.integration-widget-preview-toggle.active {
    background: var(--accent-soft);
}

.integration-widget-preview-toggle span {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--accent);
    margin-left: auto;
}

.integration-widget-preview-messages {
    display: grid;
    gap: 10px;
    max-height: 182px;
    overflow-y: auto;
    padding: 0 16px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.integration-widget-preview-messages::-webkit-scrollbar {
    width: 8px;
}

.integration-widget-preview-messages::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

.integration-widget-preview-messages::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
}

.integration-widget-preview-messages::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.integration-widget-preview-bubble {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 16px;
    font-size: 12px;
    line-height: 1.45;
    border: 1px solid var(--border-muted);
}

.integration-widget-preview-bubble.assistant {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.integration-widget-preview-bubble.user {
    margin-left: auto;
    background: var(--bg-surface-hover-alt);
    color: var(--text-secondary);
}

.integration-widget-preview-scrollbar-demo {
    padding: 0 16px 12px;
}

.integration-widget-preview-scrollbar-track {
    height: 10px;
    border-radius: 999px;
    background: var(--scrollbar-track);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
}

.integration-widget-preview-scrollbar-thumb {
    height: 6px;
    border-radius: 999px;
    display: inline-block;
}

.integration-widget-preview-scrollbar-thumb.default {
    width: 34%;
    background: var(--scrollbar-thumb);
}

.integration-widget-preview-scrollbar-thumb.hover {
    width: 20%;
    background: var(--scrollbar-thumb-hover);
}

.integration-widget-preview-composer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: var(--bg-input);
    border-top: 1px solid var(--border-subtle);
}

.integration-widget-preview-composer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.integration-widget-preview-input,
.integration-widget-preview-secondary,
.integration-widget-preview-send {
    min-height: 42px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.integration-widget-preview-input {
    justify-content: flex-start;
    min-width: 0;
    width: fit-content;
    flex: 1 1 180px;
    padding: 0 12px;
    background: var(--bg-input);
    color: var(--text-secondary);
    box-shadow: 0 0 0 1px transparent;
    max-width: 100%;
}

.integration-widget-preview-input.is-focused {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--shadow-focus);
}

.integration-widget-preview-secondary {
    min-width: 42px;
    padding: 0 12px;
    background: var(--secondary-button, var(--bg-surface));
    color: var(--secondary-button-text, var(--text-primary));
}

.integration-widget-preview-send {
    padding: 0 14px;
    background: var(--accent);
    color: var(--text-on-accent);
}

.integration-widget-preview-disclaimer {
    flex: 1 0 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px 4px 0;
    padding: 0 22px;
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}

.integration-widget-preview-disclaimer.hidden {
    display: none;
}

.integration-widget-preview-disclaimer-dismiss {
    position: absolute;
    right: 0;
    top: 50%;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.integration-widget-preview-disclaimer-dismiss:hover,
.integration-widget-preview-disclaimer-dismiss:focus-visible {
    background: var(--bg-hover-subtle);
    color: var(--text-primary);
    outline: none;
}

.integration-theme-var-header {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.integration-theme-color-control .integration-theme-var-header {
    justify-self: start;
}

.integration-theme-var-label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 12px;
}

@container (max-width: 980px) {
    .integration-widget-preview-layout {
        grid-template-columns: 1fr;
    }

    .integration-widget-preview-theme-cluster {
        width: 100%;
    }

    .integration-theme-color-grid {
        grid-template-columns: 1fr;
    }

    .integration-theme-color-card {
        width: 100%;
    }
}


.integration-widget-settings-modal {
    max-width: 750px;
}

.web-widget-role-inline-form {
    display: grid;
    width: 100%;
}

.web-widget-role-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
}

.web-widget-role-controls select {
    min-width: 0;
}

.web-widget-role-inline-form .detail-description {
    grid-column: 2;
    margin: 0;
}

@media (max-width: 720px) {
    .web-widget-role-controls {
        grid-template-columns: 1fr;
    }

    .web-widget-role-inline-form .detail-description {
        grid-column: 1;
    }
}


/* Website access uses shared settings-card layout styles. */


.integration-code-example {
    gap: 10px;
    margin-top: 14px;
}

.integration-code-example-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.integration-code-example-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.integration-code-block-shell {
    position: relative;
}

.integration-code-block-shell .code-input {
    padding-top: 66px;
}

.integration-code-language-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(100%, 340px);
    z-index: 2;
}

.integration-code-language-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--bg-overlay) 84%, transparent 16%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.integration-code-language-btn:hover,
.integration-code-language-btn:focus-visible {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--bg-overlay) 66%, var(--accent) 34%);
    transform: translateY(-1px);
}

.integration-code-language-btn.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 26%, var(--bg-overlay) 74%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent 66%);
}

.integration-code-language-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.integration-code-language-btn span {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.integration-code-example-instructions {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--button-radius);
    background: color-mix(in srgb, var(--bg-surface) 82%, #ffffff 18%);
}

.integration-code-example-instructions-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.integration-code-example-instructions-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}


/* Installer uses shared settings-card and code-input styles. */




#webWidgetTabContent .form-grid > .settings-card {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
}

.web-widget-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 0 28px;
}

.web-widget-title-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.web-widget-title-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.web-widget-title-text .detail-title,
.web-widget-title-text .detail-description {
  margin: 0;
}

.web-widget-collapsed-state-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.web-widget-collapsed-state-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: var(--shadow);
}

.section-title .integration-widget-settings-gear {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  align-self: flex-start;
  margin: 0 !important;
}


.integration-store-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.integration-store-badge-btn {
    width: 100px;
    max-width: 100px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.integration-store-badge-btn img {
    display: block;
    width: 100%;
    height: auto;
}


.public-connection-root {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 28px 28px;
  min-width: 0;
}

.pc-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 0;
}

.pc-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.pc-title-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}

.pc-title-text {
  flex: 1 1 auto;
  min-width: 0;
}

.pc-title-text .detail-description {
  overflow-wrap: anywhere;
}

.pc-title-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  object-fit: contain;
}

.pc-title-logo-discord {
  box-sizing: border-box;
  padding: 8px;
  border-radius: 8px;
  background: #5865f2;
}

.pc-refresh-button.refresh-icon {
  --icon-btn-size: 47px;
  -webkit-mask-size: 23px 23px;
  mask-size: 23px 23px;
}

.pc-channel-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.pc-channel-refresh-button.refresh-icon {
  --icon-btn-size: 30px;
  -webkit-mask-size: 15px 15px;
  mask-size: 15px 15px;
}

.pc-channel-multi-wrap {
  display: grid;
  gap: 8px;
}

.pc-channel-multi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.pc-channel-checkbox-list {
  display: grid;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-input);
}

.pc-channel-checkbox-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  color: var(--text-primary);
  font-size: 0.84rem;
}

.pc-channel-checkbox-name,
.pc-channel-checkbox-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-channel-checkbox-meta,
.pc-channel-empty {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.pc-channel-picker-status {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.pc-channel-picker-status.is-error {
  color: var(--text-danger-soft);
}

.pc-layout-grid,
.pc-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.pc-layout-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.pc-editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.pc-section {
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-panel-alt) 86%, transparent);
  padding: 16px;
}

.pc-section-header,
.pc-binding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pc-section-header > div:first-child,
.pc-binding-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.pc-section-header > :not(:first-child),
.pc-binding-header > :not(:first-child) {
  flex: 0 0 auto;
}

.pc-section-header .detail-description,
.pc-binding-header .detail-description {
  overflow-wrap: anywhere;
}

.pc-section-header h4,
.pc-binding-header h5 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 0.98rem;
  line-height: 1.25;
}

.pc-binding-header h5 {
  font-size: 0.92rem;
}

.pc-code-line {
  overflow: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-input);
  padding: 10px 12px;
  white-space: nowrap;
}

.pc-code-line code,
.pc-path-line code {
  color: var(--text-primary);
}

.pc-path-line {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.pc-setup-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.pc-inline-note,
.pc-warning,
.pc-empty-state,
.pc-loading-state {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-panel-alt) 70%, transparent);
  color: var(--text-secondary);
  padding: 12px;
}

.pc-inline-note {
  margin: 14px 0 0;
}

.pc-warning {
  border-color: color-mix(in srgb, var(--warning, #f59e0b) 42%, var(--border-subtle));
  background: color-mix(in srgb, var(--warning, #f59e0b) 10%, var(--bg-panel-alt));
}

.pc-loading-state {
  margin-top: 8px;
}

.pc-connection-list {
  display: grid;
  gap: 8px;
}

.pc-connection-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-panel);
  color: var(--text-primary);
  text-align: left;
}

.pc-connection-list-item:hover,
.pc-connection-list-item.is-active {
  border-color: var(--border-accent);
  background: var(--bg-hover-subtle);
}

.pc-connection-select {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  justify-content: stretch;
  text-align: left;
  opacity: 1;
}

.pc-connection-select:hover {
  background: transparent;
  filter: none;
}

.pc-connection-select:focus-visible {
  outline: 2px solid var(--border-accent);
  outline-offset: 3px;
}

.pc-list-title,
.pc-list-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-list-title {
  font-weight: 650;
}

.pc-list-meta {
  grid-column: 1 / 2;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.pc-list-actions {
  display: flex;
  grid-row: 1 / span 2;
  grid-column: 2 / 3;
  align-items: center;
  align-self: center;
  gap: 8px;
}

.pc-status-pill {
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.74rem;
  line-height: 1.2;
}

.pc-connection-delete-btn {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--danger, #dc2626) 82%, var(--text-primary));
}

.pc-connection-delete-btn .trash-icon {
  background-color: currentColor;
}

.pc-connection-delete-btn:hover {
  background: transparent;
  color: var(--text-danger-soft);
}

.pc-binding-delete-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--danger, #dc2626) 82%, var(--text-primary));
}

.pc-binding-delete-btn .trash-icon {
  background-color: currentColor;
}

.pc-binding-delete-btn:hover {
  background: transparent;
  color: var(--text-danger-soft);
}

.pc-status-pill.is-enabled {
  border-color: color-mix(in srgb, var(--success, #22c55e) 42%, var(--border-subtle));
  color: color-mix(in srgb, var(--success, #22c55e) 82%, var(--text-primary));
}

.pc-status-pill.is-disabled {
  border-color: color-mix(in srgb, var(--danger, #dc2626) 35%, var(--border-subtle));
  color: var(--text-danger-soft);
}

.pc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pc-form-grid .form-field {
  min-width: 0;
}

.pc-form-grid input,
.pc-form-grid select,
.pc-form-grid textarea {
  width: 100%;
}

.pc-form-grid select[multiple] {
  min-height: 132px;
}

.pc-check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text-secondary);
  font-weight: 600;
}

.pc-check-row input[type="checkbox"] {
  width: auto;
}

.pc-actions-row {
  margin-top: 16px;
}

.pc-binding-tabs-shell {
  align-items: center;
  margin: 2px 0 14px;
}

.pc-binding-tabs-scroller {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 31px;
}

.pc-binding-tab {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-add-binding-tab {
  flex: 0 0 auto;
  margin-right: 0;
  white-space: nowrap;
}

.pc-bindings-list {
  display: grid;
  gap: 12px;
}

.pc-binding-form {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-panel);
  padding: 14px;
}

.pc-hidden-binding-field {
  display: none !important;
}

.pc-binding-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pc-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pc-label-with-help .info-tag {
  flex: 0 0 auto;
}

.pc-default-prompt-field textarea {
  min-height: 92px;
  resize: vertical;
}

.pc-always-listening-note {
  border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 42%, var(--border-subtle));
  border-radius: 8px;
  background: color-mix(in srgb, var(--warning, #f59e0b) 10%, var(--bg-panel-alt));
  color: var(--text-secondary);
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.4;
}

.pc-binding-subtabs {
  margin: 2px 0 14px;
  border-bottom: 1px solid var(--border-muted);
}

.pc-binding-subpane.hidden {
  display: none;
}

.pc-binding-settings-details {
  position: relative;
  flex: 0 0 auto;
}

.pc-binding-settings-details[open] {
  z-index: 4;
}

.pc-binding-settings-details summary::-webkit-details-marker {
  display: none;
}

.pc-binding-settings-gear.settings-gear {
  position: static;
  top: auto;
  right: auto;
  width: 28px !important;
  height: 28px !important;
  list-style: none;
  cursor: pointer;
}

.pc-binding-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.pc-binding-settings-card {
  max-width: min(760px, calc(100vw - 32px));
}

.pc-binding-modal-form {
  border: 0;
  padding: 0;
  background: transparent;
}

.pc-binding-settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 56px));
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-popover, 0 12px 32px rgba(15, 23, 42, 0.18));
}

.pc-binding-settings-menu .form-field {
  padding: 0;
}

.pc-binding-settings-menu input {
  width: 100%;
}

.pc-permissions-panel {
  display: grid;
  gap: 10px;
  max-width: 720px;
  padding: 2px 0;
}

.pc-role-inline-form {
  display: grid;
  width: 100%;
}

.pc-role-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
}

.pc-role-controls select {
  min-width: 0;
}

.pc-role-inline-form .detail-description {
  grid-column: 2;
  margin: 0;
}

.pc-enabled-row {
  align-self: center;
  white-space: nowrap;
}

.pc-enabled-row-top {
  min-height: 28px;
}

@media (max-width: 960px) {
  .pc-layout-grid,
  .pc-editor-grid,
  .pc-form-grid,
  .pc-binding-grid {
    grid-template-columns: 1fr;
  }

  .pc-title-actions {
    justify-content: flex-end;
  }

  .public-connection-root {
    padding-inline: 18px;
  }

  .pc-add-binding-tab {
    width: auto;
  }

  .pc-binding-settings-menu {
    right: 0;
  }

  .pc-role-controls {
    grid-template-columns: 1fr;
  }

  .pc-role-inline-form .detail-description {
    grid-column: 1;
  }
}


/* Slack integration uses shared integration panel styles. */


/* Discord integration uses shared integration panel styles. */


/* Connect integration uses shared integration panel styles. */




.integration-assistant-overview {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 16px;
}

.integration-assistant-copy {
    flex: 1 1 320px;
    min-width: 0;
}

.integration-assistant-download-card {
    flex: 1 1 340px;
    min-width: min(100%, 280px);
    max-width: 420px;
}

.integration-platform-cta-card {
    width: min(100%, 420px);
    align-self: flex-start;
}

.integration-download-feature-wrap,
.integration-cta-feature-wrap {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    max-height: 90%;
}

.integration-download-feature-overlay,
.integration-cta-feature-overlay {
    position: absolute;
    inset: 0;
    transform: none;
    border-radius: var(--button-radius) !important;
}


.public-api-add-panel,
.public-api-configured-panel,
.public-api-detail-card {
  min-width: 0;
  min-height: 0;
}

.workspace-content > .tab-pane > #publicApisTabContent,
.public-api-add-panel {
  overflow: visible;
}

.public-api-combobox-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.public-api-combobox-field {
  position: relative;
  z-index: 2;
  flex: 1 1 320px;
  min-width: min(260px, 100%);
}

.public-api-combobox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
}

.public-api-combobox:focus-within {
  border-color: var(--border-accent);
}

.public-api-combobox input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
}

.public-api-combobox input:focus {
  outline: 0;
}

.public-api-combobox-toggle {
  width: 38px;
  min-width: 38px;
  height: 100%;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0 7px 7px 0;
  background: transparent;
  color: var(--text-secondary);
}

.public-api-combobox-toggle:hover,
.public-api-combobox-toggle:focus-visible {
  background: var(--bg-hover-subtle);
  color: var(--text-primary);
  filter: none;
}

.public-api-create-small-btn {
  flex: 0 0 auto;
  min-height: 40px;
}

.public-api-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: block;
  max-height: 360px;
  padding: 4px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-popover, 0 12px 24px rgba(15, 23, 42, 0.14));
}

.public-api-dropdown-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: 90px;
  min-height: 90px;
  padding: 12px 14px;
  border: 0;
  border-radius: 6px;
  margin-bottom: 2px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  contain: layout paint;
}

.public-api-dropdown-option.is-system {
  justify-content: center;
}

.public-api-dropdown-option:not(.is-system) {
  justify-content: center;
  text-align: center;
}

.public-api-dropdown-option:hover,
.public-api-dropdown-option:focus-visible,
.public-api-dropdown-option.is-selected {
  background: var(--bg-hover-subtle);
  filter: none;
}

.public-api-dropdown-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 2em;
  line-height: 1.1;
  white-space: nowrap;
}

.public-api-system-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
}

.public-api-system-logo img {
  display: block;
  width: auto;
  max-width: var(--public-api-logo-max-width, 140px);
  max-height: var(--public-api-logo-max-height, 28px);
  object-fit: contain;
}

.public-api-dropdown-logo {
  --public-api-logo-max-width: min(190px, 86%);
  --public-api-logo-max-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.public-api-detail-heading .public-api-system-logo {
  --public-api-logo-max-width: 120px;
  --public-api-logo-max-height: 28px;
}

.public-api-dropdown-empty,
.public-api-empty,
.public-api-error,
.public-api-status {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.public-api-dropdown-empty {
  padding: 8px 10px;
}

.public-api-error {
  color: var(--text-danger-soft);
}

.public-api-detail-heading,
.public-api-chip-row,
.public-api-link-list,
.public-api-connection-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.public-api-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 10px;
}

.public-api-detail-meta-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
}

.public-api-detail-label {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.public-api-detail-value {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.public-api-chip,
.public-api-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
}

.public-api-status-badge {
  text-transform: capitalize;
}

.public-api-connection-list {
  display: grid;
  gap: 8px;
}

.public-api-connection-summary {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.public-api-configured-panel .settings-gear {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
}

.public-api-connection-row {
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
}


.public-api-connection-setup,
.public-api-connection-form,
.public-api-binding-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.public-api-connection-setup {
  padding-top: 4px;
}

.public-api-connection-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 12px;
  align-items: center;
}

.public-api-connection-options .checkbox-row {
  min-height: 28px;
  padding: 4px 0;
}

.public-api-binding-section-title {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-api-binding-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
}

.public-api-binding-copy,
.public-api-binding-controls {
  min-width: 0;
}

.public-api-binding-title {
  color: var(--text-primary);
  font-weight: 800;
}

.public-api-binding-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 8px;
  align-items: center;
}

.public-api-binding-controls input,
.public-api-binding-controls select {
  width: 100%;
  min-width: 0;
}

.public-api-required-mark {
  color: var(--text-danger-soft);
}


/* Connection settings uses shared modal, settings, and connection form primitives. */


.public-api-create-form-grid input,
.public-api-create-form-grid select,
.public-api-create-form-grid textarea {
  width: 100%;
}

#createPublicApiModal {
  z-index: 30;
}

.public-api-create-section {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}


.public-api-create-table-shell {
  max-width: 100%;
  overflow-x: auto;
}

.public-api-create-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

.public-api-create-table th,
.public-api-create-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.public-api-create-table th {
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 800;
}

.public-api-create-table input,
.public-api-create-table select {
  width: 100%;
  min-width: 110px;
}

.public-api-create-check-cell {
  text-align: center;
}

.public-api-create-check-cell input {
  width: auto;
  min-width: 0;
}


/* Runtime field editor reuses the public API create table primitives from auth_fields.css. */




[data-tab-group="workspace"][data-pane="public-apis"] {
  overflow-x: hidden;
  overflow-y: auto;
}

.public-api-tabs-shell {
  margin-bottom: 12px;
}

.public-api-tabs-empty {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 8px;
  white-space: nowrap;
}

.public-api-tabs-shell .workspace-add-btn.active {
  background: var(--bg-tab-active);
  color: var(--text-primary);
}

#publicApisTabContent {
  min-width: 0;
  min-height: 0;
}




#modelTabContent {
  scrollbar-width: thin;
}

#modelTabContent::-webkit-scrollbar {
  width: 6px;
}

.workspace-card,
.workspace-card .sidetabs-layout,
.workspace-card .workspace-content,
.workspace-content > .tab-pane,
.workspace-content > .tab-pane > [id$="TabContent"],
.workspace-content > .tab-pane > [id$="TabContent"] > .card {
  max-width: none;
  width: 100%;
}

.main-stack {
  min-height: 0;
  height: 100%;
  display: grid;
}

.workspace-card {
  padding: 0;
  overflow: visible;
  background: var(--bg-surface-strong);
  height: calc(100dvh - 110px);
  width: 100%;
}


.workspace-nav {
  width: 100%;
  min-width: 0;
  gap: 6px;
  padding-top: 16px;
}

.sidetab-group-label {
  margin: 0;
  margin-left: 6px;
  color: var(--text-muted, var(--text-secondary));

  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.sidetab-group-label-short {
  display: none;
}

.workspace-nav .sidetab-group-label-full {
  display: inline;
}

.workspace-nav .sidetab-group-label-short {
  display: none;
}

.sidetab-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidetab-group-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 100% !important;
  min-width: 0;
  margin: 12px 0 4px;
  padding: 0;
  text-align: left;
  border: none !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: none;
}

.sidetab-group:first-child .sidetab-group-toggle {
  margin-top: 0;
}

.workspace-nav .sidetab-group-toggle {
  background: transparent;
  border-left-color: transparent;
}

.workspace-nav .sidetab-group-toggle:hover,
.workspace-nav .sidetab-group-toggle:focus-visible,
.workspace-nav .sidetab-group-toggle:focus,
.workspace-nav .sidetab-group-toggle:active {
  background: transparent;
  border: none;
  box-shadow: none;
}

.sidetab-group-caret {
  display: inline-flex;
  font-size: 0.72rem;
  line-height: 1;
  flex: 0 0 auto;
  transition: transform 0.14s ease;
  color: var(--text-secondary);
}

.workspace-sidetab-group-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.workspace-content {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  padding: 10px 0 0 10px;
}

.workspace-content > .tab-pane {
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.workspace-content .section-title .title-block {
  display: flex;
  flex: 1 1 0;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
}

.workspace-content .section-title {
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.workspace-content .wf-node-section-title,
.workspace-content .badge {
  color: var(--text-primary);
}

.workspace-content .section-title .title-block p,
.workspace-content .section-title .title-block h2,
.workspace-content .section-title .title-block h3 {
  margin: 0;
}

.workspace-content .section-title .title-block .detail-description {
  flex: 1 1 280px;
  min-width: 0;
}

.workspace-content > .tab-pane > .tabs-scrollable-shell,
.workspace-content > .tab-pane > .card,
.workspace-content > .tab-pane > [id$="TabContent"] {
  flex: 0 0 auto;
  min-width: 0;
}

.workspace-content > .tab-pane > [id$="TabContent"] {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}

.workspace-content > .tab-pane > [id$="TabContent"] > .card,
.workspace-content > .tab-pane > .card {
  box-sizing: border-box;
  min-width: 0;
}

.workspace-add-btn {
  height: 30px;
  padding: 15px 15px !important;
  margin-right: 10px;
  border-radius: var(--button-radius-sm);
  color: var(--text-secondary);
  border-color: var(--border-accent-strong);
  justify-self: end;
  box-shadow: 0 1px 3px var(--accent);
  font-size: 0.75rem;
  background: var(--bg-surface-strong);
}

.workspace-add-btn:hover {
  background: var(--bg-surface-hover-alt);
  color: var(--text-primary);
}

.workspace-content > .tab-pane[data-pane="integrations"] > .card {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.permission-row,
.kb-permission-option {
  display: inline-grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: none;
  min-width: 0;
  font-size: 0.7rem;
  line-height: 1.2;
  padding-right: 2px;
}

.permission-row.is-locked,
.kb-permission-option.is-locked {
  opacity: 0.82;
}


.codebase-overview-card {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.workspace-content > .tab-pane[data-pane="codebases"] > #codebaseTabContent {
    overflow: auto;
}

.workspace-content > .tab-pane[data-pane="codebases"] > #codebaseTabContent > .codebase-overview-card:not(.codebase-detail-card) {
    overflow: auto;
}

.codebase-detail-card {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    min-height: 0;
}

.codebase-create-form,
.codebase-create-section {
    display: grid;
    gap: 12px;
}


.codebase-create-actions {
    padding-right: 44px;
}

.codebase-overview-card .dropdown-button,
#codebaseSettingsModal .dropdown-button {
    width: 100%;
    justify-content: space-between;
}

.codebase-detail-header {
    min-width: 0;
}

.codebase-detail-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.codebase-detail-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 18px;
    min-width: 0;
}

.codebase-detail-copy .detail-title,
.codebase-detail-copy .detail-description {
    margin: 0;
}

.codebase-detail-copy .detail-description {
    flex: 1 1 280px;
    min-width: 0;
}

.codebase-settings-gear {
    position: static;
    top: auto;
    right: auto;
    flex: 0 0 auto;
}

.codebase-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
}

.codebase-meta-card {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.codebase-meta-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.codebase-meta-value {
    font-size: 0.96rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.codebase-placeholder {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.codebase-detail-actions {
    display: grid;
    gap: 8px;
    flex: 0 0 auto;
}

.codebase-parse-action-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.codebase-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.codebase-panel-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.codebase-parse-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.codebase-parse-button .codebase-parse-help-tag {
    flex: 0 0 auto;
    margin-left: 2px;
}


.codebase-parse-help-tag {
    padding: 0;
    cursor: pointer;
}

.codebase-parse-help-tag::after {
    display: none;
    content: none;
}


.codebase-parse-leave-copy {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.55;
}


.codebase-parser-capabilities-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.codebase-capability-filter {
    position: relative;
    justify-self: start;
}

.codebase-capability-filter-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 86px;
    height: 32px;
    justify-content: space-between;
}

.codebase-capability-filter-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    gap: 6px;
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.codebase-capability-filter-option {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: var(--panel-radius-sm);
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 600;
}

.codebase-capability-filter-option:hover {
    background: var(--bg-hover-subtle);
}

.codebase-capability-filter-option.is-locked {
    color: var(--text-secondary);
    cursor: help;
}

.codebase-capability-filter-option input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
}

.codebase-parser-panel {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.codebase-parser-domain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.codebase-parser-language-dropdown {
    position: relative;
    min-width: 0;
}

.codebase-parser-language-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

.codebase-parser-language-button:hover,
.codebase-parser-language-button:focus-visible {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
    filter: none;
    outline: none;
}

.codebase-parser-language-logo {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.codebase-parser-language-logo-fallback {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 800;
}

.codebase-parser-language-button-label,
.codebase-parser-language-menu-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.codebase-parser-language-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    gap: 4px;
    width: max-content;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 32px));
    padding: 6px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
}

.codebase-parser-language-menu-option {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 8px 9px;
    border: 0;
    border-radius: var(--panel-radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    box-shadow: none;
}

.codebase-parser-language-menu-option:hover,
.codebase-parser-language-menu-option:focus-visible,
.codebase-parser-language-menu-option.is-selected {
    background: var(--bg-hover-subtle);
    filter: none;
    outline: none;
}

.codebase-parser-domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.codebase-parser-selected-summary {
    margin: 0;
}

.codebase-parser-selected-summary span {
    display: inline;
}

.codebase-parser-domain {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.codebase-parser-domain-title {
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.codebase-parser-option-list {
    display: grid;
    align-content: start;
    gap: 8px;
    justify-items: stretch;
}

.codebase-parser-option {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
    color: var(--text-primary);
    justify-items: start;
}

.codebase-parser-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    display: inline-grid;
    place-content: center;
    justify-self: start;
    align-self: center;
    box-shadow: 0 2px 3px var(--accent);
    transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.codebase-parser-option input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    transform: scale(0);
    border-radius: 999px;
}

.codebase-parser-option input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.codebase-parser-option input[type="checkbox"]:hover {
    filter: none;
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
    box-shadow: 0 0 0 1px var(--border-accent), 0 2px 3px var(--accent);
}

.codebase-parser-option input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

.codebase-parser-option-copy {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.codebase-parser-option-label {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    line-height: 1.2;
}

.codebase-parser-inline-field {
    display: grid;
    gap: 6px;
    margin-top: 4px;
}

.codebase-parser-route-host-field {
    align-self: end;
    margin-top: 0;
}

.codebase-parser-inline-field input:disabled {
    opacity: 0.65;
}

.codebase-parser-validation {
    color: var(--danger-600);
}


.codebase-runtime-help-modal {
    width: min(860px, 92vw);
}

.codebase-parse-help-modal-body {
    display: grid;
    gap: 14px;
}

.codebase-parse-help-tabs {
    margin-bottom: 0;
}

.codebase-parse-help-content {
    display: grid;
    gap: 14px;
    min-height: 320px;
    max-height: min(60vh, 720px);
    overflow-y: auto;
    padding: 4px 2px 4px 0;
}

.codebase-parse-help-pane {
    display: grid;
    gap: 14px;
}

.codebase-parse-help-intro {
    color: var(--text-primary);
    line-height: 1.55;
}

.codebase-parse-help-section {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.codebase-parse-help-section-title {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text-primary);
}

.codebase-parse-help-list {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.codebase-parse-help-codeblock {
    margin: 0;
    overflow-x: auto;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: color-mix(in srgb, var(--bg-surface) 85%, black 15%);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.5;
}


.codebase-inline-link {
    display: inline;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 0.16em;
    white-space: normal;
    opacity: 1;
    box-shadow: none;
}

.codebase-inline-link:hover,
.codebase-inline-link:focus-visible {
    background: transparent;
    color: var(--accent);
    filter: none;
    text-decoration-color: var(--accent);
    outline: none;
}

.codebase-inline-link:focus-visible {
    box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 55%, transparent);
}

.codebase-parser-report-callout {
    padding: 8px 10px 2px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
    text-align: center;
    overflow-wrap: anywhere;
}

.codebase-parser-report-modal {
    width: min(820px, 94vw);
}

.codebase-parser-report-body {
    display: grid;
    gap: 14px;
}

.codebase-parser-report-grid {
    margin-bottom: 0;
}

.codebase-parser-report-dropdown {
    position: relative;
    min-width: 0;
}

.codebase-parser-report-dropdown-button {
    width: 100%;
    max-width: none;
    justify-content: space-between;
}

.codebase-parser-report-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 8;
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.codebase-parser-report-parser-list {
    display: grid;
    gap: 12px;
}

.codebase-parser-report-option-group {
    display: grid;
    gap: 8px;
}

.codebase-parser-report-option-group-title {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.codebase-parser-report-option {
    padding: 4px 2px;
}

.codebase-parser-report-description {
    min-height: 320px;
    font-family: var(--font-mono);
}

.codebase-parser-report-validation {
    color: var(--danger-600);
}

.codebase-parse-summary-notification {
    display: grid;
    gap: 12px;
}

.codebase-parse-summary-lines {
    white-space: pre-line;
}

.codebase-parser-report-summary-footer {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}


.codebase-route-list {
    display: grid;
    gap: 10px;
    min-height: 400px;
    max-height: min(60vh, 720px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.codebase-route-row {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-elevated);
}

.codebase-route-title {
    font-weight: 600;
    color: var(--text-primary);
}

.codebase-route-meta {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.codebase-route-source {
    font-family: var(--font-mono);
    overflow-wrap: anywhere;
}

.codebase-route-sentinel {
    width: 100%;
    height: 1px;
}


.codebase-ui-artifact-row {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-elevated);
}

.codebase-ui-artifact-title {
    font-weight: 600;
    color: var(--text-primary);
}

.codebase-ui-artifact-meta {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.codebase-ui-artifact-preview {
    font-size: 0.84rem;
    color: var(--text-tertiary);
    line-height: 1.45;
}

.codebase-ui-skip-summary {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.codebase-ui-skip-summary-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.codebase-ui-skip-summary-list {
    display: grid;
    gap: 4px;
}

.codebase-ui-skip-summary-item,
.codebase-ui-skip-summary-note {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.codebase-ui-artifact-sentinel {
    width: 100%;
    height: 1px;
}

.codebase-ui-summary {
    display: grid;
    gap: 12px;
}

.codebase-ui-summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.codebase-ui-summary-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-elevated);
}

.codebase-ui-summary-chip-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.codebase-ui-summary-chip-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.codebase-ui-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.codebase-ui-summary-card {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-elevated);
}

.codebase-ui-summary-card-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
}

.codebase-ui-summary-list {
    display: grid;
    gap: 6px;
}

.codebase-ui-summary-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
}

.codebase-ui-summary-item-label {
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.codebase-ui-summary-item-value {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


/* Codebase settings modal uses shared modal, form, tab, settings, and permission primitives. */


.codebase-source-card,
.codebase-routes-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.codebase-detail-card .codebase-source-card,
.codebase-detail-card .codebase-routes-card {
    min-height: 0;
}

.codebase-detail-card .codebase-routes-card {
    flex: 0 0 auto;
    overflow: hidden;
}

.codebase-source-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.codebase-auto-parse-panel {
    display: grid;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.codebase-auto-parse-panel input[list]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
}


.codebase-github-status.is-error {
    color: var(--danger-600);
}


.codebase-graph-trigger {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    line-height: 0;
}

.codebase-graph-trigger .graph-icon {
    width: 35px !important;
    height: 35px !important;
}

.codebase-ui-graph-modal {
    width: min(1680px, 96vw);
    max-height: 94vh;
}

.codebase-ui-graph-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    overflow-x: hidden;
}

.codebase-ui-graph-settings-pane {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.codebase-ui-graph-settings-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.codebase-ui-graph-toolbar {
    display: grid;
    flex: 0 0 auto;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-auto-rows: max-content;
    gap: 12px;
    align-items: start;
    align-content: start;
}

.codebase-ui-graph-search-field {
    min-width: 0;
    grid-column: 1 / -1;
    width: 100%;
}

.codebase-ui-graph-search-input-shell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    background: var(--bg-surface);
}

.codebase-ui-graph-search-input-shell:focus-within {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--border-accent) 45%, transparent);
}

.codebase-ui-graph-search-icon {
    flex: 0 0 auto;
    color: var(--text-secondary);
    pointer-events: none;
}

.codebase-ui-graph-search-input {
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.codebase-ui-graph-search-input:focus,
.codebase-ui-graph-search-input:focus-visible {
    outline: none;
    box-shadow: none;
}

.codebase-ui-graph-filter-field {
    min-width: 0;
}

.codebase-ui-graph-checkbox-dropdown {
    position: relative;
    min-width: 0;
}

.codebase-ui-graph-dropdown-button {
    width: 100%;
    max-width: none;
}

.codebase-ui-graph-dropdown-caret {
    flex: 0 0 auto;
    color: var(--text-secondary);
}

.codebase-ui-graph-checkbox-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 12;
    max-height: 224px;
    padding: 8px;
    overflow: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.codebase-ui-graph-checkbox-dropdown-list {
    display: grid;
    gap: 6px;
}

.codebase-ui-graph-checkbox-option {
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-page) 55%, transparent);
}

.codebase-ui-graph-checkbox-option:hover {
    border-color: var(--border-subtle);
    background: var(--bg-hover-subtle);
}

.codebase-ui-graph-checkbox-dropdown-empty {
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.codebase-ui-graph-toggle-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    align-content: start;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    background: var(--bg-surface);
    grid-column: 1 / -1;
}

.codebase-ui-graph-warning-list {
    display: grid;
    gap: 8px;
}

.codebase-ui-graph-warning-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--border-accent) 38%, var(--border-subtle));
    border-radius: var(--panel-radius);
    background: color-mix(in srgb, var(--bg-surface) 88%, var(--bg-page));
    color: var(--text-primary);
}

.codebase-ui-graph-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.codebase-ui-graph-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.codebase-ui-graph-chip-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.codebase-ui-graph-chip-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.codebase-ui-graph-layout {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    height: clamp(300px, 40vh, 460px);
    max-height: clamp(300px, 40vh, 460px);
    min-height: 0;
}

.codebase-ui-graph-canvas-shell,
.codebase-ui-graph-inspector {
    min-height: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius);
    background: color-mix(in srgb, var(--bg-surface) 84%, var(--bg-page));
    box-shadow: var(--shadow-sm);
}

.codebase-ui-graph-canvas-shell {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 320px;
    overflow: hidden;
    cursor: grab;
}

.codebase-ui-graph-overlay-bar {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: calc(100% - 120px);
    min-height: 0;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 26%, var(--border-subtle));
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-panel) 94%, rgba(0, 0, 0, 0.08));
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    backdrop-filter: blur(6px);
}

.codebase-ui-graph-overlay-metrics {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.codebase-ui-graph-overlay-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    line-height: 1.45;
}

.codebase-ui-graph-overlay-metric-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    min-width: 0;
}

.codebase-ui-graph-overlay-metric-value {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.codebase-ui-graph-overlay-warning-slot {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    flex: 0 0 auto;
}

.codebase-ui-graph-overlay-warning-slot .warning-tag,
.codebase-ui-graph-overlay-metric-label .info-tag {
    flex: 0 0 auto;
}

.codebase-ui-graph-canvas-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.codebase-ui-graph-canvas-action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
}

.codebase-ui-graph-canvas-action-btn > span {
    pointer-events: none;
}

.codebase-ui-graph-canvas-shell:active {
    cursor: grabbing;
}

.codebase-ui-graph-svg {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    touch-action: none;
}

.codebase-ui-graph-arrow-head {
    fill: currentColor;
    color: color-mix(in srgb, var(--text-muted) 82%, var(--border-accent));
}

.codebase-ui-graph-column-bg {
    fill: color-mix(in srgb, var(--bg-page) 82%, transparent);
    stroke: color-mix(in srgb, var(--border-subtle) 80%, transparent);
    stroke-width: 1;
}

.codebase-ui-graph-column-label {
    fill: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.codebase-ui-graph-edge {
    fill: none;
    stroke: color-mix(in srgb, var(--text-muted) 78%, var(--border-accent));
    stroke-width: 1.8;
    opacity: 0.58;
    transition: stroke-width 0.14s ease, opacity 0.14s ease;
    cursor: pointer;
}

.codebase-ui-graph-edge.is-low-confidence {
    stroke-dasharray: 6 4;
}

.codebase-ui-graph-edge.is-selected,
.codebase-ui-graph-edge.is-connected {
    stroke-width: 2.6;
    opacity: 1;
}

.codebase-ui-graph-edge.is-search-dim {
    opacity: 0.16;
}

.codebase-ui-graph-edge.edge-rel-opens,
.codebase-ui-graph-edge.edge-rel-triggers,
.codebase-ui-graph-edge.edge-rel-submits {
    stroke: color-mix(in srgb, var(--accent) 82%, var(--text-primary));
}

.codebase-ui-graph-edge.edge-rel-calls-api,
.codebase-ui-graph-edge.edge-rel-matches-backend-route,
.codebase-ui-graph-edge.edge-rel-uses-request-schema,
.codebase-ui-graph-edge.edge-rel-uses-response-schema {
    stroke: color-mix(in srgb, var(--border-accent) 76%, var(--text-primary));
}

.codebase-ui-graph-edge.edge-rel-labels,
.codebase-ui-graph-edge.edge-rel-maps-to-payload-field {
    stroke: color-mix(in srgb, var(--text-primary) 70%, var(--accent));
}

.codebase-ui-graph-node {
    cursor: pointer;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.codebase-ui-graph-node rect {
    fill: var(--bg-surface);
    stroke: var(--border-subtle);
    stroke-width: 1.2;
}

.codebase-ui-graph-node.is-selected rect,
.codebase-ui-graph-node.is-neighbor rect {
    stroke: var(--border-accent);
    stroke-width: 2;
}

.codebase-ui-graph-node.is-search-dim {
    opacity: 0.22;
}

.codebase-ui-graph-node.is-search-match rect {
    fill: color-mix(in srgb, var(--accent) 10%, var(--bg-surface));
}

.codebase-ui-graph-node.has-gap rect {
    stroke: color-mix(in srgb, var(--border-accent) 70%, var(--text-primary));
}

.codebase-ui-graph-node-label,
.codebase-ui-graph-node-type {
    pointer-events: none;
}

.codebase-ui-graph-node-label {
    fill: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

.codebase-ui-graph-node-type {
    fill: var(--text-secondary);
    font-size: 11px;
    text-transform: capitalize;
}

.codebase-ui-graph-node-gap-dot {
    fill: color-mix(in srgb, var(--accent) 65%, var(--text-primary));
}

.codebase-ui-graph-empty-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: var(--text-secondary);
    text-align: center;
    background: color-mix(in srgb, var(--bg-page) 14%, transparent);
}

.codebase-ui-graph-tooltip {
    position: absolute;
    z-index: 2;
    max-width: 280px;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.78rem;
    line-height: 1.35;
    box-shadow: var(--shadow-sm);
    pointer-events: none;
}

.codebase-ui-graph-inspector {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 7;
    width: min(360px, calc(100vw - 24px));
    max-height: min(72vh, calc(100vh - 24px));
    display: none;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    cursor: default;
    pointer-events: auto;
}

.codebase-ui-graph-inspector.is-visible {
    display: grid;
}

.codebase-ui-graph-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--bg-surface) 92%, var(--bg-page));
    cursor: grab;
    user-select: none;
}

.codebase-ui-graph-inspector-header:active {
    cursor: grabbing;
}

.codebase-ui-graph-inspector-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1;
}

.codebase-ui-graph-inspector-close:hover,
.codebase-ui-graph-inspector-close:focus-visible {
    border-color: var(--border-subtle);
    background: color-mix(in srgb, var(--bg-page) 82%, var(--accent));
    color: var(--text-primary);
    filter: none;
}

.codebase-ui-graph-inspector-body {
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px;
    padding-right: 10px;
}

.codebase-ui-graph-inspector-stack {
    display: grid;
    gap: 10px;
}

.codebase-ui-graph-inspector-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.codebase-ui-graph-inspector-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.codebase-ui-graph-inspector-section {
    display: grid;
    gap: 8px;
}

.codebase-ui-graph-inspector-list {
    display: grid;
    gap: 8px;
}

.codebase-ui-graph-inspector-list-item,
.codebase-ui-graph-inspector-edge-btn,
.codebase-ui-graph-link-btn {
    width: 100%;
}

.codebase-ui-graph-inspector-list-item {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-page);
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.4;
}

.codebase-ui-graph-inspector-edge-btn,
.codebase-ui-graph-link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-page);
    color: var(--text-primary);
    text-align: left;
}

.codebase-ui-graph-inspector-edge-btn {
    justify-content: flex-start;
}

.codebase-ui-graph-inspector-edge-label,
.codebase-ui-graph-inspector-edge-target {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.codebase-ui-graph-inspector-edge-label {
    flex: 0 1 44%;
    color: var(--text-primary);
}

.codebase-ui-graph-inspector-edge-btn:hover,
.codebase-ui-graph-link-btn:hover,
.codebase-ui-graph-inspector-edge-btn:focus-visible,
.codebase-ui-graph-link-btn:focus-visible {
    border-color: var(--border-accent);
    background: color-mix(in srgb, var(--bg-page) 82%, var(--accent));
    filter: none;
}

.codebase-ui-graph-inspector-edge-target {
    flex: 1 1 auto;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: right;
}

.codebase-ui-graph-metadata-grid {
    display: grid;
    gap: 8px;
}

.codebase-ui-graph-metadata-row {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: var(--bg-page);
}

.codebase-ui-graph-metadata-key {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.codebase-ui-graph-metadata-value {
    font-size: 0.82rem;
    color: var(--text-primary);
    word-break: break-word;
}

@media (max-width: 1400px) {
    .codebase-ui-graph-overlay-bar {
        max-width: calc(100% - 112px);
    }

    .codebase-ui-graph-inspector {
        width: min(340px, calc(100vw - 24px));
    }
}

@media (max-width: 980px) {
    .codebase-ui-graph-overlay-bar {
        top: 12px;
        left: 12px;
        gap: 10px;
        max-width: calc(100% - 104px);
        padding: 8px 10px;
    }

    .codebase-ui-graph-overlay-metrics {
        gap: 10px;
    }

    .codebase-ui-graph-inspector {
        width: calc(100vw - 24px);
        max-height: min(68vh, calc(100vh - 24px));
    }

    .codebase-ui-graph-canvas-actions {
        top: 12px;
        right: 12px;
    }
}


.reusable-node-type-action [data-reusable-node-llm-shell],
.reusable-node-type-action [data-reusable-node-codebase-shell],
.reusable-node-type-action [data-reusable-node-request-schema-shell],
.reusable-node-type-action [data-reusable-node-runtime-body-shell],
.reusable-node-type-action [data-reusable-node-response-schema-shell],
.reusable-node-type-action [data-reusable-node-http-url-shell] {
    display: grid;
    gap: 12px;
}


.reusable-node-type-clarify {
    max-width: 280px;
}


.reusable-node-type-failure {
    gap: 14px;
}


.reusable-node-type-generic details summary {
    cursor: pointer;
}


.reusable-node-type-knowledge-base .reusable-node-row-list {
    justify-items: start;
}

.reusable-node-type-knowledge-base .reusable-node-kb-row {
    display: inline-flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    gap: 16px;
}

.reusable-node-type-knowledge-base .reusable-node-kb-toggle {
    display: inline-flex;
    align-items: start;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
}

.reusable-node-type-knowledge-base .reusable-node-kb-toggle input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.reusable-node-type-knowledge-base .reusable-node-kb-name {
    display: block;
    flex: 0 1 auto;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: normal;
}

.reusable-node-type-knowledge-base .reusable-node-kb-top-k-field {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    align-content: start;
    gap: 4px;
    min-width: 0;
    flex: 0 0 auto;
    margin-top: 1px;
}

.reusable-node-type-knowledge-base .reusable-node-kb-top-k-label {
    height: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    align-items: flex-start !important;
}

.reusable-node-type-knowledge-base .reusable-node-kb-top-k-input {
    width: 88px;
}


.reusable-node-type-knowledge-base-reranker {
    gap: 14px;
}


.reusable-node-type-presets .reusable-node-preset-header {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.reusable-node-type-presets .reusable-node-preset-weight {
    width: 100%;
}


.reusable-node-type-validate {
    gap: 14px;
}


.reusable-node-type-router-llm {
    gap: 14px;
}


.reusable-node-type-rules-router {
    gap: 14px;
}




.reusable-node-editor-card,
.reusable-node-editor-shell,
.reusable-node-section {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.reusable-node-editor-card {
    padding-bottom: 16px;
}

.reusable-node-detail-header {
    gap: 6px;
}

.reusable-node-detail-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.reusable-node-detail-title {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 18px;
    min-width: 0;
}

.reusable-node-detail-title .detail-title,
.reusable-node-detail-title .detail-description {
    margin: 0;
}

.reusable-node-detail-title .detail-description {
    flex: 1 1 280px;
    min-width: 0;
}

.reusable-node-detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-left: 0;
    flex: 0 0 auto;
}

.reusable-node-settings-gear {
    position: static;
    top: auto;
    right: auto;
    flex: 0 0 auto;
}

.reusable-node-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.reusable-node-meta-card {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.reusable-node-meta-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.reusable-node-meta-value {
    font-size: 0.96rem;
    color: var(--text-primary);
}

.reusable-node-impact {
    padding: 12px 14px;
    border: 1px solid var(--border-accent);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.reusable-node-usage-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reusable-node-usage-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.reusable-node-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    min-width: 0;
}

.reusable-node-form-grid-single {
    grid-template-columns: minmax(0, 280px);
}

.reusable-node-inline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.reusable-node-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.reusable-node-row-list {
    display: grid;
    gap: 10px;
}

.reusable-node-textarea-lg,
.reusable-node-json-textarea {
    min-height: 180px;
    width: 100%;
}

.reusable-node-json-preview {
    margin: 0;
    padding: 12px;
    overflow: auto;
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface-strong);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    line-height: 1.45;
}

.reusable-node-editor-empty {
    padding: 18px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    color: var(--text-secondary);
    background: var(--bg-surface);
}


.branch {
    --workflow-branch-padding: 50px;
    --workflow-branch-extra-top: 0px;
    --workflow-action-branch-headroom: 56px;
    --workflow-action-branch-intercept-headroom: 140px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    width: max-content;
    min-width: 220px;
    min-height: 140px;
    padding: var(--workflow-branch-padding);
    padding-top: calc(var(--workflow-branch-padding) + var(--workflow-branch-extra-top));
    padding-right: calc(var(--workflow-branch-padding) + 20px);
    border-radius: calc(var(--panel-radius) + 6px);

    background: var(--tinted);
    border: 1px solid var(--border-subtle);
    /* Keep branch shells out of the stacking game so individual nodes/support
       layers can compare z-index directly across sibling branches. */
    z-index: auto;
}

.branch-runtime-active {
    z-index: auto;
}

.branch-active {
    z-index: auto;
}

.branch-active.branch-runtime-active {
    z-index: auto;
}

.branch[data-branch-root-type="action"] {
    /* Reserve headroom for future intercept nodes above action cards. */
    --workflow-branch-extra-top: var(--workflow-action-branch-headroom);
}

.branch[data-branch-root-type="action"][data-branch-has-intercept="1"] {
    --workflow-branch-extra-top: var(--workflow-action-branch-intercept-headroom);
}

.branch-intercept-slot {
    position: absolute;
    top: 51px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--workflow-tree-z-base, 0);
    display: inline-flex;
    justify-content: center;
    pointer-events: none;
}

.branch-intercept-slot-runtime-active {
    z-index: var(--workflow-tree-z-runtime, 6);
}

.branch-intercept-slot-active {
    z-index: var(--workflow-tree-z-active, 1000);
}

.branch-intercept-slot-active.branch-intercept-slot-runtime-active {
    z-index: var(--workflow-tree-z-active-runtime, 1100);
}

.branch-intercept-slot > * {
    pointer-events: auto;
}

.branch-children {
    display: inline-flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    width: max-content;
}

.workflow-root-branches {
    --workflow-support-spacer-height: 150px;
    position: relative;
    display: flex;
    width: 100%;
    min-width: 100%;
    z-index: 1;
}

.workflow-root-branches > .branch {
    box-sizing: border-box;
    min-width: 100%;
}

.branch-node-stack {
    position: relative;
    z-index: var(--workflow-tree-z-base, 0);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: max-content;
}

.branch-node-stack-active {
    z-index: var(--workflow-tree-z-active, 1000);
}

.branch-node-stack-runtime-active {
    z-index: var(--workflow-tree-z-runtime, 6);
}

.branch-node-stack-active.branch-node-stack-runtime-active {
    z-index: var(--workflow-tree-z-active-runtime, 1100);
}

.branch-node-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: max-content;
}

.branch-main-node {
    position: relative;
    z-index: var(--workflow-tree-z-base, 0);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
}

.branch-main-node-active {
    z-index: var(--workflow-tree-z-active, 1000);
}

.branch-main-node-runtime-active {
    z-index: var(--workflow-tree-z-runtime, 6);
}

.branch-main-node-active.branch-main-node-runtime-active {
    z-index: var(--workflow-tree-z-active-runtime, 1100);
}

.branch-support-spacer {
    width: 340px;
    min-width: 320px;
    height: var(--workflow-support-spacer-height);
    visibility: hidden;
    pointer-events: none;
}

.branch-support-slot {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 1px;
    align-items: center;
}

.branch-support-slot-left {
    justify-content: flex-end;
}

.branch-support-slot-right {
    justify-content: flex-start;
}

.branch-support-abs {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: none;
    z-index: var(--workflow-tree-z-base, 0);
}

.branch-support-abs-active {
    z-index: var(--workflow-tree-z-active, 1000);
}

.branch-support-abs-runtime-active {
    z-index: var(--workflow-tree-z-runtime, 6);
}

.branch-support-abs-active.branch-support-abs-runtime-active {
    z-index: var(--workflow-tree-z-active-runtime, 1100);
}

.branch-support-abs > * {
    pointer-events: auto;
}

.branch-support-abs-left {
    right: 48px;
    align-items: flex-end;
}

.branch-support-abs-horizontal {
    top: 50%;
    transform: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
}

.branch-support-abs-right {
    left: 0;
    align-items: flex-start;
}

.branch-support-item {
    display: flex;
}

.branch-support-item-horizontal {
    transform: translateY(-50%);
}

.branch-support-item-kb-offset {
    transform: translateY(30px);
}

.branch-support-item-codebase-offset {
    transform: translateY(-30px);
}

.branch-support-item-runtime-fields-offset {
    transform: translate(80px, -75px);
}

.branch-support-item-horizontal.branch-support-item-kb-offset {
    transform: translateY(calc(-50% + 30px));
}

.branch-support-item-horizontal.branch-support-item-codebase-offset {
    transform: translateY(calc(-50% - 30px));
}

.workflow-tree-scroller {
    -webkit-overflow-scrolling: touch;
}

.workflow-tree-connectors {
    position: absolute;
    inset: 0;
    color: var(--accent);
    pointer-events: none;
    overflow: visible;
    z-index: 0;
}

.workflow-tree-connector {
    opacity: 0.95;
}

.workflow-tree-connector-support {
    opacity: 0.55;
}

.workflow-tree-connector-intercept {
    opacity: 0.8;
}



.workflow-node {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 220px;
    max-width: 260px;
    border: 1px solid var(--border-muted);
    border-radius: var(--panel-radius);
    background: var(--bg-surface-strong);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    overflow: visible;
    transition:
            transform 0.16s ease,
            border-color 0.16s ease,
            box-shadow 0.16s ease,
            background 0.16s ease;
}

.workflow-node.workflow-node-router_rules,
.workflow-node.workflow-node-action,
.workflow-node.workflow-node-router_llm,
.workflow-node.workflow-node-validate,
.workflow-node.workflow-node-failure {
    min-height: var(--workflow-support-spacer-height, 150px);
}

.workflow-node:hover {
    z-index: var(--workflow-tree-z-hover, 3);
    transform: translateY(-1px);
    border-color: var(--border-accent);
}

.workflow-node.workflow-node-input {
    min-height: 232px;
}

.workflow-node.workflow-node-input .node-panel {
    padding: 40px 25px 12px 25px;
}

.workflow-node:focus-within {
    z-index: var(--workflow-tree-z-hover, 3);
}

.workflow-node.active {
    z-index: var(--workflow-tree-z-active, 1000);
    border-color: var(--border-accent-strong);
    box-shadow:
            0 0 0 1px var(--accent),
            0 0 12px rgba(255, 200, 80, 0.35),
            0 0 28px rgba(255, 160, 40, 0.25);
}

.workflow-node.workflow-node-action.active,
.workflow-node.workflow-node-action.runtime-active {
    min-width: 506px;
    max-width: 598px;
}

.workflow-node.workflow-node-router_llm.active,
.workflow-node.workflow-node-router_llm.runtime-active,
.workflow-node.workflow-node-router_rules.active,
.workflow-node.workflow-node-router_rules.runtime-active {
    min-width: 440px;
    max-width: 520px;
}

.workflow-node.workflow-node-validate.active,
.workflow-node.workflow-node-validate.runtime-active,
.workflow-node.workflow-node-failure.active,
.workflow-node.workflow-node-failure.runtime-active {
    min-width: 440px;
    max-width: 520px;
}

.workflow-node.workflow-node-presets.active,
.workflow-node.workflow-node-presets.runtime-active {
    min-width: 440px;
    max-width: 520px;
}

.workflow-node.workflow-node-runtime_fields.active,
.workflow-node.workflow-node-runtime_fields.runtime-active {
    min-width: 430px;
    max-width: 520px;
}

.workflow-node.workflow-node-knowledge_base.active,
.workflow-node.workflow-node-knowledge_base.runtime-active,
.workflow-node.workflow-node-codebase.active,
.workflow-node.workflow-node-codebase.runtime-active {
    min-width: 430px;
    max-width: 520px;
}

.workflow-node.workflow-node-action.runtime-citations-open {
    min-width: 1048px;
    max-width: 1224px;
}

.workflow-node.inactive {
    opacity: 0.92;
}

.node-panel {
    position: relative;
    flex: 1 1 auto;
    padding: 18px 25px 25px 25px;
}

.workflow-node.active:not(.workflow-node-input):not(.workflow-node-presets):not(.workflow-node-codebase):not(.workflow-node-knowledge_base):not(.workflow-node-knowledge_base_reranker) .node-panel {
    padding-top: 40px;
}

.node-active-panel {
    overflow: hidden;
    max-height: 500px;
    padding: 0 14px 14px 14px;
    border-top: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
    opacity: 1;
    transition:
            max-height 0.16s ease,
            padding 0.16s ease,
            opacity 0.12s ease,
            border-color 0.16s ease;
}

.node-active-panel.is-hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
    opacity: 0;
    pointer-events: none;
}

.node-active-panel.is-visible {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
}

.workflow-node.workflow-node-input .input-active-panel {
    padding: 0;
    border-top-color: transparent;
    background: transparent;
}

.workflow-node.workflow-node-action .node-active-panel.is-visible,
.workflow-node.workflow-node-failure .node-active-panel.is-visible,
.workflow-node.workflow-node-runtime_fields .node-active-panel.is-visible,
.workflow-node.workflow-node-knowledge_base .node-active-panel.is-visible,
.workflow-node.workflow-node-codebase .node-active-panel.is-visible {
    max-height: 575px;
    overflow-y: auto;
    overflow-x: hidden;
}

.node-runtime-panel {
    padding: 12px 14px 14px 14px;
    border-top: 1px solid var(--border-success);
    background: color-mix(in srgb, var(--bg-surface) 84%, var(--border-success) 8%);
}

.wf-node-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.wf-node-runtime-content,
.wf-node-runtime-section,
.action-runtime-shell,
.action-runtime-panel,
.action-runtime-citations-panel .wf-node-runtime-citations,
.wf-node-runtime-citation-list {
    min-width: 0;
}

.wf-node-runtime-output {
    width: 100%;
    max-height: 220px;
    margin: 0;
    padding: 10px 12px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.45;
}

.wf-node-runtime-source-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.wf-node-runtime-source-title {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.wf-node-runtime-source-count {
    flex: 0 0 auto;
    font-size: 0.74rem;
    white-space: nowrap;
}

.wf-node-runtime-source-list {
    max-height: 440px;
    overflow: auto;
    padding-right: 4px;
}

.wf-node-document-write-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    cursor: pointer;
}

.wf-node-document-write-menu {
    max-height: 220px;
    padding: 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
}

.wf-node-document-write-row {
    width: 100%;
    max-width: none;
    padding: 6px 4px;
}

.wf-node-document-write-title {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
}

.action-runtime-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    min-width: 0;
}

.workflow-node.workflow-node-action.runtime-citations-open .action-runtime-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-runtime-panel {
    max-height: 560px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    overflow: auto;
}

.action-runtime-output-pre,
.action-runtime-citations-panel .wf-node-runtime-citation-list {
    flex: 1 1 auto;
}

.action-runtime-citations-panel .wf-node-runtime-citations {
    height: 100%;
}

.action-runtime-citations-panel .wf-node-runtime-citation-list {
    overflow: auto;
    padding-right: 4px;
}

.action-runtime-output-empty {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-runtime-footer {
    display: flex;
    justify-content: flex-end;
}

.action-runtime-toggle-btn.hidden,
.action-runtime-citations-panel.hidden {
    display: none;
}

.wf-node-runtime-json-output {
    width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.wf-node-runtime-json-summary {
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.wf-node-runtime-json-output[open] .wf-node-runtime-json-summary {
    border-bottom: 1px solid var(--border-subtle);
}

.wf-node-runtime-json-pre {
    width: 100%;
    max-height: 260px;
    margin: 0;
    padding: 10px 12px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    line-height: 1.45;
}

.node-side-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.node-side-btn-left {
    width: fit-content;
    left: 0;
    transform: translate(-60%, -50%);
}

.node-side-btn-left-stack {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-60%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.node-side-btn-left-slot {
    display: flex;
    align-items: stretch;
}

.node-side-btn-left-slot > .workflow-node-add-btn {
    width: 100%;
}

.node-side-btn-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.node-side-btn-right-stack {
    position: absolute;
    top: 25%;
    right: 0;
    transform: translateX(60%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.node-side-btn-right-center {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(calc(100% - 7px), -50%);
    z-index: 5;
}

.node-bottom-btn-row {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 60%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.workflow-node-add-btn {
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
}

.workflow-node-add-btn:hover {
    background: var(--bg-hover-subtle);
    border-color: var(--border-accent);
    filter: none;
}

.input-runtime-fields-add-btn {
    position: absolute;
    top: 15px;
    right: 24px;
    z-index: 5;
    height: 22px;
    min-height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}

.input-runtime-fields-add-btn:hover {
    border-style: dashed;
}

.workflow-node-add-btn.node-side-btn-left:disabled {
    transform: translate(-60%, -50%);
}

.workflow-node-add-btn.node-side-btn-right-center:disabled {
    transform: translate(calc(100% - 7px), -50%);
}

.workflow-node-primary-btn {
    padding: 3px 8px;
}

.workflow-node-primary-btn > .save-icon {
    flex: 0 0 auto;
    pointer-events: none;
}

.node-type-pill {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2px 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-accent);
    white-space: nowrap;
    cursor: help;
}

.node-type-pill[data-type="input"],
.node-type-pill[data-type="router_rules"],
.node-type-pill[data-type="action"] {
    padding: 2px 20px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transform: translate(-50%, -65%);
    border-radius: 0;
    background: var(--bg-surface-strong);
}

.node-type-pill[data-type="input"] {
    border-color: var(--border-accent-strong);
    background: color-mix(in srgb, var(--accent) 14%, var(--bg-surface));
    box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.22),
            0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}

.node-type-pill[data-type="router_rules"] {
    border-color: var(--border-accent);
    background: color-mix(in srgb, var(--bg-surface-hover) 72%, var(--accent) 10%);
    box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.22),
            inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.node-type-pill[data-type="action"] {
    border-color: color-mix(in srgb, var(--accent-strong) 60%, var(--border-muted));
    background: color-mix(in srgb, var(--bg-surface-strong) 82%, var(--accent) 12%);
    box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.22),
            0 0 14px color-mix(in srgb, var(--accent-strong) 35%, transparent);
}

.node-top-left,
.node-top-right {
    position: absolute;
    top: -10px;
    display: flex;
    gap: 6px;
    z-index: 6;
}

.node-top-left {
    left: 4px;
    top: 4px;
}

.node-top-right {
    right: 8px;
}

.workflow-node-top-btn {
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    height: 22px;
    border-color: var(--border-muted);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.workflow-node-top-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.workflow-node-top-btn > .folder-icon,
.workflow-node-top-btn > .save-icon {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 auto;
    pointer-events: none;
}

.workflow-node-top-btn > .chat-icon {
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 auto;
    pointer-events: none;
}

.node-active-footer {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.node-reusable-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.node-description-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    gap: 6px;
}

.node-description {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.35;
    text-align: center;
}

.node-prompt-preview-shell {
    display: flex;
    justify-content: center;
    padding: 0 10px 10px 10px;
}

.node-prompt-preview-row {
    width: 90%;
    min-height: 110px;
    max-height: 160px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
    overflow: auto;
}

.node-prompt-preview {
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.45;
    word-break: break-word;
}

.node-prompt-preview-line {
    white-space: pre-wrap;
}

.node-prompt-preview-empty {
    min-height: 0.72rem;
}

.node-prompt-preview-heading {
    margin: 0.28rem 0 0.16rem 0;
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.2;
}

.node-prompt-preview-heading:first-child {
    margin-top: 0;
}

.node-prompt-preview-heading-2 {
    font-size: 0.9rem;
}

.node-prompt-preview-heading-3 {
    font-size: 0.8rem;
}

.node-router-summary-shell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 14px 12px 14px;
}

.node-router-summary-row {
    padding: 7px 9px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
}

.node-router-summary-inline {
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 0;
}

.node-router-summary-label {
    flex: 0 0 auto;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.node-router-summary-sep {
    flex: 0 0 auto;
    font-size: 0.76rem;
}

.node-router-summary-intent {
    min-width: 0;
    font-size: 0.73rem;
    line-height: 1.35;
}

.node-router-summary-empty {
    font-size: 0.8rem;
    text-align: center;
}

.node-trigger-rules-summary-shell {
    min-width: 0;
    padding: 0 14px 12px 14px;
}

.node-trigger-rules-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    padding-right: 2px;
}

.node-trigger-rule-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-surface);
}

.node-trigger-rule-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    line-height: 1.2;
}

.node-trigger-rule-text {
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.node-trigger-rules-empty {
    padding: 8px 6px;
    font-size: 0.8rem;
    text-align: center;
}

.node-summary-glyph {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.node-meta {
    font-size: 0.76rem;
    line-height: 1.25;
    word-break: break-word;
    text-align: center;
}

.node-meta-reusable {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.node-reusable-id-value {
    color: var(--accent);
}

.node-reusable-usage {
    max-width: 100%;
    font-size: 0.68rem;
    line-height: 1.25;
    text-align: center;
}

.workflow-node-inline-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--accent);
    box-shadow: none;
    opacity: 0.75;
    flex: 0 0 auto;
}

button.workflow-node-inline-icon-btn {
    cursor: pointer;
}

.workflow-node-inline-icon-btn:hover {
    background: var(--bg-hover-subtle);
    border-color: var(--border-accent);
    filter: none;
    opacity: 1;
}

.workflow-node-inline-icon-btn > .pencil-icon,
.workflow-node-inline-icon-btn > .play-icon,
.workflow-node-inline-icon-btn > .trash-icon,
.workflow-node-inline-icon-btn > .refresh-icon,
.workflow-node-inline-icon-btn > .folder-icon,
.workflow-node-inline-icon-btn > .save-icon {
    width: 11px !important;
    height: 11px !important;
    flex: 0 0 auto;
    pointer-events: none;
}

.runtime-fields-panel {
    min-width: 0;
    gap: 8px;
}

.runtime-fields-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.runtime-fields-node-add-btn {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
}

.runtime-fields-table-shell {
    gap: 0;
    max-height: clamp(150px, 28vh, 260px);
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border-soft);
    border-radius: var(--panel-radius);
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
}

.runtime-fields-table-row {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) 28px;
    gap: 10px;
    align-items: start;
    min-width: 360px;
    padding: 10px 12px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.8rem;
}

.runtime-fields-table-row:first-child {
    border-top: none;
}

.runtime-fields-table-row-header {
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: center;
    background: var(--bg-surface);
    box-shadow: 0 1px 0 var(--border-soft);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

.runtime-fields-table-row-empty {
    display: block;
    min-width: 0;
    padding: 12px;
}

.runtime-fields-table-cell {
    min-width: 0;
    overflow: hidden;
}

.runtime-fields-field-shell {
    position: relative;
    min-width: 0;
    width: 100%;
}

.runtime-fields-field-shell > .runtime-fields-table-input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0 28px 0 0;
    border: none;
    border-radius: 0;
    background: var(--bg-input);
    box-shadow: none;
    font-size: 0.8rem;
    line-height: 1.4;
}

.runtime-fields-field-shell > .runtime-fields-table-input:focus {
    box-shadow: none;
}

.runtime-fields-edit-indicator {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    pointer-events: none;
}

.runtime-fields-table-actions {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding-top: 2px;
}

.runtime-fields-empty-row {
    display: block;
    min-height: 44px;
    padding: 12px 14px;
    overflow: visible;
    border: 1px dashed var(--border-subtle);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
    line-height: 1.45;
}

.runtime-fields-plain-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 0 12px 12px 12px;
}

.node-runtime-panel .runtime-fields-plain-list {
    padding: 0;
}

.runtime-fields-plain-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.35;
}

.runtime-fields-plain-key {
    flex: 0 0 auto;
    color: var(--text-primary);
    font-weight: 700;
}

.runtime-fields-plain-value {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.wf-node-prompt-card,
.wf-node-list-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-primary);
    text-align: left;
}

.wf-node-prompt-card {
    cursor: pointer;
}

.wf-node-prompt-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
}

.wf-node-prompt-card .wf-node-list-main {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-node-prompt-card .workflow-node-inline-icon-btn {
    pointer-events: none;
}

.wf-node-prompt-modal-card {
    width: min(900px, 94vw);
    max-height: 86vh;
}

.wf-node-field-grid {
    display: grid;
    gap: 10px;
}

.wf-node-field-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wf-node-field-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wf-node-help-text {
    font-size: 0.74rem;
    line-height: 1.4;
}

.wf-node-streaming-config {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.wf-node-streaming-toggle {
    align-self: flex-start !important;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.wf-node-streaming-toggle input[type="checkbox"] {
    margin: 0;
}

.wf-node-scroll-list {
    max-height: 150px;
    overflow-y: auto;
}

.wf-node-list-main {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-node-list-title {
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.35;
}

.wf-node-list-subtitle {
    font-size: 0.76rem;
    line-height: 1.35;
    word-break: break-word;
}

.wf-node-kb-row {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: center;
    gap: 12px;
}

.wf-node-kb-checkbox-stack{
    display: flex;
    flex-direction: column;
    align-items: center;   /* horizontal centering */
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
}

.wf-node-kb-row input[type="checkbox"] {
    margin: 0;
}

.wf-node-kb-row:hover {
    background: var(--bg-hover-subtle);
}

.wf-node-kb-table-scroll {
    max-height: 360px;
}

.wf-node-kb-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.wf-node-kb-table th,
.wf-node-kb-table td {
    padding: 8px 6px;
    vertical-align: middle;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.wf-node-kb-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: color-mix(in srgb, var(--bg-surface-strong) 92%, transparent);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wf-node-kb-topk-header-note {
    font-size: 0.9em;
    letter-spacing: 0.015em;
}

.wf-node-kb-table th:first-child,
.wf-node-kb-table td:first-child {
    width: 52%;
}

.wf-node-kb-table th:nth-child(2),
.wf-node-kb-table td:nth-child(2),
.wf-node-kb-table th:nth-child(3),
.wf-node-kb-table td:nth-child(3) {
    width: 24%;
}

.wf-node-kb-table tbody tr:hover {
    background: var(--bg-hover-subtle);
}

.wf-node-kb-table tbody tr:last-child td {
    border-bottom: none;
}

.wf-node-kb-table-name-cell {
    min-width: 0;
}

.wf-node-kb-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    column-gap: 8px;
    width: 100%;
    min-width: 0;
    cursor: pointer;
}

.wf-node-kb-choice-label {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.82rem;
    line-height: 1.35;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

.wf-node-kb-choice input[type="checkbox"],
.wf-node-chip-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    min-width: 14px;
    padding: 0;
    flex: 0 0 auto;
}

.wf-node-kb-checkbox {
    margin: 2px 0 0 0;
    flex: 0 0 auto;
}

.wf-node-kb-topk-input {
    width: 100%;
    min-width: 0;
}

.wf-node-kb-vector-shell.disabled,
.wf-node-kb-lexical-shell.disabled {
    cursor: not-allowed;
}

.wf-node-kb-vector-shell.disabled .wf-node-kb-topk-input,
.wf-node-kb-lexical-shell.disabled .wf-node-kb-topk-input {
    opacity: 0.72;
}

.wf-node-codebase-table td {
    vertical-align: top;
}

.wf-node-codebase-cell {
    font-size: 0.74rem;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
}

.wf-node-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wf-node-chip-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
}

.wf-node-chip-toggle:hover {
    background: var(--bg-hover-subtle);
    border-color: var(--border-accent);
}

.wf-node-chip-toggle input[type="checkbox"] {
    margin: 0;
}

.wf-node-grid {
    display: grid;
    gap: 10px;
}

.wf-node-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wf-node-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.wf-node-field-label {
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.workflow-node.runtime-active{
    z-index: var(--workflow-tree-z-runtime, 6);
    border-color: var(--border-success);
    box-shadow:
            0 0 0 1px var(--border-success),
            0 0 12px rgba(255, 200, 80, 0.35),
            0 0 28px rgba(255, 160, 40, 0.25);
}

.workflow-node.pathway-preview-active:not(.runtime-active) {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border-accent));
    box-shadow:
            0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent),
            0 0 10px rgba(255, 190, 90, 0.18),
            0 0 22px rgba(255, 160, 40, 0.12);
}

.workflow-node.active.runtime-active {
    z-index: var(--workflow-tree-z-active-runtime, 1100);
}

.input-node-use-preset-row {
    margin: 10px 0 12px;
}

.wf-node-runtime-citation-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
}

.wf-node-runtime-citation-title {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.wf-node-runtime-citation-meta {
    font-size: 0.74rem;
    line-height: 1.35;
    word-break: break-word;
}

.wf-node-runtime-citation-snippet {
    color: var(--text-primary);
    font-size: 0.76rem;
    line-height: 1.4;
    opacity: 0.9;
}

.workflow-node.workflow-node-knowledge_base.runtime-active .node-runtime-panel,
.workflow-node.workflow-node-knowledge_base_reranker.runtime-active .node-runtime-panel {
    max-height: 492px;
    overflow: hidden;
}

.input-node-loading-overlay,
.workflow-node-execution-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: var(--panel-radius);
    background: color-mix(in srgb, var(--bg-surface-strong) 72%, transparent);
    backdrop-filter: blur(2px);
    pointer-events: auto;
}

.input-node-loading-overlay.hidden,
.workflow-node-execution-overlay.hidden {
    display: none;
}

.input-node-loading-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-accent);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    font-size: 0.82rem;
    font-weight: 700;
}

.input-node-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent);
    border-radius: 999px;
    animation: input-node-loading-spin 0.8s linear infinite;
}

@keyframes input-node-loading-spin {
    to {
        transform: rotate(360deg);
    }
}


.wf-node-kb-table-scroll {
    max-height: 360px;
}

.wf-node-kb-table-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wf-node-kb-table-group + .wf-node-kb-table-group {
    margin-top: 14px;
}

.wf-node-kb-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.wf-node-kb-table th {
    white-space: nowrap;
}

.wf-node-kb-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.wf-node-kb-choice-label {
    min-width: 0;
    word-break: break-word;
}

.wf-node-kb-topk-input {
    width: 100%;
}

.wf-node-kb-topk-header-note {
    font-size: 0.9em;
    letter-spacing: 0.015em;
}

.wf-node-kb-vector-shell.disabled .wf-node-kb-topk-input,
.wf-node-kb-lexical-shell.disabled .wf-node-kb-topk-input {
    opacity: 0.72;
}

.wf-node-kb-source-tables {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.wf-node-kb-source-table-group + .wf-node-kb-source-table-group {
    margin-top: 0;
}

.wf-node-kb-source-table th:first-child,
.wf-node-kb-source-table td:first-child,
.wf-node-kb-loopable-table th:first-child,
.wf-node-kb-loopable-table td:first-child {
    width: auto;
}

.wf-node-kb-source-table th:nth-child(2),
.wf-node-kb-source-table td:nth-child(2),
.wf-node-kb-source-table th:nth-child(3),
.wf-node-kb-source-table td:nth-child(3),
.wf-node-kb-loopable-table th:nth-child(2),
.wf-node-kb-loopable-table td:nth-child(2),
.wf-node-kb-loopable-table th:nth-child(3),
.wf-node-kb-loopable-table td:nth-child(3) {
    width: auto;
}

.wf-node-kb-source-table th:last-child,
.wf-node-kb-source-table td:last-child,
.wf-node-kb-loopable-table th:last-child,
.wf-node-kb-loopable-table td:last-child {
    width: 36px;
}

.wf-node-kb-source-topk-col {
    width: 74px;
}

.wf-node-kb-source-loop-col {
    width: 108px;
}

.wf-node-kb-source-action-col {
    width: 36px;
}

.wf-node-kb-source-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.wf-node-kb-source-kb-label,
.wf-node-kb-source-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.wf-node-kb-source-label {
    color: var(--text-muted);
    font-size: 0.86em;
}

.wf-node-kb-source-action-cell {
    text-align: right;
}

.wf-node-kb-source-mode-btn {
    width: 28px;
    height: 28px;
}

.wf-node-kb-source-loop-input {
    width: 100%;
}

.loop-icon,
.top-k-icon {
    width: 14px !important;
    height: 14px !important;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: middle;
}

.loop-icon {
    -webkit-mask-image: url("/static/images/svgs/loop.svg");
    mask-image: url("/static/images/svgs/loop.svg");
}

.top-k-icon {
    -webkit-mask-image: url("/static/images/svgs/top_k.svg");
    mask-image: url("/static/images/svgs/top_k.svg");
}


.presets-modal-card {
    width: min(620px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.presets-modal-body {
    overflow: auto;
}

.presets-modal-grid {
    margin-top: 10px;
}

.presets-modal-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 34px;
    gap: 10px;
    align-items: center;
}

.presets-modal-header-row {
    padding: 4px 10px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.9;
}

.presets-header-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.presets-cell {
    min-width: 0;
    width: 100%;
}

button.presets-cell {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    filter: none;
}

.presets-cell-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);
}

button.presets-cell:hover .presets-cell-wrap {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
}

.presets-cell-wrap.is-editing {
    align-items: flex-start;
}

.presets-editor-shell {
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 auto;
}

.presets-text {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.presets-editor {
    flex: 1 1 auto;
    min-height: 72px;
    resize: vertical;
}

.presets-cell-wrap .trash-icon {
    color: var(--accent);
}

.presets-weight-cell {
    display: flex;
    align-items: center;
}

.presets-delete-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.presets-weight-input {
    width: 100%;
    text-align: center;
}

.presets-modal-row-editing .presets-weight-cell {
    align-self: stretch;
}

.presets-modal-footer {
    margin-top: 16px;
}



.workflow-preset-generation-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.workflow-preset-generation-sidebar-header .workflow-preset-generation-section-label {
    margin-bottom: 0;
}

.workflow-preset-generation-pathway-list {
    flex: 1 1 auto;
    padding-right: 4px;
    gap: 10px;
}

.workflow-preset-pathway-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 12px;
    text-align: left;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: color-mix(in srgb, var(--bg-surface) 90%, transparent);
}

.workflow-preset-pathway-item:hover {
    border-color: var(--border-accent);
    background: color-mix(in srgb, var(--bg-hover-subtle) 86%, transparent);
}

.workflow-preset-pathway-item.is-selected {
    border-color: var(--border-accent-strong);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-surface));
}

.workflow-preset-pathway-meta {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}


.workflow-preset-generation-section,
.workflow-preset-generation-detail {
    min-width: 0;
}

.workflow-preset-generation-detail {
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 4px;
}

.workflow-preset-generation-section-label {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.workflow-preset-generation-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.workflow-preset-generation-section-header .workflow-preset-generation-section-label {
    margin-bottom: 0;
}

.workflow-generated-case-select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    cursor: pointer;
}

.workflow-generated-case-select-all input {
    width: 12px;
    height: 12px;
    margin: 0;
}

.workflow-generated-case-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.workflow-generated-case-list {
    gap: 10px;
}

.workflow-preset-pathway-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.workflow-preset-pathway-pills.detail {
    gap: 8px;
}

.workflow-preset-pathway-pill-wrap {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    padding-top: 0;
    padding-right: 14px;
    padding-bottom: 12px;
}

.workflow-preset-pathway-pill,
.workflow-generated-case-badge,
.workflow-preset-generation-kb-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-surface-strong) 92%, transparent);
    font-size: 0.76rem;
    line-height: 1.25;
}

.workflow-preset-pathway-pill {
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.workflow-preset-kb-badge {
    position: absolute;
    top: auto;
    bottom: -4px;
    right: -2px;
    z-index: 2;
    min-width: 34px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
    color: var(--text-link);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.workflow-preset-kb-badge.is-active {
    background: color-mix(in srgb, var(--brand-primary) 20%, var(--bg-panel));
    color: var(--text-primary);
}

.workflow-preset-generation-hint,
.workflow-generated-case-time {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}

.workflow-preset-generation-hint {
    padding: 10px 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: color-mix(in srgb, var(--bg-surface) 90%, transparent);
}

.workflow-preset-generation-textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
}

.workflow-preset-generation-toggle-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.workflow-preset-inline-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.workflow-preset-inline-select .wf-node-input {
    min-width: 240px;
}

.workflow-preset-inline-hint {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.workflow-preset-generation-toolbar {
    display: flex;
    justify-content: flex-start;
}

.workflow-generated-case-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
}

.workflow-generated-case-card.is-selected {
    border-color: var(--border-accent-strong);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-surface));
}

.workflow-generated-case-header,
.workflow-generated-case-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.workflow-generated-case-header {
    align-items: flex-start;
}

.workflow-generated-case-leading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.workflow-generated-case-leading-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.workflow-generated-case-meta {
    justify-content: flex-start;
    min-width: 0;
    flex: 1 1 auto;
}

.workflow-generated-case-select {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    flex: 0 0 auto;
    padding-top: 2px;
    cursor: pointer;
}

.workflow-generated-case-select input {
    width: 11px;
    height: 11px;
    margin: 0;
}

.workflow-generated-case-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.workflow-generated-case-delete-btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
}

.workflow-generated-case-badge.muted {
    opacity: 0.8;
}

.workflow-generated-case-time-row {
    min-width: 0;
    padding-left: 21px;
}

.workflow-generated-case-editor {
    min-width: 0;
}

.workflow-generated-case-textarea {
    width: 100%;
    min-width: 0;
    min-height: 84px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: var(--bg-surface-strong);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.82rem;
    line-height: 1.45;
    resize: vertical;
    overflow: auto;
    box-sizing: border-box;
}

.workflow-generated-case-save-state {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    line-height: 1.35;
    min-height: 1em;
    visibility: hidden;
}

.workflow-generated-case-save-state.is-visible {
    visibility: visible;
}

.workflow-generated-case-save-state.is-error {
    color: var(--accent);
}

.workflow-preset-generation-kb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}




.workflow-preset-generation-panel {
    position: fixed;
    top: 88px;
    left: 88px;
    z-index: 140;
    width: min(1040px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    pointer-events: auto;
}

.workflow-preset-generation-panel.hidden {
    display: none;
}

.workflow-preset-generation-shell {
    display: flex;
    flex-direction: column;
    height: min(820px, calc(100vh - 120px));
    max-height: calc(100vh - 120px);
    min-height: min(560px, calc(100vh - 120px));
    overflow: hidden;
    border: 1px solid var(--border-accent);
    border-radius: calc(var(--panel-radius) + 2px);
    background: color-mix(in srgb, var(--bg-surface-strong) 94%, black 6%);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 190, 80, 0.08);
    backdrop-filter: blur(10px);
}

.workflow-preset-generation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
    cursor: move;
    user-select: none;
}

.workflow-preset-generation-title {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.1;
}

.workflow-preset-generation-subtitle {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

.workflow-preset-generation-actions {
    flex-shrink: 0;
}

.workflow-preset-generation-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.workflow-preset-generation-columns {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.workflow-preset-generation-sidebar,
.workflow-preset-generation-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    padding: 16px;
}

.workflow-preset-generation-sidebar {
    border-right: 1px solid var(--border-subtle);
    background: color-mix(in srgb, var(--bg-surface) 82%, transparent);
    overflow: hidden;
}

.workflow-preset-generation-main {
    overflow: hidden;
}

.workflow-preset-generation-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 20px;
    color: var(--text-secondary);
    text-align: center;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-xs);
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}

.workflow-preset-generation-empty.compact {
    min-height: 120px;
}




.wf-node-presets-panel {
    gap: 12px;
}

.wf-node-presets-generate-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
}

.wf-node-presets-generate-btn {
    min-width: 132px;
}

.wf-node-presets-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
}

.node-presets-summary-shell {
    min-width: 0;
}

.wf-node-presets-table-inactive {
    gap: 0;
    padding: 8px;
    border-radius: 8px;
}

.wf-node-presets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wf-node-presets-header-label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wf-node-presets-edit-btn,
.wf-node-presets-play-btn {
    flex: 0 0 auto;
}

.wf-node-presets-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 108px;
    overflow-y: auto;
    padding-right: 2px;
}

.wf-node-presets-list-inactive {
    max-height: 138px;
}

.wf-node-presets-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 6px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-surface-strong) 80%, transparent);
}

.wf-node-presets-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    font-size: 0.86rem;
    line-height: 1.3;
}

.wf-node-presets-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 0 10px;
    border: 1px dashed var(--border-subtle);
    border-radius: 8px;
    text-align: center;
}

.wf-node-presets-empty-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    justify-content: center;
    min-height: 94px;
    padding: 10px;
}

.wf-node-presets-empty-btn {
    width: 100%;
    min-width: 0;
}


.rules-router-modal-card {
    width: min(720px, 90vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.rules-router-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rules-router-grid {
    margin-top: 10px;
}

.rules-router-grid-row {
    display: grid;
    grid-template-columns: 120px 90px minmax(0, 1fr) 80px;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
}

.rules-router-grid-header {
    background: transparent;
    border: none;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    opacity: 0.9;
}

.rules-router-triggers-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}

.rules-router-triggers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
}

.rules-router-trigger-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 6px;
    font-size: 11px;
    border-radius: 6px;
    background: var(--bg-hover-subtle);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.rules-router-modal-footer {
    margin-top: 16px;
}

.rules-router-modal-footer-row {
    align-items: center;
    gap: 12px;
}

.rules-router-footer-branch-intent {
    margin-right: auto;
    min-width: 0;
}

.rules-router-footer-branch-intent-input {
    width: min(300px, 34vw);
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.rules-router-footer-fallback {
    margin-right: auto;
}

.rules-router-footer-fallback.is-disabled {
    opacity: 0.7;
}

.rules-router-footer-close {
    margin-left: auto;
}

.wf-node-router-output-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;

    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);

    text-align: left;
    cursor: pointer;
}

.wf-node-router-output-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
}

.wf-node-router-output-card .wf-node-list-main {
    flex: 1 1 auto;
    min-width: 0;
}

.wf-node-router-output-card .workflow-node-inline-icon-btn {
    pointer-events: none;
}

.rules-router-chain-toggle {
    position: absolute;
    left: 50%;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 20px;
    padding: 2px 8px;
    transform: translate(-50%, calc(-50% - (var(--row-gap, 14px) / 2)));
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.rules-router-chain-toggle:hover {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
    filter: none;
}

.rules-router-chain-toggle[data-chain-mode="and"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.rules-router-chain-toggle[data-chain-mode="or"] {
    background: var(--bg-surface);
    border-color: var(--accent);
    color: var(--accent);
}

.rules-router-rule-shell.is-disabled .rules-router-chain-toggle {
    opacity: 0.45;
}

.rules-router-rule-shell {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.rules-router-enable-col {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.rules-router-enable-checkbox {
    margin: 0;
}

.rules-router-rule-shell.is-disabled .rules-router-grid-row {
    opacity: 0.45;
}

.rules-router-rule-shell.is-disabled .rules-router-grid-row input,
.rules-router-rule-shell.is-disabled .rules-router-grid-row select,
.rules-router-rule-shell.is-disabled .rules-router-grid-row button {
    pointer-events: none;
}


/* reserved for prompt UI when expanded */

.llm-router-preview {
    font-size: 12px;
    opacity: 0.8;
}

/* action node specific controls */

.action-top-controls-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
    margin-bottom: 10px;
}

.action-digest-checkbox {
    margin: 0;
    width: 14px;
    height: 14px;
}

.action-llm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: stretch;
    gap: 18px;
    margin-bottom: 10px;
}

.action-prompt-block {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 6px;
}

.action-prompt-block .wf-node-prompt-card {
    height: 100%;
    min-height: 0;
    align-self: stretch;
}

.action-model-label {
    align-items: center;
}

.action-unified-control {
    min-height: 30px;
    height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.action-output-layout {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
}

.action-http-config-grid,
.action-http-auth-grid,
.action-public-url-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin-bottom: 10px;
}

.action-http-url-shell {
    margin-bottom: 12px;
}

.action-public-api-shell {
    margin-bottom: 12px;
}

.action-public-api-selected-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.action-public-api-selected-logo img {
    display: block;
    width: auto;
    max-width: 112px;
    max-height: 22px;
    object-fit: contain;
}

.action-public-api-connection-dropdown {
    position: relative;
    width: 100%;
}

.action-public-api-connection-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.action-public-api-connection-summary::-webkit-details-marker {
    display: none;
}

.action-public-api-connection-summary-content,
.action-public-api-connection-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-public-api-connection-caret {
    flex: 0 0 auto;
    color: var(--text-secondary);
}

.action-public-api-connection-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: grid;
    gap: 2px;
    max-height: 320px;
    padding: 4px;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-popover, 0 12px 24px rgba(15, 23, 42, 0.14));
}

.action-public-api-connection-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
}

.action-public-api-connection-option.is-system {
    justify-content: center;
    min-height: 56px;
}

.action-public-api-connection-option.is-custom {
    justify-content: center;
    text-align: center;
}

.action-public-api-connection-option:hover,
.action-public-api-connection-option:focus-visible,
.action-public-api-connection-option.is-selected {
    background: var(--bg-hover-subtle);
    filter: none;
}

.action-public-api-connection-empty {
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.action-public-api-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

.action-public-api-grid-narrow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-public-api-warning {
    border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 42%, var(--border-subtle));
    border-radius: 8px;
    background: color-mix(in srgb, var(--warning, #f59e0b) 10%, var(--bg-panel-alt));
    color: var(--text-secondary);
    padding: 8px 10px;
    font-size: 0.86rem;
}

.action-http-url-row {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.action-http-url-row-single {
    grid-template-columns: minmax(0, 1fr);
}

.action-http-url-display {
    min-width: 0;
    min-height: 30px;
    padding: 7px 0;
    color: var(--text-primary);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.action-public-url-schema-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.action-public-url-contract-copy {
    margin-bottom: 6px;
}

.action-schema-summary-card {
    height: 100%;
    cursor: pointer;
}

.action-schema-summary-edit {
    flex: 0 0 auto;
    color: var(--accent);
    opacity: 0.9;
}

.action-schema-summary-body,
.action-schema-summary {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.action-schema-summary-name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.action-schema-summary-group {
    display: grid;
    gap: 6px;
}

.action-schema-summary-group-title {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
}

.action-schema-summary-field-list {
    display: grid;
    gap: 6px;
}

.action-schema-summary-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.84rem;
    color: var(--text-primary);
}

.action-schema-summary-field-row-runtime {
    color: var(--text-secondary);
}

.action-schema-summary-field-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.action-schema-summary-runtime-gear {
    position: static;
    top: auto;
    right: auto;
    width: 13px !important;
    height: 13px !important;
    flex: 0 0 auto;
    color: var(--text-secondary);
    opacity: 0.82;
}

.action-schema-summary-runtime-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
}

.action-schema-summary-empty {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.action-output-schema-scroll {
    max-height: 106px;
    padding-right: 4px;
}

.action-output-schema-row {
    display: grid;
    grid-template-columns: 25% 25% 35% 15%;
    gap: 8px;
    align-items: center;
}

.action-output-schema-row-header {
    padding: 0 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
}

.action-output-schema-empty-state {
    margin-top: 2px;
}

.action-runtime-body-scroll {
    max-height: 170px;
    padding-right: 4px;
}

.action-runtime-body-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 84px 34px;
    gap: 8px;
    align-items: center;
}

.action-runtime-body-row-header {
    padding: 0 4px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
}

.action-runtime-body-required {
    display: flex;
    justify-content: center;
}

.action-runtime-body-empty-state {
    margin-top: 2px;
}

.action-schema-modal-card {
    width: min(900px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.action-schema-row {
    display: grid;
    grid-template-columns: minmax(0, 0.77fr) 108px minmax(0, 1fr) minmax(0, 1.8fr) 34px;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.action-schema-row-header {
    background: transparent;
    border: none;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.action-schema-empty-state {
    margin-top: 8px;
}

@media (max-width: 860px) {
    .action-public-api-grid,
    .action-public-api-grid-narrow {
        grid-template-columns: 1fr;
    }
}




.workflow-overview-card {
    position: relative;
    gap: 12px;
}

.workflow-detail-header {
    position: relative;
    min-width: 0;
}

.workflow-detail-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.workflow-detail-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.workflow-detail-title {
    min-width: 0;
}

.workflow-detail-description {
    max-width: 88ch;
}

.workflow-detail-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.workflow-overview-card .settings-gear {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    flex: 0 0 auto;
}

.workflow-text-action {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.workflow-text-action:hover {
    color: var(--accent-primary);
}

#workflowScheduleControls.is-disabled {
    opacity: 0.58;
}

.workflow-webhook-generated-alert {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
}

.workflow-webhook-generated-alert input {
    min-width: 0;
}

.workflow-tree-scroller {
    position: relative;
    flex: 1 1 auto;
    min-height: 560px;
    max-height: calc(100dvh - 236px);
    overflow: auto;
    cursor: grab;
    touch-action: none;
    border: 1px solid var(--border-accent);
    border-radius: var(--panel-radius);
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.035), transparent 42%),
        var(--bg-surface);
}

.workflow-runtime-stream-shell {
    --workflow-runtime-stream-max-height: calc((100dvh - 236px) / 2);
    position: absolute;
    top: calc(100% + 12px);
    left: 12px;
    z-index: 12;
    max-width: min(680px, calc(100% - 24px));
    max-height: var(--workflow-runtime-stream-max-height);
    pointer-events: none;
}

.workflow-runtime-stream-icon-btn {
    --icon-btn-size: 16px;
    border: 0;
    color: var(--accent-primary);
    background-color: currentColor;
    flex: 0 0 var(--icon-btn-size);
    pointer-events: auto;
}

.workflow-runtime-stream-icon-btn:hover {
    color: var(--text-primary);
    background-color: currentColor;
}

.workflow-runtime-stream-icon-btn:disabled {
    color: var(--text-muted);
    cursor: default;
    opacity: 0.48;
}

.workflow-runtime-stream-box {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 26%, var(--border-subtle));
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-panel) 94%, rgba(0, 0, 0, 0.08));
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    pointer-events: none;
    backdrop-filter: blur(6px);
    max-height: var(--workflow-runtime-stream-max-height);
    overflow: hidden;
}

.workflow-runtime-stream-box strong {
    min-width: max-content;
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
}

.workflow-runtime-stream-box #workflowRuntimeStreamText {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    max-height: calc(var(--workflow-runtime-stream-max-height) - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
    pointer-events: auto;
    scrollbar-width: thin;
}

.workflow-runtime-stream-box.is-collapsed #workflowRuntimeStreamText {
    overflow: hidden;
    overflow-wrap: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-tree-scroller.dragging {
    cursor: grabbing;
}

.workflow-tree-zoom-layer {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    width: max-content;
    min-width: 100%;
    min-height: 100%;
    padding: 560px;
    transform-origin: 0 0;
}


.prompt-library-modal-card {
    width: min(1220px, 96vw);
    max-height: 92vh;
}

.prompt-library-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title actions"
        "subtitle subtitle";
    align-items: start;
    column-gap: 16px;
    row-gap: 10px;
}

.prompt-library-modal-body {
    overflow: hidden;
}

.prompt-library-header-actions {
    grid-area: actions;
    align-items: flex-start;
    flex-wrap: nowrap;
    justify-self: end;
}

.prompt-library-title-block {
    grid-area: title;
    min-width: 0;
}

.prompt-library-subtitle-row {
    grid-area: subtitle;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.prompt-library-subtitle-row > .subtle {
    min-width: 0;
    flex: 1 1 auto;
}

.prompt-library-view-toggle {
    flex: 0 0 auto;
    margin-left: auto;
}


.prompt-library-layout {
    align-items: stretch;
    min-height: 0;
    height: 100%;
}

.prompt-library-component-tabs {
    min-width: 0;
    width: max-content;
    align-items: stretch;
}

.prompt-library-component-tabs .sidetab {
    width: 100%;
    gap: 5px;
    padding: 14px 10px;
}

.prompt-library-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.prompt-library-main-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

.prompt-library-main-card > .settings-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.prompt-library-prompt-tabs {
    flex: 0 0 auto;
    min-width: 0;
}

.prompt-library-prompt-tabs .tabs-scroller {
    min-width: 0;
}

.prompt-library-add-btn {
    flex: 0 0 auto;
    margin-right: 0;
}

.prompt-library-prompt-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.prompt-library-tab-meta {
    font-size: 0.72rem;
    line-height: 1.2;
    opacity: 0.75;
}

.prompt-library-tab-meta.llmlab-orgtag {
    opacity: 1;
}

.prompt-library-empty {
    padding: 16px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius);
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}

.prompt-library-tabs-loading {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 0 2px;
}

.prompt-library-component-count {
    font-size: 0.72rem;
    opacity: 0.8;
}

.prompt-library-loading-field {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}

.prompt-library-loading-field-large {
    min-height: 92px;
    align-items: flex-start;
}

.prompt-library-loading-preview {
    display: flex;
    align-items: flex-start;
    min-height: 100%;
}


.prompt-library-editor-pane {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.prompt-library-editor-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    gap: 12px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.prompt-library-editor-card > * {
    flex: 0 0 auto;
}

.prompt-library-editor-header .title-block {
    min-width: 0;
}

.prompt-library-editor-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.prompt-library-editor-header .detail-title {
    margin: 0;
    min-width: 0;
}

.prompt-library-editor-title-gear {
    flex: auto 0;
    right: 40px;
    margin-left: auto;
    z-index: 2;
    color: var(--text-primary);
    background-color: currentColor;
    -webkit-mask: url('/static/images/svgs/gear.svg') no-repeat center;
    mask: url('/static/images/svgs/gear.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.prompt-library-create-actions {
    flex-wrap: wrap;
}

.prompt-library-editor-textarea,
.prompt-library-notes-textarea {
    width: 100%;
    font-family: var(--font-mono);
    line-height: 1.5;
    overflow-y: auto;
}

.prompt-library-editor-textarea {
    height: min(150px, 17vh);
    max-height: 17vh;
    resize: none;
}

.prompt-library-notes-textarea {
    min-height: 46px;
    resize: vertical;
}

.prompt-library-generated-preview-shell {
    min-height: 150px;
    max-height: 17vh;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
    overflow-x: hidden;
    overflow-y: auto;
}

.prompt-library-generated-preview {
    min-width: 0;
    user-select: text;
}


#promptLibrarySettingsNotes {
    min-height: 72px;
    font-family: var(--font-mono);
    line-height: 1.5;
    resize: vertical;
}


.output-contract-modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.output-contract-placeholder-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.output-contract-main-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.output-contract-main-card > .settings-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 18px;
}

#outputContractEditorPane > .stack {
    flex: 0 0 auto;
    min-height: 0;
}

.output-contract-header-textarea {
    min-height: 60px;
    resize: none;
    overflow-y: auto;
}

.output-contract-field-shell {
    position: relative;
    min-width: 0;
    width: 100%;
}

.output-contract-field-shell > .output-contract-table-input,
.output-contract-field-shell > .output-contract-header-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding-right: 28px;
}

.output-contract-edit-indicator {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.output-contract-field-shell-textarea > .output-contract-edit-indicator,
.output-contract-header-shell > .output-contract-edit-indicator {
    top: 8px;
    transform: none;
}

.output-contract-table-shell {
    gap: 0;
    border: 1px solid var(--border-soft);
    border-radius: var(--panel-radius);
    max-height: clamp(150px, 28vh, 260px);
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
}

.output-contract-table-row {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 1.15fr) 28px;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.8rem;
    min-width: 620px;
}

.output-contract-table-row-system {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 1.15fr);
    min-width: 560px;
}

.output-contract-table-row-empty {
    display: block;
    padding: 12px;
}

.output-contract-table-row:first-child {
    border-top: none;
}

.output-contract-table-row-header {
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: center;
    background: var(--bg-surface);
    box-shadow: 0 1px 0 var(--border-soft);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.output-contract-table-cell {
    min-width: 0;
    overflow: hidden;
}

.output-contract-table-input,
.output-contract-table-display {
    width: 100%;
    min-height: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    box-sizing: border-box;
}

.output-contract-table-display {
    display: block;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    white-space: pre-wrap;
    word-break: break-word;
}

.output-contract-table-display-scroll {
    min-height: 42px;
    height: 42px;
    max-height: 42px;
    overflow-y: auto;
}

.output-contract-table-input {
    padding: 0;
    border: none;
    border-radius: 0;
    background: var(--bg-input);
    box-shadow: none;
}

.output-contract-table-input:focus {
    box-shadow: none;
}

.output-contract-table-textarea {
    min-height: 42px;
    height: 42px;
    max-height: 42px;
    resize: none;
    overflow-y: auto;
}

.output-contract-table-actions {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2px;
    min-width: 0;
}

.output-contract-empty-row {
    grid-column: 1 / -1;
    display: block;
    min-height: 44px;
    padding: 12px 14px;
    overflow: visible;
    line-height: 1.45;
    border: 1px dashed var(--border-subtle);
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
}


.prompt-library-include-row {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.prompt-library-inline-field {
    --field-control-width: 148px;
}

.prompt-library-inline-action {
    align-self: end;
}


.prompt-library-update-marker {
    margin-left: 2px;
}

.prompt-library-warning-card {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 30%, var(--border-subtle));
    border-radius: var(--panel-radius);
    background: color-mix(in srgb, var(--danger, #dc2626) 8%, var(--bg-surface));
}

.prompt-library-warning-card .field-label {
    color: color-mix(in srgb, var(--danger, #dc2626) 82%, var(--text-primary));
}


.kb-source-selector {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 10px;
    min-height: 0;
    margin-top: 4px;
    overflow-y: auto;
}

.kb-source-selector > .muted-text,
.kb-source-selector > .detail-description,
.kb-source-selector > .kb-source-selector-controls,
.kb-source-selector > .kb-source-selector-toolbar {
    flex: 0 0 auto;
    width: 100%;
}

.kb-source-selector > .kb-source-selector-items-shell {
    flex: 1 1 auto;
    width: 100%;
}

.kb-source-selector > .dropdown-button {
    align-self: flex-start;
    width: fit-content;
    max-width: 50%;
    min-width: 0;
}

.kb-source-selector > .dropdown-button > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-gdrive-mode-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: min(100%, 340px);
    margin-left: auto;
    padding: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.kb-gdrive-mode-button {
    min-height: 34px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: calc(var(--panel-radius-sm) - 2px);
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

.kb-gdrive-mode-button.is-active {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
    color: var(--text-primary);
}

.kb-gdrive-picker-panel {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.kb-gdrive-picker-panel > button {
    justify-self: end;
    margin-right: min(70px, 12vw);
}

.kb-source-selector-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kb-source-selector-control-stack,
.kb-source-selector-control-grid {
    display: grid;
    gap: 10px;
}

.kb-source-selector-control-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kb-website-selector-controls {
    gap: 6px;
}

.kb-website-selector-input-row {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.kb-website-selector-url-field {
    flex: 0 1 50%;
    min-width: 220px;
}

.kb-website-selector-short-field {
    flex: 0 1 25%;
    min-width: 96px;
    max-width: 180px;
}

.kb-website-selector-action-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.kb-website-selector-option-row {
    box-sizing: border-box;
    max-width: none;
    padding-inline: 20px 8px;
}

.kb-website-selector-option-row-with-info > .info-tag {
    margin-left: -4px;
}

.kb-website-shared-copy {
    max-width: 760px;
    line-height: 1.35;
}

.kb-source-selector-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.kb-source-selector-select-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.kb-source-selector-select-all:hover,
.kb-source-selector-select-all:focus-visible {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
    outline: none;
}

.kb-source-selector-select-all-indicator {
    position: relative;
    width: 14px;
    min-width: 14px;
    height: 14px;
    border: 1px solid var(--text-primary);
    border-radius: 4px;
    background: var(--bg-surface-strong);
    transition: border-color 0.14s ease, background 0.14s ease;
}

.kb-source-selector-select-all.is-disabled,
.kb-source-selector-select-all:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.kb-source-selector-select-all.is-checked .kb-source-selector-select-all-indicator,
.kb-source-selector-select-all.is-indeterminate .kb-source-selector-select-all-indicator {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--bg-surface-strong));
}

.kb-source-selector-select-all.is-checked .kb-source-selector-select-all-indicator::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
}

.kb-source-selector-select-all.is-indeterminate .kb-source-selector-select-all-indicator::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.kb-source-selector-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
    width: 100%;
    min-width: 0;
}

.kb-source-selector-breadcrumb-trail {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
}

.kb-source-selector-path-field {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 30px;
    max-width: 100%;
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.kb-source-selector-path-input {
    appearance: none;
    display: block;
    width: 100%;
    min-width: 30px;
    max-width: 100%;
    margin: 5px 0 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    caret-color: currentColor;
    vertical-align: middle;
}

.kb-source-selector-path-input:focus,
.kb-source-selector-search-input:focus {
    outline: none;
}

.kb-source-selector-path-input:disabled,
.kb-source-selector-search-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.kb-source-selector-breadcrumb-button {
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

.kb-source-selector-breadcrumb-button:hover,
.kb-source-selector-breadcrumb-button:focus-visible {
    color: var(--accent);
    outline: none;
}

.kb-source-selector-breadcrumb-button:disabled {
    color: var(--text-secondary);
    cursor: default;
}

.kb-source-selector-breadcrumb-button[aria-current="location"] {
    color: var(--text-primary);
    font-weight: 600;
}

.kb-source-selector-breadcrumb-separator {
    color: var(--text-secondary);
    flex: 0 0 auto;
}

.kb-source-selector-search-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 220px;
    min-width: 112px;
    max-width: 220px;
    padding: 6px 8px;
    border-left: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.kb-source-selector-search-icon {
    flex: 0 0 auto;
    color: var(--text-secondary);
}

.kb-source-selector-search-input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
}

.kb-source-selector-search-input::placeholder {
    color: var(--text-secondary);
}

.kb-source-selector-add-selected-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: max-content;
    white-space: nowrap;
}

.kb-source-selector-add-selected-button.is-loading {
    justify-content: center;
    min-width: 92px;
}

.kb-source-selector-items-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    align-self: stretch;
    gap: 10px;
    padding: 0;
}

.kb-source-selector-items {
    display: flex;
    flex: 1 1 80%;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    width: 100%;
}

.kb-source-selector-selected-panel {
    display: flex;
    flex: 0 0 20%;
    min-height: 92px;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-surface);
    overflow: hidden;
}

.kb-source-selector-selected-header,
.kb-source-selector-selected-entry,
.kb-source-selector-item {
    display: flex;
    gap: 8px;
    min-width: 0;
}

.kb-source-selector-selected-header {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.kb-source-selector-selected-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.kb-source-selector-selected-title,
.kb-source-selector-item-title {
    font-weight: 600;
}

.kb-source-selector-selected-title {
    flex: 0 0 auto;
    font-size: 0.82rem;
    line-height: 1.2;
}

.kb-source-selector-selected-status,
.kb-source-selector-selected-copy,
.kb-source-selector-item-meta,
.kb-source-selector-empty {
    font-size: 0.82rem;
}

.kb-source-selector-selected-status {
    min-width: 0;
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.kb-source-selector-selected-status-path {
    color: var(--text-secondary);
}

.kb-source-selector-selected-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.kb-source-selector-selected-entry {
    align-items: flex-start;
    font-size: 0.82rem;
}

.kb-source-selector-selected-copy {
    min-width: 0;
    word-break: break-word;
    color: var(--text-secondary);
}

.kb-source-selector-exclude-field {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.kb-source-selector-exclude-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.kb-source-selector-exclude-input {
    min-width: 92px;
    max-width: 220px;
    height: 1.2em;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-weight: inherit;
    line-height: 1.2;
}

.kb-source-selector-exclude-input:focus {
    outline: none;
}

.kb-source-selector-selected-remove {
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 0;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.kb-source-selector-selected-remove:hover,
.kb-source-selector-selected-remove:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.kb-source-selector-item {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.kb-source-selector-item.is-folder {
    cursor: pointer;
}

.kb-source-selector-item.is-folder:hover,
.kb-source-selector-item.is-folder:focus-visible {
    border-color: var(--accent);
    background: var(--bg-hover-subtle);
    outline: none;
}

.kb-source-selector-item-info {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kb-source-selector-folder-open {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 12px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.kb-source-selector-folder-open:hover,
.kb-source-selector-folder-open:focus-visible {
    outline: none;
}

.kb-source-selector-folder-icon.folder-icon {
    width: 36px !important;
    min-width: 36px;
    height: 36px !important;
    color: var(--text-primary);
}

.kb-source-selector-select-cell,
.kb-source-selector-item-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-source-selector-select-cell {
    width: 18px;
    min-width: 18px;
}

.kb-source-selector-item-actions {
    justify-content: flex-end;
    min-width: 24px;
}

.kb-source-selector-add-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 6px;
    margin-bottom: -6px;
}

.kb-source-selector-add-action.is-unsupported {
    cursor: help;
}

.kb-source-selector-add-action.is-unsupported:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

.kb-source-selector-item-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    word-break: break-word;
}

.kb-source-selector-item-name {
    min-width: 0;
    word-break: break-word;
}

.kb-source-selector-file-type-icon {
    flex: 0 0 auto;
    color: var(--text-secondary);
    opacity: 0.9;
}

.kb-source-selector-item:hover .kb-source-selector-file-type-icon,
.kb-source-selector-item:focus-within .kb-source-selector-file-type-icon {
    color: var(--text-primary);
    opacity: 1;
}

.kb-source-selector-add-icon-button {
    width: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.kb-source-selector-add-icon-button:hover,
.kb-source-selector-add-icon-button:focus-visible {
    color: var(--accent-strong, var(--accent));
    outline: none;
}

.kb-source-selector-add-icon-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.kb-source-selector-add-selected-prefix {
    font-size: 1rem;
    line-height: 1;
}

.kb-source-selector-unsupported-tooltip {
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 8;
    width: 240px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface-strong);
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.45;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.14s ease, visibility 0.14s ease;
}

.kb-source-selector-add-action.is-unsupported:hover .kb-source-selector-unsupported-tooltip,
.kb-source-selector-add-action.is-unsupported:focus-within .kb-source-selector-unsupported-tooltip,
.kb-source-selector-add-action.is-unsupported:focus-visible .kb-source-selector-unsupported-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kb-source-selector-unsupported-link {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: none;
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-surface));
    color: var(--accent);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.kb-source-selector-unsupported-link:hover,
.kb-source-selector-unsupported-link:focus-visible {
    color: var(--accent-strong, var(--accent));
    background: color-mix(in srgb, var(--accent) 16%, var(--bg-hover-subtle));
    outline: none;
}

.kb-source-selector-empty {
    padding: 12px 0;
}




.files-panel {
    flex: 1 1 400px;
    min-width: 0;
    min-height: 280px;
    padding: 0;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: var(--panel-radius-sm);
}

.files-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    border-radius: 10px;
}


.file-list {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    background: var(--bg-surface-strong);
}

.file-row {
    display: grid;
    grid-template-columns: 18px minmax(180px, 1.6fr) 88px 92px 92px 32px;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;

    min-width: max-content;
    padding: 10px 10px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.file-row-out-of-sync{
    background: var(--bg-surface-strong) !important;
}

.file-header,
.file-name,
.file-meta {
  min-width: 0;
}

.file-header > div{
    text-align: center;
}

.file-header > .file-name{
    text-align: left !important;
}

.file-header > .file-select-cell {
    text-align: center !important;
}

.file-header > .file-actions-header {
    text-align: right !important;
}

.file-name {
  cursor: default;
}

.kb-source-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.file-name-inline,
.kb-source-item-name-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.file-name-inline .ellipsis,
.kb-source-item-name-wrap .ellipsis {
    min-width: 0;
}

.kb-source-items-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: var(--bg-surface-strong);
    color: inherit;
    cursor: pointer;
    flex: 0 0 auto;
}

.kb-source-items-toggle:hover,
.kb-source-items-toggle:focus-visible {
    background: var(--bg-hover-subtle);
    outline: none;
}

.kb-source-items-caret {
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    transition: transform 0.14s ease;
}

.kb-source-items-toggle.is-expanded .kb-source-items-caret {
    transform: rotate(90deg);
}

.file-meta {
    font-size: 0.85rem;
    text-align: center;
}

.file-select-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-select-checkbox {
    width: 12px;
    height: 12px;
}

.file-actions {
    display: flex;
    justify-content: flex-end;
}

.kb-source-items-panel {
    padding: 0 12px 12px 55px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.kb-source-items-summary,
.kb-source-items-status {
    padding-top: 2px;
    font-size: 0.82rem;
}

.kb-source-items-status.is-error {
    color: var(--danger, #dc2626);
}

.kb-source-items-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.kb-source-item-row {
    display: grid;
    grid-template-columns: 18px minmax(190px, 1fr) 86px 86px 32px;
    gap: 8px;
    align-items: center;
    padding: 8px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface-strong);
}

.kb-source-item-header {
    padding-top: 2px;
    padding-bottom: 2px;
    border: none;
    background: transparent;
}

.kb-source-item-row-out-of-sync {
    background: var(--bg-surface);
}

.kb-source-item-name,
.kb-source-item-date,
.kb-source-item-actions,
.kb-source-item-select-cell {
    min-width: 0;
}

.kb-source-item-select-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-source-item-date {
    text-align: center;
    font-size: 0.8rem;
}

.kb-source-item-date.is-error,
.file-meta.is-error,
.file-ingested-meta.is-error {
    color: var(--danger, #dc2626);
}

.kb-source-item-actions {
    display: flex;
    justify-content: flex-end;
}

.kb-source-delete-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 999px;
}

.kb-file-empty {
    padding: 18px 16px;
}

.kb-file-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.kb-file-picker-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kb-file-picker-button {
    margin-left: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.kb-file-picker-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.kb-file-picker-actions .kb-file-picker-button {
    margin-left: 0;
}

.kb-upload-picker-help {
    margin-top: 6px;
}

.options-panel {
    flex: 0 0 180px;
    width: 180px;
    display: flex;
    align-self: stretch;
    margin-left: auto;
}

.options-panel-inner {
    justify-content: flex-end;
    align-items: flex-start;
    width: 100%;
}

.options-panel-inner .checkbox-row {
    align-items: center;
}

.kb-hybrid-search-option {
    margin-left: 0;
}

.kb-block-workflow-option {
    margin-left: 18px;
}

.kb-hybrid-search-feedback,
.kb-hybrid-search-ingest-btn {
    align-self: flex-start;
    margin: -2px 0 0 34px;
    max-width: calc(100% - 34px);
}

.kb-hybrid-search-feedback {
    width: calc(100% - 34px);
    min-width: 0;
    min-height: 18px;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

.kb-hybrid-search-feedback-label {
    display: inline;
    white-space: normal;
}

.kb-hybrid-search-feedback-label .animated-ellipsis-suffix {
    display: inline-block;
    width: auto;
    min-width: 3ch;
}

.kb-hybrid-search-ingest-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
    line-height: 1;
}

.file-ingested-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
}



.ingest-btn {
    align-self: center;
    padding: 10px 14px;
    margin-top: 8px;
}

.kb-add-status {
    min-height: 18px;
    margin-top: 10px;
    font-size: 0.85rem;
}

.kb-add-status.is-error {
    color: var(--danger, #dc2626);
}

.kb-website-options {
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface-strong);
}

.kb-add-help {
    line-height: 1.35;
}

.kb-workspace-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    margin-left: auto;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.kb-workspace-view-toggle {
    margin-top: 15px;
    margin-right: 30px;
}

.kb-workspace-toggle-btn {
    appearance: none;
    -webkit-appearance: none;
    min-width: 156px;
    padding: 8px 18px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}

.kb-workspace-toggle-btn:hover,
.kb-workspace-toggle-btn:focus-visible {
    background: var(--bg-hover-subtle);
    color: var(--text-primary);
    outline: none;
}

.kb-workspace-toggle-btn.active {
    background: var(--accent);
    color: var(--text-on-accent);
}

.kb-workspace-toggle-btn.active:hover,
.kb-workspace-toggle-btn.active:focus-visible {
    background: var(--accent);
    color: var(--text-on-accent);
}

.kb-rerankers-panel {
    padding: 18px 8px;
}

.kb-reranker-more-options-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: fit-content;
}

.kb-reranker-more-options-wrap .coming-feature-overlay {
    inset: auto 8px auto auto;
    top: -8px;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 2px 8px;
    transform: none;
    border-radius: var(--button-radius-sm) !important;
    opacity: 0.92;
    font-size: 0.64rem;
}

.kb-reranker-more-options-wrap button {
    min-width: 132px;
}

.kb-rerankers-placeholder-body {
    max-width: 640px;
    padding: 0;
    line-height: 1.5;
}

.kb-add-files-modal {
    width: min(1180px, 94vw);
    height: 87vh;
    max-width: none;
    min-height: 0;
    min-width: 0;
}

.kb-add-files-modal .modal-body {
    display: flex;
    width: 100%;
    min-height: 0;
    min-width: 0;
}

.kb-add-files-modal > .main-stack,
.kb-add-files-modal .sidetabs-layout {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.kb-add-files-modal .sidetabs-layout {
    grid-template-columns: minmax(48px, max-content) minmax(0, 1fr);
}

.kb-add-files-modal .sidetabs {
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.kb-add-files-modal .modal-body > .tab-pane:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.kb-add-files-modal .tab-pane > .card {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    gap: 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.kb-add-files-modal .tab-pane > .card > .modal-header {
    margin-bottom: 4px;
}

.kb-add-files-modal .card > .muted-text,
.kb-add-files-modal .detail-layout > .muted-text {
    margin: 0;
}

.kb-add-files-modal .detail-layout {
    gap: 8px;
    margin: 0;
    min-width: 0;
}

.kb-add-files-modal .detail-layout > .dropdown-button {
    align-self: flex-start;
    width: fit-content;
    max-width: 50%;
    min-width: 0;
}

.kb-add-files-modal .detail-layout > .dropdown-button > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#kbModalGoogleDriveDropdown,
#kbModalGithubDropdown,
#kbModalOneDriveDropdown {
    max-width: min(320px, calc(100vw - 24px));
}

#kbModalGoogleDriveDropdown .dropdown-item,
#kbModalGithubDropdown .dropdown-item,
#kbModalOneDriveDropdown .dropdown-item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    line-height: 1.3;
    text-align: left;
}

#kbGoogleDriveSelectionState {
    min-width: 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: normal;
}

.kb-onedrive-browser {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    gap: 10px;
    min-height: 0;
    margin-top: 4px;
}

.kb-onedrive-browser-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.kb-onedrive-select-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.kb-onedrive-select-all:hover,
.kb-onedrive-select-all:focus-visible {
    border-color: var(--border-accent);
    background: var(--bg-hover-subtle);
    outline: none;
}

.kb-onedrive-select-all.is-disabled,
.kb-onedrive-select-all:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.kb-onedrive-select-all-indicator {
    position: relative;
    width: 14px;
    min-width: 14px;
    height: 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-surface-strong);
    transition: border-color 0.14s ease, background 0.14s ease;
}

.kb-onedrive-select-all.is-checked .kb-onedrive-select-all-indicator,
.kb-onedrive-select-all.is-indeterminate .kb-onedrive-select-all-indicator {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--bg-surface-strong));
}

.kb-onedrive-select-all.is-checked .kb-onedrive-select-all-indicator::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
}

.kb-onedrive-select-all.is-indeterminate .kb-onedrive-select-all-indicator::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 5px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.kb-onedrive-add-selected-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.kb-onedrive-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.kb-onedrive-breadcrumb-trail {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
}

.kb-onedrive-path-field {
    display: inline-flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 30px;
    max-width: 100%;
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
}

.kb-onedrive-path-input {
    appearance: none;
    display: block;
    width: 100%;
    min-width: 30px;
    max-width: 100%;
    margin: 5px 0 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    line-height: inherit;
    caret-color: currentColor;
    vertical-align: middle;
}

.kb-onedrive-path-input:focus {
    outline: none;
}

.kb-onedrive-path-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.kb-onedrive-breadcrumb-button {
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
}

.kb-onedrive-breadcrumb-button:hover,
.kb-onedrive-breadcrumb-button:focus-visible {
    color: var(--accent);
    outline: none;
}

.kb-onedrive-breadcrumb-button:disabled {
    color: var(--text-secondary);
    cursor: default;
}

.kb-onedrive-breadcrumb-button[aria-current="location"] {
    color: var(--text-primary);
    font-weight: 600;
}

.kb-onedrive-breadcrumb-separator {
    color: var(--text-secondary);
    flex: 0 0 auto;
}

.kb-onedrive-search-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 176px;
    max-width: 220px;
    padding: 6px 8px;
    border-left: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.kb-onedrive-search-icon {
    flex: 0 0 auto;
    color: var(--text-secondary);
}

.kb-onedrive-search-input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
}

.kb-onedrive-search-input::placeholder {
    color: var(--text-secondary);
}

.kb-onedrive-search-input:focus {
    outline: none;
}

.kb-onedrive-search-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.kb-onedrive-items-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-self: stretch;
    width: 100%;
    min-height: 0;
    gap: 10px;
}

.kb-onedrive-items {
    display: flex;
    flex: 1 1 80%;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
}

.kb-onedrive-selected-panel {
    display: flex;
    flex: 0 0 20%;
    min-height: 92px;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-surface);
    overflow: hidden;
}

.kb-onedrive-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.kb-onedrive-selected-title {
    font-size: 0.82rem;
    font-weight: 600;
    flex: 0 0 auto;
}

.kb-onedrive-selected-status {
    min-width: 0;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kb-onedrive-selected-status-path {
    color: var(--text-secondary);
}

.kb-onedrive-selected-empty {
    font-size: 0.82rem;
}

.kb-onedrive-selected-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
}

.kb-onedrive-selected-entry {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    min-width: 0;
}

.kb-onedrive-selected-remove {
    width: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.kb-onedrive-selected-remove:hover,
.kb-onedrive-selected-remove:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.kb-onedrive-selected-copy {
    min-width: 0;
    word-break: break-word;
    color: var(--text-secondary);
}

.kb-onedrive-item {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.kb-onedrive-select-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    min-width: 18px;
}

.kb-onedrive-item.is-folder {
    cursor: pointer;
}

.kb-onedrive-item.is-folder:hover,
.kb-onedrive-item.is-folder:focus-visible {
    border-color: var(--accent);
    background: var(--bg-hover-subtle);
    outline: none;
}

.kb-onedrive-item-info {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kb-onedrive-item-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 24px;
}

.kb-onedrive-add-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 6px;
    margin-bottom: -6px;
}

.kb-onedrive-add-action.is-unsupported {
    cursor: help;
}

.kb-onedrive-add-action.is-unsupported:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

.kb-onedrive-item-title {
    font-weight: 600;
    word-break: break-word;
}

.kb-onedrive-item-meta {
    font-size: 0.82rem;
}

.kb-onedrive-add-icon-button {
    width: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.kb-onedrive-add-icon-button:hover,
.kb-onedrive-add-icon-button:focus-visible {
    color: var(--accent-strong, var(--accent));
    outline: none;
}

.kb-onedrive-add-icon-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.kb-onedrive-unsupported-tooltip {
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    z-index: 8;
    width: 240px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface-strong);
    color: var(--text-primary);
    font-size: 0.8rem;
    line-height: 1.45;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.14s ease, visibility 0.14s ease;
}

.kb-onedrive-add-action.is-unsupported:hover .kb-onedrive-unsupported-tooltip,
.kb-onedrive-add-action.is-unsupported:focus-within .kb-onedrive-unsupported-tooltip,
.kb-onedrive-add-action.is-unsupported:focus-visible .kb-onedrive-unsupported-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kb-onedrive-unsupported-link {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    border: none;
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-surface));
    color: var(--accent);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.kb-onedrive-unsupported-link:hover,
.kb-onedrive-unsupported-link:focus-visible {
    color: var(--accent-strong, var(--accent));
    background: color-mix(in srgb, var(--accent) 16%, var(--bg-hover-subtle));
    outline: none;
}

.kb-onedrive-empty {
    padding: 12px 0;
}

.kb-llmlab-documents {
    display: grid;
    flex: 1 1 auto;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.kb-llmlab-documents > .muted-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kb-llmlab-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.kb-llmlab-table-shell {
    flex: 1 1 240px;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    min-width: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    overflow-x: auto;
    overflow-y: auto;
}

.kb-llmlab-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    padding-top: 2px;
}

.kb-llmlab-actions > button {
    flex: 0 0 auto;
    min-width: max-content;
}

.kb-llmlab-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.kb-llmlab-table th,
.kb-llmlab-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
    vertical-align: top;
}

.kb-llmlab-table th {
    background: var(--bg-surface-strong);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.kb-llmlab-row:last-child td,
.kb-llmlab-table tbody tr:last-child td {
    border-bottom: none;
}

.kb-llmlab-row.is-disabled {
    opacity: 0.65;
}

.kb-llmlab-checkbox-col {
    width: 42px;
    text-align: center !important;
}

.kb-llmlab-checkbox {
    width: 14px;
    height: 14px;
}

.kb-llmlab-name {
    font-weight: 600;
    color: var(--text-primary);
}

.kb-llmlab-description-cell {
    color: var(--text-secondary);
    min-width: 260px;
}

.kb-llmlab-date-cell {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.kb-llmlab-empty-row {
    padding: 16px 12px !important;
    text-align: center !important;
}


.model-settings-identity-grid,
.model-default-node-grid {
  display: grid;
  gap: 12px;
}

.model-settings-identity-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.model-default-node-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.model-settings-system-description {
  display: grid;
  gap: 8px;
}


.model-permission-group {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.model-permission-group:last-child {
  padding-bottom: 0;
  border-bottom: none;
}


.model-info-box {
  min-width: 0;
}

[data-model-worker-settings-part="true"] {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.model-worker-settings-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.model-worker-settings-card {
  flex: 0 0 auto;
  align-self: center;
  width: min(100%, 1000px);
}

.model-worker-settings-card > .settings-card-header {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.model-worker-settings-card > .settings-card-header .title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.model-worker-settings-card > .settings-card-header .mode-toggle {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-start;
}

.model-worker-settings-card--shared {
  width: min(100%, 500px);
}

.model-worker-settings-card--dedicated {
  width: 100%;
  max-width: none;
}

.model-cohost-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.model-cohost-option {
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--panel-radius-sm);
  background: var(--bg-surface-strong);
}

.model-cohost-option span {
  color: var(--text-primary);
}


.model-code-block {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--panel-radius-sm);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

[data-model-worker-install-part="true"] {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.model-self-hosted-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.model-worker-install-card {
  flex: 0 0 auto;
  align-self: center;
  max-width: min(1000px, 97.5%);
  gap: 10px;
}

.model-worker-install-card > .settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.model-worker-install-card > .settings-card-header {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.model-worker-install-card > .settings-card-header .title-block {
  flex: 1 1 auto;
  min-width: 0;
}

.model-worker-install-card > .settings-card-header .mode-toggle {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: flex-start;
}

.model-worker-install-card.model-worker-install-card--local {
  max-width: min(500px, 97.5%);
}

.model-worker-install-card.model-worker-install-card--deployed {
  width: 100%;
  max-width: none;
}

.model-self-hosted-summary-grid {
  flex: 1 1 320px;
}

.model-self-hosted-config-cluster {
  align-items: flex-start;
  gap: 12px;
}

.model-self-hosted-config-field {
  min-width: 0;
  flex: 1 1 280px;
}

.model-self-hosted-config-field.field-inline-form-full {
  width: 100%;
  flex: 1 1 100%;
}

.model-self-hosted-config-field .field-control {
  display: block;
}

.model-self-hosted-config-field-empty {
  flex: 2 1 420px;
}

[data-tab-group="workspace"][data-pane="models"] .field-inline-form.field-inline-form-full.model-self-hosted-config-field-empty .field-control {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.model-self-hosted-empty {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.model-self-hosted-pull-all-field {
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
}

.model-self-hosted-pull-all-row {
  min-width: 0;
  width: auto;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: flex-start;
}

.model-coinstall-dropdown-button {
  width: 100%;
  min-width: 0;
}

.model-coinstall-dropdown-button .dropdown-button-label {
  display: block;
  width: 100%;
  min-width: 0;
}

.model-coinstall-dropdown-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.model-coinstall-dropdown-caret {
  flex: 0 0 auto;
  color: var(--text-secondary);
}

.model-coinstall-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  width: auto;
  min-width: 100%;
  max-width: 100%;
  max-height: min(320px, calc(100vh - 80px));
  overflow-y: auto;
}

.model-coinstall-dropdown-list {
  gap: 6px;
}

.model-coinstall-dropdown-item {
  width: 100%;
  max-width: none;
}

.model-loading-panel {
  display: grid;
  gap: 14px !important;
  position: relative;
}

.model-loading-panel.is-loading {
  pointer-events: none;
}

.model-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--bg-surface) 74%, transparent);
  backdrop-filter: blur(1px);
  z-index: 3;
}

.model-loading-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.model-loading-overlay .loading-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.model-deploy-provider-cluster {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 1 auto;
  margin-left: auto;
}

.model-deploy-provider-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.model-deploy-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.model-deploy-provider-label {
  display: inline;
}

.model-deploy-provider-btn.active,
.model-button-cluster .btn-secondary.active {
  border-color: var(--border-accent);
  color: var(--text-primary);
  background: var(--bg-hover-subtle);
}

.model-deploy-provider-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 auto;
}

.model-deploy-provider-logo--aws {
  background: #ffffff;
  border-radius: 999px;
  padding: 3px;
  box-sizing: content-box;
}

.model-deploy-provider-logo--vast {
  border-radius: 10px;
}

.model-deploy-layout {
  margin: 0;
  gap: 12px;
}

.model-deploy-panel {
  flex: 1 1 300px;
  min-width: 0;
  overflow: visible;
  container-type: inline-size;
  container-name: model-deploy-panel;
}

.model-deploy-options-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: visible;
}

.model-deploy-options-card {
  width: min(100%, 460px);
  overflow: visible;
}

.model-deploy-options-card .settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
}

.model-deploy-options-card .model-self-hosted-config-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.model-deploy-options-card .model-self-hosted-config-field .field-control {
  width: 100%;
  max-width: none;
}

.model-code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.model-button-cluster {
  flex-wrap: wrap;
}




[data-tab-group="workspace"][data-pane="models"] {
  overflow: hidden;
}

#modelTabContent {
  flex: 1 1 auto;
  min-height: 0;
}

.model-overview-grid,
.model-summary-grid {
  display: grid;
  gap: 12px;
}

.model-overview-grid,
.model-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
}

.model-overview-item {
  min-width: min(140px, 100%);
}

.model-overview-label {
  letter-spacing: 0.04em;
}

.model-overview-value {
  overflow-wrap: anywhere;
}

.detail-description-stack {
  display: grid;
  gap: 8px;
}

.model-detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin-left: 0;
  flex: 0 0 auto;
}

.model-detail-actions .settings-gear {
  position: static;
  top: auto;
  right: auto;
  flex: 0 0 auto;
}

.model-detail-header {
  gap: 6px;
}

.model-detail-title-block {
  display: flex;
  flex: 1 1 0;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
}

.model-detail-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.model-detail-title {
  flex: 1 1 auto;
}

.model-detail-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 0 0 auto;
}

.model-detail-description {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 88ch;
}

.model-workspace-mode-toggle {
  flex: 0 0 auto;
}

[data-tab-group="workspace"][data-pane="models"] .field-inline-form .field-control {
  width: var(--field-control-width, clamp(128px, 16vw, 220px));
}

[data-tab-group="workspace"][data-pane="models"] .field-inline-form.field-inline-form-wide .field-control {
  width: var(--field-control-width, clamp(180px, 22vw, 300px));
}

[data-tab-group="workspace"][data-pane="models"] .field-inline-form :is(input:not([type="checkbox"]), select, textarea) {
  padding: 9px 11px;
  font-size: clamp(0.78rem, 0.88vw, 0.9rem);
}

.model-text-action {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.model-text-action:hover {
  color: var(--accent-primary);
}

.model-training-form {
  gap: 12px;
}

.model-warning-block {
  border: 1px solid var(--border-accent);
  background: var(--bg-hover-subtle);
  border-radius: var(--panel-radius-sm);
  padding: 14px 16px;
}

.model-warning-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
}

.model-training-list {
  display: grid;
  gap: 12px;
}

.model-training-list-item {
  gap: 10px;
}

.model-training-list-item--active {
  border-color: var(--border-accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.model-training-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.model-training-list-title-wrap,
.model-training-list-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.model-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-badge);
  background: var(--bg-hover-subtle);
  color: var(--text-badge);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.model-status-pill--success {
  border-color: var(--border-success);
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
  color: color-mix(in srgb, var(--accent-green) 72%, white);
}

.model-status-pill--danger {
  border-color: var(--border-danger);
  background: var(--bg-danger-soft);
  color: var(--text-danger-soft);
}

.model-status-pill--accent {
  border-color: var(--border-accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 68%, white);
}

.model-danger-copy {
  color: var(--text-danger-soft);
}


.topbar {
    position: relative;
    overflow: visible;
    margin-top: -20px;
    margin-bottom: 0;
}

.hero {
    position: relative;
    min-height: 130px;
    padding: 10px 12px;
    z-index: 1;
    overflow: hidden;
    background: var(--bg-page);
    border: 1px solid var(--border-accent);
    border-radius: var(--panel-radius);
    box-shadow: var(--accent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 35%),
            linear-gradient(315deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 30%);
    pointer-events: none;
}

.hero-center {
    line-height: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(100%, 760px);
    padding: 0;
    text-align: center;
    z-index: 1;
}

.hero-brand-link {
    color: inherit;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.hero-brand-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
    border-radius: 8px;
}

.hero-subtitle {
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    font-size: 1.2rem !important;
    font-family: "Righteous" !important;
}

.topbar-logo {
    margin: 0 auto;
}

.topbar-left,
.topbar-right {
    position: absolute;
    top: 70%;
    transform: translateY(-50%);
    z-index: 2;
    width: 125px;
    display: grid;
    gap: 8px;
    justify-items: stretch;
}

.topbar-left {
    left: 22px;
}

.topbar-right {
    justify-items: end;
    right: 22px;
}

.current-org-menu-tag {
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 0;
}


.user-panel-heading {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.user-panel-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.user-panel-title-row h2 {
    margin: 0;
}

.user-panel-email {
    font-size: 0.9rem;
}

.user-panel-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.user-panel-community-action {
    width: 34px;
    height: 34px;
    border-color: color-mix(in srgb, var(--accent) 72%, var(--border-muted));
    background: var(--accent);
    color: var(--discord-link-icon-color, #e0e3ff);
    box-shadow: none;
}

.user-panel-header-actions a.user-panel-community-action.discord-link,
.user-panel-header-actions a.user-panel-community-action.discord-link:visited,
.user-panel-header-actions a.user-panel-community-action.discord-link:active,
.user-panel-header-actions a.user-panel-community-action.discord-link:hover,
.user-panel-header-actions a.user-panel-community-action.discord-link:focus-visible,
.user-panel-community-action:hover,
.user-panel-community-action:focus-visible,
.user-panel-community-action.community-action-star:hover,
.user-panel-community-action.community-action-star:focus-visible,
.user-panel-community-action.community-action-star.is-selected,
.user-panel-community-action.community-action-star.is-selected:hover,
.user-panel-community-action.community-action-star.is-selected:focus-visible {
    color: var(--discord-link-icon-color, #e0e3ff);
}

.user-panel-community-action .discord-link-icon {
    width: 19px;
    height: 15px;
    color: inherit;
    background: currentColor;
}

.user-panel-community-action.community-action-star {
    font-size: 1.24rem;
}



.user-settings-pane {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.user-settings-pane {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.user-settings-stack .settings-card {
    min-width: 0;
    margin-bottom: 0;
}

.user-settings-card-full {
    grid-column: 1 / -1;
}


.user-billing-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 10px;
}

.user-billing-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 10px;
}

.user-billing-org-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 10px;
}

.user-billing-card-item {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.user-billing-org-item {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.user-billing-card-copy {
    min-width: 0;
}

.user-billing-card-title {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.user-billing-card-meta {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.user-billing-events-table {
    display: grid;
    grid-template-columns: 1fr 0.9fr 0.8fr minmax(84px, 0.3fr);
    min-width: 480px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    overflow: hidden;
    background: var(--bg-surface);
}

.user-billing-events-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.user-billing-events-head,
.user-billing-events-cell {
    padding: 10px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-faint);
}

.user-billing-events-head {
    background: var(--bg-settings-title);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-billing-events-cell {
    color: var(--text-primary);
}

.user-billing-events-cell.user-billing-events-amount {
    text-align: right;
    white-space: nowrap;
}

.user-billing-events-rows {
    display: contents;
}

.user-billing-empty {
    grid-column: 1 / -1;
    padding: 12px;
    font-size: 0.82rem;
}


.tab-pane.user-settings-pane[data-pane="notifications"] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding-right: 0;
}

.tab-pane.user-settings-pane[data-pane="notifications"] .user-settings-stack,
.tab-pane.user-settings-pane[data-pane="notifications"] .settings-card,
.tab-pane.user-settings-pane[data-pane="notifications"] .settings-card-body {
    min-height: 0;
}

.tab-pane.user-settings-pane[data-pane="notifications"] .user-settings-stack,
.tab-pane.user-settings-pane[data-pane="notifications"] .settings-card {
    height: 100%;
}

.tab-pane.user-settings-pane[data-pane="notifications"] .settings-card {
    display: flex;
    flex-direction: column;
}

.tab-pane.user-settings-pane[data-pane="notifications"] .settings-card-body {
    flex: 1 1 auto;
    display: flex;
    overflow: hidden;
}

.user-settings-stack .settings-card {
    min-width: 0;
    margin-bottom: 0;
}

.user-settings-card-full {
    grid-column: 1 / -1;
}

.user-notifications-layout {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 0;
    align-items: start;
    height: 100%;
    min-height: 0;
}

.user-notifications-tabs {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
    width: max-content;
    justify-self: start;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    min-height: 0;
}

.user-notification-tab {
    width: auto;
    padding: 12px 5px;
    gap: 4px;
    font-size: 0.82rem;
}

.user-notification-tab.is-unread {
    background: var(--bg-surface-strong);
    color: var(--text-primary);
}

.user-notification-tab.is-read {
    background: var(--bg-surface);
    color: inherit;
}

.user-notification-tab.is-required {
    box-shadow: none;
}

.user-notification-tab.is-required.active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.user-notification-detail-shell {
    min-width: 0;
    position: relative;
    display: flex;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
}

.user-notification-detail {
    min-width: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
    min-height: 0;
    height: 100%;
    padding-bottom: 56px;
    box-sizing: border-box;
}

.user-notification-jump-btn {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-surface) 92%, var(--bg-page) 8%);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    z-index: 2;
    cursor: pointer;
}

.user-notification-jump-btn:hover {
    background: var(--bg-surface-strong);
}

.user-notification-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.user-notification-card.is-required {
    border-color: var(--accent);
}

.user-notification-copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.user-notification-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
}

.user-notification-body {
    line-height: 1.55;
    white-space: normal;
}

.user-notification-body h2,
.user-notification-body h3 {
    margin: 0 0 10px;
    color: var(--text-primary);
    line-height: 1.25;
}

.user-notification-body h2 {
    font-size: 1.1rem;
}

.user-notification-body h3 {
    font-size: 0.98rem;
}

.user-notification-body p {
    margin: 0 0 12px;
}

.user-notification-body ul {
    margin: 0 0 12px 18px;
    padding: 0;
}

.user-notification-body li {
    margin: 0 0 6px;
}

.user-notification-body hr {
    margin: 14px 0;
    border: 0;
    border-top: 1px solid var(--border-subtle);
}

.user-notification-body > :last-child {
    margin-bottom: 0;
}

.user-notification-actions {
    display: grid;
    gap: 12px;
}

.user-notification-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.user-notification-checkbox {
    align-items: start;
}

.user-notification-empty {
    padding: 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    font-size: 0.84rem;
}

.user-notification-detail .user-notification-empty {
    min-height: 160px;
}

.user-notification-create-modal-card {
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
}

.user-notification-create-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
}

.user-notification-create-field-wide {
    grid-column: 1 / -1;
}

.user-notification-create-modal-body textarea {
    min-height: 220px;
    resize: vertical;
}


.theme-picker {
    display: grid;
    grid-template-columns: repeat(6, 28px);
    grid-template-rows: repeat(2, 28px);
    gap: 12px;

    justify-content: start;   /* or center if you want */
    align-content: start;

    margin-top: 8px;
}

.theme-dot {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid var(--border-muted);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-dot::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--bg-surface-strong);
    color: var(--text-primary);
    border: 1px solid var(--border-muted);
    box-shadow: var(--shadow-dropdown);
    font-size: 12px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 20;
}

.theme-dot:hover::after,
.theme-dot:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.theme-dot.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--border-accent);
}

.theme-dot[data-theme="midnight"] {
    background: linear-gradient(135deg, #050505 0%, #1f1f1f 60%, #d4d4d4 100%);
}

.theme-dot[data-theme="solar-flare"] {
    background: linear-gradient(135deg, #050505 0%, #1a1a1a 55%, #dc2626 100%);
}

.theme-dot[data-theme="stormglass"] {
    background: linear-gradient(135deg, #07101b 0%, #12243b 55%, #60a5fa 100%);
}

.theme-dot[data-theme="violet-storm"] {
    background: linear-gradient(135deg, #12081f 0%, #341c52 55%, #d8b4fe 100%);
}

.theme-dot[data-theme="twilight-rose"] {
    background: linear-gradient(135deg, #1a0a0f 0%, #3a1620 55%, #fda4af 100%);
}

.theme-dot[data-theme="evergreen-dusk"] {
    background: linear-gradient(135deg, #08130d 0%, #133222 55%, #6ee7b7 100%);
}

.theme-dot[data-theme="golden-hour"] {
    background: linear-gradient(135deg, #1a0d06 0%, #6e2e0e 55%, #fdba74 100%);
}

.theme-dot[data-theme="dawn-ember"] {
    background: linear-gradient(135deg, #1a1206 0%, #5b3a0a 55%, #fcd34d 100%);
}

.theme-dot[data-theme="polar-cloud"] {
    background: linear-gradient(135deg, #ecfeff 0%, #69ebf5 55%, #0f766e 100%);
}

.theme-dot[data-theme="canopy-sky"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #86efac 55%, #166534 100%);
}

.theme-dot[data-theme="nimbus"] {
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 55%, #334155 100%);
}

.theme-dot[data-theme="daybreak"] {
    background: linear-gradient(135deg, #fffef8 0%, #fef3c7 55%, #92400e 100%);
}

.user-font-selector {
    align-self: start;
    margin-top: 30px;
}

.panel-style-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    width: 52px;
    min-width: 52px;
    padding: 0;

    background: var(--bg-surface);
    border: none;
    border-radius: var(--panel-radius);

    cursor: pointer;
}


.panel-style-btn .label {
    font-size: 11px;
    text-transform: capitalize;
}

/* preview container */
.panel-style-btn .preview {
    width: 100%;
    height: 52px;

    background: var(--bg-surface-strong);
    border-radius: var(--panel-radius);

    display: flex;
    align-items: center;
    justify-content: center;
}

/* middle panel */
.panel-style-btn .preview-inner-sm {
    width: 90%;
    height: 90%;

    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-sm);

    display: flex;
    align-items: center;
    justify-content: center;
}

/* inner panel */
.panel-style-btn .preview-inner-lg {
    width: 75%;
    height: 75%;

    background: var(--bg-surface-strong);
    border-radius: var(--panel-radius-lg);
    border: 1px solid var(--border-subtle);
}

.panel-style-btn[data-panel-style="square"] {
    --panel-radius: 0px;
    --panel-radius-sm: 0px;
    --panel-radius-lg: 0px;
}

.panel-style-btn[data-panel-style="sharp"] {
    --panel-radius: 6px;
    --panel-radius-sm: 4px;
    --panel-radius-lg: 8px;
}

.panel-style-btn[data-panel-style=""] {
    --panel-radius: 10px;
    --panel-radius-sm: 8px;
    --panel-radius-lg: 14px;
}

.panel-style-btn[data-panel-style="soft"] {
    --panel-radius: 14px;
    --panel-radius-sm: 12px;
    --panel-radius-lg: 16px;
}

.panel-style-btn[data-panel-style="round"] {
    --panel-radius: 18px;
    --panel-radius-sm: 16px;
    --panel-radius-lg: 20px;
}

.panel-style-btn.active {
    color: var(--text-primary);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.tab-pane.user-settings-pane[data-pane="settings"] .settings-card {
    align-self: start;
    height: auto;
    overflow: visible;
}

.tab-pane.user-settings-pane[data-pane="settings"] .settings-table {
    min-width: 0;
}

.user-assistant-setting {
    min-width: 0;
}

.user-assistant-grid .user-assistant-setting + .user-assistant-setting {
    border-top: none;
    border-left: 1px solid var(--border-soft);
}

.dropdown-item[data-font="Futura"] { font-family: "Futura"; }
.dropdown-item[data-font="Inter"] { font-family: "Inter"; }
.dropdown-item[data-font="JetBrains Mono"] { font-family: "JetBrains Mono"; }
.dropdown-item[data-font="Merriweather"] { font-family: "Merriweather"; }
.dropdown-item[data-font="Nunito"] { font-family: "Nunito"; }
.dropdown-item[data-font="Poppins"] { font-family: "Poppins"; }
.dropdown-item[data-font="Press Start 2P"] { font-family: "Press Start 2P"; }
.dropdown-item[data-font="Quicksand"] { font-family: "Quicksand"; }
.dropdown-item[data-font="Righteous"] { font-family: "Righteous"; }
.dropdown-item[data-font="Roboto"] { font-family: "Roboto"; }
.dropdown-item[data-font="SF Pro"] { font-family: "SF Pro"; }


.user-private-dek-note {
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
    font-size: 0.84rem;
    line-height: 1.45;
}

.user-gdrive-connections-list {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    min-width: max-content;
}

.user-gdrive-connections-scroll {
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
}

.user-gdrive-connection-item {
    display: grid;
    align-content: start;
    gap: 12px;
    flex: 0 0 260px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    background: var(--bg-surface);
}

.user-gdrive-connection-head {
    padding: 0;
    background: transparent;
    border: none;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
}

.user-gdrive-connection-toggle {
    justify-self: center;
}

.user-gdrive-connection-email {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.user-gdrive-empty {
    padding: 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--panel-radius-sm);
    font-size: 0.82rem;
    min-width: min(100%, 320px);
}


/* Warning preference markup currently uses shared settings-card, settings-row, and checkbox styles. */


@media (max-width: 1200px) {

    .model-deploy-layout {
        flex-direction: column;
    }

    .model-deploy-panel {
        flex: 1 1 auto;
        width: 100%;
    }
}

@container model-deploy-panel (max-width: 475px) {

    .model-deploy-provider-label {
        display: none;
    }

    .model-deploy-provider-btn {
        min-width: 40px;
        justify-content: center;
        padding-inline: 10px;
    }
}

@media (max-width: 900px) {

    .admin-org-security-card {
        margin-inline: 12px;
    }

    .admin-org-security-table-container {
        max-height: 320px;
    }

    .admin-permissions-pane {
        grid-template-rows: minmax(220px, 0.9fr) minmax(320px, 1.1fr);
        gap: 12px;
    }

    .admin-permissions-grid-header,
    .admin-permissions-row {
        grid-template-columns: minmax(0, 13.5ch) minmax(0, 1fr) 24px;
        gap: 8px;
    }

    .admin-permissions-grid-header {
        font-size: 10px;
    }

    .admin-permissions-description-text {
        -webkit-line-clamp: 3;
    }

    .permission-check-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tab-pane.user-settings-pane[data-pane="notifications"] .user-settings-card-full {
        padding: 0;
    }

    .tab-pane.user-settings-pane[data-pane="notifications"] .settings-card-body {
        padding: 0;
    }

    .tab-pane.user-settings-pane[data-pane="notifications"] .user-notifications-tabs {
        padding-left: 3px;
        padding-right: 3px;
    }

    .action-top-controls-grid,
    .action-http-config-grid,
    .action-http-auth-grid,
    .action-public-url-grid,
    .action-public-url-schema-grid,
    .action-output-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .action-http-url-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {

    .admin-usage-cap-button-label-full {
        display: none;
    }

    .admin-usage-cap-button-label-compact {
        display: inline;
    }
}

@media (max-width: 700px) {

    .codebase-parser-language-button {
        width: 38px;
        min-width: 38px;
        padding-inline: 9px;
    }

    .codebase-parser-language-button .codebase-parser-language-button-label,
    .codebase-parser-language-button .topbar-org-caret {
        display: none;
    }

    .admin-privacy-pane {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .admin-privacy-layout {
        grid-template-columns: 1fr;
    }

    .admin-privacy-card,
    .admin-privacy-settings-card {
        min-height: 0;
        flex: 0 0 auto;
    }

    .admin-privacy-card-scroll,
    .admin-privacy-settings-scroll {
        overflow: visible;
    }

    .tracking-logs-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .model-detail-heading-row {
        flex-wrap: wrap;
    }

    .model-detail-actions {
        align-items: center;
        flex-direction: row;
        justify-content: flex-start;
    }

    .wf-node-field-grid-2,
    .wf-node-field-grid-3 {
        grid-template-columns: 1fr;
    }

    .admin-usage-summary-grid,
    .admin-usage-two-column {
        grid-template-columns: 1fr;
    }

    .action-llm-layout {
        grid-template-columns: 1fr;
    }

    .action-output-layout {
        grid-template-columns: 1fr;
    }

    .gpu-cloud-dashboard-pool-header {
        flex-direction: column;
        align-items: stretch;
    }

    .gpu-cloud-dashboard-pool-header-actions {
        align-items: flex-start;
    }

    .gpu-cloud-dashboard-worker-header {
        flex-direction: column;
        align-items: stretch;
    }

    .gpu-cloud-dashboard-worker-session-flags {
        justify-content: flex-start;
    }

    .action-webhook-grid {
        grid-template-columns: 1fr;
    }

    .action-output-schema-row {
        grid-template-columns: 1fr;
    }

    .action-output-schema-row-header {
        display: none;
    }

    .action-top-controls-grid,
    .action-top-controls-grid-single {
        grid-template-columns: auto 1fr;
        gap: 10px;
    }

    .action-compact-control,
    .action-clarification-input {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .action-schema-row {
        grid-template-columns: 1fr;
    }

    .action-schema-row-header {
        display: none;
    }

    .action-clarification-stack {
        gap: 8px;
        margin-top: 0;
    }

    .user-assistant-grid .user-assistant-setting + .user-assistant-setting {
        border-left: none;
        border-top: 1px solid var(--border-soft);
    }

    .kb-workspace-toggle {
        width: 100%;
    }

    .kb-workspace-view-toggle {
        margin-top: 0;
        margin-right: 0;
    }

    .kb-workspace-toggle-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .kb-rerankers-header {
        align-items: stretch;
    }

    .admin-secrets-grid-header {
        display: none;
    }

    .admin-secret-row {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: start;
        padding: 10px 2px;
    }

    .user-gdrive-settings-header {
        align-items: stretch;
    }

    .user-private-dek-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
        justify-content: stretch;
        width: 100%;
    }

    .user-private-dek-actions > button:first-child {
        grid-column: 1 / -1;
        width: 100%;
    }

    .user-private-dek-actions > button:not(:first-child) {
        width: 100%;
    }

    .admin-privacy-actions {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .panel-style-options {
        flex-wrap: wrap;
        gap: 8px;
    }

    .panel-style-btn {
        width: 52px;
        min-width: 52px;
        padding: 0;
        gap: 6px;
    }

    .panel-style-btn .preview {
        height: 52px;
    }

    .panel-style-btn .label {
        font-size: 11px;
    }

    .presets-modal-row {
        grid-template-columns: minmax(0, 1fr) 68px;
    }

    .dropdown-button {
        width: 100%;
        min-width: 0;
    }

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

    .hero {
        min-height: 80px;
        padding: 0 22px 4px 22px;
    }

    .hero-content h1 {
        font-size: 0;
        white-space: nowrap;
    }

    .hero-subtitle {
        display: none !important;
    }

    .topbar-left,
    .topbar-right {
        width: 90px;
    }

    .topbar-left {
        left: clamp(10px, 2vw, 20px);
    }

    .topbar-right {
        right: clamp(10px, 2vw, 20px);
    }

    .main-stack {
        margin: 0;
        padding: 0;
    }

    .settings-card-body{
        padding: 2px;
    }

    .sideTabs {
        padding-left: 0;
        padding-right: 0;
        gap: 2px;
    }

    .sideTabs-toggle {
        width: 20px;
        margin: 10px auto;
    }

    .sidetab {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
        border-left-width: 0;
    }

    .sidetab.active {
        border-left-color: transparent;
        box-shadow: inset 3px 0 0 var(--border-accent-strong);
    }

    .sidetab-short {
        display: inline;
    }

    .sidetab-label {
        display: none;
    }

    .workspace-nav .sidetab-group-toggle {
        display: flex;
        justify-content: center;
        margin: 8px 0 4px;
    }

    .workspace-nav .sidetab-group-label-full {
        display: none !important;
    }

    .workspace-nav .sidetab-group-label-short {
        display: inline !important;
        margin-left: 0;
    }

    .workspace-nav .workspace-sidetab-group-content {
        display: flex !important;
    }

    .workspace-nav .workspace-sidetab-group-content.hidden {
        display: none !important;
    }

    .workspace-nav .sidetab-group + .sidetab-group {
        border-top: 1px solid var(--border-subtle);
        padding-top: 8px;
        margin-top: 8px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .field-row-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .field-inline-form,
    .field-inline-form.field-inline-form-full {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .field-inline-form .field-label {
        white-space: normal;
    }

    .field-inline-form .field-control {
        width: 100%;
    }

    .workspace-content .section-title .title-block {
        gap: 10px;
    }

    .settings-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .settings-help {
        grid-column: 1;
    }

    .actions-row,
    .admin-actions-row {
        margin-top: auto;
        padding-top: 16px;
    }

    .admin-settings-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .admin-members-actions {
        justify-content: flex-start;
    }

    .admin-settings-help {
        grid-column: 1;
    }

    .admin-permissions-grid {
        grid-template-columns: 1fr;
    }

    #joinOrCreateOrgList {
        max-height: calc(100dvh - 500px);
        overflow-y: auto;
        margin-top: 12px;
    }

    .org-list-item {
        grid-template-columns: 1fr;
    }

    .org-list-item-name,
    .org-list-item-members,
    .org-list-item-description,
    .org-list-item-owner {
        white-space: normal;
    }

    .admin-roles-layout {
        display: grid;
        grid-template-columns: clamp(40px, 18vw, 100px) minmax(0, 1fr);
    }

    .workflow-node.workflow-node-action.runtime-citations-open {
        min-width: 506px;
        max-width: 598px;
    }

    .workflow-node.workflow-node-action.runtime-citations-open .action-runtime-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .workflow-preset-generation-detail {
        padding-right: 0;
    }

    .workflow-preset-generation-panel {
        top: 16px !important;
        left: 50% !important;
        width: 97.5vw;
        max-width: 97.5vw;
        transform: translateX(-50%);
    }

    .workflow-preset-generation-shell {
        height: calc(100vh - 32px);
        max-height: calc(100vh - 32px);
        min-height: min(560px, calc(100vh - 32px));
    }

    .workflow-preset-generation-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .workflow-preset-generation-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        max-height: 34vh;
    }
}

@media (max-width: 760px) {
    .workflow-preset-generation-sidebar-header,
    .workflow-preset-generation-section-header,
    .workflow-generated-case-header,
    .workflow-generated-case-leading-top,
    .workflow-preset-generation-header {
        flex-direction: column;
        align-items: stretch;
    }

    .workflow-preset-inline-hint,
    .workflow-preset-inline-select,
    .workflow-generated-case-actions,
    .workflow-generated-case-header-actions,
    .workflow-preset-generation-actions {
        width: 100%;
        margin-left: 0;
    }

    .workflow-preset-inline-select {
        flex-wrap: wrap;
    }

    .workflow-preset-inline-select .wf-node-input,
    .workflow-generated-case-actions > button,
    .workflow-generated-case-header-actions > button {
        width: 100%;
    }

    .workflow-generated-case-actions,
    .workflow-generated-case-header-actions,
    .workflow-preset-generation-toolbar {
        display: flex;
        flex-wrap: wrap;
    }

    .workflow-generated-case-time-row {
        padding-left: 0;
    }

    .integration-theme-color-grid,
    .integration-welcome-preset-row {
        grid-template-columns: 1fr;
    }

    .dev-plan-submit-fields {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "name"
            "type"
            "description";
    }

    .integration-theme-color-card,
    .integration-widget-preview-theme-cluster {
        width: 100%;
    }
}

@media (max-width: 1120px) {
    .field-span-2,
    .field-span-3,
    .field-span-4 {
        grid-column: span 6;
    }

    .job-plan-choice-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .simulator-header-tabs {
        width: 100%;
    }

    .simulator-tabs {
        justify-content: flex-start;
    }

    .simulator-tab {
        width: 100%;
    }

    .simulation-playback-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .gpu-cloud-dashboard-admin-actions {
        justify-content: flex-start;
    }

    .gpu-cloud-dashboard-admin-user {
        text-align: left;
    }

    .simulator-header {
        padding: 0;
    }

    .simulator-video-stage,
    .simulator-video-right {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }

    .simulator-player-meta-rail {
        order: 2;
        width: min(95vw, calc(100vw - 28px));
        max-width: min(95vw, calc(100vw - 28px));
    }

    .simulator-video-player {
        min-width: 0;
        width: min(95vw, calc(100vw - 28px));
        max-width: min(95vw, calc(100vw - 28px));
    }

    .simulator-video-workers {
        width: 95%;
    }

    .simulator-worker-grid {
        justify-content: flex-start;
    }

    .simulator-queue-grid {
        grid-template-columns: repeat(25, minmax(0, 1fr));
    }

    .simulator-queue-header-actions {
        width: 100%;
    }

    .simulator-playback-controls {
        align-items: stretch;
    }

    .simulator-playback-buttons,
    .simulator-playback-meta {
        width: 100%;
    }

    .simulator-playback-speed {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .kb-onedrive-browser-toolbar,
    .kb-source-selector-toolbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 2px;
    }

    .kb-onedrive-breadcrumbs,
    .kb-source-selector-breadcrumbs {
        padding-left: 6px;
        padding-right: 0;
    }

    .kb-onedrive-select-all,
    .kb-source-selector-select-all {
        padding: 0 10px;
    }

    .kb-onedrive-select-all-text,
    .kb-onedrive-add-selected-label,
    .kb-source-selector-select-all-text,
    .kb-source-selector-add-selected-label {
        display: none;
    }

    .kb-onedrive-add-selected-button,
    .kb-source-selector-add-selected-button {
        min-width: 19px;
        min-height: 19px;
        height: 19px;
        justify-content: center;
        gap: 0;
        padding: 0;
        border-radius: 8px;
        font-size: 0.9rem;
    }

    .kb-source-selector-add-selected-button.is-loading {
        min-width: 68px;
        padding: 0 6px;
    }

    .kb-onedrive-search-field,
    .kb-source-selector-search-field {
        flex: 0 1 30%;
        width: 30%;
        min-width: 96px;
        max-width: 30%;
        justify-content: flex-start;
        padding: 0 6px;
    }

    .kb-onedrive-search-input::placeholder,
    .kb-source-selector-search-input::placeholder {
        color: transparent;
    }

    .kb-add-files-modal .kb-source-selector-items-shell {
        flex: 0 0 auto;
        min-height: min(320px, 42vh);
    }

    .kb-add-files-modal .kb-source-selector-items {
        flex: 1 1 auto;
        min-height: 180px;
    }

    .kb-add-files-modal .kb-source-selector-selected-panel {
        flex: 0 0 auto;
        max-height: 132px;
    }

    .kb-llmlab-name-cell .name-reveal-trigger {
        max-width: 16ch;
    }

    .file-name .file-name-inline .ellipsis,
    .file-name .kb-source-name-wrap > .ellipsis,
    .kb-source-item-name-wrap > .ellipsis {
        max-width: 16ch;
    }

    .dev-plan-name-text.name-reveal-trigger {
        max-width: 10ch;
    }

    .dev-plan-modal-header {
        align-items: flex-start;
        gap: 10px;
    }

    .dev-plan-header-actions {
        flex: 1 1 auto;
        flex-wrap: wrap;
        gap: 8px;
    }

    .dev-plan-view-toggle {
        flex: 1 1 100%;
    }

    .dev-plan-view-toggle-btn {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: 10px;
    }

    .dev-plan-list {
        min-width: 680px;
        padding: 8px;
    }

    .dev-plan-list-header,
    .dev-plan-list-row {
        grid-template-columns: minmax(132px, 1.1fr) minmax(220px, 1.7fr) minmax(82px, 0.55fr) minmax(128px, 0.75fr);
        column-gap: 8px;
    }

    .dev-plan-list-row {
        border-radius: 28px;
        padding-inline: 10px;
    }

    .document-content-table-header .name-reveal-trigger {
        max-width: min(100%, 16ch);
    }

    .simulator-header-main {
        flex-wrap: wrap;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2,
    .field-span-3,
    .field-span-4,
    .field-span-5,
    .field-span-6,
    .field-span-8,
    .field-span-12 {
        grid-column: 1 / -1;
    }

    .worker-plan-model-row,
    .job-plan-choice-row,
    .simulator-playback-controls {
        grid-template-columns: 1fr;
    }

    .simulator-queue-grid {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }

    .simulator-playback-left {
        justify-items: start;
    }

    .simulator-ratio-legend-item {
        min-width: 100%;
    }
}


:root[data-theme="midnight"] {
    --bg-page: #050505;
    --bg-page-alt: #0a0a0a;

    --bg-surface: rgba(18, 18, 18, 1);
    --bg-surface-strong: rgba(10, 10, 10, 1);
    --bg-surface-hover: rgba(28, 28, 28, 0.95);
    --bg-surface-hover-alt: rgba(36, 36, 36, 0.95);
    --tinted: rgba(255, 255, 255, 0.03);

    --bg-input: rgba(24, 24, 24, 1);
    --bg-input-strong: rgba(30, 30, 30, 1);

    --bg-overlay: rgba(0, 0, 0, 0.85);
    --bg-overlay-soft: rgba(0, 0, 0, 0.65);

    --bg-tab-active: rgba(255, 255, 255, 0.08);
    --bg-sidetab-active: rgba(255, 255, 255, 0.12);

    --bg-hover-subtle: rgba(255, 255, 255, 0.04);
    --bg-hover-subtle-strong: rgba(255, 255, 255, 0.08);

    --bg-dropdown-item-hover: rgba(255, 255, 255, 0.08);
    --bg-add-tab: rgba(24, 24, 24, 1);
    --bg-settings-title: rgba(24, 24, 24, 1);
    --bg-disabled: rgba(255, 255, 255, 0.05);

    --text-primary: #999999;
    --text-secondary: #777777;
    --text-label: #666666;
    --text-placeholder: #737373;
    --text-badge: #777777;
    --text-on-accent: #000000;
    --text-settings-title: #a4a4a4;
    --text-icon: #a4a4a4;

    --border-muted: rgba(255, 255, 255, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-faint: rgba(255, 255, 255, 0.05);
    --border-soft: rgba(255, 255, 255, 0.04);

    --border-input-focus: rgba(255, 255, 255, 0.4);
    --border-accent: rgba(255, 255, 255, 0.2);
    --border-accent-strong: rgba(255, 255, 255, 0.6);
    --border-badge: rgba(255, 255, 255, 0.16);

    --shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.7);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.6);
    --shadow-focus: 0 0 0 4px rgba(255, 255, 255, 0.08);

    --scrollbar-thumb: rgba(120, 120, 120, 0.5);
    --scrollbar-thumb-hover: rgba(160, 160, 160, 0.7);
    --scrollbar-track: rgba(10, 10, 10, 1);

    --accent: #a4a4a4;
}


:root[data-theme="daybreak"] {
    --bg-page: #fffef8;
    --bg-page-alt: #fff7db;

    --bg-surface: rgba(255, 254, 249, 1);
    --bg-surface-strong: rgba(236, 228, 209, 1);
    --bg-surface-hover: rgba(255, 248, 231, 0.95);
    --bg-surface-hover-alt: rgba(253, 242, 208, 0.95);
    --tinted: rgba(0, 0, 0, 0.03);

    --bg-input: rgba(255, 248, 231, 1);
    --bg-input-strong: rgba(253, 242, 208, 1);

    --bg-overlay: rgba(25, 30, 40, 0.5);
    --bg-overlay-soft: rgba(25, 30, 40, 0.35);

    --bg-tab-active: rgba(202, 138, 4, 0.12);
    --bg-sidetab-active: rgba(202, 138, 4, 0.16);

    --bg-hover-subtle: rgba(25, 30, 40, 0.04);
    --bg-hover-subtle-strong: rgba(25, 30, 40, 0.08);

    --bg-dropdown-item-hover: rgba(202, 138, 4, 0.1);
    --bg-add-tab: rgba(255, 248, 231, 1);
    --bg-settings-title: rgba(255, 248, 231, 1);
    --bg-disabled: rgba(148, 163, 184, 0.12);

    --text-primary: #2c2414;
    --text-secondary: #6b5a2b;
    --text-label: #43381a;
    --text-placeholder: #b59b5a;
    --text-badge: #7c5b12;
    --text-on-accent: #ffffff;
    --text-settings-title: #43381a;
    --text-icon: #7c5b12;

    --border-muted: rgba(25, 30, 40, 0.12);
    --border-subtle: rgba(25, 30, 40, 0.08);
    --border-faint: rgba(25, 30, 40, 0.06);
    --border-soft: rgba(25, 30, 40, 0.04);

    --border-input-focus: rgba(202, 138, 4, 0.38);
    --border-accent: rgba(202, 138, 4, 0.22);
    --border-accent-strong: rgba(202, 138, 4, 0.78);
    --border-badge: rgba(202, 138, 4, 0.18);

    --shadow: 0 10px 30px rgba(25, 30, 40, 0.1);
    --shadow-sm: 0 4px 10px rgba(25, 30, 40, 0.1);
    --shadow-dropdown: 0 8px 20px rgba(25, 30, 40, 0.08);
    --shadow-focus: 0 0 0 4px rgba(202, 138, 4, 0.15);

    --scrollbar-thumb: rgba(140, 150, 170, 0.5);
    --scrollbar-thumb-hover: rgba(100, 110, 140, 0.7);
    --scrollbar-track: rgba(255, 248, 231, 1);

    --accent: #ca8a04;
}


:root[data-theme="stormglass"] {
    --bg-page: #17111b;
    --bg-page-alt: #0b1526;
    --bg-surface: rgba(12, 20, 35, 1);
    --bg-surface-strong: rgba(5, 11, 20, 1);
    --bg-surface-hover: rgba(20, 30, 48, 0.92);
    --bg-surface-hover-alt: rgba(28, 40, 62, 0.95);
    --tinted: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(15, 23, 42, 0.75);
    --bg-input-strong: rgba(15, 23, 42, 0.82);
    --bg-overlay: rgba(4, 10, 18, 0.9);
    --bg-overlay-soft: rgba(4, 10, 18, 0.75);
    --bg-tab-active: rgba(15, 23, 42, 0.38);
    --bg-sidetab-active: rgba(25, 25, 50, 0.65);
    --bg-hover-subtle: rgba(148, 163, 184, 0.06);
    --bg-hover-subtle-strong: rgba(148, 163, 184, 0.08);
    --bg-dropdown-item-hover: rgba(35, 50, 75, 0.65);
    --bg-add-tab: rgba(15, 23, 42, 0.8);
    --bg-settings-title: rgba(20, 30, 48, 0.9);
    --bg-danger: rgba(127, 29, 29, 0.92);
    --bg-danger-hover: rgba(153, 27, 27, 0.96);
    --bg-danger-soft: rgba(220, 38, 38, 0.18);
    --bg-danger-soft-hover: rgba(220, 38, 38, 0.26);
    --bg-disabled: rgba(148, 163, 184, 0.12);

    --text-primary: #eaf2ff;
    --text-secondary: #97a8c2;
    --text-label: #dbe7f7;
    --text-placeholder: #8196b4;
    --text-on-accent: #ffffff;
    --text-badge: #cfe3ff;
    --text-settings-title: #dceafe;
    --text-danger: #fecaca;
    --text-danger-soft: #fca5a5;
    --text-icon: #cbd5f5;

    --border-muted: rgba(148, 163, 184, 0.18);
    --border-subtle: rgba(148, 163, 184, 0.12);
    --border-faint: rgba(148, 163, 184, 0.1);
    --border-soft: rgba(148, 163, 184, 0.08);
    --border-input-focus: rgba(96, 165, 250, 0.55);
    --border-accent: rgba(96, 165, 250, 0.28);
    --border-accent-strong: rgba(96, 165, 250, 0.9);
    --border-success: rgba(34, 197, 94, 0.35);
    --border-danger: rgba(239, 68, 68, 0.35);
    --border-danger-strong: rgba(239, 68, 68, 0.4);
    --border-danger-soft: rgba(220, 38, 38, 0.4);
    --border-badge: rgba(148, 163, 184, 0.22);

    --shadow: 0 22px 60px rgba(0, 0, 50, 0.35);
    --shadow-sm: 0 4px 20px rgba(0, 0, 50, 0.35);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.28);
    --shadow-focus: 0 0 0 4px rgba(96, 165, 250, 0.14);

    --scrollbar-thumb: rgba(40, 60, 90, 0.55);
    --scrollbar-thumb-hover: rgba(55, 80, 120, 0.65);
    --scrollbar-track: rgba(12, 20, 35, 0.9);

    --accent: #60a5fa;
}


:root[data-theme="solar-flare"] {
    --bg-page: #050505;
    --bg-page-alt: #0a0a0a;

    --bg-surface: rgba(18, 18, 18, 1);
    --bg-surface-strong: rgba(8, 8, 8, 1);
    --bg-surface-hover: rgba(30, 30, 30, 0.92);
    --bg-surface-hover-alt: rgba(40, 40, 40, 0.96);
    --tinted: rgba(255, 255, 255, 0.03);

    --bg-input: rgba(20, 20, 20, 0.9);
    --bg-input-strong: rgba(26, 26, 26, 0.95);

    --bg-overlay: rgba(0, 0, 0, 0.9);
    --bg-overlay-soft: rgba(0, 0, 0, 0.7);

    --bg-tab-active: rgba(220, 38, 38, 0.14);
    --bg-sidetab-active: rgba(220, 38, 38, 0.2);

    --bg-hover-subtle: rgba(239, 68, 68, 0.05);
    --bg-hover-subtle-strong: rgba(239, 68, 68, 0.1);

    --bg-dropdown-item-hover: rgba(220, 38, 38, 0.12);

    --bg-add-tab: rgba(24, 24, 24, 0.9);
    --bg-settings-title: rgba(28, 28, 28, 0.95);

    --bg-disabled: rgba(255, 255, 255, 0.05);

    --text-primary: #ff0000;
    --text-secondary: #ff7171;
    --text-label: #ffcaca;
    --text-placeholder: #ff4444;

    --text-on-accent: #ffffff;
    --text-badge: #fecaca;
    --text-settings-title: #fca5a5;
    --text-icon: #f87171;

    --border-muted: rgba(239, 68, 68, 0.2);
    --border-subtle: rgba(239, 68, 68, 0.12);
    --border-faint: rgba(239, 68, 68, 0.08);
    --border-soft: rgba(239, 68, 68, 0.06);

    --border-input-focus: rgba(239, 68, 68, 0.5);

    --border-accent: rgba(220, 38, 38, 0.3);
    --border-accent-strong: rgba(220, 38, 38, 0.9);
    --border-badge: rgba(239, 68, 68, 0.2);

    --shadow: 0 20px 50px rgba(200, 0, 0, 0.3);
    --shadow-sm: 0 4px 10px rgba(200, 0, 0, 0.3);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.65);
    --shadow-focus: 0 0 0 4px rgba(239, 68, 68, 0.14);

    --scrollbar-thumb: rgba(220, 38, 38, 0.4);
    --scrollbar-thumb-hover: rgba(220, 38, 38, 0.6);
    --scrollbar-track: rgba(10, 10, 10, 0.95);

    --accent: #FF6A00;
}


:root[data-theme="nimbus"] {
    --bg-page: #f4f7fb;
    --bg-page-alt: #eaf0f7;
    --bg-surface: rgba(255, 255, 255, 1);
    --bg-surface-strong: rgba(242, 247, 252, 1);
    --bg-surface-hover: rgba(241, 245, 249, 0.98);
    --bg-surface-hover-alt: rgba(226, 232, 240, 0.98);
    --tinted: rgba(0, 0, 0, 0.03);
    --bg-input: rgba(248, 250, 252, 0.96);
    --bg-input-strong: rgba(255, 255, 255, 1);
    --bg-overlay: rgba(15, 23, 42, 0.42);
    --bg-overlay-soft: rgba(15, 23, 42, 0.26);
    --bg-tab-active: rgba(37, 99, 235, 0.08);
    --bg-sidetab-active: rgba(37, 99, 235, 0.1);
    --bg-hover-subtle: rgba(15, 23, 42, 0.04);
    --bg-hover-subtle-strong: rgba(15, 23, 42, 0.08);
    --bg-dropdown-item-hover: rgba(226, 232, 240, 0.95);
    --bg-add-tab: rgba(248, 250, 252, 0.98);
    --bg-settings-title: rgba(226, 232, 240, 0.95);
    --bg-disabled: rgba(15, 23, 42, 0.08);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-label: #1e293b;
    --text-placeholder: #64748b;
    --text-on-accent: #ffffff;
    --text-badge: #ffffff;
    --text-settings-title: #1e293b;
    --text-icon: #334155;

    --border-muted: rgba(15, 23, 42, 0.12);
    --border-subtle: rgba(15, 23, 42, 0.08);
    --border-faint: rgba(15, 23, 42, 0.06);
    --border-soft: rgba(15, 23, 42, 0.05);
    --border-input-focus: rgba(37, 99, 235, 0.4);
    --border-accent: rgba(37, 99, 235, 0.22);
    --border-accent-strong: rgba(37, 99, 235, 0.85);
    --border-badge: rgba(37, 99, 235, 0.18);

    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.12);
    --shadow-dropdown: 0 10px 24px rgba(15, 23, 42, 0.1);
    --shadow-focus: 0 0 0 4px rgba(37, 99, 235, 0.12);

    --scrollbar-thumb: rgba(148, 163, 184, 0.8);
    --scrollbar-thumb-hover: rgba(100, 116, 139, 0.9);
    --scrollbar-track: rgba(226, 232, 240, 0.9);

    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.14);
    --accent-softest: rgba(37, 99, 235, 0.05);
    --accent-contrast: #ffffff;

    --warning: #d97706;
    --info: #0284c7;
}


:root[data-theme="evergreen-dusk"] {
    --bg-page: #06120a;
    --bg-page-alt: #0a1a14;
    --bg-surface: rgba(10, 25, 18, 1);
    --bg-surface-strong: rgba(5, 14, 10, 1);
    --bg-surface-hover: rgba(15, 34, 25, 0.94);
    --bg-surface-hover-alt: rgba(20, 44, 33, 0.94);
    --tinted: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(12, 30, 22, 0.76);
    --bg-input-strong: rgba(12, 30, 22, 0.84);
    --bg-overlay: rgba(2, 10, 7, 0.88);
    --bg-overlay-soft: rgba(2, 10, 7, 0.72);
    --bg-tab-active: rgba(16, 185, 129, 0.12);
    --bg-sidetab-active: rgba(16, 185, 129, 0.16);
    --bg-hover-subtle: rgba(110, 231, 183, 0.06);
    --bg-hover-subtle-strong: rgba(110, 231, 183, 0.1);
    --bg-dropdown-item-hover: rgba(20, 44, 33, 0.72);
    --bg-add-tab: rgba(12, 30, 22, 0.84);
    --bg-settings-title: rgba(15, 34, 25, 0.95);
    --bg-disabled: rgba(110, 231, 183, 0.08);

    --text-primary: #ecfaf5;
    --text-secondary: #86efac;
    --text-label: #a1fae5;
    --text-placeholder: #6ee7b7;
    --text-on-accent: #052e16;
    --text-badge: #a1fae5;
    --text-settings-title: #a1fae5;
    --text-icon: #bbf7a0;

    --border-muted: rgba(52, 211, 153, 0.18);
    --border-subtle: rgba(52, 211, 153, 0.12);
    --border-faint: rgba(52, 211, 153, 0.1);
    --border-soft: rgba(52, 211, 153, 0.08);
    --border-input-focus: rgba(16, 185, 129, 0.46);
    --border-accent: rgba(16, 185, 129, 0.28);
    --border-accent-strong: rgba(16, 185, 129, 0.88);
    --border-badge: rgba(110, 231, 183, 0.2);

    --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.38);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.3);
    --shadow-focus: 0 0 0 4px rgba(16, 185, 129, 0.14);

    --scrollbar-thumb: rgba(20, 83, 45, 0.68);
    --scrollbar-thumb-hover: rgba(22, 101, 52, 0.82);
    --scrollbar-track: rgba(6, 18, 13, 0.94);

    --accent: #10b981;
    --accent-strong: #059669;
    --accent-soft: rgba(16, 185, 129, 0.18);
    --accent-softest: rgba(16, 185, 129, 0.08);
    --accent-contrast: #052e16;

    --warning: #f59e0b;
    --info: #2aa4bf;
}


:root[data-theme="violet-storm"] {
    --bg-page: #12081f;
    --bg-page-alt: #1a0a2c;

    --bg-surface: rgba(34, 18, 56, 1);
    --bg-surface-strong: rgba(16, 8, 28, 1);
    --bg-surface-hover: rgba(52, 28, 82, 0.92);
    --bg-surface-hover-alt: rgba(68, 38, 102, 0.96);
    --tinted: rgba(255, 255, 255, 0.03);

    --bg-input: rgba(30, 16, 50, 0.78);
    --bg-input-strong: rgba(36, 20, 58, 0.88);

    --bg-overlay: rgba(12, 6, 20, 0.88);
    --bg-overlay-soft: rgba(12, 6, 20, 0.72);

    --bg-tab-active: rgba(168, 85, 247, 0.18);
    --bg-sidetab-active: rgba(168, 85, 247, 0.24);

    --bg-hover-subtle: rgba(196, 181, 253, 0.08);
    --bg-hover-subtle-strong: rgba(196, 181, 253, 0.14);

    --bg-dropdown-item-hover: rgba(168, 85, 247, 0.16);
    --bg-add-tab: rgba(30, 16, 50, 0.84);
    --bg-settings-title: rgba(44, 24, 72, 0.9);

    --bg-disabled: rgba(196, 181, 253, 0.08);

    --text-primary: #f3e8ff;
    --text-secondary: #a8b4fe;
    --text-label: #e9a5ff;
    --text-placeholder: #b794a4;
    --text-on-accent: #ffffff;
    --text-badge: #eaa5ff;
    --text-settings-title: #f3e8ff;
    --text-icon: #e9a5ff;

    --border-muted: rgba(196, 181, 253, 0.18);
    --border-subtle: rgba(196, 181, 253, 0.12);
    --border-faint: rgba(196, 181, 253, 0.08);
    --border-soft: rgba(196, 181, 253, 0.06);

    --border-input-focus: rgba(192, 132, 252, 0.5);
    --border-accent: rgba(168, 85, 247, 0.28);
    --border-accent-strong: rgba(168, 85, 247, 0.88);
    --border-badge: rgba(196, 181, 253, 0.2);

    --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.42);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.32);
    --shadow-focus: 0 0 0 4px rgba(168, 85, 247, 0.16);

    --scrollbar-thumb: rgba(139, 92, 246, 0.42);
    --scrollbar-thumb-hover: rgba(139, 92, 246, 0.62);
    --scrollbar-track: rgba(24, 12, 42, 0.92);

    --accent: #a855f7;
}


:root[data-theme="twilight-rose"] {
    --bg-page: #16080a;
    --bg-page-alt: #210a14;
    --bg-surface: rgba(33, 13, 20, 1);
    --bg-surface-strong: rgba(14, 5, 9, 1);
    --bg-surface-hover: rgba(48, 18, 29, 0.96);
    --bg-surface-hover-alt: rgba(60, 22, 35, 0.96);
    --tinted: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(41, 15, 24, 0.78);
    --bg-input-strong: rgba(41, 15, 24, 0.86);
    --bg-overlay: rgba(12, 4, 8, 0.9);
    --bg-overlay-soft: rgba(12, 4, 8, 0.72);
    --bg-tab-active: rgba(244, 63, 94, 0.12);
    --bg-sidetab-active: rgba(244, 63, 94, 0.16);
    --bg-hover-subtle: rgba(253, 164, 175, 0.06);
    --bg-hover-subtle-strong: rgba(253, 164, 175, 0.1);
    --bg-dropdown-item-hover: rgba(60, 22, 35, 0.74);
    --bg-add-tab: rgba(41, 15, 24, 0.84);
    --bg-settings-title: rgba(48, 18, 29, 0.95);
    --bg-disabled: rgba(253, 164, 175, 0.08);

    --text-primary: #fff1f2;
    --text-secondary: #faa4af;
    --text-label: #ffe4e6;
    --text-placeholder: #fb7185;
    --text-on-accent: #ffffff;
    --text-badge: #ffe4e6;
    --text-settings-title: #ffe4e6;
    --text-icon: #fecaa3;

    --border-muted: rgba(244, 63, 94, 0.18);
    --border-subtle: rgba(244, 63, 94, 0.12);
    --border-faint: rgba(244, 63, 94, 0.1);
    --border-soft: rgba(244, 63, 94, 0.08);
    --border-input-focus: rgba(244, 63, 94, 0.46);
    --border-accent: rgba(244, 63, 94, 0.28);
    --border-accent-strong: rgba(244, 63, 94, 0.88);
    --border-badge: rgba(253, 164, 175, 0.2);

    --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.42);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.34);
    --shadow-focus: 0 0 0 4px rgba(244, 63, 94, 0.14);

    --scrollbar-thumb: rgba(136, 19, 55, 0.6);
    --scrollbar-thumb-hover: rgba(159, 18, 57, 0.74);
    --scrollbar-track: rgba(33, 13, 20, 0.92);

    --accent: #f43f5e;
    --accent-strong: #e11a48;
    --accent-soft: rgba(244, 63, 94, 0.18);
    --accent-softest: rgba(244, 63, 94, 0.08);
    --accent-contrast: #ffffff;

    --warning: #f59e0b;
    --info: #38baf8;
}


:root[data-theme="dawn-ember"] {
    --bg-page: #140a06;
    --bg-page-alt: #1a1409;
    --bg-settings-title: #9a9907;
    --bg-surface: rgba(29, 20, 9, 1);
    --bg-surface-strong: rgba(15, 9, 3, 1);
    --bg-surface-hover: rgba(43, 29, 12, 0.96);
    --bg-surface-hover-alt: rgba(58, 39, 14, 0.96);
    --tinted: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(39, 26, 10, 0.78);
    --bg-input-strong: rgba(39, 26, 10, 0.86);
    --bg-overlay: rgba(10, 6, 2, 0.9);
    --bg-overlay-soft: rgba(10, 6, 2, 0.72);
    --bg-tab-active: rgba(245, 158, 11, 0.12);
    --bg-sidetab-active: rgba(245, 158, 11, 0.16);
    --bg-hover-subtle: rgba(253, 230, 138, 0.06);
    --bg-hover-subtle-strong: rgba(253, 230, 138, 0.1);
    --bg-dropdown-item-hover: rgba(58, 39, 14, 0.74);
    --bg-add-tab: rgba(39, 26, 10, 0.84);

    --bg-disabled: rgba(253, 224, 71, 0.1);

    --text-primary: #fff7ea;
    --text-secondary: #fca34a;
    --text-label: #fef3c7;
    --text-placeholder: #fbbf24;
    --text-on-accent: #1c1917;
    --text-badge: #fef3c7;
    --text-settings-title: #fef3c7;
    --text-icon: #fae68a;

    --border-muted: rgba(245, 158, 11, 0.18);
    --border-subtle: rgba(245, 158, 11, 0.12);
    --border-faint: rgba(245, 158, 11, 0.1);
    --border-soft: rgba(245, 158, 11, 0.08);
    --border-input-focus: rgba(245, 158, 11, 0.46);
    --border-accent: rgba(245, 158, 11, 0.28);
    --border-accent-strong: rgba(245, 158, 11, 0.88);
    --border-badge: rgba(253, 224, 71, 0.2);

    --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.42);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.34);
    --shadow-focus: 0 0 0 4px rgba(245, 158, 11, 0.14);

    --scrollbar-thumb: rgba(146, 64, 14, 0.65);
    --scrollbar-thumb-hover: rgba(180, 83, 9, 0.78);
    --scrollbar-track: rgba(29, 20, 9, 0.92);

    --accent: #f59e0b;
    --accent-strong: #a97706;
    --accent-soft: rgba(245, 158, 11, 0.18);
    --accent-softest: rgba(245, 158, 11, 0.08);
    --accent-contrast: #1c1917;

    --warning: #fbbf24;
    --info: #38baf8;
}


:root[data-theme="polar-cloud"] {
    --bg-page: #7cc8ee;
    --bg-page-alt: #d4f0fb;

    --bg-surface: rgba(105, 235, 245, 1);
    --bg-surface-strong: rgba(199, 235, 248, 0.98);
    --bg-surface-hover: rgba(186, 230, 253, 0.92);
    --bg-surface-hover-alt: rgba(165, 243, 252, 0.95);
    --tinted: rgba(0, 0, 0, 0.03);

    --bg-input: rgba(213, 241, 252, 0.95);
    --bg-input-strong: rgba(186, 230, 253, 0.98);

    --bg-overlay: rgba(8, 51, 68, 0.8);
    --bg-overlay-soft: rgba(8, 51, 68, 0.18);

    --bg-tab-active: rgba(6, 182, 212, 0.14);
    --bg-sidetab-active: rgba(6, 182, 212, 0.18);

    --bg-hover-subtle: rgba(8, 145, 178, 0.05);
    --bg-hover-subtle-strong: rgba(8, 145, 178, 0.08);

    --bg-dropdown-item-hover: rgba(34, 211, 238, 0.14);

    --bg-add-tab: rgba(213, 241, 252, 0.95);
    --bg-settings-title: rgba(199, 235, 248, 0.95);


    --bg-disabled: rgba(8, 145, 178, 0.08);

    --text-primary: #083344;
    --text-secondary: #0f766e;
    --text-label: #155e75;
    --text-placeholder: #4b8793;
    --text-on-accent: #f4fdff;
    --text-badge: #0e7490;
    --text-settings-title: #083344;
    --text-icon: #155e75;

    --border-muted: rgba(8, 145, 178, 0.18);
    --border-subtle: rgba(8, 145, 178, 0.12);
    --border-faint: rgba(8, 145, 178, 0.08);
    --border-soft: rgba(8, 145, 178, 0.06);

    --border-input-focus: rgba(6, 182, 212, 0.42);

    --border-accent: rgba(6, 182, 212, 0.24);
    --border-accent-strong: rgba(6, 182, 212, 0.7);
    --border-badge: rgba(8, 145, 178, 0.16);

    --shadow: 0 12px 30px rgba(8, 51, 68, 0.12);
    --shadow-sm: 0 4px 10px rgba(8, 51, 68, 0.12);
    --shadow-dropdown: 0 8px 20px rgba(8, 51, 68, 0.1);
    --shadow-focus: 0 0 0 4px rgba(6, 182, 212, 0.12);

    --scrollbar-thumb: rgba(6, 182, 212, 0.3);
    --scrollbar-thumb-hover: rgba(8, 145, 178, 0.45);
    --scrollbar-track: rgba(213, 241, 252, 0.9);

    --accent: #06b6a4;
}


:root[data-theme="golden-hour"] {
    --bg-page: #1a0a06;
    --bg-page-alt: #261207;

    --bg-surface: rgba(54, 24, 10, 1);
    --bg-surface-strong: rgba(42, 18, 8, 0.95);
    --bg-surface-hover: rgba(78, 34, 12, 0.92);
    --bg-surface-hover-alt: rgba(110, 46, 14, 0.96);
    --tinted: rgba(255, 255, 255, 0.03);

    --bg-input: rgba(60, 26, 10, 0.8);
    --bg-input-strong: rgba(74, 30, 10, 0.9);

    --bg-overlay: rgba(24, 10, 4, 0.88);
    --bg-overlay-soft: rgba(24, 10, 4, 0.72);

    --bg-tab-active: rgba(249, 115, 22, 0.2);
    --bg-sidetab-active: rgba(249, 115, 22, 0.26);

    --bg-hover-subtle: rgba(253, 186, 116, 0.08);
    --bg-hover-subtle-strong: rgba(253, 186, 116, 0.14);

    --bg-dropdown-item-hover: rgba(251, 146, 60, 0.18);
    --bg-add-tab: rgba(66, 28, 10, 0.86);
    --bg-settings-title: rgba(88, 36, 12, 0.9);

    --bg-disabled: rgba(253, 186, 116, 0.08);

    --text-primary: #fff7ea;
    --text-secondary: #faba74;
    --text-label: #fea7aa;
    --text-placeholder: #fb923c;
    --text-on-accent: #ffffff;
    --text-badge: #ffeaa5;
    --text-settings-title: #fff7ea;
    --text-icon: #fea7aa;

    --border-muted: rgba(251, 146, 60, 0.2);
    --border-subtle: rgba(251, 146, 60, 0.13);
    --border-faint: rgba(251, 146, 60, 0.09);
    --border-soft: rgba(251, 146, 60, 0.07);

    --border-input-focus: rgba(249, 115, 22, 0.48);
    --border-accent: rgba(249, 115, 22, 0.28);
    --border-accent-strong: rgba(249, 115, 22, 0.86);
    --border-badge: rgba(253, 186, 116, 0.18);

    --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.42);
    --shadow-dropdown: 0 12px 30px rgba(0, 0, 0, 0.32);
    --shadow-focus: 0 0 0 4px rgba(249, 115, 22, 0.16);

    --scrollbar-thumb: rgba(251, 146, 60, 0.42);
    --scrollbar-thumb-hover: rgba(249, 115, 22, 0.6);
    --scrollbar-track: rgba(42, 18, 8, 0.92);

    --accent: #f97316;
}


:root[data-theme="canopy-sky"] {
    --bg-page: #FFFFFF;
    --bg-page-alt: #a1fae5;

    --bg-surface: rgba(240, 255, 240, 1);
    --bg-surface-strong: rgba(226, 246, 226, 1);
    --bg-surface-hover: rgba(220, 252, 231, 0.92);
    --bg-surface-hover-alt: rgba(187, 247, 208, 0.94);
    --tinted: rgba(0, 0, 0, 0.03);

    --bg-input: rgba(240, 253, 240, 0.96);
    --bg-input-strong: rgba(230, 255, 240, 0.98);

    --bg-overlay: rgba(5, 46, 22, 0.28);
    --bg-overlay-soft: rgba(5, 46, 22, 0.18);

    --bg-tab-active: rgba(34, 197, 94, 0.14);
    --bg-sidetab-active: rgba(34, 197, 94, 0.18);

    --bg-hover-subtle: rgba(21, 128, 61, 0.05);
    --bg-hover-subtle-strong: rgba(21, 128, 61, 0.08);

    --bg-dropdown-item-hover: rgba(74, 222, 128, 0.16);
    --bg-add-tab: rgba(236, 253, 245, 0.95);
    --bg-settings-title: rgba(220, 252, 231, 0.95);

    --bg-disabled: rgba(34, 197, 94, 0.08);

    --text-primary: #14532a;
    --text-secondary: #15803a;
    --text-label: #166534;
    --text-placeholder: #4a8b62;
    --text-on-accent: #ffffff;
    --text-badge: #166534;
    --text-settings-title: #14532a;
    --text-icon: #166534;

    --border-muted: rgba(21, 128, 61, 0.18);
    --border-subtle: rgba(21, 128, 61, 0.12);
    --border-faint: rgba(21, 128, 61, 0.08);
    --border-soft: rgba(21, 128, 61, 0.06);

    --border-input-focus: rgba(34, 197, 94, 0.42);
    --border-accent: rgba(34, 197, 94, 0.24);
    --border-accent-strong: rgba(34, 197, 94, 0.72);
    --border-badge: rgba(21, 128, 61, 0.16);

    --shadow: 0 16px 36px rgba(5, 46, 22, 0.1);
    --shadow-sm: 0 4px 10px rgba(5, 46, 22, 0.1);
    --shadow-dropdown: 0 10px 24px rgba(5, 46, 22, 0.08);
    --shadow-focus: 0 0 0 4px rgba(34, 197, 94, 0.14);

    --scrollbar-thumb: rgba(34, 197, 94, 0.34);
    --scrollbar-thumb-hover: rgba(21, 128, 61, 0.48);
    --scrollbar-track: rgba(220, 252, 231, 0.9);

    --accent: #22c55e;
}


:root[data-theme="neon-magenta"] {
    --bg-page: #0a0612;
    --bg-page-alt: #0a0612;

    --bg-surface: rgba(24, 10, 40, 1);
    --bg-surface-strong: rgba(16, 7, 28, 1);
    --bg-surface-hover: rgba(45, 20, 70, 0.9);
    --bg-surface-hover-alt: rgba(70, 30, 100, 0.95);
    --tinted: rgba(255, 255, 255, 0.03);

    --bg-input: rgba(24, 10, 40, 0.7);
    --bg-input-strong: rgba(24, 10, 40, 0.85);

    --bg-overlay: rgba(10, 6, 18, 0.9);
    --bg-overlay-soft: rgba(10, 6, 18, 0.75);

    --bg-tab-active: rgba(236, 72, 153, 0.15);
    --bg-sidetab-active: rgba(236, 72, 153, 0.22);

    --bg-hover-subtle: rgba(236, 72, 153, 0.08);
    --bg-hover-subtle-strong: rgba(236, 72, 153, 0.12);

    --bg-dropdown-item-hover: rgba(236, 72, 153, 0.15);
    --bg-add-tab: rgba(30, 12, 48, 0.82);
    --bg-settings-title: rgba(45, 20, 70, 0.9);
    --bg-disabled: rgba(236, 72, 153, 0.08);

    --text-primary: #fdf4ff;
    --text-secondary: #f9a8d4;
    --text-label: #fbcfe8;
    --text-placeholder: #f472b6;
    --text-on-accent: #ffffff;
    --text-badge: #fbcfe8;
    --text-settings-title: #fdf4ff;
    --text-icon: #f9a8d4;

    --border-muted: rgba(236, 72, 153, 0.2);
    --border-subtle: rgba(236, 72, 153, 0.12);
    --border-faint: rgba(236, 72, 153, 0.08);
    --border-soft: rgba(236, 72, 153, 0.06);
    --border-input-focus: rgba(236, 72, 153, 0.5);
    --border-accent: rgba(236, 72, 153, 0.24);
    --border-accent-strong: rgba(236, 72, 153, 0.85);
    --border-badge: rgba(236, 72, 153, 0.18);
    --shadow: 0 22px 60px rgba(20, 0, 35, 0.48);
    --shadow-sm: 0 4px 10px rgba(20, 0, 35, 0.42);
    --shadow-dropdown: 0 12px 30px rgba(10, 6, 18, 0.42);
    --shadow-focus: 0 0 0 4px rgba(236, 72, 153, 0.2);
    --scrollbar-thumb: rgba(236, 72, 153, 0.4);
    --scrollbar-thumb-hover: rgba(236, 72, 153, 0.6);
    --scrollbar-track: rgba(18, 8, 30, 0.92);
    --accent: #ec4899;
}

