:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8eaed;
  background: #202225;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #202225;
  --bg-raised: #292c30;
  --bg-panel: #303338;
  --bg-soft: #383c42;
  --bg-hover: #41464d;
  --line: #50545a;
  --line-soft: #3e4248;
  --text: #e8eaed;
  --text-soft: #c1c5ca;
  --text-muted: #8f969e;
  --cyan: #67a8df;
  --cyan-soft: #263f57;
  --green: #73d6a3;
  --green-soft: #203b31;
  --amber: #efbe72;
  --amber-soft: #423621;
  --red: #ef8582;
  --red-soft: #452a2c;
  --violet: #b9a4ec;
  --blue: #8cbff1;
  --radius: 4px;
}

* { box-sizing: border-box; }
html, body, #root { min-height: 100%; margin: 0; }
body { min-width: 320px; background: var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.app-shell { min-height: 100vh; background: var(--bg); }
.topbar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 8px; border-bottom: 1px solid #151719; background: #26292d; position: relative; z-index: 30; box-shadow: inset 0 -1px rgba(255,255,255,.035); }
.brand-lockup { display: flex; align-items: center; gap: 7px; min-width: 187px; padding-right: 10px; border-right: 1px solid var(--line-soft); cursor: pointer; user-select: none; }
.brand-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; align-items: end; }
.brand-mark span { display: block; border-radius: 2px 2px 1px 1px; background: var(--cyan); }
.brand-mark span:nth-child(1) { height: 8px; opacity: .55; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 18px; opacity: .75; }
.brand-name { font-size: 11px; font-weight: 650; line-height: 14px; }
.brand-product { display: none; }
.top-menu { display: flex; align-items: center; gap: 1px; }
.menu-wrapper { position: relative; }
.top-menu button { height: 27px; border: 0; background: transparent; color: var(--text-soft); font-size: 11px; padding: 0 8px; border-radius: 2px; cursor: pointer; }
.top-menu button:hover { background: var(--bg-hover); color: var(--text); }
.top-menu button.is-open { background: var(--bg-soft); color: var(--text); }
.menu-popover { position: absolute; top: 29px; left: 0; z-index: 40; min-width: 230px; padding: 4px; border: 1px solid #666b72; border-radius: 2px; background: #303338; box-shadow: 0 8px 22px rgba(0,0,0,.48); }
.menu-popover button { width: 100%; height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 9px; border-radius: 2px; text-align: left; color: var(--text-soft); font-size: 11px; }
.menu-popover button:hover { background: var(--bg-hover); color: var(--text); }
.menu-popover kbd { color: var(--text-muted); font-size: 9px; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.topbar-context { display: flex; align-items: center; gap: 10px; margin-right: 3px; white-space: nowrap; }
.context-document { font-size: 12px; color: var(--text-soft); }
.context-dot, .save-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 7px; background: var(--cyan); vertical-align: 1px; }
.context-separator { color: var(--text-muted); margin: 0 7px; }
.save-state { color: var(--amber); font-size: 11px; }
.save-dot { background: var(--amber); }
.topbar-divider, .toolbar-divider { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
.icon-button { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--text-soft); cursor: pointer; padding: 0; }
.icon-button:hover { color: var(--text); background: var(--bg-hover); border-color: var(--line); }
.icon-button.is-active { color: var(--cyan); background: var(--cyan-soft); border-color: #2e6768; }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.command-search { height: 26px; min-width: 162px; display: flex; align-items: center; gap: 7px; padding: 0 7px 0 9px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 2px; color: var(--text-muted); font-size: 10px; cursor: pointer; }
.command-search:hover { color: var(--text); border-color: #466067; }
.command-search kbd { margin-left: auto; color: var(--text-muted); font-size: 10px; border: 1px solid var(--line); border-radius: 3px; padding: 2px 4px; }
.avatar-button { height: 26px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg-raised); color: var(--text-soft); padding: 0 7px; cursor: pointer; font-size: 9px; }
.avatar-button:hover { border-color: #466067; color: var(--text); }

.page-shell { min-height: calc(100vh - 34px); overflow: auto; }
.page-content { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 56px 0 44px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
.page-heading { max-width: 690px; }
.page-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.page-heading h1 { font-size: 33px; line-height: 1.08; letter-spacing: -.01em; margin: 0; font-weight: 680; color: var(--text); }
.page-heading p { margin: 12px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.6; max-width: 620px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.back-button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-soft); cursor: pointer; }
.back-button:hover { color: var(--text); background: var(--bg-hover); }
.button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 4px; padding: 0 13px; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.button-primary { background: var(--cyan); color: #102124; border-color: var(--cyan); }
.button-primary:hover { background: #82e3e0; border-color: #82e3e0; }
.button-outline { background: transparent; border-color: var(--line); color: var(--text-soft); }
.button-outline:hover { border-color: #567178; color: var(--text); background: var(--bg-hover); }
.button-quiet { color: var(--text-soft); background: transparent; }
.button-quiet:hover { background: var(--bg-hover); color: var(--text); }
.text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--cyan); font-size: 12px; padding: 4px 0; cursor: pointer; }
.text-button:hover { color: #94ece8; }
.panel-surface { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); }
.section-kicker, .eyebrow { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-title h3 { margin: 6px 0 0; font-size: 16px; font-weight: 650; }
.badge { height: 20px; display: inline-flex; align-items: center; gap: 5px; border-radius: 3px; padding: 0 7px; font-size: 10px; font-weight: 650; white-space: nowrap; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-cyan { color: var(--cyan); background: var(--cyan-soft); }
.badge-green { color: var(--green); background: var(--green-soft); }
.badge-amber { color: var(--amber); background: var(--amber-soft); }
.badge-red { color: var(--red); background: var(--red-soft); }
.badge-muted { color: var(--text-muted); background: var(--bg-soft); }

/* Start page */
.start-page { padding-bottom: 14px; }
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
.start-hero { min-height: 312px; display: flex; justify-content: space-between; overflow: hidden; position: relative; }
.hero-copy { width: 53%; padding: 36px 0 32px 36px; position: relative; z-index: 1; }
.hero-copy .section-kicker { color: var(--cyan); }
.hero-copy h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; margin: 17px 0 12px; font-weight: 670; }
.hero-copy p { color: var(--text-soft); font-size: 14px; line-height: 1.6; margin: 0; max-width: 390px; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.hero-schematic { width: 47%; min-width: 280px; position: relative; overflow: hidden; border-left: 1px solid var(--line-soft); background: #171e23; }
.hero-schematic::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(100, 138, 141, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 138, 141, .11) 1px, transparent 1px); background-size: 30px 30px; opacity: .55; }
.schematic-axis { position: absolute; background: #46666d; opacity: .7; transform-origin: left center; }
.axis-x-line { left: 56%; top: 66%; width: 150px; height: 1px; transform: rotate(-11deg); }
.axis-y-line { left: 56%; top: 66%; width: 126px; height: 1px; transform: rotate(-54deg); }
.schematic-block { position: absolute; border: 1px solid rgba(123, 210, 208, .48); background: rgba(68, 140, 143, .28); transform: skewY(-26deg) rotate(26deg); box-shadow: inset -12px -10px 0 rgba(9, 17, 20, .19); }
.block-a { width: 135px; height: 90px; left: 28%; top: 29%; }
.block-b { width: 84px; height: 51px; left: 47%; top: 51%; background: rgba(234, 180, 98, .17); border-color: rgba(238, 190, 114, .6); }
.schematic-ring { width: 43px; height: 43px; border: 7px solid rgba(118, 218, 214, .65); border-left-color: transparent; border-radius: 50%; position: absolute; left: 37%; top: 41%; transform: rotate(-23deg); }
.schematic-label { position: absolute; color: var(--text-muted); font-size: 10px; letter-spacing: .04em; }
.label-a { left: 12%; top: 16%; }
.label-b { right: 12%; bottom: 18%; color: var(--amber); }
.quick-panel { padding: 22px 18px; }
.quick-panel .section-title { margin-bottom: 17px; }
.quick-action { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--text-soft); padding: 15px 0; text-align: left; cursor: pointer; }
.quick-action:last-child { border-bottom: 1px solid var(--line-soft); }
.quick-action:hover { color: var(--text); }
.quick-action:hover > svg { color: var(--cyan); transform: translateX(2px); }
.quick-action > svg { margin-left: auto; transition: transform .15s ease; }
.quick-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { font-size: 12px; font-weight: 620; }
.quick-action small { color: var(--text-muted); font-size: 10px; margin-top: 3px; }
.recent-section { margin-top: 35px; }
.recent-section > .section-title { margin-bottom: 14px; }
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.project-card { display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--bg-panel); border-radius: var(--radius); text-align: left; cursor: pointer; }
.project-card:hover { border-color: #51636a; transform: translateY(-1px); }
.project-preview, .list-thumbnail { position: relative; overflow: hidden; background: #12191d; }
.project-preview { height: 144px; border-bottom: 1px solid var(--line); }
.preview-grid { position: absolute; inset: 0; opacity: .36; background-image: linear-gradient(rgba(95, 141, 146, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 141, 146, .16) 1px, transparent 1px); background-size: 22px 22px; }
.preview-shape { position: absolute; z-index: 1; width: 106px; height: 68px; left: 50%; top: 50%; border: 1px solid rgba(123, 212, 211, .78); background: rgba(80, 153, 156, .38); transform: translate(-50%, -44%) skewY(-23deg) rotate(23deg); box-shadow: 23px 13px 0 rgba(41, 90, 95, .33); }
.preview-1 .preview-shape { width: 78px; height: 98px; background: rgba(239, 190, 114, .28); border-color: rgba(239, 190, 114, .7); transform: translate(-50%, -46%) skewY(-23deg) rotate(23deg); }
.preview-2 .preview-shape { width: 132px; height: 47px; background: rgba(181, 164, 236, .23); border-color: rgba(181, 164, 236, .64); transform: translate(-50%, -44%) skewY(-22deg) rotate(23deg); }
.project-card-info { padding: 14px 15px 15px; }
.project-card-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.project-card-title strong { font-size: 13px; font-weight: 650; }
.project-card-title svg { color: var(--text-muted); }
.project-card-info > span { display: block; margin-top: 5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.project-card-meta { display: flex; align-items: center; gap: 9px; margin-top: 13px; color: var(--text-muted); font-size: 10px; }
.project-card-meta .badge { margin-left: auto; }
.start-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-soft); margin-top: 38px; padding-top: 15px; color: var(--text-muted); font-size: 10px; }
.start-footer > div { display: flex; align-items: center; gap: 8px; }
.start-footer svg { color: var(--green); }
.footer-separator { color: var(--line); }

/* Project manager */
.manager-toolbar { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; }
.large-search { height: 36px; flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-muted); }
.large-search input, .tree-search input, .help-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.large-search kbd, .help-search kbd { color: var(--text-muted); font-size: 10px; border: 1px solid var(--line); padding: 2px 5px; border-radius: 3px; }
.toolbar-select { height: 36px; display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-muted); font-size: 11px; }
.toolbar-select select { appearance: none; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-soft); border-radius: 4px; height: 36px; padding: 0 28px 0 9px; }
.toolbar-select svg { margin-left: -24px; pointer-events: none; }
.project-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-panel); }
.project-list-row { width: 100%; min-height: 72px; display: grid; grid-template-columns: 58px minmax(180px, 1fr) 100px 105px 95px 32px; gap: 14px; align-items: center; padding: 7px 14px 7px 8px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.project-list-row:last-child { border-bottom: 0; }
.project-list-row:hover { background: var(--bg-hover); }
.project-list-empty { min-height: 112px; display: grid; place-items: center; color: var(--text-muted); font-size: 12px; }
.list-thumbnail { width: 58px; height: 56px; border-radius: 3px; }
.list-thumbnail .preview-shape { width: 42px; height: 28px; }
.list-main strong, .list-main span { display: block; }
.list-main strong { font-size: 12px; font-weight: 650; }
.list-main span, .list-count, .list-modified { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.list-count, .list-modified { margin-top: 0; }
.row-action { width: 28px; height: 28px; display: grid; place-items: center; border: 0; color: var(--text-muted); background: transparent; cursor: pointer; border-radius: 4px; }
.row-action:hover { color: var(--text); background: var(--bg-soft); }
.storage-banner { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 16px; background: #172024; border: 1px solid #2a4b4d; border-radius: var(--radius); }
.storage-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }
.storage-banner strong, .storage-banner span { display: block; }
.storage-banner strong { font-size: 12px; }
.storage-banner span { font-size: 10px; color: var(--text-soft); margin-top: 3px; }
.storage-banner .text-button { margin-left: auto; }

/* Import/export */
.flow-page { max-width: 930px; margin: 0 auto; }
.flow-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; }
.flow-steps { padding-top: 13px; }
.flow-step { display: flex; align-items: center; gap: 9px; color: var(--text-muted); font-size: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.flow-step.is-active { color: var(--text); font-weight: 650; }
.flow-step.is-complete { color: var(--green); }
.flow-index { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; color: var(--text-muted); }
.flow-step.is-active .flow-index { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-soft); }
.flow-step.is-complete .flow-index { color: #14231d; border-color: var(--green); background: var(--green); }
.flow-card { min-height: 430px; padding: 24px; display: flex; flex-direction: column; }
.flow-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.flow-card-header h2 { margin: 8px 0 0; font-size: 20px; font-weight: 650; }
.drop-zone { flex: 1; min-height: 245px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; margin: 24px 0; border: 1px dashed #46666d; border-radius: 5px; background: #162024; color: var(--text-soft); }
.drop-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #3a6267; color: var(--cyan); background: var(--cyan-soft); border-radius: 50%; margin-bottom: 6px; }
.drop-zone strong { color: var(--text); font-size: 13px; }
.drop-zone span { font-size: 11px; }
.drop-zone .button { margin-top: 12px; }
.drop-zone small { color: var(--text-muted); font-size: 9px; letter-spacing: .08em; margin-top: 7px; }
.flow-note { display: flex; align-items: flex-start; gap: 8px; padding: 11px; color: var(--amber); background: var(--amber-soft); border: 1px solid #654f2f; border-radius: 4px; font-size: 11px; line-height: 1.4; }
.flow-note svg { flex-shrink: 0; }
.format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 28px 0; }
.format-card { position: relative; min-height: 106px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 14px; background: var(--bg-raised); color: var(--text-soft); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; text-align: left; }
.format-card:hover { border-color: #5b7379; }
.format-card.is-selected { color: var(--text); border-color: var(--cyan); background: var(--cyan-soft); }
.format-icon { color: var(--cyan); }
.format-card strong { font-size: 12px; }
.format-card small { color: var(--text-muted); font-size: 10px; }
.format-check { position: absolute; right: 10px; top: 10px; color: var(--cyan); }
.flow-footer { display: flex; justify-content: flex-end; gap: 7px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* Settings, help, diagnostics and sync */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav button { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); text-align: left; font-size: 12px; cursor: pointer; }
.settings-nav button:hover { color: var(--text); background: var(--bg-hover); }
.settings-nav button.is-active { color: var(--text); background: var(--bg-soft); box-shadow: inset 2px 0 0 var(--cyan); }
.settings-content { padding: 0 23px; }
.setting-section { padding: 23px 0 10px; border-bottom: 1px solid var(--line-soft); }
.setting-section:last-child { border-bottom: 0; }
.setting-section-heading h2 { font-size: 14px; margin: 0; font-weight: 650; }
.setting-section-heading p { margin: 6px 0 15px; font-size: 11px; color: var(--text-muted); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; border-top: 1px solid var(--line-soft); }
.setting-row strong, .setting-row span { display: block; }
.setting-row strong { font-size: 12px; font-weight: 600; }
.setting-row > div:first-child span { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.setting-control { display: flex; align-items: center; min-width: 190px; justify-content: flex-end; }
.setting-control select { width: 190px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-soft); font-size: 11px; }
.setting-control input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cyan); }
.setting-value { color: var(--text-soft); font-size: 11px; }
.storage-meter { width: 190px; height: 8px; display: block; background: var(--bg-soft); border-radius: 2px; overflow: hidden; }
.storage-meter span { display: block; width: 34%; height: 100%; background: var(--cyan); }
.help-search { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 14px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 4px; color: var(--text-muted); margin-bottom: 17px; }
.help-search input { font-size: 13px; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.help-card { min-height: 86px; display: flex; align-items: center; gap: 12px; padding: 16px; text-align: left; color: var(--text-soft); cursor: pointer; }
.help-card:hover { border-color: #536e74; background: var(--bg-hover); }
.help-card > svg { margin-left: auto; color: var(--text-muted); }
.help-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }
.help-card strong, .help-card small { display: block; }
.help-card strong { color: var(--text); font-size: 12px; }
.help-card small { color: var(--text-muted); font-size: 10px; margin-top: 5px; }
.shortcut-panel { margin-top: 18px; padding: 20px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px 22px; margin-top: 18px; }
.shortcut-row { display: flex; align-items: center; gap: 9px; min-height: 31px; color: var(--text-soft); font-size: 11px; }
.shortcut-row kbd { min-width: 42px; color: var(--text); text-align: center; border: 1px solid var(--line); border-bottom-color: #56646b; border-radius: 3px; padding: 4px 5px; font-size: 10px; background: var(--bg-raised); }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.health-card { min-height: 135px; padding: 16px; }
.health-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 4px; margin-bottom: 19px; }
.health-icon.green { color: var(--green); background: var(--green-soft); }
.health-icon.cyan { color: var(--cyan); background: var(--cyan-soft); }
.health-icon.amber { color: var(--amber); background: var(--amber-soft); }
.health-card strong, .health-card small { display: block; }
.health-card strong { font-size: 14px; margin-top: 6px; }
.health-card small { color: var(--text-muted); font-size: 10px; margin-top: 4px; }
.diagnostic-table { margin-top: 16px; padding: 20px; }
.last-checked { color: var(--text-muted); font-size: 10px; }
.diagnostic-row { width: 100%; display: grid; grid-template-columns: 180px 1fr 100px 20px; align-items: center; gap: 12px; min-height: 47px; border: 0; border-top: 1px solid var(--line-soft); color: var(--text-soft); background: transparent; text-align: left; cursor: pointer; }
.diagnostic-row:hover { color: var(--text); }
.diagnostic-name { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.diagnostic-detail { font-size: 10px; color: var(--text-muted); }
.diagnostic-value { font-size: 10px; text-align: right; }
.diagnostic-value.green { color: var(--green); }.diagnostic-value.cyan { color: var(--cyan); }.diagnostic-value.amber { color: var(--amber); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }.status-dot.green { background: var(--green); }.status-dot.cyan { background: var(--cyan); }.status-dot.amber { background: var(--amber); }
.diagnostic-tree-panel { margin-top: 16px; padding: 20px; }
.diagnostic-tree-panel .section-title > strong { font-size: 10px; }
.diagnostic-empty { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: 11px; }
.diagnostic-tree { border-top: 1px solid var(--line-soft); }
.document-diagnostic { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.document-diagnostic.is-child { padding: 10px 0 10px 22px; border-bottom: 0; border-top: 1px solid var(--line-soft); }
.document-diagnostic-main { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.document-diagnostic-main > div { min-width: 0; }
.document-diagnostic-main strong, .document-diagnostic-main span, .document-diagnostic-main small { display: block; }
.document-diagnostic-main strong { font-size: 11px; }
.document-diagnostic-main span { margin-top: 3px; color: var(--text-soft); font-size: 10px; line-height: 1.45; }
.document-diagnostic-main small { margin-top: 5px; color: var(--text-muted); font-size: 9px; overflow-wrap: anywhere; }
.diagnostic-severity { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 3px; }
.diagnostic-severity.error { color: var(--red); background: var(--red-soft); }.diagnostic-severity.warning { color: var(--amber); background: var(--amber-soft); }.diagnostic-severity.info { color: var(--cyan); background: var(--cyan-soft); }
.diagnostic-actions { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 0 33px; }
.diagnostic-actions .button { min-height: 25px; padding: 0 8px; font-size: 9px; }
.diagnostic-children { margin: 10px 0 -12px 33px; border-left: 1px solid var(--line); }
.sync-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; }
.sync-card { padding: 23px; }
.sync-card-header { display: flex; align-items: center; gap: 11px; }
.sync-card-header .badge { margin-left: auto; }
.sync-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; color: var(--cyan); background: var(--cyan-soft); }
.sync-card h2 { margin: 6px 0 0; font-size: 17px; }
.sync-card > p { color: var(--text-soft); font-size: 12px; line-height: 1.6; margin: 20px 0; max-width: 440px; }
.sync-stats { display: flex; gap: 36px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 16px 0; margin-bottom: 19px; }
.sync-stats strong, .sync-stats span { display: block; }.sync-stats strong { font-size: 15px; }.sync-stats span { color: var(--text-muted); font-size: 10px; margin-top: 4px; }
.sync-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 62px; border-top: 1px solid var(--line-soft); }
.sync-row strong, .sync-row span { display: block; }.sync-row strong { font-size: 12px; }.sync-row div span { color: var(--text-muted); font-size: 10px; margin-top: 4px; }.sync-row.is-disabled { opacity: .58; }
.toggle { width: 32px; height: 18px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); padding: 2px; }.toggle span { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); }

/* Workspace */
.workspace-page { height: calc(100vh - 56px); display: flex; flex-direction: column; min-height: 620px; overflow: hidden; }
.workspace-toolbar { height: 46px; flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.workbench-picker { height: 31px; min-width: 154px; display: flex; align-items: center; gap: 7px; padding: 0 7px 0 10px; color: var(--cyan); background: var(--cyan-soft); border: 1px solid #2f6567; border-radius: 4px; }
.workbench-picker select { appearance: none; min-width: 100px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; cursor: pointer; }.workbench-picker svg:last-child { margin-left: auto; color: var(--text-muted); }
.toolbar-spacer { flex: 1; }.toolbar-status { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--text-muted); font-size: 10px; }.status-pulse { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(115, 214, 163, .11); }
.document-tabs { height: 36px; flex-shrink: 0; display: flex; align-items: flex-end; gap: 1px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #11161a; }
.doc-tab { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; color: var(--text-muted); background: transparent; font-size: 11px; cursor: pointer; }.doc-tab:hover { color: var(--text-soft); }.doc-tab.is-active { color: var(--text); border-color: var(--line); background: var(--bg-panel); }.doc-tab svg:last-child { margin-left: 8px; color: var(--text-muted); }.doc-unsaved { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }.new-tab { width: 29px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }.new-tab:hover { color: var(--cyan); }.document-tab-spacer { flex: 1; }.document-meta { padding: 0 4px 9px; color: var(--text-muted); font-size: 10px; }
.workbench-nav { height: 32px; flex-shrink: 0; display: flex; align-items: center; gap: 2px; padding: 0 11px; overflow: hidden; border-bottom: 1px solid var(--line); background: #13191d; }
.nav-caption { color: var(--text-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; margin-right: 7px; }
.workbench-nav button { height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--text-muted); font-size: 10px; cursor: pointer; white-space: nowrap; }
.workbench-nav button:hover { color: var(--text); background: var(--bg-hover); }.workbench-nav button.is-active { color: var(--cyan); border-color: #2c6568; background: var(--cyan-soft); }.workbench-nav .nav-more { margin-left: auto; }
.workspace-content { min-height: 0; flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px 44px; }
.combo-panel, .properties-panel, .task-dock { min-width: 0; background: var(--bg-panel); overflow: hidden; }.left-panel { border-right: 1px solid var(--line); }.right-panel { border-left: 1px solid var(--line); }
.panel-tabs { height: 39px; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: var(--bg-raised); }.panel-tabs button { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-muted); font-size: 11px; cursor: pointer; }.panel-tabs button:hover { color: var(--text-soft); }.panel-tabs button.is-active { color: var(--text); border-bottom-color: var(--cyan); }.tab-count { min-width: 16px; height: 16px; display: inline-grid; place-items: center; padding: 0 4px; color: var(--cyan); background: var(--cyan-soft); border-radius: 3px; font-size: 9px; }.tab-count-green { color: var(--green); background: var(--green-soft); }
.combo-model { height: calc(100% - 39px); min-height: 0; display: flex; flex-direction: column; }.model-tree { min-height: 190px; flex: 1 1 58%; display: flex; flex-direction: column; }.tree-toolbar { display: flex; gap: 5px; padding: 10px 9px; }.tree-search { min-width: 0; flex: 1; display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px; border: 1px solid var(--line); background: var(--bg-raised); border-radius: 3px; color: var(--text-muted); }.tree-search input { font-size: 11px; }.tree-root { padding: 0 4px; overflow: auto; }.tree-document-row { height: 29px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--text); font-size: 11px; font-weight: 650; }.tree-version { margin-left: auto; color: var(--text-muted); font-size: 9px; font-weight: 500; }.tree-row { width: 100%; min-height: 29px; display: flex; align-items: center; gap: 5px; padding-right: 8px; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--text-soft); text-align: left; font-size: 11px; cursor: pointer; }.tree-row:hover { background: var(--bg-hover); color: var(--text); }.tree-row.is-selected { color: var(--text); border-left-color: var(--cyan); background: var(--cyan-soft); }.tree-row.is-active .tree-label { color: var(--cyan); }.tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tree-spacer { width: 13px; }.tree-child { color: var(--text-muted); }.tree-children .tree-row { padding-left: 29px !important; }.active-marker { width: 5px; height: 5px; margin-left: auto; background: var(--cyan); border-radius: 50%; }.tree-footer { display: flex; gap: 13px; margin-top: auto; padding: 12px 12px 14px; border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: 9px; }.tree-footer span { display: inline-flex; align-items: center; gap: 5px; }.legend-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; }.legend-dot.valid { background: var(--green); }.legend-dot.warning { background: var(--amber); }
.task-panel { height: calc(100% - 39px); display: flex; flex-direction: column; overflow: auto; }.task-header { display: flex; align-items: center; gap: 9px; padding: 18px 15px; border-bottom: 1px solid var(--line-soft); }.task-header .badge { margin-left: auto; }.task-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }.task-header h2 { margin: 4px 0 0; font-size: 13px; }.task-body { padding: 16px 15px; }.task-step { display: flex; gap: 9px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }.step-index { width: 19px; height: 19px; display: grid; place-items: center; color: #142124; background: var(--cyan); border-radius: 50%; font-size: 10px; font-weight: 700; flex-shrink: 0; }.task-step strong, .task-step span { display: block; }.task-step strong { font-size: 11px; }.task-step span { color: var(--text-muted); font-size: 10px; line-height: 1.4; margin-top: 3px; }.field-label { display: block; color: var(--text-soft); font-size: 10px; margin-bottom: 14px; }.field-unit { float: right; color: var(--text-muted); }.field-input { width: 100%; height: 30px; display: block; margin-top: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-raised); color: var(--text); font-size: 11px; }.field-input:focus { border-color: #527479; outline: none; }.check-row { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 10px; margin-top: 3px; }.check-row input { accent-color: var(--cyan); }.task-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 18px; color: var(--amber); font-size: 10px; line-height: 1.4; }.task-footer { display: flex; gap: 5px; margin-top: auto; padding: 11px 12px; border-top: 1px solid var(--line); }.task-footer .button { flex: 1; padding: 0 7px; min-height: 31px; font-size: 11px; }
.viewport-region { min-width: 0; position: relative; background: #0e1417; overflow: hidden; }.viewport { position: absolute; inset: 0; display: flex; flex-direction: column; }.viewport-header { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid rgba(85, 113, 119, .22); background: rgba(15, 22, 25, .86); z-index: 1; }.viewport-title { display: flex; flex-direction: column; gap: 3px; }.viewport-title strong { font-size: 11px; font-weight: 600; }.viewport-title .eyebrow { color: var(--text-muted); }.viewport-actions { display: flex; gap: 3px; }.viewport-grid { min-height: 0; flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; cursor: crosshair; }.grid-lines { position: absolute; inset: -25%; opacity: .37; transform: perspective(500px) rotateX(62deg) translateY(13%); background-image: linear-gradient(rgba(81, 130, 136, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(81, 130, 136, .22) 1px, transparent 1px); background-size: 28px 28px; }.mock-part { position: relative; z-index: 2; width: 285px; height: 180px; transform: translate(5%, -4%) skewY(-20deg) rotate(21deg); filter: drop-shadow(24px 22px 0 rgba(0, 0, 0, .16)); cursor: pointer; }.part-front { position: absolute; inset: 0; border: 1px solid #8bd2cf; background: #447d82; box-shadow: inset -12px -14px 0 rgba(13, 36, 41, .25); }.part-top { position: absolute; width: 285px; height: 64px; top: -48px; left: 0; border: 1px solid #83c7c6; background: #60999a; transform: skewX(-35deg); transform-origin: bottom left; }.part-side { position: absolute; width: 50px; height: 180px; right: -34px; top: -24px; border: 1px solid #6ba9a9; background: #34636b; transform: skewY(55deg); transform-origin: top left; }.part-hole { position: absolute; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 7px solid #223f44; background: #111b1e; box-shadow: 0 0 0 1px #95d9d5, inset 0 0 0 3px #17282c; }.part-hole.one { left: 55px; top: 51px; }.part-hole.two { right: 50px; top: 51px; }.part-cut { position: absolute; width: 125px; height: 25px; left: 81px; bottom: 31px; border: 1px solid rgba(168, 224, 219, .72); background: rgba(31, 70, 74, .42); }.part-selected .part-front { background: #4e9799; border-color: #b9f1eb; box-shadow: 0 0 0 2px rgba(94, 214, 214, .3), inset -12px -14px 0 rgba(13, 36, 41, .25); }.mock-datum-plane { position: absolute; z-index: 1; width: 320px; height: 205px; border: 1px dashed rgba(239, 190, 114, .42); background: rgba(239, 190, 114, .04); transform: translate(28%, 25%) skewY(-22deg) rotate(21deg); }.selection-callout { position: absolute; z-index: 3; top: 25%; left: 68%; display: flex; align-items: center; gap: 7px; color: var(--cyan); font-size: 10px; }.callout-line { width: 42px; height: 1px; background: var(--cyan); position: relative; }.callout-line::after { content: ''; width: 5px; height: 5px; position: absolute; left: 0; top: -2px; border-radius: 50%; background: var(--cyan); }.viewport-legend { position: absolute; z-index: 4; left: 16px; bottom: 14px; display: flex; gap: 12px; color: var(--text-muted); font-size: 9px; }.viewport-legend span { display: inline-flex; align-items: center; gap: 5px; }.legend-swatch { width: 12px; height: 3px; display: inline-block; border-radius: 2px; }.legend-swatch.selected { background: var(--cyan); }.legend-swatch.edge { background: #8cb7b6; }.legend-swatch.datum { border-top: 1px dashed var(--amber); }.viewport-bottom-left { position: absolute; z-index: 5; left: 16px; bottom: 42px; display: flex; gap: 5px; }.view-chip { display: flex; align-items: center; gap: 5px; padding: 5px 7px; color: var(--text-muted); background: rgba(25, 34, 38, .85); border: 1px solid rgba(93, 124, 129, .32); border-radius: 3px; font-size: 9px; }.axis-widget { width: 64px; height: 64px; position: relative; margin: 0 23px 23px 0; }.axis-origin { width: 7px; height: 7px; position: absolute; left: 28px; top: 30px; border-radius: 50%; background: #d9e3e3; }.axis-widget::before, .axis-widget::after { content: ''; position: absolute; left: 31px; top: 31px; width: 29px; height: 1px; transform-origin: left center; }.axis-widget::before { background: #d77f7e; transform: rotate(-18deg); }.axis-widget::after { background: #78d19f; transform: rotate(-80deg); }.axis-x, .axis-y, .axis-z { position: absolute; font-size: 9px; font-weight: 700; }.axis-x { right: 0; top: 19px; color: #e58b88; }.axis-y { left: 18px; top: 0; color: #7bd7a0; }.axis-z { left: 19px; bottom: 0; color: #8abcf0; }
.three-viewport-host { position: absolute; inset: 0; z-index: 1; opacity: 1; pointer-events: none; }.three-viewport-host canvas { width: 100%; height: 100%; display: block; }
.properties-panel { display: flex; flex-direction: column; }.property-heading { display: flex; align-items: flex-start; justify-content: space-between; min-height: 75px; padding: 16px 13px 10px; }.property-heading h2 { margin: 5px 0 0; font-size: 15px; font-weight: 650; }.property-tabs { height: 34px; }.property-tabs button { padding: 0 14px; }.properties-scroll { overflow: auto; padding-bottom: 20px; }.property-group { border-bottom: 1px solid var(--line-soft); padding: 0 13px 10px; }.property-group-title { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.property-row { min-height: 28px; display: grid; grid-template-columns: 43% 57%; align-items: center; gap: 5px; }.property-label { color: var(--text-muted); font-size: 10px; }.property-value { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; border: 0; padding: 4px 0; background: transparent; color: var(--text-soft); text-align: right; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.property-value:disabled { opacity: 1; }.property-value.is-editable, .property-value.is-link { color: var(--text); cursor: pointer; }.property-value.is-editable:hover { color: var(--cyan); }.property-value.is-link { color: var(--cyan); }.status-pill { height: 16px; display: inline-flex; align-items: center; padding: 0 4px; border-radius: 2px; font-size: 8px; }.status-pill.green { color: var(--green); background: var(--green-soft); }.status-pill.amber { color: var(--amber); background: var(--amber-soft); }.expression-row { min-height: 29px; display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; }.expression-row .expression-value { margin-left: auto; color: var(--cyan); }.expression-row button { display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }.expression-row button:hover { color: var(--text); }
.bottom-drawer { height: 35px; flex-shrink: 0; border-top: 1px solid var(--line); background: var(--bg-panel); transition: height .16s ease; }.bottom-drawer.is-open { height: 122px; }.bottom-drawer-header { height: 35px; display: flex; align-items: center; justify-content: space-between; }.drawer-tabs { height: 100%; display: flex; align-items: stretch; gap: 2px; padding-left: 9px; }.drawer-tabs button { display: flex; align-items: center; gap: 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-muted); font-size: 10px; padding: 0 8px; cursor: pointer; }.drawer-tabs button.is-active { color: var(--text); border-bottom-color: var(--cyan); }.drawer-toggle { width: 32px; height: 30px; margin-right: 5px; display: grid; place-items: center; border: 0; color: var(--text-muted); background: transparent; cursor: pointer; }.drawer-toggle:hover { color: var(--text); }.bottom-drawer-content { padding: 5px 13px 9px; border-top: 1px solid var(--line-soft); }.report-line { min-height: 30px; display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 10px; }.report-context { color: var(--text-muted); }.report-line button { border: 0; background: transparent; color: var(--cyan); font-size: 10px; cursor: pointer; }.report-time { margin-left: auto; color: var(--text-muted); }.icon-green { color: var(--green); }.icon-amber { color: var(--amber); }.icon-cyan { color: var(--cyan); }.icon-muted { color: var(--text-muted); }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 8px; padding: 11px 13px; color: #10231d; background: var(--green); border-radius: 4px; box-shadow: 0 10px 25px rgba(0, 0, 0, .28); font-size: 11px; font-weight: 650; }

@media (max-width: 1050px) {
  .brand-lockup { width: 140px; }
  .top-menu { display: none; }
  .topbar-context { margin-left: auto; }
  .workspace-content { grid-template-columns: 235px minmax(0, 1fr) 230px; }
  .page-content { width: min(100% - 38px, 920px); }
  .start-grid { grid-template-columns: 1fr; }.quick-panel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }.quick-panel .section-title { grid-column: 1 / -1; }.quick-action { border: 1px solid var(--line-soft); padding: 12px; }
}

@media (max-width: 780px) {
  .topbar { padding: 0 10px; gap: 5px; }.brand-lockup { width: auto; }.brand-product, .topbar-context, .command-search, .topbar-divider { display: none; }.avatar-button { margin-left: 0; }
  .page-content { width: calc(100% - 26px); padding: 34px 0 30px; }.page-header { display: block; margin-bottom: 24px; }.page-actions { margin-top: 18px; }.page-heading h1 { font-size: 28px; }
  .recent-grid, .health-grid, .sync-grid { grid-template-columns: 1fr; }.quick-panel { display: block; }.quick-panel .section-title { margin-bottom: 10px; }.quick-action { border-left: 0; border-right: 0; }.hero-copy { width: 100%; padding: 25px; }.hero-schematic { display: none; }.start-hero { min-height: 290px; }.hero-actions { flex-wrap: wrap; }
  .project-list-row { grid-template-columns: 48px minmax(0, 1fr) 28px; gap: 10px; padding-right: 10px; }.list-thumbnail { width: 48px; height: 48px; }.list-count, .list-modified, .project-list-row > .badge { display: none; }.row-action { grid-column: 3; grid-row: 1; }.list-main { grid-column: 2; }
  .flow-layout { grid-template-columns: 1fr; }.flow-steps { display: flex; gap: 14px; padding: 0; }.flow-step { border-bottom: 0; padding: 0; }.flow-step span:last-child { display: none; }.flow-card { min-height: 390px; }
  .settings-layout { grid-template-columns: 1fr; }.settings-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }.settings-nav button { min-height: 34px; }.settings-content { padding: 0 16px; }.setting-row { gap: 12px; }.setting-control, .setting-control select, .storage-meter { min-width: 145px; width: 145px; }
  .help-grid { grid-template-columns: 1fr; }.shortcut-grid { grid-template-columns: repeat(2, 1fr); }.diagnostic-row { grid-template-columns: 1fr auto 20px; }.diagnostic-detail { display: none; }
  .workspace-page { min-height: 700px; overflow: auto; }.workspace-content { min-height: 640px; grid-template-columns: 1fr; display: flex; flex-direction: column; overflow: auto; }.left-panel, .right-panel { min-height: 250px; max-height: 310px; border: 0; border-bottom: 1px solid var(--line); order: 2; }.viewport-region { min-height: 470px; order: 1; }.right-panel { order: 3; }.document-meta { display: none; }.workspace-toolbar { overflow: auto; }.toolbar-status { display: none; }.workspace-toolbar .icon-button:nth-of-type(n + 7) { display: none; }.bottom-drawer { order: 4; }.bottom-drawer.is-open { height: 126px; }
}

@media (max-width: 480px) {
  .page-actions { display: grid; grid-template-columns: 1fr 1fr; }.page-actions .button { width: 100%; padding: 0 8px; }.start-footer { display: block; line-height: 1.8; }.start-footer > div + div { margin-top: 8px; }.format-grid { grid-template-columns: 1fr; }.sync-stats { gap: 20px; }.sync-stats strong { font-size: 13px; }.viewport-region { min-height: 420px; }.mock-part { transform: scale(.72) translate(5%, -4%) skewY(-20deg) rotate(21deg); }.selection-callout { left: 60%; }.axis-widget { margin-right: 12px; }.viewport-legend { display: none; }.report-context { display: none; }
}

.viewport-bottom-right { position: absolute; z-index: 5; right: 0; bottom: 0; }

/* FreeCAD-aligned dock refinements */
.task-dock { display: flex; flex-direction: column; }
.task-dock-title { min-height: 57px; display: flex; align-items: flex-start; justify-content: space-between; padding: 13px 14px 8px; border-bottom: 1px solid var(--line-soft); }
.task-dock-title h2 { margin: 4px 0 0; font-size: 13px; }
.task-panel { height: calc(100% - 57px); display: flex; flex-direction: column; overflow: auto; }
.task-actions-top { display: flex; justify-content: center; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.task-actions-top .button { min-height: 29px; padding: 0 13px; font-size: 10px; }
.function-rail { min-width: 44px; background: #141a1e; border-left: 1px solid var(--line); overflow: auto; }
.rail-group { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 3px; border-bottom: 1px solid var(--line-soft); }
.rail-group-label { width: 100%; overflow: hidden; color: var(--text-muted); font-size: 7px; text-align: center; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; text-overflow: ellipsis; }
.rail-group button { width: 30px; height: 27px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--text-muted); cursor: pointer; }
.rail-group button:hover { color: var(--cyan); background: var(--cyan-soft); border-color: #2c6568; }
.rail-group button:disabled { opacity: .3; cursor: not-allowed; }
.model-task-summary { padding: 17px 14px; color: var(--text-muted); }
.model-task-summary p { font-size: 11px; line-height: 1.5; margin: 10px 0 15px; }
.model-task-summary .button { width: 100%; }
.combo-property { min-height: 210px; flex: 0 1 42%; overflow: hidden; border-top: 1px solid var(--line); }
.combo-property .property-heading { min-height: 55px; padding-top: 11px; }
.combo-property .properties-scroll { max-height: calc(100% - 89px); }
.properties-empty { padding: 20px 13px; color: var(--text-muted); font-size: 10px; }
.property-editor { min-width: 0; display: flex; justify-content: flex-end; align-items: center; }
.property-readonly { max-width: 100%; overflow: hidden; color: var(--text-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.property-control { width: 100%; min-width: 0; height: 24px; padding: 0 5px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--text-soft); font-size: 10px; text-align: right; }
.property-control:hover, .property-control:focus { border-color: var(--line); background: var(--bg-raised); outline: none; }
.property-control option { background: var(--bg-raised); color: var(--text); }
.property-checkbox { width: 14px; height: 14px; accent-color: var(--cyan); }
.property-number { width: 100%; display: flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 9px; }
.property-number .property-control { min-width: 0; }
.property-link-control { color: var(--cyan); }
.property-included-file { width: 100%; min-width: 0; display: grid; gap: 3px; color: var(--text-soft); font-size: 9px; }
.property-included-file > span { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.property-included-file input[type="file"] { height: 26px; padding: 2px; font-size: 8px; text-align: left; }
.property-included-file input[type="file"]::file-selector-button { height: 20px; margin-right: 4px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg-raised); color: var(--text-soft); font-size: 8px; }
.property-link-sub { display: flex; min-width: 0; align-items: center; gap: 4px; color: var(--cyan); font-size: 10px; }
.property-link-sub > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.property-link-sub .icon-button { width: 24px; height: 24px; flex: 0 0 24px; }
.property-topology-candidates { min-width: 0; max-width: 112px; }
.property-link-sub-list { align-items: flex-start; }
.property-link-sub-items { display: grid; min-width: 0; flex: 1; gap: 3px; }
.property-link-sub-item { display: flex; min-width: 0; align-items: center; gap: 4px; }
.property-link-sub-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topology-repair { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 8px 0 0 34px; }
.property-color { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 9px; }
.property-color input[type="color"] { width: 22px; height: 18px; flex: 0 0 22px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: transparent; }
.property-color-rgba { min-width: 0; }
.property-color .property-color-alpha { width: 50px; min-width: 0; height: 22px; padding: 2px 4px; font-size: 9px; }
.property-color-rgba span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.property-color-list { width: 100%; display: grid; gap: 3px; padding: 3px 0; }
.property-color-list-item { min-width: 0; display: grid; grid-template-columns: 22px minmax(0, 1fr) 24px; align-items: center; gap: 3px; }
.property-color-list-item input[type="color"] { width: 22px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: transparent; }
.property-color-list-item .property-color-alpha { height: 22px; padding: 2px 4px; font-size: 9px; }
.property-color-list-item .icon-button, .property-color-list-actions .icon-button { width: 24px; height: 22px; }
.property-color-list-actions { display: flex; justify-content: flex-end; }
.property-expression { min-height: 20px; display: flex; align-items: center; justify-content: flex-end; gap: 5px; color: var(--cyan); font-size: 9px; }

@media (max-width: 1050px) {
  .workspace-content { grid-template-columns: 260px minmax(0, 1fr) 300px 40px; }
}

@media (max-width: 780px) {
  .workspace-content { grid-template-columns: 1fr; }
  .function-rail { display: none; }
  .task-dock { order: 3; min-height: 320px; max-height: 380px; border-left: 0; border-bottom: 1px solid var(--line); }
  .left-panel { order: 2; min-height: 560px; max-height: 620px; }
  .combo-model { height: 100%; }
  .combo-property { min-height: 280px; }
  .viewport-region { order: 1; }
  .workbench-nav { overflow-x: auto; }
  .workbench-nav .nav-more, .nav-caption { display: none; }
}
.property-placement { width: 100%; }
.property-placement summary { cursor: pointer; color: var(--text); font-size: 11px; }
.property-placement-grid { display: grid; grid-template-columns: 42px repeat(3, minmax(0, 1fr)); gap: 4px; margin-top: 6px; align-items: center; }
.property-placement-grid span { color: var(--text-muted); font-size: 10px; }
.property-placement-grid input, .property-vector input { min-width: 0; width: 100%; height: 24px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); padding: 2px 4px; }
.multi-transform-editor { width: 100%; display: grid; gap: 7px; margin-bottom: 12px; }
.task-link-list { max-height: 142px; display: grid; gap: 4px; margin: -7px 0 12px; padding: 7px 8px; overflow: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-raised); }
.task-link-list .check-row { min-height: 22px; margin: 0; }
.task-vector-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: -4px 0 6px; }
.task-vector-fields label { display: grid; gap: 3px; color: var(--text-muted); font-size: 10px; text-transform: uppercase; }
.multi-transform-step { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-soft); padding: 7px; }
.multi-transform-step-head { display: grid; grid-template-columns: minmax(42px, 1fr) minmax(82px, 1.4fr) 24px; gap: 5px; align-items: center; color: var(--text-muted); font-size: 10px; }
.multi-transform-step-head select, .multi-transform-fields input, .multi-transform-fields select { min-width: 0; width: 100%; height: 25px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-raised); color: var(--text); padding: 0 5px; font-size: 10px; }
.multi-transform-remove { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 3px; background: transparent; color: var(--text-muted); cursor: pointer; }
.multi-transform-remove:hover:not(:disabled) { color: var(--red); background: var(--red-soft); }
.multi-transform-remove:disabled { opacity: .35; cursor: default; }
.multi-transform-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 7px; }
.multi-transform-fields-single { grid-template-columns: minmax(0, 1fr); }
.multi-transform-fields label { min-width: 0; display: grid; gap: 3px; color: var(--text-muted); font-size: 9px; }
.multi-transform-add { width: 100%; height: 28px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px dashed var(--line); border-radius: 3px; background: transparent; color: var(--text-soft); font-size: 10px; cursor: pointer; }
.multi-transform-add:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.multi-transform-add:disabled { opacity: .4; cursor: default; }
.property-vector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; }

