:root {
  --ink: #18222c;
  --muted: #73808a;
  --line: #e3e8eb;
  --paper: #f7f9f8;
  --white: #ffffff;
  --teal: #087f78;
  --teal-dark: #06655f;
  --teal-soft: #e4f4f1;
  --amber: #c27b18;
  --amber-soft: #fff3dc;
  --red: #b64d45;
  --red-soft: #fff0ee;
  --green: #2c8a65;
  --shadow: 0 8px 24px rgba(33, 52, 60, 0.05);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 238px; min-height: 100vh; background: #15383a; color: #eef7f4; display: flex; flex-direction: column; padding: 26px 16px 18px; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 10px 37px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.brand-lockup strong, .brand-lockup span, .operator-card strong, .operator-card span { display: block; }
.brand-lockup strong { font-size: 16px; letter-spacing: 0; }
.brand-lockup span { color: #9db8b5; font-size: 10px; letter-spacing: 1px; margin-top: 3px; text-transform: uppercase; }
.nav-list { display: grid; gap: 6px; }
.nav-item { color: #b4cbca; text-decoration: none; padding: 12px 13px; display: flex; gap: 12px; align-items: center; border-radius: 6px; transition: background .18s, color .18s; }
.nav-item:hover, .nav-item.active { color: #fff; background: #215354; }
.nav-item.muted { margin-top: 19px; color: #91aaa8; }
.nav-icon { width: 17px; text-align: center; font-size: 17px; color: #99ceca; }
.sidebar-footer { margin-top: auto; }
.environment-tag { display: flex; align-items: center; gap: 7px; color: #9db8b5; font-size: 11px; padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.1); }
.status-dot { width: 7px; height: 7px; background: #69c28f; border-radius: 50%; box-shadow: 0 0 0 3px rgba(105,194,143,.15); }
.operator-card { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 8px 0; display: flex; align-items: center; gap: 10px; }
.operator-card strong { font-size: 12px; }.operator-card span { color: #9db8b5; font-size: 11px; margin-top: 4px; }.avatar { width: 30px; height: 30px; border-radius: 50%; background: #c7e6df; color: #17534f; display: grid; place-items: center; font-weight: 800; }.operator-card .icon-button { margin-left: auto; color: #a6c0be; }
.main-content { width: calc(100% - 238px); max-width: 1600px; margin: 0 auto; padding: 0 42px 22px; }
.topbar { height: 73px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }.breadcrumb { color: var(--muted); font-size: 12px; display: flex; gap: 10px; }.breadcrumb strong { color: var(--ink); }.breadcrumb b { font-weight: 400; color: #b5bec2; }.topbar-actions { display: flex; align-items: center; gap: 12px; }.last-sync { font-size: 11px; color: var(--muted); margin-right: 8px; }.last-sync strong { color: var(--green); font-weight: 600; }
.outline-button, .primary-button, .icon-button, .text-button { border: 0; background: transparent; }.outline-button { border: 1px solid var(--line); color: #546169; padding: 8px 12px; border-radius: 5px; }.outline-button:hover { border-color: var(--teal); color: var(--teal); }.primary-button { background: var(--teal); color: #fff; padding: 9px 14px; border-radius: 5px; font-weight: 700; box-shadow: 0 4px 12px rgba(8,127,120,.18); }.primary-button:hover { background: var(--teal-dark); }
.page-heading { display: flex; justify-content: space-between; align-items: end; padding: 34px 0 25px; }.eyebrow { color: var(--teal); letter-spacing: 1.4px; font-size: 10px; font-weight: 800; margin: 0 0 8px; }.page-heading h1 { font-family: Georgia, "Times New Roman", serif; font-size: 32px; letter-spacing: 0; margin: 0; font-weight: 700; }.page-subtitle { color: var(--muted); margin: 8px 0 0; }.date-control { border: 1px solid var(--line); background: var(--white); border-radius: 5px; padding: 10px 13px; display: flex; align-items: center; gap: 9px; color: #536169; font-size: 12px; }.calendar-icon { color: var(--teal); }.chevron { margin-left: 11px; color: #a2adb1; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }.metric-card { position: relative; overflow: hidden; display: block; width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 19px 20px 16px; min-height: 125px; box-shadow: var(--shadow); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }.metric-card:hover { transform: translateY(-1px); border-color: #8dbab6; box-shadow: 0 7px 18px rgba(34,59,58,.1); }.metric-card:focus-visible { outline: 3px solid rgba(8,127,120,.25); outline-offset: 2px; }.metric-card.active { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: 0 7px 20px rgba(8,127,120,.2); }.metric-label { display: block; color: var(--muted); font-size: 12px; }.metric-card.active .metric-label { color: #b9e2dc; }.metric-value { display: block; font-family: Georgia, serif; font-size: 34px; line-height: 1; margin: 11px 0 14px; }.metric-foot { display: flex; gap: 7px; color: #98a3a8; font-size: 11px; }.metric-card.active .metric-foot, .metric-card.active .metric-note, .metric-card.active .danger-note { color: #d9f2ef; }.trend { color: var(--green); font-weight: 700; }.metric-card.active .trend { color: #e0faee; }.metric-note { color: #9aa5a9; }.danger-note { color: var(--red); }.metric-icon { position: absolute; right: 18px; top: 17px; width: 31px; height: 31px; border-radius: 50%; background: rgba(8,127,120,.1); color: var(--teal); display: grid; place-items: center; font-size: 18px; }.metric-card.active .metric-icon { color: #c5efea; background: rgba(255,255,255,.13); }.metric-icon.amber { color: var(--amber); background: var(--amber-soft); }.metric-icon.green { color: var(--green); background: #e7f7ed; }.metric-icon.red { color: var(--red); background: var(--red-soft); }
.board-section { margin-top: 31px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }.section-toolbar { min-height: 73px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.section-title { display: flex; align-items: center; gap: 9px; }.section-title h2, .panel-heading h2 { margin: 0; font-size: 17px; }.count-pill { font-size: 11px; color: var(--teal); background: var(--teal-soft); padding: 4px 8px; border-radius: 20px; }.toolbar-controls { display: flex; align-items: center; gap: 8px; }.search-box { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; height: 34px; color: #98a5aa; }.search-box input { width: 196px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }.select-control { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23808d93' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; border: 1px solid var(--line); border-radius: 5px; padding: 0 29px 0 10px; height: 34px; color: #58666c; font-size: 12px; }.filter-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 5px; color: #849197; }.filter-button.active { color: var(--red); background: var(--red-soft); border-color: #efc0bc; }
.board-table-wrap { overflow-x: auto; }.workorder-table { width: 100%; min-width: 1100px; border-collapse: collapse; }.workorder-table th { color: #89959b; font-size: 11px; font-weight: 600; text-align: left; padding: 13px 17px; background: #fbfcfc; white-space: nowrap; }.workorder-table td { padding: 17px; border-top: 1px solid #edf0f1; vertical-align: middle; font-size: 12px; }.workorder-table tr:hover td { background: #fbfdfc; }.actions-head { text-align: right !important; }.job-id { color: var(--teal); font-weight: 800; font-size: 12px; }.job-customer { color: var(--muted); font-size: 11px; margin-top: 6px; }.product-name { font-weight: 700; }.product-spec { color: var(--muted); font-size: 11px; margin-top: 6px; }.qty { font-weight: 700; }.qty span { color: var(--muted); font-weight: 400; }.progress-wrap { min-width: 130px; }.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 11px; }.progress-label b { color: var(--ink); }.progress-track { height: 6px; background: #e9eeee; border-radius: 8px; overflow: hidden; }.progress-bar { height: 100%; background: var(--teal); border-radius: inherit; transition: width .3s ease; }.progress-bar.amber { background: #d79431; }.progress-bar.green { background: var(--green); }.due-date { white-space: nowrap; }.due-date.overdue { color: var(--red); font-weight: 700; }.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 9px; border-radius: 4px; font-size: 11px; }.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.status-pending { background: #f1f3f3; color: #718087; }.status-active { background: var(--teal-soft); color: var(--teal); }.status-paused { background: var(--amber-soft); color: var(--amber); }.status-packing { background: #edf0fa; color: #536ca7; }.status-completed { background: #e7f7ed; color: var(--green); }.status-exception { box-shadow: inset 0 0 0 1px #eeb0aa; }.material-waiting { display: grid; gap: 5px; margin-top: 7px; max-width: 190px; color: #6d6152; font-size: 10px; line-height: 1.4; }.material-waiting strong { white-space: normal; }.material-waiting span { width: fit-content; padding: 3px 6px; border-radius: 3px; }.material-waiting .ordered { color: #39704c; background: #e7f7ed; }.material-waiting .not-ordered { color: var(--red); background: var(--red-soft); }.row-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; min-width: 145px; }.row-button { border: 1px solid var(--line); background: var(--white); color: #526168; border-radius: 4px; padding: 7px 9px; font-size: 11px; white-space: nowrap; }.row-button:hover { border-color: var(--teal); color: var(--teal); }.row-button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }.row-button.danger { color: var(--red); }.exception-flag { display: inline-block; color: var(--red); margin-left: 7px; font-size: 13px; }.empty-state { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); }.empty-state strong { color: var(--ink); }.empty-icon { font-size: 29px; color: var(--teal); }.hidden { display: none !important; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }.panel { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 20px; box-shadow: var(--shadow); }.panel-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 16px; }.panel-date { color: var(--muted); font-size: 11px; }.text-button { color: var(--teal); font-size: 11px; padding: 2px 0; }.text-button:hover { color: var(--teal-dark); }.activity-list { display: grid; gap: 0; }.activity-item { display: grid; grid-template-columns: 27px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid #edf0f1; }.activity-symbol { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); font-size: 12px; }.activity-symbol.warn { background: var(--amber-soft); color: var(--amber); }.activity-text { font-size: 11px; }.activity-text strong { font-size: 12px; }.activity-text span { color: var(--muted); }.activity-time { color: #a0aaae; font-size: 10px; }.app-footer { display: flex; justify-content: space-between; color: #a1abad; font-size: 10px; padding: 22px 2px 0; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; background: rgba(18, 37, 40, .35); padding: 20px; }.modal { position: relative; width: min(480px, 100%); background: #fff; border-radius: 8px; padding: 28px; box-shadow: 0 20px 60px rgba(18,37,40,.2); }.modal h2 { margin: 0 0 19px; font-size: 22px; }.modal-close { position: absolute; right: 17px; top: 13px; border: 0; background: transparent; color: #8c989b; font-size: 25px; }.form-grid { display: grid; gap: 13px; }.form-field { display: grid; gap: 6px; }.form-field label { font-size: 11px; color: var(--muted); }.form-field input, .form-field select, .form-field textarea { border: 1px solid var(--line); border-radius: 4px; padding: 10px; outline: 0; color: var(--ink); }.form-field textarea { resize: vertical; min-height: 78px; }.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,120,.1); }.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }.toast-stack { position: fixed; z-index: 20; right: 22px; bottom: 22px; display: grid; gap: 8px; }.toast { color: #fff; background: #193e3d; border-radius: 5px; box-shadow: 0 8px 20px rgba(0,0,0,.16); padding: 12px 15px; font-size: 12px; animation: toast-in .2s ease-out; }.toast.error { background: var(--red); } @keyframes toast-in { from { transform: translateY(7px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 1120px) { .main-content { padding: 0 24px 22px; }.toolbar-controls { flex-wrap: wrap; justify-content: flex-end; }.search-box input { width: 150px; } }
@media (max-width: 820px) { .sidebar { width: 68px; padding: 18px 8px; }.brand-lockup { padding: 0 8px 32px; }.brand-lockup > div:last-child, .nav-item:not(.active)::after, .nav-item { font-size: 0; }.nav-item { justify-content: center; padding: 13px 8px; }.nav-item.active { font-size: 0; }.nav-icon { font-size: 18px; }.environment-tag, .operator-card > div:not(.avatar), .operator-card .icon-button { display: none; }.operator-card { justify-content: center; padding-left: 0; padding-right: 0; }.main-content { width: calc(100% - 68px); padding: 0 16px 18px; }.topbar { height: 62px; }.last-sync { display: none; }.page-heading { align-items: start; gap: 18px; flex-direction: column; padding: 25px 0 20px; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.section-toolbar { align-items: start; gap: 15px; flex-direction: column; }.toolbar-controls { width: 100%; justify-content: stretch; }.search-box { flex: 1; }.lower-grid { grid-template-columns: 1fr; } }
@media (max-width: 510px) { .main-content { padding: 0 12px 15px; }.topbar-actions .outline-button span { display: none; }.primary-button { padding: 9px 10px; }.page-heading h1 { font-size: 28px; }.metric-card { min-height: 110px; padding: 15px; }.metric-value { font-size: 29px; }.toolbar-controls { display: grid; grid-template-columns: 1fr 1fr 34px; }.search-box { grid-column: 1 / -1; }.select-control { width: 100%; }.panel { padding: 16px; }.app-footer { gap: 8px; flex-direction: column; } }

/* Merged order and production workflow */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eef3f1; }
.login-panel { width: min(410px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 36px; box-shadow: 0 18px 50px rgba(20,56,58,.1); }
.login-mark { margin-bottom: 22px; background: #15383a; }
.login-panel h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; }
.login-copy { margin: 9px 0 25px; color: var(--muted); }
.login-button { width: 100%; margin-top: 5px; }
.nav-item { width: 100%; border: 0; background: transparent; text-align: left; }
.inline-select { min-width: 105px; border: 1px solid var(--line); border-radius: 4px; padding: 7px 8px; color: #536169; background: #fff; }
.order-table { min-width: 1100px; }
.order-item-line { padding: 4px 0; border-bottom: 1px solid #eef1f1; white-space: nowrap; }
.order-item-line:last-child { border-bottom: 0; }
.order-group-cell { vertical-align: top !important; }
.due-group-cell { vertical-align: middle !important; text-align: center; }
.due-group-cell .due-date, .due-group-cell .product-spec { text-align: center; }
.due-group-cell .row-button { display: block; margin: 8px auto 0; }
.order-item-count { width: fit-content; margin-top: 10px; padding: 4px 7px; border-radius: 4px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 700; }
.order-group-remark { display: grid; gap: 4px; max-width: 220px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #dce9e5; color: #56666c; font-size: 10px; line-height: 1.45; white-space: pre-line; }
.order-group-remark b { color: var(--ink); }
#workorder-body tr.order-group-a td { background: #f4faf8; }
#workorder-body tr.order-group-b td { background: #fff9f1; }
#workorder-body tr.order-group-start td { border-top: 10px solid var(--white); }
#workorder-body tr.order-group-middle td, #workorder-body tr.order-group-end td { border-top-color: transparent; }
#workorder-body tr.order-group-end td { border-bottom: 1px solid #e7eded; }
#workorder-body tr:hover td, #workorder-body tr:hover .order-group-cell { background: #edf5f2; }
.task-status-cell { min-width: 132px; }
.task-status-block { display: grid; justify-items: start; align-content: center; gap: 8px; }
.task-status-line { display: flex; align-items: center; min-height: 27px; }
.task-status-line .exception-flag { margin-left: 6px; }
.material-waiting { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; width: 100%; max-width: 180px; margin-top: 0; padding: 8px 9px; border-left: 3px solid #d79a3b; border-radius: 4px; background: rgba(255, 248, 231, .85); color: #675b4b; font-size: 10px; line-height: 1.4; }
.material-waiting .material-caption { grid-column: 1 / -1; width: auto; padding: 0; color: #9a7950; font-size: 9px; font-weight: 700; }
.material-waiting strong { min-width: 0; color: #51483d; font-size: 10px; font-weight: 600; overflow-wrap: anywhere; }
.material-waiting .material-order-state { align-self: start; width: auto; padding: 3px 6px; white-space: nowrap; }
.material-waiting.material-pending { grid-template-columns: 1fr; gap: 2px; border-left-color: #aab4b7; background: rgba(241, 244, 244, .9); }
.material-waiting.material-pending strong { color: #67757a; }
.task-actions-cell { min-width: 176px; }
.task-action-panel { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; justify-content: end; gap: 6px; }
.task-primary-actions { display: grid; justify-items: stretch; gap: 7px; }
.material-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.material-actions .row-button { min-width: 0; padding-right: 4px; padding-left: 4px; }
.task-action-panel .row-button { min-height: 30px; }
.task-action-panel .icon-action { width: 28px; min-width: 28px; padding: 0; color: #9a6b68; background: rgba(255,255,255,.55); }
.task-action-panel .icon-action:hover, .task-action-panel .icon-action.active { border-color: #d88780; color: var(--red); background: var(--red-soft); }
.material-detail-button { background: rgba(255,255,255,.65); }
.material-ready-button { box-shadow: 0 3px 8px rgba(8,127,120,.14); }
.modal-backdrop { overflow-y: auto; }
.order-image-editor { padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8fbfa; }
.order-image-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.order-image-heading > div:first-child { display: grid; gap: 4px; }
.order-image-heading span { color: var(--muted); font-size: 11px; }
.image-target-field { display: grid; gap: 5px; min-width: 220px; }
.image-target-field label { color: var(--muted); font-size: 11px; }
.image-target-field select { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; color: var(--ink); background: #fff; }
.item-image-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.paste-image-zone { padding: 12px; color: var(--muted); background: #fff; border: 1px dashed #9ab4ad; border-radius: 5px; text-align: center; }
.paste-image-zone:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8,127,120,.1); outline: 0; }
.item-image-list, .protected-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 10px; margin-top: 10px; }
.item-image-thumb { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #eef3f1; }
.item-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.item-image-thumb span { display: grid; height: 100%; place-items: center; padding: 10px; color: var(--muted); text-align: center; }
.item-image-thumb small { position: absolute; right: 0; bottom: 0; left: 0; overflow: hidden; padding: 5px 7px; color: #fff; background: rgba(20,43,42,.82); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.item-image-thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; color: #fff; background: rgba(143,35,35,.88); border: 0; border-radius: 50%; }
.protected-image-button { aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.protected-image-button img { width: 100%; height: 100%; object-fit: contain; }
.report-audio { grid-column: 1 / -1; display: flex !important; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #cfe1dc; border-radius: 5px; background: #edf6f3; }
.report-audio > div { display: grid; gap: 3px; }
.report-audio strong { color: var(--teal-dark); font-size: 12px; }
.report-audio span { color: var(--muted); font-size: 11px; }
.voice-play-button { min-width: 104px; padding: 8px 12px; color: #fff; background: var(--teal); border: 0; border-radius: 4px; }
.voice-play-button:disabled { cursor: wait; opacity: .72; }
.modal { max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-wide { width: min(980px, 100%); }
.form-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.item-editor-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.item-editor-heading > div { display: grid; gap: 3px; }
.inline-help { color: var(--muted); font-size: 11px; }
.item-editor-row { display: grid; grid-template-columns: 1.15fr 1.15fr 1.2fr 1fr 90px 80px 130px 34px; gap: 10px; align-items: end; padding: 13px; margin-top: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.item-editor-row .item-remark-field { grid-column: 1 / 6; }
.item-editor-row .item-remark-field textarea { min-height: 60px; }
.item-editor-row .archive-options { grid-column: 6 / 9; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.item-editor-row .archive-options .check-field { min-height: 38px; margin: 0; }
.remove-item { width: 34px; height: 39px; border: 1px solid var(--line); border-radius: 4px; color: var(--red); font-size: 19px; }
.report-context { display: grid; gap: 6px; padding: 12px; margin-bottom: 15px; background: var(--teal-soft); border-radius: 5px; }
.report-context span { color: #57716e; font-size: 12px; }
.check-field { display: flex; align-items: center; gap: 9px; color: #526168; font-size: 12px; }
.check-field input { width: 16px; height: 16px; accent-color: var(--teal); }
.empty-mini { padding: 18px 0; color: var(--muted); font-size: 12px; }
.full-activity .activity-item { grid-template-columns: 31px 1fr 150px; padding: 15px 0; }
.worker-panel { margin-top: 14px; }
.report-ledger { display: grid; gap: 9px; }
.report-ledger article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 14px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.report-ledger article div { display: grid; gap: 4px; }
.report-ledger article span, .report-ledger time { color: var(--muted); font-size: 11px; }
.report-ledger article > b { color: var(--teal); }
.report-ledger article p { grid-column: 1 / -1; margin: 0; padding-top: 8px; border-top: 1px solid var(--line); color: #536169; font-size: 12px; }
.assignee-select { min-width: 150px; }
.stats-date-range { display: flex; align-items: end; gap: 10px; }
.stats-date-range label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.stats-date-range input { height: 35px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); }
.stats-metrics { margin-bottom: 14px; }
.stats-unit-value { font-size: 22px; margin-top: 19px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stats-list { display: grid; gap: 8px; }
.stats-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.stats-row > div:first-child { display: grid; gap: 5px; }
.stats-row span { color: var(--muted); font-size: 11px; }
.quantity-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.quantity-badge { display: inline-flex; align-items: baseline; gap: 3px; padding: 6px 8px; border-radius: 5px; color: var(--teal) !important; background: var(--teal-soft); }
.quantity-badge b { font-size: 15px; }
.schedule-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 13px 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); }
.schedule-tabs { display: flex; gap: 5px; }
.schedule-tab { border: 1px solid var(--line); border-radius: 5px; padding: 8px 13px; color: var(--muted); background: #fff; }
.schedule-tab.active { color: #fff; border-color: var(--teal); background: var(--teal); }
.schedule-toolbar .date-control { padding: 0 8px; }
.schedule-toolbar .date-control input { border: 0; outline: 0; color: var(--ink); }
.schedule-metrics { margin-bottom: 14px; }
.schedule-board { margin-top: 0; }
.schedule-table { min-width: 1450px; }
.plan-product-name { margin-top: 8px; }
.plan-requirements { display: grid; gap: 6px; min-width: 220px; max-width: 360px; line-height: 1.5; white-space: normal; }
.plan-requirements b { color: var(--ink); }
.sort-actions { display: flex; gap: 4px; }
.sort-actions button { width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 4px; color: var(--teal); background: #fff; }
.sort-actions button:disabled { cursor: default; color: #c3cbce; }
.print-title, .print-only { display: none; }
.handoff-metrics { margin-bottom: 14px; }
.handoff-board { margin-top: 0; }
.handoff-table { min-width: 1250px; }
.compact-input { height: 34px; min-width: 210px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; outline: 0; }
.handoff-slip dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.handoff-slip dl div { display: grid; grid-template-columns: 95px 1fr; border-bottom: 1px solid var(--line); }
.handoff-slip dt, .handoff-slip dd { margin: 0; padding: 11px; }
.handoff-slip dt { color: var(--muted); background: #f6f8f8; }
.signature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 36px; padding-top: 15px; border-top: 1px dashed #999; }
.customer-table { min-width: 900px; }
.customer-profile-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 6px; background: #f7faf9; }
.customer-profile-head div { display: grid; gap: 4px; }
.customer-profile-head h3, .subsection-title h3 { margin: 0; }
.customer-profile-head span, .customer-profile-head p, .subsection-title span { margin: 0; color: var(--muted); font-size: 11px; }
.customer-profile-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 16px; }
.subsection-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px; }
.sku-list, .customer-order-list, .revision-list { display: grid; gap: 8px; max-height: 430px; overflow-y: auto; }
.sku-list article, .customer-order-list article, .revision-list article { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.sku-list article > div, .revision-list article > div { display: grid; gap: 4px; }
.sku-list span, .customer-order-title span, .revision-list span { color: var(--muted); font-size: 11px; }
.sku-list p, .customer-order-list p, .revision-list p { margin: 4px 0 0; color: #526168; font-size: 12px; line-height: 1.55; }
.sku-image-count { width: fit-content; margin-top: 5px; color: var(--muted); font-size: 11px; }
.customer-order-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.customer-order-title { display: grid; gap: 3px; }
.customer-order-list article p { grid-column: 1 / -1; }
.revision-list article { display: grid; }
.import-table { min-width: 1250px; }
.risk-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 270px; }
.risk-tag { display: inline-flex; width: fit-content; padding: 4px 7px; border-radius: 4px; font-size: 10px; line-height: 1.35; }
.risk-blocking { color: #a13c31; background: #fdebea; }
.risk-warning { color: #8a641a; background: #fff3d9; }
.risk-normal { color: #30705d; background: #e7f5ef; }
.import-review-section { display: grid; gap: 13px; padding: 16px 0; border-top: 1px solid var(--line); }
.import-review-section:first-child { padding-top: 0; border-top: 0; }
.import-original-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.import-original-grid div { display: grid; grid-template-columns: 110px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.import-original-grid div:nth-last-child(-n+2) { border-bottom: 0; }
.import-original-grid .wide { grid-column: 1 / -1; }
.import-original-grid dt, .import-original-grid dd { margin: 0; padding: 9px 11px; font-size: 11px; line-height: 1.55; }
.import-original-grid dt { color: var(--muted); background: #f5f8f7; }
.import-original-grid dd { overflow-wrap: anywhere; }
.raw-data-details { color: var(--muted); font-size: 11px; }
.raw-data-details summary { cursor: pointer; }
.raw-data-details pre { max-height: 220px; overflow: auto; padding: 11px; color: #516066; background: #f5f7f7; border-radius: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.import-item-editor { display: grid; gap: 10px; }
.import-item-row { display: grid; grid-template-columns: 1.1fr 1.1fr 1.2fr 1fr 90px 80px 120px; gap: 10px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfc; }
.import-item-row .item-note { grid-column: 1 / 6; }
.import-archive-options { grid-column: 6 / 8; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-height: 42px; }
.remark-separation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.remark-separation .finance-note textarea { border-color: #d2b76f; background: #fffbef; }
.risk-resolution-list { display: grid; gap: 8px; }
.risk-resolution-row { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfc; }
.risk-resolution-row > div { display: grid; gap: 5px; }
.risk-resolution-row small { color: var(--muted); font-size: 10px; }
.risk-resolution-row textarea { min-height: 58px; padding: 9px; border: 1px solid var(--line); border-radius: 4px; resize: vertical; }
.risk-empty { padding: 12px; color: #30705d; background: #edf7f3; border-radius: 5px; font-size: 12px; }
.import-preview dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.import-preview dl div { display: grid; grid-template-columns: 90px 1fr; }
.import-preview dt, .import-preview dd { margin: 0; padding: 10px; }
.import-preview dt { color: var(--muted); background: #f5f8f7; }
.import-preview p { color: #536169; }
.import-preview-list { display: grid; gap: 7px; max-height: 280px; overflow-y: auto; }
.import-preview-list div { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; }
.import-preview-list span { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) { .form-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }.item-editor-row { grid-template-columns: 1fr 1fr 90px 80px; }.item-editor-row .item-remark-field, .item-editor-row .archive-options { grid-column: 1 / -1; }.customer-profile-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .import-item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }.import-item-row .item-note, .import-archive-options { grid-column: 1 / -1; }.remark-separation { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; }.stats-date-range { flex-wrap: wrap; } }
@media (max-width: 900px) { .schedule-toolbar { align-items: stretch; flex-direction: column; }.schedule-tabs { overflow-x: auto; }.schedule-toolbar .toolbar-controls { justify-content: start; } }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 10px; }
  .sidebar, .topbar, .print-hidden, .app-footer, .toast-stack, .modal-backdrop { display: none !important; }
  .app-shell, .main-content { display: block !important; width: 100%; max-width: none; min-height: 0; margin: 0; padding: 0; }
  .view-section { display: none !important; }
  body.print-schedule-mode #schedule-view { display: block !important; }
  .schedule-heading, .schedule-metrics { display: none; }
  .schedule-board { border: 0; box-shadow: none; }
  .print-title { display: block; padding: 0 0 10px; text-align: center; }
  .print-title h2 { margin: 0 0 4px; font-size: 18px; }
  .print-title p { margin: 0; }
  .print-only { display: inline; }
  .board-table-wrap { overflow: visible; }
  .workorder-table { min-width: 0; font-size: 9px; }
  .workorder-table th, .workorder-table td { padding: 6px; border: 1px solid #bbb; }
  .schedule-table { table-layout: fixed; }
  .schedule-table th:nth-child(3), .schedule-table td:nth-child(3) { width: 22%; }
  .schedule-table th:nth-child(9), .schedule-table td:nth-child(9) { width: 31%; }
  .plan-requirements { min-width: 0; max-width: none; gap: 3px; line-height: 1.35; }
  .progress-track { border: 1px solid #aaa; }
  body.print-handoff-list-mode #handoffs-view { display: block !important; }
  body.print-handoff-list-mode #handoffs-view .page-heading, body.print-handoff-list-mode #handoffs-view .handoff-metrics { display: none; }
  body.print-handoff-slip .app-shell { display: none !important; }
  body.print-handoff-slip .modal-backdrop { display: block !important; position: static; background: #fff; padding: 0; }
  body.print-handoff-slip .modal { display: block; width: 100%; max-height: none; box-shadow: none; padding: 0; overflow: visible; }
  body.print-handoff-slip .modal > .eyebrow, body.print-handoff-slip .modal > h2, body.print-handoff-slip .modal-close { display: none; }
  body.print-handoff-slip .handoff-print-title { display: block; }
}
@media (max-width: 510px) { .login-panel { padding: 27px 20px; }.form-columns { grid-template-columns: 1fr; }.item-editor-row, .import-item-row { grid-template-columns: 1fr; }.item-editor-row .item-remark-field, .item-editor-row .archive-options, .import-item-row .item-note, .import-archive-options { grid-column: auto; }.item-editor-row .archive-options, .import-archive-options { align-items: stretch; flex-direction: column; }.order-image-heading, .customer-profile-head { align-items: stretch; flex-direction: column; }.image-target-field { min-width: 0; }.item-image-actions { flex-wrap: wrap; }.modal { padding: 22px 16px; }.import-original-grid { grid-template-columns: 1fr; }.import-original-grid div, .import-original-grid .wide { grid-column: 1; }.import-original-grid div { grid-template-columns: 95px minmax(0, 1fr); }.risk-resolution-row { grid-template-columns: 1fr; }.import-preview dl { grid-template-columns: 1fr; } }
