@font-face {
  font-family: "Manrope Régitique";
  src: url("/admin/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF;
}

:root {
  --font-ui: "Manrope Régitique", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --canvas: #eeedf1;
  --navigation: #f3f1f5;
  --surface: #f8f7fa;
  --raised: #fff;
  --muted: #eceaf0;
  --hover: #e7e4eb;
  --text: #211e29;
  --text-secondary: #625d6a;
  --text-subtle: #625b69;
  --border: #dcd8e1;
  --border-strong: #c7c1ce;
  --primary: #a63f3c;
  --primary-hover: #913532;
  --primary-soft: #f5e3e2;
  --primary-soft-text: #84322f;
  --focus: rgb(103 83 212 / 26%);
  --success: #16774b;
  --success-soft: #e1f2e9;
  --warning: #915c0b;
  --warning-soft: #faedce;
  --danger: #a3323d;
  --danger-soft: #f8e3e6;
  --info: #4e52ad;
  --info-soft: #e8e7f8;
  --control-height: 44px;
  --control-compact: 38px;
  --radius-control: 10px;
  --radius-panel: 14px;
  --sidebar-width: 236px;
  --content-max: 1080px;
  --shadow-control: 0 1px 2px rgb(31 27 38 / 8%), 0 4px 12px rgb(31 27 38 / 5%);
  --shadow-hover: 0 2px 4px rgb(31 27 38 / 8%), 0 8px 18px rgb(31 27 38 / 8%);
  --shadow-overlay: 0 18px 48px rgb(31 27 38 / 22%), 0 3px 10px rgb(31 27 38 / 10%);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); color: var(--text); font-family: var(--font-ui); }
body { min-width: 320px; min-height: 100dvh; margin: 0; background: var(--canvas); font-size: 15px; line-height: 1.45; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; margin: -1px; padding: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.command-bar { position: fixed; z-index: 50; inset: 0 0 auto; min-height: 56px; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr) auto; align-items: center; padding: 0 14px 0 12px; border-bottom: 1px solid var(--border); background: rgb(248 247 250 / 96%); }
.command-bar__brand, .command-bar__actions { min-width: 0; display: flex; align-items: center; gap: 8px; }
.command-bar__actions { justify-content: flex-end; }
.command-bar__context { min-width: 0; display: flex; align-items: center; gap: 8px; color: var(--text-subtle); font-size: .78rem; }
.command-bar__context strong { overflow: hidden; color: var(--text); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.command-bar__context span::after { margin-left: 8px; color: var(--border-strong); content: "/"; }
.command-bar__menu { display: none !important; }
.brand-lockup { min-height: 44px; display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; overflow: hidden; display: grid; place-items: center; border-radius: 10px; background: var(--raised); box-shadow: var(--shadow-control); }
.brand-mark img, .workspace-switcher__mark img, .session-gate__mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-lockup__copy { min-width: 0; display: grid; gap: 1px; line-height: 1; }
.brand-lockup__copy strong { font-size: .98rem; font-weight: 760; letter-spacing: -.025em; }
.brand-lockup__copy small { color: var(--text-subtle); font-size: .57rem; font-weight: 700; letter-spacing: .1em; }
.session-label { color: var(--text-secondary); font-size: .76rem; font-weight: 650; }

.button { min-height: var(--control-height); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text); font-size: .82rem; font-weight: 650; line-height: 1; white-space: nowrap; transition: transform 90ms var(--ease-out), background 140ms var(--ease-out), box-shadow 140ms var(--ease-out), color 140ms ease; }
.button:focus-visible, .icon-button:focus-visible, .setting-section__toggle:focus-visible, .nav-item:focus-visible, .secret-action:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--focus); }
.button:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.button:disabled { background: var(--muted); box-shadow: none; color: var(--text-subtle); }
.button--primary { background: linear-gradient(180deg, #b84b47, var(--primary)); box-shadow: var(--shadow-control); color: #fff; }
.button--primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.button--secondary { background: var(--raised); box-shadow: var(--shadow-control); }
.button--secondary:hover:not(:disabled) { background: var(--surface); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.button--ghost { color: var(--text-secondary); }
.button--ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.button--compact { min-height: var(--control-compact); padding-inline: 12px; font-size: .76rem; }
.button--full { width: 100%; }
.button > svg { width: 17px; height: 17px; }
.icon-button { width: var(--control-height); height: var(--control-height); display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-secondary); }
.icon-button:hover { background: var(--hover); color: var(--text); }

.field { min-width: 0; display: grid; gap: 7px; }
.field__label { color: var(--text); font-size: .78rem; font-weight: 650; }
.input { width: 100%; min-width: 0; min-height: var(--control-height); padding: 0 12px; border: 0; border-radius: var(--radius-control); outline: 0; background: var(--raised); color: var(--text); font-size: .84rem; box-shadow: inset 0 0 0 1px var(--border), 0 1px 2px rgb(31 27 38 / 4%); transition: background 140ms ease, box-shadow 140ms ease; }
.input::placeholder { color: var(--text-subtle); opacity: 1; }
.input:hover:not(:disabled) { background: var(--surface); }
.input:focus { box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 3px var(--focus); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--danger), 0 0 0 3px rgb(163 50 61 / 15%); }

.feedback { min-width: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); }
.feedback--success { background: var(--success-soft); color: var(--success); }
.feedback--danger { background: var(--danger-soft); color: var(--danger); }
.feedback__icon { min-height: 20px; display: grid; place-items: center; }
.feedback__icon svg { width: 18px; height: 18px; }
.feedback__copy { color: inherit; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }

