:root {
  color-scheme: light;
  --ink: #121826;
  --muted: #667085;
  --quiet: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --nav: #101622;
  --nav-soft: #182130;
  --accent: #4f6fff;
  --accent-dark: #3954dc;
  --accent-soft: #eef1ff;
  --success: #12715b;
  --success-soft: #e8f5f0;
  --warning: #9a5b13;
  --warning-soft: #fff3df;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --shadow: 0 14px 40px rgba(16, 24, 40, .08);
  --radius: 18px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: white; font-weight: 850; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px 18px;
  background: var(--nav); color: #f8fafc; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px 26px; }
.brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; box-shadow: 0 8px 24px rgba(79, 111, 255, .28); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 17px; letter-spacing: -.02em; }
.brand-copy small { color: #8f9bad; font-size: 12px; }
.nav-label { margin: 13px 12px 7px; color: #667085; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-item {
  min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 12px;
  background: transparent; color: #9aa6b8; text-align: left; cursor: pointer; transition: 130ms ease;
}
.nav-item:hover { background: rgba(255,255,255,.045); color: #e6eaf0; }
.nav-item.active { background: var(--nav-soft); color: white; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item svg { width: 19px; height: 19px; stroke-width: 1.8; flex: 0 0 auto; }
.nav-item span { font-size: 14px; font-weight: 650; }
.nav-badge { margin-left: auto; min-width: 23px; height: 21px; display: grid; place-items: center; padding: 0 6px; border-radius: 8px; background: #263249; color: #cfd7e6; font-size: 11px; font-weight: 750; }
.nav-item.active .nav-badge { background: var(--accent); color: white; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.logout-button { width: 100%; margin-bottom: 8px; }
.role-card { padding: 13px; border: 1px solid #2a3444; border-radius: 14px; background: #141d2b; }
.role-card > small { display: block; margin-bottom: 8px; color: #7d899b; font-size: 11px; }
.role-switch { width: 100%; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: #0b111b; }
.role-switch button { height: 30px; border: 0; border-radius: 8px; background: transparent; color: #7e8a9c; font-size: 11px; font-weight: 700; cursor: pointer; }
.role-switch button.active { background: #263249; color: white; }

.content-shell { min-width: 0; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.93); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20; }
.mobile-menu { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--quiet); font-size: 13px; }
.breadcrumbs strong { color: var(--ink); font-weight: 700; }
.breadcrumbs svg { width: 14px; }
.user-area { display: flex; align-items: center; gap: 11px; }
.notification-wrap { position: relative; }
.notification-button { position: relative; width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--muted); cursor: pointer; }
.notification-button:hover { border-color: var(--line-strong); color: var(--ink); }
.notification-button svg { width: 19px; }
.notification-button > span { position: absolute; right: -5px; top: -5px; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border: 2px solid white; border-radius: 10px; background: var(--danger); color: white; font-size: 9px; font-weight: 800; }
.notification-panel { position: absolute; z-index: 60; right: 0; top: 49px; width: min(390px, calc(100vw - 32px)); overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 24px 70px rgba(16,24,40,.18); }
.notification-panel > header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.notification-panel > header span { display: grid; }
.notification-panel > header strong { font-size: 14px; }
.notification-panel > header small { margin-top: 2px; color: var(--quiet); font-size: 10px; }
.notification-panel > header button { border: 0; background: transparent; color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; }
.notification-list { max-height: min(520px, calc(100vh - 150px)); overflow-y: auto; }
.notification-item { position: relative; width: 100%; display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 11px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; cursor: pointer; }
.notification-item:hover { background: #f8f9fb; }
.notification-item.unread { background: #f7f8ff; }
.notification-item.unread::before { content: ""; position: absolute; left: 5px; top: 20px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.notification-item > i { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-style: normal; }
.notification-item > i svg { width: 16px; }
.notification-item > span { min-width: 0; }
.notification-item strong, .notification-item small, .notification-item time { display: block; }
.notification-item strong { font-size: 12px; }
.notification-item small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.notification-item time { margin-top: 5px; color: var(--quiet); font-size: 9px; }
.notification-empty { padding: 28px 18px; color: var(--quiet); font-size: 12px; text-align: center; }
.user-meta { display: grid; justify-items: end; line-height: 1.2; }
.user-meta strong { font-size: 13px; }
.user-meta small { color: var(--muted); font-size: 11px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #e9ecf5; color: #303b54; font-size: 12px; font-weight: 800; }
.main { max-width: 1500px; margin: 0 auto; padding: 34px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-heading-copy { min-width: 0; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(28px, 4vw, 40px); line-height: 1.08; letter-spacing: -.04em; }
h2 { margin-bottom: 5px; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; }
h3 { margin-bottom: 4px; font-size: 16px; letter-spacing: -.015em; }
.page-heading p, .section-heading p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: 12px; background: var(--accent); color: white; font-size: 14px; font-weight: 720; cursor: pointer; transition: 130ms ease; white-space: nowrap; }
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }
.btn-secondary { border-color: var(--line-strong); background: white; color: var(--ink); }
.btn-secondary:hover { border-color: #b9c1cd; background: #f9fafb; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn-quiet:hover { background: #eef1f4; color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #ffe3df; }
.btn-sm { min-height: 34px; padding: 0 11px; border-radius: 10px; font-size: 12px; }
.icon-btn { width: 40px; min-width: 40px; padding: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card { min-height: 130px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 5px 18px rgba(16,24,40,.025); }
.metric-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.metric-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.metric-icon svg { width: 19px; height: 19px; }
.metric-card.warning .metric-icon { background: var(--warning-soft); color: var(--warning); }
.metric-card.success .metric-icon { background: var(--success-soft); color: var(--success); }
.metric-value { margin-top: 14px; font-size: 29px; font-weight: 820; line-height: 1; letter-spacing: -.04em; }
.metric-label { margin-top: 7px; color: var(--muted); font-size: 13px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 22px rgba(16,24,40,.025); overflow: hidden; }
.panel-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 17px; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.panel-body { padding: 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 32px 0 15px; }
.section-heading:first-child { margin-top: 0; }

.part-list { display: grid; }
.part-row { display: grid; grid-template-columns: minmax(135px, .9fr) minmax(160px, 1.15fr) minmax(150px, 1fr) auto; align-items: center; gap: 16px; min-height: 76px; padding: 12px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: 120ms ease; }
.part-row:last-child { border-bottom: 0; }
.part-row:hover { background: #fafbfc; }
.part-code { display: flex; align-items: center; gap: 11px; min-width: 0; }
.part-glyph { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #d9ddea; border-radius: 12px; background: #f6f7fb; color: #4a556b; }
.part-glyph svg { width: 18px; }
.part-code strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.part-code small, .version-cell small, .model-cell small { display: block; margin-top: 3px; color: var(--quiet); font-size: 11px; }
.version-cell strong, .model-cell strong { font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 7px; min-height: 27px; padding: 0 9px; border-radius: 9px; background: #f0f2f5; color: #596174; font-size: 11px; font-weight: 750; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .72; }
.status.success { background: var(--success-soft); color: var(--success); }
.status.warning { background: var(--warning-soft); color: var(--warning); }
.status.accent { background: var(--accent-soft); color: var(--accent-dark); }
.status.danger { background: var(--danger-soft); color: var(--danger); }
.row-arrow { color: #a6aeba; }
.row-arrow svg { width: 18px; }

.activity-list { display: grid; }
.activity-item { position: relative; display: grid; grid-template-columns: 35px 1fr; gap: 12px; padding: 0 0 21px; }
.activity-item:last-child { padding-bottom: 0; }
.activity-item:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 2px; width: 1px; background: var(--line); }
.activity-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #f0f2f5; color: var(--muted); }
.activity-icon svg { width: 16px; }
.activity-item strong { display: block; padding-top: 1px; font-size: 13px; }
.activity-item p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.activity-item time { display: block; margin-top: 5px; color: var(--quiet); font-size: 10px; }

.filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.search { position: relative; flex: 1; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; color: var(--quiet); transform: translateY(-50%); }
.search input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid var(--line-strong); border-radius: 12px; background: white; outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,111,255,.1); }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.part-card { display: grid; gap: 17px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; cursor: pointer; transition: 140ms ease; }
.part-card:hover { border-color: #c6cddd; transform: translateY(-2px); box-shadow: var(--shadow); }
.part-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.part-card-code { font-size: 21px; font-weight: 820; letter-spacing: -.035em; }
.part-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mini-stat { padding: 11px; border-radius: 12px; background: #f7f8fa; }
.mini-stat span { display: block; color: var(--quiet); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.mini-stat strong { display: block; margin-top: 4px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.part-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--accent); font-size: 12px; font-weight: 720; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 20px; }
.interactive-drawing-card { min-height: 128px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 19px; margin-bottom: 24px; padding: 20px 22px; border: 1px solid #d8dded; border-radius: var(--radius); background: linear-gradient(135deg,#fff 0%,#f6f8ff 100%); box-shadow: 0 8px 28px rgba(38,57,110,.055); }
.interactive-drawing-card.available { border-color: #cbd4ff; }
.interactive-symbol { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; background: var(--accent-soft); color: var(--accent); }
.interactive-symbol svg { width: 27px; height: 27px; }
.interactive-drawing-card .eyebrow { margin-bottom: 4px; }
.interactive-drawing-card h2 { margin: 0; }
.interactive-drawing-card p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.drawing-main { max-width: none; height: calc(100vh - 74px); margin: 0; padding: 0; overflow: hidden; }
.drawing-frame-page, .drawing-frame { width: 100%; height: 100%; }
.drawing-frame { display: block; border: 0; background: #f7f5eb; }
.file-hero { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.file-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.file-symbol { width: 58px; height: 66px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.file-symbol svg { width: 27px; height: 27px; }
.file-title { margin-top: 19px; font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.file-meta { margin-top: 5px; color: var(--muted); font-size: 13px; }
.file-actions { display: flex; gap: 9px; margin-top: 22px; }
.empty-file { min-height: 248px; display: grid; place-content: center; justify-items: center; padding: 30px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.55); text-align: center; }
.empty-file svg { width: 34px; height: 34px; margin-bottom: 14px; color: var(--quiet); }
.empty-file p { max-width: 360px; margin: 6px 0 18px; color: var(--muted); font-size: 13px; }
.version-list { display: grid; }
.version-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 69px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.version-item:last-child { border-bottom: 0; }
.version-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #f0f2f5; color: var(--muted); font-size: 11px; font-weight: 800; }
.version-item.current .version-number { background: var(--accent); color: white; }
.version-item strong { display: block; font-size: 13px; }
.version-item small { display: block; margin-top: 3px; color: var(--quiet); font-size: 11px; }
.version-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.remove-version { color: var(--danger); }
.remove-version:hover { background: var(--danger-soft); color: var(--danger); }

.improvement-section { margin-top: 32px; scroll-margin-top: 94px; }
.improvement-heading { align-items: center; }
.improvement-heading .eyebrow { margin-bottom: 5px; }
.improvement-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 14px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.65); }
.improvement-toolbar .field { width: min(310px, 100%); }
.improvement-toolbar p { max-width: 620px; margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.improvement-list { display: grid; gap: 13px; }
.improvement-thread { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 6px 22px rgba(16,24,40,.025); }
.improvement-thread.resolved { background: #fbfcfc; }
.improvement-thread > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.improvement-thread > header > div { min-width: 0; }
.improvement-thread > header .status { margin-bottom: 9px; }
.improvement-thread > header h3 { margin: 0; font-size: 17px; }
.improvement-thread > header small { display: block; margin-top: 4px; color: var(--quiet); font-size: 10px; }
.thread-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.improvement-messages { display: grid; gap: 12px; padding: 18px 20px; }
.improvement-message { max-width: 82%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px 15px 15px 15px; background: #f7f8fa; }
.improvement-message.own { justify-self: end; border-color: #dce1ff; border-radius: 15px 4px 15px 15px; background: var(--accent-soft); }
.message-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.message-meta strong { font-size: 12px; }
.message-meta span { color: var(--quiet); font-size: 9px; }
.improvement-message > p { margin: 7px 0 0; color: #344054; font-size: 13px; line-height: 1.55; }
.detail-image { display: grid; gap: 8px; margin-top: 12px; color: var(--accent-dark); font-size: 11px; font-weight: 700; text-decoration: none; }
.detail-image img { width: min(440px, 100%); max-height: 300px; display: block; border: 1px solid rgba(16,24,40,.09); border-radius: 12px; object-fit: contain; background: white; }
.detail-image span { display: flex; align-items: center; gap: 6px; }
.detail-image svg { width: 14px; }
.improvement-thread > footer { display: flex; justify-content: flex-end; padding: 13px 20px 17px; border-top: 1px solid var(--line); }
.improvement-empty { min-height: 170px; display: flex; align-items: center; justify-content: center; gap: 17px; padding: 28px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255,255,255,.55); }
.improvement-empty > svg { width: 31px; color: var(--quiet); }
.improvement-empty strong { font-size: 14px; }
.improvement-empty p { max-width: 620px; margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.edit-banner { display: flex; align-items: center; gap: 13px; margin: -10px 0 20px; padding: 14px 16px; border: 1px solid #d9dffd; border-radius: 14px; background: var(--accent-soft); color: var(--accent-dark); }
.edit-banner svg { width: 21px; flex: 0 0 auto; }
.edit-banner span { display: grid; gap: 2px; }
.edit-banner strong { font-size: 13px; }
.edit-banner small { color: #6673a8; font-size: 11px; }
.order-layout { display: grid; grid-template-columns: minmax(260px, .74fr) minmax(0, 1.26fr); gap: 20px; }
.catalog-list { max-height: calc(100vh - 240px); overflow: auto; }
.catalog-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 62px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.catalog-item:last-child { border-bottom: 0; }
.catalog-item strong { font-size: 13px; }
.catalog-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.add-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: white; color: var(--accent); cursor: pointer; }
.add-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.add-btn svg { width: 17px; }
.order-lines { display: grid; gap: 12px; }
.order-line { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.order-line-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.order-line-head strong { font-size: 17px; }
.order-line-grid { display: grid; grid-template-columns: 130px 1fr; gap: 16px; margin-top: 17px; }
.field { display: grid; gap: 7px; }
.field > span { color: #475467; font-size: 12px; font-weight: 720; }
.field > small { color: var(--quiet); font-size: 10px; line-height: 1.45; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); border-radius: 11px; background: white; color: var(--ink); outline: none; }
.field input, .field select { height: 43px; padding: 0 12px; }
.field textarea { min-height: 84px; padding: 11px 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,111,255,.1); }
.quantity-input { display: grid; grid-template-columns: 38px 1fr 38px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; }
.quantity-input button { border: 0; background: #f7f8fa; color: var(--muted); cursor: pointer; }
.quantity-input input { height: 41px; padding: 0; border: 0; border-radius: 0; text-align: center; }
.color-options { display: flex; flex-wrap: wrap; gap: 8px; }
.color-chip { min-height: 35px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: white; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.color-chip.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.swatch { width: 13px; height: 13px; border: 1px solid rgba(16,24,40,.13); border-radius: 50%; background: var(--swatch, #ddd); }
.custom-color-row { display: flex; gap: 8px; margin-top: 9px; }
.custom-color-row input { flex: 1; height: 38px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; }
.order-summary { position: sticky; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 17px; padding: 16px 18px; border: 1px solid #d9dffd; border-radius: 16px; background: rgba(247,248,255,.96); box-shadow: 0 14px 34px rgba(49,64,127,.12); backdrop-filter: blur(10px); }
.order-summary strong { display: block; font-size: 14px; }
.order-summary span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.workflow-columns { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 15px; align-items: start; overflow-x: auto; }
.workflow-column { min-width: 260px; padding: 12px; border-radius: 18px; background: #e9edf1; }
.workflow-column-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; }
.workflow-column-head strong { font-size: 13px; }
.workflow-count { min-width: 25px; height: 23px; display: grid; place-items: center; border-radius: 8px; background: white; color: var(--muted); font-size: 11px; font-weight: 800; }
.job-list { display: grid; gap: 9px; }
.job-card { padding: 15px; border: 1px solid rgba(16,24,40,.07); border-radius: 14px; background: white; box-shadow: 0 5px 14px rgba(16,24,40,.045); }
.job-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.job-card strong { font-size: 15px; }
.job-id { color: var(--quiet); font-size: 10px; font-weight: 700; }
.job-detail { display: grid; gap: 7px; margin: 13px 0; padding: 11px; border-radius: 11px; background: #f7f8fa; color: var(--muted); font-size: 12px; }
.job-detail span { display: flex; align-items: center; gap: 7px; }
.job-detail svg { width: 14px; }
.job-note { margin: 10px 0 0; color: #475467; font-size: 12px; line-height: 1.5; }
.job-actions { display: flex; gap: 7px; margin-top: 14px; }

.customer-order-section + .customer-order-section { margin-top: 34px; }
.customer-order-section-head { display: flex; align-items: center; gap: 9px; margin: 0 0 12px 2px; }
.customer-order-section-head h2 { margin: 0; font-size: 18px; }
.customer-order-section-head > span { min-width: 26px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #e9edf2; color: #475467; font-size: 11px; font-weight: 800; }
.customer-order-section.past { opacity: .88; }
.customer-order-list { display: grid; gap: 14px; }
.customer-order-card { overflow: hidden; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 16px; background: var(--surface); box-shadow: 0 6px 20px rgba(16,24,40,.045); }
.customer-order-card.is-printing { border-left-color: #d08a22; }
.customer-order-card.is-finished { border-left-color: #2f8b71; }
.customer-order-card.is-cancelled { border-left-color: var(--quiet); opacity: .68; }
.customer-order-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.customer-order-head h2 { margin: 0 0 5px; font-size: 21px; }
.customer-order-head p { margin: 0; color: var(--muted); font-size: 13px; }
.customer-order-head small { display: block; margin-top: 5px; color: var(--quiet); font-size: 11px; }
.customer-order-head > .status { flex: 0 0 auto; font-size: 12px; }
.customer-order-items { display: grid; }
.customer-order-item { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.customer-order-item:last-child { border-bottom: 0; }
.customer-order-item-grid { display: grid; grid-template-columns: minmax(150px,1fr) 120px minmax(180px,1.15fr) 120px; align-items: center; gap: 22px; }
.customer-order-item-grid.without-status { grid-template-columns: minmax(150px,1fr) 120px minmax(180px,1.2fr); }
.customer-order-item-grid > div { min-width: 0; }
.customer-order-item-grid small { display: block; margin-bottom: 5px; color: #7b8494; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.customer-order-item-grid strong { display: block; color: var(--ink); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.customer-order-part strong { font-size: 20px; }
.customer-order-item-status { justify-self: start; }
.customer-order-comment { display: grid; grid-template-columns: 145px 1fr; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #f6f7f9; }
.customer-order-comment.has-comment { background: #fff7e8; }
.customer-order-comment > strong { color: #667085; font-size: 12px; }
.customer-order-comment.has-comment > strong { color: #8a5617; }
.customer-order-comment p { margin: 0; color: #344054; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.customer-order-comment p span { color: var(--quiet); }
.customer-order-foot { min-height: 62px; display: flex; align-items: center; justify-content: flex-end; padding: 10px 20px; border-top: 1px solid var(--line); background: #fbfcfd; }
.customer-order-foot .order-actions { gap: 8px; }
.customer-order-foot .locked-hint { line-height: 1.4; white-space: normal; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 11px 17px; border-bottom: 1px solid var(--line); color: var(--quiet); font-size: 10px; font-weight: 780; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px 17px; border-bottom: 1px solid var(--line); font-size: 13px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfc; }
.cancelled-row { opacity: .7; }
.revision-label { display: block; margin-top: 3px; color: var(--quiet); font-size: 10px; }
.order-actions { display: flex; align-items: center; gap: 5px; }
.danger-text { color: var(--danger); }
.danger-text:hover { background: var(--danger-soft); color: var(--danger); }
.locked-hint { color: var(--quiet); font-size: 11px; white-space: nowrap; }

.empty-state { min-height: 250px; display: grid; place-content: center; justify-items: center; padding: 32px; text-align: center; }
.empty-state svg { width: 38px; height: 38px; margin-bottom: 14px; color: var(--quiet); }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { max-width: 380px; margin-bottom: 17px; color: var(--muted); font-size: 13px; }

.modal-backdrop { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10,15,25,.54); backdrop-filter: blur(5px); }
.modal { width: min(540px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 22px; background: white; box-shadow: 0 32px 90px rgba(3,8,20,.25); }
.modal.wide { width: min(700px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.close-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #f2f4f7; color: var(--muted); cursor: pointer; }
.close-btn:hover { color: var(--ink); }
.close-btn svg { width: 17px; }
.modal-body { display: grid; gap: 16px; padding: 22px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px 22px; }
.dropzone { position: relative; min-height: 155px; display: grid; place-content: center; justify-items: center; padding: 24px; border: 1.5px dashed var(--line-strong); border-radius: 16px; background: #fafbfc; text-align: center; cursor: pointer; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone svg { width: 28px; margin-bottom: 10px; color: var(--accent); }
.dropzone strong { font-size: 13px; }
.dropzone small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.selected-file { margin-top: 9px; padding: 9px 12px; border-radius: 10px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 650; }
.detail-dropzone { min-height: 132px; }
.reply-context { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.reply-context small { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.reply-context strong { font-size: 13px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: #475467; font-size: 13px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.confirm-message { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; padding: 15px; border-radius: 14px; background: var(--danger-soft); color: var(--danger); }
.confirm-message > svg { width: 22px; margin: 4px auto 0; }
.confirm-message strong { display: block; color: var(--ink); font-size: 14px; }
.confirm-message p { margin: 4px 0 0; color: #7a4a46; font-size: 12px; line-height: 1.5; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .88fr) minmax(500px, 1.12fr); background: white; }
.login-card { width: min(470px, calc(100% - 64px)); margin: auto; padding: 34px 0; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 72px; }
.login-brand .brand-mark { box-shadow: 0 8px 24px rgba(79,111,255,.25); }
.login-brand > span:last-child { display: grid; }
.login-brand strong { font-size: 18px; }
.login-brand small { color: var(--muted); font-size: 12px; }
.login-copy h1 { margin-bottom: 10px; font-size: 40px; }
.login-copy p { max-width: 410px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-form { display: grid; gap: 16px; margin-top: 32px; }
.login-submit { width: 100%; min-height: 48px; margin-top: 4px; }
.login-error { margin: -2px 0; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.login-security { display: block; margin-top: 19px; color: var(--quiet); font-size: 11px; text-align: center; }
.login-aside { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100vh; padding: clamp(48px, 7vw, 100px); overflow: hidden; background: var(--nav); color: white; }
.login-aside::before { content: ""; position: absolute; width: 620px; height: 620px; right: -180px; top: -180px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 90px rgba(255,255,255,.025), 0 0 0 180px rgba(255,255,255,.018); }
.login-aside::after { content: ""; position: absolute; width: 12px; height: 180px; right: 18%; top: 12%; border-radius: 12px; background: var(--accent); transform: rotate(34deg); box-shadow: 38px 22px 0 rgba(79,111,255,.38), 76px 44px 0 rgba(79,111,255,.16); }
.login-aside-copy, .login-steps { position: relative; z-index: 1; }
.login-aside-copy { max-width: 600px; }
.login-aside-copy .eyebrow { color: #8ea1ff; }
.login-aside-copy h2 { max-width: 560px; margin-bottom: 16px; font-size: clamp(36px, 5vw, 64px); line-height: 1.03; letter-spacing: -.05em; }
.login-aside-copy p { max-width: 500px; margin-bottom: 0; color: #9ba8ba; font-size: 16px; line-height: 1.65; }
.login-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 60px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.login-steps span { display: grid; gap: 7px; color: #c5ceda; font-size: 12px; }
.login-steps b { color: #758299; font-size: 11px; }

#toast-root { position: fixed; z-index: 120; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { min-width: min(360px, calc(100vw - 40px)); display: flex; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid #cce5dc; border-radius: 13px; background: #f5fcf9; color: var(--success); box-shadow: var(--shadow); font-size: 13px; font-weight: 680; }
.toast svg { width: 18px; flex: 0 0 auto; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .order-layout { grid-template-columns: .7fr 1.3fr; }
  .part-row { grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) auto; }
  .part-row .model-cell { display: none; }
  .customer-order-list { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 80; inset: 0 auto 0 0; width: 264px; transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 20px 0 60px rgba(3,8,20,.25); }
  .layout.menu-open .sidebar { transform: translateX(0); }
  .menu-scrim { position: fixed; z-index: 70; inset: 0; border: 0; background: rgba(10,15,25,.4); }
  .topbar { height: 66px; padding: 0 18px; }
  .mobile-menu { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #f0f2f5; }
  .mobile-menu svg { width: 20px; }
  .breadcrumbs { margin-right: auto; }
  .user-meta { display: none; }
  .main { padding: 24px 18px 42px; }
  .drawing-main { height: calc(100vh - 66px); padding: 0; }
  .login-page { grid-template-columns: 1fr; }
  .login-card { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; width: min(470px, calc(100% - 40px)); }
  .login-brand { margin-bottom: 48px; }
  .login-aside { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .heading-actions { width: 100%; }
  .heading-actions .btn { flex: 1; }
  .order-layout { grid-template-columns: 1fr; }
  .catalog-list { max-height: 310px; }
  .improvement-toolbar { align-items: stretch; flex-direction: column; }
  .improvement-toolbar .field { width: 100%; }
  .interactive-drawing-card { grid-template-columns: 48px 1fr; align-items: start; padding: 17px; }
  .interactive-symbol { width: 48px; height: 48px; border-radius: 14px; }
  .interactive-drawing-card > .btn, .interactive-drawing-card > .status { grid-column: 1 / -1; }
  .customer-order-head { align-items: flex-start; padding: 17px; }
  .customer-order-item { padding: 17px; }
  .customer-order-item-grid, .customer-order-item-grid.without-status { grid-template-columns: 1fr 1fr; gap: 16px 22px; }
  .customer-order-comment { grid-template-columns: 1fr; gap: 5px; }
  .customer-order-foot { justify-content: flex-start; padding: 11px 13px; }
  .customer-order-foot .order-actions { width: 100%; }
  .customer-order-foot .order-actions .btn { flex: 1; }
}

@media (max-width: 560px) {
  .metric-grid, .cards-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .part-row { grid-template-columns: 1fr auto; gap: 9px; }
  .part-row .version-cell { display: none; }
  .detail-grid { gap: 14px; }
  .order-line-grid { grid-template-columns: 1fr; }
  .order-summary { align-items: stretch; flex-direction: column; }
  .order-summary .btn { width: 100%; }
  .customer-order-head { flex-direction: column; gap: 12px; }
  .customer-order-item-grid, .customer-order-item-grid.without-status { grid-template-columns: 1fr; }
  .customer-order-item-grid > div { padding-bottom: 11px; border-bottom: 1px solid #eceff3; }
  .customer-order-item-grid > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .file-hero-top { flex-direction: column; }
  .file-actions { flex-direction: column; }
  .file-actions .btn { width: 100%; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .workflow-columns { margin-right: -18px; padding-right: 18px; }
  .version-item { grid-template-columns: 38px minmax(0, 1fr); }
  .version-actions { grid-column: 2; justify-content: flex-start; }
  .notification-panel { position: fixed; right: 12px; top: 62px; width: calc(100vw - 24px); }
  .improvement-heading { align-items: stretch; flex-direction: column; }
  .improvement-thread > header { flex-direction: column; }
  .thread-actions { justify-content: flex-start; }
  .improvement-message { max-width: 96%; }
  .message-meta { align-items: flex-start; flex-direction: column; gap: 1px; }
  #toast-root { right: 14px; bottom: 14px; }
}

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