:root {
  --graphite: #171c22;
  --graphite-2: #20272e;
  --ink: #15191e;
  --muted: #6f7479;
  --canvas: #f4f2ed;
  --panel: #fffdfa;
  --line: #d9d6cf;
  --line-dark: #c5c1b9;
  --orange: #ff5a16;
  --orange-dark: #e84b0d;
  --cyan: #12a9c7;
  --green: #347f2e;
  --red: #d52b2f;
  --amber: #d98a00;
  --sidebar-width: 176px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--sans); font-size: 14px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.04; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -.015em; }
p { margin-bottom: 0; color: var(--muted); }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Application shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 40; display: flex; flex-direction: column; height: 100vh; overflow: hidden; color: #eef1f3; background: var(--graphite); }
.wordmark { display: flex; align-items: baseline; height: 96px; padding: 27px 26px; color: #f7f8f8; font-size: 29px; font-weight: 800; letter-spacing: -.07em; }
.wordmark span { font-weight: 750; }.wordmark b { color: var(--orange); font-weight: 850; }
.sidebar-nav { display: grid; }
.sidebar-nav a { position: relative; display: flex; align-items: center; gap: 15px; min-height: 74px; padding: 14px 20px 14px 25px; color: #c7cdd1; border-top: 1px solid rgba(255,255,255,.035); font-size: 13px; line-height: 1.24; }
.sidebar-nav a::before { position: absolute; inset: 0 auto 0 0; width: 5px; content: ""; background: transparent; }
.sidebar-nav a:hover { color: white; background: rgba(255,255,255,.045); }
.sidebar-nav a.active { color: white; background: var(--graphite-2); }
.sidebar-nav a.active::before { background: var(--orange); }
.sidebar-nav .icon { width: 23px; height: 23px; }
.sidebar-illustration { position: relative; height: 160px; margin-top: auto; opacity: .25; transform: skewY(-17deg); }
.sidebar-illustration::before { position: absolute; right: -26px; bottom: 18px; width: 155px; height: 68px; content: ""; border: 1px solid #dbe1e4; }
.sidebar-illustration span { position: absolute; right: -10px; width: 142px; height: 1px; background: #dbe1e4; }
.sidebar-illustration span:nth-child(1) { bottom: 35px; }.sidebar-illustration span:nth-child(2) { bottom: 48px; }.sidebar-illustration span:nth-child(3) { bottom: 61px; }.sidebar-illustration span:nth-child(4) { bottom: 74px; }.sidebar-illustration span:nth-child(5) { bottom: 87px; }
.sidebar-footer { display: grid; gap: 8px; padding: 17px 25px 24px; color: #89929a; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-footer span { display: flex; align-items: center; gap: 7px; font-size: 11px; }.sidebar-footer i, .local-badge i, .action-dock > span i, .privacy-note i { width: 7px; height: 7px; border-radius: 50%; background: #5bb451; box-shadow: 0 0 0 3px rgba(91,180,81,.13); }
.sidebar-footer form { margin-top: 4px; }
.sidebar-footer button { display: flex; align-items: center; gap: 7px; width: 100%; padding: 7px 0; color: #aeb6bc; border: 0; background: transparent; cursor: pointer; font-size: 11px; text-align: left; }
.sidebar-footer button:hover { color: white; }.sidebar-footer button .icon { width: 15px; height: 15px; }
.app-main { min-width: 0; }
.mobile-header { display: none; }
.workspace { width: min(100%, 1700px); margin: 0 auto; padding: 34px 42px 62px; }

/* Shared page building blocks */
.screen-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.screen-header p strong { color: var(--ink); font-weight: 650; }
.compact-header { margin-top: 27px; }
.section-kicker { display: block; margin-bottom: 7px; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.header-tools, .header-actions { display: flex; align-items: center; gap: 10px; }
.local-badge { display: flex; align-items: center; gap: 9px; padding: 9px 12px; color: #62696e; border: 1px solid var(--line); background: rgba(255,255,255,.5); font-size: 11px; }
.square-button { display: grid; place-items: center; width: 42px; height: 42px; color: #5e6469; border: 1px solid var(--line); background: var(--panel); }
.square-button:hover { color: var(--orange); border-color: #f4a07d; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(28,31,34,.025); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.panel-heading > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.panel-index { display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 6px; color: var(--orange); border: 1px solid #ffc1a6; background: #fff5ef; font: 700 10px var(--mono); }
.panel-index.cyan { color: #087f97; border-color: #a1deea; background: #effbfc; }
.panel-index.alert { color: white; border-color: var(--red); background: var(--red); }
.panel-count, .panel-note { color: var(--muted); font-size: 11px; }.panel-count { font-family: var(--mono); }
.format-chip, .experimental-chip { padding: 5px 8px; color: #74797d; border: 1px solid var(--line); background: #f6f5f1; font: 700 10px var(--mono); }
.experimental-chip { color: #8e5d00; border-color: #e9cc8b; background: #fff7e5; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 17px; color: var(--ink); border: 1px solid transparent; border-radius: 2px; background: transparent; cursor: pointer; font-weight: 700; font-size: 13px; transition: color .15s, border-color .15s, background .15s; }
.button .icon { width: 18px; height: 18px; }.button.primary { color: white; background: var(--orange); border-color: var(--orange); }.button.primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }.button.secondary { color: #33393e; background: var(--panel); border-color: var(--line-dark); }.button.secondary:hover { color: var(--orange); border-color: var(--orange); }.button.danger { color: #a01d22; background: #fff8f8; border-color: #e6b7b8; }.button.danger:hover { color: white; background: var(--red); border-color: var(--red); }.button:disabled { opacity: .55; cursor: wait; }.button.wide { width: 100%; }.button.large { min-height: 48px; padding-inline: 23px; }.button.small { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--orange); font-size: 12px; font-weight: 700; }.text-link .icon, .row-actions a .icon { width: 15px; height: 15px; }
.section-panel { margin-top: 22px; }.section-panel > .table-scroll { max-height: 620px; }

/* Workflow */
.workflow { display: grid; grid-template-columns: auto minmax(35px,1fr) auto minmax(35px,1fr) auto; align-items: center; width: min(760px, 100%); margin: 0 auto 20px; color: #8b8e91; }
.workflow span { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 650; }.workflow span b { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #aaa; border-radius: 50%; font: 700 11px var(--mono); }.workflow span b .icon { width: 15px; }.workflow > i { height: 1px; margin: 0 13px; background: #bbb; }.workflow span.active { color: var(--ink); }.workflow span.active b { color: white; border-color: var(--cyan); background: var(--cyan); }.workflow span.done { color: #3f747c; }.workflow span.done b { color: white; border-color: #3f747c; background: #3f747c; }.workflow > i.done { background: #3f747c; }

/* Dashboard */
.dashboard-lead-grid { display: grid; grid-template-columns: minmax(340px, .83fr) minmax(500px, 1.17fr); gap: 14px; }
.new-calculation-panel, .layout-preview-panel { min-height: 430px; }
.dashboard-upload { display: flex; flex-direction: column; gap: 13px; height: calc(100% - 58px); padding: 18px; }
.dashboard-upload > input, .compact-upload > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dashboard-upload label { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; min-height: 250px; padding: 25px; text-align: center; border: 1px dashed #bfc0bd; background: #faf9f5; cursor: pointer; }
.dashboard-upload label:hover, .dashboard-upload.dragging label { border-color: var(--orange); background: #fff8f3; }
.dashboard-upload label strong { margin-top: 16px; font-size: 17px; }.dashboard-upload label > span:last-child { margin-top: 6px; color: var(--muted); font-size: 12px; }
.file-symbol { position: relative; display: grid; place-items: center; width: 72px; height: 68px; color: #96999b; }.file-symbol .icon { width: 56px; height: 56px; stroke-width: 1.25; }.file-symbol b { position: absolute; right: 1px; bottom: 5px; display: grid; place-items: center; width: 28px; height: 28px; color: white; background: #2d8b35; font-size: 18px; }.file-symbol.pdf b { background: #c73b32; }
.layout-preview-panel { display: flex; flex-direction: column; }.board-spec { font: 600 11px var(--mono); }.board-spec small { padding: 3px 5px; color: #70757a; border: 1px solid var(--line); background: #f4f3ef; }
.demo-layout { display: block; flex: 1; width: calc(100% - 38px); height: auto; margin: 18px 19px 20px; }.demo-board { fill: #f8f8f5; stroke: #6e7375; stroke-width: 2; }.demo-part rect { stroke: #fdfcf8; stroke-width: 3; }.demo-part text, .demo-waste text { fill: #161a1e; font: 700 18px var(--mono); }.demo-part text + text, .demo-waste text + text { font-size: 13px; font-weight: 500; }.demo-part.blue rect { fill: #93d4e3; }.demo-part.green rect { fill: #c8dba4; }.demo-part.yellow rect { fill: #f5d17d; }.demo-part.orange rect { fill: #f2ae7c; }.demo-part.violet rect { fill: #d1c5df; }.demo-part.neutral rect { fill: #e4e0d6; }.demo-waste rect { fill: #f2f2ed; stroke: #8d9292; stroke-width: 2; stroke-dasharray: 7 5; }
.recent-panel { margin-top: 14px; }.dashboard-table { max-height: 360px; }.file-name { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 14px; }.dashboard-stats article { display: flex; align-items: center; gap: 15px; min-height: 92px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); }.dashboard-stats article > .icon { width: 35px; height: 35px; color: var(--cyan); stroke-width: 1.3; }.dashboard-stats article div { display: grid; }.dashboard-stats article span { color: #575d62; font-size: 11px; }.dashboard-stats article strong { color: var(--cyan); font: 500 28px var(--mono); }.dashboard-stats article.good > .icon, .dashboard-stats article.good strong { color: var(--green); }.dashboard-stats article.attention > .icon, .dashboard-stats article.attention strong { color: var(--orange); }

/* Imports and catalogs */
.catalog-lead-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 14px; }.compact-upload { display: flex; align-items: center; gap: 16px; min-height: 150px; padding: 24px; }.compact-upload label { display: flex; flex: 1; align-items: center; gap: 17px; cursor: pointer; }.compact-upload label > span:last-child { display: grid; gap: 4px; }.compact-upload small { color: var(--muted); }.catalog-state-panel { display: grid; grid-template-columns: 1fr; }.catalog-total { display: flex; align-items: center; gap: 16px; padding: 22px; }.catalog-total > span { display: grid; place-items: center; width: 53px; height: 53px; color: var(--cyan); border: 1px solid #a5dbe5; background: #effbfc; }.catalog-total .icon { width: 29px; height: 29px; }.catalog-total strong { font: 500 38px var(--mono); }.catalog-total p { font-size: 11px; }.import-meta { display: grid; gap: 3px; padding: 14px 22px 20px; border-top: 1px solid var(--line); }.import-meta span, .import-meta small { color: var(--muted); font-size: 10px; }.import-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.catalog-table { max-height: 680px; }
.import-layout { display: grid; grid-template-columns: minmax(500px, 1.45fr) minmax(290px, .55fr); gap: 14px; max-width: 1200px; margin: 20px auto 0; }.order-import-panel { min-height: 520px; }.large-upload { min-height: 460px; }.import-help { align-self: start; }.check-list { display: grid; gap: 0; margin: 0; padding: 5px 22px 12px; list-style: none; }.check-list li { display: flex; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--line); }.check-list li:last-child { border-bottom: 0; }.check-list li > span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--green); border: 1px solid #b5d3b1; background: #f2f8f0; }.check-list li > span .icon { width: 17px; }.check-list li div { display: grid; gap: 3px; }.check-list small { color: var(--muted); }.privacy-note { display: flex; align-items: center; gap: 10px; margin: 0 22px 22px; padding: 13px; color: #53605f; background: #f1f5f2; font-size: 11px; }

/* Tables and inputs */
.table-scroll { width: 100%; overflow: auto; } table { width: 100%; border-collapse: collapse; font-size: 12px; } th { position: sticky; top: 0; z-index: 2; height: 43px; color: #666c70; background: #f3f2ee; font-size: 9px; font-weight: 800; letter-spacing: .085em; text-align: left; text-transform: uppercase; white-space: nowrap; } th, td { padding: 11px 14px; border-right: 1px solid #e6e3dd; border-bottom: 1px solid #e6e3dd; vertical-align: middle; } th:last-child, td:last-child { border-right: 0; } tr:last-child td { border-bottom: 0; } tbody tr:hover > td { background: #fbfaf6; } td small { display: block; color: var(--muted); font-size: 9px; }.empty-cell, .placeholder-row td { padding: 40px 18px; color: var(--muted); text-align: center; }.price { color: var(--orange); font-weight: 700; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }.row-actions a { display: inline-flex; align-items: center; gap: 4px; color: var(--orange); font-weight: 700; }.icon-button { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--red); border: 1px solid #e6b7b8; background: #fff8f8; cursor: pointer; }.icon-button .icon { width: 15px; }.icon-button.ghost-danger { color: #8a8d8f; border-color: transparent; background: transparent; }.icon-button.ghost-danger:hover { color: var(--red); border-color: #e6b7b8; background: #fff8f8; }
input { width: 100%; min-width: 70px; height: 36px; padding: 7px 9px; color: var(--ink); border: 1px solid #cecac3; border-radius: 2px; outline: none; background: #fff; font-family: var(--mono); font-size: 11px; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(18,169,199,.13); }.compact th, .compact td { padding: 8px; }.editor-table input { min-width: 84px; }.editor-table td:first-child input { min-width: 112px; }.editor-table input[type=checkbox], input[type=checkbox] { width: 17px; min-width: 17px; height: 17px; accent-color: var(--orange); }.check { text-align: center; }.check input { margin: 0 auto; }.detail-table { max-height: 650px; }.detail-table td:first-child { min-width: 58px; }.detail-table td:last-child input { min-width: 130px; }

/* Review */
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; background: var(--panel); border: 1px solid var(--line); }.summary-strip article { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 67px; padding: 16px 20px; border-right: 1px solid var(--line); }.summary-strip article:last-child { border-right: 0; }.summary-strip span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }.summary-strip strong { font: 600 23px var(--mono); }.summary-strip strong small { color: var(--muted); font-size: 11px; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }.review-main { display: grid; gap: 14px; min-width: 0; }.materials-panel, .settings-panel { min-width: 0; }.materials-panel .table-scroll { max-height: 430px; }.issues-panel { position: sticky; top: 18px; overflow: hidden; }.issue-total { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; color: white; background: var(--red); font: 700 13px var(--mono); }.issues-list { max-height: 480px; overflow: auto; padding: 8px; }.notice { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 6px; padding: 11px 12px; border-left: 3px solid #9ca2a4; background: #f4f4f1; font-size: 11px; }.notice:last-child { margin-bottom: 0; }.notice > b { min-width: 70px; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }.notice > span { flex: 1; }.notice.error { color: #8d161a; border-color: var(--red); background: #fff2f2; }.notice.warning { color: #7d5200; border-color: var(--amber); background: #fff8e8; }.notice.info { color: #136675; border-color: var(--cyan); background: #effbfc; }.notice.success { color: #256a20; border-color: var(--green); background: #f1f8ef; }.notice.banner { align-items: center; margin: 0 0 10px; padding: 14px 16px; font-size: 12px; }.notice-location { flex: 0 0 auto; padding: 4px 6px; color: currentColor; border: 1px solid currentColor; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }.issues-help { display: flex; gap: 10px; padding: 13px 15px; color: var(--muted); border-top: 1px solid var(--line); background: #f6f5f1; font-size: 10px; }.issues-help .icon { width: 16px; color: var(--orange); }
.settings-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; padding: 18px 20px 22px; }.settings-row label { display: grid; gap: 6px; color: #60666a; font-size: 10px; font-weight: 700; }.unit-input { display: grid; grid-template-columns: minmax(0,1fr) auto; }.unit-input input { border-right: 0; }.unit-input b { display: grid; place-items: center; min-width: 42px; padding: 0 8px; color: #73787b; border: 1px solid #cecac3; background: #f3f2ee; font: 600 10px var(--mono); }.remnants-panel .table-scroll { max-height: 260px; }
.notice-action { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 32px; padding: 6px 9px; color: #745000; border: 1px solid currentColor; background: rgba(255,255,255,.48); font-size: 10px; font-weight: 800; white-space: nowrap; }
.notice-action:hover { color: var(--orange-dark); background: white; }.notice-action .icon { width: 15px; height: 15px; }
.action-dock { position: sticky; bottom: 14px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 11px 14px 11px 18px; background: rgba(23,28,34,.96); box-shadow: 0 10px 35px rgba(18,21,24,.2); }.action-dock > span { display: flex; align-items: center; gap: 9px; color: #b8c0c5; font-size: 10px; }.action-dock > div { display: flex; gap: 8px; }.action-dock .button.secondary { color: white; border-color: #555d64; background: #272e35; }
.field-error { border-color: var(--red) !important; background: #fff7f7 !important; box-shadow: inset 3px 0 0 var(--red), 0 0 0 1px rgba(213,43,47,.16) !important; cursor: help; }.field-warning { border-color: var(--amber) !important; background: #fffaf0 !important; box-shadow: inset 3px 0 0 var(--amber), 0 0 0 1px rgba(217,138,0,.14) !important; cursor: help; }.row-has-error > td:first-child { box-shadow: inset 4px 0 0 var(--red); }.row-has-warning > td:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.validation-tooltip { position: fixed; z-index: 120; display: grid; gap: 5px; max-width: 360px; padding: 12px 14px; color: white; background: rgba(23,28,34,.98); border: 1px solid #4e555a; box-shadow: 0 10px 30px rgba(0,0,0,.25); pointer-events: none; white-space: pre-line; }.validation-tooltip::before { position: absolute; top: -6px; left: 18px; width: 10px; height: 10px; content: ""; background: inherit; border-top: 1px solid #4e555a; border-left: 1px solid #4e555a; transform: rotate(45deg); }.validation-tooltip[hidden] { display: none; }.validation-tooltip strong { color: #ff9da0; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }.validation-tooltip.warning strong { color: #ffd080; }.validation-tooltip span { font-size: 12px; line-height: 1.45; }

/* Results */
.result-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }.result-summary article { display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 15px 18px; background: var(--panel); border: 1px solid var(--line); }.summary-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--orange); border: 1px solid #ffc1a6; background: #fff5ef; }.summary-icon.cyan { color: var(--cyan); border-color: #a1deea; background: #effbfc; }.summary-icon .icon { width: 24px; height: 24px; }.result-summary article div { display: grid; }.result-summary small { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }.result-summary strong { margin-top: 3px; font: 600 23px var(--mono); }.result-summary .primary-total { color: white; background: var(--graphite); border-color: var(--graphite); }.primary-total .summary-icon { color: white; border-color: var(--orange); background: var(--orange); }.primary-total small { color: #aeb6bc; }
.material-workspace { margin-bottom: 18px; }.material-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 14px 20px; border-bottom: 1px solid var(--line); }.material-heading > div:first-child { display: flex; align-items: center; gap: 13px; }.material-heading h2 { font: 700 20px var(--mono); }.material-heading p { font-size: 11px; }.material-swatch { width: 9px; height: 48px; }.material-heading-stats { display: flex; gap: 22px; color: var(--muted); font-size: 11px; }.material-heading-stats b { color: var(--ink); font: 600 17px var(--mono); }.material-content { display: grid; grid-template-columns: minmax(0,1fr) 285px; }.boards-stack { min-width: 0; border-right: 1px solid var(--line); }.layout-card { border-bottom: 1px solid var(--line); }.layout-card:last-child { border-bottom: 0; }.layout-head, .layout-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 16px; }.layout-head { background: #f5f4f0; }.layout-head > div { display: flex; align-items: center; gap: 8px; }.layout-head > span, .layout-foot { color: var(--muted); font-size: 10px; }.layout-number { display: grid; place-items: center; width: 25px; height: 25px; color: var(--cyan); border: 1px solid #9ad8e3; background: #effbfc; font: 700 9px var(--mono); }.sheet-frame { padding: 16px; background: #eceae4; }.sheet-svg { display: block; width: 100%; max-height: 470px; background: #e2e0d9; }.sheet-bg { fill: #e2e0d9; stroke: #606569; stroke-width: 5; }.part { stroke: #fffdfa; stroke-width: 5; }.part-0 { fill: #82cadd; }.part-1 { fill: #f1a36f; }.part-2 { fill: #f1ce78; }.part-3 { fill: #c8d99f; }.part-4 { fill: #d0c4df; }.part-5 { fill: #d7d1c3; }.sheet-svg text { fill: #15191e; font: 800 30px var(--mono); paint-order: stroke; stroke: rgba(255,255,255,.35); stroke-width: 2px; }.sheet-object { cursor: help; }.sheet-object:focus { outline: none; }.part-group:hover .part, .part-group:focus .part { filter: brightness(1.04); stroke: var(--graphite); stroke-width: 8; }.leftover { fill: #f7f6f1; stroke: #777c7d; stroke-width: 4; stroke-dasharray: 14 10; }.leftover-group:hover .leftover, .leftover-group:focus .leftover { fill: white; stroke: var(--orange); stroke-width: 8; }.cut { stroke: #32373a; stroke-width: 3; stroke-dasharray: 11 8; pointer-events: none; }.layout-foot b { color: var(--ink); font-family: var(--mono); }
.material-aside { min-width: 0; background: #f8f7f3; }.aside-section { padding: 20px; border-bottom: 1px solid var(--line); }.cost-list { display: grid; gap: 0; margin: 6px 0 0; }.cost-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #e1ded7; }.cost-list div:last-child { border-bottom: 0; }.cost-list dt { color: var(--muted); }.cost-list dd { margin: 0; font: 600 12px var(--mono); }.edge-mini-list { display: grid; gap: 9px; margin: 10px 0 0; padding: 0; list-style: none; }.edge-mini-list li { display: flex; justify-content: space-between; }.edge-mini-list li span { display: flex; align-items: center; gap: 8px; }.edge-mini-list b { font: 600 11px var(--mono); }.edge-color { width: 12px; height: 12px; background: var(--cyan); }.edge-2 { background: var(--orange); }.edge-3 { background: #8b7bad; }.muted-row { color: var(--muted); font-size: 11px; }.material-aside > .button { width: calc(100% - 40px); margin: 20px; }.edge-summary-panel { margin-top: 0; }
.sheet-tooltip { position: fixed; z-index: 110; display: grid; gap: 4px; min-width: 190px; max-width: 320px; padding: 12px 14px; color: white; background: rgba(23,28,34,.98); border: 1px solid #4e555a; box-shadow: 0 12px 32px rgba(0,0,0,.26); pointer-events: none; }.sheet-tooltip[hidden] { display: none; }.sheet-tooltip strong { color: #ff9365; font-size: 11px; }.sheet-tooltip span { font: 700 14px var(--mono); }.sheet-tooltip small { color: #c2c9cd; font-size: 10px; }.sheet-tooltip .tooltip-note { margin-top: 3px; padding-top: 5px; border-top: 1px solid #4e555a; }

/* Demo access */
.login-screen { min-height: 100vh; color: #edf1f3; background: var(--graphite); }
.login-stage { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 32px; isolation: isolate; }
.login-stage::before { position: absolute; inset: 0; z-index: -3; content: ""; background: radial-gradient(circle at 72% 18%, rgba(18,169,199,.13), transparent 29%), radial-gradient(circle at 23% 78%, rgba(255,90,22,.11), transparent 27%), linear-gradient(145deg, #161b21, #20272e 54%, #171c22); }
.login-stage::after { position: absolute; inset: 0; z-index: -2; content: ""; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.login-blueprint { position: absolute; z-index: -1; top: 50%; left: 50%; width: min(1080px, 92vw); aspect-ratio: 2.05; border: 1px solid rgba(148,160,168,.17); transform: translate(-50%, -50%) rotate(-4deg); }
.login-blueprint::before, .login-blueprint::after { position: absolute; content: ""; border: 1px solid rgba(148,160,168,.13); }
.login-blueprint::before { inset: 10% 7% 14% 15%; }.login-blueprint::after { inset: 26% 23% 5% 35%; border-color: rgba(18,169,199,.18); }
.login-blueprint i { position: absolute; display: block; background: rgba(148,160,168,.13); }
.login-blueprint i:nth-child(1) { top: 0; bottom: 0; left: 29%; width: 1px; }.login-blueprint i:nth-child(2) { top: 0; bottom: 0; left: 68%; width: 1px; }.login-blueprint i:nth-child(3) { top: 37%; right: 0; left: 0; height: 1px; }.login-blueprint i:nth-child(4) { top: 72%; right: 0; left: 0; height: 1px; }.login-blueprint i:nth-child(5) { right: 12%; bottom: -24px; width: 130px; height: 72px; border: 1px dashed rgba(255,90,22,.21); background: transparent; }
.login-modal { position: relative; width: min(470px, 100%); overflow: hidden; color: var(--ink); border: 1px solid #596168; background: var(--panel); box-shadow: 0 32px 100px rgba(0,0,0,.48); animation: optimization-enter .45s cubic-bezier(.2,.8,.2,1); }
.login-modal::before { position: absolute; inset: 0 0 auto; height: 4px; content: ""; background: linear-gradient(90deg, var(--orange) 0 68%, var(--cyan) 68%); }
.login-modal-head { display: flex; align-items: center; justify-content: space-between; min-height: 82px; padding: 4px 28px 0; color: white; background: var(--graphite); border-bottom: 1px solid #3a4248; }
.login-modal-head .wordmark { width: auto; height: auto; padding: 0; font-size: 27px; }
.login-environment { display: flex; align-items: center; gap: 8px; color: #aab2b7; font: 700 9px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.login-environment i { width: 7px; height: 7px; border-radius: 50%; background: #5bb451; box-shadow: 0 0 0 4px rgba(91,180,81,.12); }
.login-modal-body { padding: 36px 38px 40px; }
.login-lock { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 24px; color: var(--orange); border: 1px solid #ffc1a6; background: #fff4ee; }
.login-lock .icon { width: 23px; height: 23px; }
.login-modal-body h1 { margin-bottom: 10px; font-size: 31px; }
.login-modal-body > p { font-size: 12px; }
.login-form { display: grid; gap: 17px; margin-top: 29px; }
.login-form label { display: grid; gap: 7px; color: #555d62; font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.login-form input { width: 100%; height: 48px; padding: 0 13px; color: var(--ink); border: 1px solid #cbc8c1; border-radius: 2px; outline: none; background: #fff; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.login-form input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(18,169,199,.12); }
.login-form .button { width: 100%; margin-top: 6px; }
.login-error { display: flex; align-items: flex-start; gap: 9px; margin: 20px 0 -8px; padding: 11px 12px; color: #941d21; border-left: 3px solid var(--red); background: #fff0f0; font-size: 11px; }
.login-error .icon { width: 17px; height: 17px; flex: 0 0 auto; }.login-error span { padding-top: 1px; }
.login-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 28px; color: #747a7e; border-top: 1px solid var(--line); background: #f3f2ee; font: 700 9px var(--mono); letter-spacing: .04em; }
.login-modal-foot span { display: flex; align-items: center; gap: 8px; text-transform: uppercase; }.login-modal-foot span i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgba(18,169,199,.12); }.login-modal-foot small { font: inherit; }

/* Feedback */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 470px; padding: 14px 18px; color: white; background: var(--graphite); border-left: 4px solid var(--cyan); box-shadow: 0 12px 36px rgba(0,0,0,.22); }.toast.error { border-color: var(--red); }.toast.success { border-color: #5bb451; }.toast[hidden] { display: none; }

/* Optimization progress */
body.optimization-open { overflow: hidden; }
.optimization-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; }
.optimization-modal[hidden] { display: none; }
.optimization-modal-backdrop { position: absolute; inset: 0; background: rgba(17,21,25,.76); backdrop-filter: blur(7px); animation: optimization-fade .25s ease-out; }
.optimization-modal-card { position: relative; width: min(720px, 100%); overflow: hidden; color: var(--ink); border: 1px solid #5a6065; background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.42); animation: optimization-enter .35s cubic-bezier(.2,.8,.2,1); }
.optimization-modal-card::before { position: absolute; inset: 0 0 auto; height: 4px; content: ""; background: linear-gradient(90deg, var(--orange), var(--cyan), var(--orange)); background-size: 200% 100%; animation: optimization-spectrum 2s linear infinite; }
.optimization-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 21px 24px 15px; border-bottom: 1px solid var(--line); }
.optimization-modal-head .section-kicker { margin: 0; }
.optimization-live { display: flex; align-items: center; gap: 8px; color: #4d555a; font: 700 9px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.optimization-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(52,127,46,.13); animation: optimization-pulse 1.25s ease-out infinite; }
.optimization-modal-body { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 30px; padding: 34px; }
.optimization-board { position: relative; display: grid; grid-template-columns: 1.15fr .85fr .62fr; grid-template-rows: 1fr .82fr .5fr; gap: 4px; aspect-ratio: 1.35; padding: 8px; overflow: hidden; border: 2px solid #596066; background: #e7e5df; box-shadow: inset 0 0 0 6px #f7f5ef; }
.optimization-board::before { position: absolute; inset: 0; z-index: 2; content: ""; opacity: .18; background-image: linear-gradient(rgba(21,25,30,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(21,25,30,.22) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.optimization-piece, .optimization-waste { position: relative; z-index: 1; display: grid; place-items: center; color: #20252a; border: 1px solid rgba(255,255,255,.95); font: 800 10px var(--mono); animation: optimization-piece 3.6s ease-in-out infinite; }
.piece-a { grid-column: 1; grid-row: 1; background: #93d4e3; }.piece-b { grid-column: 2; grid-row: 1; background: #f3b082; animation-delay: -.5s; }.piece-c { grid-column: 3; grid-row: 1 / 3; background: #c8dba4; animation-delay: -1s; }.piece-d { grid-column: 1; grid-row: 2; background: #f5d17d; animation-delay: -1.5s; }.piece-e { grid-column: 2; grid-row: 2 / 4; background: #d1c5df; animation-delay: -2s; }.piece-f { grid-column: 1; grid-row: 3; background: #f2ae7c; animation-delay: -2.5s; }
.optimization-waste { grid-column: 3; grid-row: 3; color: #6f7479; border: 1px dashed #7e8486; background: #f7f6f1; font-size: 8px; animation: none; }
.optimization-scan { position: absolute; z-index: 4; top: 4px; bottom: 4px; width: 2px; background: var(--orange); box-shadow: 0 0 12px 2px rgba(255,90,22,.6); animation: optimization-scan 2.7s cubic-bezier(.45,0,.55,1) infinite alternate; }
.optimization-copy { min-width: 0; }
.optimization-step { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 19px; color: var(--orange); border: 1px solid #ffb797; background: #fff4ee; font: 800 10px var(--mono); }
.optimization-copy h2 { margin-bottom: 10px; font-size: 25px; }
.optimization-copy p { min-height: 42px; color: #555d62; font-size: 13px; }
.optimization-copy small { display: block; color: #7d8285; font-size: 10px; line-height: 1.55; }
.optimization-progress { height: 4px; margin: 22px 0 18px; overflow: hidden; background: #e3e0da; }
.optimization-progress span { display: block; width: 40%; height: 100%; background: var(--orange); animation: optimization-progress 1.55s ease-in-out infinite; }
.optimization-confirm-card { width: min(590px, 100%); }
.optimization-confirm-card::before { background: var(--amber); animation: none; }
.optimization-warning-state { padding: 5px 8px; color: #805500; border: 1px solid #e8c56f; background: #fff5d9; font: 700 9px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.optimization-confirm-body { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px 17px; padding: 28px 30px 30px; }
.optimization-warning-symbol { display: grid; grid-row: 1 / 3; place-items: center; width: 48px; height: 48px; color: white; background: var(--amber); font: 800 22px var(--mono); }
.optimization-confirm-body h2 { margin-bottom: 7px; font-size: 24px; }
.optimization-confirm-body p { font-size: 12px; line-height: 1.55; }
.optimization-confirm-issues { grid-column: 1 / -1; display: grid; gap: 0; margin: 20px 0 4px; padding: 0; border: 1px solid #ead7a7; background: #fffaf0; list-style: none; }
.optimization-confirm-issues li { position: relative; padding: 10px 13px 10px 31px; color: #70531c; border-bottom: 1px solid #efe0ba; font-size: 11px; }
.optimization-confirm-issues li:last-child { border-bottom: 0; }.optimization-confirm-issues li::before { position: absolute; top: 14px; left: 14px; width: 5px; height: 5px; content: ""; background: var(--amber); }
.optimization-confirm-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
@keyframes optimization-fade { from { opacity: 0; } }
@keyframes optimization-enter { from { opacity: 0; transform: translateY(18px) scale(.98); } }
@keyframes optimization-spectrum { to { background-position: -200% 0; } }
@keyframes optimization-pulse { 50% { opacity: .42; transform: scale(.72); } }
@keyframes optimization-piece { 0%, 100% { filter: saturate(.82); } 50% { filter: saturate(1.18) brightness(1.05); } }
@keyframes optimization-scan { from { left: 10px; } to { left: calc(100% - 12px); } }
@keyframes optimization-progress { 0% { transform: translateX(-115%); } 100% { transform: translateX(365%); } }

@media (max-width: 1180px) {
  :root { --sidebar-width: 150px; }
  .workspace { padding: 28px 26px 55px; }
  .sidebar-nav a { padding-left: 18px; }
  .dashboard-lead-grid { grid-template-columns: 1fr; }.new-calculation-panel, .layout-preview-panel { min-height: auto; }.dashboard-upload { min-height: 380px; }.review-grid { grid-template-columns: 1fr; }.issues-panel { position: static; }.issues-list { max-height: 320px; }.material-content { grid-template-columns: 1fr; }.boards-stack { border-right: 0; }.material-aside { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }.material-aside > .button { grid-column: 1 / -1; width: auto; }.catalog-lead-grid, .import-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }.sidebar { display: none; }.mobile-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; height: 65px; padding: 0 18px; color: white; background: var(--graphite); }.mobile-header .wordmark { height: auto; padding: 0; font-size: 23px; }.mobile-header nav { display: flex; align-items: center; gap: 14px; font-size: 11px; }.mobile-header nav form { display: flex; }.mobile-header nav button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: #c7cdd1; border: 1px solid #495159; background: transparent; cursor: pointer; }.mobile-header nav button:hover { color: white; border-color: #6a747c; }.mobile-header nav button .icon { width: 16px; height: 16px; }.workspace { padding: 24px 18px 48px; }.screen-header { align-items: flex-start; flex-direction: column; }.header-tools, .header-actions { width: 100%; }.header-actions .button { flex: 1; }.local-badge { display: none; }.dashboard-stats, .result-summary, .summary-strip { grid-template-columns: repeat(2, 1fr); }.summary-strip article:nth-child(2) { border-right: 0; }.summary-strip article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.settings-row { grid-template-columns: repeat(2, 1fr); }.material-heading { align-items: flex-start; flex-direction: column; }.material-aside { grid-template-columns: 1fr; }.material-aside > .button { grid-column: auto; }.workflow { width: 100%; }.compact-upload { align-items: stretch; flex-direction: column; }.compact-upload .button { width: 100%; }.action-dock { position: static; align-items: stretch; flex-direction: column; }.action-dock > div { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  h1 { font-size: 31px; }.mobile-header nav { gap: 9px; }.dashboard-lead-grid { display: block; }.layout-preview-panel, .recent-panel, .dashboard-stats { margin-top: 12px; }.dashboard-stats, .result-summary, .summary-strip { grid-template-columns: 1fr; }.summary-strip article { border-right: 0; border-bottom: 1px solid var(--line); }.summary-strip article:last-child { border-bottom: 0; }.settings-row { grid-template-columns: 1fr; }.workflow { grid-template-columns: auto 1fr auto 1fr auto; }.workflow span { font-size: 0; }.workflow span b { font-size: 10px; }.workflow span.done b .icon { display: block; }.dashboard-upload { min-height: 330px; padding: 12px; }.dashboard-upload label { min-height: 210px; }.panel-heading { padding-inline: 14px; }.panel-note { display: none; }.action-dock > div { grid-template-columns: 1fr; }.header-actions { display: grid; }.demo-part text, .demo-waste text { font-size: 22px; }.demo-part text + text, .demo-waste text + text { display: none; }
  .notice.banner { flex-wrap: wrap; }.notice.banner .notice-action { width: 100%; margin-top: 5px; justify-content: center; }.login-stage { padding: 16px; }.login-modal-head { min-height: 72px; padding-inline: 21px; }.login-environment { max-width: 120px; justify-content: flex-end; text-align: right; }.login-modal-body { padding: 29px 23px 31px; }.login-lock { margin-bottom: 20px; }.login-modal-body h1 { font-size: 27px; }.login-form { margin-top: 24px; }.login-modal-foot { padding-inline: 21px; }
  .optimization-modal { padding: 13px; }.optimization-modal-head { padding: 19px 18px 13px; }.optimization-modal-body { grid-template-columns: 1fr; gap: 22px; padding: 22px 18px 25px; }.optimization-board { width: min(310px, 100%); margin: 0 auto; }.optimization-copy h2 { font-size: 22px; }.optimization-copy p { min-height: 0; }.optimization-confirm-body { grid-template-columns: 39px minmax(0,1fr); padding: 23px 18px 21px; }.optimization-warning-symbol { width: 39px; height: 39px; font-size: 18px; }.optimization-confirm-body h2 { font-size: 20px; }.optimization-confirm-actions { display: grid; grid-template-columns: 1fr; }.optimization-confirm-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .login-modal, .optimization-modal-backdrop, .optimization-modal-card, .optimization-modal-card::before, .optimization-live i, .optimization-piece, .optimization-scan, .optimization-progress span { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