.session-gate { width: min(470px, calc(100% - 32px)); min-height: calc(100dvh - 56px); margin: 56px auto 0; display: grid; align-content: center; gap: 24px; padding: 48px 0 64px; }
.session-gate__heading { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.session-gate__mark { width: 56px; height: 56px; overflow: hidden; display: block; border-radius: 14px; background: var(--raised); box-shadow: var(--shadow-control); }
.session-gate h1 { margin: 0; font-size: 1.55rem; font-weight: 730; letter-spacing: -.03em; line-height: 1.2; }
.session-gate__heading p { max-width: 46ch; margin: 6px 0 0; color: var(--text-secondary); font-size: .84rem; line-height: 1.55; }
#login-form { display: grid; gap: 16px; }
.session-gate__foot { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-subtle); }
.session-gate__foot svg { width: 18px; height: 18px; color: var(--info); }
.session-gate__foot p { margin: 0; font-size: .74rem; line-height: 1.5; }

.workspace-shell { min-height: calc(100dvh - 56px); margin-top: 56px; padding-left: var(--sidebar-width); }
.workspace-main { min-width: 0; outline: 0; }
.global-nav { position: fixed; z-index: 40; inset: 56px auto 0 0; width: var(--sidebar-width); overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 14px 10px 12px; border-right: 1px solid var(--border); background: var(--navigation); }
.global-nav__mobile-head { display: none; }
.workspace-switcher { min-height: 50px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 10px; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 12px; background: var(--raised); box-shadow: var(--shadow-control); }
.workspace-switcher__mark { width: 36px; height: 36px; overflow: hidden; display: block; border-radius: 9px; background: var(--surface); }
.workspace-switcher__copy { min-width: 0; display: grid; gap: 2px; }
.workspace-switcher__copy strong, .workspace-switcher__copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-switcher__copy strong { font-size: .8rem; font-weight: 680; }
.workspace-switcher__copy small { color: var(--text-subtle); font-size: .7rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.nav-search { min-height: 40px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 8px; padding: 0 10px; border-radius: var(--radius-control); background: var(--raised); color: var(--text-subtle); box-shadow: inset 0 0 0 1px var(--border); }
.nav-search svg { width: 18px; height: 18px; }
.nav-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .78rem; }
.nav-search input::placeholder { color: var(--text-subtle); }
.nav-search:focus-within { box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 3px var(--focus); }
.nav-section { display: grid; gap: 6px; }
.nav-section h2 { min-height: 28px; margin: 0; display: flex; align-items: center; padding: 0 10px; color: var(--text-secondary); font-size: .68rem; font-weight: 720; letter-spacing: .085em; text-transform: uppercase; }
.group-navigation { display: grid; gap: 3px; }
.nav-item { position: relative; width: 100%; min-height: 44px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--text-secondary); font-size: .79rem; text-align: left; }
.nav-item > svg { width: 32px; height: 32px; padding: 7px; border-radius: 9px; background: var(--raised); box-shadow: 0 1px 2px rgb(31 27 38 / 5%); }
.nav-item > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.is-active { background: var(--muted); color: var(--text); font-weight: 650; }
.nav-item.is-active::before { position: absolute; left: 2px; width: 2px; height: 16px; border-radius: 2px; background: var(--primary); content: ""; }
.nav-item.is-active > svg { background: transparent; box-shadow: none; }
.nav-safety { margin-top: auto; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px; color: var(--text-secondary); }
.nav-safety > svg { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: var(--info-soft); color: var(--info); }
.nav-safety span { display: grid; gap: 1px; }
.nav-safety strong { font-size: .72rem; font-weight: 650; }
.nav-safety small { color: var(--text-subtle); font-size: .65rem; }