/* Native FreeCAD workspace chrome */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(10, 11, 13, .66); }
.freecad-dialog { width: min(440px, 100%); overflow: hidden; border: 1px solid #737980; border-radius: 3px; background: var(--bg-panel); box-shadow: 0 20px 70px rgba(0, 0, 0, .58); }
.freecad-dialog.is-wide { width: min(610px, 100%); }
.dialog-titlebar { height: 32px; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; border-bottom: 1px solid var(--line); background: #292c30; color: var(--text); font-size: 11px; font-weight: 600; }
.dialog-title-icon { width: 23px; display: grid; place-items: center; color: var(--cyan); }
.dialog-titlebar > span:nth-child(2) { flex: 1; }
.dialog-close { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-left: 1px solid var(--line-soft); background: transparent; color: var(--text-soft); cursor: pointer; }
.dialog-close:hover { color: #fff; background: var(--red-soft); }
.dialog-subtitle { padding: 8px 11px; border-bottom: 1px solid var(--line-soft); background: #34373c; color: var(--text-muted); font-size: 10px; }
.dialog-body { min-height: 126px; display: flex; align-items: flex-start; gap: 15px; padding: 24px 22px; }
.dialog-mark { width: 49px; height: 49px; flex: 0 0 49px; display: grid; place-items: center; border: 1px solid #52779b; border-radius: 3px; background: var(--cyan-soft); color: var(--cyan); }
.dialog-body h2 { margin: 1px 0 7px; font-size: 16px; font-weight: 650; }
.dialog-body p { margin: 0 0 7px; color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.dialog-body .dialog-muted { color: var(--text-muted); font-size: 10px; }
.dialog-footer { display: flex; justify-content: flex-end; padding: 9px 10px; border-top: 1px solid var(--line); background: var(--bg-raised); }
.dialog-footer .button { min-width: 76px; min-height: 28px; }
.dialog-form { display: grid; gap: 10px; padding: 16px 13px 20px; }
.dialog-form label { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.4fr); align-items: center; gap: 12px; color: var(--text-soft); font-size: 10px; }
.dialog-form select { height: 28px; min-width: 0; padding: 0 7px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg-raised); color: var(--text); font-size: 10px; }
.dialog-form .dialog-check { display: flex; gap: 7px; }
.dialog-check input { accent-color: var(--cyan); }
.command-palette { padding: 10px; }
.command-palette-input { height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #6685a0; border-radius: 2px; background: #202327; color: var(--text-muted); }
.command-palette-input input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.command-palette-list { max-height: 330px; margin-top: 7px; overflow: auto; border: 1px solid var(--line-soft); }
.command-palette-list button { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 5px 9px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.command-palette-list button:last-child { border-bottom: 0; }
.command-palette-list button:hover, .command-palette-list button:focus { outline: 0; background: var(--cyan-soft); }
.command-palette-list strong, .command-palette-list small { display: block; }
.command-palette-list strong { font-size: 10px; font-weight: 600; }
.command-palette-list small { margin-top: 3px; color: var(--text-muted); font-size: 8px; }
.command-palette-list kbd { color: var(--text-muted); font-size: 9px; }
.command-palette-empty { padding: 22px 9px; color: var(--text-muted); font-size: 10px; text-align: center; }
.macro-dialog { padding: 18px 14px; }
.macro-status { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 10px; }
.macro-dialog p { margin: 12px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.55; }
.dialog-warning { display: flex; align-items: flex-start; gap: 9px; padding: 20px 14px; color: var(--amber); font-size: 10px; line-height: 1.5; }
.dialog-warning svg { flex: 0 0 auto; }
.button-danger { border-color: var(--red); background: var(--red); color: #281112; }
.button-danger:hover { border-color: #f29a97; background: #f29a97; }
.tree-context-menu { position: fixed; z-index: 90; width: 214px; display: grid; padding: 4px; border: 1px solid #666b72; border-radius: 2px; background: #303338; box-shadow: 0 9px 24px rgba(0, 0, 0, .48); }
.tree-context-menu button { min-height: 27px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 0 7px; border: 0; border-radius: 2px; background: transparent; color: var(--text-soft); text-align: left; font-size: 10px; cursor: pointer; }
.tree-context-menu button:hover, .tree-context-menu button:focus { outline: 0; background: var(--bg-hover); color: var(--text); }
.tree-context-menu button.is-danger { color: var(--red); }
.tree-context-menu kbd { color: var(--text-muted); font-size: 8px; }
.context-separator-line { height: 1px; margin: 3px 5px; background: var(--line-soft); }

.workspace-page { height: calc(100vh - 34px); min-height: 600px; background: #25282c; }
.standard-toolbar { height: 38px; gap: 3px; padding: 0 7px; background: #303338; box-shadow: inset 0 -1px rgba(0, 0, 0, .18); }
.workbench-picker { height: 28px; min-width: 167px; gap: 6px; padding: 0 6px 0 8px; border-color: #586a7b; border-radius: 2px; background: #343a41; color: var(--cyan); }
.workbench-picker select { min-width: 112px; font-size: 11px; }
.toolbar-status { padding: 0 7px; }
.workbench-commandbar { height: 53px; flex: 0 0 53px; display: flex; align-items: stretch; gap: 0; padding: 2px 5px 0; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); background: #292c30; }
.command-tool-group { height: 49px; flex: 0 0 auto; display: grid; grid-template-rows: 31px 14px; align-items: center; padding: 1px 5px 0; border-right: 1px solid var(--line-soft); }
.command-tool-group:last-child { border-right: 0; }
.command-tool-buttons { display: flex; align-items: center; gap: 1px; }
.command-tool-buttons button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--text-soft); cursor: pointer; }
.command-tool-buttons button:hover:not(:disabled) { color: #fff; border-color: #60666e; background: var(--bg-hover); }
.command-tool-buttons button:active:not(:disabled) { background: var(--cyan-soft); color: var(--cyan); }
.command-tool-buttons button:disabled { opacity: .28; cursor: not-allowed; }
.command-tool-label { max-width: 180px; overflow: hidden; color: var(--text-muted); font-size: 8px; line-height: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.document-tabs { height: 32px; padding: 0 6px; background: #202225; }
.doc-tab { height: 29px; border-radius: 2px 2px 0 0; }
.document-meta { padding-bottom: 7px; }
.workspace-content { grid-template-columns: 310px minmax(0, 1fr) 238px; background: #202225; }
.workspace-content.combo-collapsed { grid-template-columns: minmax(0, 1fr) 238px; }
.workspace-content.selection-collapsed { grid-template-columns: 310px minmax(0, 1fr); }
.workspace-content.combo-collapsed.selection-collapsed { grid-template-columns: minmax(0, 1fr); }
.left-panel, .right-panel { background: #303338; }
.panel-tabs { height: 32px; background: #292c30; }
.panel-tabs button { padding: 0 10px; font-size: 10px; }
.combo-model { height: calc(100% - 32px); }
.combo-panel > .task-panel { height: calc(100% - 32px); }
.combo-panel > .task-panel .task-actions-top { position: sticky; top: 0; z-index: 2; background: #292c30; }
.tree-toolbar { padding: 7px 7px 5px; }
.tree-search { height: 25px; border-radius: 2px; }
.tree-document-row, .tree-row { min-height: 25px; height: 25px; }
.tree-footer { padding: 8px 10px 9px; }
.combo-property { min-height: 200px; }
.combo-property .property-heading { min-height: 48px; padding: 8px 9px 6px; }
.property-heading h2 { margin-top: 3px; font-size: 12px; }
.property-tabs { height: 28px; }
.combo-property .properties-scroll { max-height: calc(100% - 76px); }
.property-group { padding: 0 8px 7px; }
.property-group-title { padding: 8px 0 5px; }
.property-row { min-height: 25px; }
.task-actions-top { justify-content: flex-start; padding: 7px 8px; }
.task-actions-top .button { min-height: 27px; min-width: 64px; }
.task-header { padding: 10px 9px; }
.task-body { padding: 11px 9px 18px; }
.task-step { padding-bottom: 11px; margin-bottom: 12px; }
.field-label { margin-bottom: 11px; }
.field-input { height: 27px; margin-top: 4px; border-radius: 2px; }
.viewport-region { background: #181a1d; }
.viewport-header { height: 34px; padding: 0 8px; background: rgba(40, 43, 47, .93); }
.viewport-title { flex-direction: row; align-items: center; gap: 8px; }
.viewport-title .eyebrow { padding-right: 8px; border-right: 1px solid var(--line); }
.viewport-actions .icon-button { width: 27px; height: 27px; }
.viewport-grid { cursor: default; }
.three-viewport-host { pointer-events: auto; }
.three-viewport-host canvas { cursor: default; }
.view-chip { background: rgba(41, 44, 48, .9); border-color: #555a61; border-radius: 2px; }

.selection-panel { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid var(--line); }
.selection-panel-title { min-height: 51px; display: flex; align-items: flex-start; justify-content: space-between; padding: 9px 8px 7px; border-bottom: 1px solid var(--line); background: #292c30; }
.selection-panel-title h2 { max-width: 165px; margin: 4px 0 0; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.selection-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 18px; color: var(--text-muted); text-align: center; }
.selection-empty span { color: var(--text-soft); font-size: 11px; }
.selection-empty small { font-size: 9px; line-height: 1.45; }
.selection-content { min-height: 0; display: flex; flex: 1; flex-direction: column; overflow: auto; padding-bottom: 9px; }
.selection-summary { display: flex; align-items: center; gap: 8px; padding: 10px 9px; border-bottom: 1px solid var(--line-soft); }
.selection-object-icon { width: 29px; height: 29px; display: grid; flex: 0 0 29px; place-items: center; border: 1px solid #52779b; border-radius: 2px; background: var(--cyan-soft); color: var(--cyan); }
.selection-summary strong, .selection-summary span { display: block; max-width: 172px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-summary strong { font-size: 10px; }
.selection-summary span { margin-top: 3px; color: var(--text-muted); font-size: 9px; }
.selection-table { display: grid; padding: 5px 9px; }
.selection-table > div { min-height: 25px; display: grid; grid-template-columns: 43% 57%; align-items: center; border-bottom: 1px solid var(--line-soft); font-size: 9px; }
.selection-table span { color: var(--text-muted); }
.selection-table strong { min-width: 0; overflow: hidden; color: var(--text-soft); font-weight: 500; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.selection-section-title { padding: 9px 9px 5px; color: var(--text-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.selection-elements { display: grid; gap: 2px; padding: 0 6px; }
.selection-elements button { min-height: 25px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 2px; background: transparent; color: var(--text-soft); font-size: 9px; cursor: pointer; }
.selection-elements button:hover { background: var(--bg-hover); color: var(--text); }
.selection-elements small { color: var(--text-muted); }
.selection-no-elements { padding: 10px 4px; color: var(--text-muted); font-size: 9px; }
.selection-clear { margin: auto 8px 0; min-height: 27px; font-size: 9px; }
.bottom-drawer { height: 31px; background: #303338; }
.bottom-drawer.is-open { height: 108px; }
.bottom-drawer-header { height: 30px; }
.bottom-drawer-content { padding: 4px 9px 7px; }
.report-line { min-height: 27px; }
.freecad-statusbar { height: 22px; flex: 0 0 22px; display: flex; align-items: center; gap: 13px; padding: 0 8px; border-top: 1px solid #151719; background: #292c30; color: var(--text-muted); font-size: 9px; }
.freecad-statusbar > span:not(.status-message):not(.status-spacer):not(.status-ready) { padding-left: 10px; border-left: 1px solid var(--line-soft); }

/* FreeCAD CAM workbench */
.menu-popover-cam { width: 256px; max-height: min(72vh, 650px); overflow-y: auto; }
.menu-popover .menu-group-start { position: relative; height: auto; min-height: 48px; margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.menu-popover .menu-group-start:first-child { margin-top: 0; border-top: 0; }
.menu-section-label { position: absolute; top: 5px; left: 9px; color: var(--text-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.cam-job-panel { height: calc(100% - 32px); min-height: 0; display: grid; grid-template-rows: minmax(180px, 1fr) minmax(150px, .72fr); }
.cam-tree { min-height: 0; padding: 5px 4px 10px; overflow: auto; border-bottom: 1px solid var(--line); }
.cam-tree-row { width: 100%; min-height: 25px; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; align-items: center; gap: 4px; padding: 2px 5px; border: 0; border-radius: 2px; background: transparent; color: var(--text-soft); text-align: left; font-size: 10px; cursor: pointer; }
.cam-tree-row:hover, .cam-tree-row.is-selected { background: var(--bg-hover); color: var(--text); }
.cam-tree-row.is-selected { outline: 1px solid #4c6c72; outline-offset: -1px; }
.cam-tree-row > small { max-width: 92px; overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.cam-tree-children { padding-left: 12px; }
.cam-tree-group { min-height: 23px; display: flex; align-items: center; justify-content: space-between; margin-top: 3px; padding: 0 6px; color: var(--text-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.cam-tree-group > span { display: flex; align-items: center; gap: 5px; }
.cam-tree-group > small { min-width: 18px; text-align: right; }
.cam-state { padding: 1px 4px; border-radius: 2px; color: var(--text-muted); background: #24272b; font-size: 7px; text-transform: uppercase; }
.cam-state.generated, .cam-state.pass { color: var(--green); }
.cam-state.collision, .cam-state.error { color: var(--red); }
.cam-state.draft, .cam-state.warning { color: var(--amber); }
.cam-tree-empty { display: grid; gap: 7px; justify-items: start; margin: 8px 20px; color: var(--text-muted); font-size: 9px; }
.cam-tree-empty button { border: 0; background: transparent; color: var(--cyan); font-size: 9px; cursor: pointer; }
.cam-property-view { min-height: 0; overflow: auto; background: #292c30; }
.cam-property-title { min-height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 9px; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.cam-property-title button { width: 23px; height: 23px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.cam-property-row { min-height: 25px; display: grid; grid-template-columns: minmax(82px, .85fr) minmax(0, 1.15fr); border-bottom: 1px solid #34383d; font-size: 9px; }
.cam-property-row > span, .cam-property-row > strong { min-width: 0; display: flex; align-items: center; padding: 4px 7px; overflow-wrap: anywhere; }
.cam-property-row > span { color: var(--text-muted); border-right: 1px solid #34383d; }
.cam-property-row > strong { color: var(--text-soft); font-weight: 500; }
.cam-task-panel .task-header { position: sticky; top: 0; z-index: 1; background: var(--bg-panel); }
.cam-task-summary { display: grid; gap: 5px; margin-bottom: 14px; padding: 8px 9px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-muted); font-size: 9px; }
.cam-task-summary strong { color: var(--text); font-size: 11px; }
.cam-task-command { width: 100%; justify-content: flex-start; margin-bottom: 6px; }
.cam-task-section { margin: 17px 0 10px; padding: 5px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-soft); color: var(--text); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.cam-tool-json-label { align-items: start; }
.cam-tool-json { min-height: 130px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; line-height: 1.35; }
.legend-swatch.toolpath { background: #ffd05a; box-shadow: 0 0 0 1px rgba(255, 208, 90, .25); }
.status-ready { display: flex; align-items: center; gap: 6px; color: var(--text-soft); }
.status-ready .status-pulse { width: 5px; height: 5px; }
.status-message { color: var(--text-soft); }
.status-spacer { flex: 1; }

@media (max-width: 1180px) {
  .topbar-context, .command-search { display: none; }
  .topbar-spacer { flex: 1; }
}

@media (max-width: 1050px) {
  .brand-lockup { min-width: 152px; }
  .workspace-content { grid-template-columns: 260px minmax(0, 1fr) 205px; }
  .workspace-content.combo-collapsed { grid-template-columns: minmax(0, 1fr) 205px; }
  .workspace-content.selection-collapsed { grid-template-columns: 260px minmax(0, 1fr); }
  .workspace-content.combo-collapsed.selection-collapsed { grid-template-columns: minmax(0, 1fr); }
  .selection-panel-title h2, .selection-summary strong, .selection-summary span { max-width: 140px; }
}

@media (max-width: 780px) {
  .topbar { height: 40px; }
  .brand-lockup { min-width: 0; border-right: 0; padding-right: 0; }
  .brand-name { display: none; }
  .page-shell { min-height: calc(100vh - 40px); }
  .workspace-page { height: auto; min-height: calc(100vh - 40px); }
  .workbench-commandbar { height: 48px; flex-basis: 48px; }
  .command-tool-group { height: 44px; grid-template-rows: 31px 10px; }
  .command-tool-label { display: none; }
  .workspace-content, .workspace-content.combo-collapsed, .workspace-content.selection-collapsed, .workspace-content.combo-collapsed.selection-collapsed { display: flex; grid-template-columns: none; }
  .combo-panel { min-height: 520px; max-height: 620px; order: 2; }
  .selection-panel { min-height: 245px; max-height: 310px; order: 3; border-left: 0; border-bottom: 1px solid var(--line); }
  .selection-panel-title h2, .selection-summary strong, .selection-summary span { max-width: calc(100vw - 100px); }
  .freecad-statusbar { position: sticky; bottom: 0; z-index: 8; }
  .freecad-statusbar > span:nth-last-child(-n + 2) { display: none; }
}
