/* ============================================================
   智印 ERP · 印刷生产管理系统
   设计语言：纸张、油墨、深海军蓝与朱砂橙
   ============================================================ */
:root {
  --ink: #12212b;
  --ink-soft: #334a58;
  --navy: #0c2b3a;
  --navy-2: #123b4d;
  --navy-3: #194c60;
  --teal: #0f766e;
  --teal-2: #14b8a6;
  --orange: #c2410c;
  --orange-2: #ea580c;
  --gold: #b7893b;
  --paper: #f4f0e7;
  --paper-2: #ebe5d9;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --line: #dce3e6;
  --line-soft: #e9edef;
  --muted: #637482;
  --muted-2: #8a99a3;
  --red: #b42318;
  --red-bg: #fef3f2;
  --green: #087443;
  --green-bg: #ecfdf3;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --blue: #1d4ed8;
  --blue-bg: #eff6ff;
  --cyan: #0e7490;
  --cyan-bg: #ecfeff;
  --orange-bg: #fff7ed;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px rgba(12, 43, 58, .07);
  --shadow-sm: 0 2px 8px rgba(12, 43, 58, .05);
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(194, 65, 12, .055), transparent 30%),
    radial-gradient(circle at 100% 18%, rgba(15, 118, 110, .06), transparent 32%),
    linear-gradient(rgba(12, 43, 58, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 43, 58, .025) 1px, transparent 1px);
  background-size: auto, auto, 36px 36px, 36px 36px;
  -webkit-font-smoothing: antialiased;
}
body.login-body, body.public-body { background-image: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.muted { color: var(--muted); }
.text-danger { color: var(--red) !important; }
.strong { font-weight: 700; }
[hidden] { display: none !important; }

/* ---------- boot ---------- */
.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--navy); background: var(--paper);
}
.boot-screen h1 { font-size: 26px; letter-spacing: 4px; }
.boot-screen p { color: var(--muted); font-size: 13px; }
.boot-logo, .logo-symbol {
  width: 64px; height: 64px; position: relative; border-radius: 16px;
  background: linear-gradient(145deg, var(--navy), var(--navy-3));
  box-shadow: 0 16px 34px rgba(12, 43, 58, .22); overflow: hidden;
}
.boot-logo b, .logo-symbol b {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 27px; font-weight: 800; z-index: 3; letter-spacing: -2px;
}
.logo-symbol { width: 46px; height: 46px; border-radius: 12px; }
.logo-symbol b { font-size: 20px; }
.sheet { position: absolute; width: 24px; height: 30px; border: 1px solid rgba(255,255,255,.55); border-radius: 2px; background: rgba(255,255,255,.08); }
.s1 { left: 9px; top: 12px; transform: rotate(-16deg); }
.s2 { left: 19px; top: 9px; transform: rotate(8deg); }
.s3 { left: 29px; top: 14px; transform: rotate(22deg); opacity: .55; }
.boot-line { width: 180px; height: 3px; background: rgba(12,43,58,.1); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.boot-line span { display: block; width: 40%; height: 100%; background: var(--orange); border-radius: 3px; animation: boot 1.4s infinite ease-in-out; }
@keyframes boot { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- login ---------- */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }
.login-brand {
  position: relative; overflow: hidden; padding: 56px 64px; color: #f7f4ec;
  background: linear-gradient(145deg, #081e29 0%, #0c2b3a 52%, #123b4d 100%);
  display: flex; flex-direction: column; justify-content: center;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0; opacity: .26;
  background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 54px 54px; mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.login-brand::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -170px; bottom: -220px;
  background: radial-gradient(circle, rgba(194,65,12,.36), transparent 66%);
}
.brand-mark { position: relative; z-index: 2; margin-bottom: 56px; }
.login-copy { position: relative; z-index: 2; max-width: 580px; }
.eyebrow { color: var(--orange); font-size: 11px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; margin-bottom: 9px; }
.login-brand .eyebrow { color: #e7a36d; }
.login-copy h1 { font-size: clamp(40px, 4.4vw, 66px); line-height: 1.17; letter-spacing: -1.5px; font-weight: 800; }
.login-copy h1 em { font-style: normal; color: #e7a36d; position: relative; }
.login-copy h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 9px; background: rgba(194,65,12,.28); z-index: -1; }
.login-copy p { margin-top: 26px; font-size: 15px; line-height: 1.95; color: rgba(247,244,236,.7); }
.login-features { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 9px; margin-top: 38px; }
.login-features span { padding: 7px 14px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; font-size: 12px; color: rgba(255,255,255,.78); background: rgba(255,255,255,.04); }
.login-grid { position: absolute; right: 48px; top: 52px; width: 120px; height: 120px; opacity: .18; background-image: radial-gradient(#fff 1.5px, transparent 1.5px); background-size: 12px 12px; }
.login-footer { position: absolute; left: 64px; bottom: 28px; font-size: 11px; color: rgba(255,255,255,.38); letter-spacing: 1px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 36px; background: #f8f5ef; }
.login-card { width: min(460px, 100%); }
.login-card h2 { font-size: 28px; color: var(--navy); letter-spacing: -.5px; margin-bottom: 8px; }
.login-card > p { font-size: 13px; margin-bottom: 26px; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn.block { margin-top: 6px; }
.mobile-logo { display: none; }
.login-error { color: var(--red); font-size: 12px; min-height: 20px; margin-top: 8px; text-align: center; }
.demo-box { margin-top: 28px; border-top: 1px dashed #d7d0c2; padding-top: 18px; }
.demo-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.demo-grid button { text-align: left; border: 1px solid #e3ddd1; background: #fffdf8; padding: 10px 12px; border-radius: 10px; transition: .18s; }
.demo-grid button:hover { border-color: #c9bca7; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.demo-grid b { display: block; font-size: 12px; color: var(--navy); }
.demo-grid small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.login-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; color: #a09a8d; font-size: 10.5px; }
.alert { padding: 11px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 14px; }
.alert-warn { background: var(--amber-bg); color: var(--amber); border: 1px solid #fde68a; }

/* ---------- shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 258px; z-index: 50;
  display: flex; flex-direction: column; padding: 20px 15px 14px;
  color: #eaf1f2; background:
    radial-gradient(circle at 0 0, rgba(20,184,166,.14), transparent 38%),
    linear-gradient(180deg, #091f2a 0%, #0c2b3a 52%, #0a2531 100%);
  overflow-y: auto; scrollbar-width: thin;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; }
.side-brand-text b { display: block; font-size: 19px; letter-spacing: 2px; color: #fff; }
.side-brand-text b em { font-style: normal; color: #e7a36d; letter-spacing: 0; }
.side-brand-text small { display: block; color: rgba(255,255,255,.36); font-size: 8.5px; letter-spacing: 2.4px; margin-top: 1px; }
.side-company { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); border-radius: 11px; margin-bottom: 20px; }
.company-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 0 4px rgba(20,184,166,.13); flex: 0 0 auto; }
.side-company b { display: block; font-size: 11.5px; color: rgba(255,255,255,.88); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.side-company small { display: block; font-size: 9.5px; color: rgba(255,255,255,.34); }
.side-nav { flex: 1; }
.nav-group { margin-bottom: 13px; }
.nav-label { padding: 0 11px 6px; font-size: 9px; letter-spacing: 2px; color: rgba(255,255,255,.28); }
.nav-item {
  width: 100%; border: 0; background: transparent; color: rgba(255,255,255,.64);
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  font-size: 12.5px; text-align: left; margin-bottom: 2px; position: relative; transition: .17s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(20,184,166,.14); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -15px; top: 8px; bottom: 8px; width: 3px; background: var(--teal-2); border-radius: 0 3px 3px 0; }
.nav-item.active svg { opacity: 1; color: var(--teal-2); }
.side-assistant {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(20,184,166,.08));
  border: 1px solid rgba(255,255,255,.1); border-radius: 11px; transition: .18s;
}
.side-assistant:hover { border-color: rgba(20,184,166,.4); transform: translateY(-1px); }
.side-assistant .spark { width: 30px; height: 30px; border-radius: 8px; background: rgba(194,65,12,.75); color: #fff; display: flex; align-items: center; justify-content: center; }
.side-assistant .spark svg { width: 17px; height: 17px; }
.side-assistant b { display: block; font-size: 11.5px; color: #fff; }
.side-assistant small { display: block; font-size: 9px; color: rgba(255,255,255,.4); }
.side-assistant > svg { margin-left: auto; width: 14px; height: 14px; color: rgba(255,255,255,.3); }
.side-foot { display: flex; justify-content: space-between; color: rgba(255,255,255,.24); font-size: 9px; padding: 14px 9px 0; }
.sidebar-scrim { display: none; }
.main-shell { margin-left: 258px; min-height: 100vh; }
.topbar {
  height: 74px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between;
  background: rgba(250,248,243,.82); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(12,43,58,.08);
  position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.top-eyebrow { font-size: 9px; letter-spacing: 2px; color: var(--muted-2); display: block; }
.page-id h2 { font-size: 17px; color: var(--navy); letter-spacing: .5px; margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.lan-pill {
  border: 1px solid #dce3e6; background: rgba(255,255,255,.65); color: var(--muted);
  display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; font-size: 10.5px; max-width: 300px;
}
.lan-pill svg { width: 14px; height: 14px; color: var(--teal); }
.lan-pill b { font-weight: 600; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 36px; height: 36px; border: 1px solid transparent; background: transparent; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); transition: .16s;
}
.icon-btn:hover { background: #fff; border-color: var(--line); }
.icon-btn svg { width: 18px; height: 18px; }
.mobile-menu { display: none; }
.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid transparent; background: transparent; padding: 5px 7px; border-radius: 10px; }
.user-chip:hover { background: #fff; border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.user-copy { text-align: left; }
.user-copy b { display: block; font-size: 11.5px; color: var(--navy); line-height: 1.3; }
.user-copy small { display: block; font-size: 9px; color: var(--muted); }
.user-chip > svg { width: 13px; height: 13px; color: var(--muted-2); transform: rotate(90deg); }
.user-drop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 20px 50px rgba(12,43,58,.15); padding: 7px; opacity: 0; visibility: hidden; transform: translateY(-5px); transition: .16s;
}
.user-drop.show { opacity: 1; visibility: visible; transform: none; }
.user-drop-head { padding: 10px 11px 9px; border-bottom: 1px solid var(--line-soft); margin-bottom: 5px; }
.user-drop-head b { display: block; font-size: 12.5px; }
.user-drop-head span { display: block; font-size: 10px; color: var(--muted); }
.user-drop button { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px; font-size: 12px; color: var(--ink-soft); }
.user-drop button:hover { background: #f5f8f9; }
.user-drop button svg { width: 16px; height: 16px; }
.view { padding: 26px 32px 60px; max-width: 1560px; margin: 0 auto; }
.page-loading { padding: 100px 0; text-align: center; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 2px solid #dbe3e6; border-top-color: var(--teal); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
.spinner.sm { width: 14px; height: 14px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.view.entering { opacity: 0; transform: translateY(6px); }
.view.entered { animation: enter .28s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mobile-nav { display: none; }

/* ---------- typography / buttons ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; line-height: 1.2; color: var(--navy); letter-spacing: -.8px; }
.page-head p { margin-top: 7px; color: var(--muted); font-size: 12.5px; max-width: 760px; }
.page-head .eyebrow { margin-bottom: 6px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 9px;
  border: 1px solid transparent; padding: 9px 15px; font-size: 12.5px; font-weight: 600;
  background: #fff; color: var(--ink-soft); transition: .16s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px rgba(12,43,58,.16); }
.btn.primary:hover { background: var(--navy-2); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink-soft); }
.btn.ghost:hover { border-color: #c5d0d5; background: #fbfdfd; }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 11px; border-radius: 7px; }
.btn.lg { padding: 12px 20px; font-size: 13.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.link-btn { border: 0; background: transparent; color: var(--teal); font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; padding: 4px; }
.link-btn svg { width: 14px; height: 14px; }
.mini-link { border: 0; background: transparent; color: var(--teal); font-size: 11px; text-align: left; padding: 4px 0; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 11px; margin-bottom: 15px; }
.breadcrumb button { border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; padding: 0; }
.breadcrumb button svg { transform: rotate(180deg); width: 13px; height: 13px; }
.breadcrumb b { color: var(--ink-soft); font-weight: 600; }

/* ---------- cards / grids ---------- */
.card { background: rgba(255,255,255,.86); border: 1px solid rgba(12,43,58,.08); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card.span-4 { grid-column: span 4; } .card.span-5 { grid-column: span 5; } .card.span-6 { grid-column: span 6; }
.card.span-7 { grid-column: span 7; } .card.span-8 { grid-column: span 8; } .card.span-12 { grid-column: span 12; }
.card-head { min-height: 58px; padding: 16px 20px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.card-head h3 { font-size: 14px; color: var(--navy); letter-spacing: .2px; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.card-body { padding: 0 20px 20px; }
.card-body.no-pad { padding: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid rgba(12,43,58,.08); border-radius: 14px; padding: 17px 18px 15px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; right: -38px; top: -48px; background: rgba(15,118,110,.06); }
.kpi.navy::after { background: rgba(12,43,58,.07); } .kpi.teal::after { background: rgba(15,118,110,.09); }
.kpi.amber::after { background: rgba(180,83,9,.08); } .kpi.red::after { background: rgba(180,35,24,.08); }
.kpi-top { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.kpi-icon { width: 27px; height: 27px; border-radius: 7px; background: #f1f6f7; display: inline-flex; align-items: center; justify-content: center; color: var(--teal); }
.kpi-icon svg { width: 15px; height: 15px; }
.kpi-value { font-size: 25px; font-weight: 800; color: var(--navy); margin-top: 9px; letter-spacing: -.5px; line-height: 1.2; }
.kpi-value .path-value { font-size: 11px; font-weight: 500; word-break: break-all; display: block; line-height: 1.4; }
.kpi-hint { font-size: 10px; color: var(--muted-2); margin-top: 4px; }
.mini-kpis { display: flex; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 17px; overflow: hidden; }
.mini-kpis > div { flex: 1; padding: 12px 17px; border-right: 1px solid var(--line-soft); }
.mini-kpis > div:last-child { border-right: 0; }
.mini-kpis span { display: block; font-size: 10px; color: var(--muted); }
.mini-kpis b { display: block; font-size: 18px; color: var(--navy); margin-top: 2px; }
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 15px; }
.detail-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 15px; }
.system-grid, .finance-grid, .settings-grid, .materials-layout, .scan-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 15px; }
.materials-layout > .card:first-child { grid-column: span 8; }
.material-side { grid-column: span 4; }
.scan-grid > .scan-card { grid-column: span 7; }
.scan-grid > .card:nth-child(2) { grid-column: span 5; }
.settings-grid > .span-6 { grid-column: span 6; }
.finance-grid > .span-8 { grid-column: span 8; } .finance-grid > .span-4 { grid-column: span 4; }
.finance-grid > .span-7 { grid-column: span 7; } .finance-grid > .span-5 { grid-column: span 5; }
.system-grid > .span-7 { grid-column: span 7; } .system-grid > .span-5 { grid-column: span 5; } .system-grid > .span-6 { grid-column: span 6; }
.system-grid > .span-12 { grid-column: span 12; }

/* ---------- badges / tables ---------- */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.badge-slate { background: #f1f4f5; color: #5b6c76; }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-cyan { background: var(--cyan-bg); color: var(--cyan); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-teal { background: #ecfdf5; color: #0f766e; }
.badge-red { background: var(--red-bg); color: var(--red); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; padding: 9px 12px; font-size: 9.5px; font-weight: 600; letter-spacing: .6px; color: var(--muted-2); background: #f8fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfd; }
.data-table .clickable { cursor: pointer; }
.data-table .num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table.compact td { padding: 8px 10px; }
.data-table.compact th { padding: 7px 10px; }
.cell-main { font-weight: 600; color: var(--navy); font-size: 12px; }
.cell-sub { color: var(--muted-2); font-size: 10px; margin-top: 2px; }
.row-action { color: #b0bcc4; width: 28px; text-align: right; }
.row-action svg { width: 15px; height: 15px; }
.table-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.table-empty { text-align: center; color: var(--muted-2); padding: 34px 10px; font-size: 11px; }
.table-empty svg { width: 22px; height: 22px; display: block; margin: 0 auto 7px; opacity: .5; }
.table-foot { display: flex; justify-content: space-between; padding: 10px 17px; border-top: 1px solid var(--line-soft); font-size: 10px; color: var(--muted); }
.progress { height: 6px; background: #edf1f2; border-radius: 99px; overflow: hidden; flex: 1; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-2)); border-radius: 99px; transition: width .5s; }
.progress.danger span { background: var(--red); }
.progress-cell { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.progress-cell > span { font-size: 10px; color: var(--muted); width: 34px; text-align: right; }
.low-row td { background: #fffcf7; }

/* ---------- dashboard ---------- */
.pipeline { display: flex; gap: 6px; margin-bottom: 24px; }
.pipe-step { flex: 1; border: 1px dashed #d9e0e3; border-radius: 9px; padding: 9px 8px; text-align: center; background: #fbfcfd; }
.pipe-step.has { border-style: solid; border-color: #cfe0e2; background: #f4faf9; }
.pipe-step b { display: block; font-size: 17px; color: var(--navy); line-height: 1.2; }
.pipe-step span { font-size: 9px; color: var(--muted); }
.trend-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.trend-head b { display: block; font-size: 12px; color: var(--navy); }
.trend-head span { font-size: 9.5px; color: var(--muted); }
.trend-total { font-size: 20px; font-weight: 800; color: var(--navy); }
.trend-total small { font-size: 9px; color: var(--muted); font-weight: 400; }
.trend-chart { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 15px; border-bottom: 1px solid var(--line); }
.trend-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.trend-bar { width: 100%; max-width: 34px; min-height: 4px; background: linear-gradient(180deg, #2a7f8f, #0f5667); border-radius: 4px 4px 0 0; position: relative; transition: height .6s; }
.trend-bar span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--muted); white-space: nowrap; }
.trend-col small { font-size: 8px; color: var(--muted-2); }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 9px; border: 1px solid transparent; }
.alert-row.danger { background: var(--red-bg); border-color: #fecaca; }
.alert-row.warn { background: var(--amber-bg); border-color: #fde68a; }
.alert-row.info { background: var(--blue-bg); border-color: #bfdbfe; }
.alert-ico { width: 25px; height: 25px; border-radius: 7px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--orange); flex: 0 0 auto; }
.alert-ico svg { width: 14px; height: 14px; }
.alert-row b { display: block; font-size: 11px; color: var(--ink); }
.alert-row small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.quick-grid button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 9px 7px; display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink-soft); }
.quick-grid button:hover { border-color: #b9cccc; background: #fbfdfd; }
.quick-grid svg { width: 15px; height: 15px; color: var(--teal); }
.recent-list { display: flex; flex-direction: column; gap: 1px; }
.recent-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 9px 4px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: #fbfdfd; }
.recent-mark { width: 30px; height: 30px; border-radius: 8px; background: #eef5f6; color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.recent-copy { flex: 1; min-width: 0; }
.recent-copy b { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--navy); }
.recent-copy small { display: block; font-size: 9px; color: var(--muted-2); }
.recent-side { text-align: right; }
.recent-side small { display: block; margin-top: 3px; font-size: 9.5px; color: var(--muted); }
.empty-mini { padding: 22px 5px; color: var(--muted-2); font-size: 10.5px; text-align: center; }
.empty-mini svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 3px; }

/* ---------- detail ---------- */
.detail-banner { background: linear-gradient(135deg, #0c2b3a, #123f52 75%, #174b5d); border-radius: 15px; padding: 18px 22px 20px; color: #fff; margin-bottom: 16px; position: relative; overflow: hidden; }
.detail-banner::after { content: ""; position: absolute; right: -100px; top: -120px; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 80px rgba(255,255,255,.018); }
.detail-status { display: flex; align-items: center; gap: 7px; margin-bottom: 15px; }
.detail-status .muted { color: rgba(255,255,255,.45); font-size: 10px; }
.detail-metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; position: relative; z-index: 2; }
.detail-metrics > div { border-left: 1px solid rgba(255,255,255,.13); padding-left: 13px; }
.detail-metrics > div:first-child { border-left: 0; padding-left: 0; }
.detail-metrics small { display: block; font-size: 8.5px; color: rgba(255,255,255,.45); letter-spacing: .5px; }
.detail-metrics b { display: block; font-size: 16px; margin-top: 3px; color: #fff; }
.detail-metrics b em { font-style: normal; font-size: 9px; color: rgba(255,255,255,.45); font-weight: 400; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-grid.small { grid-template-columns: repeat(4, 1fr); }
.calc-cell { border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; background: #fcfdfd; }
.calc-cell span { display: block; font-size: 9px; color: var(--muted); }
.calc-cell b { display: block; font-size: 19px; color: var(--navy); margin-top: 2px; line-height: 1.2; }
.calc-cell small { display: block; font-size: 8px; color: var(--muted-2); margin-top: 1px; }
.formula-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border-radius: 8px; overflow: hidden; margin-top: 12px; }
.formula-strip > div { background: #f8fafb; padding: 8px 11px; }
.formula-strip b { display: block; font-size: 8.5px; color: var(--muted); font-weight: 500; }
.formula-strip span { display: block; font-size: 11px; color: var(--navy); font-weight: 600; margin-top: 1px; }
.inline-warn { margin-top: 10px; background: var(--amber-bg); border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 8px 11px; font-size: 10.5px; display: flex; gap: 6px; align-items: flex-start; }
.inline-warn svg { width: 14px; height: 14px; margin-top: 1px; flex: 0 0 auto; }
.info-list { display: flex; flex-direction: column; }
.info-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.info-list > div:last-child { border-bottom: 0; }
.info-list span { color: var(--muted); flex: 0 0 auto; }
.info-list b { color: var(--ink-soft); font-weight: 500; text-align: right; }
.info-list.compact > div { padding: 6px 0; }
.note-text { max-width: 70%; }
.quote-summary { display: flex; align-items: center; gap: 25px; padding: 16px 20px; }
.quote-summary > div { display: flex; flex-direction: column; gap: 3px; }
.quote-summary small { font-size: 9px; color: var(--muted); }
.quote-summary b { font-size: 14px; color: var(--navy); }
.quote-summary .btn { margin-left: auto; }
.wo-mini-list button { width: 100%; border: 0; background: transparent; border-bottom: 1px solid var(--line-soft); padding: 12px 18px; display: flex; align-items: center; gap: 10px; text-align: left; }
.wo-mini-list button:hover { background: #fbfdfd; }
.wo-mini-list button div { flex: 1; }
.wo-mini-list b { display: block; font-size: 11.5px; color: var(--navy); }
.wo-mini-list small { display: block; font-size: 9px; color: var(--muted); }
.wo-mini-list svg { width: 14px; height: 14px; color: var(--muted-2); }
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; position: relative; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 20px; bottom: -6px; width: 1px; background: var(--line); }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); margin-top: 5px; flex: 0 0 auto; box-shadow: 0 0 0 3px #eef8f6; }
.timeline-item.quote .timeline-dot { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.timeline-item.report .timeline-dot { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-bg); }
.timeline-item.delivery .timeline-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.timeline-item div { flex: 1; }
.timeline-item b { display: block; font-size: 11px; color: var(--ink); }
.timeline-item small { display: block; font-size: 9.5px; color: var(--muted); }
.timeline-item time { font-size: 9px; color: var(--muted-2); white-space: nowrap; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; position: relative; min-width: 0; }
.field > span { font-size: 10px; color: var(--muted); font-weight: 500; }
.field > small { font-size: 9px; color: var(--muted-2); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid #d9e1e4; background: #fff; border-radius: 8px; padding: 9px 10px;
  font-size: 12px; outline: none; transition: .16s; min-height: 38px;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.09); }
.field input:disabled { background: #f5f7f8; color: var(--muted); }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-radius: 8px 0 0 8px; border-right: 0; }
.input-suffix span { display: flex; align-items: center; padding: 0 10px; border: 1px solid #d9e1e4; border-radius: 0 8px 8px 0; background: #f7f9fa; color: var(--muted); font-size: 11px; }
.form-stack { display: flex; flex-direction: column; gap: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.form-grid .span-2 { grid-column: span 2; }
.form-sections { display: flex; flex-direction: column; gap: 20px; }
.form-section { border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; background: #fcfdfd; }
.form-section.compact { padding: 12px 13px; border-radius: 10px; }
.form-section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.form-section-title b { font-size: 12px; color: var(--navy); }
.form-section-title span { font-size: 9px; color: var(--muted-2); }
.switch-line { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-soft); min-height: 38px; }
.switch-line input { width: 15px; min-height: 15px; accent-color: var(--teal); }
.preset-row { display: flex; gap: 6px; flex-wrap: wrap; }
.preset-row button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 10px; font-size: 10px; color: var(--muted); }
.preset-row button:hover { border-color: var(--teal); color: var(--teal); }
.callout { background: #f0f7f6; border: 1px solid #d3e8e4; border-radius: 9px; padding: 10px 12px; color: #2c5a56; font-size: 10.5px; line-height: 1.6; }
.inline-tip { display: flex; gap: 7px; align-items: flex-start; background: #f8fafb; border: 1px solid var(--line-soft); border-radius: 8px; padding: 9px 11px; color: var(--muted); font-size: 10px; margin-top: 10px; line-height: 1.55; }
.inline-tip svg { width: 14px; height: 14px; margin-top: 1px; flex: 0 0 auto; color: var(--teal); }
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fbfcfd; border-radius: 8px; padding: 0 11px; min-width: 280px; }
.search-box svg { width: 16px; height: 16px; color: var(--muted-2); }
.search-box input { border: 0; outline: none; background: transparent; padding: 9px 0; font-size: 11.5px; width: 100%; }
.list-toolbar { align-items: center; }
.toolbar-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.toolbar-filters select { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 7px 9px; font-size: 10.5px; color: var(--ink-soft); }
.tabs { display: flex; gap: 3px; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 11px; color: var(--muted); }
.tabs button.active { background: var(--navy); color: #fff; }
.with-tabs { align-items: center; }

/* ---------- quote / calculator ---------- */
.quote-form { display: flex; flex-direction: column; gap: 12px; }
.calculator-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; min-height: 60vh; }
.calc-form-side { min-width: 0; }
.calc-result-side { background: #f8fafb; border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.calc-foot-left { flex: 1; display: flex; align-items: center; color: var(--muted); font-size: 10.5px; }
.calc-foot-left select { border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 10.5px; max-width: 300px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.quote-empty { text-align: center; color: var(--muted); padding: 90px 20px; }
.quote-empty-icon { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: var(--teal); }
.quote-empty h3 { font-size: 14px; color: var(--navy); margin-bottom: 5px; }
.quote-empty p { font-size: 10.5px; max-width: 300px; margin: 0 auto; }
.quote-result-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.quote-result-head h3 { font-size: 18px; color: var(--navy); }
.quote-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 10px; }
.quote-kpi > div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
.quote-kpi small { display: block; font-size: 8.5px; color: var(--muted); }
.quote-kpi b { display: block; font-size: 17px; color: var(--navy); margin-top: 1px; }
.quote-kpi span { display: block; font-size: 8px; color: var(--muted-2); }
.mini-calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.mini-calc > div { background: #fff; padding: 7px 9px; }
.mini-calc span { display: block; font-size: 8px; color: var(--muted); }
.mini-calc b { display: block; font-size: 12px; color: var(--navy); }
.cost-list { background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.cost-line { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.cost-line:last-child { border-bottom: 0; }
.cost-line span { font-size: 9.5px; color: var(--ink-soft); font-weight: 500; }
.cost-line small { font-size: 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-line b { font-size: 10.5px; color: var(--navy); text-align: right; }
.quote-total { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: #fff; border-radius: 8px; padding: 10px 12px; margin-top: 9px; }
.quote-total span { font-size: 9px; color: rgba(255,255,255,.65); }
.quote-total b { font-size: 18px; }
.quote-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.quote-detail-head h3 { font-size: 19px; color: var(--navy); margin-top: 2px; }
.quote-detail-head p { font-size: 10.5px; color: var(--muted); }
.quote-detail-total { text-align: right; background: #f8fafb; border-radius: 10px; padding: 9px 13px; }
.quote-detail-total small { display: block; font-size: 8px; color: var(--muted); }
.quote-detail-total b { display: block; font-size: 22px; color: var(--navy); }
.quote-detail-total span { font-size: 9px; color: var(--muted); }
.seven-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 15px; }
.seven-form { min-width: 0; }
.seven-panel { margin-top: 12px; }
.seven-panel .btn { margin-top: 12px; }
.seven-result { background: #f8fafb; border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-height: 300px; }
.seven-result-head h3 { font-size: 16px; color: var(--navy); }
.seven-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 10px; }
.seven-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
.seven-grid span { display: block; font-size: 8px; color: var(--muted); }
.seven-grid b { display: block; font-size: 12px; color: var(--navy); }
.formula-solve { background: var(--navy); color: #fff; border-radius: 7px; padding: 7px 9px; font-size: 9.5px; margin-top: 7px; }
.seven-steps { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 7px; }
.seven-steps > div { padding: 4px 0; border-bottom: 1px dashed var(--line-soft); }
.seven-steps b { display: block; font-size: 9px; color: var(--ink); }
.seven-steps span { display: block; font-size: 8px; color: var(--muted); }
.seven-steps small { display: block; font-size: 8px; color: var(--muted-2); }
.price-table-wrap .card-head { padding-left: 0; padding-right: 0; }
.price-block { margin-bottom: 13px; }
.formula-explain { background: var(--navy); color: #fff; border-radius: 9px; padding: 12px 14px; margin-top: 12px; }
.formula-explain b { font-size: 11px; color: #e7a36d; }
.formula-explain p { font-size: 9.5px; color: rgba(255,255,255,.75); margin-top: 4px; line-height: 1.7; }

/* ---------- customers ---------- */
.customer-toolbar { align-items: center; flex-wrap: wrap; }
.customer-filters { align-items: center; }
.customer-filters select { min-width: 104px; }
.customer-table .customer-name b { display: block; font-size: 12.5px; color: var(--navy); line-height: 1.35; }
.customer-table .customer-name small { display: block; font-size: 8.5px; color: var(--muted-2); margin-top: 2px; font-family: Consolas, monospace; }
.address-cell, .note-cell { max-width: 230px; font-size: 10.5px; color: var(--ink-soft); line-height: 1.55; }
.note-cell { color: var(--muted); }
.danger-text { color: var(--red) !important; }
.customer-actions { min-width: 128px; }
.customer-actions .btn svg { width: 13px; height: 13px; }
.import-box { display: flex; flex-direction: column; gap: 12px; }
.import-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.import-actions .file-btn { position: relative; }
.import-columns { background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 9.5px; color: var(--muted); line-height: 1.7; }
.import-columns b { color: var(--navy); }
.import-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.import-summary > div { background: #fff; padding: 9px 11px; }
.import-summary span { display: block; font-size: 8.5px; color: var(--muted); }
.import-summary b { display: block; font-size: 18px; color: var(--navy); }
.text-green { color: var(--green) !important; }
.import-errors { margin-top: 9px; background: var(--red-bg); border: 1px solid #fecaca; border-radius: 8px; padding: 9px 11px; font-size: 9.5px; color: var(--red); max-height: 160px; overflow: auto; }
.import-errors b { display: block; margin-bottom: 3px; }
.import-errors p { margin: 2px 0; }

/* ---------- procurement / outsourcing workflow ---------- */
.flow-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 9px 13px; margin-bottom: 15px; font-size: 10px; }
.flow-banner > span { color: var(--muted); margin-right: 4px; }
.flow-banner b { color: var(--navy); font-size: 10px; font-weight: 600; background: #f2f7f7; border: 1px solid #dce9e7; border-radius: 999px; padding: 3px 9px; }
.flow-banner i { color: var(--orange); font-style: normal; }
.approval-flow { display: flex; align-items: center; gap: 0; margin: 15px 0 16px; padding: 12px 14px; background: #f8fafb; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.flow-step { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.flow-step > span { width: 23px; height: 23px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #8796a0; background: #e8eef0; border: 1px solid #d7e0e3; }
.flow-step b { font-size: 9.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.flow-step.done > span { background: var(--green); border-color: var(--green); color: #fff; }
.flow-step.done b { color: var(--green); }
.flow-step.active > span { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 0 0 4px rgba(194,65,12,.1); }
.flow-step.active b { color: var(--orange); font-weight: 700; }
.flow-step.rejected > span { background: var(--red); border-color: var(--red); color: #fff; }
.flow-step.rejected b { color: var(--red); }
.flow-line { display: block; width: 18px; height: 1px; background: #ccd8dc; margin: 0 6px; }
.proc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.proc-head h3 { font-size: 21px; color: var(--navy); letter-spacing: -.3px; }
.proc-head p { color: var(--muted); font-size: 10px; margin-top: 3px; }
.proc-amount { text-align: right; background: #f8fafb; border: 1px solid var(--line); border-radius: 9px; padding: 8px 13px; }
.proc-amount small { display: block; font-size: 8px; color: var(--muted); }
.proc-amount b { display: block; font-size: 21px; color: var(--navy); }
.proc-amount span { font-size: 8.5px; color: var(--muted); }
.proc-meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 13px; }
.proc-meta-grid > div { background: #fff; padding: 8px 11px; }
.proc-meta-grid span { display: block; font-size: 8px; color: var(--muted); }
.proc-meta-grid b { display: block; font-size: 10px; color: var(--ink); margin-top: 1px; }
.proc-section { margin-top: 12px; }
.proc-section-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.proc-section-title b { font-size: 11px; color: var(--navy); }
.proc-section-title span { font-size: 8.5px; color: var(--muted-2); }
.proc-reason { background: #fcfdfd; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 10px; color: var(--ink-soft); line-height: 1.7; }
.quote-table tr.selected td { background: #f1faf7; }
.quote-table input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; font-size: 10px; min-width: 70px; }
.inquiry-head { display: flex; align-items: center; gap: 18px; font-size: 10px; color: var(--muted); }
.inquiry-head b { color: var(--navy); }
.inquiry-head .btn { margin-left: auto; }
.inquiry-table td { padding: 5px 6px; }
.inquiry-table input[type=radio] { width: 14px; height: 14px; accent-color: var(--teal); }
.approval-records { display: flex; flex-direction: column; gap: 3px; }
.approval-record { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; opacity: .6; }
.approval-record.done { opacity: 1; }
.approval-dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd5db; margin-top: 5px; flex: 0 0 auto; }
.approval-record.done .approval-dot { background: var(--green); }
.approval-record b { display: block; font-size: 9.5px; color: var(--ink); }
.approval-record small { display: block; font-size: 8px; color: var(--muted); }
.approval-record p { font-size: 8.5px; color: var(--muted); margin-top: 2px; }
.proc-approval-summary { display: flex; justify-content: space-between; align-items: center; background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 10px; color: var(--muted); }
.proc-approval-summary b { font-size: 16px; color: var(--navy); }
.form-grid .span-3 { grid-column: span 3; }
.select-with-add { display: flex; align-items: center; gap: 6px; }
.select-with-add select { flex: 1; }
.select-with-add .mini-link { white-space: nowrap; }
.unit-qty { display: flex; gap: 5px; }
.unit-qty input:first-child { flex: 1; min-width: 0; }
.unit-qty input:last-child { width: 58px; flex: 0 0 auto; }
.formula-inline { margin: 0 12px 7px; padding: 5px 8px; border-radius: 6px; background: #f6faf9; color: var(--muted); font-size: 8.5px; border: 1px dashed #cfe0dc; }
.paper-select-wrap { display: flex; flex-direction: column; gap: 4px; }
.paper-select-wrap select { font-size: 9px; padding: 4px 6px; }
.press-mix-options { display: flex; gap: 5px; flex-wrap: wrap; padding-top: 3px; }
.press-mix-options label { font-size: 9px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.press-mix-options input { width: 13px; height: 13px; accent-color: var(--teal); }
.size-preset-row { display: flex; gap: 4px; align-items: center; }
.size-preset-row select { flex: 1; min-width: 0; }
.size-preset-row .mini-link { white-space: nowrap; }
.settings-grid .workflow-editor { border: 1px solid #e2e8ee; border-radius: 10px; padding: 10px 12px; background: #fbfcfd; margin-bottom: 10px; }
.settings-grid .workflow-editor-head { padding-bottom: 8px; border-bottom: 1px solid #e8edf2; }
.settings-grid .workflow-step-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.settings-grid .workflow-step-edit { display: grid; grid-template-columns: 26px minmax(140px, 1fr) 66px 96px; align-items: center; gap: 8px; background: #fff; border: 1px solid #dde5ec; border-radius: 8px; padding: 8px 10px; }
.settings-grid .workflow-step-edit > span { width: 22px; height: 22px; border-radius: 50%; background: #e8f1f4; color: #1c596d; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.settings-grid .workflow-step-edit input[data-workflow-label] { height: 30px; padding: 4px 8px; border: 1px solid #cbd8e1; border-radius: 6px; font-size: 12px; }
.settings-grid .workflow-step-edit label { font-size: 11px; color: #4a6270; }
.settings-grid .workflow-step-edit .mini-link { font-size: 11px; }
.settings-grid .route-multi { width: 100%; min-width: 150px; min-height: 64px; padding: 5px; border: 1px solid #cbd8e1; border-radius: 7px; background: #fff; font-size: 11px; }
.settings-grid .process-group-row { grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; padding: 12px; margin-bottom: 8px; border: 1px solid #e1e8ee; border-radius: 10px; background: #fbfcfd; }
.settings-grid .process-group-row input[data-group-name] { height: 32px; padding: 5px 8px; border: 1px solid #cbd8e1; border-radius: 6px; font-size: 12px; }
.settings-grid .process-check-grid { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.settings-grid .process-check { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #dde5ec; border-radius: 14px; padding: 3px 8px; font-size: 10px; color: #405764; }
.settings-grid .process-check input { accent-color: #1c6b7f; }
.notify-btn { position: relative; }
.notify-dot { position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; border-radius: 9px; background: #c2413b; color: #fff; font-size: 8px; line-height: 15px; text-align: center; padding: 0 3px; }
.notify-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.notify-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.notify-item.unread { border-color: #9bc8bd; background: #f3fbf8; }
.notify-item b { font-size: 10px; color: var(--navy); }
.notify-item small { font-size: 9px; color: var(--muted); }
.notify-item span { font-size: 8px; color: #94a3b8; }
.workflow-editor { margin-bottom: 12px; }
.workflow-editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.workflow-step-list { display: flex; flex-direction: column; gap: 4px; }
.workflow-step-edit { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.workflow-step-edit > span { font-size: 8px; color: var(--muted); width: 14px; }
.workflow-step-edit input[data-workflow-label] { flex: 1; min-width: 0; font-size: 9px; padding: 3px 5px; }
.workflow-step-edit label { font-size: 8px; color: var(--muted); white-space: nowrap; }
.workflow-step-edit input[type=checkbox] { width: 12px; height: 12px; accent-color: var(--teal); }
.workflow-step-edit .mini-link { padding: 0 3px; }
.process-group-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 6px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.process-group-row input[data-group-name] { font-size: 10px; padding: 5px; }
.process-group-actions { display: flex; flex-direction: column; gap: 3px; }
.cover-route-editor { display: grid; grid-template-columns: 1fr 160px 1fr auto; gap: 8px; align-items: start; padding: 10px 12px; border-top: 1px solid var(--line); }
.cover-route-editor > div { display: flex; flex-direction: column; gap: 2px; }
.cover-route-editor b { font-size: 10px; color: var(--navy); }
.cover-route-editor small { font-size: 8px; color: var(--muted); }
.process-check-grid { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 3px 0; }
.process-check { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 3px 8px; cursor: pointer; }
.process-check input { accent-color: var(--teal); width: 12px; height: 12px; }
.process-group-row { grid-template-columns: 120px 1fr auto; }
.process-group-row .process-check-grid { border: 1px solid var(--line); border-radius: 6px; padding: 4px; }

/* Preps 风格全屏拼版工作台 */
.modal-card.preps-modal { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; max-width: 100vw !important; max-height: 100vh !important; margin: 0 !important; border-radius: 0 !important; background: #24282d !important; color: #dbe3ea; display: flex !important; flex-direction: column; z-index: 90; }
.preps-modal .modal-head { background: #16191d; border-bottom: 1px solid #3b424a; padding: 8px 14px; }
.preps-modal .modal-head h3 { color: #e6edf3; font-size: 13px; font-weight: 600; }
.preps-modal .modal-head .modal-close { color: #b9c4cf; }
.preps-modal .modal-body { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.preps-menubar { display: flex; align-items: center; gap: 16px; padding: 6px 14px; background: #1d2126; border-bottom: 1px solid #384049; font-size: 11px; color: #9fb0bf; flex: 0 0 auto; }
.preps-menubar b { color: #e6edf3; font-size: 12px; letter-spacing: .5px; }
.preps-menubar i { flex: 1; }
.preps-tool { border: 1px solid #4b5763; background: #2c343c; color: #d8e2eb; border-radius: 3px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.preps-tool:hover { background: #3a4652; }
.preps-menu { border: 0; background: none; color: #9fb0bf; font-size: 11px; cursor: pointer; padding: 2px 4px; }
.preps-menu:hover { color: #000; background: #d7d7d7; }
.preps-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0,1fr) 310px; background: #cfcfcf; }
.preps-left, .preps-right { overflow-y: auto; background: #e7e7e7; border-right: 1px solid #aaa; padding: 5px; }
.preps-right { border-right: 0; border-left: 1px solid #aaa; }
.preps-panel { margin-bottom: 7px; border: 1px solid #b4b4b4; background: #ededed; }
.preps-panel > h4 { margin: 0; padding: 3px 7px; background: #dcdcdc; border-bottom: 1px solid #bcbcbc; font-size: 11px; color: #1b1b1b; font-weight: 700; }
.preps-panel > .field, .preps-panel > .form-grid { padding: 3px 6px; }
.preps-tree { padding: 5px 8px; font-size: 11px; color: #111; }
.preps-tree .tree-root { font-weight: 700; margin-bottom: 4px; }
.preps-tree .tree-child { padding-left: 12px; color: #333; line-height: 1.7; }
.preps-file-list { padding: 6px 8px; min-height: 46px; font-size: 11px; color: #333; }
.preps-file-list small { color: #666; }
.preps-status { padding: 4px 8px; font-size: 10px; color: #444; background: #f7f7f7; border-top: 1px solid #ccc; }
.preps-add { display: block; padding: 4px 8px; border-top: 1px solid #ccc; font-size: 11px; cursor: pointer; color: #123; }
.preps-add:hover { background: #dbe5ec; }
.preps-center { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 0 7px; background: #cfcfcf; }
.preps-tabs { display: flex; gap: 2px; padding: 4px 0; }
.preps-tabs button { flex: 1; border: 1px solid #a9a9a9; background: #e2e2e2; padding: 4px; font-size: 11px; cursor: pointer; }
.preps-tabs button.active { background: #9fb6bd; color: #0c2228; font-weight: 700; }
.preps-toolbar { display: flex; gap: 3px; align-items: center; padding: 3px 6px; background: #d7d7d7; border: 1px solid #adadad; flex-wrap: wrap; }
.preps-tool { border: 1px solid #9e9e9e; background: #efefef; color: #111; border-radius: 2px; padding: 3px 8px; font-size: 10px; cursor: pointer; }
.preps-tool:hover { background: #dce8ee; }
.preps-canvas { flex: 1 1 0; min-height: 0; position: relative; margin-top: 3px; border: 1px solid #9b9b9b; background: #f4f1e6; overflow: hidden; }
.preps-canvas img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain !important; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.preps-runlist { flex: 0 0 180px; margin-top: 3px; border: 1px solid #9b9b9b; background: #ededed; overflow: auto; }
.preps-runlist h4 { margin: 0; padding: 3px 6px; font-size: 11px; background: #dcdcdc; border-bottom: 1px solid #bbb; }
.preps-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.preps-table th, .preps-table td { border: 1px solid #c2c2c2; padding: 3px 5px; text-align: left; white-space: nowrap; }
.preps-table th { background: #dfdfdf; }
.master-tools { display: flex; gap: 3px; padding: 3px 0; }
.master-tools button { border: 1px solid #999; background: #eee; font-size: 10px; padding: 3px 8px; cursor: pointer; }
.master-tools button.active { background: #b9cfd7; border-color: #557f91; }
.multi-picker { position: relative; display: inline-block; }
.multi-picker > button { border: 1px solid #999; background: #f5f5f5; padding: 3px 8px; min-width: 180px; text-align: left; font-size: 11px; }
.multi-list { display: none; position: absolute; z-index: 50; top: 100%; left: 0; min-width: 300px; max-height: 260px; overflow: auto; background: #fff; border: 1px solid #777; padding: 5px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.multi-list.show { display: block; }
.multi-list label { display: block; padding: 3px 4px; font-size: 11px; color: #222; white-space: nowrap; }
.preps-menus { display: flex; background: #e8e8e8; border-bottom: 1px solid #888; font-size: 11px; position: relative; z-index: 20; }
.preps-menu { position: relative; }
.preps-menu > button { border: 0; background: transparent; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.preps-menu:hover > button { background: #cbdcf0; }
.preps-menu-pop { display: none; position: absolute; top: 100%; left: 0; min-width: 170px; background: #f5f5f5; border: 1px solid #888; box-shadow: 2px 3px 6px rgba(0,0,0,.25); z-index: 60; }
.preps-menu:hover .preps-menu-pop, .preps-menu.open .preps-menu-pop { display: block; }
.preps-menu-pop button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 4px 12px; font-size: 11px; cursor: pointer; }
.preps-menu-pop button:hover { background: #316ac5; color: #fff; }
.menu-window { background: #f0f0f0; }
.menu-win-body { display: flex; flex-direction: column; gap: 5px; padding: 8px; height: calc(100% - 28px); overflow: auto; }
.menu-win-body > button { text-align: left; border: 1px solid #999; background: #fafafa; padding: 6px 10px; font-size: 11px; cursor: pointer; }
.menu-win-body > button:hover { background: #dbe9f5; }
.menu-win-body label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #222; }
.menu-win-body input, .menu-win-body select { flex: 1; border: 1px solid #999; padding: 3px; font-size: 11px; }
.menu-win-info { font-size: 10px; color: #444; background: #fff; border: 1px solid #ccc; padding: 5px; line-height: 1.5; }
.dock-tabs { display: inline-flex; gap: 2px; margin-left: 8px; }
.dock-tab { border: 1px solid #789; background: #c9d8e6; color: #123; font-size: 10px; padding: 1px 7px; cursor: pointer; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-tab.active { background: #fff; font-weight: 700; }
.dock-body { position: absolute; left: 0; right: 0; top: 26px; bottom: 0; overflow: hidden; }
.dock-pane { display: none; position: absolute; inset: 0; overflow: auto; }
.dock-pane.active { display: block; }
.win-resize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; z-index: 5; background: linear-gradient(135deg, transparent 45%, #888 45%, #888 55%, transparent 55%); }
.win-check { display: inline-block; width: 12px; color: #1b5e20; font-weight: 700; }
.preps-menu-pop button.win-on { font-weight: 700; }
.action-window { position: absolute !important; right: 10px; top: 60px; bottom: auto; width: auto; min-width: 380px; min-height: 46px; z-index: 45; background: #f2f2f2; }
.action-buttons { display: flex; align-items: center; gap: 6px; padding: 7px; }
.classic-mode .action-window { position: absolute !important; }
.classic-mode .preps-menus { display: none !important; }
.classic-mode .job-workspace { display: none !important; }
.classic-mode .master-layout { display: grid !important; grid-template-columns: 230px 1fr 320px !important; height: calc(100vh - 150px) !important; position: static !important; overflow: hidden; }
.classic-mode .master-list { position: static !important; width: auto !important; height: auto !important; box-shadow: none !important; }
.classic-mode .master-props { position: static !important; width: auto !important; height: auto !important; box-shadow: none !important; }
.classic-mode .master-canvas { padding-left: 10px !important; }
.classic-mode .master-tools { position: static !important; flex-direction: row !important; border: 0 !important; background: transparent !important; padding: 3px 0 !important; }
.classic-mode .master-tools button { width: auto !important; height: auto !important; padding: 3px 8px !important; }
.classic-mode #master-preview { margin-left: 0 !important; }
.classic-mode .preps-win-ctl, .classic-mode .win-resize { display: none !important; }
.classic-mode .master-sigs { flex: 0 0 210px; }
.classic-mode .master-modal .modal-body { overflow: hidden; }
.template-mode .master-layout { grid-template-columns: 1fr; position: relative; }
.template-mode .master-list { position: absolute; left: 6px; top: 6px; width: 210px; height: 44%; z-index: 35; box-shadow: 2px 3px 8px rgba(0,0,0,.25); }
.template-mode .master-props { position: absolute; right: 6px; top: 6px; width: 300px; height: 82%; z-index: 35; box-shadow: 2px 3px 8px rgba(0,0,0,.25); }
.template-mode .master-canvas { padding-left: 10px; }
.template-mode .master-tools { position: absolute; left: 8px; top: 38px; z-index: 25; flex-direction: column; background: #eee; border: 1px solid #999; padding: 3px; }
.template-mode .master-tools button { width: 28px; height: 26px; font-size: 9px; padding: 1px; overflow: hidden; }
.template-mode #master-preview { margin-left: 42px; }
.job-file-table { width: 100%; border-collapse: collapse; font-size: 11px; background: #fff; }
.job-file-table th { background: #e8e8e8; border: 1px solid #bbb; padding: 4px; text-align: left; }
.job-file-table td { border: 1px solid #ccc; padding: 4px; }
.job-file-split { display: grid; grid-template-columns: 45% 55%; height: calc(100% - 60px); }
.job-file-split .job-thumbs { height: 100%; border-left: 1px solid #aaa; }
.job-workspace { display: flex; flex-direction: column; gap: 5px; height: calc(100vh - 220px); min-height: 0; padding: 5px; background: #d6d6d6; overflow: hidden; }
.job-file-window, .job-run-window, .job-sig-window { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.job-file-window { flex: 0 0 40%; }
.job-run-window { flex: 1 1 35%; }
.job-sig-window { flex: 0 0 24%; }
.job-file-split { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: 45% 55%; }
.job-file-split .job-thumbs { height: 100%; overflow: auto; border-left: 1px solid #aaa; }
.job-runs { flex: 1 1 0; min-height: 0; height: auto; }
.job-sig-window #job-sig-rows { flex: 1 1 0; min-height: 0; height: auto; }
.job-file-toolbar, .job-sig-toolbar { display: flex; align-items: center; gap: 6px; padding: 4px; background: #eee; border-bottom: 1px solid #bbb; font-size: 11px; }
.job-thumbs { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px; overflow: auto; height: 100%; background: #fff; }
.job-thumb { width: 54px; height: 72px; border: 1px solid #888; background: #fafafa; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #222; }
.job-runs { padding: 4px; overflow: auto; background: #fff; }
.job-run-row { display: grid; grid-template-columns: 50px 1fr 80px 80px 80px; border-bottom: 1px solid #ddd; padding: 2px 4px; font-size: 11px; }
.job-sig-window #job-sig-rows { overflow: auto; height: calc(100% - 64px); }
.job-hidden { display: none !important; }
.job-mode #m-save-footer, .job-mode #m-print, .job-mode .modal-foot [data-m-generate] { display: none !important; }
.preps-child { border: 1px solid #8a8a8a; background: #f7f7f7; position: relative; }
.preps-win-ctl { display: inline-flex; gap: 2px; margin-left: 6px; }
.preps-win-ctl button { width: 17px; height: 15px; line-height: 12px; padding: 0; border: 1px solid #888; background: #eee; font-size: 10px; cursor: pointer; color: #222; }
.preps-floating { position: absolute !important; z-index: 80; box-shadow: 3px 4px 14px rgba(0,0,0,.35); resize: both; overflow: auto; min-width: 260px; min-height: 120px; }
.preps-floating > .preps-child-title, .preps-floating > h5 { cursor: move; }
.preps-max { position: absolute !important; left: 8px !important; top: 8px !important; right: 8px !important; bottom: 8px !important; width: auto !important; height: auto !important; z-index: 95 !important; }
.preps-min { height: 28px !important; min-height: 28px !important; overflow: hidden !important; width: 260px !important; }
.preps-min > *:not(.preps-child-title):not(h5) { display: none !important; }
.preps-closed { display: none !important; }
.preps-child-title { display: flex; justify-content: space-between; align-items: center; background: #dbe6f2; border-bottom: 1px solid #9ab; padding: 3px 6px; font-size: 10px; font-weight: 700; color: #123; }
.preps-child-title span { color: #456; font-weight: 400; letter-spacing: 2px; }
.preps-pages { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-height: 44px; overflow: auto; border: 1px solid #bbb; background: #fff; }
.preps-page-chip { display: inline-flex; min-width: 22px; height: 20px; align-items: center; justify-content: center; border: 1px solid #999; font-size: 10px; background: #f4f4f4; }
.preps-page-chip.back { background: #e8eef5; }
.preps-hidden { display: none !important; }
.preps-file-info { font-size: 10px; color: #333; padding: 4px; border: 1px solid #bbb; background: #fff; margin: 3px 0; }
.more-menu { position: relative; display: inline-block; }
.master-menubar > button, .master-menubar > .more-menu > button { min-height: 32px; padding: 6px 14px; font-size: 12px; font-weight: 600; }
.master-menubar .more-pop button { min-height: 26px; padding: 4px 10px; font-size: 11px; }
.more-pop { display: none; position: absolute; left: 0; top: calc(100% + 4px); min-width: 150px; max-height: 72vh; overflow-y: auto; padding: 5px; background: #fff; border: 1px solid #999; box-shadow: 0 6px 18px rgba(0,0,0,.18); z-index: 120; }
.more-menu.open .more-pop { display: flex; flex-direction: column; gap: 4px; }
.more-pop button { width: 100%; text-align: left; white-space: nowrap; }
.page-range input { width: 48px; border: 1px solid #999; padding: 2px; font-size: 10px; background: #f3f3f3; color: #333; }
.page-range input[readonly] { cursor: default; }
.master-type-filter { padding: 4px 6px; border-bottom: 1px solid #ccc; background: #f4f4f4; }
.master-type-filter select { width: 100%; padding: 3px; font-size: 11px; }
.master-folder { font-size: 10px; color: #333; padding: 5px 4px 2px; font-weight: 700; }
.detach-host { min-height: 300px; max-height: 70vh; overflow: auto; }
.master-dispatch { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11px; }
.master-dispatch select { max-width: 260px; }
.master-sig-dispatch { margin-top: 4px; max-height: 120px; overflow: auto; }
.master-sig-dispatch select { min-width: 150px; }
.master-sigs { margin-top: 8px; border: 1px solid #aaa; background: #efefef; }
.master-sigs h5 { margin: 0; padding: 3px 6px; background: #dcdcdc; border-bottom: 1px solid #bbb; font-size: 10px; }
.master-modal .preps-result { margin-top: 8px; }
.master-modal { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; border-radius: 0 !important; background: #cfcfcf !important; overflow: hidden !important; }
.master-props .btn.primary { width: 100%; margin-top: 6px; }
.master-modal .modal-head { background: #e5e5e5 !important; border-bottom: 1px solid #999 !important; padding: 5px 10px !important; }
.master-modal .modal-head h3 { color: #111 !important; font-size: 12px !important; }
.master-modal .modal-body { padding: 0 !important; overflow: hidden !important; flex: 1; min-height: 0; }
.master-modal { display: flex !important; flex-direction: column; }
.master-modal .modal-head { flex: 0 0 auto; }
.master-modal .modal-body { flex: 1 1 auto !important; max-height: none !important; overflow: hidden !important; }
.classic-mode .master-layout { height: calc(100% - 35px) !important; }
.master-menubar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 10px; background: #ececec; border-bottom: 1px solid #aaa; font-size: 11px; }
.master-menubar b { color: #111; }
.master-menubar button { border: 1px solid #999; background: #f5f5f5; padding: 3px 8px; font-size: 11px; cursor: pointer; }
.master-layout { display: grid; grid-template-columns: 230px 1fr 320px; height: calc(100vh - 205px); overflow: hidden; }
.master-menubar { flex-wrap: wrap; }
.master-props { padding-bottom: 55px; }
.props-context { background: #eef4fa; border-bottom: 1px solid #b8c9d8; color: #17364a; font-size: 10px; padding: 4px 6px; font-weight: 700; }
.page-props { margin: 5px 6px; padding: 4px; background: #fff; border: 1px solid #bbb; font-size: 10px; color: #333; }
.master-pageorder { margin: 6px; }
.master-pageorder label { display: block; font-size: 10px; color: #222; margin: 3px 0; }
.master-pageorder textarea { width: 100%; box-sizing: border-box; font-size: 10px; border: 1px solid #999; background: #fff; color: #111; }
.master-pageorder small { display: block; color: #666; font-size: 9px; }
.master-list { background: #e9e9e9; border-right: 1px solid #aaa; overflow: auto; padding: 5px; }
.master-list h4, .master-props h4 { margin: 0 0 6px; padding: 3px 6px; background: #dcdcdc; border: 1px solid #b5b5b5; font-size: 11px; }
.master-item { display: flex; align-items: flex-start; gap: 5px; width: 100%; text-align: left; border: 1px solid #b5b5b5; background: #f7f7f7; padding: 5px 7px; margin-bottom: 3px; font-size: 11px; cursor: pointer; box-sizing: border-box; }
.master-item input { margin-top: 2px; }
.master-item span { flex: 1; min-width: 0; }
.master-item span small { display: block; color: #666; font-size: 9px; }
.master-item.active { background: #b9cfd7; border-color: #5f7f8c; }
.master-canvas { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #f4f1e6; padding: 10px; }
#master-preview { flex: 1 1 0; min-height: 150px; overflow: auto; }
.master-sigs { flex: 0 0 210px; min-height: 170px; max-height: 230px; overflow: auto; }
.master-sigs .preps-table th, .master-sigs .preps-table td { white-space: nowrap; padding: 5px 6px; }
.master-preview { display: flex; gap: 18px; align-items: flex-start; width: 100%; overflow: auto; }
.master-side { flex: 1; min-width: 240px; }
@media (max-width: 1200px) {
  .master-layout { grid-template-columns: 190px minmax(0,1fr) 270px; }
  .master-preview { flex-wrap: wrap; }
  .master-side { min-width: 200px; }
}
.master-sheet-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.master-sheet-head b { color: #111; font-size: 12px; }
.master-sheet-head span { color: #555; font-size: 10px; }
.master-preview { display: flex; gap: 18px; align-items: flex-start; }
.master-side { flex: 1; min-width: 0; }
.master-side h5 { text-align: center; margin: 0 0 4px; font-size: 11px; color: #111; }
.master-grid { display: grid; border-top: 2px dashed #333; border-bottom: 2px dashed #333; background: #fff; }
.master-cell { border: 1px solid #999; min-height: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: #111; }
.master-cell.selected { outline: 2px solid #2b7a9b; background: #e6f2f7; }
.master-cell em { font-style: normal; font-size: 10px; color: #2b6d84; line-height: 1; }
.master-props { background: #e9e9e9; border-left: 1px solid #aaa; overflow: auto; padding: 5px; }
.master-props .field label, .master-props .field span { color: #222 !important; }
.master-props .field input, .master-props .field select { background: #fff !important; color: #111 !important; border: 1px solid #999 !important; }
.master-modal .modal-foot { background: #e5e5e5 !important; border-top: 1px solid #999 !important; }
.vp-combos { border: 1px solid var(--line); border-radius: 4px; padding: 4px; }
.vp-combo-row { display: grid; grid-template-columns: 1fr 1fr 72px auto; gap: 4px; margin-bottom: 4px; }
.vp-combo-row select, .vp-combo-row input { min-width: 0; }
.preps-empty-row { color: #777; text-align: center !important; padding: 12px !important; }
.preps-modal { background: #cfcfcf !important; color: #111 !important; }
.preps-modal .modal-head { background: #e8e8e8 !important; border-bottom: 1px solid #aaa !important; }
.preps-modal .modal-head h3 { color: #111 !important; }
.preps-modal .preps-menubar { background: #f2f2f2 !important; color: #111 !important; border-bottom: 1px solid #aaa !important; }
.preps-modal .preps-menubar b, .preps-modal .preps-menu { color: #111 !important; }
.preps-modal .field label, .preps-modal .field span { color: #222 !important; }
.preps-modal .field input, .preps-modal .field select, .preps-modal .field textarea { background: #fff !important; color: #111 !important; border-color: #9e9e9e !important; }
.preps-modal .inline-tip { color: #555 !important; }
.preps-modal .modal-foot { background: #e2e2e2 !important; border-top: 1px solid #aaa !important; }
.preps-modal .preps-right .field input, .preps-modal .preps-right .field select, .preps-modal .preps-right .field textarea { background: #fff !important; color: #111 !important; border: 1px solid #8f8f8f !important; }
.preps-modal .preps-right .field label, .preps-modal .preps-right .field span { color: #222 !important; }
.preps-modal .template-card { background: #f7f7f7 !important; border-color: #a5a5a5 !important; color: #111 !important; }
.preps-modal .template-card small { color: #555 !important; }
.template-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0; }
.template-card { text-align: left; background: #1f2429; border: 1px solid #46515c; color: #cfdae4; border-radius: 3px; padding: 6px; cursor: pointer; }
.template-card:hover { border-color: #7e93a5; }
.template-card svg { width: 100%; height: 38px; background: #e8eef3; }
.template-card b { display: block; font-size: 10px; margin-top: 3px; }
.template-card small { display: block; font-size: 8px; color: #91a2b1; }
.preps-modal .studio-grid { flex: 1; min-height: 0; display: grid !important; grid-template-columns: 360px minmax(0,1fr) !important; gap: 0; }
.preps-modal .studio-grid > .form-stack { overflow-y: auto; padding: 14px; background: #2a3036 !important; border-right: 1px solid #3e4751; }
.preps-modal .studio-grid .form-stack .callout { background: #222a31; border: 1px solid #3e4a55; color: #aebdca; }
.preps-modal .studio-preview { background: #4b5158; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: auto; padding: 24px; }
.preps-modal .studio-preview img { max-width: 100%; max-height: calc(100vh - 160px); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.preps-empty { color: #b8c4ce; font-size: 13px; border: 1px dashed #78838d; padding: 30px 50px; border-radius: 4px; }
.preps-modal .field label, .preps-modal .field span { color: #aebdca; }
.preps-modal .field input, .preps-modal .field select { background: #1f2429 !important; color: #e3ebf2 !important; border-color: #46515c !important; }
.preps-modal .modal-foot { background: #16191d; border-top: 1px solid #3b424a; padding: 8px 14px; flex: 0 0 auto; }
.preps-modal .modal-foot .btn.ghost { color: #c0ccd7; border-color: #4b5763; }
.software-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.software-item { display: flex; gap: 5px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.software-item input { accent-color: var(--teal); }
.software-item span { display: flex; flex-direction: column; }
.software-item b { font-size: 9px; }
.software-item small { font-size: 8px; color: var(--muted); word-break: break-all; }
#imposition-rows td { font-size: 8.5px; }
#pack-result { min-height: 30px; }
.roll-hint { min-height: 34px; padding: 7px 9px; border-radius: 7px; background: #f6faf9; border: 1px dashed #cfe0dc; color: var(--muted); font-size: 9px; line-height: 1.6; }
.roll-hint b { color: var(--teal); }
.price-editor-block { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.price-editor-block:last-child { border-bottom: 0; }
.price-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.price-editor-head b { font-size: 12px; color: var(--navy); }
.form-grid .span-4 { grid-column: 1 / -1; }
.order-item-card.is-exam .order-item-cover { display: none; }

/* ---------- multi-item order ---------- */
.order-item-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 12px; overflow: hidden; }
.order-item-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.order-item-head > div { display: flex; align-items: center; gap: 8px; }
.order-item-head b { font-size: 10.5px; color: var(--navy); }
.order-item-sub { display: flex; align-items: baseline; gap: 8px; margin: 0 12px; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.order-item-sub:first-of-type { border-top: 0; }
.order-item-sub b { font-size: 10px; color: var(--navy); }
.order-item-sub span { font-size: 8.5px; color: var(--muted); }
.order-item-card .form-grid { padding: 6px 12px 10px; }
.order-item-card .field > span { font-size: 8px; }
.item-calc { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.item-calc > div { background: #fbfcfd; padding: 8px 11px; }
.item-calc span { display: block; font-size: 8px; color: var(--muted); }
.item-calc b { display: block; font-size: 13px; color: var(--navy); }
.item-calc small { display: block; font-size: 8px; color: var(--muted-2); }
.item-calc .item-total { background: #f1f7f6; }
.order-total-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 9px; padding: 9px 14px; font-size: 9.5px; }
.order-total-strip span { color: rgba(255,255,255,.65); }
.order-total-strip b { font-size: 13px; color: #fff; }
.settings-inline-actions { padding: 8px 12px; border-top: 1px solid var(--line); background: #fbfcfd; }
.range-row { display: flex; align-items: center; gap: 5px; }
.range-row input { width: 70px; }
.range-row span { color: var(--muted); font-size: 9px; }
.order-item-table td { font-size: 9.5px; }
.order-item-table .cell-sub { font-size: 8px; }
@media (max-width: 820px) {
  .order-item-card .form-grid { grid-template-columns: 1fr 1fr; }
  .order-item-card .form-grid .span-2, .order-item-card .form-grid .span-3 { grid-column: 1 / -1; }
  .item-calc { grid-template-columns: 1fr; }
  .order-total-strip { gap: 8px; }
}
@media (max-width: 820px) {
  .flow-banner { font-size: 9px; gap: 5px; }
  .flow-banner b { padding: 2px 6px; font-size: 9px; }
  .approval-flow { gap: 0; }
  .flow-line { width: 8px; margin: 0 3px; }
  .proc-head { flex-direction: column; }
  .proc-amount { text-align: left; }
  .proc-meta-grid { grid-template-columns: 1fr 1fr; }
  .proc-meta-grid > div:last-child { grid-column: 1 / -1; }
  .form-grid .span-3 { grid-column: span 1; }
}

/* ---------- production ---------- */
.process-timeline { display: flex; flex-direction: column; }
.process-step { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); position: relative; }
.process-step:last-child { border-bottom: 0; }
.process-index { width: 29px; height: 29px; border-radius: 8px; background: #f2f5f6; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; flex: 0 0 auto; }
.process-step.done .process-index { background: var(--green-bg); color: var(--green); }
.process-step.active .process-index { background: var(--orange); color: #fff; }
.process-index svg { width: 15px; height: 15px; }
.process-main { flex: 1; min-width: 0; }
.process-title { display: flex; gap: 8px; align-items: center; }
.process-title b { font-size: 11.5px; color: var(--navy); }
.process-main > small { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }
.process-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.process-progress span { font-size: 8.5px; color: var(--muted); white-space: nowrap; }
.process-main p { font-size: 9px; color: var(--muted-2); margin-top: 4px; }
.process-action { align-self: center; }
.report-list { display: flex; flex-direction: column; }
.report-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.report-row:last-child { border-bottom: 0; }
.report-row b { display: block; font-size: 10.5px; color: var(--ink); }
.report-row small { display: block; font-size: 8.5px; color: var(--muted); }
.report-qty { text-align: right; }
.report-qty .ok { color: var(--green); font-size: 11px; font-weight: 700; }
.report-qty .bad { color: var(--red); font-size: 9px; margin-left: 5px; }
.report-qty small { display: block; font-size: 8px; color: var(--muted-2); }
.material-table { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }

/* ---------- materials ---------- */
.converter { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.converter-form { min-width: 0; }
.converter-result { background: #f8fafb; border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.convert-badge { display: inline-block; background: var(--navy); color: #fff; border-radius: 999px; padding: 3px 11px; font-size: 10px; margin-bottom: 10px; }
.convert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.convert-grid > div { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
.convert-grid span { display: block; font-size: 8px; color: var(--muted); }
.convert-grid b { display: block; font-size: 12px; color: var(--navy); }
.converter-note { grid-column: span 2; border-top: 1px solid var(--line-soft); padding-top: 11px; }
.converter-note b { font-size: 10px; color: var(--navy); }
.converter-note p { font-size: 9px; color: var(--muted); line-height: 1.7; margin-top: 3px; }
.material-side .card-body { padding-bottom: 14px; }
.low-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.low-item:last-child { border-bottom: 0; }
.low-item b { display: block; font-size: 10px; color: var(--ink); }
.low-item small { display: block; font-size: 8px; color: var(--muted); }
.low-item > span { font-size: 10px; color: var(--red); white-space: nowrap; }
.standards > div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 9.5px; border-bottom: 1px dashed var(--line-soft); }
.standards > div:last-child { border-bottom: 0; }
.standards span { color: var(--muted); } .standards b { color: var(--navy); }

/* ---------- scan ---------- */
.scan-video-wrap { position: relative; background: #0b202b; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.scan-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; width: 150px; height: 150px; }
.scan-frame span { position: absolute; width: 26px; height: 26px; border-color: var(--teal-2); border-style: solid; }
.scan-frame span:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; border-radius: 6px 0 0 0; }
.scan-frame span:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; border-radius: 0 6px 0 0; }
.scan-frame span:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 6px; }
.scan-frame span:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; border-radius: 0 0 6px 0; }
.scan-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 9px; color: rgba(255,255,255,.55); background: rgba(0,0,0,.28); padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.scan-actions { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.file-btn { position: relative; cursor: pointer; }
.scan-manual { display: flex; gap: 7px; margin-top: 10px; }
.scan-manual input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 11px; outline: none; }
.qr-entry-list { display: flex; flex-direction: column; gap: 7px; }
.qr-entry { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 11px; text-align: left; }
.qr-entry:hover { border-color: #b9cccc; }
.qr-entry.static { cursor: default; opacity: .8; }
.qr-entry-ico { width: 33px; height: 33px; border-radius: 8px; background: #eef7f6; color: var(--teal); display: flex; align-items: center; justify-content: center; }
.qr-entry-ico svg { width: 17px; height: 17px; }
.qr-entry div { flex: 1; }
.qr-entry b { display: block; font-size: 11px; color: var(--navy); }
.qr-entry small { display: block; font-size: 8.5px; color: var(--muted); }
.qr-entry > svg { width: 14px; height: 14px; color: var(--muted-2); }
.use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.use-item { border-left: 2px solid var(--orange); padding-left: 13px; }
.use-item span { font-size: 9px; color: var(--orange); font-weight: 700; letter-spacing: 1px; }
.use-item h4 { font-size: 13px; color: var(--navy); margin: 2px 0 4px; }
.use-item p { font-size: 10px; color: var(--muted); line-height: 1.7; }
.scan-result-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.scan-badge { width: 43px; height: 43px; border-radius: 11px; background: var(--orange-bg); color: var(--orange); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.scan-badge.teal { background: #eef7f6; color: var(--teal); }
.scan-badge svg { width: 22px; height: 22px; }
.scan-result-head h3 { font-size: 17px; color: var(--navy); }
.scan-result-head p { font-size: 10px; color: var(--muted); }
.scan-process-list { display: flex; flex-direction: column; margin-top: 12px; }
.scan-process-list > div { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 10px; }
.scan-process-list .dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd5db; }
.scan-process-list .done .dot { background: var(--green); }
.scan-process-list b { flex: 1; font-weight: 500; color: var(--ink); }
.scan-process-list small { color: var(--muted); }
.qr-modal { text-align: center; }
.qr-svg { width: 230px; height: 230px; margin: 0 auto 10px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.qr-svg svg { width: 100%; height: 100%; display: block; }
.qr-modal p { font-size: 10.5px; color: var(--muted); }
.qr-url { margin: 11px 0; background: #f6f8f9; border: 1px dashed var(--line); border-radius: 7px; padding: 8px; font-size: 9px; color: var(--muted); word-break: break-all; }
.qr-actions { display: flex; gap: 7px; justify-content: center; }

/* ---------- finance ---------- */
.approval-list { display: flex; flex-direction: column; gap: 7px; }
.approval-item { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: #fcfdfd; }
.approval-item b { display: block; font-size: 10.5px; color: var(--navy); }
.approval-item small { display: block; font-size: 8.5px; color: var(--muted); }
.approval-actions { display: flex; gap: 5px; margin-top: 7px; }
.payroll-list { display: flex; flex-direction: column; }
.payroll-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.payroll-row:last-child { border-bottom: 0; }
.payroll-row > div:nth-child(2) { flex: 1; }
.payroll-row b { display: block; font-size: 10.5px; color: var(--ink); }
.payroll-row small { display: block; font-size: 8.5px; color: var(--muted); }
.payroll-row strong { font-size: 11px; color: var(--navy); }
.cost-compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.cost-compare > div { background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.cost-compare span { display: block; font-size: 8px; color: var(--muted); }
.cost-compare b { display: block; font-size: 16px; color: var(--navy); }
.cost-compare small { font-size: 8px; }
.cost-compare .over b { color: var(--red); } .cost-compare .under b { color: var(--green); }
.cost-bars { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cost-bars > div { display: flex; justify-content: space-between; padding: 7px 9px; border-bottom: 1px solid var(--line-soft); font-size: 10px; }
.cost-bars > div:last-child { border-bottom: 0; }
.cost-bars span { color: var(--muted); } .cost-bars b { color: var(--navy); }

/* ---------- system / settings ---------- */
.lan-list { display: flex; flex-direction: column; gap: 6px; }
.lan-row { display: flex; align-items: center; gap: 8px; background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.lan-index { width: 22px; height: 22px; border-radius: 6px; background: #e9f5f2; color: var(--teal); font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.lan-row code { flex: 1; font-size: 10.5px; color: var(--navy); font-family: Consolas, monospace; }
.sys-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sys-facts > div { border-top: 1px solid var(--line-soft); padding-top: 7px; }
.sys-facts span { display: block; font-size: 8px; color: var(--muted); }
.sys-facts b { display: block; font-size: 9.5px; color: var(--ink-soft); word-break: break-all; }
.disk-list { display: flex; flex-direction: column; gap: 12px; }
.disk-head { display: flex; justify-content: space-between; font-size: 9.5px; margin-bottom: 4px; }
.disk-head span { color: var(--muted); }
.scan-input { display: flex; gap: 7px; margin-bottom: 9px; }
.scan-input input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px; font-size: 10.5px; min-width: 0; }
.scan-result-area { margin-top: 12px; background: #f8fafb; border: 1px solid var(--line); border-radius: 9px; padding: 10px; max-height: 330px; overflow-y: auto; }
.scan-summary { display: flex; gap: 0; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
.scan-summary > div { flex: 1; padding: 0 7px; border-right: 1px solid var(--line); }
.scan-summary > div:last-child { border-right: 0; }
.scan-summary span { display: block; font-size: 7.5px; color: var(--muted); }
.scan-summary b { display: block; font-size: 11px; color: var(--navy); }
.ext-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.ext-cloud span { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 8px; color: var(--muted); }
.ext-cloud b { color: var(--ink); font-weight: 600; }
.scan-suggest p { display: flex; gap: 5px; font-size: 8.5px; color: #4b635e; margin-top: 5px; }
.scan-suggest svg { width: 12px; height: 12px; flex: 0 0 auto; margin-top: 1px; }
.recent-files { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.recent-files > div { display: flex; justify-content: space-between; gap: 8px; font-size: 8px; padding: 2px 0; }
.recent-files b { color: var(--ink-soft); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-files small { color: var(--muted); white-space: nowrap; }
.software-list { display: flex; flex-direction: column; }
.software-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.software-row:last-child { border-bottom: 0; }
.software-mark { width: 24px; height: 24px; border-radius: 6px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: var(--teal); }
.software-row > div:nth-child(2) { flex: 1; min-width: 0; }
.software-row b { display: block; font-size: 9px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.software-row small { display: block; font-size: 7.5px; color: var(--muted); }
.software-row > span { font-size: 8px; color: var(--muted); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(6,25,34,.5); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 20px; overflow-y: auto;
  opacity: 0; transition: opacity .18s;
}
.modal-backdrop.show { opacity: 1; }
.modal-card { width: min(560px, 100%); background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(4,18,25,.3); transform: translateY(10px) scale(.99); transition: .18s; overflow: hidden; }
.modal-backdrop.show .modal-card { transform: none; }
.modal-card.sm { width: min(430px, 100%); }
.modal-card.md { width: min(720px, 100%); }
.modal-card.lg { width: min(860px, 100%); }
.modal-card.xl { width: min(1080px, 100%); }
.modal-card.full { width: min(1240px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal-head h3 { font-size: 15px; color: var(--navy); }
.modal-close { width: 30px; height: 30px; }
.modal-body { padding: 18px 20px; max-height: 76vh; overflow-y: auto; }
.modal-card.full .modal-body { max-height: 78vh; }
.modal-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line-soft); padding: 11px 20px; z-index: 2; }
.confirm-text { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.calc-modal .modal-body { padding: 14px; }
.calc-modal .modal-head { padding: 12px 18px; }
.calc-modal .modal-foot { padding: 10px 16px; }

/* ---------- assistant ---------- */
.assistant-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px; max-width: 96vw; z-index: 90;
  background: #f8fafb; border-left: 1px solid var(--line); transform: translateX(100%); transition: .22s;
  display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(4,18,25,.12);
}
.assistant-drawer.open { transform: none; }
.drawer-scrim { position: fixed; inset: 0; z-index: 85; background: rgba(6,25,34,.3); opacity: 0; visibility: hidden; transition: .2s; }
.drawer-scrim.show { opacity: 1; visibility: visible; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; background: var(--navy); color: #fff; }
.assistant-title { display: flex; align-items: center; gap: 10px; }
.assistant-title > svg { width: 22px; height: 22px; color: #e7a36d; }
.assistant-title b { display: block; font-size: 13px; }
.assistant-title small { display: block; font-size: 8.5px; color: rgba(255,255,255,.45); }
.assistant-head .icon-btn { color: rgba(255,255,255,.6); }
.assistant-body { flex: 1; overflow-y: auto; padding: 17px 13px; }
.chat-row { display: flex; gap: 7px; margin-bottom: 13px; align-items: flex-start; }
.chat-row.user { justify-content: flex-end; }
.chat-avatar { width: 25px; height: 25px; border-radius: 7px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.chat-avatar svg { width: 14px; height: 14px; }
.chat-content { min-width: 0; }
.chat-bubble { background: #fff; border: 1px solid var(--line); border-radius: 4px 11px 11px 11px; padding: 9px 11px; font-size: 11px; line-height: 1.7; color: var(--ink-soft); }
.chat-row.user .chat-bubble { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 11px 4px 11px 11px; max-width: 85%; }
.chat-bubble.loading { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.chat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.chat-card { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 7px 8px; }
.chat-card small { display: block; font-size: 7.5px; color: var(--muted); }
.chat-card b { display: block; font-size: 11px; color: var(--navy); }
.chat-card span { display: block; font-size: 7.5px; color: var(--muted-2); }
.chat-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.chat-actions button { border: 1px solid #cfe2df; background: #f4fbf9; color: var(--teal); border-radius: 99px; padding: 4px 9px; font-size: 8.5px; }
.assistant-suggest { padding: 0 13px 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.assistant-suggest button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 8px; font-size: 8px; color: var(--muted); }
.assistant-suggest button:hover { border-color: var(--teal); color: var(--teal); }
.assistant-input { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.assistant-input input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 11px; outline: none; }
.assistant-input .btn { padding: 0 12px; }

/* ---------- toast / empty ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 16px); z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 11.5px;
  display: flex; align-items: center; gap: 8px; opacity: 0; transition: .22s; box-shadow: 0 15px 40px rgba(4,18,25,.25); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: #7f1d1d; }
.toast-info { background: #164e63; }
.toast-icon { width: 17px; height: 17px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 10px; flex: 0 0 auto; }
.empty-state { text-align: center; padding: 90px 20px; }
.empty-icon { width: 50px; height: 50px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--orange); margin: 0 auto 13px; }
.empty-state h3 { font-size: 16px; color: var(--navy); margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: 11px; margin-bottom: 14px; }

/* ---------- public ---------- */
.public-body { background: #f4f0e7; background-image: radial-gradient(circle at 80% 0, rgba(15,118,110,.08), transparent 30%); }
.public-shell { min-height: 100vh; }
.public-head { height: 74px; padding: 0 7vw; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.7); border-bottom: 1px solid rgba(12,43,58,.08); backdrop-filter: blur(12px); }
.public-brand { display: flex; align-items: center; gap: 10px; }
.public-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; }
.public-brand b { display: block; font-size: 13px; color: var(--navy); }
.public-brand small { display: block; font-size: 8.5px; color: var(--muted); letter-spacing: 1px; }
.public-badge { font-size: 9px; color: var(--teal); border: 1px solid #b9ded8; background: #f1fbf8; padding: 4px 10px; border-radius: 99px; }
.public-main { max-width: 880px; margin: 0 auto; padding: 50px 24px 80px; }
.public-shell.narrow { max-width: 680px; margin: 0 auto; }
.public-hero { margin-bottom: 30px; }
.public-hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.24; color: var(--navy); letter-spacing: -1px; }
.public-hero p { color: var(--muted); font-size: 12.5px; margin-top: 13px; max-width: 590px; }
.public-form { background: #fff; border-radius: 18px; padding: 26px; box-shadow: 0 20px 60px rgba(12,43,58,.08); border: 1px solid rgba(12,43,58,.06); }
.public-form .form-section { background: #fcfdfd; }
.public-note { text-align: center; font-size: 9.5px; color: var(--muted-2); margin-top: 10px; }
.public-success { margin-top: 20px; background: #fff; border-radius: 18px; padding: 40px 25px; text-align: center; border: 1px solid rgba(12,43,58,.06); box-shadow: var(--shadow); }
.success-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--green-bg); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.success-icon svg { width: 28px; height: 28px; }
.public-success h2 { font-size: 24px; color: var(--navy); margin-bottom: 7px; }
.public-success p { color: var(--muted); font-size: 12px; }
.success-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.track-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.track-status span { font-size: 11px; color: var(--muted); }
.public-foot { text-align: center; padding: 24px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.public-foot span { color: var(--muted-2); font-size: 8.5px; }
.public-error { text-align: center; padding: 100px 20px; }
.public-error h2 { color: var(--navy); }
.public-error p { color: var(--muted); margin-top: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-metrics { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .detail-metrics > div:nth-child(4) { border-left: 0; padding-left: 0; }
  .calculator-layout { grid-template-columns: 1fr; }
  .calc-result-side { max-height: none; }
  .card.span-7, .card.span-8, .finance-grid > .span-8, .system-grid > .span-7 { grid-column: span 7; }
  .card.span-5, .card.span-4, .finance-grid > .span-4, .system-grid > .span-5 { grid-column: span 5; }
  .materials-layout > .card:first-child { grid-column: span 7; }
  .material-side { grid-column: span 5; }
  .scan-grid > .scan-card { grid-column: span 7; }
  .scan-grid > .card:nth-child(2) { grid-column: span 5; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: .22s; box-shadow: 20px 0 60px rgba(4,18,25,.2); }
  .sidebar.open { transform: none; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(6,25,34,.35); opacity: 0; visibility: hidden; transition: .2s; }
  .sidebar-scrim.show { opacity: 1; visibility: visible; }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 18px; }
  .view { padding: 22px 20px 96px; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(255,255,255,.94); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); justify-content: space-around;
  }
  .mobile-nav button { border: 0; background: transparent; color: var(--muted); font-size: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 8px; border-radius: 7px; }
  .mobile-nav button.active { color: var(--teal); background: #eef8f6; }
  .mobile-nav svg { width: 19px; height: 19px; }
  .lan-pill { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { min-height: 100vh; padding: 30px 20px; background: linear-gradient(160deg, #0b2734 0, #0b2734 40%, #f8f5ef 40%); align-items: flex-start; }
  .login-card { background: #fff; padding: 26px 22px; border-radius: 18px; margin-top: 9vh; box-shadow: 0 25px 70px rgba(4,18,25,.16); }
  .mobile-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
  .mobile-logo b { color: var(--navy); font-size: 18px; letter-spacing: 1px; }
  .login-card h2 { font-size: 23px; }
  .login-card > p { margin-bottom: 18px; }
}
@media (max-width: 820px) {
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-head h1 { font-size: 25px; }
  .page-actions { width: 100%; justify-content: flex-start; }
  .dash-grid, .detail-grid, .system-grid, .finance-grid, .settings-grid, .materials-layout, .scan-grid { grid-template-columns: 1fr; }
  .card.span-4, .card.span-5, .card.span-6, .card.span-7, .card.span-8, .card.span-12,
  .finance-grid > .span-4, .finance-grid > .span-5, .finance-grid > .span-7, .finance-grid > .span-8,
  .system-grid > .span-5, .system-grid > .span-6, .system-grid > .span-7, .system-grid > .span-12,
  .materials-layout > .card:first-child, .material-side, .scan-grid > .scan-card, .scan-grid > .card:nth-child(2) { grid-column: span 1; }
  .settings-grid > .span-6 { grid-column: span 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { padding: 13px; }
  .kpi-value { font-size: 20px; }
  .mini-kpis { flex-wrap: wrap; }
  .mini-kpis > div { flex: 1 1 50%; border-bottom: 1px solid var(--line-soft); }
  .mini-kpis > div:nth-child(2n) { border-right: 0; }
  .detail-metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
  .detail-metrics > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .form-grid, .form-grid.three, .form-grid.four { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: span 2; }
  .converter { grid-template-columns: 1fr; }
  .converter-note { grid-column: span 1; }
  .seven-layout { grid-template-columns: 1fr; }
  .use-grid { grid-template-columns: 1fr; }
  .public-main { padding: 32px 16px 70px; }
  .public-form { padding: 18px; }
  .public-form .form-grid.three { grid-template-columns: 1fr; }
  .quote-detail-head { flex-direction: column; }
  .quote-detail-total { text-align: left; }
  .modal-backdrop { padding: 2vh 8px; }
  .modal-card { border-radius: 13px; }
  .modal-body { max-height: 84vh; padding: 14px; }
  .assistant-drawer { width: 100vw; }
  .topbar { height: 64px; }
  .page-id h2 { font-size: 15px; }
  .user-copy, .user-chip > svg { display: none; }
  .search-box { min-width: 0; width: 100%; }
  .list-toolbar { flex-wrap: wrap; }
  .toolbar-filters { width: 100%; }
  .pipeline { overflow-x: auto; }
  .pipe-step { min-width: 62px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 680px; }
  .data-table.compact { min-width: 500px; }
  /* 手机端把订单/工单表折叠成可读卡片，避免横向拖拽 */
  #orders-table, #wo-table { min-width: 0; }
  #orders-table thead, #wo-table thead { display: none; }
  #orders-table tbody, #wo-table tbody { display: block; }
  #orders-table tbody tr, #wo-table tbody tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px;
    padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: #fff;
  }
  #orders-table tbody tr:last-child, #wo-table tbody tr:last-child { border-bottom: 0; }
  #orders-table tbody tr td, #wo-table tbody tr td { display: block; border: 0; padding: 0; font-size: 11px; }
  #orders-table tbody tr td:nth-child(1), #wo-table tbody tr td:nth-child(1) { grid-column: 1 / -1; margin-bottom: 5px; }
  #orders-table tbody tr td:nth-child(2), #wo-table tbody tr td:nth-child(2) { grid-column: 1; }
  #orders-table tbody tr td:nth-child(3), #wo-table tbody tr td:nth-child(3) { grid-column: 2; text-align: right; color: var(--muted); font-size: 10px; }
  #orders-table tbody tr td:nth-child(4), #wo-table tbody tr td:nth-child(4) { grid-column: 1; }
  #orders-table tbody tr td:nth-child(5), #wo-table tbody tr td:nth-child(5) { grid-column: 2; text-align: right; }
  #orders-table tbody tr td:nth-child(6), #wo-table tbody tr td:nth-child(6) { grid-column: 1; }
  #orders-table tbody tr td:nth-child(7), #wo-table tbody tr td:nth-child(7) { grid-column: 2; text-align: right; }
  #orders-table tbody tr td:nth-child(8), #wo-table tbody tr td:nth-child(8) { display: none; }
  #orders-table tbody tr td:nth-child(4)::before { content: "数量 "; color: var(--muted-2); font-size: 9px; }
  #orders-table tbody tr td:nth-child(5)::before { content: "报价 "; color: var(--muted-2); font-size: 9px; }
  #orders-table tbody tr td:nth-child(6)::before { content: "交期 "; color: var(--muted-2); font-size: 9px; }
  #wo-table tbody tr td:nth-child(4)::before { content: "进度 "; color: var(--muted-2); font-size: 9px; }
  #wo-table tbody tr td:nth-child(5)::before { content: "完工 "; color: var(--muted-2); font-size: 9px; }
  /* 客户表手机端卡片 */
  #customers-table { min-width: 0; }
  #customers-table thead { display: none; }
  #customers-table tbody { display: block; }
  #customers-table tbody tr.customer-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px;
    padding: 13px 15px; border-bottom: 1px solid var(--line-soft); background: #fff;
  }
  #customers-table tbody tr.customer-row td { display: block; border: 0; padding: 0; font-size: 10.5px; }
  #customers-table tbody tr.customer-row td[data-label]::before {
    content: attr(data-label); display: block; color: var(--muted-2); font-size: 8px; margin-bottom: 1px;
  }
  #customers-table tbody tr.customer-row td:nth-child(1) { grid-column: 1 / -1; margin-bottom: 4px; }
  #customers-table tbody tr.customer-row td:nth-child(1)::before { display: none; }
  #customers-table tbody tr.customer-row td:nth-child(2) { grid-column: 1; }
  #customers-table tbody tr.customer-row td:nth-child(3) { grid-column: 2; }
  #customers-table tbody tr.customer-row td:nth-child(4) { grid-column: 1; }
  #customers-table tbody tr.customer-row td:nth-child(5) { grid-column: 2; }
  #customers-table tbody tr.customer-row td:nth-child(6) { grid-column: 1 / -1; }
  #customers-table tbody tr.customer-row td:nth-child(7) { grid-column: 1 / -1; }
  #customers-table tbody tr.customer-row td:nth-child(8) { grid-column: 1 / -1; }
  #customers-table tbody tr.customer-row td:nth-child(8)::before { display: none; }
  #customers-table .customer-actions { display: flex; gap: 6px; border-top: 1px dashed var(--line); padding-top: 7px; margin-top: 3px; }
  #customers-table .customer-actions .btn { flex: 0 0 auto; }
  #customers-table .address-cell, #customers-table .note-cell { max-width: none; }
  .customer-kpis > div { flex: 1 1 50%; }
  #orders-table tbody tr td:nth-child(1) .cell-sub, #wo-table tbody tr td:nth-child(1) .cell-sub { font-size: 10px; }
  #orders-table .table-empty, #wo-table .table-empty { grid-column: 1 / -1; }
  #materials-table { min-width: 720px; }
  .calc-grid, .calc-grid.small { grid-template-columns: 1fr 1fr; }
  .formula-strip { grid-template-columns: 1fr 1fr; }
  .cost-line { grid-template-columns: 1fr auto; }
  .cost-line small { display: none; }
  .quote-kpi { grid-template-columns: 1fr 1fr; }
  .modal-foot { flex-wrap: wrap; }
  .public-head { padding: 0 16px; }
}
@media (max-width: 480px) {
  .view { padding: 16px 13px 92px; }
  .page-head h1 { font-size: 22px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 18px; }
  .form-grid, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .detail-metrics { grid-template-columns: 1fr 1fr; }
  .quote-kpi { grid-template-columns: 1fr; }
  .mini-calc { grid-template-columns: 1fr 1fr; }
  .scan-manual { flex-direction: column; }
  .qr-actions { flex-wrap: wrap; }
  .demo-grid { grid-template-columns: 1fr; }
  .public-hero h1 { font-size: 30px; }
}

/* ---------- print utility ---------- */
@media print {
  .sidebar, .topbar, .mobile-nav, .page-actions, .assistant-drawer, .drawer-scrim, .toast { display: none !important; }
  .main-shell { margin: 0; }
  .view { padding: 0; }
  body { background: #fff; }
  .plate-detail-section { display: block !important; overflow: visible !important; }
  .plate-detail-section .data-table { width: 100% !important; font-size: 8pt !important; page-break-inside: auto; }
  .plate-detail-section th, .plate-detail-section td { padding: 2px 3px !important; }
  .master-modal, .modal-scrim, .modal-card { display: none !important; }
}

.customer-picker { display: flex; gap: 6px; align-items: center; }
.customer-pick-btn { flex: 1; min-height: 38px; text-align: left; padding: 7px 11px; border: 1px solid #cbd8e1; border-radius: 8px; background: #fff; font-size: 13px; color: #173f4f; cursor: pointer; }
.customer-pick-list { max-height: 380px; overflow-y: auto; border: 1px solid #e2e8ee; border-radius: 10px; background: #fbfcfd; }
.customer-pick-row { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-bottom: 1px solid #edf1f4; background: transparent; text-align: left; cursor: pointer; }
.customer-pick-row:hover, .customer-pick-row.active { background: #e8f2f5; }
.customer-pick-row b { display: block; font-size: 13px; color: #173f4f; }
.customer-pick-row small { display: block; font-size: 10px; color: #6b7f8a; margin-top: 2px; }
.customer-pick-row span { font-size: 11px; color: #5b707b; white-space: nowrap; }

.multi-dd { position: relative; width: 100%; min-width: 150px; }
.multi-dd summary { list-style: none; cursor: pointer; padding: 8px 10px; border: 1px solid #cbd8e1; border-radius: 8px; background: #fff; font-size: 12px; color: #173f4f; }
.multi-dd summary::-webkit-details-marker { display: none; }
.multi-dd summary::after { content: "▾"; float: right; color: #6b7f8a; }
.multi-dd-menu { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid #cbd8e1; border-radius: 8px; box-shadow: 0 12px 30px rgba(9,40,55,.16); }
.multi-dd-item { display: flex; align-items: center; gap: 6px; padding: 6px 7px; border-radius: 5px; font-size: 12px; cursor: pointer; }
.multi-dd-item:hover { background: #edf5f7; }
.multi-dd-item small { color: #7b8d97; margin-left: auto; font-size: 9px; }

.approval-config-table { table-layout: fixed; min-width: 900px; }
.approval-config-table th, .approval-config-table td { vertical-align: top; padding: 12px 10px; }
.approval-config-table .approval-flow-name { width: 150px; white-space: nowrap; }
.approval-config-table .approval-flow-name .cell-sub { white-space: nowrap; line-height: 1.7; }
.approval-config-table .multi-dd { min-width: 180px; }

.settings-grid .workflow-step-edit { grid-template-columns: 26px minmax(100px,1fr) 58px 82px !important; }
.workflow-actions { display: flex; gap: 4px; justify-content: flex-end; }
.workflow-actions .mini-link { padding: 0 2px; font-size: 12px; }

.multi-dd-menu { min-width: 320px; width: max-content; max-width: 86vw; }
.multi-dd-item { white-space: nowrap; align-items: center; }
.multi-dd-item small { margin-left: 18px; white-space: nowrap; }
.multi-dd summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.settings-grid, .settings-grid .card, .settings-grid .card-body { overflow: visible !important; }
.process-group-row { overflow: visible !important; position: relative; }
.process-group-row:has(.multi-dd[open]) { z-index: 60; }
.multi-dd[open] { z-index: 1000; }
.multi-dd-menu { max-height: 60vh; z-index: 1200; box-shadow: 0 18px 45px rgba(9,40,55,.22); }
.process-group-row .multi-dd-menu { left: auto; right: 0; }

.print-preview-mask { position: fixed; inset: 0; z-index: 9999; background: rgba(8,24,32,.62); display: flex; align-items: center; justify-content: center; padding: 24px; }
.print-preview-box { width: min(1100px, 96vw); height: min(88vh, 900px); background: #fff; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.print-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #e2e8ee; }
.print-preview-head b { font-size: 14px; color: #173f4f; }
.print-preview-body { flex: 1; width: 100%; border: 0; background: #eef2f4; }
.print-preview-actions { display: flex; gap: 8px; }

.sign-area { border: 1px solid #d7e2e8; border-radius: 10px; padding: 8px 10px; background: #fbfcfd; }
.sign-area-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #345; margin-bottom: 4px; }
.sign-pad { width: 100%; height: 180px; background: #fff; border: 1px dashed #b9cbd4; border-radius: 8px; touch-action: none; display: block; }