.workspace-settings { width: min(var(--content-max), calc(100% - 56px)); min-width: 0; display: grid; gap: 24px; margin: 0 auto; padding: 36px 0 72px; }
.workspace-settings h1, .workspace-settings h2, .workspace-settings p { margin: 0; }
.workspace-settings__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.workspace-settings__header h1 { font-size: 1.5rem; font-weight: 740; letter-spacing: -.03em; }
.workspace-settings__header p { max-width: 68ch; margin-top: 5px; color: var(--text-secondary); font-size: .82rem; line-height: 1.5; }
.configuration-toolbar { display: grid; grid-template-columns: 210px minmax(260px, 1fr) auto; align-items: end; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.configuration-summary { align-self: center; display: grid; gap: 2px; }
.configuration-summary strong { font-size: .8rem; font-weight: 670; }
.configuration-summary strong.has-error { color: var(--danger); }
.configuration-summary span { color: var(--text-subtle); font-size: .72rem; }
.configuration-actions { display: flex; gap: 8px; }
.settings-tools { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--text-secondary); font-size: .76rem; font-weight: 650; }
.settings-tools > div { display: flex; gap: 2px; }
#settings { min-width: 0; display: grid; gap: 14px; }

.setting-section { min-width: 0; scroll-margin-top: 76px; border-radius: var(--radius-panel); background: var(--muted); box-shadow: inset 0 0 0 1px rgb(199 193 206 / 54%); }
.setting-section__toggle { width: 100%; min-height: 76px; display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; gap: 16px; padding: 14px 14px 14px 18px; border: 0; border-radius: var(--radius-panel); background: transparent; color: var(--text); text-align: left; }
.setting-section__toggle:hover { background: rgb(255 255 255 / 45%); }
.setting-section__toggle > span { min-width: 0; display: grid; gap: 4px; }
.setting-section__toggle strong { font-size: .96rem; font-weight: 700; }
.setting-section__toggle small { color: var(--text-secondary); font-size: .76rem; font-weight: 450; line-height: 1.45; }
.setting-section__toggle > svg { width: 18px; height: 18px; justify-self: center; color: var(--text-subtle); transition: transform 180ms var(--ease-out); }
.setting-section__toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
.setting-section__panel { padding: 0 4px 4px; }
.setting-section__panel[hidden] { display: none; }
.settings-list { min-width: 0; display: grid; gap: 2px; }
.setting { min-width: 0; display: grid; grid-template-columns: minmax(240px, .78fr) minmax(260px, 1fr) minmax(280px, .82fr); align-items: center; gap: 24px; padding: 16px 14px; border-radius: 11px; background: var(--raised); }
.setting-information { min-width: 0; display: grid; gap: 3px; }
.setting-title { display: flex; align-items: baseline; gap: 4px; }
.setting-title h3 { margin: 0; font-size: .82rem; font-weight: 680; }
.required-mark { color: var(--danger); }
.setting-name { color: var(--text-subtle); font: .66rem/1.4 var(--font-mono); overflow-wrap: anywhere; }
.setting-description { max-width: 52ch; color: var(--text-secondary); font-size: .74rem; line-height: 1.5; }
.setting-help { margin-top: 5px; }
.setting-help summary { width: fit-content; color: var(--text-subtle); cursor: pointer; font-size: .7rem; font-weight: 620; }
.setting-help summary:hover { color: var(--text); }
.setting-help p { max-width: 54ch; margin-top: 5px; color: var(--text-secondary); font-size: .7rem; line-height: 1.5; }
.setting-control { min-width: 0; display: grid; gap: 5px; }
.setting-control-message { min-height: 17px; color: var(--text-subtle); font-size: .66rem; line-height: 1.4; }
.setting-control-message.is-error { color: var(--danger); }
.input-wrap { position: relative; min-width: 0; }
.input-wrap.has-reveal .input { padding-right: 84px; }
.reveal-button { position: absolute; top: 5px; right: 5px; min-height: 34px; padding: 0 9px; border: 0; border-radius: 7px; background: var(--muted); color: var(--text-secondary); font-size: .7rem; font-weight: 650; }
.reveal-button:hover { background: var(--hover); color: var(--text); }
.secret-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.secret-control__actions { display: flex; gap: 4px; }
.secret-action { width: 40px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-control); background: var(--surface); color: var(--text-secondary); }
.secret-action:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.secret-action svg { width: 17px; height: 17px; }

