:root {
  color-scheme: dark;
  --bg: #0d0f12;
  --sidebar: #111316;
  --panel: #15171b;
  --panel-2: #1a1d22;
  --panel-3: #202329;
  --elevated: #24272d;
  --line: #292d34;
  --line-strong: #393e48;
  --text: #f1f2f3;
  --text-2: #c7c9ce;
  --muted: #92969e;
  --subtle: #696e77;
  --accent: #d77c5c;
  --accent-hover: #e58a68;
  --blue: #6b9cff;
  --green: #5fbf8f;
  --yellow: #d9a759;
  --red: #e06c75;
  --shadow: 0 18px 50px rgba(0, 0, 0, .36);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

:root[data-resolved-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f4;
  --sidebar: #eeeeeb;
  --panel: #fbfbfa;
  --panel-2: #f3f3f0;
  --panel-3: #e9e9e5;
  --elevated: #ffffff;
  --line: #deded9;
  --line-strong: #c9cac5;
  --text: #222321;
  --text-2: #4b4d49;
  --muted: #71746e;
  --subtle: #989a94;
  --accent: #c96543;
  --accent-hover: #b85637;
  --blue: #3e70cc;
  --green: #2d885f;
  --yellow: #a66e1f;
  --red: #bf4d58;
  --shadow: 0 18px 50px rgba(37, 38, 34, .15);
}

* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 13px; }
button, input, textarea, select { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--subtle) 52%, transparent); border: 3px solid transparent; border-radius: 10px; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); width: 100%; height: 100%; background: var(--bg); }
.sidebar { display: flex; min-width: 0; flex-direction: column; padding: 10px; overflow: hidden; border-right: 1px solid var(--line); background: var(--sidebar); transition: width .16s ease, padding .16s ease; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 3px 5px 9px; }
.brand-symbol { display: grid; flex: 0 0 27px; width: 27px; height: 27px; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #df8664, #aa4f39); font-size: 13px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.brand > span:nth-child(2) { display: grid; min-width: 0; }
.brand strong { font-size: 12px; font-weight: 650; letter-spacing: -.01em; }
.brand small { margin-top: 2px; color: var(--subtle); font-size: 9px; }
.sidebar-collapse { margin-left: auto; }
.icon-button { display: inline-grid; width: 29px; height: 29px; place-items: center; border-radius: 7px; color: var(--muted); background: transparent; }
.icon-button:hover, .icon-button.active { color: var(--text); background: var(--panel-3); }
.new-chat { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 37px; margin: 4px 0 11px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); background: var(--panel); text-align: left; }
.new-chat:hover { border-color: var(--line-strong); background: var(--panel-2); }
.new-chat strong { font-size: 12px; font-weight: 550; }
kbd { margin-left: auto; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--subtle); background: var(--sidebar); font: 9px var(--mono); }
.main-nav { display: grid; gap: 2px; }
.main-nav button, .sidebar-bottom > button { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 9px; border-radius: 7px; color: var(--muted); background: transparent; text-align: left; }
.main-nav button:hover, .sidebar-bottom > button:hover { color: var(--text); background: var(--panel-2); }
.main-nav button i { margin-left: auto; min-width: 15px; color: var(--yellow); font-style: normal; text-align: center; }
.sidebar-section-title { display: flex; align-items: center; justify-content: space-between; margin: 16px 3px 6px 9px; color: var(--subtle); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-section-title button { color: var(--muted); background: transparent; }
.project-list { min-height: 0; flex: 1; overflow: auto; }
.project-group { margin-bottom: 2px; }
.project-row { display: flex; min-width: 0; align-items: center; border-radius: 7px; }
.project-row:hover { background: var(--panel-2); }
.project-row .disclosure { width: 22px; height: 32px; flex: 0 0 22px; color: var(--subtle); background: transparent; }
.project-button { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; padding: 6px 2px; color: var(--muted); background: transparent; text-align: left; }
.project-group.active .project-button { color: var(--text); }
.project-glyph { color: var(--accent); }
.project-button > span:last-child { display: grid; min-width: 0; flex: 1; }
.project-button strong { overflow: hidden; font-size: 11px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.project-button small { margin-top: 1px; color: var(--subtle); font: 8px var(--mono); }
.more-button { width: 27px; height: 29px; flex: 0 0 27px; border-radius: 6px; color: var(--subtle); background: transparent; opacity: 0; font-size: 8px; letter-spacing: 1px; }
.project-row:hover .more-button, .chat-row-wrap:hover .more-button, .more-button:focus-visible { opacity: 1; }
.more-button:hover { color: var(--text); background: var(--panel-3); }
.chat-list { margin: 0 0 7px 25px; padding-left: 7px; border-left: 1px solid var(--line); }
.chat-row-wrap { display: flex; min-width: 0; align-items: center; }
.chat-row { display: flex; min-width: 0; min-height: 29px; flex: 1; align-items: center; gap: 7px; padding: 0 6px; overflow: hidden; border-radius: 6px; color: var(--muted); background: transparent; text-align: left; }
.chat-row:hover, .chat-row.active { color: var(--text); background: var(--panel-2); }
.chat-row strong { min-width: 0; flex: 1; overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.chat-row small { color: var(--accent); font-size: 7px; }
.unread-dot { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: transparent; }
.unread-dot.show { background: var(--blue); }
.chat-row.draft { color: var(--text); }
.chat-more { width: 23px; flex-basis: 23px; }
.inline-new-chat { margin: 2px 0 0 6px; padding: 5px 7px; border-radius: 5px; color: var(--subtle); background: transparent; font-size: 9px; text-align: left; }
.inline-new-chat:hover { color: var(--text); background: var(--panel-2); }
.sidebar-empty { padding: 18px 10px; color: var(--subtle); font-size: 10px; text-align: center; }
.sidebar-bottom { display: grid; gap: 3px; padding-top: 8px; border-top: 1px solid var(--line); }
.connection-line { display: flex; align-items: center; gap: 7px; padding: 5px 9px 1px; color: var(--subtle); font-size: 9px; }
.health-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.health-dot.ok { background: var(--green); box-shadow: 0 0 8px color-mix(in srgb, var(--green) 55%, transparent); }
.health-dot.warn { background: var(--yellow); }
.health-dot.bad { background: var(--red); }
.sidebar.collapsed { width: 54px; padding-inline: 8px; }
.sidebar.collapsed .brand > span:nth-child(2), .sidebar.collapsed .new-chat strong, .sidebar.collapsed .new-chat kbd, .sidebar.collapsed .main-nav span, .sidebar.collapsed .main-nav i, .sidebar.collapsed .sidebar-section-title span, .sidebar.collapsed .project-button > span:last-child, .sidebar.collapsed .project-button small, .sidebar.collapsed .chat-list, .sidebar.collapsed .sidebar-bottom span { display: none; }
.sidebar.collapsed .brand { justify-content: center; padding-inline: 0; }
.sidebar.collapsed .brand-symbol { display: none; }
.sidebar.collapsed .sidebar-collapse { margin: 0; }
.sidebar.collapsed .new-chat, .sidebar.collapsed .main-nav button, .sidebar.collapsed .sidebar-bottom > button { justify-content: center; padding: 0; }
.sidebar.collapsed .project-row .disclosure, .sidebar.collapsed .more-button { display: none; }
.sidebar.collapsed .project-button { justify-content: center; }
.sidebar-is-collapsed { grid-template-columns: 54px minmax(0, 1fr); }

.workspace { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.workbench-header { display: grid; grid-template-columns: minmax(170px, 1fr) auto minmax(100px, 1fr); min-height: 48px; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.workspace-title { display: flex; min-width: 0; align-items: center; gap: 7px; }
.workspace-title strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-title small { padding: 3px 5px; border-radius: 4px; color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); font: 8px var(--mono); }
.mobile-sidebar { display: none; }
.workbench-header nav { display: flex; height: 100%; align-items: center; gap: 2px; }
.workbench-header nav button { position: relative; height: 100%; padding: 0 10px; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 10px; }
.workbench-header nav button:hover { color: var(--text); }
.workbench-header nav button.active { color: var(--text); border-bottom-color: var(--accent); }
.workbench-header nav button i { position: absolute; right: 4px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.workbench-header > div:last-child { display: flex; justify-content: flex-end; }
.workbench { display: flex; min-width: 0; min-height: 0; flex: 1; }
.content { min-width: 0; min-height: 0; flex: 1; background: var(--bg); }
.runtime-bar { display: flex; min-height: 23px; align-items: center; gap: 18px; padding: 0 12px; border-top: 1px solid var(--line); color: var(--subtle); background: var(--panel); font: 8px var(--mono); }
.runtime-bar span { display: flex; align-items: center; gap: 6px; }
.runtime-bar span:nth-child(2) { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.explorer { display: flex; width: 240px; min-width: 180px; min-height: 0; flex: 0 0 240px; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar); }
.explorer > header { display: flex; min-height: 40px; align-items: center; justify-content: space-between; padding: 0 9px 0 13px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .09em; }
.explorer-search { display: flex; min-height: 30px; align-items: center; gap: 7px; margin: 0 9px 8px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--subtle); background: var(--panel); }
.explorer-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 10px; }
.tree { min-height: 0; flex: 1; overflow: auto; }
.tree-row { display: flex; width: 100%; min-height: 27px; align-items: center; gap: 6px; padding: 0 8px 0 calc(9px + var(--depth) * 13px); overflow: hidden; color: var(--muted); background: transparent; text-align: left; font: 10px var(--mono); }
.tree-row:hover { color: var(--text); background: var(--panel-2); }
.tree-row > span { width: 9px; color: var(--subtle); }
.tree-row i { width: 11px; color: var(--blue); font-style: normal; }
.tree-row.folder i { color: var(--yellow); }
.tree-row strong { overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.explorer > footer { display: flex; justify-content: space-between; padding: 7px 10px; border-top: 1px solid var(--line); color: var(--subtle); font: 8px var(--mono); }

.chat-view { position: relative; display: flex; width: min(100%, 920px); height: 100%; min-height: 0; flex-direction: column; margin: 0 auto; padding: 0 30px; }
.chat-header { display: flex; min-height: 70px; flex: 0 0 auto; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.chat-header h1 { margin: 0; font-size: 15px; font-weight: 620; letter-spacing: -.015em; }
.chat-header p { margin: 4px 0 0; color: var(--subtle); font-size: 9px; }
.message-scroll { min-height: 0; flex: 1; overflow: auto; padding: 26px 4px 26px; scroll-behavior: smooth; }
.chat-empty { display: grid; width: min(480px, 90%); min-height: 70%; margin: auto; place-content: center; text-align: center; }
.chat-empty > span { display: grid; width: 36px; height: 36px; margin: 0 auto 14px; place-items: center; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--accent); background: var(--panel); font-size: 16px; }
.chat-empty h2 { margin: 0; font-size: 20px; font-weight: 570; letter-spacing: -.025em; }
.chat-empty p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.message { max-width: 820px; margin: 0 auto 27px; }
.message > header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--text-2); font-size: 11px; font-weight: 620; }
.message > header span { color: var(--subtle); font-size: 9px; font-weight: 400; }
.message > div { color: var(--text-2); font-size: 12px; line-height: 1.68; }
.message > div p { margin: 0 0 10px; }
.message.user { max-width: min(680px, 86%); margin-right: 0; }
.message.user > header { justify-content: flex-end; }
.message.user > div { padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px 12px 3px 12px; color: var(--text); background: var(--panel-2); }
.message-pastes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.message code { padding: 2px 4px; border-radius: 4px; color: var(--blue); background: var(--panel-2); font: 10px var(--mono); }
.markdown-code { margin: 12px 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.markdown-code > div { padding: 6px 10px; border-bottom: 1px solid var(--line); color: var(--subtle); font: 8px var(--mono); text-transform: uppercase; }
.markdown-code code { display: block; padding: 12px; color: var(--text-2); background: transparent; white-space: pre; }
.cursor { display: inline-block; width: 6px; height: 13px; margin-left: 3px; background: var(--accent); animation: blink .9s steps(2) infinite; vertical-align: -2px; }
@keyframes blink { 50% { opacity: 0; } }
.jump-latest { position: absolute; right: 40px; bottom: 127px; z-index: 3; display: none; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); background: var(--elevated); box-shadow: var(--shadow); font-size: 9px; }
.jump-latest.show { display: block; }
.activity { max-width: 820px; margin: -9px auto 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.activity summary { display: flex; min-height: 34px; align-items: center; gap: 8px; padding: 0 10px; cursor: pointer; list-style: none; color: var(--muted); font-size: 9px; }
.activity summary::-webkit-details-marker { display: none; }
.activity summary strong { color: var(--text-2); font-weight: 560; }
.activity summary span:last-child { margin-left: auto; color: var(--subtle); }
.activity > div { padding: 3px 11px 8px 32px; border-top: 1px solid var(--line); }
.activity p { display: flex; gap: 7px; margin: 6px 0; color: var(--muted); font: 9px var(--mono); }
.activity p i { color: var(--green); font-style: normal; }
.activity .plan { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.activity .plan > strong { color: var(--text-2); font-size: 9px; }
.spin { display: inline-block; color: var(--accent); animation: spin 1.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.approval-card { flex: 0 0 auto; margin: 0 0 10px; padding: 11px; border: 1px solid color-mix(in srgb, var(--yellow) 55%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--panel) 94%, var(--yellow)); }
.approval-card > header { display: flex; gap: 9px; }
.approval-card > header > span { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border-radius: 50%; color: #111; background: var(--yellow); font-weight: 800; }
.approval-card strong { font-size: 11px; }
.approval-card p { margin: 4px 0 7px; color: var(--muted); font-size: 9px; }
.approval-card code { display: block; margin-top: 5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--text-2); background: var(--panel-2); font: 9px var(--mono); }
.approval-card footer { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.approval-card footer span { flex: 1; }
.approval-card.destructive { border-color: color-mix(in srgb, var(--red) 52%, var(--line)); background: color-mix(in srgb, var(--panel) 95%, var(--red)); }
.approval-card.destructive > header > span { color: #fff; background: var(--red); }
.approval-card .approval-meta { margin: 7px 1px; color: var(--subtle); }
.approval-card .approval-meta strong { color: var(--muted); font-size: inherit; }
.agent-stop-card { display: flex; max-width: 820px; align-items: center; gap: 9px; margin: 0 auto 18px; padding: 10px 11px; border: 1px solid color-mix(in srgb, var(--red) 42%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--panel) 95%, var(--red)); }
.agent-stop-card > span { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--red); font-weight: 700; }
.agent-stop-card > div { min-width: 0; flex: 1; }.agent-stop-card strong { font-size: 10px; }.agent-stop-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.composer-wrap { flex: 0 0 auto; padding: 0 0 14px; }
.composer { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-strong)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.composer-pastes { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px 0; }
.paste-chip { display: inline-flex; min-width: 190px; max-width: 280px; align-items: stretch; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.paste-chip.sent { min-width: 175px; background: color-mix(in srgb, var(--panel) 86%, var(--accent)); }
.paste-preview-button { display: flex; min-width: 0; flex: 1; align-items: center; gap: 8px; padding: 7px 9px; color: var(--text-2); background: transparent; text-align: left; }
.paste-preview-button:hover { background: var(--panel-3); }.paste-preview-button > span:first-child { color: var(--accent); font-size: 14px; }
.paste-preview-button > span:last-child { display: grid; min-width: 0; }.paste-preview-button strong { font-size: 9px; }.paste-preview-button small { margin-top: 2px; color: var(--subtle); font-size: 8px; }
.paste-remove { width: 28px; flex: 0 0 28px; border-left: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 14px; }.paste-remove:hover { color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--panel)); }
.composer textarea { display: block; width: 100%; min-height: 54px; max-height: 180px; padding: 13px 14px 5px; resize: none; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; line-height: 1.45; }
.composer textarea::placeholder { color: var(--subtle); }
.composer-bar { display: flex; min-height: 39px; align-items: center; gap: 5px; padding: 4px 7px 7px; }
.composer-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 6px; color: var(--muted); background: transparent; }
.composer-icon:hover { color: var(--text); background: var(--panel-3); }
.composer select { max-width: 135px; min-height: 27px; padding: 0 21px 0 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--panel-2); font-size: 9px; }
.composer-spacer { flex: 1; }
.microphone-button { position: relative; display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; }
.microphone-button:hover { color: var(--text); background: var(--panel-3); }
.microphone-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.microphone-button.listening { color: #fff; border-color: color-mix(in srgb, var(--red) 65%, transparent); background: color-mix(in srgb, var(--red) 78%, var(--panel)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 16%, transparent); animation: voice-pulse 1.35s ease-in-out infinite; }
.microphone-button.processing { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.microphone-button.denied, .microphone-button.error { color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--panel)); }
.microphone-button.unsupported { color: var(--subtle); opacity: .7; }
.voice-status { color: var(--muted); font-size: 8px; white-space: nowrap; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 7%, transparent); } }
.send-button { min-width: 55px; min-height: 29px; padding: 0 10px; border-radius: 7px; color: #fff; background: var(--accent); font-size: 10px; font-weight: 650; }
.send-button:hover { background: var(--accent-hover); }
.send-button.stop { color: var(--text); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.scope-hint { margin: 7px 0 0; color: var(--subtle); font-size: 8px; text-align: center; }
.scope-hint strong { color: var(--muted); font-weight: 500; }
.external-consent-hint { color: var(--yellow); }

.inspector { display: flex; width: 276px; min-width: 230px; min-height: 0; flex: 0 0 276px; flex-direction: column; border-left: 1px solid var(--line); background: var(--sidebar); }
.inspector > header { display: flex; min-height: 40px; border-bottom: 1px solid var(--line); }
.inspector > header > button:not(.icon-button) { flex: 1; border-bottom: 2px solid transparent; color: var(--subtle); background: transparent; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.inspector > header > button.active { color: var(--text-2); border-bottom-color: var(--accent); }
.inspector-body { min-height: 0; flex: 1; overflow: auto; padding: 12px; }
.inspector-card { margin-bottom: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.inspector-card > span { display: block; color: var(--subtle); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.inspector-card > strong { display: block; margin-top: 7px; color: var(--text); font-size: 11px; }
.inspector-card p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.metric-list p { display: flex; justify-content: space-between; }
.audit-row { display: grid; grid-template-columns: 48px 1fr; gap: 7px; padding: 8px 2px; border-bottom: 1px solid var(--line); font: 8px var(--mono); }
.audit-row time { color: var(--subtle); }
.audit-row span { color: var(--muted); overflow-wrap: anywhere; }
.inspector-empty { color: var(--subtle); font-size: 9px; }

.empty-workspace { display: grid; height: 100%; padding: 30px; place-content: center; text-align: center; }
.loading-view { display: grid; height: 100%; place-content: center; justify-items: center; color: var(--muted); }
.loading-view > span { width: 24px; height: 24px; margin-bottom: 12px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-view strong { color: var(--text-2); font-size: 12px; }.loading-view p { margin: 5px 0 0; color: var(--subtle); font-size: 9px; }
.empty-workspace.compact { height: 100%; }
.empty-symbol { display: grid; width: 43px; height: 43px; margin: 0 auto 16px; place-items: center; border: 1px solid var(--line-strong); border-radius: 13px; color: var(--accent); background: var(--panel); font-size: 18px; }
.empty-workspace h1, .empty-workspace h2 { margin: 0; font-size: 22px; font-weight: 570; letter-spacing: -.03em; }
.empty-workspace h2 { font-size: 18px; }
.empty-workspace p { width: min(520px, 90vw); margin: 10px auto 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.empty-workspace > div:last-child { display: flex; justify-content: center; gap: 7px; }
.primary-button, .quiet-button, .danger-button { min-height: 30px; padding: 0 11px; border-radius: 7px; font-size: 10px; font-weight: 560; }
.primary-button { color: #fff; background: var(--accent); }
.primary-button:hover { background: var(--accent-hover); }
.quiet-button { border: 1px solid var(--line); color: var(--text-2); background: var(--panel-2); }
.quiet-button:hover { border-color: var(--line-strong); background: var(--panel-3); }
.danger-button { border: 1px solid color-mix(in srgb, var(--red) 45%, var(--line)); color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--panel)); }
.back-button { width: 29px; height: 29px; border-radius: 7px; color: var(--muted); background: transparent; }
.back-button:hover { color: var(--text); background: var(--panel-3); }

.utility-view { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.view-header { display: flex; min-height: 70px; align-items: center; padding: 0 26px; border-bottom: 1px solid var(--line); background: var(--bg); }
.view-header .header-action { margin-left: auto; }
.view-header > div { display: flex; align-items: center; gap: 8px; }
.view-header h1 { margin: 0; font-size: 15px; font-weight: 620; }
.view-header p { margin: 4px 0 0; color: var(--subtle); font-size: 9px; }
.utility-scroll { min-height: 0; flex: 1; overflow: auto; padding: 22px 26px; }
.empty-card { max-width: 600px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--panel); }
.empty-card h2 { margin: 0 0 7px; color: var(--text-2); font-size: 13px; }
.empty-card p { margin: 0; font-size: 10px; line-height: 1.55; }
.large-search { display: flex; max-width: 680px; min-height: 42px; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); }
.large-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-results { max-width: 680px; margin-top: 16px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.search-results > p { padding: 10px; color: var(--muted); font-size: 10px; }
.search-section { display: grid; gap: 2px; margin-bottom: 14px; }.search-section > strong { padding: 7px 9px; color: var(--subtle); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.search-section > button { display: grid; grid-template-columns: 24px minmax(0, 220px) minmax(0, 1fr); align-items: center; gap: 7px; min-height: 31px; padding: 4px 8px; border-radius: 5px; color: var(--muted); background: transparent; text-align: left; }
.search-section > button:hover { color: var(--text); background: var(--panel-2); }.search-section code { overflow: hidden; color: var(--text-2); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }.search-section small { overflow: hidden; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.git-output { max-width: 760px; margin-bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }.git-output > header { display: flex; justify-content: space-between; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 9px; }.git-output header span { color: var(--subtle); }.git-output pre { max-height: 300px; margin: 0; padding: 12px; overflow: auto; color: var(--text-2); font: 9px/1.55 var(--mono); white-space: pre-wrap; }
.metric-grid { display: grid; max-width: 600px; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.metric-grid article { padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.metric-grid span { display: block; margin-bottom: 7px; color: var(--subtle); font-size: 8px; text-transform: uppercase; }
.metric-grid strong { font: 11px var(--mono); }
.task-list { display: grid; align-content: start; gap: 6px; }
.task-list > button { display: flex; width: min(720px, 100%); align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text-2); background: var(--panel); text-align: left; }
.task-list > button:hover { border-color: var(--line-strong); background: var(--panel-2); }
.job-state { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); }
.job-state.queued, .job-state.starting, .job-state.running { background: var(--blue); }.job-state.completed { background: var(--green); }.job-state.failed, .job-state.interrupted { background: var(--red); }.job-state.cancelled { background: var(--subtle); }.job-state.waiting_approval { background: var(--yellow); }
.task-list button span { display: grid; min-width: 0; flex: 1; }
.task-list button strong { font-size: 10px; }.task-list button small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.task-list time { color: var(--subtle); font-size: 8px; }

.diff-card { max-width: 900px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--panel); }
.diff-card > header { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.diff-card > header strong { font: 10px var(--mono); }.diff-card > header span { color: var(--muted); font-size: 9px; }
.diff-card > p { margin: 0; padding: 8px 12px; color: var(--muted); font-size: 9px; }
.diff-card pre { margin: 0; padding: 8px 0; overflow: auto; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 65%, var(--panel)); font: 10px/1.65 var(--mono); }
.diff-card pre span { display: block; padding: 0 12px; white-space: pre; }
.diff-card pre .add { color: var(--green); background: color-mix(in srgb, var(--green) 10%, transparent); }
.diff-card pre .remove { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.diff-card pre .meta { color: var(--blue); }
.sticky-actions { display: flex; min-height: 56px; justify-content: flex-end; align-items: center; gap: 7px; padding: 0 26px; border-top: 1px solid var(--line); background: var(--panel); }
.terminal-view { padding: 0; }
.terminal-output { min-height: 0; flex: 1; overflow: auto; padding: 18px 22px; color: var(--text-2); background: #0b0d0f; font: 11px/1.65 var(--mono); white-space: pre-wrap; }
:root[data-resolved-theme="light"] .terminal-output { background: #f4f4f1; }
.terminal-output .prompt { color: var(--blue); }.terminal-output .success { color: var(--green); }.terminal-output .warning { color: var(--yellow); }.terminal-output .error { color: var(--red); }
.terminal-composer { display: flex; min-height: 48px; align-items: center; gap: 8px; padding: 7px 11px; border-top: 1px solid var(--line); background: var(--panel); }
.terminal-composer > span { color: var(--accent); font: 10px var(--mono); }
.terminal-composer input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font: 10px var(--mono); }
.preview-empty { display: grid; flex: 1; place-content: center; text-align: center; }
.preview-empty > span { color: var(--accent); font-size: 24px; }.preview-empty h2 { margin: 12px 0 5px; font-size: 16px; }.preview-empty p { width: min(440px, 80vw); margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.preview-modal-open, .preview-modal-open body { overscroll-behavior: none; }
.text-preview-modal { display: flex; width: min(860px, calc(100vw - 32px)); height: min(700px, 90dvh, calc(100dvh - 32px)); max-height: min(700px, 90dvh, calc(100dvh - 32px)); flex-direction: column; padding: 0; overflow: hidden; }
.text-preview-header { min-height: 82px; flex: 0 0 auto; padding: 16px 15px 12px 18px; border-bottom: 1px solid var(--line); }
.text-preview-meta { margin-top: 7px; color: var(--subtle); font-size: 9px; font-weight: 400; }
.text-preview-body { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; scrollbar-color: color-mix(in srgb, var(--muted) 72%, transparent) transparent; scrollbar-gutter: stable; background: var(--bg); }
.text-preview-body:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.text-preview-body::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 72%, transparent); border: 2px solid transparent; background-clip: padding-box; }
.text-preview-body pre { min-width: 0; margin: 0; padding: 14px 16px 18px; color: var(--text-2); font: 10px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }

.editor-pane { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.editor-header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.editor-header > div:first-child { display: grid; min-width: 0; }
.editor-header strong { overflow: hidden; font: 10px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.editor-header span { margin-top: 2px; color: var(--subtle); font-size: 8px; }
.row-actions { display: flex; gap: 6px; }
.editor-tabs { display: flex; min-height: 35px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--sidebar); }
.editor-tab { display: flex; min-width: 90px; max-width: 190px; align-items: center; gap: 6px; padding: 0 9px; border-right: 1px solid var(--line); border-bottom: 2px solid transparent; overflow: hidden; color: var(--muted); background: transparent; font: 9px var(--mono); white-space: nowrap; }
.editor-tab.active { color: var(--text); border-bottom-color: var(--accent); background: var(--panel); }
.editor-tab.dirty > span { color: var(--yellow); }
.editor-tab.deleted { color: var(--red); text-decoration: line-through; text-decoration-thickness: 1px; }
.editor-tab.deleted > span { color: var(--red); }
.editor-tab i { margin-left: auto; color: var(--subtle); font-size: 12px; font-style: normal; }
.monaco-host { min-height: 0; flex: 1; }
.editor-footer { display: flex; min-height: 24px; justify-content: space-between; align-items: center; padding: 0 9px; border-top: 1px solid var(--line); color: var(--subtle); background: var(--panel); font: 8px var(--mono); }
.inline-warning { padding: 7px 10px; color: var(--yellow); background: color-mix(in srgb, var(--yellow) 8%, var(--panel)); font-size: 9px; }
.inline-warning.deleted { color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--panel)); }

.settings-view { display: grid; height: 100%; grid-template-columns: 180px minmax(0, 1fr); }
.settings-view > aside { display: grid; align-content: start; gap: 2px; padding: 18px 10px; border-right: 1px solid var(--line); background: var(--sidebar); }
.settings-view > aside button { min-height: 31px; padding: 0 10px; border-radius: 6px; color: var(--muted); background: transparent; text-align: left; font-size: 10px; }
.settings-view > aside button:hover, .settings-view > aside button.active { color: var(--text); background: var(--panel-2); }
.settings-main { overflow: auto; padding: 0 28px 28px; }
.settings-main > header { display: flex; min-height: 70px; align-items: center; gap: 8px; }
.settings-main h1 { margin: 0; font-size: 17px; }
.settings-card { max-width: 700px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.settings-card h2 { margin: 0 0 14px; font-size: 13px; }
.settings-card > p { color: var(--muted); font-size: 10px; line-height: 1.55; }
.settings-card label { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: 10px; }
.settings-card select { min-width: 135px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); font-size: 9px; }
.consent-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.consent-box > span { float: right; color: var(--yellow); font: 9px var(--mono); }
.consent-box > span.allowed { color: var(--green); }
.consent-box > span.denied { color: var(--red); }
.consent-box dl { margin: 12px 0; }
.consent-box p { color: var(--muted); font-size: 9px; }.consent-box > div { display: flex; justify-content: flex-end; gap: 6px; }
.provider-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.provider-row > div { display: flex; align-items: center; gap: 9px; }.provider-row > div span { display: grid; }.provider-row strong { font-size: 10px; }.provider-row small { color: var(--subtle); font: 8px var(--mono); }.provider-row > span { color: var(--muted); font-size: 9px; }
.settings-card dl { display: grid; grid-template-columns: 120px 1fr; gap: 9px; font: 9px var(--mono); }.settings-card dt { color: var(--subtle); }.settings-card dd { margin: 0; color: var(--text-2); }

.click-catcher, .modal-backdrop { position: fixed; inset: 0; z-index: 80; }
.click-catcher { background: transparent; }
.context-menu { position: fixed; z-index: 81; min-width: 205px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--elevated); box-shadow: var(--shadow); }
.context-menu button { display: block; width: 100%; padding: 8px 9px; border-radius: 5px; color: var(--text-2); background: transparent; text-align: left; font-size: 10px; }
.context-menu button:hover:not(:disabled) { color: var(--text); background: var(--panel-3); }.context-menu button.danger { color: var(--red); }.context-menu button small { float: right; margin-left: 16px; color: var(--subtle); font-size: 8px; }
.modal-backdrop { display: grid; padding: 20px; place-items: center; background: rgba(5, 6, 8, .58); backdrop-filter: blur(3px); }
.modal { width: min(520px, 100%); padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--elevated); box-shadow: var(--shadow); }
.modal.small { width: min(420px, 100%); }.modal > header { display: flex; align-items: flex-start; justify-content: space-between; }.modal header span { display: grid; }.modal header small { color: var(--subtle); font-size: 8px; letter-spacing: .1em; }.modal h2 { margin: 4px 0 0; font-size: 16px; }.modal > p { margin: 14px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }.modal > footer { display: flex; justify-content: flex-end; gap: 7px; margin-top: 16px; }
.consent-backdrop { pointer-events: none; }
.external-consent-modal { width: min(460px, 100%); pointer-events: auto; }
.external-consent-modal > p strong { color: var(--text-2); }
.consent-route { display: grid; grid-template-columns: 78px 1fr; gap: 8px; margin: 16px 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 9px; }
.consent-route dt { color: var(--subtle); }.consent-route dd { margin: 0; color: var(--text-2); font-weight: 600; }
.consent-security-note { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--green) 6%, var(--panel)); }
.consent-security-note > span { color: var(--green); }.consent-security-note p { display: grid; gap: 3px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }.consent-security-note strong { color: var(--text-2); font-size: 10px; }
.folder-choice { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }.folder-choice > span { display: grid; min-width: 0; }.folder-choice strong, .folder-choice small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.folder-choice strong { font-size: 10px; }.folder-choice small { margin-top: 3px; color: var(--subtle); font: 8px var(--mono); }
.modal-error { margin-top: 9px; color: var(--red); font-size: 9px; }.modal > label { display: grid; gap: 7px; margin-top: 15px; color: var(--muted); font-size: 9px; }.modal > label input { padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px; outline: 0; background: var(--panel); }
.project-wizard { width: min(474px, 100%); padding: 0; overflow: hidden; }
.project-wizard > header { min-height: 58px; align-items: center; padding: 14px 16px 10px 19px; border-bottom: 1px solid var(--line); }
.project-wizard h2 { margin: 0; font-size: 15px; font-weight: 620; letter-spacing: -.015em; }
.wizard-body { display: grid; gap: 12px; padding: 18px 19px 4px; }
.wizard-label { margin: 0 0 -2px; color: var(--text-2); font-size: 10px; font-weight: 600; }
.project-type-list { display: grid; gap: 9px; }
.project-type-card { display: grid; min-height: 85px; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-2); background: var(--panel); text-align: left; transition: border-color .14s ease, background .14s ease, transform .14s ease; }
.project-type-card:hover { border-color: var(--line-strong); background: var(--panel-2); transform: translateY(-1px); }
.project-type-card.selected { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.project-type-card.coming-soon { opacity: .66; }
.project-type-icon { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--accent); background: var(--panel-2); font-size: 16px; }
.project-type-card > span:nth-child(2) { display: grid; gap: 5px; min-width: 0; }
.project-type-card strong { font-size: 11px; font-weight: 620; }.project-type-card small { color: var(--muted); font-size: 9px; line-height: 1.45; }.project-type-card > i { color: var(--accent); font-size: 12px; font-style: normal; }
.project-type-card em { margin-left: 5px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 999px; color: var(--subtle); font-size: 7px; font-style: normal; font-weight: 550; text-transform: uppercase; letter-spacing: .06em; }
.project-name-field { display: grid; gap: 7px; color: var(--text-2); font-size: 9px; font-weight: 600; }.project-name-field span { display: flex; align-items: center; gap: 6px; }.project-name-field i { color: var(--accent); font-style: normal; }
.project-name-field input { width: 100%; height: 37px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; outline: 0; background: var(--panel); font-size: 11px; }.project-name-field input:focus { border-color: var(--blue); }
.source-folders { display: grid; gap: 9px; margin-top: 2px; }.source-folders > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }.source-folders > div:first-child strong { font-size: 9px; }.source-folders > div:first-child small { color: var(--subtle); font-size: 8px; }
.source-folder-picker { display: grid; min-height: 132px; place-items: center; align-content: center; gap: 7px; padding: 17px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--text-2); background: color-mix(in srgb, var(--panel) 82%, transparent); }
.source-folder-picker:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--panel)); }.source-folder-picker > span { position: relative; color: var(--accent); font-size: 22px; }.source-folder-picker > span i { position: absolute; right: -9px; bottom: -5px; display: grid; width: 15px; height: 15px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-size: 9px; font-style: normal; }.source-folder-picker strong { font-size: 10px; font-weight: 570; }.source-folder-picker small { color: var(--subtle); font-size: 8px; }
.selected-source-folder { display: grid; min-height: 70px; grid-template-columns: 34px minmax(0, 1fr) 29px; align-items: center; gap: 10px; padding: 10px 9px 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); }.source-folder-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }.selected-source-folder > span:nth-child(2) { display: grid; min-width: 0; gap: 4px; }.selected-source-folder strong, .selected-source-folder small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.selected-source-folder strong { font-size: 10px; }.selected-source-folder small { color: var(--subtle); font: 8px var(--mono); }
.duplicate-project { display: grid; gap: 10px; padding: 11px; border: 1px solid color-mix(in srgb, var(--yellow) 45%, var(--line)); border-radius: 8px; color: var(--text-2); background: color-mix(in srgb, var(--yellow) 7%, var(--panel)); font-size: 9px; }.duplicate-project > div { display: flex; justify-content: flex-end; gap: 6px; }
.project-wizard > footer { min-height: 61px; align-items: center; margin-top: 14px; padding: 11px 19px 14px; border-top: 1px solid var(--line); }.project-wizard > footer.wizard-footer { display: grid; grid-template-columns: auto 1fr auto auto; }.wizard-footer .back-button { margin-left: -8px; }
.server-folder-browser { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.server-folder-browser > header { display: flex; min-height: 39px; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.server-folder-browser > header small { min-width: 0; overflow: hidden; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.server-folder-list { max-height: min(320px, 42vh); overflow-y: auto; scrollbar-color: var(--line-strong) transparent; }
.server-folder-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 7px; border-bottom: 1px solid var(--line); }
.server-folder-list > div:last-child { border-bottom: 0; }
.server-folder-list > div > button:first-child { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px; color: var(--text-2); background: transparent; text-align: left; }
.server-folder-list > div > button:first-child span { color: var(--yellow); }
.server-folder-list > div > button:first-child strong { overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.server-folder-list > p { margin: 0; padding: 22px; color: var(--subtle); font-size: 10px; text-align: center; }

.login-shell { display: grid; min-height: 100dvh; padding: 24px; place-items: center; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 38%), var(--bg); }
.login-card { display: flex; width: min(390px, 100%); flex-direction: column; gap: 14px; padding: 30px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); }
.login-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--accent); background: var(--panel-2); font-size: 17px; font-weight: 700; }
.login-card > small { color: var(--subtle); font: 8px var(--mono); letter-spacing: .12em; }
.login-card h1 { margin: -5px 0 0; font-size: 21px; font-weight: 620; letter-spacing: -.025em; }
.login-card p { margin: -5px 0 3px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.login-card label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.login-card input { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; outline: 0; color: var(--text); background: var(--bg); font-size: 11px; }
.login-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.login-card > button { min-height: 38px; margin-top: 2px; }
.archive-list { display: grid; max-height: 420px; gap: 6px; margin-top: 15px; overflow: auto; }.archive-list > div { display: flex; align-items: center; justify-content: space-between; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }.archive-list span { display: grid; }.archive-list strong { font-size: 10px; }.archive-list small { margin-top: 3px; color: var(--subtle); font-size: 8px; }
.toast { position: fixed; z-index: 120; right: 20px; bottom: 34px; max-width: 360px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--elevated); box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; font-size: 10px; }.toast.show { opacity: 1; transform: none; }.toast[data-tone="error"] { border-color: color-mix(in srgb, var(--red) 55%, var(--line)); }

