:root{--ink:#172337;--muted:#738095;--line:#e7ebf1;--paper:#fff;--ground:#f6f8fb;--nav:#111c2e;--blue:#2563eb;--cyan:#0f9bb7;--green:#128567;--amber:#d78016;--red:#dc5454;--shadow:0 10px 30px rgba(22,35,55,.07)}*{box-sizing:border-box}body{margin:0;background:var(--ground);color:var(--ink);font:14px 'Noto Sans SC',Arial,sans-serif}.app-shell{display:flex;min-height:100vh}.sidebar{width:242px;flex-shrink:0;background:var(--nav);color:#eef4ff;padding:23px 14px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;padding:0 10px 24px;color:#fff;text-decoration:none;font-size:18px;font-weight:700}.brand small{font:11px 'DM Mono';letter-spacing:1px;color:#7e93b4;margin-left:3px}.brand-mark{height:29px;width:29px;display:grid;place-items:center;border-radius:8px;background:linear-gradient(135deg,#45b8ea,#2771e8);font:700 16px Georgia}.workspace{height:40px;border:1px solid #2a3951;border-radius:7px;padding:0 10px;display:flex;align-items:center;gap:8px;font-size:12px;margin:0 3px 20px}.dot{width:7px;height:7px;border-radius:50%;background:#53d6a8}.chevron{margin-left:auto;color:#8ba0bf}.nav{display:flex;flex-direction:column;gap:3px}.nav-item{color:#aebcd0;text-decoration:none;border-radius:6px;padding:9px 11px;display:flex;align-items:center;gap:11px;font-weight:500}.nav-item span{font:18px Arial;width:17px;text-align:center}.nav-item:hover,.nav-item.active{background:#253551;color:#fff}.nav-item.active{box-shadow:inset 3px 0 #4ca5f7}.nav-label{font:11px 'DM Mono';letter-spacing:.08em;color:#63758f;margin:19px 10px 5px}.sidebar-bottom{margin-top:auto;border-top:1px solid #293850;padding:16px 9px 2px;display:flex;align-items:center;gap:9px}.user-avatar{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:#557199;color:white;font-weight:600}.sidebar-bottom strong,.sidebar-bottom small{display:block;font-size:12px}.sidebar-bottom small{color:#8da0ba;font-size:10px;margin-top:2px}.plain{background:transparent;color:#91a4bd;border:0;margin-left:auto;font-size:16px}.main{min-width:0;flex:1}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 32px}.crumb{font-weight:600}.crumb span{color:#a7b1bf;padding:0 9px}.top-actions{display:flex;align-items:center;gap:12px;margin-left:auto}.icon-button,.help{border:0;background:transparent;color:#65748a;font-size:20px;position:relative}.icon-button i{position:absolute;width:6px;height:6px;background:var(--red);border-radius:50%;right:0;top:2px}.help{border:1px solid #cbd4df;border-radius:50%;font-size:12px;width:21px;height:21px}.primary,.secondary{border:0;border-radius:6px;padding:10px 15px;font:600 13px 'Noto Sans SC';cursor:pointer}.primary{background:var(--blue);color:white;box-shadow:0 3px 9px rgba(37,99,235,.23)}.primary:hover{background:#1954cf}.primary.small{padding:8px 13px}.secondary{background:#eef2f7;color:#3b4b61}.menu-button{display:none}.page{padding:30px 32px 44px;max-width:1540px}.page-title{display:flex;align-items:end;justify-content:space-between;margin-bottom:23px}.page-title h1{font-size:24px;margin:0 0 4px;letter-spacing:-.5px}.page-title p{margin:0;color:var(--muted);font-size:13px}.date-tag{color:#5c6a80;background:#fff;border:1px solid var(--line);border-radius:6px;padding:7px 10px;font-size:12px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:15px}.metric{background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:18px;box-shadow:0 2px 6px rgba(24,37,56,.02)}.metric-top{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.metric-icon{font-size:16px}.metric strong{display:block;font:600 25px 'DM Mono';letter-spacing:-1px;margin:11px 0 8px}.change{font-size:11px;color:var(--muted)}.change b{color:var(--green);font-weight:600}.change.warn b{color:var(--amber)}.content-grid{display:grid;grid-template-columns:1.4fr .85fr;gap:16px;margin-top:17px}.card{background:var(--paper);border:1px solid var(--line);border-radius:9px;box-shadow:0 2px 6px rgba(24,37,56,.02)}.card-header{display:flex;align-items:center;justify-content:space-between;padding:17px 18px 12px}.card h2{font-size:15px;margin:0}.card-sub{font-size:11px;color:var(--muted)}.text-link{border:0;background:none;color:var(--blue);font:12px 'Noto Sans SC';cursor:pointer}.chart{height:230px;padding:4px 18px 18px;display:flex;gap:13px;align-items:end;border-top:1px solid #f0f2f5;background:repeating-linear-gradient(to bottom,transparent 0,transparent 57px,#f1f3f6 58px)}.bar-wrap{height:100%;flex:1;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:7px}.bar{width:75%;max-width:34px;background:linear-gradient(#65acf8,#3778e9);border-radius:4px 4px 1px 1px;min-height:7px}.bar-wrap small{color:#8d99aa;font:10px 'DM Mono'}.alert-list{padding:0 18px 13px}.alert{border-top:1px solid #eef1f4;display:flex;align-items:center;gap:10px;padding:13px 0}.alert-symbol{height:27px;width:27px;border-radius:50%;display:grid;place-items:center;font-size:13px}.alert-symbol.orange{background:#fff2df;color:#d77a16}.alert-symbol.red{background:#ffebeb;color:#d34b4b}.alert-symbol.blue{background:#e8f2ff;color:#337ae7}.alert strong,.alert small{display:block;font-size:12px}.alert small{color:var(--muted);margin-top:2px}.alert .number{margin-left:auto;color:var(--muted);font:12px 'DM Mono'}.full-card{margin-top:17px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:650px}th,td{text-align:left;border-top:1px solid #edf0f4;padding:12px 18px;font-size:12px}th{font-weight:500;color:#8793a5;background:#fbfcfd}td{color:#405067}.code{font:12px 'DM Mono';color:#35445c}.status{font-size:11px;padding:3px 8px;border-radius:99px;white-space:nowrap}.status.blue{background:#e9f2ff;color:#2570d8}.status.green{background:#e7f7f0;color:#138162}.status.orange{background:#fff3df;color:#c77413}.status.red{background:#feeaea;color:#cb4848}.module-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}.filters{display:flex;gap:9px}.filter{background:#fff;border:1px solid var(--line);border-radius:6px;padding:7px 9px;color:#68768c;font-size:12px}.kpi-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-bottom:17px}.mini-kpi{background:#fff;border:1px solid var(--line);border-radius:8px;padding:15px}.mini-kpi small{color:var(--muted)}.mini-kpi strong{display:block;font:600 20px 'DM Mono';margin-top:7px}.bom-tree{padding:5px 18px 17px}.bom-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #eff2f5}.indent{margin-left:25px}.part-icon{background:#e8f2ff;color:#2671d9;border-radius:5px;width:27px;height:27px;display:grid;place-items:center}.bom-row small{color:var(--muted);margin-left:auto}.trace-search{display:flex;gap:9px;padding:16px 18px;border-top:1px solid #edf0f4}.trace-search input{flex:1;padding:9px 10px;border:1px solid #d8dfe8;border-radius:6px;font:13px 'DM Mono';outline:none}.trace-timeline{padding:0 19px 20px}.timeline-item{position:relative;padding:13px 0 13px 22px;border-left:2px solid #dce6f5}.timeline-item:before{content:'';position:absolute;left:-6px;top:17px;width:10px;height:10px;border-radius:50%;background:#3b82f6}.timeline-item:last-child{border-left-color:transparent}.timeline-item strong{font-size:12px}.timeline-item p{color:var(--muted);font-size:12px;margin:3px 0 0}.empty{padding:45px;text-align:center;color:var(--muted)}dialog{width:min(560px,calc(100vw - 30px));border:0;border-radius:12px;padding:0;box-shadow:0 25px 80px rgba(0,0,0,.25)}dialog::backdrop{background:rgba(10,22,39,.42)}form{padding:23px}.dialog-header{display:flex;justify-content:space-between;align-items:start;margin-bottom:17px}.eyebrow{margin:0 0 3px;color:var(--blue);font:11px 'DM Mono';letter-spacing:.05em}.dialog-header h2{margin:0;font-size:20px}.close{border:0;background:#f0f3f7;border-radius:50%;font-size:21px;width:28px;height:28px;color:#68778b;cursor:pointer}label{display:block;font-size:12px;font-weight:600;color:#536176;margin:11px 0}input,select,textarea{display:block;width:100%;margin-top:6px;border:1px solid #d9e0e8;border-radius:6px;padding:9px;font:13px 'Noto Sans SC';color:var(--ink);background:#fff}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 13px}.dialog-actions{margin-top:20px;display:flex;justify-content:end;gap:9px}@media(max-width:850px){.sidebar{position:fixed;z-index:5;left:-242px;height:100vh;transition:.2s}.sidebar.open{left:0}.menu-button{display:block;border:0;background:none;font-size:20px;margin-right:16px}.topbar{padding:0 18px}.page{padding:24px 18px}.metrics{grid-template-columns:repeat(2,1fr)}.content-grid{grid-template-columns:1fr}.kpi-strip{grid-template-columns:1fr}.top-actions .help,.top-actions .icon-button{display:none}}@media(max-width:500px){.metrics{grid-template-columns:1fr}.date-tag{display:none}.top-actions .primary{font-size:0;padding:9px}.top-actions .primary:first-letter{font-size:17px}.form-grid{grid-template-columns:1fr}}
.notice{background:#edf5ff;color:#35628f;border-left:3px solid #4a93e6;border-radius:4px;padding:9px 11px;font-size:12px;line-height:1.55}.field-help{display:block;color:var(--muted);font-weight:400;margin-top:5px;line-height:1.5}.file-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:5px}.file-chip{background:#edf3fc;border:1px solid #d5e2f3;color:#386294;border-radius:4px;padding:4px 7px;font:11px 'DM Mono'}.file-chip.three-d{background:#e8f7f2;border-color:#c7eadf;color:#168060}.drawing-type{font:10px 'DM Mono';padding:3px 6px;border-radius:4px;margin-left:5px;background:#e8f2ff;color:#276ecd}.drawing-type.model{background:#e8f7f0;color:#178263}.request-summary{display:flex;align-items:center;gap:13px;padding:15px 18px;border-top:1px solid #eef1f4}.request-summary .part-icon{flex:none}.request-summary strong,.request-summary small{display:block}.request-summary small{font-size:11px;color:var(--muted);margin-top:2px}.request-summary .status{margin-left:auto}
.global-search{position:relative;display:flex;align-items:center;gap:7px;width:min(370px,30vw);margin-left:34px;background:#f5f7fa;border:1px solid #e8ecf1;border-radius:7px;padding:0 9px;color:#758398}.global-search input{border:0;background:transparent;margin:0;padding:7px 0;font-size:12px;min-width:0}.global-search input:focus{outline:0}.global-search:focus-within{background:#fff;border-color:#86aef1;box-shadow:0 0 0 3px rgba(37,99,235,.1)}.global-search kbd{margin-left:auto;color:#9aa6b5;border:1px solid #dbe1e8;background:#fff;border-radius:3px;padding:1px 4px;font:10px 'DM Mono';white-space:nowrap}.search-results{position:absolute;z-index:20;left:0;top:calc(100% + 7px);width:100%;max-height:380px;overflow:auto;background:#fff;border:1px solid #dce3ec;border-radius:8px;box-shadow:0 12px 32px rgba(23,35,55,.16);padding:5px}.search-empty{padding:18px 12px;color:#7d899a;font-size:12px}.search-group{padding:7px 8px 4px;color:#94a0b0;font:10px 'DM Mono';letter-spacing:.05em}.search-item{display:flex;align-items:center;gap:9px;width:100%;border:0;border-radius:5px;background:transparent;padding:8px;text-align:left;cursor:pointer;color:#28374c}.search-item:hover,.search-item:focus{background:#eef5ff;outline:0}.search-item .search-icon{width:25px;height:25px;display:grid;place-items:center;border-radius:5px;background:#e8f2ff;color:#2e71d0}.search-item strong,.search-item small{display:block}.search-item strong{font-size:12px}.search-item small{font-size:10px;color:#7f8b9a;margin-top:2px}.search-item mark{background:#ffe9ad;color:inherit;border-radius:2px;padding:0 1px}@media(max-width:850px){.global-search{order:3;width:100%;margin:0 8px 0 0}.topbar{height:auto;min-height:68px;flex-wrap:wrap;padding-bottom:8px}.crumb{flex:1}.top-actions{margin-left:0}.global-search kbd{display:none}}@media(max-width:500px){.global-search{width:calc(100% - 8px)}.top-actions{margin-left:auto}.top-actions .primary{font-size:0}.top-actions .primary:first-letter{font-size:17px}}
.login-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:radial-gradient(circle at 20% 20%,#27476e 0,#14243a 42%,#0c1727 100%);padding:20px}.login-screen[hidden]{display:none}.login-card{width:min(400px,100%);background:#fff;border-radius:14px;padding:32px;box-shadow:0 30px 80px rgba(0,0,0,.3)}.login-brand{display:flex;align-items:center;gap:11px;margin-bottom:30px}.login-brand strong,.login-brand small{display:block}.login-brand strong{font-size:17px}.login-brand small{color:#8490a1;font:10px 'DM Mono';margin-top:2px}.login-card h1{font-size:25px;margin:0 0 7px}.login-card>p{color:var(--muted);margin:0 0 22px}.login-submit{width:100%;margin-top:10px;padding:11px}.login-error{min-height:20px;color:var(--red);font-size:12px}.login-retry{width:100%;margin:0 0 2px;padding:8px;border:1px solid #b8cff3;border-radius:6px;background:#eef5ff;color:#245ca8;font:600 12px 'Noto Sans SC';cursor:pointer}.login-retry:hover{background:#dfebff}.demo-account{margin-top:17px;padding-top:14px;border-top:1px solid var(--line);color:#8a96a6;font:11px/1.7 'DM Mono'}.plain#logoutButton{font:11px 'Noto Sans SC';cursor:pointer}.action-group{display:flex;gap:5px;justify-content:flex-end}.action-button{border:1px solid #d9e1eb;background:#fff;color:#42536b;border-radius:5px;padding:5px 8px;font:11px 'Noto Sans SC';cursor:pointer}.action-button:hover{border-color:#8aacdc;color:#2363bf}.action-button.approve{background:#e8f7f0;border-color:#c9e9de;color:#127a5d}.action-button.reject{background:#fff0f0;border-color:#f0d0d0;color:#c54848}.toast{position:fixed;z-index:120;right:22px;bottom:22px;background:#172337;color:#fff;border-radius:7px;padding:11px 15px;box-shadow:0 10px 30px rgba(0,0,0,.2);font-size:12px}.audit-detail{max-width:360px;white-space:normal}.server-badge{display:inline-flex;align-items:center;gap:5px;color:#16785c;background:#e8f7f0;border-radius:99px;padding:4px 8px;font-size:10px}.server-badge:before{content:'';width:6px;height:6px;background:#20a479;border-radius:50%}
.password-wrap{display:block;position:relative;margin-top:6px}.password-wrap input{margin:0;padding-right:62px}.password-toggle{position:absolute;right:7px;top:50%;transform:translateY(-50%);border:0;background:#eef3f9;color:#47617f;border-radius:5px;padding:6px 9px;font:11px 'Noto Sans SC';cursor:pointer}.password-toggle:hover,.password-toggle:focus{background:#dfeafa;color:#205dab;outline:2px solid rgba(37,99,235,.18)}
.detail-dialog{width:min(900px,calc(100vw - 30px));max-height:90vh}.approval-panel{padding:23px}.approval-detail-body{max-height:58vh;overflow:auto;margin:0 -4px;padding:0 4px}.detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}.detail-item{border:1px solid var(--line);border-radius:7px;background:#f9fbfd;padding:10px}.detail-item small,.detail-item strong{display:block}.detail-item small{color:var(--muted);font-size:10px;margin-bottom:5px}.detail-item strong{font-size:12px;word-break:break-all}.detail-note{border-left:3px solid #7ca9e9;background:#f3f7fd;padding:10px 12px;margin:12px 0;color:#4c5e75;font-size:12px}.detail-link{border:0;background:none;color:var(--blue);padding:0;font:600 12px 'DM Mono';cursor:pointer}.detail-link:hover{text-decoration:underline}.approval-lines{border:1px solid var(--line);border-radius:8px;overflow:auto}.approval-lines h3{font-size:13px;margin:0;padding:11px 13px;background:#f8fafc}.approval-lines table{min-width:760px}.approval-lines th,.approval-lines td{padding:9px 11px}.drawing-tags{display:flex;flex-wrap:wrap;gap:4px}.drawing-tag{background:#eef3f9;color:#496079;border-radius:4px;padding:2px 5px;font-size:9px}.bom-summary{display:flex;align-items:center;gap:13px}.bom-summary .part-icon{width:38px;height:38px}.bom-meta{display:flex;gap:18px;margin-left:auto;color:var(--muted);font-size:11px}.bom-meta strong{color:var(--ink);margin-left:4px}.bom-table table{min-width:1180px}.bom-table tbody tr:hover{background:#f8fbff}.bom-parent{font-weight:600;color:#243b5a}.bom-child{font-weight:600;color:#315d97}.quantity-cell{font-family:'DM Mono';font-weight:600;color:#1d4f91}@media(max-width:850px){.detail-grid{grid-template-columns:repeat(2,1fr)}.bom-meta{display:none}}@media(max-width:500px){.detail-grid{grid-template-columns:1fr}}
.issue-dialog {
  width: min(820px, calc(100vw - 32px));
}

.form-span-2 {
  grid-column: 1 / -1;
}

.issue-ledger table {
  min-width: 1320px;
}

.issue-purpose {
  min-width: 180px;
  max-width: 320px;
  white-space: normal;
}

.password-form {
  padding: 10px 18px 20px;
}
.password-form label {
  margin-top: 10px;
}
.account-card table {
  min-width: 720px;
}
.account-safety-note {
  margin: 0;
  padding: 11px 18px 16px;
  border-top: 1px solid #edf0f4;
  color: #728095;
  font-size: 10px;
  line-height: 1.6;
}
.current-account {
  display: inline-flex;
  border-radius: 99px;
  padding: 4px 8px;
  background: #edf2f7;
  color: #6c7b8e;
  font-size: 10px;
}
.user-dialog {
  width: min(680px, calc(100vw - 30px));
}
.user-dialog form {
  max-height: 90vh;
  overflow: auto;
}
.user-role-warning {
  margin-top: 13px;
  border: 1px solid #f1dfb6;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff9ea;
  color: #7c642c;
  font-size: 11px;
  line-height: 1.6;
}
.error-notice {
  border-left-color: var(--red) !important;
  background: #fff1f1 !important;
  color: #a83232 !important;
}
.filters select.filter {
  margin: 0;
  min-width: 108px;
}
.filters .part-search {
  min-width: 210px;
}

.autostart-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -8px 0 16px;
  padding: 8px 10px;
  border: 1px solid #cde8dc;
  border-radius: 7px;
  background: #edf9f4;
  color: #18765a;
  font-size: 11px;
  line-height: 1.45;
}
.autostart-note span {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #20a479;
  box-shadow: 0 0 0 3px rgba(32, 164, 121, .12);
}

.entry-dialog {
  width: min(940px, calc(100vw - 32px));
  max-height: 92vh;
}
.entry-dialog form {
  max-height: 92vh;
  overflow: auto;
}
#shipmentDialog { width: min(1250px, calc(100vw - 32px)); }
#shipmentForm { padding: 24px; max-height: 88vh; overflow: auto; }
#shipmentForm table { min-width: 960px; }
#shipmentForm .shipment-quantity { min-width: 90px; width: 110px; }
#shipmentForm .shipment-location { min-width: 240px; }
#workflowReasonMessage { line-height: 1.7; }
#moduleRows .action-group { flex-wrap: wrap; gap: 6px; min-width: 180px; }
.document-lines {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}
.document-lines table {
  min-width: 780px;
}
.document-lines th,
.document-lines td {
  padding: 8px 10px;
}
.document-lines input,
.document-lines select {
  margin: 0;
  min-width: 110px;
}
.document-lines .line-material {
  min-width: 250px;
}
.document-lines .line-amount {
  white-space: nowrap;
  font: 600 12px 'DM Mono';
}
.document-lines .remove-line {
  border: 1px solid #f0d0d0;
  background: #fff0f0;
  color: #c54848;
  border-radius: 5px;
  padding: 5px 8px;
  cursor: pointer;
}
.document-line-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.document-total {
  color: #31506f;
  font: 600 13px 'DM Mono';
}

.drawing-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid #cfe0f5;
  background: #f4f8fe;
  color: #245f9f;
  border-radius: 6px;
  padding: 6px 9px;
  font: 500 11px 'Noto Sans SC', sans-serif;
  cursor: pointer;
}
.drawing-link:hover { background: #e9f3ff; border-color: #8db9eb; }
.drawing-link span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawing-link b { flex: none; font-size: 10px; }
.drawing-dialog { width: min(1180px, calc(100vw - 28px)); max-height: 94vh; }
.drawing-panel { padding: 22px; }
.drawing-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 14px; }
.drawing-meta span { border: 1px solid var(--line); background: #f8fafc; border-radius: 5px; padding: 5px 8px; color: #536980; font-size: 11px; }
.drawing-workspace { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 500px; max-height: 66vh; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #f8fafc; }
.drawing-file-list { overflow-y: auto; padding: 10px; border-right: 1px solid var(--line); background: #fff; }
.drawing-file-item { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: 10px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 9px; text-align: left; cursor: pointer; color: var(--ink); }
.drawing-file-item:hover { background: #f4f8fd; }
.drawing-file-item.active { background: #eaf3ff; border-color: #b9d5f5; }
.drawing-file-icon { grid-row: 1 / span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; background: #dfeeff; color: #236ab3; font: 600 10px 'DM Mono'; }
.drawing-file-icon.model { background: #dff5ed; color: #168064; }
.drawing-file-item strong,.drawing-file-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawing-file-item strong { font-size: 11px; }
.drawing-file-item small { color: var(--muted); font-size: 10px; }
.drawing-preview { min-width: 0; overflow: auto; display: grid; place-items: stretch; background: #edf1f6; }
.drawing-preview iframe { width: 100%; height: 100%; min-height: 500px; border: 0; background: #fff; }
.drawing-preview-document { min-height: 500px; display: flex; flex-direction: column; }
.drawing-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fff; color: #52677d; font-size: 10px; }
.drawing-preview-document iframe { flex: 1; }
.drawing-preview-image { display: block; max-width: 100%; max-height: 60vh; margin: auto; object-fit: contain; }
.drawing-cad-card { min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; text-align: center; }
.drawing-cad-symbol { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 14px; border: 1px solid #b8d4f3; background: #e7f2ff; color: #226ab2; font: 700 16px 'DM Mono'; }
.drawing-cad-card h3 { margin: 0; font-size: 17px; }
.drawing-cad-card p { max-width: 620px; margin: 0; color: var(--muted); line-height: 1.7; font-size: 12px; }
.drawing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.drawing-download { text-decoration: none; }
.drawing-text-preview { width: min(100%, 900px); max-height: 240px; overflow: auto; margin: 4px auto 0; padding: 12px; border: 1px solid #ccd7e3; border-radius: 7px; background: #172333; color: #c9e2fa; text-align: left; white-space: pre-wrap; word-break: break-all; font: 10px/1.55 'DM Mono'; }
.drawing-cad-canvas { width: min(100%, 900px); height: auto; border: 1px solid #315575; border-radius: 8px; background: #102235; }
.drawing-cad-card details { width: min(100%, 900px); color: #52677d; font-size: 11px; cursor: pointer; }
.drawing-disclaimer { color: #6b7c8f; font-size: 10px; line-height: 1.6; padding-top: 10px; }
.drawing-missing { min-height: 500px; display: grid; place-items: center; padding: 30px; text-align: center; color: var(--muted); }
.drawing-missing strong { display: block; color: var(--ink); margin-bottom: 8px; }
.receipt-dialog { width: min(1180px, calc(100vw - 32px)); max-height: 92vh; }
.receipt-dialog form { max-height: 92vh; overflow: auto; }
.receipt-entry-table { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; }
.receipt-entry-table table { min-width: 1060px; }
.receipt-entry-table th,.receipt-entry-table td { padding: 9px 10px; }
.receipt-entry-table input,.receipt-entry-table select { min-width: 120px; margin: 0; }
.receipt-entry-table select { min-width: 260px; }
.receipt-ledger table,.stock-move-ledger table { min-width: 1180px; }
.stock-positive { color: var(--green); }
.stock-negative { color: var(--red); }
@media(max-width: 760px) {
  .drawing-panel { padding: 16px; }
  .drawing-workspace { grid-template-columns: 1fr; max-height: none; }
  .drawing-file-list { display: flex; gap: 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .drawing-file-item { min-width: 230px; }
  .drawing-preview iframe,.drawing-cad-card,.drawing-missing { min-height: 420px; }
}

.bom-dialog {
  width: min(1480px, calc(100vw - 32px));
  max-height: 92vh;
}
.bom-detail-panel {
  padding: 23px;
  max-height: 92vh;
  overflow: auto;
}
.bom-template-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 54vh;
}
.bom-template-table table {
  min-width: 2050px;
}
.icon-button i[hidden] { display: none; }
.bom-template-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.bom-stock-cell {
  min-width: 220px;
  white-space: nowrap;
}
.bom-stock-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bom-stock-head strong {
  color: #23466f;
  font: 600 12px 'DM Mono';
}
.bom-stock-cell small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font: 10px 'DM Mono';
}
.bom-plan-tools {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f5f9ff;
}
.bom-plan-tools label { width: 160px; margin: 0; }
.bom-plan-tools input { margin-top: 5px; }
.bom-plan-tools div { flex: 1; min-width: 0; }
.bom-plan-tools strong,.bom-plan-tools small { display: block; }
.bom-plan-tools strong { color: #254d7c; font-size: 12px; }
.bom-plan-tools small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.bom-plan-cell { min-width: 175px; }
.bom-plan-cell strong,.bom-plan-cell small { display: block; }
.bom-plan-cell strong { font: 600 12px 'DM Mono'; color: #244d7a; }
.bom-plan-cell small { margin: 3px 0 7px; color: var(--muted); font-size: 10px; }
.production-card { overflow: hidden; }
.production-form { display: grid; grid-template-columns: minmax(250px,1.5fr) minmax(130px,.55fr) minmax(150px,.8fr) minmax(150px,.8fr); gap: 0 13px; padding: 4px 18px 18px; align-items: end; }
.production-form label { margin-bottom: 0; }
.production-purpose { grid-column: 1 / span 3; }
.production-preview { height: 38px; margin-bottom: 0; }
.production-plan-empty,.production-plan-loading { margin: 0 18px 18px; min-height: 120px; display: grid; place-items: center; text-align: center; color: var(--muted); border: 1px dashed #cdd9e8; border-radius: 8px; background: #fafcff; padding: 20px; }
.production-plan-loading { color: #396792; background: #f3f8ff; border-style: solid; }
.production-plan { border-top: 1px solid var(--line); }
.production-plan-summary { display: grid; grid-template-columns: 1.35fr 1.25fr .8fr .7fr .8fr; gap: 10px; padding: 16px 18px; background: #f6faff; }
.production-plan-summary>div { min-width: 0; border: 1px solid #d9e7f5; border-radius: 7px; padding: 10px; background: #fff; }
.production-plan-summary small,.production-plan-summary strong { display: block; }
.production-plan-summary small { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.production-plan-summary strong { font-size: 12px; color: #284a72; word-break: break-word; }
.production-section { padding: 0 18px 17px; }
.production-section h3 { margin: 16px 0 9px; font-size: 13px; }
.production-section .table-wrap { border: 1px solid var(--line); border-radius: 8px; }
.production-section table { min-width: 850px; }
.production-section th,.production-section td { padding: 9px 11px; }
.production-spec { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.production-allocation { min-width: 205px; color: #496079; line-height: 1.65; font: 11px 'DM Mono'; }
.production-shortage { margin: 0 18px 16px; border-left: 3px solid #dc5454; border-radius: 5px; background: #fff2f2; color: #b23f3f; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.production-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px 18px; border-top: 1px solid var(--line); background: #fbfcfe; }
.production-actions small { color: var(--muted); line-height: 1.55; }
@media(max-width:900px){.production-form{grid-template-columns:1fr 1fr}.production-purpose{grid-column:auto}.production-plan-summary{grid-template-columns:1fr 1fr}.production-preview{grid-column:span 2}.production-actions{align-items:stretch;flex-direction:column}.production-actions button{width:100%}}
@media(max-width:560px){.production-form{grid-template-columns:1fr}.production-preview{grid-column:auto}.production-plan-summary{grid-template-columns:1fr}}
.utility-panel { padding: 23px; }
.utility-body { max-height: 65vh; overflow: auto; }
.utility-link {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  margin-bottom: 9px;
}
.utility-link:hover,.utility-link:focus { border-color: #8eb6ec; background: #f4f8fe; outline: 0; }
.utility-link strong,.utility-link small { display: block; }
.utility-link small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help-grid>div { border: 1px solid var(--line); border-radius: 8px; padding: 13px; background: #f9fbfd; }
.help-grid strong { font-size: 12px; }
.help-grid p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.profile-summary { display: flex; align-items: center; gap: 12px; padding: 22px 18px; }
.profile-summary .user-avatar { width: 42px; height: 42px; font-size: 16px; }
.profile-summary div { flex: 1; }
.profile-summary strong,.profile-summary small { display: block; }
.profile-summary small { color: var(--muted); margin-top: 4px; font-size: 11px; }
@media(max-width:700px){
  .bom-plan-tools { align-items: stretch; flex-direction: column; }
  .bom-plan-tools label { width: 100%; }
  .help-grid { grid-template-columns: 1fr; }
}