.choice-menu { position: relative; min-width: 0; }
.choice-menu__trigger { width: 100%; min-height: var(--control-height); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 12px; border: 0; border-radius: var(--radius-control); background: var(--raised); color: var(--text); font-size: .8rem; box-shadow: inset 0 0 0 1px var(--border), var(--shadow-control); transition: background 140ms var(--ease-out), box-shadow 140ms var(--ease-out), transform 90ms var(--ease-out); }
.choice-menu__trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-menu__trigger:hover:not(:disabled) { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-hover); }
.choice-menu__trigger:focus-visible { outline: 0; box-shadow: inset 0 0 0 1px var(--border-strong), 0 0 0 3px var(--focus); }
.choice-menu__trigger:active:not(:disabled) { transform: translateY(1px); }
.choice-menu__chevron { width: 15px; height: 15px; flex: none; color: var(--text-subtle); transition: transform 150ms var(--ease-out); }
.choice-menu.is-open .choice-menu__chevron { transform: rotate(180deg); }
.choice-menu__popover { position: absolute; z-index: 80; top: calc(100% + 7px); right: 0; width: max(260px, 100%); max-width: min(380px, calc(100vw - 24px)); max-height: min(360px, calc(100dvh - 96px)); overflow-y: auto; display: grid; gap: 2px; padding: 6px; border-radius: 14px; background: var(--raised); box-shadow: var(--shadow-overlay); animation: menu-enter 150ms var(--ease-out) both; }
.choice-menu.opens-up .choice-menu__popover { top: auto; bottom: calc(100% + 7px); }
.choice-menu__popover > button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); text-align: left; }
.choice-menu__popover > button:hover, .choice-menu__popover > button:focus-visible { outline: 0; background: var(--hover); }
.choice-menu__popover > button[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-soft-text); }
.choice-menu__popover strong, .choice-menu__popover small { display: block; }
.choice-menu__popover strong { font-size: .76rem; font-weight: 680; }
.choice-menu__popover small { margin-top: 2px; color: #4e4856; font-size: .68rem; line-height: 1.4; }
.choice-menu__popover > button > svg { width: 16px; height: 16px; flex: none; }
.choice-menu__custom { margin-top: 6px; }
@keyframes menu-enter { from { opacity: 0; transform: translateY(-4px) scale(.99); } }
.action-menu { min-width: 194px; }
.action-menu > .choice-menu__trigger { min-height: var(--control-compact); background: linear-gradient(180deg, #b84b47, var(--primary)); box-shadow: var(--shadow-control); color: #fff; font-weight: 650; }
.action-menu > .choice-menu__trigger:hover { background: var(--primary-hover); }
.action-menu__popover { width: 292px; }

.secret-section { margin-top: 2px; }
.secret-row { min-width: 0; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(280px, .78fr); align-items: center; gap: 24px; padding: 15px 14px; border-radius: 11px; background: var(--raised); }
.secret-row__copy { min-width: 0; display: grid; gap: 4px; }
.secret-row__copy strong { font-size: .8rem; font-weight: 680; }
.secret-row__copy code { color: var(--text-subtle); font: .66rem var(--font-mono); overflow-wrap: anywhere; }
.secret-row__copy p { color: var(--text-secondary); font-size: .72rem; line-height: 1.45; }
.secret-row__control { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.secret-value { height: 44px; min-width: 0; display: flex; align-items: center; padding: 0 12px; overflow: hidden; border-radius: var(--radius-control); background: var(--surface); color: var(--text-subtle); font: .72rem var(--font-mono); box-shadow: inset 0 0 0 1px var(--border); text-overflow: ellipsis; white-space: nowrap; }
.secret-value.has-value { color: var(--text); }
.secret-row__actions { display: flex; gap: 4px; }

.empty-state { display: grid; justify-items: center; gap: 7px; padding: 44px 24px; border-radius: var(--radius-panel); background: var(--muted); text-align: center; }
.empty-state__icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 3px; border-radius: 11px; background: var(--raised); box-shadow: var(--shadow-control); color: var(--text-subtle); }
.empty-state h2 { font-size: .95rem; }
.empty-state p { color: var(--text-secondary); font-size: .78rem; }

.dialog-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }
.dialog-backdrop { position: absolute; inset: 0; border: 0; background: rgb(27 23 34 / 48%); }
.dialog { position: relative; width: min(480px, 100%); overflow: hidden; border-radius: 16px; background: var(--raised); box-shadow: var(--shadow-overlay); }
.dialog__header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 16px; padding: 22px 20px 18px; }
.dialog__header h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.015em; }
.dialog__header p { margin: 6px 0 0; color: var(--text-secondary); font-size: .8rem; line-height: 1.55; }
.dialog__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 20px; }
.nav-backdrop { display: none; }