@media (max-width: 1180px) {
  .inspector { width: 240px; flex-basis: 240px; }
  .explorer { width: 210px; flex-basis: 210px; }
  .chat-view { padding-inline: 22px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 54px minmax(0, 1fr); }
  .sidebar { width: 54px; padding-inline: 8px; }
  .sidebar .brand > span:nth-child(2), .sidebar .new-chat strong, .sidebar .new-chat kbd, .sidebar .main-nav span, .sidebar .main-nav i, .sidebar .sidebar-section-title span, .sidebar .project-button > span:last-child, .sidebar .project-button small, .sidebar .chat-list, .sidebar .sidebar-bottom span { display: none; }
  .sidebar .brand { justify-content: center; padding-inline: 0; }.sidebar .brand-symbol { display: none; }.sidebar .sidebar-collapse { margin: 0; }.sidebar .new-chat, .sidebar .main-nav button, .sidebar .sidebar-bottom > button { justify-content: center; padding: 0; }.sidebar .project-row .disclosure, .sidebar .more-button { display: none; }.sidebar .project-button { justify-content: center; }
  .inspector { position: absolute; z-index: 20; right: 0; top: 48px; bottom: 23px; box-shadow: -12px 0 30px rgba(0,0,0,.18); }
  .workbench-header { grid-template-columns: 1fr auto; }.workbench-header nav { display: none; }.workbench-header > div:last-child { grid-column: 2; }
  .settings-view { grid-template-columns: 130px minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 35; left: 0; top: 0; bottom: 0; width: 252px; padding: 10px; transform: translateX(-100%); box-shadow: var(--shadow); }
  .shell:not(.sidebar-is-collapsed) .sidebar { transform: none; }
  .sidebar .brand > span:nth-child(2), .sidebar .new-chat strong, .sidebar .new-chat kbd, .sidebar .main-nav span, .sidebar .main-nav i, .sidebar .sidebar-section-title span, .sidebar .project-button > span:last-child, .sidebar .project-button small, .sidebar .chat-list, .sidebar .sidebar-bottom span { display: initial; }
  .sidebar .brand { justify-content: flex-start; }.sidebar .brand-symbol { display: grid; }.sidebar .sidebar-collapse { margin-left: auto; }.sidebar .new-chat, .sidebar .main-nav button, .sidebar .sidebar-bottom > button { justify-content: flex-start; padding: 0 9px; }.sidebar .project-row .disclosure, .sidebar .more-button { display: block; }.sidebar .project-button { justify-content: flex-start; }
  .mobile-sidebar { display: inline-grid; }
  .explorer { position: absolute; z-index: 18; left: 0; top: 48px; bottom: 23px; width: min(86vw, 280px); box-shadow: 12px 0 30px rgba(0,0,0,.18); }
  .chat-view { padding-inline: 13px; }.chat-header { min-height: 58px; }.composer select { max-width: 92px; }.send-hint { display: none; }
  .settings-view { display: block; overflow: auto; }.settings-view > aside { display: flex; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }.settings-view > aside button { flex: 0 0 auto; }.settings-main { padding-inline: 14px; }
  .metric-grid { grid-template-columns: 1fr; }.view-header, .utility-scroll { padding-inline: 14px; }
}