.llm-setup { min-width: 0; display: grid; gap: 20px; padding: 22px; border: 1px solid #d7d1dd; border-radius: 18px; background: linear-gradient(145deg, #fff 0%, #f6f2f7 100%); box-shadow: 0 10px 30px rgb(36 29 43 / 7%); }
.llm-setup__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.llm-setup__header > div { min-width: 0; }
.llm-setup__header h2 { margin-top: 3px; font-size: 1.18rem; letter-spacing: -.025em; }
.llm-setup__header p { max-width: 68ch; margin-top: 5px; color: var(--text-secondary); font-size: .8rem; }
.eyebrow { color: var(--primary-soft-text); font-size: .66rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.setup-badge { flex: none; min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--muted); color: var(--text-secondary); font-size: .68rem; font-weight: 700; }
.setup-badge[data-state="PENDING"] { background: var(--warning-soft); color: var(--warning); }
.setup-badge[data-state="TESTED"], .setup-badge[data-state="ACTIVE"] { background: var(--success-soft); color: var(--success); }
.setup-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.setup-progress li { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: var(--text-subtle); font-size: .69rem; }
.setup-progress li > span { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--muted); font-size: .64rem; }
.setup-progress li > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setup-progress li.is-current { background: var(--primary-soft); color: var(--primary-soft-text); }
.setup-progress li.is-current > span { background: var(--primary); color: #fff; }
.llm-setup__form { display: grid; grid-template-columns: minmax(170px, .7fr) minmax(200px, 1fr) minmax(260px, 1.2fr); align-items: start; gap: 14px; }
.llm-key-field small { color: var(--text-subtle); font-size: .68rem; line-height: 1.45; }
.setup-handoff { display: grid; gap: 4px; border-radius: 12px; padding: 12px 14px; background: var(--muted); color: var(--text-secondary); }
.setup-handoff strong { color: var(--text); font-size: .78rem; }
.setup-handoff span { font-size: .72rem; line-height: 1.45; }
.setup-status { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); }
.setup-status strong { font-size: .78rem; }
.setup-status span { font-size: .72rem; line-height: 1.5; }
.llm-setup__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.llm-setup__actions #llm-advanced { margin-left: auto; }
.llm-setup__safety { color: var(--text-subtle); font-size: .68rem; line-height: 1.5; }

@media (max-width: 1120px) {
  .llm-setup__form { grid-template-columns: 1fr 1fr; }
  .llm-key-field { grid-column: 1 / -1; }
  .setting { grid-template-columns: minmax(220px, .8fr) minmax(220px, 1fr); gap: 12px 24px; }
  .setting-control { grid-column: 2; }
  .configuration-toolbar { grid-template-columns: 190px minmax(220px, 1fr); }
  .configuration-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 760px) {
  .llm-setup { padding: 18px 14px; }
  .setup-progress { grid-template-columns: 1fr 1fr; }
  .llm-setup__form { grid-template-columns: 1fr; }
  .llm-key-field { grid-column: auto; }
  .llm-setup__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .llm-setup__actions #llm-advanced { margin-left: 0; }
  .command-bar { grid-template-columns: minmax(0, 1fr) auto; padding: 0 8px; }
  .command-bar__menu { display: inline-grid !important; }
  .command-bar__context, #access-label { display: none; }
  .workspace-shell { width: 100%; padding-left: 0; }
  .workspace-main { width: 100%; overflow-x: clip; }
  .global-nav { z-index: 91; top: 0; width: min(300px, calc(100vw - 44px)); transform: translateX(-105%); transition: transform 190ms var(--ease-out); box-shadow: var(--shadow-overlay); }
  .global-nav.is-open { transform: none; }
  .global-nav__mobile-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; }
  .nav-backdrop { position: fixed; z-index: 90; inset: 0; display: block; background: rgb(27 23 34 / 46%); }
  .workspace-settings { width: calc(100% - 32px); gap: 20px; padding: 26px 0 52px; }
  .workspace-settings__header h1 { font-size: 1.35rem; }
  .configuration-toolbar { grid-template-columns: 1fr; gap: 14px; }
  .configuration-actions { grid-column: auto; display: grid; grid-template-columns: 1fr 1fr; }
  .configuration-actions > *, .action-menu { min-width: 0; width: 100%; }
  .settings-tools { align-items: flex-start; flex-direction: column; gap: 6px; }
  .settings-tools > div { width: 100%; }
  .settings-tools .button { flex: 1; }
  .setting-section__toggle { min-height: 72px; padding-left: 14px; }
  .setting { grid-template-columns: 1fr; gap: 10px; padding: 14px 12px; }
  .setting-control { grid-column: auto; }
  .secret-row { grid-template-columns: 1fr; gap: 12px; padding: 14px 12px; }
  .choice-menu__popover { right: 0; width: 100%; min-width: min(280px, calc(100vw - 48px)); }
  .action-menu__popover { right: 0; width: min(292px, calc(100vw - 32px)); }
}

@media (max-width: 430px) {
  .llm-setup__header { display: grid; }
  .setup-progress { grid-template-columns: 1fr; }
  .llm-setup__actions { grid-template-columns: 1fr; }
  .brand-lockup__copy small { font-size: .52rem; }
  .session-gate__heading { grid-template-columns: 48px minmax(0, 1fr); }
  .session-gate__mark { width: 48px; height: 48px; border-radius: 12px; }
  .workspace-settings { width: calc(100% - 24px); }
  .configuration-actions { grid-template-columns: 1fr; }
  .configuration-actions .button { width: 100%; min-height: 44px; }
  .action-menu > .choice-menu__trigger { min-height: 44px; }
  .secret-control, .secret-row__control { grid-template-columns: 1fr; }
  .secret-control__actions, .secret-row__actions { justify-content: flex-end; }
  .dialog__footer { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0ms !important; transition-duration: 0ms !important; }
}
