:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-subtle: #f7f9fc;
  --text: #24324a;
  --muted: #7e8ca3;
  --line: #e4eaf2;
  --line-strong: #d5deea;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-soft: #eef5ff;
  --blue: #3b82f6;
  --blue-soft: #edf4ff;
  --amber: #a45c00;
  --amber-soft: #fff3df;
  --red: #b23b3b;
  --red-soft: #fbeaea;
  --shadow: 0 1px 3px rgba(48, 73, 108, .035);
  --sidebar-width: 232px;
}

* { box-sizing: border-box; }
html { color-scheme: light; overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }

.auth-screen { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; padding-bottom: 100px; background: #fff; }
.auth-story { min-height: calc(100vh - 100px); padding: 50px clamp(40px, 7vw, 102px); }
.auth-brand { display: flex; align-items: center; gap: 14px; font-size: 20px; }
.auth-logo { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 0; background: transparent; color: #fff; font-size: 22px; font-weight: 850; }
.auth-logo img { width: 78%; height: 78%; object-fit: contain; }
.auth-copy { margin-top: 84px; }
.auth-copy h1 { margin: 0 0 28px; color: var(--primary); font-size: clamp(31px, 2.7vw, 39px); line-height: 1.2; }
.auth-copy ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.auth-copy li { display: grid; grid-template-columns: 18px 110px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 18px; }
.auth-copy li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); }
.auth-flow { display: flex; align-items: center; gap: 24px; margin-top: 44px; }
.ticket-demo { display: grid; justify-items: center; width: 178px; min-height: 190px; padding: 14px 18px 12px; border: 1px solid #cbd5e1; border-radius: 4px; background: #fff; text-align: center; }
.ticket-demo strong { color: #25344b; font-size: 16px; }
.ticket-demo > div { display: grid; place-items: center; width: 92px; height: 92px; margin-top: 7px; padding: 4px; background: #fff; }
.auth-ticket-qr { width: 100%; height: 100%; }
.ticket-demo b { display: block; margin-top: 6px; color: #3e4c61; font-size: 13px; letter-spacing: 1px; }
.auth-flow i { color: var(--primary); font-size: 38px; font-style: normal; }
.phone-demo { position: relative; display: grid; justify-items: center; align-content: start; width: 126px; height: 220px; padding: 19px 10px 10px; border: 7px solid #eef1f5; border-radius: 22px; background: #fff; color: #8692a3; text-align: center; box-shadow: 0 8px 20px rgba(33,51,76,.08); }
.phone-notch { position: absolute; top: 6px; width: 35px; height: 4px; border-radius: 3px; background: #d7dde5; }
.phone-demo small { color: #56657a; font-size: 9px; font-weight: 700; }
.phone-scan-frame { position: relative; display: grid; place-items: center; width: 74px; height: 68px; margin-top: 8px; border: 2px solid #6ba0f8; border-radius: 5px; background: linear-gradient(135deg, #f4f8ff, #e9f1ff); }
.phone-scan-frame::before, .phone-scan-frame::after { content: ""; position: absolute; right: 7px; left: 7px; height: 1px; background: #8eb4f8; }
.phone-scan-frame::before { top: 22px; }
.phone-scan-frame::after { bottom: 22px; }
.phone-scan-frame > span { width: 28px; height: 28px; opacity: .28; background: repeating-linear-gradient(45deg, #2f74e8 0 3px, transparent 3px 6px); }
.phone-scan-frame b { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #22b66f; color: #fff; font-size: 11px; }
.phone-demo > strong { margin-top: 8px; color: #2580ef; font-size: 9px; }
.phone-demo em { margin-top: 5px; color: #6f7d90; font-size: 8px; font-style: normal; }
.phone-demo > b { margin-top: 9px; color: var(--primary); font-size: 11px; }
.auth-photo { position: relative; min-height: calc(100vh - 100px); background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(39,76,122,.08)), url("assets/login-factory-v2.jpeg") center/cover no-repeat; }
.login-card { position: absolute; inset: 50% auto auto 50%; width: min(400px, calc(100% - 48px)); padding: 34px 36px 26px; border-radius: 14px; background: rgba(255,255,255,.97); box-shadow: 0 18px 50px rgba(20, 26, 31, .16); transform: translate(-50%, -50%); }
.login-card h2 { margin: 0 0 25px; text-align: center; font-size: 31px; }
.login-tabs { display: flex; gap: 28px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.login-tabs button { height: 42px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; }
.login-tabs button.active { border-color: var(--primary); color: var(--primary); }
.login-field { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 42px; margin-bottom: 15px; border: 1px solid var(--line-strong); background: #fff; }
.login-field > span { padding: 0 12px; border-right: 1px solid var(--line); color: #3f464b; white-space: nowrap; }
.login-field input { min-width: 0; height: 40px; padding: 0 11px; border: 0; outline: 0; }
.login-field button { height: 31px; margin-right: 5px; border: 0; background: #fff; color: var(--primary); }
.auth-submit, .auth-register { width: 100%; min-height: 41px; border: 1px solid var(--primary); }
.auth-submit { margin-top: 8px; background: var(--primary); color: #fff; }
.auth-register { margin-top: 11px; background: #fff; color: var(--primary); }
.auth-footer { position: absolute; right: 0; bottom: 0; left: 0; min-height: 100px; padding: 24px; background: #f2f4f6; color: #8a9298; line-height: 2; text-align: center; }
.register-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(25, 39, 60, .42); z-index: 100; }
.register-dialog { width: min(820px, 100%); max-height: 92vh; overflow: auto; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(35, 59, 94, .2); }
.register-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 20px 0; }
.register-type-switch button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; min-height: 62px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); text-align: left; }
.register-type-switch button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--surface-subtle); color: var(--muted); font-style: normal; font-weight: 800; }
.register-type-switch button strong { color: var(--text); font-size: 14px; }
.register-type-switch button small { margin-top: 2px; font-size: 11px; }
.register-type-switch button.active { border-color: #8bb7f8; background: #f4f8ff; box-shadow: inset 0 0 0 1px #dceaff; }
.register-type-switch button.active > span { background: var(--primary); color: #fff; }
.register-type-switch button.active strong { color: var(--primary-dark); }
.register-panel { padding-top: 12px; }
.register-tip { margin: 0 20px; padding: 8px 11px; border-radius: 5px; background: #f6f9fd; color: var(--muted); font-size: 11px; }
.employee-scan-card { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 11px; margin: 0 20px; padding: 12px 14px; border: 1px solid #cfe1fb; border-radius: 7px; background: #f6f9ff; }
.employee-scan-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 25px; line-height: 1; }
.employee-scan-card strong, .employee-scan-card small { display: block; }
.employee-scan-card strong { color: var(--primary-dark); font-size: 14px; }
.employee-scan-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.employee-scan-card .btn { min-height: 34px; }
.register-divider { display: flex; align-items: center; gap: 10px; margin: 11px 20px; color: #9aa7b9; font-size: 11px; }
.register-divider::before, .register-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.employee-scanner { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(21, 35, 55, .58); z-index: 2; }
.employee-scanner-dialog { width: min(390px, 100%); padding: 18px; border-radius: 10px; background: #fff; box-shadow: 0 22px 60px rgba(22, 43, 73, .25); }
.employee-scanner-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.employee-scanner-header strong, .employee-scanner-header small { display: block; }
.employee-scanner-header strong { font-size: 16px; }
.employee-scanner-header small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.employee-camera { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, #182538, #293a52); }
.employee-camera video { width: 100%; height: 100%; object-fit: cover; }
.employee-scan-frame { position: absolute; width: 55%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.92); border-radius: 8px; box-shadow: 0 0 0 999px rgba(10,20,34,.24); }
.employee-scan-frame::after { content: ""; position: absolute; top: 50%; right: 8px; left: 8px; height: 2px; background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
#employeeScanStatus { min-height: 34px; margin: 12px 0 6px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.employee-scanner-actions { display: flex; justify-content: flex-end; gap: 8px; }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 15px 20px 18px; }
.register-grid label, .register-address { display: grid; gap: 5px; color: #536176; font-size: 12px; font-weight: 650; }
.register-grid label.wide, .register-grid .wide { grid-column: 1 / -1; }
.register-grid label > span b, .register-address > span b { color: #ef4444; }
.register-grid input, .register-grid select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; outline: 0; }
.register-grid input:focus, .register-grid select:focus { border-color: #7eaff4; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.register-phone, .register-code { display: flex; height: 38px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; overflow: hidden; }
.register-phone:focus-within, .register-code:focus-within { border-color: #7eaff4; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.register-phone i { display: flex; align-items: center; padding: 0 11px; border-right: 1px solid var(--line); color: #58677c; font-style: normal; font-weight: 500; }
.register-phone input, .register-code input { height: 36px; border: 0; border-radius: 0; box-shadow: none !important; }
.register-code button { flex: 0 0 auto; padding: 0 11px; border: 0; background: #fff; color: var(--primary); font-size: 12px; }
.register-address > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.register-address > input { margin-top: 5px; }
.register-grid .agreement { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 500; }
.register-grid .agreement input { width: 15px; height: 15px; min-height: 0; flex: 0 0 auto; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 22px 14px 16px; background: #fff; border-right: 1px solid var(--line); z-index: 10; }
.brand { display: flex; align-items: center; gap: 7px; padding: 0 7px 26px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand strong, .brand span { display: block; }
.brand strong { color: #26364f; font-size: 20px; letter-spacing: .5px; }
.brand span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.nav-list { display: grid; gap: 4px; overflow-y: auto; }
.nav-section { margin: 14px 11px 4px; color: #a0a7ac; font-size: 10px; text-transform: uppercase; }
.nav-item { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; width: 100%; height: 43px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: #4c5760; text-align: left; }
.nav-item:hover { background: var(--surface-subtle); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.nav-icon { font-size: 19px; line-height: 1; text-align: center; }
.nav-badge { min-width: 20px; padding: 2px 6px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: 11px; text-align: center; }
.factory-card { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.factory-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #2f3b43; color: white; font-weight: 700; }
.factory-card strong, .factory-card span { display: block; }
.factory-card > div:nth-child(2) { min-width: 0; flex: 1; }
.factory-card strong { font-size: 12px; }
.factory-card strong, .factory-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.factory-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.logout-button { width: 30px; height: 30px; margin-left: auto; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 19px; }
.logout-button:hover { background: var(--surface-subtle); color: var(--primary); }

/* 返工 / 次品管理 */
.quality-section-actions h2 { display: flex; align-items: center; gap: 8px; }
.quality-section-actions h2 b { display: grid; min-width: 20px; height: 20px; padding: 0 6px; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 10px; }
.quality-shell { padding: 12px; overflow: hidden; }
.quality-tabs { display: flex; gap: 28px; height: 43px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.quality-tabs button { position: relative; display: flex; align-items: center; gap: 6px; height: 43px; padding: 0 2px; border: 0; background: transparent; color: #526178; font-size: 13px; font-weight: 700; }
.quality-tabs button::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; content: ""; }
.quality-tabs button.active { color: var(--primary-dark); }
.quality-tabs button.active::after { background: var(--primary); }
.quality-tabs button span { display: grid; min-width: 18px; height: 18px; padding: 0 5px; place-items: center; border-radius: 9px; background: #eef2f7; color: #718198; font-size: 9px; }
.quality-tabs button.active span { background: var(--primary-soft); color: var(--primary); }
.quality-module-heading { align-items: center; gap: 8px; }
.quality-module-heading strong { color: #334155; font-size: 14px; }
.quality-module-heading > span { display: grid; min-width: 20px; height: 20px; padding: 0 6px; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 10px; font-weight: 800; }
.quality-filters { display: grid; grid-template-columns: 1.1fr .65fr .9fr .82fr .78fr .82fr 1.75fr auto; align-items: end; gap: 8px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); background: #fff; }
.quality-filters > label { display: grid; min-width: 0; gap: 4px; color: #525d65; font-size: 9px; }
.quality-filters input, .quality-filters select { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 10px; outline: 0; }
.quality-date-filter { grid-column: auto; }
.quality-date-filter > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.quality-date-filter b { color: #93a0b1; font-weight: 500; }
.quality-filter-actions { display: flex; gap: 7px; align-self: end; }
.quality-filter-actions .btn { min-height: 32px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.quality-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 43px; padding: 6px 0; }
.quality-toolbar > div { display: flex; gap: 7px; }
.quality-toolbar .btn { min-height: 34px; font-size: 10px; }
.quality-print-button { border-color: #ffd08a; background: #fff4df; color: #b46a00; }
.quality-print-button:not(:disabled):hover { background: #ffe8bd; }
.quality-print-button:disabled { cursor: not-allowed; opacity: .55; }
.quality-table-wrap { width: 100%; margin: 0; overflow: auto; border: 1px solid var(--line); border-radius: 5px 5px 0 0; outline: 0; scrollbar-color: #b9cbe3 #eef3f8; scrollbar-width: thin; }
.quality-table { width: 100%; min-width: 1510px; border-collapse: collapse; table-layout: fixed; font-size: 10px; }
.quality-table th, .quality-table td { padding: 8px 7px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.quality-table th { height: 38px; background: #f4f6f8; color: #465469; font-weight: 750; white-space: nowrap; }
.quality-table tbody tr:nth-child(even) { background: #fbfcfe; }
.quality-table tbody tr:hover { background: #f7faff; }
.quality-table th:nth-child(1), .quality-table td:nth-child(1) { width: 38px; text-align: center; }
.quality-table th:nth-child(2), .quality-table td:nth-child(2) { width: 68px; }
.quality-table th:nth-child(3), .quality-table td:nth-child(3) { width: 92px; }
.quality-table th:nth-child(4), .quality-table td:nth-child(4) { width: 126px; }
.quality-table th:nth-child(5), .quality-table td:nth-child(5) { width: 65px; }
.quality-table th:nth-child(6), .quality-table td:nth-child(6) { width: 145px; }
.quality-table th:nth-child(7), .quality-table td:nth-child(7), .quality-table th:nth-child(8), .quality-table td:nth-child(8) { width: 165px; }
.quality-table th:nth-child(9), .quality-table td:nth-child(9) { width: 84px; }
.quality-table th:nth-child(10), .quality-table td:nth-child(10) { width: 60px; }
.quality-table th:nth-child(11), .quality-table td:nth-child(11) { width: 190px; }
.quality-table th:nth-child(12), .quality-table td:nth-child(12) { width: 120px; }
.quality-table th:nth-child(13), .quality-table td:nth-child(13) { position: sticky; right: 0; width: 178px; background: #fff; box-shadow: -7px 0 10px -11px rgba(45, 64, 92, .8); }
.quality-table th:nth-child(13) { z-index: 2; background: #f4f6f8; }
.quality-table tbody tr:nth-child(even) td:nth-child(13) { background: #fbfcfe; }
.quality-cutting-link, .review-cutting-link { color: #2b72d6; font-weight: 750; }
.quality-style-thumb { display: grid; width: 38px; height: 48px; place-items: center; overflow: hidden; border-radius: 4px; background: linear-gradient(145deg, #e0e8f3, #f8fafc); color: #6484ad; font-size: 16px; font-weight: 800; }
.quality-style-thumb img { width: 100%; height: 100%; object-fit: cover; }
.quality-ticket-cell { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.quality-ticket-link { display: block; max-width: 100%; overflow-wrap: anywhere; color: var(--primary); font-weight: 700; line-height: 1.35; white-space: normal; }
.quality-rework-source-badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border: 1px solid #ffe58f; border-radius: 10px; background: #fffbe6; color: #d48806; font-size: 8px; font-weight: 700; white-space: nowrap; }
.quality-rework-defect-row td { background: #fffdf3; }
.quality-table tbody tr.quality-rework-defect-row td:nth-child(13) { background: #fffdf3; }
.quality-table tbody tr.quality-rework-defect-row:hover td { background: #fff9e6; }
.quality-type-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: #eaf4ff; color: #3180df; font-weight: 700; }
.quality-type-tag.defect { background: #fff0e6; color: #e46a1a; }
.quality-quantity { color: #f0522d; font-size: 13px; font-weight: 800; }
.quality-progress { display: grid; gap: 4px; }
.quality-progress-steps { display: grid; grid-template-columns: 34px 1fr 34px 1fr 34px; align-items: start; }
.quality-progress-steps i { height: 2px; margin-top: 13px; background: #d8e0ea; }
.quality-progress-steps i.done { background: #20bd68; }
.quality-step { display: grid; justify-items: center; gap: 3px; color: #8996a8; font-style: normal; }
.quality-step b { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #dfe5ec; color: #6e7c90; font-size: 10px; }
.quality-step small { font-size: 8px; white-space: nowrap; }
.quality-step.active b { background: #3988f5; color: #fff; }
.quality-step.active small { color: #2778e7; font-weight: 700; }
.quality-step.review b { background: #ff7a16; color: #fff; }
.quality-step.review small { color: #eb6200; font-weight: 700; }
.quality-step.done b { background: #20bd68; color: #fff; }
.quality-step.done small { color: #119a50; font-weight: 700; }
.quality-progress > small { color: #8492a5; font-size: 8px; text-align: center; }
.quality-actions { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.quality-actions button { padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 9px; }
.quality-actions button.report { color: #15a650; }
.quality-actions button.retract { color: #f05b4c; }
.quality-actions button.delete { color: #ef5350; }
.quality-empty { padding: 54px 20px; color: var(--muted); text-align: center; }
.quality-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-height: 46px; padding: 8px 0 0; color: var(--muted); font-size: 10px; }
.quality-pagination > div { display: flex; gap: 3px; }
.quality-pagination button { min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #64748b; }
.quality-pagination button.active { border-color: #bad4fb; background: var(--primary-soft); color: var(--primary); }
.quality-pagination button:disabled { opacity: .35; }
.quality-pagination select { height: 29px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: #64748b; font-size: 10px; }
.quality-form-dialog { display: flex; width: min(1180px, calc(100% - 32px)); max-height: 92vh; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(25, 45, 72, .2); flex-direction: column; }
.quality-form-dialog > .modal-header { position: relative; justify-content: center; min-height: 58px; }
.quality-form-dialog > .modal-header > div { text-align: center; }
.quality-form-dialog > .modal-header .icon-button { position: absolute; right: 18px; }
.quality-form-dialog form { display: flex; min-height: 0; flex-direction: column; }
.quality-form-dialog .modal-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.quality-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 24px; overflow-y: auto; }
.quality-form-grid label { display: grid; gap: 5px; color: #58677c; font-size: 11px; font-weight: 650; }
.quality-form-grid > .wide { grid-column: 1 / -1; }
.quality-form-grid em { color: #ef4444; font-style: normal; }
.quality-form-grid input, .quality-form-grid select, .quality-form-grid textarea { width: 100%; min-width: 0; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; outline: 0; }
.quality-form-grid input, .quality-form-grid select { height: 36px; }
.quality-form-grid textarea { padding-top: 8px; resize: vertical; }
.quality-ticket-summary { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 12px 16px; border: 1px solid #b8d5ff; border-radius: 8px; background: #f0f6ff; }
.quality-ticket-summary.defect { border-color: #ffc7c7; background: #fff4f4; }
.quality-ticket-summary-thumb { grid-row: 1 / 3; display: grid; width: 72px; height: 82px; place-items: center; overflow: hidden; border-radius: 5px; background: #e4edf8; color: #6b86a8; font-size: 21px; font-weight: 800; }
.quality-ticket-summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.quality-ticket-summary-main h3 { margin: 0 0 8px; font-size: 14px; }
.quality-ticket-summary-facts { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: 6px 18px; }
.quality-ticket-summary-facts span { color: #738198; font-size: 11px; }
.quality-ticket-summary-facts b { margin-left: 6px; color: #26364e; font-size: 12px; }
.quality-ticket-summary-code { color: var(--primary); font-size: 14px; font-weight: 800; }
.quality-ticket-summary.defect .quality-ticket-summary-code { color: #f04444; }
.quality-operation-section, .quality-defect-section { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; }
.quality-operation-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.quality-operation-section h3, .quality-defect-section h3 { margin: 0; font-size: 15px; }
.quality-operation-section h3 em { color: #ef4444; font-style: normal; }
.quality-operation-section > header span { color: var(--muted); font-size: 10px; }
.quality-operation-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); align-items: start; gap: 8px; }
.quality-operation-card { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.quality-operation-card.selected { border-color: #b9d4fb; background: #f0f6ff; }
.quality-operation-card-head { display: flex; align-items: center; gap: 10px; }
.quality-operation-card-head input { width: 16px; height: 16px; }
.quality-operation-card-head strong { font-size: 12px; }
.quality-operation-card-head span { padding: 4px 9px; border: 1px solid #ffd095; border-radius: 12px; background: #fff8ed; color: #e78b1c; font-size: 10px; }
.quality-operation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 9px; padding-top: 9px; border-top: 1px solid #dfe8f3; }
.quality-operation-card:not(.selected) .quality-operation-fields { display: none; }
.quality-operation-section > footer { margin-top: 12px; color: var(--muted); font-size: 11px; }
.quality-operation-empty { padding: 34px 15px; border: 1px dashed var(--line-strong); border-radius: 6px; color: var(--muted); text-align: center; }
.quality-defect-section > h3 { margin-bottom: 16px; }
.quality-defect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 20px; }
.quality-defect-grid .wide { grid-column: 1 / -1; }
.quality-deduction-section { overflow: hidden; border: 1px solid #ffd591; border-radius: 7px; background: #fffaf0; }
.quality-deduction-section > header { padding: 10px 12px; border-bottom: 1px solid #ffe7ba; }
.quality-deduction-section > header div { display: grid; gap: 3px; }
.quality-deduction-section > header strong { color: #8a5200; font-size: 12px; }
.quality-deduction-section > header span { color: #9b7542; font-size: 9px; }
#qualityDeductionList { display: grid; gap: 8px; padding: 10px 12px; }
.quality-deduction-locked { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #ffccc7; border-radius: 6px; background: #fff2f0; }
.quality-deduction-locked strong { color: #cf1322; font-size: 11px; }
.quality-deduction-locked span { color: #a65151; font-size: 9px; }
.quality-deduction-group { overflow: hidden; border: 1px solid #f0dfc4; border-radius: 6px; background: #fff; }
.quality-deduction-group > header { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 10px; background: #fff7e6; }
.quality-deduction-group > header strong { color: #7a4b08; font-size: 10px; }
.quality-deduction-group > header span { color: #a27b48; font-size: 9px; }
.quality-deduction-row { display: grid !important; grid-template-columns: minmax(150px, 1fr) minmax(190px, .8fr); align-items: center; gap: 10px !important; min-height: 48px; padding: 6px 10px; border-top: 1px solid #f2eee7; }
.quality-deduction-row > span { display: grid; gap: 2px; }
.quality-deduction-row > span strong { color: #35445a; font-size: 11px; }
.quality-deduction-row > span small { color: #8a96a7; font-size: 8px; font-weight: 400; }
.quality-deduction-row.multiple > span small { color: #d46b08; font-weight: 600; }
.quality-deduction-row select { height: 32px; border-color: #d9d9d9; }
.quality-image-field { display: grid; justify-items: start; gap: 7px; color: #58677c; font-size: 11px; font-weight: 650; }
.quality-image-upload { display: block !important; width: 98px; height: 98px; cursor: pointer; }
.quality-image-upload > span { display: grid; width: 98px; height: 98px; place-items: center; align-content: center; gap: 5px; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 5px; background: #fff; color: #9aa7b9; font-size: 28px; font-weight: 400; }
.quality-image-upload small { font-size: 10px; }
.quality-image-upload img { width: 100%; height: 100%; object-fit: cover; }
#removeQualityImage { padding: 0; border: 0; background: transparent; color: var(--red); font-size: 10px; }
.quality-rework-reason textarea { min-height: 58px; }
.quality-detail-dialog { display: flex; width: min(680px, 100%); max-height: 88vh; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(25, 45, 72, .2); flex-direction: column; }
#qualityDetailContent { min-height: 0; overflow-y: auto; }
.quality-detail-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.quality-detail-card > div { min-height: 66px; padding: 10px 12px; background: #fff; }
.quality-detail-card span, .quality-detail-card strong { display: block; }
.quality-detail-card span { color: var(--muted); font-size: 9px; }
.quality-detail-card strong { margin-top: 5px; font-size: 12px; }
.quality-detail-card .wide { grid-column: 1 / -1; }
.quality-detail-card .quality-settlement-lock-note { background: #fff2f0; }
.quality-detail-card .quality-settlement-lock-note strong { color: #cf1322; }
.quality-detail-dialog:has(.rework-detail-page) { width: min(1180px, 96vw); max-height: 94vh; }
.quality-detail-dialog:has(.rework-detail-page) > .modal-header { position: relative; justify-content: center; }
.quality-detail-dialog:has(.rework-detail-page) > .modal-header h2 { margin: 0 auto; }
.quality-detail-dialog:has(.rework-detail-page) > .modal-header .icon-button { position: absolute; right: 15px; }
.rework-detail-page { padding: 18px 22px 8px; background: #fff; }
.rework-detail-info { padding: 15px; border: 1px solid #dce4ee; border-radius: 9px; background: #f9fbfd; }
.rework-detail-info > header { display: flex; align-items: center; gap: 9px; padding: 2px 0 12px; border-bottom: 1px solid #e2e8f0; }
.rework-detail-info > header span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 5px; background: #edf5ff; color: #347ff0; }
.rework-detail-info > header strong { color: #22334a; font-size: 15px; }
.rework-detail-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 12px; }
.rework-detail-facts > div { min-height: 70px; padding: 11px 12px; border: 1px solid #e6ebf1; border-radius: 5px; background: #fff; }
.rework-detail-facts > div.wide { grid-column: span 2; min-height: 58px; }
.rework-detail-facts span, .rework-detail-facts strong { display: block; }
.rework-detail-facts span { color: #7b889a; font-size: 10px; }
.rework-detail-facts strong { margin-top: 7px; color: #202e43; font-size: 13px; }
.rework-detail-facts .quantity strong { color: #ee3442; font-size: 20px; }
.rework-detail-facts em { display: inline-flex; padding: 2px 7px; border-radius: 4px; background: #e8f2ff; color: #347ff0; font-size: 10px; font-style: normal; }
.rework-detail-tabs { display: flex; gap: 26px; margin-top: 14px; padding: 0 12px; border-bottom: 1px solid #dde4ed; }
.rework-detail-tabs button { min-height: 42px; padding: 0 3px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #536277; font-size: 12px; }
.rework-detail-tabs button.active { border-bottom-color: #347ff0; color: #216ee0; font-weight: 700; }
.rework-detail-tabs b { display: inline; color: #8a98aa; font-size: 10px; }
.rework-detail-tab-panel { margin-top: 13px; }
.rework-detail-tab-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 4px; border-bottom: 1px solid #dfe5ed; }
.rework-detail-tab-panel > header strong { color: #28384f; font-size: 14px; }
.rework-detail-tab-panel > header strong small, .rework-detail-tab-panel > header span { color: #8290a3; font-size: 10px; font-weight: 400; }
.rework-detail-table-wrap { margin-top: 10px; overflow-x: auto; border: 1px solid #dde4ed; border-radius: 5px; }
.rework-detail-table-wrap table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 10px; }
.rework-detail-table-wrap th, .rework-detail-table-wrap td { height: 42px; padding: 7px 10px; border-bottom: 1px solid #e7ebf1; text-align: left; }
.rework-detail-table-wrap th { background: #f5f7fa; color: #4f5d70; font-weight: 650; }
.rework-detail-table-wrap td { color: #35445a; }
.rework-detail-table-wrap td b { color: #347ff0; }
.rework-detail-table-wrap td small { display: block; margin-top: 2px; color: #8997a9; font-size: 8px; }
.rework-detail-table-wrap select, .rework-detail-table-wrap input { width: 100%; height: 30px; padding: 0 8px; border: 1px solid #d7dee8; border-radius: 4px; background: #fff; font-size: 10px; }
.rework-detail-table-wrap input[type="number"] { max-width: 94px; }
.rework-detail-table-wrap :disabled { background: #f1f3f6; color: #9aa5b4; }
.rework-detail-tab-panel > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 0 2px; }
.rework-detail-tab-panel > footer .btn { min-width: 86px; }
.rework-detail-log-retract { padding: 4px 10px; border: 1px solid #cfe0f8; border-radius: 4px; background: #edf5ff; color: #216ee0; font-size: 10px; font-weight: 650; cursor: pointer; }
.rework-detail-log-retract:hover { border-color: #98bced; background: #dcecff; }

@media (max-width: 1180px) {
  .quality-filters { grid-template-columns: 1.05fr .55fr .82fr .72fr .7fr .72fr 1.65fr auto; gap: 6px; }
  .quality-filters input, .quality-filters select { padding: 0 5px; font-size: 9px; }
  .quality-filter-actions { gap: 4px; }
  .quality-filter-actions .btn { padding: 0 7px; }
}

@media (max-width: 760px) {
  body.mobile-menu-open { overflow: hidden; }
  .quality-filters { grid-template-columns: 1fr 1fr; }
  .quality-date-filter { grid-column: 1 / -1; }
  .quality-filter-actions { grid-column: 1 / -1; }
  .quality-toolbar { align-items: stretch; flex-direction: column; }
  .quality-toolbar > div:first-child { display: grid; grid-template-columns: 1fr; }
  .quality-form-grid, .quality-detail-card { grid-template-columns: 1fr; }
  .quality-form-grid label.wide, .quality-detail-card .wide { grid-column: auto; }
  .quality-table th:nth-child(13), .quality-table td:nth-child(13) { position: static; box-shadow: none; }
  .quality-form-grid { padding: 14px; }
  .quality-ticket-summary { grid-template-columns: 58px 1fr; padding: 12px; }
  .quality-ticket-summary-thumb { width: 58px; height: 70px; }
  .quality-ticket-summary-code { grid-column: 1 / -1; }
  .quality-ticket-summary-facts, .quality-operation-fields, .quality-defect-grid { grid-template-columns: 1fr; }
  .quality-defect-grid .wide { grid-column: auto; }
  .rework-detail-page { padding: 10px; }
  .rework-detail-facts { grid-template-columns: 1fr 1fr; }
  .rework-detail-facts > div.wide { grid-column: 1 / -1; }
  .rework-detail-tabs { gap: 12px; overflow-x: auto; }
  .rework-detail-tabs button { white-space: nowrap; }
}

.main-content { position: relative; min-height: 100vh; margin-left: var(--sidebar-width); padding: 0 34px 48px; }
.topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: flex-end; min-height: 52px; }
.topbar.compact, .topbar.orders-compact, .topbar.ticket-compact { min-height: 52px; }
.topbar.detail-hidden { min-height: 8px; }
.topbar > div:first-child { display: none; }
.topbar h1 { margin: 1px 0 0; font-size: 23px; line-height: 1.3; }
.topbar.compact h1 { margin: 0; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.date-chip { padding-right: 13px; border-right: 1px solid var(--line); color: var(--muted); }
.btn { min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 5px; font-weight: 650; }
.btn:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(40, 100, 167, .2); outline-offset: 1px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { border-color: var(--line-strong); background: #fff; }
.btn-secondary:hover { background: var(--surface-subtle); }
.view { display: none; min-width: 0; max-width: 100%; }
.view.active { display: block; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 20px; }
.panel-heading h2 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.text-button { padding: 6px; border: 0; background: transparent; color: var(--blue); font-weight: 650; }
.muted { color: var(--muted); }

.filter-bar { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.filter-bar label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.filter-bar select { min-width: 160px; height: 36px; padding: 0 32px 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: white; }
.compact-filter { justify-content: space-between; background: transparent; border: 0; padding: 0; }
.sync-status { align-self: center; color: var(--muted); font-size: 12px; }
.sync-status i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--primary); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card { min-height: 118px; padding: 18px 18px 15px; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.metric-title { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-symbol { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 5px; background: var(--surface-subtle); color: var(--blue); font-size: 16px; font-weight: 700; }
.metric-value { display: block; margin-top: 10px; font-size: 26px; line-height: 1; }
.metric-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.trend-up { color: var(--primary); font-weight: 700; }
.trend-warn { color: var(--amber); font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .9fr); gap: 16px; margin-bottom: 16px; }
.output-panel, .progress-panel { min-height: 340px; }
.legend { display: flex; gap: 13px; color: var(--muted); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 15px; }
.legend-bar { height: 8px; border-radius: 2px; background: var(--primary); }
.legend-line { height: 0; border-top: 2px dashed #9aa2a8; }
.chart { display: flex; align-items: stretch; height: 260px; min-width: 0; overflow: hidden; padding: 10px 20px 20px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; width: 37px; padding-bottom: 23px; color: #90989e; font-size: 10px; text-align: right; }
.chart-bars { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 12px; min-width: 0; flex: 1; margin-left: 12px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(25% - 1px), #edf0f2 25%); }
.target-line { position: absolute; right: 0; left: 0; border-top: 2px dashed #9aa2a8; }
.chart-item { position: relative; display: flex; align-items: end; justify-content: center; height: 100%; }
.bar { position: relative; width: min(36px, 62%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--primary); transition: height .3s; }
.bar:hover { background: var(--primary-dark); }
.bar-value { position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; white-space: nowrap; }
.chart-label { position: absolute; top: calc(100% + 8px); color: var(--muted); font-size: 10px; white-space: nowrap; }
.progress-list { display: grid; gap: 21px; padding: 4px 20px 22px; }
.progress-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.progress-info strong { font-size: 13px; }
.progress-info span { color: var(--muted); font-size: 11px; }
.progress-meta { display: flex; justify-content: space-between; margin: 6px 0 7px; color: var(--muted); font-size: 10px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 4px; background: #edf0f2; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--blue); }
.progress-fill.complete { background: var(--primary); }
.activity-panel { overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px 16px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: #fafbfb; color: var(--muted); font-size: 11px; font-weight: 650; }
td { font-size: 12px; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 750; }
.person-avatar.green { background: var(--primary-soft); color: var(--primary); }
.person-avatar.amber { background: var(--amber-soft); color: var(--amber); }
.person-cell strong, .person-cell span { display: block; }
.person-cell span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.review-ticket-code { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.review-rework-badge { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border: 1px solid #f0cf68; border-radius: 10px; background: #fff8d9; color: #9a6a00; font-size: 9px; font-weight: 750; line-height: 1; }
.review-rework-row td { background: #fffdf5; }
.money { font-weight: 750; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.status.pending { background: var(--amber-soft); color: var(--amber); }
.status.approved, .status.active { background: var(--primary-soft); color: var(--primary-dark); }
.status.rejected { background: var(--red-soft); color: var(--red); }
.yizhe-filter-panel { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(150px, .9fr) minmax(140px, .7fr) minmax(330px, 1.4fr) auto; align-items: end; gap: 12px; margin-bottom: 12px; padding: 14px 16px; }
.yizhe-filter-panel > label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.yizhe-filter-panel input, .yizhe-filter-panel select { width: 100%; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.yizhe-date-filter > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 7px; }
.yizhe-date-filter i { color: var(--muted); font-size: 11px; font-style: normal; }
.yizhe-filter-actions { display: flex; gap: 7px; }
.yizhe-filter-actions .btn { min-height: 36px; }
.yizhe-table-panel { padding: 10px 12px; }
.yizhe-orders-table { min-width: 1080px; }
.yizhe-orders-table th, .yizhe-orders-table td { padding: 10px 9px; white-space: nowrap; }
.yizhe-orders-table th { background: #f5f7fa; color: #4b596d; }
.yizhe-orders-table td:nth-child(4) { white-space: normal; }
.yizhe-order-status, .yizhe-cut-status { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; padding: 4px 8px; border: 1px solid transparent; border-radius: 12px; font-size: 10px; font-weight: 750; }
.yizhe-order-status.waiting { border-color: #f4caca; background: #fff1f1; color: #d94848; }
.yizhe-order-status.accepted { border-color: #f0d28f; background: #fff8df; color: #b27608; }
.yizhe-order-status.completed { border-color: #bfe5cb; background: #effaf2; color: #27874a; }
.yizhe-cut-status.waiting { border-color: #efced1; background: #fff4f4; color: #bf4b53; }
.yizhe-cut-status.cut { border-color: #c9dff8; background: #f0f6ff; color: #3378ca; }
.yizhe-order-actions { display: flex; gap: 8px; }
.yizhe-order-actions button { padding: 3px 0; border: 0; background: transparent; color: var(--primary); font-size: 11px; }
.yizhe-order-actions button.primary { padding: 5px 9px; border-radius: 4px; background: var(--primary); color: #fff; }
.yizhe-orders-table tbody tr { cursor: pointer; }
.yizhe-empty { height: 190px; color: var(--muted); text-align: center; }
.yizhe-order-detail-dialog { width: min(880px, 100%); max-height: 90vh; overflow: hidden; border-radius: 9px; background: #fff; box-shadow: 0 22px 65px rgba(42,58,82,.22); }
.yizhe-order-detail-dialog .modal-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.yizhe-order-detail-body { max-height: calc(90vh - 128px); overflow: auto; padding: 16px 20px 20px; }
.yizhe-detail-summary { display: grid; grid-template-columns: 62px minmax(160px, 1.25fr) repeat(4, minmax(90px, .65fr)); align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f8faff; }
.yizhe-detail-image { display: grid; place-items: center; width: 58px; height: 58px; overflow: hidden; border-radius: 6px; background: #eef3fa; color: var(--muted); font-weight: 750; }
.yizhe-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.yizhe-detail-title strong, .yizhe-detail-title span { display: block; }
.yizhe-detail-title strong { font-size: 15px; }
.yizhe-detail-title span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.yizhe-detail-stat { padding-left: 12px; border-left: 1px solid var(--line); }
.yizhe-detail-stat span, .yizhe-detail-stat strong { display: block; }
.yizhe-detail-stat span { color: var(--muted); font-size: 10px; }
.yizhe-detail-stat strong { margin-top: 5px; font-size: 13px; }
.yizhe-detail-section { margin-top: 15px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.yizhe-detail-section > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; background: #f7f9fc; }
.yizhe-detail-section h3 { margin: 0; font-size: 13px; }
.yizhe-detail-section header span { color: var(--muted); font-size: 10px; }
.yizhe-quantity-table { width: 100%; border-collapse: collapse; }
.yizhe-quantity-table th, .yizhe-quantity-table td { padding: 10px 12px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.yizhe-quantity-table th:last-child, .yizhe-quantity-table td:last-child { border-right: 0; }
.yizhe-quantity-table th { background: #fbfcfe; color: #59677b; font-size: 11px; }
.yizhe-quantity-table tbody th { color: var(--text); }
.yizhe-quantity-table tfoot { background: #f1f6ff; font-weight: 750; }
.yizhe-process-table { width: 100%; border-collapse: collapse; }
.yizhe-process-table th, .yizhe-process-table td { padding: 9px 12px; border-top: 1px solid var(--line); text-align: left; }
.yizhe-process-table th { background: #fbfcfe; color: #59677b; font-size: 11px; }
.yizhe-process-table td:nth-child(1), .yizhe-process-table th:nth-child(1) { width: 54px; text-align: center; }
.yizhe-process-table { min-width: 980px; }
.yizhe-process-table td:nth-child(n+4), .yizhe-process-table th:nth-child(n+4) { text-align: right; }
.yizhe-price-up { color: #247a48; font-weight: 750; }
.yizhe-price-worker { color: #3378ca; font-weight: 750; }
.yizhe-price-diff { color: #b27608; font-weight: 750; }
.yizhe-worker-price-input { width: 76px; height: 30px; padding: 0 7px; border: 1px solid #9dc3f7; border-radius: 4px; background: #f7fbff; color: #276fc5; font-weight: 750; text-align: right; }
.yizhe-worker-price-input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.yizhe-process-edit-tip { color: var(--primary) !important; }
.yizhe-process-table tfoot { background: #f1f6ff; font-weight: 750; }
.yizhe-detail-note { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.yizhe-detail-note div { padding: 10px 12px; border-radius: 6px; background: #f7f9fc; }
.yizhe-detail-note span, .yizhe-detail-note strong { display: block; }
.yizhe-detail-note span { color: var(--muted); font-size: 10px; }
.yizhe-detail-note strong { margin-top: 5px; font-size: 12px; }

.entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }

.designer-layout { display: grid; grid-template-columns: 220px minmax(320px, 1fr) 240px; gap: 16px; align-items: start; }
.ticket-designer-shell { min-height: 620px; padding: 0 18px 24px; }
.ticket-designer-tabs { display: flex; gap: 24px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.ticket-designer-tabs button { position: relative; min-height: 48px; padding: 0 4px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.ticket-designer-tabs button.active { color: var(--primary); font-weight: 750; }
.ticket-designer-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--primary); }
.ticket-template-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: end; gap: 12px; margin-bottom: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfb; }
.ticket-template-toolbar > label:first-child { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.ticket-template-toolbar input[type="text"], .ticket-template-toolbar > label:first-child input { height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.ticket-default-check { display: flex; align-items: center; gap: 6px; min-height: 34px; font-size: 11px; }
.ticket-template-toolbar > div { display: flex; gap: 7px; }
.designer-tools, .designer-properties { padding: 18px; }
.designer-tools h3, .designer-properties h3 { margin: 0 0 18px; font-size: 15px; }
.designer-tools > p { color: var(--muted); font-size: 11px; }
#ticketFieldButtons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
#ticketFieldButtons button { min-height: 34px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 11px; }
#ticketFieldButtons button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.ticket-canvas { position: relative; box-sizing: border-box; width: min(100%, 280px); aspect-ratio: 1 / 2; margin: 0 auto; padding: 17px; border: 1px dashed #9da5aa; background: #fff; box-shadow: var(--shadow); color: #111; }
.ticket-canvas header { padding-bottom: 9px; text-align: center; font-size: 18px; line-height: 1.1; }
#ticketCanvasFields { display: grid; gap: 5px; padding: 4px 0 8px; }
.ticket-preview-field { display: flex; align-items: baseline; gap: 5px; min-width: 0; font-weight: 750; line-height: 1.15; }
.ticket-preview-field span { flex: 0 0 auto; color: #111; font-size: .92em; }
.ticket-preview-field strong { min-width: 0; overflow-wrap: anywhere; font-size: 1em; }
.ticket-canvas-qr-row { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: start; gap: 8px; }
.fake-qr { position: relative; display: grid; place-items: center; width: 118px; height: 118px; background: #fff; }
.ticket-qr-field-name, .ticket-qr-labeled > small { position: absolute; top: -10px; left: 0; z-index: 2; color: #555; font-size: 7px; font-weight: 500; line-height: 1; }
.ticket-qr-labeled { position: relative; display: block; }
.ticket-qr-labeled.template { width: 52px; height: 52px; }
.ticket-qr-labeled.dialog { width: 66px; height: 66px; }
.ticket-qr-labeled.print { width: 20mm; height: 20mm; }
.ticket-designer-qr { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; }
.ticket-canvas-qr-meta { min-width: 0; padding-top: 4px; color: #111; }
.ticket-canvas-qr-meta strong { display: block; margin-bottom: 6px; font-size: 22px; font-weight: 500; }
.ticket-canvas-qr-meta strong small { font-size: .55em; font-weight: 500; }
.ticket-canvas-qr-meta span { display: block; overflow-wrap: anywhere; font-size: 17px; line-height: 1.2; }
.ticket-canvas > footer { position: absolute; right: 17px; bottom: 16px; left: 17px; display: flex; justify-content: space-between; gap: 10px; color: #111; font-size: 17px; }
.ticket-canvas > footer strong { font-weight: 500; }
.designer-properties label { display: grid; gap: 8px; margin-bottom: 18px; font-size: 12px; }
.designer-properties label:has(input[type="checkbox"]) { display: flex; }
.ticket-field-visibility { margin: 0 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ticket-field-visibility > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ticket-field-visibility > header strong { font-size: 12px; }
.ticket-field-visibility > header div { display: flex; gap: 4px; }
.ticket-field-visibility > header button { height: 25px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--primary-dark); font-size: 9px; cursor: pointer; }
#ticketFieldVisibilityList { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; max-height: 270px; padding-right: 2px; overflow-y: auto; }
#ticketFieldVisibilityList label { display: flex; align-items: center; gap: 5px; min-width: 0; margin: 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfc; font-size: 9px; cursor: pointer; }
#ticketFieldVisibilityList input { flex: 0 0 auto; margin: 0; accent-color: var(--primary); }
#ticketFieldVisibilityList span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-paper-size { display: grid; gap: 4px; margin: 0 0 18px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-subtle); }
.ticket-paper-size span, .ticket-paper-size small { color: var(--muted); font-size: 9px; }
.ticket-paper-size strong { font-size: 14px; }
.ticket-template-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 14px; padding: 12px 0; }
.ticket-template-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.ticket-template-badge { position: absolute; top: 0; right: 0; z-index: 2; padding: 5px 8px; border-radius: 0 0 0 5px; background: var(--primary); color: #fff; font-size: 9px; font-weight: 750; }
.ticket-template-preview { box-sizing: border-box; width: 120px; aspect-ratio: 1 / 2; margin: 18px auto 11px; padding: 10px; overflow: hidden; border: 1px solid var(--line-strong); background: #fff; color: #111; font-size: 8px; line-height: 1.4; }
.ticket-template-preview strong, .ticket-template-preview span { display: block; }
.ticket-template-preview > strong { margin-bottom: 6px; text-align: center; font-size: 11px; }
.ticket-template-preview-fields { display: grid; gap: 1px; font-weight: 650; }
.ticket-template-preview-fields b { display: inline; }
.ticket-template-preview-qr-row { display: grid; grid-template-columns: 52px 1fr; align-items: start; gap: 4px; margin-top: 4px; }
.ticket-template-preview-qr-row > div { min-width: 0; }
.ticket-template-preview-qr-row b { display: block; font-size: 11px; }
.ticket-template-mini-qr { display: block; width: 52px; height: 52px; shape-rendering: crispEdges; }
.ticket-template-qr-off { border: 1px dashed var(--line-strong); background: #fafafa; }
.ticket-template-preview footer { display: flex; justify-content: space-between; margin-top: 6px; }
.ticket-template-preview footer b { display: inline; }
.ticket-template-card h3 { margin: 0; padding: 11px 12px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; }
.ticket-template-actions { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.ticket-template-actions button { min-height: 36px; padding: 0 5px; border: 0; border-left: 1px solid var(--line); background: #fff; font-size: 10px; }
.ticket-template-actions button:first-child { border-left: 0; }
.ticket-template-actions .danger { color: var(--red); }
.ticket-template-actions .default-action { color: var(--primary-dark); }
.ticket-template-actions .default-action:disabled { background: var(--primary-soft); color: var(--muted); }

.settings-list > div { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border-top: 1px solid var(--line); }
.settings-list > div:first-child { border-top: 0; }
.settings-list strong { font-size: 14px; }
.settings-list p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.settings-help { display: inline-grid; width: 17px; height: 17px; margin-left: 3px; place-items: center; border: 1px solid #aeb8c5; border-radius: 50%; color: #7f8b9a; font-size: 11px; font-style: normal; line-height: 1; cursor: help; }
.setting-state-switch { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; cursor: pointer; }
.setting-state-switch > b { min-width: 26px; color: #1677ff; font-size: 12px; font-weight: 500; }
.setting-state-switch:has(input:not(:checked)) > b { color: #8c8c8c; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; display: block; width: 44px; height: 24px; border-radius: 14px; background: #c9ced2; transition: .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.learning-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.learning-grid article { padding: 22px; }
.learning-grid article > span { color: var(--primary); font-size: 29px; font-weight: 800; }
.learning-grid h3 { margin: 18px 0 8px; }
.learning-grid p { min-height: 42px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.payment-hero { margin-bottom: 18px; padding: 44px; background: #20262b; color: #fff; text-align: center; }
.payment-hero > span { color: #cbd0d4; }
.payment-hero h2 { margin: 12px 0 4px; font-size: 32px; }
.payment-hero p { margin: 8px; color: #aeb5ba; }
.payment-hero > strong { display: block; margin: 12px 0 24px; color: #ff8a51; font-size: 40px; }
.payment-hero small { font-size: 14px; }
.entry-form { padding: 24px; }
.form-intro { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.step-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; font-weight: 750; }
.form-intro h2 { margin: 0; font-size: 17px; }
.form-intro p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.field { display: grid; gap: 7px; color: #4c5760; font-size: 12px; font-weight: 650; }
.style-fields .field { grid-template-rows: auto 42px; align-content: start; }
.field.wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .modal-fields input, .modal-fields select, .modal-fields textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; resize: vertical; }
.field textarea { min-height: 80px; }
.optional { color: var(--muted); font-weight: 400; }
.required-mark { color: var(--red); font-style: normal; }
.scan-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.scan-input input { font-size: 16px; font-weight: 700; letter-spacing: 0; }
.ticket-hint { color: var(--muted); font-size: 10px; font-weight: 400; }
.ticket-context { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid #cbded4; border-radius: 5px; background: #cbded4; }
.ticket-context[hidden] { display: none; }
.ticket-context div { padding: 11px; background: var(--primary-soft); }
.ticket-context span, .ticket-context strong { display: block; }
.ticket-context span { color: var(--muted); font-size: 9px; }
.ticket-context strong { margin-top: 4px; color: var(--primary-dark); font-size: 11px; }
.number-input { display: grid; grid-template-columns: 40px 1fr 40px; }
.number-input button { border: 1px solid var(--line-strong); background: var(--surface-subtle); font-size: 18px; }
.number-input button:first-child { border-radius: 5px 0 0 5px; }
.number-input button:last-child { border-radius: 0 5px 5px 0; }
.number-input input { border-right: 0; border-left: 0; border-radius: 0; text-align: center; font-size: 16px; font-weight: 700; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.entry-summary { display: grid; gap: 16px; }
.amount-preview { padding: 22px; border-top: 3px solid var(--primary); }
.amount-preview > p { margin: 0; color: var(--muted); font-size: 12px; }
.amount-preview > strong { display: block; margin: 9px 0 18px; font-size: 31px; color: var(--primary-dark); }
.amount-preview > div { display: flex; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.amount-preview b { color: var(--text); }
.today-personal dl { margin: 0; padding: 0 20px 18px; }
.today-personal dl div { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.today-personal dt { color: var(--muted); font-size: 12px; }
.today-personal dd { margin: 0; font-weight: 750; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.segmented button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; }
.segmented button.active { background: #2f3b43; color: #fff; }
.segmented span { margin-left: 3px; }
.toolbar-actions { display: flex; gap: 8px; }
.log-toolbar-title { align-self: center; color: #4b565e; font-size: 12px; font-weight: 750; }
.search-box { display: flex; align-items: center; width: 245px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; padding-left: 7px; }
.check-cell { width: 38px; padding-right: 0; }
.table-panel { overflow: hidden; }
.table-panel .panel-heading + .table-wrap th { border-top: 1px solid var(--line); }
.row-actions { display: flex; gap: 5px; }
.action-button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 10px; font-weight: 650; }
.action-button.approve { border-color: #b8d9c6; color: var(--primary-dark); }
.action-button.reject { border-color: #edcaca; color: var(--red); }
.empty-state { display: grid; place-items: center; gap: 6px; min-height: 220px; color: var(--muted); }
.empty-state[hidden] { display: none; }
.empty-state strong { color: var(--text); }

.export-button { margin-left: auto; }
.button-group { display: flex; gap: 8px; }
.payroll-tabs { margin-bottom: 12px; }
.payroll-filter-panel { margin-bottom: 10px; padding: 12px 14px; }
.payroll-filter-grid { display: grid; grid-template-columns: minmax(280px, 1.45fr) repeat(5, minmax(105px, .72fr)) auto; align-items: end; gap: 9px; }
.payroll-filter-grid > label { display: grid; gap: 5px; min-width: 0; color: #4d575f; font-size: 10px; font-weight: 700; }
.payroll-filter-grid input, .payroll-filter-grid select { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--text); font: inherit; }
.payroll-date-field > div { display: grid; grid-template-columns: minmax(118px, 1fr) auto minmax(118px, 1fr); align-items: center; gap: 5px; }
.payroll-date-field b { color: var(--muted); font-size: 12px; font-weight: 500; }
.payroll-filter-actions { display: flex; gap: 6px; }
.payroll-filter-actions .btn { min-width: 58px; }
.payroll-settlement-panel { overflow: hidden; }
.payroll-summary-toolbar { display: grid; gap: 10px; padding: 12px 14px 10px; }
.payroll-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 0; }
.payroll-stat { min-height: 72px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--blue); background: #fff; border-radius: 5px; box-shadow: 0 2px 8px rgba(29, 39, 46, .04); }
.payroll-stat:nth-child(2) { border-left-color: var(--primary); }
.payroll-stat:nth-child(3) { border-left-color: var(--amber); }
.payroll-stat:nth-child(4) { border-left-color: #7a67ba; }
.payroll-stat span { display: block; color: var(--muted); font-size: 10px; }
.payroll-stat strong { display: block; margin-top: 6px; font-size: 20px; line-height: 1; }
.payroll-action-bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.payroll-action-bar .btn { min-height: 32px; padding: 0 11px; font-size: 11px; }
.payroll-action-bar .icon-tool { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: #526069; font-size: 16px; }
.payroll-table-wrap { border-top: 1px solid var(--line); }
.payroll-main-table { min-width: 1220px; }
.payroll-main-table th, .payroll-main-table td { height: 42px; padding: 7px 9px; text-align: center; }
.payroll-main-table th { background: #f3f4f5; color: #48535b; font-size: 10px; }
.payroll-main-table td { font-size: 11px; }
.payroll-main-table th:first-child, .payroll-main-table td:first-child { padding-left: 14px; text-align: left; }
.payroll-main-table th:nth-child(4) { min-width: 105px; }
.payroll-main-table th:last-child { min-width: 150px; }
.payroll-main-table .worker-row-actions { gap: 10px; }
.payroll-pagination { display: flex; justify-content: flex-end; min-height: 36px; padding: 9px 14px; color: var(--muted); font-size: 10px; }
.payroll-settlement-panel.compact .payroll-summary-toolbar { padding-top: 8px; padding-bottom: 7px; }
.payroll-settlement-panel.compact .payroll-stat { min-height: 58px; padding: 9px 11px; }
.payroll-settlement-panel.compact .payroll-stat strong { font-size: 17px; }
.payroll-settlement-panel.compact .payroll-main-table th, .payroll-settlement-panel.compact .payroll-main-table td { height: 34px; padding-top: 4px; padding-bottom: 4px; }
.payroll-detail-list { display: grid; gap: 7px; max-height: 430px; overflow: auto; }
.payroll-detail-list > div { display: grid; grid-template-columns: 112px minmax(140px, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; }
.payroll-detail-list span { color: var(--muted); }
.rank { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--surface-subtle); font-size: 11px; font-weight: 750; }
.rank.top { background: var(--amber-soft); color: var(--amber); }

.workers-management-layout { display: grid; grid-template-columns: minmax(250px, 31%) minmax(0, 1fr); gap: 12px; align-items: start; }
.worker-role-panel, .workers-main-panel { min-height: 620px; overflow: hidden; }
.worker-role-panel > header { min-height: 54px; padding: 0 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.worker-role-panel h3 { margin: 0; font-size: 15px; }
.worker-role-toolbar { padding: 14px 18px 10px; }
.worker-role-table-wrap { padding: 0 18px 18px; }
.worker-role-table { border: 1px solid var(--line); }
.worker-role-table th, .worker-role-table td { height: 42px; padding: 7px 10px; text-align: center; }
.worker-role-table th { background: #f2f3f4; color: #414b52; }
.worker-role-table td:first-child { width: 34%; }
.worker-role-table td strong, .worker-role-table td small { display: block; }
.worker-role-table td small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 400; }
.worker-text-actions, .worker-row-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.worker-text-actions button, .worker-row-actions button { padding: 2px 0; border: 0; background: transparent; color: var(--primary); font-size: 11px; white-space: nowrap; }
.worker-text-actions button.danger, .worker-row-actions button.danger { color: var(--red); }
.workers-tabs { display: flex; gap: 28px; min-height: 54px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.workers-tabs button { position: relative; padding: 0 2px; border: 0; background: transparent; color: #4e575e; font-size: 12px; }
.workers-tabs button.active { color: var(--primary); font-weight: 750; }
.workers-tabs button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--primary); content: ''; }
.workers-filter-bar { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) auto; align-items: end; gap: 22px; min-height: 102px; padding: 18px 28px; }
.workers-filter-bar label { display: flex; align-items: center; gap: 10px; min-width: 0; color: #414b52; font-size: 11px; font-weight: 650; }
.workers-filter-bar label span { white-space: nowrap; }
.workers-filter-bar input, .workers-filter-bar select { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; }
.workers-filter-bar > div { display: flex; gap: 7px; }
.workers-table-heading { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 0 28px 7px; }
.workers-table-heading strong { font-size: 13px; }
.workers-table-heading > div { display: flex; gap: 8px; }
.worker-icon-tool { width: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: #4d575d; font-size: 18px; }
.workers-table-wrap { margin: 0 28px; border: 1px solid var(--line); }
.workers-table { min-width: 820px; }
.workers-table th, .workers-table td { height: 42px; padding: 7px 10px; text-align: center; }
.workers-table th { background: #f2f3f4; color: #414b52; }
.workers-table th:nth-child(1) { width: 54px; }
.workers-table th:nth-child(2) { width: 110px; }
.workers-table th:nth-child(3) { width: 64px; }
.workers-table th:nth-child(4) { width: 112px; }
.workers-table th:nth-child(5) { width: 120px; }
.workers-table th:nth-child(7) { width: 156px; }
.worker-name-cell strong, .worker-name-cell small { display: block; }
.worker-name-cell small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.worker-inline-role { width: 100%; height: 28px; padding: 0 20px 0 6px; border: 0; background: transparent; text-align: center; font-size: 11px; }
.workers-empty { padding: 54px; color: var(--muted); }
.workers-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 28px 22px; color: #525c63; font-size: 11px; }
.workers-pagination button, .workers-pagination b { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.workers-pagination b { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.workers-main-panel.compact .workers-filter-bar { min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.workers-main-panel.compact .workers-table th, .workers-main-panel.compact .workers-table td { height: 34px; padding-top: 4px; padding-bottom: 4px; }
.worker-permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.worker-permission-grid label { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; }
.worker-permission-grid input { width: 16px; min-height: 0; }
#formModal .modal.worker-permission-modal { display: flex; width: min(1260px, calc(100vw - 24px)); height: min(720px, calc(100vh - 24px)); max-height: calc(100vh - 24px); overflow: hidden; flex-direction: column; border-radius: 8px; }
.worker-permission-modal #modalForm { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.worker-permission-modal .worker-permission-fields { display: block; min-height: 0; overflow-y: auto; flex: 1 1 auto; padding: 0; background: #fff; }
.worker-permission-modal > .modal-header { min-height: 43px; padding: 6px 14px; }
.worker-permission-modal > .modal-header h2 { font-size: 15px; }
.worker-permission-summary { position: sticky; z-index: 2; top: 0; display: flex; min-height: 50px; align-items: center; gap: 8px; padding: 6px 14px; border-bottom: 1px solid #edf1f6; background: #fff; }
.worker-permission-shield { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 6px; background: #edf4ff; color: #1677ff; font-size: 16px; font-weight: 700; }
.worker-permission-summary > div { min-width: 0; flex: 1; }
.worker-permission-summary h3 { margin: 0; color: #293a52; font-size: 13px; }
.worker-permission-summary p { margin: 2px 0 0; color: #8997a9; font-size: 9px; font-weight: 400; }
.worker-permission-summary > strong { padding: 3px 8px; border: 1px solid #bad9ff; border-radius: 4px; background: #f5f9ff; color: #1677ff; font-size: 9px; white-space: nowrap; }
.worker-permission-select-all { min-height: 27px; padding: 0 10px; border: 1px solid #1677ff; border-radius: 4px; background: #1677ff; color: #fff; font-size: 10px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.worker-permission-select-all:hover { background: #0958d9; border-color: #0958d9; }
.worker-permission-select-all.selected { border-color: #d9d9d9; background: #fff; color: #4b5563; }
.worker-permission-list { display: grid; gap: 1px; padding: 5px 13px 7px; }
.worker-permission-list section { display: grid; width: 100%; min-height: 28px; grid-template-columns: 142px minmax(0, 1fr); align-items: start; column-gap: 7px; margin: 0; padding: 2px 1px; border: 0; border-radius: 0; background: #fff; }
.worker-permission-list section > header { display: contents; }
.worker-permission-list section > header > div { display: flex; min-height: 24px; align-items: center; gap: 6px; grid-column: 1; grid-row: 1; }
.worker-permission-list section > header i { display: block; width: 3px; height: 12px; border-radius: 2px; background: #1677ff; }
.worker-permission-list section > header strong { color: #314158; font-size: 10px; }
.worker-permission-list section > header small { color: #9ba7b7; font-size: 8px; font-weight: 400; }
.worker-permission-group-all { display: flex !important; width: 15px; min-height: 24px; flex: 0 0 15px; align-items: center; justify-content: center; cursor: pointer; }
.worker-permission-group-all input { flex: 0 0 auto; }
.worker-permission-items { display: flex; min-width: 0; align-items: center; align-content: center; grid-column: 2; grid-row: 1; flex-wrap: wrap; gap: 2px 16px; }
.worker-permission-items > label { display: flex !important; min-width: max-content; min-height: 24px; align-items: center; gap: 5px !important; padding: 0; border: 0; border-radius: 0; background: transparent; color: #465365 !important; font-size: 10px !important; font-weight: 500 !important; cursor: pointer; }
.worker-permission-items > label span { white-space: nowrap; }
.worker-permission-items > label:hover { color: #1677ff !important; }
.worker-permission-items > label:has(input:checked) { color: #1677ff !important; }
.worker-permission-editor input[type="checkbox"] { width: 13px !important; height: 13px; min-height: 0 !important; margin: 0; padding: 0 !important; accent-color: #1677ff; cursor: pointer; }
.worker-permission-modal .modal-actions { flex: 0 0 auto; padding: 7px 13px; background: #fff; }
.worker-permission-modal .modal-actions .btn { min-height: 31px; padding: 0 13px; }
@media (max-width: 900px) {
  .worker-permission-list section { grid-template-columns: 120px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  #formModal .modal.worker-permission-modal { width: calc(100vw - 20px); height: calc(100vh - 20px); max-height: calc(100vh - 20px); }
  .worker-permission-summary { padding: 10px 13px; }
  .worker-permission-summary p { display: none; }
  .worker-permission-list { padding: 5px 10px; }
  .worker-permission-list section { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .worker-permission-list section > header > div { grid-column: 1; }
  .worker-permission-items { grid-column: 1; grid-row: 2; gap: 2px 12px; padding-left: 9px; }
}

.cutting-stats, .production-overview { display: grid; gap: 12px; margin-bottom: 16px; }
.cutting-stats { grid-template-columns: repeat(3, 1fr); }
.production-overview { grid-template-columns: repeat(4, 1fr); }
.cutting-stats > div, .production-overview > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.cutting-stats span, .production-overview span { display: block; color: var(--muted); font-size: 11px; }
.cutting-stats strong, .production-overview strong { display: inline-block; margin-top: 7px; font-size: 22px; }
.cutting-stats small { margin-left: 4px; color: var(--muted); }
.cutting-composer { overflow: hidden; }
.cutting-composer-topbar { display: flex; align-items: center; gap: 12px; min-height: 32px; padding: 2px 12px; border-bottom: 1px solid var(--line); }
.cutting-composer-topbar strong { font-size: 15px; }
.cutting-composer-band { min-width: 0; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cutting-composer-band > h2, .ticket-settings h2, .matrix-heading h2 { margin: 0; font-size: 14px; }
.cutting-style-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px 10px; margin-top: 5px; }
.cutting-style-summary div { min-width: 0; }
.cutting-style-summary span, .matrix-heading p { display: block; margin: 0; color: var(--muted); font-size: 10px; }
.cutting-style-summary strong { display: block; margin-top: 2px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.composer-style-image { display: grid; place-items: center; width: 68px; height: 68px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #f2f6fb; color: #7d8da3; font-size: 17px; font-weight: 750; }
.composer-style-image img { width: 100%; height: 100%; object-fit: cover; }
.cutting-form-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 5px 8px; margin-top: 6px; }
.cutting-form-grid .field { grid-template-rows: auto 32px; align-content: start; }
.cutting-form-grid .field.wide { grid-column: span 2; grid-template-rows: auto 34px; }
.cutting-form-grid textarea { min-height: 34px; resize: none; }
.cutting-variant-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.cutting-variant-pickers > div > strong, .cutting-variant-pickers > div > span { display: block; }
.cutting-variant-pickers > div > strong { font-size: 11px; }
.cutting-variant-pickers > div > span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.matrix-variant-pickers { margin: 0 0 6px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfb; }
.cutting-variant-select { position: relative; min-width: 0; }
.cutting-search-control { display: grid; grid-template-columns: minmax(0, 1fr) auto 30px; align-items: center; min-height: 31px; margin-top: 5px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.cutting-search-control:focus-within, .cutting-variant-select.open .cutting-search-control { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(255,81,8,.08); }
.cutting-search-input-area { display: flex; align-items: center; gap: 4px; min-width: 0; height: 29px; padding: 2px 4px; overflow-x: auto; scrollbar-width: none; }
.cutting-search-input-area::-webkit-scrollbar { display: none; }
.cutting-search-input-area > input { flex: 1 0 90px; min-width: 90px; height: 23px; padding: 0 4px; border: 0; outline: 0; background: transparent; font-size: 10px; }
.cutting-search-values { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.cutting-search-token { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; height: 23px; padding: 0 3px 0 7px; border: 1px solid var(--line); border-radius: 3px; background: #f4f6f7; color: var(--text); font-size: 9px; }
.cutting-search-token button { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: #dfe4e7; color: #77828a; font-size: 12px; line-height: 1; }
.cutting-search-token button:hover { background: var(--red-soft); color: var(--red); }
.cutting-search-control > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.cutting-search-control > button { align-self: stretch; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--muted); }
.cutting-variant-select.open .cutting-search-control > button { color: var(--primary); transform: rotate(180deg); }
.cutting-search-panel { position: absolute; top: 56px; left: 0; z-index: 38; width: min(470px, calc(100vw - var(--sidebar-width) - 70px)); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 14px 36px rgba(21,31,39,.18); }
.cutting-variant-select:nth-child(2) .cutting-search-panel { right: 0; left: auto; }
.cutting-library-options { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; padding: 10px; }
.cutting-library-options button { min-height: 29px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 10px; }
.cutting-library-options button:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.cutting-library-options button:disabled { border-color: var(--line); background: #f2f4f5; color: var(--muted); cursor: not-allowed; }
.cutting-library-options button small { margin-left: 4px; color: var(--primary); }
.cutting-library-empty { margin: 0; padding: 22px 10px; color: var(--muted); text-align: center; font-size: 10px; }
.cutting-library-footer { display: grid; grid-template-columns: minmax(100px, 1fr) auto auto; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fafbfb; }
.cutting-library-footer input { min-width: 0; height: 31px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 10px; }
.cutting-library-footer > button:not(.btn) { min-height: 31px; padding: 0 8px; border: 0; background: transparent; color: var(--primary-dark); font-size: 10px; white-space: nowrap; }
.cutting-library-footer .btn { min-height: 31px; font-size: 10px; }
.cutting-choice-list { display: grid; gap: 5px; margin-top: 5px; }
.cutting-choice-source, .cutting-selected-list { display: flex; flex-wrap: wrap; gap: 5px; }
.cutting-choice-source button { position: relative; min-width: 46px; min-height: 26px; padding: 0 8px; border: 1px solid var(--primary); border-radius: 4px; background: #fff; color: var(--primary-dark); font-size: 10px; }
.cutting-choice-source button small { display: inline-grid; place-items: center; min-width: 15px; height: 15px; margin-left: 4px; padding: 0 3px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 8px; }
.cutting-selected-list { min-height: 25px; padding: 4px; border-radius: 4px; background: var(--surface-subtle); }
.cutting-repeat-hint { display: inline-flex; align-items: center; align-self: center; gap: 3px; margin-right: 2px; color: var(--primary); font-size: 10px; font-weight: 750; white-space: nowrap; }
.cutting-repeat-hint b { font-size: 14px; font-weight: 500; line-height: 1; }
.cutting-repeat-tile { min-height: 24px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; color: var(--text); font-size: 10px; }
.cutting-repeat-tile:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.ticket-setup-band { display: grid; grid-template-columns: minmax(0, 1fr) 126px; align-items: start; gap: 10px; }
.ticket-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; }
.ticket-settings h2 { grid-column: 1 / -1; }
.mini-ticket-wrap { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 5px; }
.mini-ticket { box-sizing: border-box; width: 78px; min-height: 126px; padding: 5px; border: 1px solid #778087; background: #fff; color: #161a1d; font-size: 6px; line-height: 1.3; }
.mini-ticket strong, .mini-ticket span { display: block; }
.mini-ticket strong { margin-bottom: 3px; text-align: center; font-size: 8px; }
.mini-ticket span b { display: inline; font-size: 7px; }
.mini-ticket-qr-row { display: grid; grid-template-columns: 36px 1fr; align-items: start; gap: 4px; margin-top: 4px; }
.mini-ticket-qr-row > div:last-child { min-width: 0; }
.mini-ticket-qr-row b { display: block; font-size: 10px; }
.mini-ticket-qr-row span { overflow-wrap: anywhere; }
.mini-ticket footer { display: flex; justify-content: space-between; gap: 3px; margin-top: 5px; font-size: 6px; }
.mini-ticket footer b { display: inline; }
.mini-qr { width: 28px; height: 28px; border: 3px solid #111; background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 / 6px 6px; }
.matrix-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.matrix-heading p { margin-top: 4px; }
.matrix-total { display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.matrix-total strong { margin-left: 4px; color: var(--text); font-size: 14px; }
.cutting-matrix-layout { display: grid; grid-template-columns: minmax(0, 1fr) 180px; border: 1px solid var(--line); }
.cutting-matrix-wrap { min-height: 210px; }
.cutting-matrix-table { min-width: 620px; }
.cutting-matrix-table th, .cutting-matrix-table td { padding: 5px 6px; text-align: center; }
.cutting-matrix-table th:first-child, .cutting-matrix-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 130px; background: #fafbfb; text-align: left; }
.cutting-matrix-table input[type="number"] { width: 62px; height: 28px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 3px; text-align: right; }
.cutting-cell-entry { display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.cutting-matrix-table .cutting-bundle-input { width: 38px !important; padding: 0 4px !important; border-color: #f3c5bb !important; background: #fff2ee; text-align: center !important; }
.cutting-color-label { display: flex; align-items: center; gap: 7px; }
.matrix-variant-label { display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; }
.cutting-color-label .matrix-variant-label { justify-content: flex-start; }
.matrix-variant-delete { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #9ca5ab; }
.matrix-variant-delete svg { width: 14px; height: 14px; pointer-events: none; }
.matrix-variant-delete:hover, .matrix-variant-delete:focus-visible { border-color: #f1c8c2; background: var(--red-soft); color: var(--red); }
.cutting-layer-input { width: 52px !important; height: 28px !important; }
.cutting-matrix-table tfoot td { background: #fafbfb; color: var(--muted); font-weight: 700; }
.cutting-options { display: grid; align-content: start; gap: 5px; padding: 8px; border-left: 1px solid var(--line); background: #fafbfb; }
.cutting-options .field { gap: 5px; }
.cutting-options .field input { min-height: 30px; }
.option-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #4c5760; font-size: 11px; }
.option-switch .switch span { width: 38px; height: 21px; }
.option-switch .switch span::after { top: 3px; left: 3px; width: 15px; height: 15px; }
.option-switch .switch input:checked + span::after { transform: translateX(17px); }
.multiplier-field input { width: 70px; }
.clear-matrix { justify-self: start; color: var(--red); }
.cutting-composer-actions { display: flex; justify-content: center; gap: 8px; padding: 6px 12px; background: #fafbfb; }
.cutting-composer-actions .btn { min-width: 92px; }
.table-progress { display: grid; grid-template-columns: 35px 90px; align-items: center; gap: 7px; }
.table-progress > span { color: var(--muted); font-size: 10px; }

.section-actions { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.view > .section-actions:first-child, #templateListPanel > .section-actions:first-child { min-height: 52px; margin-top: -52px; padding-right: 142px; }
.section-actions h2 { margin: 0; font-size: 16px; }
.section-actions p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
#ordersView .section-actions { margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.orders-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; padding: 8px 10px; }
.orders-search { width: min(420px, 100%); }
.orders-search input { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.orders-toolbar-actions { display: flex; align-items: center; gap: 9px; }
.order-view-toggle { display: flex; flex: 0 0 auto; }
.order-view-toggle button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); font-size: 18px; }
.order-view-toggle button:first-child { border-radius: 4px 0 0 4px; }
.order-view-toggle button:last-child { margin-left: -1px; border-radius: 0 4px 4px 0; }
.order-view-toggle button.active { position: relative; z-index: 1; border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.order-list-panel { overflow: hidden; }
.orders-table { min-width: 1180px; }
.orders-table thead { background: #f4f5f6; }
.orders-table th { color: #4d565e; font-weight: 700; white-space: nowrap; }
.orders-table tbody tr:hover { background: #fffaf7; }
.orders-table td { vertical-align: middle; }
.order-list-thumb { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 4px; background: var(--surface-subtle); color: var(--muted); font-size: 12px; font-weight: 700; }
.order-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-image-cell { position: relative; width: max-content; }
.order-pin-badge { position: absolute; top: -5px; left: -5px; z-index: 1; padding: 2px 5px; border-radius: 3px; background: var(--amber-soft); color: var(--amber); font-size: 9px; }
.order-created-at { color: var(--muted); white-space: nowrap; }
.orders-table th:last-child, .orders-table td:last-child { min-width: 330px; }
.order-row-actions { display: flex; flex-wrap: wrap; gap: 4px 9px; max-width: 360px; white-space: normal; }
.order-row-actions button { padding: 2px 0; border: 0; background: transparent; color: var(--primary); font-size: 11px; white-space: nowrap; }
.order-row-actions button:hover { color: var(--primary-dark); text-decoration: underline; }
.order-row-actions button.delete { color: var(--red); }
.orders-empty { min-height: 180px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.order-card { position: relative; min-width: 0; padding: 0; border: 1px solid #e3e7ed; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(31, 42, 55, .04); }
.order-card:hover, .order-card.pinned { border-color: #91caff; box-shadow: 0 5px 16px rgba(42, 54, 68, .08); }
.order-card-pin { position: absolute; top: 9px; left: 9px; z-index: 2; padding: 3px 7px; border-radius: 4px; background: #e6f4ff; color: #1677ff; font-size: 10px; font-weight: 700; }
.order-card-image { position: relative; width: min(70%, 190px); height: 210px; margin: 0 auto 8px; overflow: hidden; border-radius: 10px; background: #f1f3f5; }
.order-card-image img { width: 100%; height: 100%; object-fit: cover; }
.order-card-image.placeholder { display: grid; place-items: center; margin-top: 12px; color: #98a2ad; font-size: 11px; }
.order-card-image-zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.92); color: #475467; font-size: 16px; box-shadow: 0 1px 5px rgba(0,0,0,.16); }
.order-card-details { display: grid; gap: 7px; min-height: 145px; margin: 0; padding: 0 14px 12px; }
.order-card-details > div { display: grid; grid-template-columns: 67px minmax(0, 1fr); align-items: baseline; gap: 5px; min-width: 0; }
.order-card-details dt { color: #8a929d; font-size: 11px; white-space: nowrap; }
.order-card-details dt::after { content: "："; }
.order-card-details dd { min-width: 0; margin: 0; overflow: hidden; color: #303844; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.order-card-actions { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; margin: 0; padding: 0; border-top: 1px solid #eef0f3; background: #fff; border-radius: 0 0 10px 10px; }
.order-card-actions > button, .order-card-more > button { width: 100%; min-height: 45px; padding: 0 8px; border: 0; background: transparent; color: #1677ff; font-size: 12px; font-weight: 650; }
.order-card-actions > button:hover, .order-card-more > button:hover { background: #f0f7ff; }
.order-card-more { position: relative; }
.order-card-more > button span { margin-left: 3px; font-size: 12px; }
.order-card-menu { position: absolute; right: 7px; bottom: 40px; z-index: 20; display: grid; width: 118px; padding: 5px; border: 1px solid #e4e7ec; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(31, 42, 55, .16); }
.order-card-menu[hidden] { display: none; }
.order-card-menu button { min-height: 31px; padding: 0 9px; border: 0; border-radius: 4px; background: transparent; color: #475467; font-size: 11px; text-align: left; }
.order-card-menu button:hover { background: #f5f7fa; color: #1677ff; }
.order-card-menu button.delete { color: #e5484d; }

.style-form { display: grid; gap: 16px; padding-bottom: 74px; }
.style-page-actions { display: flex; align-items: center; justify-content: space-between; }
.back-button { padding-left: 0; }
.style-section { min-width: 0; padding: 22px; }
.style-section-head { display: flex; align-items: center; gap: 11px; margin-bottom: 21px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.style-section-head > span { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 750; }
.style-section-head h2 { margin: 0; font-size: 16px; }
.style-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.style-basic-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.field-label { display: block; margin-bottom: 7px; color: #4c5760; font-size: 12px; font-weight: 650; }
.field-label small { margin-left: 4px; color: var(--muted); font-weight: 400; }
.image-dropzone { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 1px dashed #aeb8bf; border-radius: 6px; background: var(--surface-subtle); cursor: pointer; }
.image-dropzone:hover { border-color: var(--primary); background: var(--primary-soft); }
.image-dropzone:focus-visible { outline: 2px solid rgba(52, 127, 240, .28); outline-offset: 2px; border-color: #4388f4; }
.image-dropzone.pasted { border-color: #4388f4; box-shadow: 0 0 0 3px rgba(67, 136, 244, .14); }
.image-dropzone.dragging { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 2px rgba(21, 115, 71, .12); }
.image-placeholder { display: grid; place-items: center; gap: 6px; color: var(--muted); text-align: center; }
.image-placeholder b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--primary); font-size: 22px; }
.image-placeholder strong { color: var(--text); font-size: 12px; }
.image-placeholder span { font-size: 9px; }
.image-placeholder span + span { color: #9aa7b8; font-size: 8px; }
.image-dropzone img { width: 100%; height: 100%; object-fit: cover; }
.remove-image { width: 100%; margin-top: 5px; color: var(--red); font-size: 11px; }
.style-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; }
.variant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.variant-fieldset { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; }
.variant-fieldset legend { margin-bottom: 11px; color: #4c5760; font-size: 12px; font-weight: 650; }
.variant-fieldset em { color: var(--red); font-style: normal; }
.search-multiselect { position: relative; min-width: 0; }
.search-select-control { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; align-items: center; min-height: 38px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.search-select-control:focus-within, .search-multiselect.open .search-select-control { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, .1); }
.search-select-control input { min-width: 0; height: 36px; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.search-select-count { min-width: 22px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.search-select-count.active { color: var(--primary-dark); font-weight: 700; }
.search-select-toggle { align-self: stretch; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 16px; }
.search-multiselect.open .search-select-toggle { color: var(--primary); transform: rotate(180deg); }
.search-select-panel { position: absolute; top: calc(100% - 30px); left: 0; z-index: 35; width: min(520px, calc(100vw - var(--sidebar-width) - 64px)); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 14px 36px rgba(21, 31, 39, .18); }
.variant-fieldset:last-child .search-select-panel { right: 0; left: auto; }
.search-select-options { max-height: 210px; overflow-y: auto; align-content: flex-start; padding: 12px; }
.search-select-empty { margin: 0; padding: 28px 12px; color: var(--muted); text-align: center; font-size: 11px; }
.search-select-footer { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fafbfb; }
.search-select-footer > input { min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.search-select-footer .text-button { white-space: nowrap; }
.selected-value-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 64px; min-height: 27px; margin-top: 6px; overflow-y: auto; }
.selected-value-list > span { align-self: center; color: var(--muted); font-size: 10px; }
.selected-value-list button { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 7px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-subtle); font-size: 10px; }
.selected-value-list button:hover { border-color: var(--primary); color: var(--primary-dark); }
.selected-value-list b { color: var(--muted); font-size: 13px; font-weight: 500; }
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; min-height: 39px; }
.choice-list label { cursor: pointer; }
.choice-list input { position: absolute; opacity: 0; pointer-events: none; }
.choice-list label > span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 11px; }
.choice-list input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 700; }
.choice-list input:focus-visible + span { outline: 3px solid rgba(40, 100, 167, .2); }
.swatch { width: 13px; height: 13px; border: 1px solid rgba(0,0,0,.12); border-radius: 50%; }
.swatch.black { background: #202428; }
.swatch.white { background: #fff; }
.swatch.navy { background: #263d5d; }
.swatch.gray { background: #9da3a6; }
.swatch.apricot { background: #dcc3a1; }
.swatch.red { background: #bb3939; }
.size-choices label > span { min-width: 47px; justify-content: center; }
.inline-add { display: flex; gap: 7px; margin-top: 13px; }
.inline-add input { width: min(190px, 100%); min-height: 38px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 5px; }
.operation-title { display: grid; grid-template-columns: 29px 1fr auto; }
.operation-title .btn { margin-left: auto; }
.operation-config { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 24px; margin-bottom: 16px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fafbfb; }
.common-operation-picker { grid-column: 1 / -1; min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.common-operation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.common-operation-head > div { display: flex; align-items: baseline; gap: 9px; }
.common-operation-actions { justify-content: flex-end; }
.common-operation-head strong { font-size: 12px; }
.common-operation-head span { color: var(--muted); font-size: 10px; }
.common-operation-list { display: flex; flex-wrap: wrap; gap: 7px; }
.common-operation-button { min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: var(--text); font-size: 11px; }
.common-operation-button:hover, .common-operation-button:focus-visible { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.operation-just-added { animation: operation-added .9s ease-out; }
.operation-duplicate-warning { animation: operation-duplicate-warning 1.1s ease-out; }
@keyframes operation-duplicate-warning { 0%, 45% { background: #fff0f0; box-shadow: inset 3px 0 #e05252; } 100% { background: transparent; box-shadow: inset 3px 0 transparent; } }
@keyframes operation-added { from { background: var(--primary-soft); } to { background: transparent; } }
.template-controls { display: flex; align-items: end; gap: 8px; min-width: 0; }
.template-controls label { display: grid; gap: 6px; min-width: 240px; color: var(--muted); font-size: 11px; font-weight: 650; }
.template-controls select { width: 100%; height: 38px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.price-mode-control { display: flex; gap: 7px; margin: 0; padding: 0; border: 0; }
.price-mode-control legend { margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.price-mode-control label { cursor: pointer; }
.price-mode-control input { position: absolute; opacity: 0; pointer-events: none; }
.price-mode-control span { display: grid; place-items: center; min-height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); background: #fff; font-size: 11px; }
.price-mode-control label:first-of-type span { border-radius: 5px 0 0 5px; }
.price-mode-control label:last-of-type span { border-radius: 0 5px 5px 0; }
.price-mode-control label + label span { margin-left: -8px; }
.price-mode-control input:checked + span { position: relative; z-index: 1; border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.price-mode-help { grid-column: 1 / -1; margin: -4px 0 0; color: var(--muted); font-size: 10px; }
.role-price-selector { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.role-price-selector[hidden] { display: none; }
.role-price-selector > strong { font-size: 11px; }
.role-price-selector > span { color: var(--muted); font-size: 10px; }
.role-price-choices { grid-column: 1 / -1; margin-top: 4px; }
.operation-table input, .operation-table select { width: 100%; min-width: 110px; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.operation-table .operation-name { min-width: 180px; }
.operation-table .operation-price { width: 120px; min-width: 100px; text-align: right; }
.operation-price-cell { min-width: 170px; }
.operation-size-heading { min-width: 112px; color: var(--text); text-align: left; }
.operation-size-heading span, .operation-size-heading small { display: block; }
.operation-size-heading span { font-size: 11px; font-weight: 750; }
.operation-size-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.operation-size-heading.empty { min-width: 150px; }
.operation-size-price-cell, .operation-role-price-cell { min-width: 112px; }
.operation-table .operation-size-price, .operation-table .operation-role-price { min-width: 96px; text-align: right; }
.operation-price-visibility-cell { min-width: 92px; }
.operation-visibility-switch { display: inline-flex !important; min-width: 76px; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: #7b8da3; font-size: 10px; font-weight: 650; }
.operation-visibility-switch input { position: absolute !important; width: 1px !important; min-width: 0 !important; height: 1px !important; opacity: 0; pointer-events: none; }
.operation-visibility-switch > span { position: relative; width: 34px; height: 19px; flex: 0 0 auto; border-radius: 999px; background: #cbd5e1; transition: .18s ease; }
.operation-visibility-switch > span::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(38, 59, 86, .24); content: ''; transition: .18s ease; }
.operation-visibility-switch input:checked + span { background: #4a8df5; }
.operation-visibility-switch input:checked + span::after { transform: translateX(15px); }
.operation-visibility-switch input:focus-visible + span { outline: 3px solid rgba(59,130,246,.18); }
.operation-visible-role-cell { min-width: 340px; }
.operation-inline-roles { display: flex; min-width: 320px; max-width: 380px; padding: 2px 0; flex-wrap: wrap; align-items: center; gap: 2px; }
.operation-inline-roles label { display: inline-flex; min-height: 21px; padding: 0 4px; align-items: center; gap: 2px; border: 1px solid #d6e1ed; border-radius: 3px; background: #fff; color: #687c92; font-size: 9px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: .15s ease; }
.operation-inline-roles label:has(input:checked) { border-color: #8cb8e8; background: #edf6ff; color: #2677ca; }
.operation-inline-roles input { width: 10px !important; min-width: 10px !important; height: 10px !important; margin: 0; accent-color: #4a8df5; }
.operation-inline-roles label:hover { border-color: #8cb8e8; background: #f4f9ff; }
.operation-batch-role { margin-left: 5px; padding: 2px 5px; border: 0; border-radius: 3px; background: #e5f1ff; color: #2877c8; font-size: 9px; font-weight: 650; white-space: nowrap; }
.operation-batch-role:hover { background: #d7eaff; }
.empty-size-price { color: var(--muted); font-size: 10px; white-space: nowrap; }
.price-detail-button { width: 100%; min-height: 33px; border: 1px solid #abc6e1; border-radius: 4px; background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 700; }
.price-detail-summary { display: block; max-width: 180px; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.price-detail-summary[hidden], .price-detail-button[hidden], .operation-price[hidden] { display: none; }
.operation-index { color: var(--muted); text-align: center; }
.sort-buttons { display: flex; gap: 4px; }
.sort-buttons button, .delete-operation { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.sort-buttons button:hover { color: var(--blue); border-color: #abc6e1; }
.delete-operation { color: var(--red); }
.operation-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px; border: 1px solid var(--line); border-top: 0; background: #fafbfb; }
.operation-footer > div { display: flex; gap: 22px; color: var(--muted); font-size: 11px; }
.operation-footer strong { margin-left: 4px; color: var(--text); font-size: 13px; }
.style-submit-bar { position: sticky; bottom: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.97); box-shadow: 0 -5px 18px rgba(21,31,39,.07); }
.style-submit-bar > span { color: var(--muted); font-size: 11px; }

.template-filter label:first-child { min-width: 260px; }
.template-category-tabs { display: flex; align-items: center; gap: 28px; margin-bottom: 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.template-category-tabs button { position: relative; min-height: 48px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.template-category-tabs button.active { color: var(--primary); font-weight: 700; }
.template-category-tabs button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--primary); content: ''; }
.template-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 5px 0 10px; }
.template-panel-heading h3 { margin: 0; font-size: 15px; }
.template-panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.variant-library-manager { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 12px; overflow: hidden; }
.variant-library-column { min-width: 0; padding: 14px 16px; }
.variant-library-column + .variant-library-column { border-left: 1px solid var(--line); }
.variant-library-column h3 { margin: 0; font-size: 14px; }
.variant-library-heading span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.variant-library-add { display: grid; grid-template-columns: minmax(100px, 1fr) auto; align-items: stretch; gap: 7px; margin-top: 10px; }
.variant-library-add textarea { min-width: 0; min-height: 50px; padding: 7px 9px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font: inherit; line-height: 1.45; }
.variant-library-add .btn { min-height: 50px; }
.variant-library-table { max-height: 430px; margin-top: 10px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.variant-library-table table { width: 100%; border-collapse: collapse; }
.variant-library-table th, .variant-library-table td { height: 38px; padding: 0 11px; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; }
.variant-library-table th { position: sticky; top: 0; z-index: 1; background: #f3f4f4; color: #4e585f; }
.variant-library-table th:first-child, .variant-library-table td:first-child { width: 58px; }
.variant-library-table th:last-child, .variant-library-table td:last-child { width: 68px; }
.variant-library-table tr:last-child td { border-bottom: 0; }
.variant-library-table button { padding: 0; border: 0; background: transparent; color: var(--red); font-size: 11px; }
.variant-library-table .variant-library-empty { height: 76px; color: var(--muted); text-align: center; }
.template-list-heading { margin: 14px 0 8px; font-size: 14px; }
.template-filter input { width: 100%; min-width: 220px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.template-library-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.template-library-stats > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.template-library-stats span { display: block; color: var(--muted); font-size: 11px; }
.template-library-stats strong { display: inline-block; margin-top: 7px; font-size: 22px; }
.template-library-stats small { margin-left: 5px; color: var(--muted); }
.price-mode-badge { display: inline-flex; padding: 4px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.price-mode-badge.default { background: var(--surface-subtle); color: #59656d; }
.price-mode-badge.size { background: var(--blue-soft); color: var(--blue); }
.price-mode-badge.role { background: var(--primary-soft); color: var(--primary-dark); }
.template-library-form { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; gap: 16px; padding-bottom: 74px; }
.template-library-form[hidden] { display: none; }
.template-library-form > * { min-width: 0; }
.template-editor-fields { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 18px 26px; }
.template-size-field { grid-column: 1 / -1; max-width: 520px; }
.template-size-field[hidden] { display: none; }
.template-mode-control { align-self: end; }
.template-operation-name { min-width: 180px !important; }
.template-operation-price { min-width: 105px !important; text-align: right; }
.price-detail-button:disabled { border-color: var(--line); background: var(--surface-subtle); color: var(--muted); cursor: not-allowed; }
.delete-confirmation { display: grid; gap: 7px; padding: 16px; border: 1px solid #edcaca; border-radius: 5px; background: var(--red-soft); }
.delete-confirmation strong { color: var(--red); font-size: 13px; }
.delete-confirmation span { color: var(--red); font-size: 11px; line-height: 1.6; }
.cutting-delete-warning strong, .cutting-delete-warning span, .cutting-delete-warning small { color: var(--red) !important; }

.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(21, 31, 39, .42); z-index: 50; }
#formModal { z-index: 80; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(500px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 17px; }
.icon-button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 24px; line-height: 1; }
.modal-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px; }
.modal-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 650; }
.modal-fields label.wide { grid-column: 1 / -1; }
.modal-note, .price-editor-intro { padding: 11px 12px; border-radius: 5px; background: var(--surface-subtle); color: var(--muted); font-size: 11px; line-height: 1.6; }
.operation-visible-role-picker { display: grid; grid-column: 1 / -1; gap: 11px; }
.operation-visible-role-picker p { margin: 0; padding: 9px 11px; border-radius: 5px; background: #f4f8fd; color: #6f8299; font-size: 11px; line-height: 1.5; }
.modal-fields .operation-role-select-all { display: inline-flex; width: max-content; min-height: 30px; padding: 0 10px; align-items: center; grid-auto-flow: column; gap: 7px; border: 1px solid #c9dcf0; border-radius: 4px; background: #edf5ff; color: #3377c1; cursor: pointer; }
.operation-role-select-all input { width: 15px !important; min-height: 15px !important; margin: 0; }
.operation-visible-role-picker .choice-list { padding: 10px; border: 1px solid #e1e9f2; border-radius: 5px; background: #fbfdff; }
.price-hidden-label { display: inline-flex; padding: 3px 7px; border-radius: 4px; background: #f0f4f8; color: #8493a5; font-size: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); }

.sync-operations-backdrop { padding: 16px; }
.sync-operations-dialog { display: flex; width: min(1480px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); max-height: calc(100vh - 32px); overflow: hidden; flex-direction: column; border: 1px solid #dce8f5; border-radius: 7px; background: #fff; box-shadow: 0 22px 65px rgba(35, 73, 119, .2); }
.sync-operations-dialog > .modal-header { min-height: 64px; padding: 12px 18px; flex: 0 0 auto; background: #fbfdff; }
.sync-operations-dialog > .modal-header h2 { color: #253b57; font-size: 17px; }
.sync-operations-dialog > .modal-header p { margin: 3px 0 0; color: #7b8da3; font-size: 11px; }
.sync-operations-layout { display: grid; min-height: 0; overflow: hidden; flex: 1 1 auto; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); }
.sync-operations-source, .sync-operations-targets { min-width: 0; min-height: 0; padding: 16px; }
.sync-operations-source { display: flex; flex-direction: column; border-right: 1px solid #e4edf7; background: #f8fbff; }
.sync-operations-targets { display: flex; flex-direction: column; overflow: hidden; }
.sync-operations-section-title { display: flex; min-height: 40px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sync-operations-section-title h3 { margin: 0; color: #314963; font-size: 14px; }
.sync-operations-section-title p { margin: 3px 0 0; color: #8999ac; font-size: 10px; }
.sync-operations-section-title > strong { padding: 4px 9px; border-radius: 4px; background: #eaf4ff; color: #2475c8; font-size: 11px; }
.sync-operations-section-title > button { padding: 4px 0; border: 0; background: transparent; color: #3984cd; font-size: 11px; cursor: pointer; }
.sync-operations-source-table { min-height: 0; margin-top: 8px; overflow: auto; flex: 1 1 auto; border: 1px solid #e0eaf5; border-radius: 5px; background: #fff; }
.sync-operations-dialog table { width: 100%; border-collapse: collapse; font-size: 11px; }
.sync-operations-dialog th { height: 38px; padding: 7px 9px; border-bottom: 1px solid #dfe9f4; background: #f1f6fb; color: #65778d; font-weight: 600; text-align: left; white-space: nowrap; }
.sync-operations-dialog td { height: 43px; padding: 7px 9px; border-bottom: 1px solid #edf2f7; color: #465a72; white-space: nowrap; }
.sync-operations-dialog tbody tr:last-child td { border-bottom: 0; }
.sync-operations-source-table td:nth-child(1), .sync-operations-source-table th:nth-child(1) { width: 48px; text-align: center; }
.sync-operations-source-table td:last-child, .sync-operations-source-table th:last-child { text-align: right; }
.sync-operations-source-table td b { color: #2475c8; }
.sync-operations-no-process { height: 130px !important; color: #91a0b2 !important; text-align: center !important; }
.sync-operations-source-total { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 13px 5px 0; color: #718399; font-size: 11px; }
.sync-operations-source-total strong { color: #2475c8; font-size: 15px; }
.sync-operations-summary { display: flex; min-height: 42px; margin-top: 8px; padding: 0 14px; align-items: center; gap: 12px; border: 1px solid #d8e8f8; border-radius: 5px; background: #f1f7fe; color: #657a92; font-size: 11px; }
.sync-operations-summary strong { color: #2475c8; font-size: 13px; }
.sync-operations-summary i { width: 1px; height: 16px; background: #cfdeed; }
.sync-operations-table-wrap { min-height: 0; margin-top: 10px; overflow: auto; overscroll-behavior: contain; flex: 1 1 auto; border: 1px solid #e0eaf5; border-radius: 5px; scrollbar-gutter: stable; }
.sync-operations-table-wrap table { min-width: 920px; }
.sync-operations-table-wrap thead { position: sticky; top: 0; z-index: 2; }
.sync-operations-table-wrap th:first-child, .sync-operations-table-wrap td:first-child { width: 36px; text-align: center; }
.sync-operations-table-wrap tbody tr { transition: background .15s ease; }
.sync-operations-table-wrap tbody tr.selected { background: #f1f7fe; }
.sync-operations-table-wrap tbody tr:hover { background: #f7fbff; }
.sync-operations-table-wrap td > strong { color: #304b68; }
.sync-operations-table-wrap td > small { display: block; margin-top: 2px; color: #8b9bad; font-size: 9px; }
.sync-cutting-variants { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.sync-cutting-variants small { display: block; max-width: 150px; margin-top: 2px; overflow: hidden; color: #8799ad; font-size: 9px; text-overflow: ellipsis; }
.sync-cutting-progress { display: grid; grid-template-columns: minmax(92px, 1fr) 32px; width: 170px; align-items: center; gap: 4px 8px; }
.sync-cutting-progress > span { grid-column: 1 / -1; color: #76889d; font-size: 9px; }
.sync-cutting-progress > span b { color: #3d5977; }
.sync-cutting-progress > div { height: 5px; overflow: hidden; border-radius: 3px; background: #e5edf5; }
.sync-cutting-progress > div i { display: block; height: 100%; border-radius: inherit; background: #5ba4e6; }
.sync-cutting-progress > small { color: #6e8198; font-size: 9px; }
.sync-operations-empty { display: grid; flex: 1; min-height: 230px; margin-top: 10px; place-items: center; border: 1px dashed #d8e4f0; border-radius: 5px; background: #fafcff; color: #8798ab; font-size: 12px; }
.sync-operations-actions { min-height: 60px; align-items: center; flex: 0 0 auto; background: #fbfdff; box-shadow: 0 -3px 10px rgba(49, 77, 111, .04); }
.sync-operations-actions > span { margin-right: auto; color: #7c8ea3; font-size: 11px; }
.sync-operations-actions .btn { min-width: 92px; }
.sync-operations-actions .btn-primary:disabled { cursor: not-allowed; opacity: .5; }

.operation-dialog-backdrop { padding: 14px; }
.operation-edit-dialog { display: flex; width: min(1320px, calc(100vw - 28px)); height: min(800px, calc(100vh - 28px)); min-height: 0; overflow: hidden; flex-direction: column; border: 1px solid #dce8f5; border-radius: 7px; background: #fff; box-shadow: 0 22px 65px rgba(35, 73, 119, .2); }
.operation-edit-dialog > .modal-header { min-height: 62px; padding: 11px 17px; flex: 0 0 auto; background: #fbfdff; }
.operation-edit-dialog > .modal-header h2 { color: #293f59; font-size: 17px; }
.operation-edit-dialog > .modal-header p { margin: 3px 0 0; color: #8192a6; font-size: 10px; }
.operation-dialog-toolbar { display: grid; padding: 12px 17px; flex: 0 0 auto; grid-template-columns: minmax(360px, 1fr) minmax(250px, 400px); align-items: end; gap: 15px; border-bottom: 1px solid #e7eef6; background: #fff; }
.operation-dialog-price-modes { display: flex; min-width: 0; margin: 0; padding: 0; align-items: center; border: 0; }
.operation-dialog-price-modes legend { margin-right: 12px; color: #566b82; font-size: 11px; font-weight: 700; }
.operation-dialog-price-modes label { cursor: pointer; }
.operation-dialog-price-modes input { position: absolute; opacity: 0; pointer-events: none; }
.operation-dialog-price-modes span { display: grid; min-height: 34px; padding: 0 13px; place-items: center; border: 1px solid #d8e3ef; background: #fff; color: #65778c; font-size: 11px; }
.operation-dialog-price-modes label:first-of-type span { border-radius: 5px 0 0 5px; }
.operation-dialog-price-modes label:last-of-type span { border-radius: 0 5px 5px 0; }
.operation-dialog-price-modes label + label span { margin-left: -1px; }
.operation-dialog-price-modes input:checked + span { position: relative; z-index: 1; border-color: #4a91dc; background: #eaf4ff; color: #2475c8; font-weight: 700; }
.operation-dialog-template { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; color: #566b82; font-size: 11px; font-weight: 700; }
.operation-dialog-template select { width: 100%; height: 34px; padding: 0 30px 0 10px; border: 1px solid #d8e3ef; border-radius: 5px; background: #fff; color: #445b74; font-size: 11px; }
.operation-dialog-role-selector { display: flex; padding: 9px 17px; flex: 0 0 auto; align-items: center; gap: 18px; border-bottom: 1px solid #e1ebf5; background: #f4f9ff; }
.operation-dialog-role-selector[hidden] { display: none; }
.operation-dialog-role-selector > div:first-child { min-width: 160px; }
.operation-dialog-role-selector strong { display: block; color: #334c68; font-size: 11px; }
.operation-dialog-role-selector > div:first-child span { display: block; margin-top: 2px; color: #8798ab; font-size: 8px; }
.operation-dialog-role-selector .choice-list { min-height: 0; gap: 5px; }
.operation-dialog-role-selector .choice-list label > span { min-height: 28px; padding: 0 9px; font-size: 9px; }
.operation-dialog-common { padding: 10px 17px; flex: 0 0 auto; border-bottom: 1px solid #e7eef6; background: #f8fbff; }
.operation-dialog-common > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.operation-dialog-common > header > div { display: flex; align-items: baseline; gap: 9px; }
.operation-dialog-common > header strong { color: #334c68; font-size: 12px; }
.operation-dialog-common > header span { color: #8999ac; font-size: 9px; }
.operation-dialog-common > header button { padding: 0; border: 0; background: transparent; color: #2475c8; font-size: 10px; }
.operation-dialog-common-actions { display: flex; align-items: center; gap: 12px; }
.operation-dialog-common-actions button { min-height: 26px; padding: 0 8px !important; border: 1px solid #bad3ec !important; border-radius: 4px; background: #fff !important; white-space: nowrap; }
.operation-dialog-common-actions button:hover { border-color: #4a91dc !important; background: #eaf4ff !important; }
.operation-dialog-common-actions button.active { border-color: #4a91dc !important; background: #dfefff !important; color: #1769b7; font-weight: 700; }
.common-operation-delete-button { min-height: 34px; border: 1px solid #efb9bd; border-radius: 4px; background: #fff5f5; color: #d8454d; font-size: 11px; font-weight: 700; }
.common-operation-delete-button:hover { border-color: #df6c73; background: #ffe9ea; }
.common-visible-role-head { display: flex; margin-bottom: 9px; align-items: center; justify-content: space-between; gap: 12px; }
.common-visible-role-head p { margin: 0; }
.common-visible-role-head > div { display: flex; gap: 5px; }
.common-visible-role-head button { min-height: 26px; padding: 0 8px; border: 1px solid #c8d9eb; border-radius: 4px; background: #fff; color: #2877c8; font-size: 9px; white-space: nowrap; }
.common-visible-role-head button:hover { border-color: #4a91dc; background: #eaf4ff; }
#operationDialogCommonList { display: flex; max-height: 67px; margin-top: 8px; overflow: auto; flex-wrap: wrap; gap: 5px; scrollbar-gutter: stable; }
#operationDialogCommonList button { display: inline-flex; min-height: 27px; padding: 0 8px; align-items: center; gap: 6px; border: 1px solid #cddff1; border-radius: 4px; background: #fff; color: #48627d; font-size: 10px; }
#operationDialogCommonList button:hover { border-color: #4a91dc; background: #eaf4ff; color: #2475c8; }
#operationDialogCommonList.edit-mode button { border-color: #88b8e8; background: #f2f8ff; cursor: pointer; }
#operationDialogCommonList.edit-mode button:hover { border-color: #2475c8; background: #dfefff; box-shadow: 0 0 0 2px rgba(74,145,220,.12); }
#operationDialogCommonList small { color: #7f95ab; font-size: 8px; }
.operation-dialog-table-wrap { min-height: 0; padding: 0 17px 12px; overflow: auto; flex: 1 1 auto; background: #fff; scrollbar-gutter: stable; }
.operation-dialog-table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: 11px; }
.operation-dialog-table thead { position: sticky; top: 0; z-index: 3; }
.operation-dialog-table th { height: 38px; padding: 6px 9px; border-bottom: 1px solid #dce6f1; background: #eef4fa; color: #5a6f87; font-weight: 700; text-align: left; white-space: nowrap; }
.operation-dialog-table td { height: 44px; padding: 5px 9px; border-bottom: 1px solid #edf2f7; color: #496078; }
.operation-dialog-table th:first-child, .operation-dialog-table td:first-child { width: 48px; text-align: center; }
.operation-dialog-table th:nth-last-child(-n+2), .operation-dialog-table td:nth-last-child(-n+2) { width: 75px; text-align: center; }
.operation-dialog-table input, .operation-dialog-table select { width: 100%; min-width: 110px; height: 32px; padding: 0 8px; border: 1px solid #d6e1ec; border-radius: 4px; background: #fff; color: #344b64; font-size: 11px; }
.operation-dialog-table .operation-dialog-name { min-width: 180px; }
.operation-dialog-table .operation-dialog-price { width: 120px; min-width: 95px; text-align: right; }
.operation-dialog-size-price-cell, .operation-dialog-role-price-cell { min-width: 104px; }
.operation-dialog-table .operation-dialog-size-price, .operation-dialog-table .operation-dialog-role-price { min-width: 88px; text-align: right; }
.operation-dialog-detail { min-width: 92px; min-height: 30px; padding: 0 8px; border: 1px solid #bdd4eb; border-radius: 4px; background: #eef7ff; color: #2475c8; font-size: 9px; }
.operation-dialog-detail:disabled { border-color: #e1e7ed; background: #f4f6f8; color: #96a2af; }
.operation-dialog-sort { display: flex; justify-content: center; gap: 3px; }
.operation-dialog-sort button { display: grid; width: 27px; height: 27px; padding: 0; place-items: center; border: 1px solid #dce4ed; border-radius: 4px; background: #fff; color: #718399; }
.operation-dialog-sort button:hover { border-color: #82b4e6; color: #2475c8; }
.operation-dialog-delete { padding: 0; border: 0; background: transparent; color: #e24e55; font-size: 10px; }
.operation-dialog-add-row { width: 100%; min-height: 34px; margin-top: 8px; border: 1px dashed #91bce6; border-radius: 4px; background: #f8fbff; color: #2475c8; font-size: 11px; }
.operation-dialog-add-row:hover { background: #eaf4ff; }
.operation-dialog-added { animation: operation-dialog-added .8s ease-out; }
@keyframes operation-dialog-added { from { background: #dfefff; } to { background: transparent; } }
.operation-dialog-footer { display: flex; min-height: 61px; padding: 10px 17px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #dfe8f2; background: #fbfdff; box-shadow: 0 -3px 10px rgba(49,77,111,.04); }
.operation-dialog-footer > div { display: flex; align-items: center; gap: 22px; color: #70839a; font-size: 11px; }
.operation-dialog-footer strong { margin-left: 4px; color: #2475c8; font-size: 14px; }
.operation-dialog-footer .btn { min-width: 90px; }
.cutting-preview-modal { width: min(980px, 100%); max-height: 88vh; overflow: hidden; border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); }
.cutting-preview-body { padding: 16px 20px 20px; overflow: auto; max-height: calc(88vh - 62px); }
.cutting-preview-tabs { display: flex; border-bottom: 1px solid var(--line); }
.cutting-preview-tabs button { min-width: 86px; height: 42px; border: 1px solid var(--line); border-bottom: 0; background: #fafafa; color: var(--text); font-size: 13px; }
.cutting-preview-tabs button + button { margin-left: -1px; }
.cutting-preview-tabs button.active { position: relative; z-index: 1; background: #fff; color: var(--primary); font-weight: 750; }
.cutting-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; padding-top: 14px; }
.cutting-preview-table-wrap { min-width: 0; overflow-x: auto; }
.cutting-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cutting-preview-table th { padding: 10px 9px; background: #f1f2f3; color: #30383e; font-weight: 750; text-align: left; white-space: nowrap; }
.cutting-preview-table td { padding: 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cutting-preview-style-b { max-width: 660px; padding-top: 14px; }
.cutting-preview-empty { padding: 44px 20px; color: var(--muted); text-align: center; }
.ticket-print-backdrop { z-index: 60; padding: 10px; }
.ticket-print-dialog { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(1440px, 100%); height: min(850px, 94vh); overflow: hidden; border-radius: 7px; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.28); }
.ticket-print-header { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.ticket-print-header h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 17px; }
.ticket-print-header h2 svg { width: 21px; height: 21px; color: var(--blue); }
.ticket-print-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 0; }
.ticket-print-settings { min-height: 0; padding: 20px; overflow-y: auto; border-right: 1px solid var(--line); }
.ticket-print-section-title h3 { margin: 0; font-size: 14px; }
.ticket-print-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.ticket-print-section-title.horizontal { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ticket-print-section-title.horizontal > strong { color: var(--blue); font-size: 12px; white-space: nowrap; }
.ticket-print-field { display: grid; gap: 6px; margin-top: 18px; color: #4c5760; font-size: 11px; font-weight: 700; }
.ticket-print-field select, .ticket-print-field input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.ticket-print-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ticket-print-switch strong, .ticket-print-switch small { display: block; }
.ticket-print-switch strong { font-size: 12px; }
.ticket-print-switch small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.ticket-print-preview-title { margin-top: 18px; font-size: 12px; font-weight: 750; }
.ticket-print-template-preview { display: grid; place-items: center; min-height: 278px; margin-top: 10px; border: 1px solid var(--line); background: #f4f5f6; }
.ticket-dialog-preview-paper { position: relative; box-sizing: border-box; width: 140px; height: 260px; padding: 10px; overflow: hidden; background: #fff; color: #15191c; box-shadow: 0 2px 8px rgba(0,0,0,.08); font-size: 9px; line-height: 1.35; }
.ticket-dialog-preview-paper > strong { display: block; margin-bottom: 6px; text-align: center; font-size: 11px; }
.ticket-dialog-preview-fields { display: grid; gap: 2px; }
.ticket-dialog-preview-fields b { font-weight: 750; }
.ticket-dialog-preview-qr-row { display: grid; grid-template-columns: 66px 1fr; align-items: start; gap: 6px; margin-top: 8px; }
.ticket-dialog-preview-qr { width: 66px; height: 66px; }
.ticket-dialog-preview-qr-off { display: grid; place-items: center; width: 66px; height: 66px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 8px; text-align: center; }
.ticket-dialog-preview-qr-row > div:last-child strong { display: block; font-size: 15px; }
.ticket-dialog-preview-paper footer { position: absolute; right: 10px; bottom: 8px; left: 10px; display: flex; justify-content: space-between; font-size: 8px; }
.ticket-print-selected-summary { margin-top: 14px; color: var(--muted); font-size: 10px; }
.ticket-print-content { min-width: 0; min-height: 0; padding: 20px 22px; overflow: auto; }
.ticket-print-parts { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ticket-check-all { color: #4c5760; font-size: 11px; white-space: nowrap; }
.ticket-print-dialog input[type="checkbox"], .ticket-print-dialog input[type="radio"] { accent-color: var(--blue); }
.ticket-part-options { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 17px; }
.ticket-part-options label { display: inline-flex; align-items: center; gap: 7px; min-width: 72px; font-size: 11px; }
.ticket-part-options input { width: 16px; height: 16px; }
.ticket-print-order { display: flex; align-items: center; gap: 18px; margin: 18px 0 0; padding: 0; border: 0; }
.ticket-print-order legend { float: left; margin-right: 6px; font-size: 11px; font-weight: 750; }
.ticket-print-order label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.ticket-print-list-section { padding-top: 18px; }
.ticket-print-table-wrap { max-height: 440px; margin-top: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
.ticket-print-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 10px; }
.ticket-print-table th, .ticket-print-table td { height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ticket-print-table th { position: sticky; top: 0; z-index: 2; background: #f4f5f6; color: #4c5760; font-weight: 750; }
.ticket-print-table th:first-child, .ticket-print-table td:first-child { width: 38px; text-align: center; }
.ticket-print-table tbody tr.selected { background: var(--blue-soft); }
.ticket-print-table tbody tr:hover { background: #f5f8fb; }
.ticket-print-table tbody tr.selected:hover { background: #e4eff9; }
.ticket-print-actions { display: flex; justify-content: flex-end; gap: 8px; min-height: 64px; padding: 13px 20px; border-top: 1px solid var(--line); background: #fff; }
.ticket-print-actions .btn { min-width: 92px; }
.ticket-print-actions .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); border-color: var(--blue); }
.ticket-print-actions svg { width: 16px; height: 16px; }
.cutting-list-shell { padding: 12px; overflow: hidden; }
.cutting-filter-grid { display: grid; grid-template-columns: 1.2fr .8fr .7fr 1.65fr 1fr auto; align-items: end; gap: 8px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.cutting-filter-grid > label { display: grid; gap: 4px; color: #525d65; font-size: 9px; }
.cutting-filter-grid input, .cutting-filter-grid select { min-width: 0; width: 100%; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.cutting-filter-actions { display: flex; gap: 7px; align-self: end; }
.cutting-filter-actions .btn { min-height: 32px; padding: 0 12px; white-space: nowrap; }
.cutting-date-filter { grid-column: auto; }
.cutting-date-filter > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.cutting-date-filter b { color: var(--muted); font-weight: 400; }
.cutting-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.cutting-list-toolbar > div { display: flex; gap: 6px; }
.composer-style-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.composer-style-heading h2 { margin: 0; font-size: 14px; }
.composer-style-heading p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.composer-style-heading > span { color: var(--blue); font-size: 9px; white-space: nowrap; }
.composer-style-picker { margin-top: 5px; padding: 6px; border: 1px solid #dfe7f1; border-radius: 5px; background: #f8fbff; }
.composer-style-picker .field { grid-template-rows: auto 32px; }
.composer-order-field { position: relative; }
.composer-order-combobox { position: relative; display: block; min-width: 0; }
.composer-order-combobox > input { width: 100%; height: 32px; padding-right: 38px; }
.composer-order-combobox > button { position: absolute; top: 1px; right: 1px; display: grid; place-items: center; width: 34px; height: 30px; padding: 0; border: 0; border-left: 1px solid #dce5ef; border-radius: 0 4px 4px 0; background: #fff; color: #728198; font-size: 15px; }
.composer-order-combobox > button:hover { background: #f3f7fd; color: var(--blue); }
.composer-order-options { position: absolute; top: calc(100% + 5px); right: 0; left: 0; z-index: 35; display: grid; max-height: 250px; padding: 5px; overflow-y: auto; border: 1px solid #cfdae8; border-radius: 6px; background: #fff; box-shadow: 0 12px 30px rgba(42, 61, 87, .16); }
.composer-order-options[hidden] { display: none; }
.composer-order-options button { display: grid; grid-template-columns: 34px minmax(90px, .6fr) minmax(130px, 1fr) minmax(110px, .8fr); gap: 9px; align-items: center; min-height: 42px; padding: 5px 8px; border: 0; border-radius: 4px; background: transparent; color: #53627a; font-size: 10px; text-align: left; }
.composer-option-thumb { display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 4px; background: #eef3f8; color: #71829a; font-size: 11px; font-style: normal; font-weight: 750; }
.composer-option-thumb img { width: 100%; height: 100%; object-fit: cover; }
.composer-order-options button:hover, .composer-order-options button[aria-selected="true"] { background: #edf4ff; color: #2f74dc; }
.composer-order-options button strong { overflow: hidden; color: #263b59; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.composer-order-options button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-order-options button small { overflow: hidden; color: #8a98aa; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.composer-order-options-empty { padding: 14px 10px; color: var(--muted); font-size: 10px; text-align: center; }
.cutting-style-empty { grid-column: 1 / -1; padding: 9px; color: var(--muted); text-align: center; }
.cutting-style-empty-guide { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; font-size: 12px; }
.cutting-style-empty-guide b { color: var(--blue); font-size: 22px; font-weight: 700; line-height: 1; animation: cutting-guide-arrow 1.2s ease-in-out infinite alternate; }
@keyframes cutting-guide-arrow { from { transform: translateX(0); } to { transform: translateX(5px); } }

@media (min-width: 1000px) {
  #cuttingCreateView .cutting-composer { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr); }
  #cuttingCreateView .cutting-composer-topbar,
  #cuttingCreateView .matrix-band,
  #cuttingCreateView .cutting-composer-actions { grid-column: 1 / -1; }
  #cuttingCreateView .style-summary-band { grid-column: 1 / -1; display: grid; grid-template-columns: 68px minmax(360px, 1fr) minmax(300px, 420px); align-items: center; gap: 8px 12px; }
  #cuttingCreateView .composer-style-heading { grid-column: 1 / -1; }
  #cuttingCreateView .composer-style-image { grid-column: 1; grid-row: 2; }
  #cuttingCreateView .cutting-style-summary { grid-column: 2; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
  #cuttingCreateView .composer-style-picker { grid-column: 3; grid-row: 2; align-self: center; margin: 0; }
  #cuttingCreateView .cutting-order-info-band { grid-column: 1; border-right: 1px solid var(--line); }
  #cuttingCreateView .ticket-setup-band { grid-column: 2; grid-template-columns: minmax(0, 1fr) 126px; }
  #cuttingCreateView .ticket-settings { grid-template-columns: 1fr; }
  #cuttingCreateView .ticket-settings h2 { grid-column: auto; }
  #cuttingCreateView .composer-style-heading p,
  #cuttingCreateView .matrix-heading p,
  #cuttingCreateView .cutting-variant-select > span { display: none; }
}

@media (max-width: 999px) {
  #cuttingCreateView .style-summary-band { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 7px 10px; }
  #cuttingCreateView .composer-style-heading { grid-column: 1 / -1; }
  #cuttingCreateView .composer-style-image { width: 56px; height: 56px; }
  #cuttingCreateView .cutting-style-summary { margin: 0; }
  #cuttingCreateView .composer-style-picker { grid-column: 1 / -1; margin: 0; }
}

.icon-tool { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; color: #536069; font-size: 16px; }
.icon-tool:hover { border-color: var(--blue); color: var(--blue); }
.cutting-table-scroll { position: relative; width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-radius: 5px 5px 0 0; outline: none; scrollbar-color: #b9cbe3 #eef3f8; scrollbar-width: thin; }
.cutting-table-scroll::-webkit-scrollbar { height: 7px; }
.cutting-table-scroll::-webkit-scrollbar-track { background: #eef3f8; }
.cutting-table-scroll::-webkit-scrollbar-thumb { border-radius: 99px; background: #b9cbe3; }
.cutting-table-scroll:focus-visible { box-shadow: 0 0 0 2px rgba(52, 127, 240, .15); }
.cutting-list-head { display: grid; grid-template-columns: 280px 78px 72px 88px 88px minmax(420px, 1fr) 178px; align-items: center; min-width: 1210px; height: 38px; padding: 0; border-radius: 5px 5px 0 0; background: #f3f4f5; color: #343d43; font-size: 10px; font-weight: 750; }
.cutting-list-head label { display: flex; align-items: center; gap: 10px; }
.cutting-record-list { min-width: 1210px; }
.cutting-record-row { display: grid; grid-template-columns: 280px 78px 72px 88px 88px minmax(420px, 1fr) 178px; align-items: stretch; min-height: 112px; padding: 0; border-bottom: 1px solid var(--line); background: #fff; }
.cutting-record-row:nth-child(even) { background: #fcfcfd; }
.cutting-record-row > * { display: flex; align-items: center; min-width: 0; padding: 9px 8px; }
@media (min-width: 761px) {
  .cutting-list-head > :first-child, .cutting-record-row > :first-child { position: sticky; left: 0; z-index: 4; box-shadow: 7px 0 9px -10px rgba(40, 64, 94, .8); transform: translateZ(0); }
  .cutting-list-head > :last-child, .cutting-record-row > :last-child { position: sticky; right: 0; z-index: 4; box-shadow: -7px 0 9px -10px rgba(40, 64, 94, .8); transform: translateZ(0); }
  .cutting-list-head > :first-child, .cutting-list-head > :last-child { z-index: 6; align-self: stretch; background: #f3f4f5; }
  .cutting-record-row > :first-child, .cutting-record-row > :last-child { background: #fff; }
  .cutting-record-row:nth-child(even) > :first-child, .cutting-record-row:nth-child(even) > :last-child { background: #fcfcfd; }
}
.cutting-progress-heading { text-align: center; }
.cutting-record-progress-cell { display: flex !important; align-items: center; justify-content: flex-start; gap: 9px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 10px 5px !important; scrollbar-color: #c7d7ef transparent; scrollbar-width: thin; }
.cutting-record-progress-cell::-webkit-scrollbar { height: 4px; }
.cutting-record-progress-cell::-webkit-scrollbar-thumb { border-radius: 99px; background: #c7d7ef; }
.cutting-operation-ring-item { display: grid; min-width: 54px; flex: 0 0 54px; place-items: center; gap: 2px; }
.cutting-operation-ring-item b { width: 100%; overflow: hidden; color: #4f5f73; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cutting-operation-ring-item small { color: var(--muted); font-size: 7px; white-space: nowrap; }
.cutting-progress-ring { position: relative; display: grid; width: 46px; height: 46px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: conic-gradient(#4388f4 calc(var(--progress) * 1%), #e7edf5 0); cursor: pointer; transition: box-shadow .18s ease, transform .18s ease; }
.cutting-progress-ring::before { position: absolute; inset: 5px; border-radius: 50%; background: #fff; content: ""; }
.cutting-progress-ring span { position: relative; z-index: 1; color: #347ff0; font-size: 10px; font-weight: 750; }
.cutting-progress-ring:hover { box-shadow: 0 0 0 4px rgba(67, 136, 244, .12); transform: translateY(-1px); }
.cutting-progress-ring:focus-visible { outline: 2px solid #347ff0; outline-offset: 3px; }
.cutting-operation-rings-empty { width: 100%; color: var(--muted); font-size: 9px; text-align: center; }
.cutting-record-main { gap: 6px; padding-left: 0 !important; }
.cutting-record-main > input { flex: 0 0 auto; }
.cutting-style-thumb { position: relative; display: grid; place-items: center; width: 50px; height: 70px; flex: 0 0 auto; overflow: hidden; border-radius: 4px; background: linear-gradient(145deg, #d8dee2, #f2f4f5); color: #7b858c; font-size: 18px; font-weight: 750; }
.cutting-style-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cutting-style-thumb span { position: absolute; right: 0; bottom: 0; left: 0; padding: 3px 2px; background: rgba(25,105,205,.92); color: #fff; font-size: 8px; font-weight: 500; text-align: center; }
.cutting-record-info { min-width: 0; flex: 1; }
.cutting-record-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cutting-record-title strong { overflow: hidden; color: var(--blue); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cutting-record-title span { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.cutting-record-facts { display: grid; gap: 3px; margin-top: 4px; color: var(--muted); font-size: 8px; }
.cutting-record-facts-row { display: grid; min-width: 0; gap: 7px; }
.cutting-record-facts-row.basic { grid-template-columns: 1fr 1fr; }
.cutting-record-facts-row.variants { grid-template-columns: 1.3fr .85fr 1fr; }
.cutting-record-facts span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cutting-record-facts b { color: #4b555c; font-size: 9px; }
.cutting-record-facts em { color: var(--blue); font-size: 9px; font-style: normal; font-weight: 700; }
.cutting-record-progresses { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 5px; }
.cutting-mini-progress > div:first-child { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.cutting-mini-progress > div:first-child b { color: #58636b; }
.cutting-mini-track { height: 3px; margin-top: 4px; overflow: hidden; border-radius: 2px; background: #edf0f2; }
.cutting-mini-track i { display: block; height: 100%; background: var(--blue); }
.cutting-record-cell { color: #535d64; font-size: 10px; }
.cutting-warning { display: grid !important; align-content: center; gap: 7px; }
.cutting-warning strong { color: #3f484e; }
.cutting-warning span { color: var(--muted); }
.cutting-record-actions { display: grid !important; grid-template-columns: 1fr 1fr; align-content: center; gap: 7px 12px; padding-right: 0 !important; border-left: 1px solid var(--line); }
.cutting-record-actions button { padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 10px; text-align: left; white-space: nowrap; }
.cutting-record-actions button:hover { text-decoration: underline; }
.cutting-record-actions .cutting-delete-action { color: #e05252; }
.cutting-record-actions .cutting-delete-action:hover { color: #c93434; }
.cutting-delete-warning { display: grid; gap: 9px; padding: 12px; border: 1px solid #f2c7c7; border-radius: 6px; background: #fff7f7; }
.cutting-delete-warning strong { color: #b83232; }
.cutting-delete-warning span, .cutting-delete-warning small { color: #7e5960; line-height: 1.6; }
.cutting-delete-warning b { color: #b83232; }
.cutting-list-empty { min-width: 1210px; padding: 46px 20px; color: var(--muted); text-align: center; }
.cutting-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 4px 2px; color: var(--muted); font-size: 10px; }
.cutting-pagination > div { display: flex; gap: 4px; }
.cutting-pagination button { min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #4a555d; }
.cutting-pagination button.active { border-color: var(--blue); color: var(--blue); }
.cutting-pagination button:disabled { color: #b8bec2; }
.cutting-pagination select { height: 32px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.cutting-list-shell.compact .cutting-record-row { min-height: 112px; }
.cutting-list-shell.compact .cutting-style-thumb { width: 58px; height: 72px; }
.cutting-list-shell.compact .cutting-record-progresses { margin-top: 6px; }
.cutting-detail-dialog { width: min(720px, 100%); max-height: 90vh; overflow: auto; border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.cutting-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 20px; }
.cutting-detail-grid > div { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: #fafbfb; }
.cutting-detail-grid span { display: block; color: var(--muted); font-size: 9px; }
.cutting-detail-grid strong { display: block; margin-top: 4px; overflow-wrap: anywhere; font-size: 11px; }
.cutting-detail-page-head { display: flex; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 7px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.cutting-detail-back { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-right: 1px solid var(--line); background: transparent; color: #52606a; font-size: 18px; }
.cutting-detail-page-head h2 { margin: 0; font-size: 16px; }
.cutting-detail-page-head p { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.cutting-detail-page-head p strong { color: var(--blue); }
.cutting-detail-page-head p i { width: 1px; height: 10px; background: var(--line); }
.cutting-detail-percent { padding: 4px 7px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 750; }
.cutting-detail-head-actions { display: flex; gap: 7px; margin-left: auto; }
.cutting-detail-overview { display: grid; grid-template-columns: 56px repeat(6, minmax(80px, 1fr)) minmax(190px, 1.35fr); align-items: center; gap: 10px; margin-bottom: 7px; padding: 8px 12px; }
.cutting-detail-overview > div:not(.cutting-detail-style-thumb):not(.cutting-detail-overall) { min-width: 0; }
.cutting-detail-overview span { display: block; color: var(--muted); font-size: 9px; }
.cutting-detail-overview strong { display: block; margin-top: 5px; overflow-wrap: anywhere; color: #3f494f; font-size: 11px; }
.cutting-detail-style-thumb { display: grid; place-items: center; width: 48px; height: 54px; overflow: hidden; border-radius: 4px; background: linear-gradient(145deg, #dbe1e5, #f3f5f6); color: #76828b; font-size: 18px; font-weight: 750; }
.cutting-detail-style-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* 业务图片统一悬停预览与点击大图 */
#appShell img { cursor: zoom-in; }
.image-hover-preview { position: fixed; z-index: 180; width: 250px; max-width: calc(100vw - 24px); padding: 5px; pointer-events: none; border: 1px solid #d9e3ef; border-radius: 8px; background: #fff; box-shadow: 0 12px 34px rgba(36, 54, 80, .2); }
.image-hover-preview img { display: block; width: 100%; max-height: 300px; object-fit: contain; border-radius: 5px; }
.image-lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 28px; background: rgba(24, 37, 56, .76); backdrop-filter: blur(3px); }
.image-lightbox[hidden], .image-hover-preview[hidden] { display: none; }
.image-lightbox figure { display: grid; gap: 9px; max-width: min(1100px, 94vw); max-height: 92vh; margin: 0; padding: 10px; border-radius: 10px; background: #fff; box-shadow: 0 20px 60px rgba(9, 19, 34, .38); }
.image-lightbox figure img { display: block; max-width: calc(94vw - 20px); max-height: calc(92vh - 58px); object-fit: contain; border-radius: 6px; cursor: default; }
.image-lightbox figcaption { overflow: hidden; color: #526179; font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox-close { position: fixed; top: 18px; right: 22px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(20,31,47,.56); color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.image-lightbox-close:hover { background: #347ff0; }
.cutting-detail-overall { align-self: stretch; display: grid; align-content: center; gap: 5px; padding-left: 10px; border-left: 1px solid var(--line); }
.cutting-detail-overall > div:first-child { display: flex; justify-content: space-between; }
.cutting-detail-overall > div:first-child strong { margin: 0; color: var(--blue); }
.cutting-detail-progress { height: 5px; overflow: hidden; border-radius: 3px; background: #edf0f2; }
.cutting-detail-progress i { display: block; height: 100%; background: var(--blue); }
.cutting-detail-overall footer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cutting-detail-overall footer span { padding: 3px; border-radius: 4px; background: #f6f7f8; text-align: center; }
.cutting-detail-overall footer b { display: block; margin-top: 2px; color: #374148; }
.cutting-detail-breakdown { margin-bottom: 7px; overflow: hidden; }
.cutting-detail-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.cutting-detail-panel-head h2 { margin: 0; font-size: 13px; }
.cutting-detail-panel-head p { display: none; }
.cutting-detail-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; }
.cutting-detail-legend span { display: flex; align-items: center; gap: 5px; }
.cutting-detail-legend i { width: 8px; height: 8px; border-radius: 50%; }
.cutting-detail-legend .cut { background: #d7e8fb; }
.cutting-detail-legend .done { background: #cfeedd; }
.cutting-detail-legend .defect { background: #f7c8cc; }
.cutting-detail-matrix-wrap { overflow-x: auto; }
.cutting-detail-matrix-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 10px; }
.cutting-detail-matrix-wrap th, .cutting-detail-matrix-wrap td { height: 31px; padding: 3px 9px; border-bottom: 1px solid var(--line); text-align: center; }
.cutting-detail-matrix-wrap thead th { background: #fafbfc; color: #56616a; }
.cutting-detail-matrix-wrap tbody th { color: #45515a; }
.cutting-detail-matrix-metrics { display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
.cutting-detail-matrix-metrics > span { display: inline-flex; align-items: center; gap: 2px; min-width: 38px; padding: 3px 6px; border-radius: 4px; font-weight: 700; }
.cutting-detail-matrix-metrics > span small { margin: 0; font-size: 7px; font-weight: 500; }
.cutting-detail-matrix-metrics .cut { background: #eaf3ff; color: #2f78e6; }
.cutting-detail-matrix-metrics .done { background: #eaf8f0; color: #27895a; }
.cutting-detail-matrix-metrics .defect { background: #fff0f1; color: #d83d49; }
.cutting-detail-matrix-total th { background: #f8fbff; }
.cutting-detail-matrix-total .cutting-detail-matrix-metrics { font-weight: 400; }
.cutting-ticket-progress-panel { overflow: hidden; }
.cutting-ticket-tabs { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.cutting-ticket-tabs > button:not(.btn) { align-self: stretch; min-width: 64px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #5d6870; }
.cutting-ticket-tabs > button.active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 750; }
.cutting-ticket-tabs > span { flex: 1; }
.cutting-ticket-tab-actions { display: flex; align-items: center; gap: 7px; padding: 5px 0; }
.cutting-ticket-tab-actions .btn { min-height: 32px; padding: 0 15px; border-radius: 5px; font-size: 11px; font-weight: 650; }
.cutting-ticket-progress-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 7px; background: #f6f7f8; }
.cutting-ticket-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.cutting-ticket-card.rework-ticket-card { border-color: #f1df9b; background: #fffbea; }
.cutting-ticket-card.rework-ticket-card > header, .cutting-ticket-card.rework-ticket-card .cutting-ticket-meta, .cutting-ticket-card.rework-ticket-card .cutting-ticket-operation-table { background: #fffbea; }
.cutting-ticket-card.rework-ticket-card .cutting-ticket-operation-table th { background: #fff7d8; }
.cutting-ticket-card > header .rework-ticket-label { border: 1px solid #efd177; background: #fff2bd; color: #9a6a00; }
.cutting-ticket-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 31px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.cutting-ticket-card > header > div { display: flex; align-items: center; gap: 7px; }
.cutting-ticket-card > header strong { color: var(--blue); font-size: 11px; }
.cutting-ticket-card > header span { padding: 3px 6px; border-radius: 9px; background: #fff0f0; color: var(--red); font-size: 8px; }
.cutting-ticket-card > header span.complete { background: #e9f7ef; color: #15945a; }
.cutting-ticket-card > header small { color: var(--muted); font-size: 8px; }
.cutting-ticket-card > header button, .cutting-ticket-operation-table tbody button { padding: 3px 6px; border: 0; background: transparent; color: var(--blue); font-size: 9px; }
.cutting-ticket-card > header button.danger { color: var(--red); }
.cutting-ticket-card > header .ticket-delete-action { color: #df3038; font-weight: 700; }
.cutting-ticket-card > header .ticket-delete-action:hover { border-radius: 3px; background: #fff0f1; }
.cutting-ticket-card > header .cutting-ticket-card-actions { justify-content: flex-end; gap: 2px; flex-wrap: wrap; }
.cutting-ticket-card > header .ticket-quality-action { min-width: 34px; border-radius: 4px; font-weight: 700; }
.cutting-ticket-card > header .ticket-quality-action.rework { background: #eef5ff; color: #347ff0; }
.cutting-ticket-card > header .ticket-quality-action.defect { background: #fff0e6; color: #e46719; }
.cutting-ticket-card > header .ticket-quality-action:hover { filter: brightness(.97); }
.cutting-ticket-identity { min-width: 0; }
.cutting-ticket-qr-trigger { position: relative; }
.cutting-ticket-qr-trigger > button { color: var(--blue) !important; font-weight: 750; }
.cutting-ticket-qr-popover { position: absolute; top: calc(100% + 7px); left: 0; z-index: 20; display: none !important; width: 132px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 10px 30px rgba(20,30,38,.2); text-align: center; }
.cutting-ticket-qr-trigger:hover .cutting-ticket-qr-popover, .cutting-ticket-qr-trigger:focus-within .cutting-ticket-qr-popover { display: grid !important; place-items: center; gap: 4px; }
.cutting-ticket-qr-code { width: 108px; height: 108px; }
.cutting-ticket-card > header .cutting-ticket-qr-popover span { display: block; padding: 0; border-radius: 0; background: transparent; color: #3f494f; font-size: 8px; overflow-wrap: anywhere; }
.cutting-ticket-card > header .cutting-ticket-qr-popover small { color: var(--muted); font-size: 8px; }
.cutting-ticket-meta { display: grid; grid-template-columns: repeat(3, auto) minmax(150px, 1fr) 90px 30px; align-items: center; gap: 7px; padding: 5px 8px; color: var(--muted); font-size: 8px; }
.cutting-ticket-meta span { white-space: nowrap; }
.cutting-ticket-meta span b { color: #46515a; }
.cutting-ticket-meta .ticket-quantity.has-defect > b { color: #ed3e48; }
.cutting-ticket-meta .ticket-defect-count, .cutting-ticket-meta .ticket-quantity > em { display: inline-block; margin-left: 6px; padding: 2px 5px; border-radius: 8px; background: #fff0f1; color: #ed3e48; font-size: 8px; font-style: normal; font-weight: 700; }
.cutting-ticket-meta > div { height: 5px; overflow: hidden; border-radius: 3px; background: #e9edf0; }
.cutting-ticket-meta > div i { display: block; height: 100%; background: var(--blue); }
.cutting-ticket-meta > b { color: #53606a; text-align: right; }
.cutting-ticket-operation-table { min-width: 0; overflow: visible; padding: 0 6px 6px; }
.cutting-ticket-operation-table table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 8px; }
.cutting-ticket-operation-table th, .cutting-ticket-operation-table td { padding: 4px 5px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.cutting-ticket-operation-table th:nth-child(1) { width: 14%; }
.cutting-ticket-operation-table th:nth-child(2) { width: 9%; }
.cutting-ticket-operation-table th:nth-child(3) { width: 39%; }
.cutting-ticket-operation-table th:nth-child(4) { width: 14%; }
.cutting-ticket-operation-table th:nth-child(5) { width: 14%; }
.cutting-ticket-operation-table th:nth-child(6) { width: 10%; }
.cutting-ticket-operation-table th { background: #f4f5f6; color: #536069; }
.cutting-operation-target { margin-right: 2px; color: #347ff0; }
.cutting-operation-target.has-rework { color: #e6a700; }
.cutting-operation-notes { display: grid; gap: 2px; color: #596776; }
.cutting-operation-notes .no-operation-note { color: #a2adb7; }

.cutting-operation-progress-view, .cutting-production-progress-view { padding: 8px; background: #f6f8fc; }
.cutting-operation-progress-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 8px; }
.cutting-operation-list, .cutting-operation-detail { overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cutting-operation-list > header { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.cutting-operation-list > header strong { font-size: 12px; }
.cutting-operation-list > header span { color: var(--muted); font-size: 9px; }
.cutting-operation-list > button { display: grid; gap: 6px; width: calc(100% - 12px); margin: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #4c5965; text-align: left; }
.cutting-operation-list > button:hover { border-color: #b7cff3; background: #f8fbff; }
.cutting-operation-list > button.active { border-color: #6fa5f4; background: #edf5ff; color: #286fdd; box-shadow: inset 0 0 0 1px rgba(59,130,246,.08); }
.cutting-operation-list > button > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cutting-operation-list > button strong { font-size: 11px; }
.cutting-operation-list > button b { color: #347ff0; font-size: 11px; }
.cutting-operation-list > button small { color: #8492a5; font-size: 8px; }
.cutting-operation-list-quality, .cutting-operation-quality, .cutting-production-quality { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cutting-operation-list-quality span, .cutting-operation-quality span, .cutting-production-quality span { padding: 2px 6px; border-radius: 999px; font-size: 8px; line-height: 1.4; white-space: nowrap; }
.cutting-operation-list-quality .defect, .cutting-operation-quality .defect, .cutting-production-quality .defect { background: #fff0f1; color: #d83d49; }
.cutting-operation-list-quality .rework, .cutting-operation-quality .rework, .cutting-production-quality .rework { background: #fff7dc; color: #ad7500; }
.cutting-production-quality .normal { background: #edf8f2; color: #38815c; }
.cutting-operation-quality { justify-content: center; }
.cutting-operation-quality-normal { color: #84a092; font-size: 8px; }
.cutting-operation-list-track { height: 4px; overflow: hidden; border-radius: 2px; background: #e8edf4; }
.cutting-operation-list-track i { display: block; height: 100%; background: #3b82f6; }
.cutting-operation-detail > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cutting-operation-detail h3 { margin: 0; font-size: 13px; }
.cutting-operation-detail header p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.cutting-operation-summary { display: grid; grid-template-columns: minmax(150px, 1.45fr) repeat(6, minmax(72px, 1fr)); border-bottom: 1px solid var(--line); }
.cutting-operation-summary > div { min-height: 67px; padding: 10px 12px; border-right: 1px solid var(--line); }
.cutting-operation-summary > div:last-child { border-right: 0; }
.cutting-operation-summary span, .cutting-operation-summary small { color: var(--muted); font-size: 8px; }
.cutting-operation-summary strong { display: inline-block; margin-top: 5px; color: #2e405c; font-size: 18px; }
.cutting-operation-summary small { margin-left: 3px; }
.cutting-operation-summary > div:first-child strong { display: block; color: #347ff0; }
.cutting-operation-summary > div:first-child > div { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 3px; background: #e9eef5; }
.cutting-operation-summary > div:first-child > div i { display: block; height: 100%; background: #3b82f6; }
.cutting-operation-summary .quality-defect-value { color: #d83d49; }
.cutting-operation-summary .quality-rework-value { color: #c18400; }
.cutting-operation-table-wrap { overflow-x: auto; }
.cutting-operation-progress-table { min-width: 980px; }
.cutting-operation-progress-table th, .cutting-operation-progress-table td { height: 40px; padding: 6px 8px; text-align: center; font-size: 9px; }
.cutting-operation-progress-table th { background: #f7f9fc; color: #596981; }
.cutting-operation-progress-table th:first-child, .cutting-operation-progress-table td:first-child { padding-left: 10px; text-align: left; }
.cutting-operation-progress-table td strong, .cutting-operation-progress-table td small { display: block; }
.cutting-operation-progress-table td small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.cutting-operation-progress-table td > button { padding: 3px 7px; border: 0; background: transparent; color: #347ff0; font-size: 9px; }
.cutting-operation-worker-logs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.cutting-operation-worker-logs > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; border-radius: 3px; background: #f3f7fc; color: #5e6d81; }
.cutting-operation-worker-logs > span b { color: #31445f; }
.cutting-operation-worker-logs > span em { color: #347ff0; font-style: normal; }
.cutting-operation-worker-logs > span small { display: inline; margin: 0; }
.cutting-operation-worker-logs > span.empty { color: #9aa7b8; }
.cutting-operation-worker-logs .cutting-operation-retract { padding: 2px 5px; border: 0; border-radius: 4px; background: #fff0f1; color: #e5484d; font-size: 8px; white-space: nowrap; }
.cutting-operation-worker-logs .cutting-operation-retract:hover { background: #ffe1e3; }
.cutting-operation-row-progress { width: 76px; height: 4px; margin: 0 auto 4px; overflow: hidden; border-radius: 2px; background: #e8edf4; }
.cutting-operation-row-progress i { display: block; height: 100%; background: #3b82f6; }
.cutting-production-progress-view { display: grid; gap: 8px; }
.cutting-production-summary { display: grid; grid-template-columns: minmax(220px, 1.7fr) repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cutting-production-summary > div { min-height: 74px; padding: 11px 14px; border-right: 1px solid var(--line); }
.cutting-production-summary > div:last-child { border-right: 0; }
.cutting-production-summary span, .cutting-production-summary small { color: var(--muted); font-size: 9px; }
.cutting-production-summary strong { display: inline-block; margin-top: 7px; color: #2c3f5c; font-size: 19px; }
.cutting-production-summary small { margin-left: 3px; }
.cutting-production-summary > div:first-child strong { display: block; color: #347ff0; }
.cutting-production-summary > div:first-child > div { height: 5px; margin-top: 7px; overflow: hidden; border-radius: 3px; background: #e9eef5; }
.cutting-production-summary > div:first-child i { display: block; height: 100%; background: #3b82f6; }
.cutting-production-operation-grid, .cutting-production-operation-row { display: grid; gap: 8px; }
.cutting-production-operation-row-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cutting-production-operation-card { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 112px; padding: 9px; border: 1px solid #dce5f1; border-radius: 8px; background: #fff; box-shadow: 0 2px 7px rgba(53, 91, 140, .05); }
.cutting-production-ring { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: conic-gradient(#4388f4 var(--progress), #e9eef6 0); }
.cutting-production-ring::before { content: ''; grid-area: 1 / 1; width: 43px; height: 43px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px #f0f3f8; }
.cutting-production-ring > div { z-index: 1; grid-area: 1 / 1; display: grid; place-items: center; gap: 1px; }
.cutting-production-ring strong { color: #2f7bea; font-size: 13px; line-height: 1; }
.cutting-production-ring small { color: #8b9aae; font-size: 7px; }
.cutting-production-operation-info { min-width: 0; }
.cutting-production-operation-info header { display: grid; gap: 2px; }
.cutting-production-operation-info header strong { overflow: hidden; color: #263b58; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cutting-production-operation-info header span { color: #8b9aae; font-size: 8px; }
.cutting-production-operation-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 7px 0; }
.cutting-production-operation-counts span { display: grid; gap: 2px; color: #8b9aae; font-size: 8px; }
.cutting-production-operation-counts b { color: #344964; font-size: 11px; }
.cutting-production-quality { min-height: 21px; margin: -4px 0 5px; }
.cutting-production-operation-info > button { padding: 0; border: 0; background: transparent; color: #347ff0; font-size: 9px; }
.cutting-production-operation-card.active { border-color: #72a8f7; box-shadow: 0 0 0 2px rgba(52, 127, 240, .08); }
.cutting-production-inline-detail { position: relative; overflow: visible; border: 1px solid #9fc0ef; border-radius: 8px; background: #fff; box-shadow: 0 3px 10px rgba(52, 127, 240, .08); }
.cutting-production-inline-detail::before { content: ''; position: absolute; top: -7px; left: calc((var(--detail-column) - .5) * 20%); width: 12px; height: 12px; border-top: 1px solid #9fc0ef; border-left: 1px solid #9fc0ef; background: #f8fbff; transform: translateX(-50%) rotate(45deg); }
.cutting-production-inline-detail > * { position: relative; z-index: 1; }
.cutting-production-inline-detail > header { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 13px; border-bottom: 1px solid #e5ebf3; background: #f8fbff; }
.cutting-production-inline-detail > header div { display: grid; gap: 2px; }
.cutting-production-inline-detail > header strong { color: #263b58; font-size: 12px; }
.cutting-production-inline-detail > header span { color: #8493a8; font-size: 8px; }
.cutting-production-inline-detail > header button { padding: 4px 10px; border: 1px solid #cbd9ec; border-radius: 4px; background: #fff; color: #347ff0; font-size: 9px; }
.cutting-production-detail-table-wrap { overflow-x: auto; }
.cutting-production-detail-table-wrap table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 9px; }
.cutting-production-detail-table-wrap th, .cutting-production-detail-table-wrap td { height: 38px; padding: 6px 9px; border-bottom: 1px solid #edf1f6; text-align: left; }
.cutting-production-detail-table-wrap th { background: #f7f9fc; color: #66768c; font-weight: 600; }
.cutting-production-detail-table-wrap td { color: #42546d; }
.cutting-production-detail-table-wrap td strong, .cutting-production-detail-table-wrap td small { display: block; }
.cutting-production-detail-table-wrap td small { margin-top: 2px; color: #8d9bae; font-size: 8px; }
.cutting-production-detail-table-wrap td > button { padding: 3px 7px; border: 0; border-radius: 4px; background: #fff0f1; color: #e5484d; font-size: 8px; }
.production-ticket-type { display: inline-flex; padding: 2px 7px; border-radius: 999px; font-size: 8px; white-space: nowrap; }
.production-ticket-type.source { background: #edf4ff; color: #3979d8; }
.production-ticket-type.rework { background: #fff4c7; color: #9a6a00; }
.production-rework-detail-row td { background: #fffdf3; }
.cutting-production-detail-table-wrap td .production-rework-source { color: #ad7b0a; }
.production-rework-pending { color: #b07b00; }
.cutting-production-detail-empty { padding: 28px 16px; color: #8d9bae; font-size: 9px; text-align: center; }
.cutting-operation-reports { display: grid; gap: 4px; }
.cutting-operation-reports span { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; }
.cutting-operation-reports b { color: #3c4850; }
.cutting-operation-reports em { color: #b77a18; font-size: 8px; font-style: normal; }
.cutting-operation-reports .rework-deducted-quantity { color: #d98b16; }
.cutting-operation-reports small { color: var(--muted); }
.cutting-operation-reports .no-report { display: block; color: var(--muted); }
.cutting-op-status { color: var(--muted); white-space: nowrap; }
.cutting-op-status.doing { color: #b77a18; }
.cutting-op-status.done { color: #15945a; }
.cutting-detail-empty { padding: 50px 20px; color: var(--muted); text-align: center; }
.cutting-sheet-format-dialog { width: min(430px, 100%); border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.cutting-sheet-format-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 28px 24px; }
.cutting-sheet-format-options label { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 15px 14px; border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; }
.cutting-sheet-format-options label:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, white); }
.cutting-sheet-format-options input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--primary); }
.cutting-sheet-format-options span { display: grid; gap: 4px; }
.cutting-sheet-format-options strong { color: var(--text); font-size: 12px; }
.cutting-sheet-format-options small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.cutting-report-dialog { width: min(1050px, 100%); max-height: 90vh; overflow: auto; border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.cutting-report-ticket-summary, .cutting-adjust-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: #59656d; font-size: 10px; }
.cutting-report-ticket-summary b, .cutting-adjust-summary b { margin-left: 4px; color: #303a41; }
.cutting-report-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px; }
.cutting-report-toolbar button { min-height: 29px; padding: 0 10px; border: 0; border-radius: 4px; background: var(--blue); color: #fff; font-size: 9px; }
.cutting-report-toolbar span { color: var(--muted); font-size: 9px; }
.cutting-report-table-wrap, .cutting-retract-table-wrap { padding: 0 18px; overflow-x: auto; }
.cutting-report-table, .cutting-retract-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.cutting-report-table th, .cutting-report-table td, .cutting-retract-table th, .cutting-retract-table td { padding: 8px 9px; border: 1px solid var(--line); text-align: left; }
.cutting-report-table th, .cutting-retract-table th { background: #f3f4f5; color: #4c5860; }
.cutting-report-table tr.completed { opacity: .55; }
.cutting-report-table td:first-child strong, .cutting-report-table td:first-child small { display: block; }
.cutting-report-table td:first-child small { margin-top: 3px; color: var(--muted); }
.cutting-report-table select, .cutting-report-table input, .cutting-retract-table input[type="number"] { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.cutting-report-table th:nth-child(1) { width: 15%; }
.cutting-report-table th:nth-child(2) { width: 12%; }
.cutting-report-table th:nth-child(3) { width: 23%; }
.cutting-report-table th:nth-child(4) { width: 44px; }
.cutting-report-table th:nth-child(5) { width: 15%; }
.cutting-report-table th:nth-child(6) { width: 29%; }
.cutting-report-sync-heading { text-align: center !important; }
.cutting-report-table td.cutting-report-worker-sync { padding: 3px; text-align: center; }
.cutting-report-worker-sync button { display: flex; align-items: center; justify-content: center; width: 30px; height: 25px; margin: 2px auto; padding: 0; border: 1px solid #c9d9f6; border-radius: 4px; background: #f5f8ff; color: #2164e8; font-size: 15px; line-height: 1; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.cutting-report-worker-sync button:hover:not(:disabled) { border-color: #6e9df5; background: #eaf1ff; transform: translateY(-1px); }
.cutting-report-worker-sync button:disabled { border-color: #e3e8ef; background: #f7f8fa; color: #b7c0cb; cursor: not-allowed; }
.cutting-report-table tr.worker-synced td { animation: cutting-worker-synced .7s ease; }
@keyframes cutting-worker-synced { 0%, 100% { background: transparent; } 35% { background: #edf4ff; } }
.cutting-report-hint, .cutting-adjust-note { margin: 11px 18px 0; padding: 9px 11px; border-radius: 4px; background: #f6f8fa; color: var(--muted); font-size: 9px; }
.cutting-adjust-dialog { width: min(780px, 100%); max-height: 90vh; overflow: auto; border-radius: 7px; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.delete-confirm-dialog { width: min(440px, 100%); overflow: hidden; border-radius: 7px; background: #fff; box-shadow: 0 20px 60px rgba(32, 42, 54, .25); }
.delete-confirm-dialog .modal-header h2 { color: #d92d36; }
.delete-confirm-message { margin: 22px 22px 8px; padding: 16px 17px; border: 1px solid #efb6ba; border-radius: 6px; background: #fff3f4; color: #d92d36; font-size: 12px; font-weight: 650; line-height: 1.65; text-align: center; }
.delete-confirm-submit { border: 1px solid #dc3545; background: #dc3545; color: #fff; }
.delete-confirm-submit:hover { border-color: #c92b39; background: #c92b39; }
.btn-danger { border: 1px solid #dc3545; background: #fff; color: #dc3545; }
.btn-danger:hover { background: #fff0f1; }
.modal-actions-spacer { flex: 1; }
.delete-confirm-backdrop { z-index: 110; }
#modalForm[data-type="deleteTemplate"] .btn-primary,
#modalForm[data-type="deleteOrder"] .btn-primary,
#modalForm[data-type="deleteCutting"] .btn-primary,
#modalForm[data-type="deleteCuttingWithReports"] .btn-primary { border-color: #dc3545; background: #dc3545; color: #fff; }
.cutting-adjust-empty { padding: 42px 20px; color: var(--muted); text-align: center; }
.cutting-retract-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.cutting-retract-select-all { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.cutting-retract-select-all span { color: #4c5860; font-size: 9px; }
.cutting-retract-table input:disabled { background: #f1f2f3; color: #9ba3a9; }
.cutting-quantity-editor { display: grid; gap: 7px; padding: 24px 20px 28px; color: #4d5961; font-size: 10px; }
.cutting-quantity-editor input { width: min(260px, 100%); height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; font-size: 14px; }
.cutting-quantity-editor small { color: var(--muted); font-size: 9px; }
.cutting-adjust-dialog:has(.ticket-batch-edit-wrap) { width: min(1080px, 100%); }
.ticket-batch-edit-wrap { padding: 14px 18px 0; overflow-x: auto; }
.ticket-batch-edit-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 9px; }
.ticket-batch-edit-table th, .ticket-batch-edit-table td { padding: 7px 8px; border: 1px solid var(--line); text-align: left; vertical-align: middle; }
.ticket-batch-edit-table th { background: #f4f7fb; color: #55657a; }
.ticket-batch-edit-table input { width: 100%; min-width: 70px; height: 32px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 4px; }
.ticket-batch-edit-table input[type="checkbox"] { width: 15px; min-width: 15px; height: 15px; accent-color: var(--primary); }
.ticket-batch-edit-table td strong, .ticket-batch-edit-table td small { display: block; }
.ticket-batch-edit-table td small { margin-top: 2px; color: #9a6b20; font-size: 8px; }
.ticket-batch-edit-table tr.unselected { opacity: .48; }
.ticket-add-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 22px 20px; }
.ticket-add-form label { display: grid; gap: 6px; color: #536171; font-size: 9px; }
.ticket-add-form label.wide { grid-column: 1 / -1; }
.ticket-add-form em { color: #e5484d; font-style: normal; }
.ticket-add-form input { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; }
.cutting-adjust-dialog:has(.ticket-add-table-wrap) { width: min(1040px, 100%); }
.ticket-add-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 8px; }
.ticket-add-toolbar > div { display: grid; gap: 3px; }
.ticket-add-toolbar strong { color: #26364e; font-size: 12px; }
.ticket-add-toolbar span { color: var(--muted); font-size: 9px; }
.ticket-add-toolbar .btn { min-height: 31px; }
.ticket-add-table-wrap { max-height: min(410px, 48vh); margin: 0 18px; overflow: auto; border: 1px solid #e4eaf1; border-radius: 6px; }
.ticket-add-table { width: 100%; min-width: 790px; border-collapse: collapse; }
.ticket-add-table th, .ticket-add-table td { height: 45px; padding: 6px 7px; border-bottom: 1px solid #edf0f4; text-align: left; }
.ticket-add-table th { position: sticky; top: 0; z-index: 1; height: 36px; background: #f7f9fc; color: #526179; font-size: 9px; font-weight: 600; }
.ticket-add-table th:nth-child(1) { width: 100px; }
.ticket-add-table th:nth-child(2), .ticket-add-table th:nth-child(3) { width: 170px; }
.ticket-add-table th:nth-child(4) { width: 110px; }
.ticket-add-table th:nth-child(6) { width: 60px; text-align: center; }
.ticket-add-table em { color: #e5484d; font-style: normal; }
.ticket-add-table input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; font-size: 10px; }
.ticket-add-table input:focus { border-color: #4096ff; outline: 0; box-shadow: 0 0 0 2px rgba(5, 145, 255, .10); }
.ticket-add-table td:last-child { text-align: center; }
.ticket-add-remove { padding: 4px 6px; border: 0; background: transparent; color: #e5484d; font-size: 9px; cursor: pointer; }
.ticket-add-remove:hover { border-radius: 4px; background: #fff0f1; }
.print-cutting-sheet-area, .print-payroll-area, .print-company-join-area { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; transform: translateY(20px); padding: 12px 16px; border-radius: 5px; background: #253139; color: white; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.center-error { top: 50%; right: auto; bottom: auto; left: 50%; min-width: 320px; max-width: min(560px, calc(100vw - 40px)); transform: translate(-50%, -50%) scale(.96); border: 1px solid #f3aaaa; background: #fff5f5; box-shadow: 0 14px 38px rgba(185, 28, 28, .18); color: #d62828; font-size: 14px; font-weight: 750; text-align: center; }
.toast.center-error.show { transform: translate(-50%, -50%) scale(1); }
.print-ticket-area { display: none; }
.mobile-nav { display: none; }
.mobile-more-backdrop { display: none; }
.mobile-home-dashboard { display: none; }

@media print {
  @page { margin: 0; }
  @page ticket { size: 40mm 80mm; margin: 0; }
  @page cutting { size: A4 portrait; margin: 10mm; }
  body { margin: 0 !important; padding: 0 !important; background: #fff !important; color: #000 !important; }
  body > *:not(#printTicketArea) { display: none !important; }
  #printTicketArea { display: block !important; width: 40mm; margin: 0; color: #000; font-family: Arial, "Microsoft YaHei", sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-ticket { page: ticket; position: relative; box-sizing: border-box; width: 40mm; height: 80mm; margin: 0; padding: 2.2mm; overflow: hidden; break-after: page; page-break-after: always; break-inside: avoid; page-break-inside: avoid; background: #fff; }
  .print-ticket:last-child { break-after: auto; page-break-after: auto; }
  .print-ticket header { margin-bottom: 1mm; text-align: center; font-size: 11pt; font-weight: 500; line-height: 1.1; }
  .print-ticket-fields { display: grid; gap: .55mm; font-size: min(var(--ticket-font-size, 10pt), 11pt); font-weight: 750; line-height: 1.15; }
  .print-ticket-fields > div { display: flex; align-items: baseline; gap: .8mm; }
  .print-ticket-fields span { flex: 0 0 auto; }
  .print-ticket-qr-row { display: grid; grid-template-columns: 20mm 1fr; align-items: start; gap: 1.2mm; margin-top: 1.2mm; }
  .print-ticket-qr { display: block; width: 20mm; height: 20mm; shape-rendering: crispEdges; }
  .print-qr-disabled { display: grid; place-items: center; width: 20mm; height: 20mm; border: .3mm dashed #777; color: #555; font-size: 7pt; text-align: center; }
  .print-ticket-qr-meta { min-width: 0; padding-top: .8mm; }
  .print-ticket-qr-meta strong { display: block; margin-bottom: 1.5mm; font-size: 12pt; font-weight: 500; }
  .print-ticket-qr-meta span { display: block; overflow-wrap: anywhere; font-size: 10pt; line-height: 1.15; }
  .print-ticket footer { position: absolute; right: 2.2mm; bottom: 2.5mm; left: 2.2mm; display: flex; justify-content: space-between; gap: 2mm; font-size: 9pt; }
  .print-ticket footer strong { font-weight: 500; }
  body.printing-cutting-sheet > *:not(#printCuttingSheetArea) { display: none !important; }
  body.printing-cutting-sheet #printTicketArea { display: none !important; }
  body.printing-cutting-sheet #printCuttingSheetArea { display: block !important; width: 190mm; margin: 0 auto; color: #000; }
  .print-cutting-sheet { page: cutting; box-sizing: border-box; width: 190mm; min-height: 267mm; padding: 5mm 7mm; font-family: Arial, "Microsoft YaHei", sans-serif; color: #111; }
  .print-cutting-sheet-header { position: relative; margin-bottom: 6mm; }
  .print-cutting-sheet-header > small { position: absolute; top: 0; left: 0; font-size: 8pt; }
  .print-cutting-sheet h1 { margin: 0; text-align: center; font-size: 20pt; }
  .print-cutting-sheet-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3mm 8mm; font-size: 10pt; }
  .print-cutting-sheet-info span { min-width: 0; }
  .print-cutting-sheet-section { margin: 5mm 0 2mm; font-size: 10pt; }
  .print-cutting-sheet table { width: 100%; margin-top: 2mm; border-collapse: collapse; font-size: 9pt; }
  .print-cutting-sheet th, .print-cutting-sheet td { padding: 2mm 2.5mm; border: .2mm solid #777; text-align: left; vertical-align: middle; }
  .print-cutting-sheet th { background: #f5f5f5; font-weight: 700; }
  .print-cutting-sheet .cutting-sheet-summary-table { width: 68%; }
  .print-cutting-sheet .cutting-sheet-matrix-table { width: 86%; }
  .print-cutting-sheet .cutting-sheet-matrix-table th:not(:first-child), .print-cutting-sheet .cutting-sheet-matrix-table td:not(:first-child) { text-align: center; }
  .print-cutting-sheet .cutting-sheet-list-table { width: 48%; }
  @page payroll { size: A4 landscape; margin: 12mm; }
  body.printing-payroll > *:not(#printPayrollArea) { display: none !important; }
  body.printing-payroll #printTicketArea, body.printing-payroll #printCuttingSheetArea { display: none !important; }
  body.printing-payroll #printPayrollArea { display: block !important; width: 273mm; margin: 0 auto; color: #111; }
  .print-payroll-sheet { page: payroll; box-sizing: border-box; width: 273mm; padding: 4mm 5mm; break-after: page; page-break-after: always; font-family: Arial, "Microsoft YaHei", sans-serif; color: #111; }
  .print-payroll-sheet:last-child { break-after: auto; page-break-after: auto; }
  .print-payroll-sheet > header { position: relative; margin-bottom: 7mm; text-align: center; }
  .print-payroll-sheet > header h1 { margin: 0; font-size: 18pt; }
  .print-payroll-sheet > header span { position: absolute; right: 0; bottom: 1mm; color: #555; font-size: 8pt; }
  .print-payroll-info { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 4mm 10mm; margin-bottom: 3mm; padding-bottom: 3mm; border-bottom: .4mm solid #333; font-size: 10pt; }
  .print-payroll-info span:nth-child(4) { grid-column: span 2; }
  .print-payroll-info b { margin-left: 2mm; }
  .print-payroll-info .signature-line { display: inline-block; width: 34mm; border-bottom: .3mm solid #333; }
  .print-payroll-sheet table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: 8.5pt; }
  .print-payroll-sheet th, .print-payroll-sheet td { padding: 2mm 1.5mm; border: .2mm solid #777; text-align: center; vertical-align: middle; }
  .print-payroll-sheet th { background: #f0f0f0; font-weight: 700; }
  .print-payroll-sheet > footer { margin-top: 3mm; color: #555; font-size: 7.5pt; text-align: right; }
  .monthly-payroll-slip-sheet > header { margin-bottom: 5mm; }
  .monthly-payroll-slip { margin-bottom: 5mm; break-inside: avoid; page-break-inside: avoid; }
  .monthly-payroll-slip-person { display: flex; align-items: center; gap: 14mm; margin-bottom: 2mm; font-size: 9.5pt; }
  .monthly-payroll-slip-person b { margin-left: 1.5mm; }
  .monthly-payroll-slip-person span:last-child { margin-left: auto; }
  .monthly-payroll-slip-person i { display: inline-block; width: 24mm; margin-left: 1.5mm; border-bottom: .2mm solid #555; }
  .monthly-payroll-slip table { table-layout: auto; font-size: 7.5pt; }
  .monthly-payroll-slip th, .monthly-payroll-slip td { padding: 1.6mm .9mm; }
  @page companyjoin { size: A4 portrait; margin: 0; }
  body.printing-company-join > *:not(#printCompanyJoinArea) { display: none !important; }
  body.printing-company-join #printTicketArea,
  body.printing-company-join #printCuttingSheetArea,
  body.printing-company-join #printPayrollArea { display: none !important; }
  body.printing-company-join #printCompanyJoinArea { display: block !important; width: 210mm; margin: 0; color: #111; }
  .print-company-join-sheet { page: companyjoin; position: relative; box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 18mm 22mm 15mm; font-family: Arial, "Microsoft YaHei", sans-serif; color: #172b45; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-company-join-sheet > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6mm; border-bottom: .3mm solid #dce5ef; }
  .print-company-system { display: flex; align-items: center; gap: 3mm; }
  .print-company-system img { width: 13mm; height: 13mm; object-fit: contain; }
  .print-company-system strong { color: #172b45; font-size: 22pt; letter-spacing: 1pt; }
  .print-company-join-sheet > header > span { color: #6f7f92; font-size: 10pt; }
  .print-company-join-sheet main { display: flex; align-items: center; flex-direction: column; padding-top: 14mm; text-align: center; }
  .print-company-join-sheet h1 { margin: 0; color: #172b45; font-size: 25pt; }
  .print-company-subtitle { margin: 3mm 0 8mm; color: #718196; font-size: 11pt; }
  .print-company-qr { display: grid; width: 85mm; height: 85mm; box-sizing: border-box; place-items: center; padding: 5mm; border: .35mm solid #cfdbea; border-radius: 3mm; background: #fff; }
  .print-company-qr svg { display: block; width: 100%; height: 100%; shape-rendering: crispEdges; }
  .print-company-name { display: grid; gap: 2mm; margin-top: 8mm; }
  .print-company-name span { color: #8492a5; font-size: 10pt; }
  .print-company-name strong { color: #172b45; font-size: 22pt; }
  .print-company-invite { display: flex; align-items: center; gap: 4mm; margin-top: 6mm; padding: 3mm 5mm; border-radius: 2mm; background: #f1f6fc; }
  .print-company-invite span { color: #7a899c; font-size: 10pt; }
  .print-company-invite strong { color: #1677ff; font-size: 13pt; letter-spacing: 1pt; }
  .print-company-guide { width: 132mm; margin: 7mm 0 0; color: #647489; font-size: 10pt; line-height: 1.8; }
  .print-company-join-sheet > footer { position: absolute; right: 22mm; bottom: 14mm; left: 22mm; display: flex; align-items: center; justify-content: space-between; padding-top: 4mm; border-top: .3mm solid #e0e7ef; color: #7b8999; font-size: 8.5pt; }
  .print-company-join-sheet > footer strong { color: #3b5879; font-weight: 600; }
}

@media (min-width: 761px) {
  :root { --sidebar-width: 180px; }
  .sidebar { padding: 14px 8px 10px; }
  .brand { gap: 6px; padding: 0 8px 14px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand strong { font-size: 18px; }
  .nav-list { gap: 2px; }
  .nav-section { margin: 8px 8px 2px; }
  .nav-item { grid-template-columns: 21px 1fr auto; height: 35px; padding: 0 8px; font-size: 13px; }
  .nav-icon { font-size: 15px; }
  .factory-card { padding-top: 8px; }
  .factory-avatar { width: 31px; height: 31px; }
  .main-content { padding: 0 18px 30px; }
  .topbar { min-height: 52px; }
  .topbar h1 { font-size: 20px; }
  .btn { min-height: 34px; padding: 0 12px; }
  .panel-heading { padding: 13px 15px; }
  .filter-bar { gap: 9px; margin-bottom: 11px; padding: 10px 12px; }
  .metric-grid { gap: 10px; margin-bottom: 11px; }
  .metric-card { min-height: 94px; padding: 12px 14px; }
  .metric-value { margin-top: 7px; font-size: 22px; }
  .metric-foot { margin-top: 6px; }
  .dashboard-grid { gap: 11px; margin-bottom: 11px; }
  .output-panel, .progress-panel { min-height: 300px; }
  .chart { height: 222px; padding-top: 4px; }
  .progress-list { gap: 14px; padding-bottom: 14px; }
  .table-toolbar { padding: 10px 12px; }
  th, td { padding: 9px 11px; }
  .settings-list > div { padding: 15px 18px; }
  .learning-grid { gap: 11px; }
  .learning-grid article { padding: 15px; }
  .payment-hero { margin-bottom: 12px; padding: 28px; }
  .entry-form { padding: 16px; }
  .form-intro { margin-bottom: 15px; padding-bottom: 13px; }
  .form-grid { gap: 12px; }
  .field input, .field select, .field textarea, .modal-fields input, .modal-fields select { min-height: 36px; padding: 7px 9px; }
  .style-form { gap: 10px; padding-bottom: 0; }
  .style-section { padding: 14px; }
  .style-section-head { gap: 9px; margin-bottom: 12px; padding-bottom: 10px; }
  .style-section-head > span { width: 26px; height: 26px; }
  .style-section-head h2 { font-size: 15px; }
  .style-basic-grid { grid-template-columns: 160px minmax(0, 1fr); gap: 14px; }
  .style-fields { gap: 9px 11px; }
  .variant-grid { gap: 14px; }
  .variant-fieldset legend { margin-bottom: 7px; }
  .search-select-control { min-height: 34px; }
  .search-select-control input { height: 32px; }
  .search-select-panel { top: calc(100% - 26px); }
  .search-select-options { max-height: 170px; padding: 9px; }
  .search-select-footer { padding: 8px 9px; }
  .choice-list { gap: 5px; min-height: 31px; }
  .choice-list label > span { min-height: 30px; padding: 0 8px; }
  .size-choices label > span { min-width: 41px; }
  .inline-add { gap: 5px; margin-top: 8px; }
  .inline-add input { min-height: 34px; }
  .operation-config { gap: 9px 18px; margin-bottom: 10px; padding: 10px 12px; }
  .common-operation-picker { padding-bottom: 9px; }
  .common-operation-head { margin-bottom: 7px; }
  .common-operation-list { gap: 5px; }
  .common-operation-button { min-height: 28px; padding: 0 9px; }
  .template-controls select { height: 34px; }
  .price-mode-control span { min-height: 34px; padding: 0 10px; }
  .role-price-selector { padding-top: 8px; }
  .operation-table th, .operation-table td { padding: 6px 7px; }
  .operation-table th { font-size: 10px; }
  .operation-table input, .operation-table select { min-width: 82px; height: 30px; padding: 0 7px; }
  .operation-table .operation-name { min-width: 120px; }
  .operation-table .operation-role { min-width: 78px; }
  .operation-table .operation-price { width: 84px; min-width: 76px; }
  .operation-price-cell { min-width: 96px; }
  .operation-size-heading { min-width: 84px; }
  .operation-size-heading.empty { min-width: 120px; }
  .operation-size-price-cell, .operation-role-price-cell { min-width: 84px; }
  .operation-table .operation-size-price, .operation-table .operation-role-price { min-width: 70px; }
  .operation-index { width: 34px; }
  .operation-sort-cell { width: 62px; }
  .operation-action-cell { width: 34px; }
  .sort-buttons button, .delete-operation { width: 27px; height: 27px; }
  .operation-footer { padding: 9px 12px; }
  .style-submit-bar { display: flex; padding: 7px 11px; }
  #templateLibraryForm .style-submit-bar { display: none; }
  .template-library-stats { gap: 9px; margin-bottom: 11px; }
  .template-library-stats > div { padding: 12px 14px; }
  .modal-header { padding: 13px 16px; }
  .modal-fields { gap: 11px; padding: 15px 16px; }
  .modal-actions { padding: 11px 16px; }
}

@media (min-width: 1200px) {
  .style-form { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .style-page-actions, .operation-editor, .style-submit-bar { grid-column: 1 / -1; }
  .style-basic-grid { grid-template-columns: 150px minmax(0, 1fr); }
}

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: repeat(2, 1fr); }
  .operation-config { grid-template-columns: 1fr; align-items: stretch; }
  .template-controls { flex-wrap: wrap; }
  .template-controls label { flex: 1 1 100%; min-width: 0; }
  .template-controls .btn, .template-controls .text-button { flex: 1 1 130px; white-space: nowrap; }
  .price-mode-control { justify-content: flex-start; }
  .template-editor-fields { grid-template-columns: 1fr; }
  .template-size-field { grid-column: auto; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: space-between; }
  .search-box { flex: 1; }
  .payroll-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payroll-date-field { grid-column: span 2; }
  .payroll-filter-actions { justify-content: flex-end; }
  .workers-management-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .workers-filter-bar { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
  .workers-filter-bar > div { grid-column: 1 / -1; justify-content: flex-end; }
  .workers-table-wrap { margin: 0 14px; }
  .workers-table-heading, .workers-pagination { padding-right: 14px; padding-left: 14px; }
}

@media (max-width: 760px) {
  .composer-order-options button { grid-template-columns: 34px minmax(80px, .6fr) 1fr; }
  .composer-order-options button small { display: none; }
  .auth-screen { display: block; min-height: 100vh; padding-bottom: 80px; }
  .auth-story { min-height: auto; padding: 25px 20px 10px; }
  .auth-brand { font-size: 15px; }
  .auth-logo { width: 48px; height: 48px; border-radius: 11px; font-size: 16px; }
  .auth-copy { margin-top: 30px; }
  .auth-copy h1 { font-size: 28px; }
  .auth-copy ul, .auth-flow { display: none; }
  .auth-photo { min-height: 570px; background-position: 58% center; }
  .login-card { width: calc(100% - 30px); padding: 28px 22px 23px; }
  .auth-footer { min-height: 80px; padding: 16px 10px; font-size: 11px; }
  .register-grid { grid-template-columns: 1fr; }
  .register-grid label.wide { grid-column: auto; }
  .employee-scan-card { grid-template-columns: 38px 1fr; }
  .employee-scan-card .btn { grid-column: 1 / -1; width: 100%; }
  body { padding-bottom: 68px; }
  .sidebar { display: none; }
  .main-content { width: 100%; min-width: 0; margin-left: 0; padding: 0 14px 24px; }
  .topbar { display: none; }
  .cutting-preview-grid { grid-template-columns: 1fr; gap: 12px; }
  .cutting-preview-body { padding: 12px; }
  .cutting-preview-style-b { max-width: none; }
  .view > .section-actions:first-child, #templateListPanel > .section-actions:first-child { min-height: 0; margin-top: 0; padding-right: 0; }
  .topbar h1 { font-size: 19px; }
  .date-chip { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric-card { min-height: 104px; padding: 14px; }
  .metric-value { font-size: 22px; }
  .dashboard-grid { display: block; }
  .dashboard-grid .panel { margin-bottom: 12px; }
  .progress-panel { min-height: auto; }
  .output-panel { min-height: 320px; }
  .chart { padding-left: 11px; padding-right: 11px; }
  .chart-bars { gap: 5px; margin-left: 7px; }
  .legend { display: none; }
  .chart-axis { width: 28px; }
  .entry-layout { grid-template-columns: 1fr; }
  .designer-layout { grid-template-columns: 1fr; }
  .designer-tools, .designer-properties { width: 100%; }
  .ticket-designer-shell { min-height: 0; padding: 0 10px 16px; }
  .ticket-template-toolbar { grid-template-columns: 1fr; }
  .ticket-template-toolbar > div { width: 100%; }
  .ticket-template-toolbar .btn { flex: 1; }
  .ticket-template-grid { grid-template-columns: 1fr; }
  #ticketFieldButtons { grid-template-columns: repeat(3, 1fr); }
  .ticket-canvas { min-width: 0; width: min(100%, 260px); padding: 15px; }
  .fake-qr { right: 15px; bottom: 15px; width: 64px; height: 64px; }
  .learning-grid { grid-template-columns: 1fr; }
  .learning-grid p { min-height: 0; }
  .entry-summary { grid-row: 1; grid-template-columns: 1fr 1fr; }
  .today-personal { display: none; }
  .entry-form { padding: 18px 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .form-actions { position: sticky; bottom: 70px; margin: 20px -15px -18px; padding: 12px 15px; background: #fff; }
  .form-actions .btn-primary { flex: 1; }
  .segmented { width: 100%; overflow-x: auto; }
  .segmented button { flex: 1 0 auto; }
  .toolbar-actions { flex-wrap: wrap; }
  .search-box { flex-basis: 100%; width: 100%; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar label { flex: 1; }
  .filter-bar select { width: 100%; min-width: 0; }
  .template-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .template-filter label:first-child { grid-column: 1 / -1; min-width: 0; }
  .template-filter label { min-width: 0; }
  .template-filter input { min-width: 0; }
  .template-filter .btn { align-self: end; }
  .template-library-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .variant-library-manager { grid-template-columns: 1fr; }
  .variant-library-column + .variant-library-column { border-top: 1px solid var(--line); border-left: 0; }
  .ticket-print-backdrop { padding: 0; }
  .ticket-print-dialog { width: 100%; height: 100dvh; max-height: none; border-radius: 0; }
  .ticket-print-header { min-height: 52px; padding: 0 14px; }
  .ticket-print-layout { display: block; overflow-y: auto; }
  .ticket-print-settings { overflow: visible; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ticket-print-template-preview { min-height: 220px; }
  .ticket-dialog-preview-paper { width: 120px; height: 205px; padding: 8px; font-size: 8px; }
  .ticket-dialog-preview-paper footer { right: 8px; bottom: 6px; left: 8px; }
  .ticket-print-content { overflow: visible; padding: 14px; }
  .ticket-part-options { gap: 9px 12px; }
  .ticket-part-options label { min-width: 66px; }
  .ticket-print-order { align-items: flex-start; flex-direction: column; gap: 9px; }
  .ticket-print-order legend { margin-bottom: 2px; }
  .ticket-print-table-wrap { max-height: 330px; }
  .ticket-print-actions { min-height: 58px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .cutting-list-shell { padding: 10px; overflow: hidden; }
  .cutting-filter-grid { grid-template-columns: 1fr 1fr; min-width: 0; }
  .cutting-filter-grid > label, .cutting-date-filter { grid-column: span 1; }
  .cutting-date-filter { grid-column: 1 / -1; }
  .cutting-filter-actions { grid-column: 1 / -1; }
  .cutting-list-toolbar { min-width: 0; }
  .cutting-list-head, .cutting-record-list, .cutting-list-empty { min-width: 1160px; }
  .cutting-list-head, .cutting-record-row { grid-template-columns: 300px 76px 68px 84px 84px minmax(380px, 1fr) 158px; }
  .cutting-pagination { min-width: 980px; }
  .cutting-detail-grid { grid-template-columns: 1fr 1fr; }
  .cutting-detail-page-head { align-items: center; flex-wrap: wrap; padding: 6px 8px; }
  .cutting-detail-page-head > div:nth-child(2) { flex: 1; min-width: 220px; }
  .cutting-detail-page-head p { display: none; }
  .cutting-detail-percent { order: 3; }
  .cutting-detail-head-actions { order: 4; width: 100%; gap: 5px; }
  .cutting-detail-head-actions .btn { min-height: 31px; }
  .cutting-detail-head-actions .btn { flex: 1; }
  .cutting-detail-overview { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 6px 8px; }
  .cutting-detail-style-thumb, .cutting-detail-overview > div:nth-child(3), .cutting-detail-overview > div:nth-child(5), .cutting-detail-overview > div:nth-child(7) { display: none; }
  .cutting-detail-overall { grid-column: 1 / -1; padding: 5px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .cutting-detail-overall footer span { padding: 2px; }
  .cutting-detail-panel-head { align-items: center; flex-direction: row; padding: 5px 8px; }
  .cutting-detail-legend { gap: 7px; }
  .cutting-ticket-progress-list { grid-template-columns: 1fr; padding: 8px; }
  .cutting-ticket-progress-list { gap: 5px; padding: 5px; }
  .cutting-ticket-card > header { min-height: 28px; padding: 3px 6px; }
  .cutting-ticket-card > header button { padding: 2px 4px; }
  .cutting-ticket-meta { grid-template-columns: repeat(3, auto) 1fr 54px 26px; gap: 5px; padding: 4px 6px; }
  .cutting-ticket-meta > span:nth-child(4) { grid-column: auto; }
  .cutting-ticket-meta > div { grid-column: auto; }
  .cutting-ticket-tabs { padding: 0 8px; overflow-x: auto; }
  .cutting-ticket-tabs > button { white-space: nowrap; }
  .cutting-operation-progress-layout { grid-template-columns: 1fr; }
  .cutting-operation-list { display: flex; overflow-x: auto; padding: 5px; }
  .cutting-operation-list > header { display: none; }
  .cutting-operation-list > button { min-width: 150px; margin: 0 5px 0 0; }
  .cutting-operation-summary { grid-template-columns: 1fr 1fr; }
  .cutting-operation-summary > div { border-bottom: 1px solid var(--line); }
  .cutting-operation-summary > div:first-child { grid-column: 1 / -1; }
  .cutting-production-summary { grid-template-columns: 1fr 1fr; }
  .cutting-production-summary > div:first-child { grid-column: 1 / -1; }
  .cutting-production-operation-row-cards { grid-template-columns: 1fr; }
  .cutting-production-inline-detail::before { display: none; }
  .cutting-sheet-format-options { grid-template-columns: 1fr; padding: 20px 18px; }
  .template-library-stats > div { padding: 13px; }
  .template-library-stats > div:last-child { grid-column: 1 / -1; }
  .template-library-stats strong { font-size: 19px; }
  .export-button { width: 100%; margin-left: 0; }
  .payroll-filter-panel { padding: 10px; }
  .payroll-filter-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .payroll-date-field { grid-column: 1 / -1; }
  .payroll-filter-actions { grid-column: 1 / -1; }
  .payroll-filter-actions .btn { flex: 1; }
  .payroll-summary-toolbar { padding: 9px; }
  .payroll-summary { grid-template-columns: 1fr 1fr; gap: 7px; }
  .payroll-stat { min-height: 62px; padding: 10px; }
  .payroll-stat strong { margin-top: 5px; font-size: 17px; }
  .payroll-action-bar { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .payroll-action-bar .btn { flex: 0 0 auto; }
  .payroll-table-wrap { overflow-x: auto; }
  .payroll-detail-list > div { grid-template-columns: 1fr; gap: 4px; }
  .workers-management-layout { grid-template-columns: 1fr; }
  .worker-role-panel, .workers-main-panel { min-height: 0; }
  .worker-role-table-wrap { max-height: 330px; overflow: auto; }
  .workers-filter-bar { grid-template-columns: 1fr; }
  .workers-filter-bar > div { grid-column: auto; flex-wrap: wrap; }
  .workers-filter-bar > div .btn { flex: 1; }
  .workers-tabs { overflow-x: auto; }
  .order-grid { grid-template-columns: 1fr; }
  .orders-toolbar { align-items: stretch; flex-wrap: wrap; }
  .orders-search { width: 100%; }
  .orders-toolbar-actions { width: 100%; justify-content: space-between; }
  .style-form { padding-bottom: 0; }
  .template-library-form { padding-bottom: 0; }
  .template-editor-fields { grid-template-columns: 1fr; }
  .template-mode-control { width: 100%; }
  .style-page-actions .back-button { max-width: 150px; text-align: left; }
  .style-page-actions > .button-group { display: none; }
  .style-section { padding: 17px 14px; }
  .style-basic-grid { grid-template-columns: 1fr; }
  .image-upload-field { width: min(220px, 100%); }
  .style-fields, .variant-grid { grid-template-columns: 1fr; }
  .search-select-panel, .variant-fieldset:last-child .search-select-panel { right: auto; left: 0; width: 100%; }
  .search-select-footer { grid-template-columns: minmax(0, 1fr) auto; }
  .search-select-footer .search-select-done { grid-column: 1 / -1; width: 100%; }
  .operation-title { grid-template-columns: 29px 1fr; }
  .operation-title .btn { grid-column: 1 / -1; width: 100%; margin-top: 12px; }
  .operation-config { grid-template-columns: 1fr; padding: 12px; }
  .common-operation-head > div { display: grid; gap: 3px; }
  .template-controls { align-items: stretch; flex-wrap: wrap; }
  .template-controls label { flex-basis: 100%; min-width: 0; }
  .template-controls .btn { flex: 1; padding: 0 9px; }
  .price-mode-control { overflow-x: auto; }
  .price-mode-control label { flex: 1 0 auto; }
  .price-mode-control span { padding: 0 10px; }
  .operation-footer { align-items: flex-start; flex-direction: column; }
  .operation-footer > div { width: 100%; justify-content: space-between; gap: 8px; }
  .style-submit-bar { bottom: 64px; margin: 0 -14px; border-radius: 0; }
  .style-submit-bar > span { display: none; }
  .style-submit-bar .button-group { width: 100%; }
  #cancelStyleButton, #resetStyleButton { display: none; }
  .cutting-stats { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .cutting-composer-band { padding: 10px; }
  .cutting-style-summary { grid-template-columns: 1fr 1fr; }
  .cutting-form-grid, .cutting-variant-pickers, .ticket-setup-band { grid-template-columns: 1fr; }
  .cutting-form-grid .field.wide { grid-column: auto; }
  .ticket-settings { grid-template-columns: 1fr; }
  .ticket-settings h2 { grid-column: auto; }
  .mini-ticket-wrap { justify-content: center; }
  .cutting-matrix-layout { grid-template-columns: minmax(0, 1fr); }
  .cutting-options { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 0; }
  .cutting-options .field, .cutting-options .clear-matrix { grid-column: 1 / -1; }
  .matrix-heading { align-items: flex-start; flex-direction: column; }
  .production-overview { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cutting-stats > div, .production-overview > div { padding: 12px; }
  .cutting-stats strong, .production-overview strong { font-size: 18px; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .table-toolbar .search-box { width: 100%; }
  .scan-input { grid-template-columns: 1fr; }
  .ticket-context { grid-template-columns: repeat(2, 1fr); }
  .button-group { width: 100%; }
  .button-group .btn { flex: 1; }
  .section-actions { align-items: flex-start; flex-wrap: wrap; }
  .section-actions .btn { padding: 0 10px; white-space: nowrap; }
  #templatesView .section-actions .btn { margin-left: auto; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(6, 1fr); height: 64px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); z-index: 40; }
  .mobile-nav button { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
  .mobile-nav button > span { font-size: 19px; line-height: 1; }
  .mobile-nav button.active { color: var(--primary); font-weight: 700; }
  .mobile-nav i { position: absolute; top: 5px; left: calc(50% + 8px); min-width: 16px; padding: 1px 4px; border-radius: 9px; background: var(--red); color: white; font-size: 9px; font-style: normal; }
  .mobile-more-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 42px 0 0; background: rgba(15, 23, 42, .46); }
  .mobile-more-backdrop[hidden] { display: none; }
  .mobile-more-sheet { display: flex; width: 100%; max-height: calc(100dvh - 42px); overflow: hidden; flex-direction: column; border-radius: 18px 18px 0 0; background: #f6f8fb; box-shadow: 0 -12px 40px rgba(15, 23, 42, .2); }
  .mobile-more-sheet > header { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #e5eaf1; background: #fff; }
  .mobile-more-sheet > header h2 { margin: 0; color: #1f2d40; font-size: 18px; }
  .mobile-more-sheet > header p { margin: 3px 0 0; color: #8a97a8; font-size: 10px; }
  .mobile-more-sheet > header > button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f4f8; color: #64748b; font-size: 22px; }
  .mobile-company-summary { display: flex; align-items: center; gap: 10px; margin: 12px 12px 0; padding: 11px 13px; border: 1px solid #dce7f5; border-radius: 10px; background: #fff; }
  .mobile-company-summary img { width: 38px; height: 38px; object-fit: contain; }
  .mobile-company-summary div { display: grid; gap: 2px; min-width: 0; }
  .mobile-company-summary strong { color: #24354d; font-size: 14px; }
  .mobile-company-summary span { overflow: hidden; color: #7b899c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-company-summary b { color: #3479e6; font-weight: 650; }
  .mobile-module-grid { display: grid; overflow-y: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); }
  .mobile-module-grid button { display: grid; min-width: 0; min-height: 76px; place-items: center; align-content: center; gap: 7px; padding: 8px 4px; border: 1px solid #e3e9f1; border-radius: 9px; background: #fff; color: #53637a; }
  .mobile-module-grid button span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: #edf4ff; color: #3479e6; font-size: 18px; }
  .mobile-module-grid button b { overflow: hidden; max-width: 100%; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-module-grid button:active { border-color: #91caff; background: #f6faff; }
}

@media (max-width: 390px) {
  .metric-title { font-size: 11px; }
  .metric-foot { font-size: 10px; }
  .panel-heading { padding: 16px 14px; }
}

/* 全站浅蓝简约视觉规范 */
body { background: var(--bg); color: var(--text); }
.sidebar { background: rgba(255,255,255,.98); border-right-color: #e7ecf3; box-shadow: 1px 0 0 rgba(68, 91, 124, .02); }
.brand-mark { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.brand strong { color: #26364f; }
.nav-section { color: #a3aec0; }
.nav-item { color: #607089; }
.nav-item:hover { background: #f5f8fc; color: #2f6fd4; }
.nav-item.active { background: #edf4ff; color: #2773ea; }
.nav-badge { background: #edf4ff; color: #3479e6; }
.factory-avatar { background: #edf4ff; color: #3479e6; }
.main-content { background: var(--bg); }
.topbar { color: #7a889e; }
.date-chip { border-right-color: #e3e9f1; }
.panel, .metric-card, .template-library-stats > div, .cutting-stats > div, .production-overview > div { border-color: #e2e9f2; border-radius: 8px; box-shadow: var(--shadow); }
.btn { border-radius: 5px; }
.btn-primary { border-color: #3b82f6; background: #3b82f6; box-shadow: 0 2px 5px rgba(59,130,246,.12); }
.btn-primary:hover { border-color: #2563eb; background: #2563eb; }
.btn-secondary { border-color: #dbe3ed; color: #53627a; }
.btn-secondary:hover { border-color: #bcd1f1; background: #f5f9ff; color: #2f75df; }
.btn:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: rgba(59,130,246,.20); }
input, select, textarea { accent-color: #3b82f6; }

/* 手机端首页 */
@media (max-width: 760px) {
  body.dashboard-screen-mode .topbar { display: none !important; }
  body.dashboard-screen-mode .main-content { padding: 12px 12px 82px; background: #f3f6fa; }
  body.dashboard-screen-mode .factory-dashboard { display: none; }
  .mobile-home-dashboard { display: grid; gap: 13px; width: 100%; max-width: 520px; margin: 0 auto; color: #243247; }
  .mobile-user-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) 38px; align-items: center; gap: 12px; min-height: 118px; padding: 15px 14px; border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(47, 68, 98, .07); }
  .mobile-user-avatar { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 13px; background: #eef5ff; color: #347ff0; font-size: 34px; }
  .mobile-user-info { min-width: 0; }
  .mobile-user-info > div { display: flex; align-items: center; gap: 8px; }
  .mobile-user-info strong { overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-user-info > div span { padding: 3px 7px; border-radius: 5px; background: #e9faef; color: #13a45a; font-size: 10px; font-weight: 700; }
  .mobile-user-info p { margin: 7px 0 0; color: #7b8798; font-size: 12px; }
  .mobile-user-info p + p { margin-top: 4px; }
  .mobile-user-info p b { color: #68778b; font-weight: 500; }
  #mobileHomeMore { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 20px; background: #f6f8fb; color: #39475a; font-size: 18px; letter-spacing: 1px; }
  .mobile-home-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .mobile-home-shortcuts button { display: grid; min-height: 106px; place-items: center; align-content: center; gap: 10px; padding: 10px 4px; border: 0; border-radius: 14px; background: #fff; color: #303b4b; box-shadow: 0 7px 20px rgba(47, 68, 98, .06); }
  .mobile-home-shortcuts i, .mobile-tools-grid i { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 13px; font-size: 25px; font-style: normal; }
  .mobile-home-shortcuts i.scan { background: #eaf3ff; color: #3180ed; }
  .mobile-home-shortcuts i.wage { background: #fff0f2; color: #f04455; }
  .mobile-home-shortcuts i.record { background: #fff3df; color: #ed8216; }
  .mobile-home-shortcuts i.assist { background: #eefaf5; color: #12a86d; }
  .mobile-home-shortcuts i.code { background: #f3edff; color: #7b4cdb; }
  .mobile-home-shortcuts strong { font-size: 13px; }
  .mobile-ticket-entry { display: grid; min-height: 70px; grid-template-columns: 48px minmax(0, 1fr) 22px; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid #a9ead5; border-radius: 14px; background: #fff; color: #253247; text-align: left; box-shadow: 0 6px 18px rgba(27, 177, 126, .05); }
  .mobile-ticket-entry > i { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 11px; background: #e9fff6; color: #0baa75; font-size: 22px; font-style: normal; }
  .mobile-ticket-entry span { display: grid; gap: 4px; }
  .mobile-ticket-entry strong { font-size: 15px; }
  .mobile-ticket-entry small { color: #8a95a5; font-size: 11px; }
  .mobile-ticket-entry > b { color: #0eaa78; font-size: 28px; font-weight: 400; }
  .mobile-today-card { padding: 14px; border-radius: 15px; background: #fff; box-shadow: 0 7px 22px rgba(47, 68, 98, .06); }
  .mobile-today-card > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
  .mobile-today-card > header > div { display: flex; align-items: center; gap: 7px; }
  .mobile-today-card > header i { color: #347ff0; font-size: 19px; font-style: normal; }
  .mobile-today-card > header strong { font-size: 16px; }
  .mobile-today-card > header > span { display: flex; padding: 3px; border-radius: 18px; background: #f1f4f8; }
  .mobile-today-card > header b, .mobile-today-card > header em { padding: 5px 13px; border-radius: 14px; font-size: 10px; font-style: normal; font-weight: 500; }
  .mobile-today-card > header b { background: #fff; color: #347ff0; box-shadow: 0 2px 7px rgba(45, 87, 145, .1); }
  .mobile-today-card > header em { color: #7b8798; }
  .mobile-today-card > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .mobile-today-card article { display: grid; min-height: 76px; place-items: center; align-content: center; gap: 5px; border-radius: 9px; }
  .mobile-today-card article.orders { background: #eef4ff; color: #3477e6; }
  .mobile-today-card article.cutting { background: #ecfbf2; color: #0aa35c; }
  .mobile-today-card article.completed { background: #f6efff; color: #8b3bd1; }
  .mobile-today-card article.operations { background: #fff4e6; color: #e87918; }
  .mobile-today-card article span { font-size: 11px; }
  .mobile-today-card article strong { font-size: 22px; }
  .mobile-tools-section h2 { display: flex; align-items: center; gap: 7px; margin: 2px 0 10px 3px; font-size: 17px; }
  .mobile-tools-section h2 i { color: #5146dc; font-size: 20px; font-style: normal; }
  .mobile-tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
  .mobile-tools-grid button { display: grid; min-height: 102px; place-items: center; align-content: center; gap: 9px; padding: 9px 4px; border: 0; border-radius: 13px; background: #fff; color: #303b4b; box-shadow: 0 7px 20px rgba(47, 68, 98, .06); }
  .mobile-tools-grid i { width: 44px; height: 44px; font-size: 21px; }
  .mobile-tools-grid i.amber { background: #fff7da; color: #ecac00; }
  .mobile-tools-grid i.blue { background: #e9f3ff; color: #347ff0; }
  .mobile-tools-grid i.green { background: #e8fff3; color: #0ab475; }
  .mobile-tools-grid i.purple { background: #f4eaff; color: #8a4be2; }
  .mobile-tools-grid i.orange { background: #fff0df; color: #f27a16; }
  .mobile-tools-grid i.pink { background: #fff0f3; color: #ef4c64; }
  .mobile-tools-grid i.red { background: #ffe9ec; color: #e93e55; }
  .mobile-tools-grid i.cyan { background: #e4fbff; color: #00a7bd; }
  .mobile-tools-grid i.sky { background: #e9f4ff; color: #277fea; }
  .mobile-tools-grid i.mint { background: #e5fff3; color: #0aaf72; }
  .mobile-tools-grid b { font-size: 12px; }
  .mobile-nav { grid-template-columns: repeat(3, 1fr); height: 68px; }
  .mobile-nav button { font-size: 11px; }
  .mobile-nav button > span { font-size: 23px; }
  body.mobile-menu-open { overflow: hidden; }
  .mobile-more-backdrop { right: 0; bottom: 68px; left: 0; z-index: 35; display: block; padding: 0; background: #f2f5f9; }
  .mobile-more-backdrop[hidden] { display: none; }
  .mobile-more-sheet { width: 100%; height: 100%; max-height: none; overflow-y: auto; border-radius: 0; background: #f2f5f9; box-shadow: none; }
  .mobile-profile-page { width: 100%; max-width: 520px; min-height: 100%; margin: 0 auto; padding: 14px 13px 34px; color: #26354a; }
  .mobile-profile-hero { position: relative; display: grid; min-height: 154px; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 14px; padding: 22px 18px; overflow: hidden; border: 1px solid #e2eaf4; border-radius: 18px; background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 55%, #eef9f7 100%); box-shadow: 0 8px 25px rgba(47, 68, 98, .07); }
  .mobile-profile-hero::after { position: absolute; right: -38px; bottom: -52px; width: 150px; height: 150px; border-radius: 50%; background: rgba(139, 196, 255, .11); content: ""; }
  .mobile-profile-hero > button { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .72); color: #718096; font-size: 21px; }
  .mobile-profile-avatar { position: relative; z-index: 1; display: grid; width: 66px; height: 66px; place-items: center; border: 4px solid rgba(255,255,255,.86); border-radius: 50%; background: #fff; color: #6095dc; box-shadow: 0 5px 16px rgba(55, 104, 166, .1); font-size: 17px; font-weight: 700; }
  .mobile-profile-identity { position: relative; z-index: 1; min-width: 0; }
  .mobile-profile-identity h2 { display: flex; align-items: center; gap: 7px; margin: 0; color: #1e2c3f; font-size: 22px; }
  .mobile-profile-identity h2 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-profile-identity h2 em { flex: 0 0 auto; padding: 3px 7px; border-radius: 9px; background: #e6f8ee; color: #14a35b; font-size: 9px; font-style: normal; }
  .mobile-profile-identity p { overflow: hidden; margin: 7px 0 6px; color: #64748b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-profile-identity small { display: block; margin-top: 3px; color: #8895a8; font-size: 10px; }
  .mobile-profile-identity small b { color: #627086; font-weight: 600; }
  .mobile-profile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 11px; padding: 8px 0; border: 1px solid #e3eaf3; border-radius: 14px; background: #fff; box-shadow: 0 6px 19px rgba(47, 68, 98, .05); }
  .mobile-profile-facts > div { display: grid; min-width: 0; min-height: 56px; grid-template-columns: 32px auto; grid-template-rows: auto auto; align-content: center; column-gap: 8px; padding: 5px 14px; }
  .mobile-profile-facts > div + div { border-left: 1px solid #edf1f6; }
  .mobile-profile-facts i { display: grid; width: 30px; height: 30px; grid-row: 1 / 3; place-items: center; align-self: center; border-radius: 9px; background: #edf5ff; color: #4f8ee9; font-size: 16px; font-style: normal; }
  .mobile-profile-facts > div:last-child i { background: #fff2ee; color: #ef836d; }
  .mobile-profile-facts span { color: #96a1b1; font-size: 9px; }
  .mobile-profile-facts strong { overflow: hidden; margin-top: 2px; color: #2d3a4c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-profile-list { margin-top: 12px; overflow: hidden; border: 1px solid #e3eaf3; border-radius: 14px; background: #fff; box-shadow: 0 6px 19px rgba(47, 68, 98, .05); }
  .mobile-profile-list button { display: grid; width: 100%; min-height: 57px; grid-template-columns: 32px minmax(0, 1fr) auto 12px; align-items: center; gap: 9px; padding: 8px 15px; border: 0; background: #fff; color: #26354a; text-align: left; }
  .mobile-profile-list button + button { border-top: 1px solid #edf1f5; }
  .mobile-profile-list button:active { background: #f7faff; }
  .mobile-profile-list button i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: #f0f5fb; color: #55728f; font-size: 16px; font-style: normal; }
  .mobile-profile-list button span { font-size: 14px; font-weight: 600; }
  .mobile-profile-list button em { color: #97a2b2; font-size: 11px; font-style: normal; }
  .mobile-profile-list button b { color: #9ba6b5; font-size: 21px; font-weight: 400; }
  .mobile-profile-service-list { margin-top: 12px; }
  .mobile-all-modules { margin-top: 12px; overflow: hidden; border: 1px solid #e3eaf3; border-radius: 14px; background: #fff; box-shadow: 0 6px 19px rgba(47, 68, 98, .05); }
  .mobile-all-modules summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; padding: 10px 15px; cursor: pointer; list-style: none; color: #26354a; }
  .mobile-all-modules summary::-webkit-details-marker { display: none; }
  .mobile-all-modules summary span { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; }
  .mobile-all-modules summary i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: #edf4ff; color: #3479e6; font-style: normal; }
  .mobile-all-modules summary b { color: #98a3b2; font-size: 11px; font-weight: 500; }
  .mobile-all-modules[open] summary { border-bottom: 1px solid #edf1f5; }
  .mobile-all-modules[open] summary b { font-size: 0; }
  .mobile-all-modules[open] summary b::after { font-size: 11px; content: "收起⌄"; }
  .mobile-all-modules .mobile-module-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 10px; background: #f8fafc; }
  .mobile-all-modules .mobile-module-grid button { min-height: 72px; box-shadow: none; }
  .mobile-profile-logout { width: 100%; min-height: 52px; margin-top: 17px; border: 1px solid #e3eaf3; border-radius: 14px; background: #fff; color: #657389; font-size: 14px; box-shadow: 0 6px 19px rgba(47, 68, 98, .04); }
  .mobile-profile-logout:active { background: #fff4f4; color: #e14c53; }
  .mobile-profile-footer { display: grid; justify-items: center; gap: 5px; padding: 24px 10px 4px; color: #a1aab7; }
  .mobile-profile-footer span { font-size: 10px; }
  .mobile-profile-footer small { font-size: 9px; }
  body.mobile-font-small .mobile-profile-page { font-size: 12px; }
  body.mobile-font-large .mobile-profile-page { font-size: 17px; }
  body.mobile-font-large .mobile-profile-list button span, body.mobile-font-large .mobile-all-modules summary span { font-size: 16px; }
  body.mobile-font-large .mobile-profile-facts strong { font-size: 14px; }
}
.field input, .field select, .field textarea, .modal-fields input, .modal-fields select, .filter-bar select, .search-box, .payroll-filter-grid input, .payroll-filter-grid select, .cutting-filter-grid input, .cutting-filter-grid select { border-color: #dce4ee; }
.field input:focus, .field select:focus, .field textarea:focus, .modal-fields input:focus, .modal-fields select:focus { border-color: #7babf5; box-shadow: 0 0 0 2px rgba(59,130,246,.08); }
.search-select-control:focus-within, .search-multiselect.open .search-select-control { border-color: #76a8f5; box-shadow: 0 0 0 2px rgba(59,130,246,.09); }
th, .cutting-list-head, .worker-role-table th, .workers-table th, .payroll-main-table th, .variant-library-table th, .ticket-print-table th { background: #f7f9fc; color: #596981; }
td { border-color: #edf0f5; }
tbody tr:hover, .orders-table tbody tr:hover { background: #f8fbff; }
.segmented button.active { background: #edf4ff; color: #2f76e5; }
.ticket-designer-tabs button.active, .template-category-tabs button.active, .workers-tabs button.active { color: #347ff0; }
.ticket-designer-tabs button.active::after, .template-category-tabs button.active::after, .workers-tabs button.active::after { background: #3b82f6; }
.text-button, .worker-text-actions button, .worker-row-actions button, .cutting-record-actions button { color: #347ff0; }
.status.approved, .status.active { background: #edf4ff; color: #2d72d8; }
.person-avatar.green { background: #edf4ff; color: #347ff0; }
.person-avatar.amber { background: #f1f6ff; color: #5a8fe5; }
.cutting-matrix-table .cutting-bundle-input { border-color: #bfd4f3 !important; background: #eef5ff; color: #2f73d8; }
.metric-symbol, .price-detail-button { background: #eef5ff; color: #347ff0; }
.bar, .progress-fill.complete, .sync-status i { background: #4a8df5; }
.bar:hover { background: #2d73dd; }
.progress-fill { background: #78a9f5; }
.switch input:checked + span { background: #4a8df5; }
.modal-backdrop { background: rgba(42, 58, 82, .36); backdrop-filter: blur(2px); }
.modal, .register-dialog, .cutting-preview-modal, .ticket-print-dialog { border: 1px solid #e2e8f0; border-radius: 9px; box-shadow: 0 18px 54px rgba(49,72,105,.16); }
.payment-hero { background: linear-gradient(135deg, #2f65ad, #4c8ded); }
.payment-hero > strong { color: #dcecff; }
.mobile-nav { border-top-color: #e2e8f1; box-shadow: 0 -3px 14px rgba(48,72,106,.06); }
.mobile-nav button.active { color: #347ff0; }

/* 工资页：参考浅蓝工资汇总界面 */
#payrollView .payroll-page-title { margin-bottom: 9px; }
.payroll-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 10px; }
.payroll-overview .payroll-stat, .payroll-scale-stat { min-height: 83px; padding: 12px 14px; border: 1px solid #dfe7f1; border-left: 1px solid #dfe7f1; border-radius: 8px; background: #fff; box-shadow: none; }
.payroll-overview .payroll-stat span, .payroll-scale-stat > span { display: block; color: #75849a; font-size: 10px; }
.payroll-overview .payroll-stat strong { display: block; margin-top: 5px; color: #213653; font-size: 20px; line-height: 1; }
.payroll-overview .payroll-stat small { display: block; margin-top: 6px; color: #91a0b5; font-size: 10px; }
.payroll-scale-stat > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 8px; }
.payroll-scale-stat b { display: grid; gap: 2px; padding: 6px 8px; border: 1px solid #e7edf5; border-radius: 5px; background: #f7f9fc; color: #8897aa; font-size: 9px; font-weight: 500; }
.payroll-scale-stat b strong { color: #263b5a; font-size: 14px; }
.payroll-filter-panel { padding: 0; }
.payroll-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px 7px; }
.payroll-filter-head h3, .payroll-table-toolbar h3 { margin: 0; color: #30435f; font-size: 13px; }
.payroll-filter-head p { margin: 3px 0 0; color: #91a0b3; font-size: 9px; }
.payroll-filter-head .payroll-filter-actions { margin-left: auto; }
.payroll-filter-grid { grid-template-columns: minmax(280px, 1.45fr) repeat(5, minmax(105px, .72fr)); padding: 6px 14px 14px; }
.payroll-filter-grid input, .payroll-filter-grid select { border-color: #dce4ee; color: #53627a; }
.payroll-filter-actions .btn { min-width: 82px; }
.payroll-status-tabs { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 50px; padding: 6px 14px; overflow-x: auto; border-bottom: 1px solid #e9eef5; scrollbar-width: none; }
.payroll-status-tabs::-webkit-scrollbar { display: none; }
.payroll-status-tab-buttons { display: flex; align-self: stretch; flex: 0 0 auto; align-items: center; gap: 27px; }
.payroll-status-tab-buttons > button { position: relative; align-self: stretch; padding: 0 1px; border: 0; background: transparent; color: #53627a; font-size: 11px; white-space: nowrap; }
.payroll-status-tab-buttons > button.active { color: #347ff0; font-weight: 700; }
.payroll-status-tab-buttons > button.active::after { position: absolute; right: 0; bottom: -7px; left: 0; height: 2px; background: #3b82f6; content: ''; }
.payroll-status-tabs .payroll-action-bar { flex: 0 0 auto; flex-wrap: nowrap; margin-left: auto; }
.payroll-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 8px 14px; border-bottom: 1px solid #e9eef5; }
.payroll-action-bar .btn { border-color: #dce4ee; background: #fff; color: #53627a; box-shadow: none; }
.payroll-action-bar .btn:hover { border-color: #a9c7f4; background: #f6f9ff; color: #347ff0; }
.payroll-action-bar .btn-primary { border-color: #3b82f6; background: #3b82f6; color: #fff; }
.payroll-main-table { min-width: 1160px; }
.payroll-main-table th, .payroll-main-table td { height: 49px; text-align: center; }
.payroll-main-table th:first-child, .payroll-main-table td:first-child { width: auto; padding-left: 14px; text-align: center; }
.payroll-main-table th:nth-child(4) { min-width: 122px; }
.payroll-main-table th:nth-child(5), .payroll-main-table th:nth-child(6), .payroll-main-table th:nth-child(7), .payroll-main-table th:nth-child(8), .payroll-main-table th:nth-child(9) { min-width: 105px; }
.payroll-main-table th:last-child { min-width: 185px; }
.payroll-person { display: flex; align-items: center; gap: 9px; }
.payroll-person > i { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 50%; background: #edf4ff; color: #347ff0; font-size: 11px; font-style: normal; font-weight: 700; }
.payroll-person strong, .payroll-person span { display: block; }
.payroll-person span { margin-top: 2px; color: #98a5b7; font-size: 9px; }
.payroll-main-table td > b, .payroll-main-table td > span { display: block; }
.payroll-main-table td > b { color: #26364e; }
.payroll-blue-amount { margin-top: 3px; color: #3b82f6; font-size: 10px; }
.payroll-red-amount { margin-top: 3px; color: #ef5b5b; font-size: 9px; }
.payroll-muted-amount { margin-top: 3px; color: #a0acbb; font-size: 9px; }
.payroll-main-table .worker-row-actions button { color: #347ff0; }
.payroll-pagination { border-top: 1px solid #edf1f6; }
.payroll-worker-status { display: inline-flex; padding: 2px 8px; border-radius: 10px; font-size: 10px; }
.payroll-worker-status.active { background: #f0fbf2; color: #3f9f51; }
.payroll-worker-status.inactive { background: #f5f5f5; color: #8c8c8c; }
.payroll-money-cell { color: #26364e; font-weight: 650; }
.payroll-money-cell.settled { color: #52a65f; }
.payroll-money-cell.waiting { color: #f04444; }
.payroll-zero-price { color: #8c98a8; }
.payroll-zero-price.warning { color: #f04444; font-weight: 700; }
.payroll-number-detail { padding: 2px 4px; border: 0; border-radius: 4px; background: transparent; color: #26364e; font: inherit; font-weight: 700; cursor: pointer; }
.payroll-number-detail:hover { background: #eaf4ff; color: #1677ff; text-decoration: underline; }
.payroll-number-detail.settled { color: #52a95a; }
.payroll-number-detail.unsettled, .payroll-money-cell.unsettled { color: #f04444; }
.payroll-main-table .worker-row-actions button.payroll-settle-blocked { color: #ff4d4f; }
.payroll-main-table .worker-row-actions button.payroll-settle-blocked::after { margin-left: 2px; content: '⚠'; font-size: 8px; }
.payroll-main-table th:first-child,
.payroll-main-table td:first-child {
  width: 42px;
  min-width: 42px;
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
}
.payroll-worker-check,
#payrollSelectAll {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1677ff;
  cursor: pointer;
}
.payroll-main-table tr.payroll-row-selected td { background: #edf6ff; }
.payroll-main-table tr.payroll-row-selected:hover td { background: #e3f1ff; }
.monthly-payroll-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(200px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 8px;
  padding: 10px 14px;
}
.monthly-payroll-filter label { display: grid; gap: 5px; color: #526177; font-size: 10px; }
.monthly-payroll-filter input,
.monthly-payroll-filter select { width: 100%; height: 32px; border: 1px solid #d9e1eb; border-radius: 5px; background: #fff; color: #33445c; }
.monthly-payroll-filter > div { display: flex; gap: 8px; justify-content: flex-end; }
.monthly-payroll-panel { overflow: hidden; }
.monthly-payroll-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 7px; }
.monthly-payroll-head h3 { margin: 0 0 6px; color: #27364b; font-size: 14px; }
.monthly-payroll-summary { display: flex; flex-wrap: wrap; gap: 0; }
.monthly-payroll-summary span,
.monthly-payroll-adjustment-summary span { padding: 5px 9px; border: 1px solid #e6ebf1; background: #f8fafc; color: #536176; font-size: 10px; }
.monthly-payroll-summary b { color: #2e8db6; }
.monthly-payroll-summary b.green { color: #52a95a; }
.monthly-payroll-summary b.red { color: #f04444; }
.monthly-payroll-actions { display: flex; align-items: center; gap: 6px; padding-top: 0; }
.monthly-payroll-actions .btn { min-height: 32px; padding: 0 13px; }
.monthly-payroll-actions .icon-tool { width: 32px; height: 32px; border: 1px solid #dce4ee; border-radius: 4px; background: #fff; color: #53627a; }
.monthly-payroll-adjustment-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 0 14px 8px; }
.monthly-payroll-adjustment-summary > strong { margin-right: 12px; color: #34445a; font-size: 12px; }
.monthly-payroll-adjustment-summary span.deduction,
.monthly-payroll-adjustment-summary span.deduction b { color: #f04444; }
.monthly-payroll-table-wrap { position: relative; border-top: 1px solid #e8edf3; scrollbar-gutter: stable; }
.monthly-payroll-table { min-width: 1780px; table-layout: fixed; }
.monthly-payroll-table th,
.monthly-payroll-table td { height: 42px; padding: 5px 7px; text-align: center; white-space: nowrap; }
.monthly-payroll-table th { background: #f5f7fa; color: #536176; font-size: 10px; }
.monthly-payroll-table td { color: #35445a; font-size: 11px; }
.monthly-payroll-table .monthly-total { color: #26364e; font-weight: 750; }
.monthly-payroll-table .monthly-settled,
.monthly-payroll-table .monthly-available { color: #52a95a; font-weight: 700; }
.monthly-payroll-table .monthly-waiting { color: #f04444; font-weight: 700; }
.monthly-adjustment-input { width: 82px; height: 30px; padding: 4px 7px; border: 1px solid #dce3eb; border-radius: 3px; text-align: right; font-size: 10px; }
.monthly-adjustment-input:focus { border-color: #69a7ff; box-shadow: 0 0 0 2px rgba(59,130,246,.12); outline: 0; }
.monthly-adjustment-input.deduction { color: #f04444; }
#monthlyPayrollView .payroll-page-title { margin-bottom: 7px; }
.monthly-payroll-worker-check,
#monthlyPayrollSelectAll {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1677ff;
  cursor: pointer;
}
.monthly-payroll-table tr.monthly-payroll-row-selected td { background: #edf6ff; }
.monthly-payroll-table th:nth-child(-n+6),
.monthly-payroll-table td:nth-child(-n+6) {
  position: sticky;
  z-index: 3;
  background: #fff;
}
.monthly-payroll-table thead th:nth-child(-n+6) {
  z-index: 5;
  background: #f5f7fa;
}
.monthly-payroll-table th:nth-child(1), .monthly-payroll-table td:nth-child(1) { left: 0; width: 34px; min-width: 34px; max-width: 34px; padding-right: 3px; padding-left: 3px; }
.monthly-payroll-table th:nth-child(2), .monthly-payroll-table td:nth-child(2) { left: 34px; width: 88px; min-width: 88px; max-width: 88px; }
.monthly-payroll-table th:nth-child(3), .monthly-payroll-table td:nth-child(3) { left: 122px; width: 72px; min-width: 72px; max-width: 72px; }
.monthly-payroll-table th:nth-child(4), .monthly-payroll-table td:nth-child(4) { left: 194px; width: 78px; min-width: 78px; max-width: 78px; }
.monthly-payroll-table th:nth-child(5), .monthly-payroll-table td:nth-child(5) { left: 272px; width: 118px; min-width: 118px; max-width: 118px; }
.monthly-payroll-table th:nth-child(6), .monthly-payroll-table td:nth-child(6) { left: 390px; width: 88px; min-width: 88px; max-width: 88px; box-shadow: 7px 0 10px -10px rgba(33, 51, 78, .8); }
.monthly-payroll-table tbody tr.monthly-payroll-row-selected td:nth-child(-n+6) { background: #edf6ff; }
.monthly-payroll-table tbody tr:hover td:nth-child(-n+6) { background: #f7fbff; }
.monthly-payroll-table tbody tr.monthly-payroll-row-selected:hover td:nth-child(-n+6) { background: #e3f1ff; }
@media (max-width: 980px) {
  .monthly-payroll-filter { grid-template-columns: 1fr 1fr; gap: 12px; }
  .monthly-payroll-head { display: block; }
  .monthly-payroll-actions { padding-top: 12px; }
}
.payroll-overview .payroll-stat { min-height: 70px; }
.payroll-overview .payroll-total-stat strong { color: #2d8db9; }
.payroll-overview .payroll-settled-stat strong, .payroll-overview .payroll-available-stat strong { color: #52b65b; }
.payroll-overview .payroll-waiting-stat strong { color: #f04444; }
.payroll-overview .payroll-unsettled-stat strong { color: #f04444; }
.payroll-history-panel { margin-top: 10px; overflow: hidden; }
.payroll-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 9px 14px; border-bottom: 1px solid #e9eef5; }
.payroll-history-head h3 { margin: 0; color: #30435f; font-size: 13px; }
.payroll-history-head p { margin: 3px 0 0; color: #91a0b3; font-size: 9px; }
.payroll-history-head > span { color: #8795a8; font-size: 10px; white-space: nowrap; }
.payroll-history-table-wrap { overflow-x: auto; }
.payroll-history-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.payroll-history-table th, .payroll-history-table td { height: 46px; padding: 7px 10px; border-bottom: 1px solid #edf1f6; text-align: center; font-size: 10px; }
.payroll-history-table th { background: #f7f9fc; color: #596981; font-weight: 650; }
.payroll-history-table td { color: #53627a; }
.payroll-history-table td strong, .payroll-history-table td small { display: block; }
.payroll-history-table td small { margin-top: 2px; color: #9aa7b8; font-size: 8px; }
.payroll-history-table th:first-child { min-width: 145px; }
.payroll-history-table th:nth-child(2) { min-width: 125px; }
.payroll-history-table th:last-child { min-width: 95px; }
.payroll-history-amount { color: #52a65f !important; font-weight: 750; }
.payroll-history-detail { padding: 0; border: 0; background: transparent; color: #1677ff; font-size: 10px; cursor: pointer; }
.payroll-history-detail:hover { color: #4096ff; }

@media (max-width: 1120px) {
  .payroll-overview { grid-template-columns: 1fr 1fr; }
  .payroll-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payroll-date-field { grid-column: span 2; }
}

@media (max-width: 760px) {
  .payroll-overview { grid-template-columns: 1fr 1fr; gap: 7px; }
  .payroll-overview .payroll-stat, .payroll-scale-stat { min-height: 72px; padding: 10px; }
  .payroll-scale-stat { grid-column: 1 / -1; }
  .payroll-filter-head { align-items: flex-start; flex-direction: column; }
  .payroll-filter-head .payroll-filter-actions { width: 100%; margin-left: 0; }
  .payroll-filter-grid { grid-template-columns: 1fr 1fr; }
  .payroll-date-field { grid-column: 1 / -1; }
  .payroll-table-toolbar { align-items: flex-start; flex-direction: column; }
  .payroll-action-bar { width: 100%; }
  .payroll-status-tabs .payroll-action-bar { width: auto; }
}

/* 工资上数工序明细 */
body.payroll-detail-open { overflow: hidden; }
.payroll-detail-backdrop { place-items: stretch end; padding: 0; background: rgba(34,49,72,.40); backdrop-filter: none; z-index: 90; }
.payroll-detail-dialog { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(1500px, calc(100% - 150px)); height: 100vh; overflow: hidden; border-left: 1px solid #dfe7f1; background: #f5f8fc; box-shadow: -12px 0 38px rgba(36,54,80,.14); }
.payroll-detail-header { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 20px; border-bottom: 1px solid #e5ebf3; background: #fff; }
.payroll-detail-header .icon-button { flex: 0 0 auto; color: #718096; font-size: 25px; }
.payroll-detail-header h2 { margin: 0; color: #26364e; font-size: 16px; }
.payroll-detail-header p { margin: 2px 0 0; color: #93a0b2; font-size: 9px; }
.payroll-detail-body { min-height: 0; overflow: auto; padding: 14px 18px 22px; }
.payroll-detail-filter, .payroll-detail-table-panel { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 8px; background: #fff; }
.payroll-detail-filter-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px 7px; }
.payroll-detail-filter-title h3, .payroll-detail-table-head h3 { margin: 0; color: #30435f; font-size: 13px; }
.payroll-detail-filter-title p, .payroll-detail-table-head p { margin: 3px 0 0; color: #93a0b2; font-size: 9px; }
.payroll-detail-filter-title > div:last-child, .payroll-detail-table-head > div:last-child { display: flex; gap: 6px; }
.payroll-detail-filter-grid { display: grid; grid-template-columns: 1.35fr .75fr .75fr 1fr; gap: 10px; padding: 7px 13px 13px; }
.payroll-detail-filter-grid > label { display: grid; gap: 5px; min-width: 0; color: #526179; font-size: 10px; font-weight: 650; }
.payroll-detail-filter-grid input, .payroll-detail-filter-grid select { width: 100%; min-width: 0; height: 33px; padding: 0 9px; border: 1px solid #dce4ee; border-radius: 4px; background: #fff; }
.payroll-detail-date > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.payroll-detail-date b { color: #9aa7b8; font-weight: 500; }

/* 统一日期区间与快捷选择 */
.date-range-field { min-width: 0; }
.date-range-native-inputs { display: none !important; }
.date-range-trigger { display: flex; align-items: center; width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid #d9d9d9; border-radius: 5px; background: #fff; color: #b7bec8; font: inherit; text-align: left; cursor: pointer; outline: none; transition: border-color .18s, box-shadow .18s; }
.date-range-trigger:hover { border-color: #69b1ff; }
.date-range-field.date-range-open .date-range-trigger { border-color: #4096ff; box-shadow: 0 0 0 2px rgba(5, 145, 255, .08); }
.date-range-trigger.has-value { color: #4b5563; }
.date-range-trigger-icon { position: relative; flex: 0 0 15px; box-sizing: border-box; width: 15px; height: 14px; margin-right: 7px; border: 1.5px solid #aab4c2; border-radius: 2px; }
.date-range-trigger-icon::before { content: ''; position: absolute; top: 3px; right: 0; left: 0; border-top: 1.5px solid #aab4c2; }
.date-range-trigger-icon::after { content: ''; position: absolute; top: -3px; left: 3px; width: 1.5px; height: 4px; border-radius: 1px; background: #aab4c2; box-shadow: 6px 0 #aab4c2; }
.date-range-trigger-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-range-clear { display: grid; flex: 0 0 17px; width: 17px; height: 17px; margin-left: auto; place-items: center; border-radius: 50%; background: #c6ccd5; color: #fff; font-size: 13px; font-weight: 400; line-height: 1; }
.date-range-clear[hidden] { display: none; }
.date-range-picker-popover { position: fixed; z-index: 1200; display: grid; grid-template-columns: 132px minmax(0, 1fr); box-sizing: border-box; overflow: hidden; border: 1px solid #d9e2ef; border-radius: 7px; background: #fff; box-shadow: 0 10px 30px rgba(31, 56, 88, .20); }
.date-range-picker-popover[hidden] { display: none; }
.date-range-picker-shortcuts { max-height: 392px; overflow-y: auto; padding: 9px 8px; border-right: 1px solid #edf0f5; background: #fff; }
.date-range-picker-shortcuts button { display: block; width: 100%; height: 32px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: #5d6570; font-size: 12px; text-align: left; cursor: pointer; }
.date-range-picker-shortcuts button:hover { background: #f2f7ff; color: #1677ff; }
.date-range-picker-shortcuts button.active { background: #e6f4ff; color: #1677ff; font-weight: 650; }
.date-range-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
.date-range-calendar { min-width: 0; padding: 11px 14px 14px; }
.date-range-calendar + .date-range-calendar { border-left: 1px solid #edf0f5; }
.date-range-calendar header { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; min-height: 35px; }
.date-range-calendar header strong { color: #4b4f56; font-size: 16px; font-weight: 650; text-align: center; }
.date-range-calendar-nav { display: flex; align-items: center; }
.date-range-calendar header > .date-range-calendar-nav:last-child { justify-content: flex-end; }
.date-range-calendar-nav button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 0; border-radius: 4px; background: transparent; color: #5d6570; font-size: 21px; line-height: 1; cursor: pointer; }
.date-range-calendar-nav button:hover { background: #f2f7ff; color: #1677ff; }
.date-range-weekdays, .date-range-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.date-range-weekdays { margin-top: 4px; border-bottom: 1px solid #edf0f5; }
.date-range-weekdays span { display: grid; height: 31px; place-items: center; color: #6b7280; font-size: 11px; }
.date-range-days { row-gap: 3px; padding-top: 5px; }
.date-range-day { position: relative; display: grid; min-width: 0; height: 33px; padding: 0; place-items: center; border: 0; border-radius: 0; background: transparent; color: #606873; font-size: 12px; cursor: pointer; }
.date-range-day:hover { background: #e6f4ff; color: #1677ff; }
.date-range-day.outside { color: #c2c8d1; }
.date-range-day.today { color: #1677ff; font-weight: 700; }
.date-range-day.in-range { background: #eaf3ff; color: #1677ff; }
.date-range-day.range-start, .date-range-day.range-end { border-radius: 50%; background: #4096ff; color: #fff; font-weight: 700; }
@media (max-width: 720px) {
  .date-range-picker-popover { grid-template-columns: 1fr; max-height: calc(100vh - 24px); overflow-y: auto; }
  .date-range-picker-shortcuts { display: flex; max-height: none; overflow-x: auto; padding: 7px; border-right: 0; border-bottom: 1px solid #edf0f5; scrollbar-width: none; }
  .date-range-picker-shortcuts::-webkit-scrollbar { display: none; }
  .date-range-picker-shortcuts button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .date-range-calendars { grid-template-columns: repeat(2, 285px); overflow-x: auto; }
}
.review-toolbar { align-items: flex-end; padding: 10px 12px; border: 1px solid #f0f0f0; border-radius: 8px; background: #fff; }
.review-toolbar .toolbar-actions { align-items: flex-end; }
.review-date-filter { display: grid; width: 330px; gap: 4px; color: rgba(0, 0, 0, .65); font-size: 9px; }
.review-date-filter > div { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 5px; }
.review-date-filter input { width: 100%; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; }
.review-date-filter b { color: #93a0b1; font-weight: 500; }
.review-toolbar .search-box { width: 300px; min-height: 32px; }

@media (max-width: 900px) {
  .review-toolbar { align-items: stretch; flex-direction: column; }
  .review-toolbar .toolbar-actions { align-items: stretch; flex-direction: column; }
  .review-date-filter, .review-toolbar .search-box { width: 100%; }
}
.payroll-detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin: 10px 0; overflow: hidden; border: 1px solid #dfe7f1; border-radius: 8px; background: #fff; }
.payroll-detail-summary article { min-height: 74px; padding: 12px 15px; border-right: 1px solid #e7edf5; }
.payroll-detail-summary article:last-child { border-right: 0; }
.payroll-detail-summary span, .payroll-detail-summary small { display: block; color: #8290a5; font-size: 9px; }
.payroll-detail-summary strong { display: block; margin: 5px 0 4px; color: #263b59; font-size: 18px; }
.payroll-detail-summary article:nth-child(3) strong { color: #3b82f6; }
.payroll-detail-view-switch { display: flex; align-items: center; min-height: 42px; margin: 10px 0; padding: 6px 10px; border: 1px solid #dfe7f1; border-radius: 8px; background: #fff; }
.payroll-detail-view-switch > span { margin: 0 10px 0 2px; color: #8a98aa; font-size: 10px; }
.payroll-detail-view-switch button { min-width: 52px; height: 28px; margin-left: -1px; padding: 0 10px; border: 1px solid #d9e2ef; background: #fff; color: #53627a; font-size: 10px; cursor: pointer; }
.payroll-detail-view-switch button:first-of-type { border-radius: 5px 0 0 5px; }
.payroll-detail-view-switch button:last-child { border-radius: 0 5px 5px 0; }
.payroll-detail-view-switch button:hover { position: relative; border-color: #69b1ff; color: #1677ff; }
.payroll-detail-view-switch button.active { position: relative; z-index: 1; border-color: #1677ff; background: #1677ff; color: #fff; }
.payroll-detail-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 12px; border-bottom: 1px solid #e8edf4; }
.payroll-detail-table-wrap { max-height: calc(100vh - 330px); overflow: auto; }
.payroll-detail-table { min-width: 1260px; }
.payroll-detail-table th, .payroll-detail-table td { height: 42px; padding: 6px 9px; text-align: center; font-size: 10px; }
.payroll-detail-table th { position: sticky; top: 0; z-index: 2; background: #f7f9fc; color: #596981; }
.payroll-detail-table th:first-child, .payroll-detail-table td:first-child { padding-left: 12px; text-align: left; }
.payroll-detail-table td strong, .payroll-detail-table td small { display: block; }
.payroll-detail-table td small { margin-top: 2px; max-width: 150px; overflow: hidden; color: #9aa7b8; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.payroll-detail-amount { color: #347ff0; font-weight: 750; }
.payroll-detail-status { display: inline-flex; padding: 3px 7px; border-radius: 3px; font-size: 9px; }
.payroll-detail-status.settled { border: 1px solid #bde3c6; background: #f0fbf2; color: #479956; }
.payroll-detail-status.pending { border: 1px solid #f0d5a9; background: #fff8eb; color: #bd7b19; }
.payroll-detail-group-text { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payroll-detail-group-list { display: block; min-width: 115px; max-width: 260px; color: #53627a; line-height: 1.55; overflow-wrap: anywhere; white-space: normal; }
.payroll-detail-group-list.beds { min-width: 90px; max-width: 180px; }
.payroll-detail-group-list.cutting-numbers { min-width: 170px; max-width: 310px; }
.payroll-detail-group-list.operations { min-width: 150px; max-width: 280px; }
.payroll-detail-ticket-code, .payroll-detail-code-with-badge { display: flex; align-items: center; justify-content: center; gap: 5px; }
.payroll-detail-ticket-code strong, .payroll-detail-code-with-badge strong { display: inline; }
.payroll-rework-badge { display: inline-flex; align-items: center; flex: 0 0 auto; height: 18px; padding: 0 6px; border: 1px solid #ffe58f; border-radius: 9px; background: #fffbe6; color: #d48806; font-size: 8px; font-weight: 700; white-space: nowrap; }
.payroll-ticket-type { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 20px; padding: 0 7px; border: 1px solid; border-radius: 10px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.payroll-ticket-type.source { border-color: #b7d7ff; background: #eef6ff; color: #1677ff; }
.payroll-ticket-type.rework { border-color: #ffe58f; background: #fffbe6; color: #d48806; }
.payroll-rework-row td { background: #fffdf2; }
.payroll-detail-group-link { padding: 0; border: 0; background: transparent; color: #1677ff; font-size: 10px; cursor: pointer; }
.payroll-detail-group-link:hover { color: #4096ff; }

@media (max-width: 900px) {
  .payroll-detail-dialog { width: 100%; }
  .payroll-detail-body { padding: 10px; }
  .payroll-detail-filter-grid { grid-template-columns: 1fr 1fr; }
  .payroll-detail-date { grid-column: 1 / -1; }
  .payroll-detail-summary { grid-template-columns: 1fr 1fr; }
  .payroll-detail-summary article:nth-child(2) { border-right: 0; }
  .payroll-detail-summary article:nth-child(-n+2) { border-bottom: 1px solid #e7edf5; }
  .payroll-detail-table-wrap { max-height: calc(100vh - 440px); }
}

@media (max-width: 520px) {
  .payroll-detail-header { padding: 0 11px; }
  .payroll-detail-filter-title { align-items: flex-start; flex-direction: column; }
  .payroll-detail-filter-title > div:last-child { width: 100%; }
  .payroll-detail-filter-title .btn { flex: 1; }
  .payroll-detail-filter-grid { grid-template-columns: 1fr; }
  .payroll-detail-date { grid-column: auto; }
  .payroll-detail-summary article { padding: 9px 10px; }
  .payroll-detail-summary strong { font-size: 15px; }
  .payroll-detail-table-head { align-items: flex-start; }
  .payroll-detail-table-wrap { max-height: calc(100vh - 530px); }
}

/* 星工菲生产数据大屏 */
body.dashboard-screen-mode .topbar { display: none; }
body.dashboard-screen-mode .main-content { padding-top: 14px; background: #f6f8fb; }
.factory-dashboard { display: grid; gap: 16px; color: #26354b; }
.dashboard-screen-head { display: flex; align-items: center; justify-content: space-between; min-height: 116px; padding: 23px 27px; border: 1px solid #e6ebf2; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(33, 51, 76, .08); }
.dashboard-screen-head h2 { margin: 0; background: linear-gradient(90deg, #2468ee, #6548f4); background-clip: text; -webkit-background-clip: text; color: transparent; font-size: 25px; letter-spacing: .4px; }
.dashboard-screen-head p { margin: 19px 0 0; color: #8b96a8; font-size: 12px; }
.dashboard-live-clock { display: grid; justify-items: end; }
.dashboard-live-clock strong { color: #223047; font-size: 20px; }
.dashboard-live-clock span { margin-top: 3px; color: #8a95a7; font-size: 11px; }
.dashboard-live-clock b { font-weight: 500; }
.dashboard-live-clock i { margin-left: 5px; font-style: normal; font-variant-numeric: tabular-nums; }
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dashboard-kpi-card { display: flex; align-items: center; gap: 16px; min-height: 102px; padding: 18px 20px; border: 1px solid #e7ecf3; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(33, 51, 76, .08); }
.dashboard-kpi-card > i { display: grid; place-items: center; width: 62px; height: 62px; flex: 0 0 auto; border-radius: 17px; }
.dashboard-kpi-card svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-kpi-card.blue > i { background: #e8f2ff; color: #2f7af6; }
.dashboard-kpi-card.green > i { background: #e7fbef; color: #00b94f; }
.dashboard-kpi-card.orange > i { background: #fff2df; color: #f36a08; }
.dashboard-kpi-card.purple > i { background: #f4eaff; color: #8b24f5; }
.dashboard-kpi-card > div { min-width: 0; }
.dashboard-kpi-card span { display: block; color: #7e899a; font-size: 12px; font-weight: 650; }
.dashboard-kpi-card strong { display: inline-block; margin-top: 6px; color: #1f2c40; font-size: 24px; line-height: 1; }
.dashboard-kpi-card small { display: inline-flex; margin-left: 8px; padding: 4px 8px; border-radius: 12px; background: #f6f7fa; color: #7d8899; font-size: 10px; font-weight: 650; }
.dashboard-main-grid { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(0, 2fr); gap: 16px; }
.dashboard-today-panel, .dashboard-trend-panel { min-height: 438px; border: 1px solid #e6ebf2; border-radius: 13px; background: #fff; box-shadow: 0 5px 16px rgba(33, 51, 76, .08); }
.dashboard-today-panel { padding: 20px; }
.dashboard-today-panel > h3, .dashboard-trend-panel h3 { margin: 0; color: #26354b; font-size: 16px; }
.dashboard-today-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.dashboard-today-stats > div { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 72px; padding: 10px 12px; border-radius: 10px; }
.dashboard-today-stats > div.blue { background: linear-gradient(135deg, #e8f2ff, #dcecff); color: #2774ef; }
.dashboard-today-stats > div.green { background: linear-gradient(135deg, #e9fbef, #d7f8e3); color: #00a94c; }
.dashboard-today-stats > div.purple { background: linear-gradient(135deg, #f7edff, #efe0ff); color: #8b27f0; }
.dashboard-today-stats i { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 7px; color: #fff; font-size: 15px; font-style: normal; box-shadow: 0 4px 10px rgba(40, 83, 147, .13); }
.dashboard-today-stats .blue i { background: #347ff0; }
.dashboard-today-stats .green i { background: #00b957; }
.dashboard-today-stats .purple i { background: #942df2; }
.dashboard-today-stats span { min-width: 0; color: currentColor; font-size: 10px; }
.dashboard-today-stats strong { display: block; margin-top: 5px; color: #26354b; font-size: 18px; }
.dashboard-ring-card { margin-top: 12px; padding: 13px 15px; border: 1px solid #e5eaf1; border-radius: 10px; background: #fbfcfe; box-shadow: 0 2px 7px rgba(33, 51, 76, .06); }
.dashboard-ring-card.return { border-color: #ffd4d8; background: linear-gradient(135deg, #fff4f5, #ffe9eb); }
.dashboard-ring-card.defect { border-color: #ffe0b6; background: linear-gradient(135deg, #fff8ee, #fff0d9); }
.dashboard-ring-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dashboard-ring-card > header strong { color: #3e4c62; font-size: 11px; }
.dashboard-ring-card > header b { padding: 3px 7px; border-radius: 10px; background: #edf4ff; color: #2572ef; font-size: 11px; }
.dashboard-ring-card.return > header b { background: #fff; color: #f13242; }
.dashboard-ring-card.defect > header b { background: #fff; color: #f26700; }
.dashboard-ring-row { display: flex; align-items: center; gap: 18px; margin-top: 11px; }
.dashboard-ring { --ring-value: 0; --ring-color: #3b82f6; position: relative; display: grid; place-items: center; width: 72px; height: 72px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--ring-value) * 1%), #e8ebf0 0); }
.dashboard-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: inherit; background-color: #fff; background-image: none; }
.dashboard-ring strong { position: relative; z-index: 1; color: var(--ring-color); font-size: 11px; }
.dashboard-ring-row > div:last-child { display: grid; gap: 7px; color: #738095; font-size: 10px; }
.dashboard-ring-row span { display: flex; align-items: center; gap: 6px; }
.dashboard-ring-row span i { width: 8px; height: 8px; border-radius: 50%; background: #dce1e8; }
.dashboard-ring-row span i.blue { background: #3b82f6; }
.dashboard-ring-row span i.red { background: #ff4d5e; }
.dashboard-ring-row span i.orange { background: #ff7a00; }
.dashboard-ring-row b { color: #425168; }
.dashboard-quality-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.dashboard-trend-panel { overflow: hidden; }
.dashboard-trend-panel > header { display: flex; align-items: center; justify-content: space-between; min-height: 61px; padding: 0 20px; }
.dashboard-trend-tabs { display: flex; gap: 5px; padding: 3px; border-radius: 18px; background: #f3f5f8; }
.dashboard-trend-tabs button { min-width: 48px; height: 28px; padding: 0 10px; border: 0; border-radius: 15px; background: transparent; color: #6f7c8f; font-size: 10px; }
.dashboard-trend-tabs button.active { background: linear-gradient(135deg, #347ff0, #634cf4); color: #fff; box-shadow: 0 3px 8px rgba(57, 93, 220, .22); }
.dashboard-line-chart { height: 356px; padding: 6px 17px 16px; }
.dashboard-line-chart svg { width: 100%; height: 100%; overflow: visible; }
.dashboard-chart-grid line { stroke: #e8edf3; stroke-width: 1; }
.dashboard-chart-grid text, .dashboard-chart-label { fill: #8b96a6; font-size: 11px; }
.dashboard-chart-area { fill: url(#dashboardAreaGradient); }
.dashboard-chart-line { fill: none; stroke: #3b82f6; stroke-width: 3; stroke-linecap: round; }
.dashboard-line-chart circle { fill: #fff; stroke: #3b82f6; stroke-width: 2.5; }

@media (max-width: 1180px) {
  .yizhe-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yizhe-filter-actions { justify-content: flex-end; }
  .dashboard-kpi-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-main-grid { grid-template-columns: 1fr; }
  .dashboard-today-panel, .dashboard-trend-panel { min-height: auto; }
  .sync-operations-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .operation-dialog-toolbar { grid-template-columns: 1fr; gap: 9px; }
  .operation-dialog-template { grid-template-columns: 90px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .operation-dialog-backdrop { padding: 7px; }
  .operation-edit-dialog { width: calc(100vw - 14px); height: calc(100vh - 14px); }
  .operation-edit-dialog > .modal-header { min-height: 56px; padding: 9px 11px; }
  .operation-edit-dialog > .modal-header p { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .operation-dialog-toolbar { padding: 9px 11px; }
  .operation-dialog-price-modes { overflow-x: auto; }
  .operation-dialog-price-modes legend { flex: 0 0 auto; }
  .operation-dialog-price-modes span { min-height: 31px; padding: 0 9px; white-space: nowrap; }
  .operation-dialog-template { grid-template-columns: 78px minmax(0, 1fr); }
  .operation-dialog-role-selector { display: block; padding: 8px 11px; }
  .operation-dialog-role-selector[hidden] { display: none; }
  .operation-dialog-role-selector > div:first-child { margin-bottom: 6px; }
  .operation-dialog-role-selector > div:first-child span { display: none; }
  .operation-dialog-common { padding: 8px 11px; }
  .operation-dialog-common > header span { display: none; }
  .operation-dialog-common-actions { gap: 4px; }
  .operation-dialog-common-actions button { padding: 0 5px !important; font-size: 9px !important; }
  #operationDialogCommonList { max-height: 58px; }
  .operation-dialog-table-wrap { padding: 0 11px 9px; }
  .operation-dialog-footer { min-height: 57px; padding: 8px 10px; }
  .operation-dialog-footer > div:first-child { gap: 9px; }
  .operation-dialog-footer > div:first-child span:first-child { display: none; }
  .operation-dialog-footer .btn { min-width: 74px; }
  .sync-operations-backdrop { padding: 7px; }
  .sync-operations-dialog { width: calc(100vw - 14px); max-height: calc(100vh - 14px); }
  .sync-operations-dialog > .modal-header { min-height: 58px; padding: 10px 12px; }
  .sync-operations-dialog > .modal-header p { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sync-operations-layout { display: block; max-height: calc(100vh - 132px); overflow-y: auto; }
  .sync-operations-source, .sync-operations-targets { padding: 11px; }
  .sync-operations-source { border-right: 0; border-bottom: 1px solid #e4edf7; }
  .sync-operations-source-table { flex: none; max-height: 170px; }
  .sync-operations-source-total { padding-top: 9px; }
  .sync-operations-targets { overflow: visible; }
  .sync-operations-table-wrap { min-height: 210px; max-height: 330px; }
  .sync-operations-empty { min-height: 150px; }
  .sync-operations-actions { min-height: 56px; padding: 8px 10px; }
  .sync-operations-actions > span { display: none; }
  .sync-operations-actions .btn { flex: 1; min-width: 0; }
  .yizhe-filter-panel { grid-template-columns: 1fr; padding: 12px; }
  .yizhe-filter-actions .btn { flex: 1; }
  .yizhe-order-detail-body { padding: 12px; }
  .yizhe-detail-summary { grid-template-columns: 52px 1fr; }
  .yizhe-detail-stat { padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .yizhe-detail-note { grid-template-columns: 1fr; }
  body.dashboard-screen-mode .main-content { padding-top: 10px; }
  .factory-dashboard { gap: 10px; }
  .dashboard-screen-head { min-height: 88px; padding: 15px; }
  .dashboard-screen-head h2 { font-size: 18px; }
  .dashboard-screen-head p { margin-top: 8px; font-size: 9px; }
  .dashboard-live-clock strong { font-size: 14px; }
  .dashboard-live-clock span { font-size: 8px; }
  .dashboard-kpi-grid { gap: 8px; }
  .dashboard-kpi-card { min-height: 85px; gap: 9px; padding: 11px; }
  .dashboard-kpi-card > i { width: 42px; height: 42px; border-radius: 11px; }
  .dashboard-kpi-card svg { width: 23px; height: 23px; }
  .dashboard-kpi-card span { font-size: 9px; }
  .dashboard-kpi-card strong { font-size: 18px; }
  .dashboard-kpi-card small { display: block; width: fit-content; margin: 4px 0 0; padding: 2px 5px; font-size: 7px; }
  .dashboard-today-panel { padding: 13px; }
  .dashboard-today-stats > div { gap: 6px; min-height: 62px; padding: 8px; }
  .dashboard-today-stats i { width: 25px; height: 25px; font-size: 11px; }
  .dashboard-today-stats strong { font-size: 14px; }
  .dashboard-quality-grid { grid-template-columns: 1fr; }
  .dashboard-trend-panel > header { min-height: 52px; padding: 0 13px; }
  .dashboard-line-chart { height: 260px; padding: 4px 8px 11px; overflow-x: auto; }
  .dashboard-line-chart svg { min-width: 680px; }
}

/* 工序表：保留独立的分码/分岗位价格列，仅压缩可见岗位区域 */
.operation-pricing-table .operation-visible-roles-heading,
.operation-dialog-table .operation-visible-roles-heading {
  width: 230px;
  min-width: 230px;
}

.operation-pricing-table .operation-visible-role-cell,
.operation-dialog-table .operation-visible-role-cell {
  width: 230px;
  min-width: 230px;
}

.operation-pricing-table .operation-inline-roles,
.operation-dialog-table .operation-inline-roles {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  gap: 1px;
}

.operation-pricing-table .operation-inline-roles label,
.operation-dialog-table .operation-inline-roles label {
  min-height: 21px;
  padding: 0 3px;
  gap: 1px;
  font-size: 9px;
}

.operation-pricing-table .operation-inline-roles input,
.operation-dialog-table .operation-inline-roles input {
  width: 10px !important;
  min-width: 10px !important;
  height: 10px !important;
}

/* 新建款式：说明文字与标题并排，收紧模块上下留白 */
@media (min-width: 761px) {
  #styleForm {
    gap: 8px;
  }

  #styleForm > .style-section {
    padding: 11px 14px;
  }

  #styleForm > .style-section .style-section-head {
    margin-bottom: 8px;
    padding-bottom: 7px;
  }

  #styleForm > .style-section .style-section-head > div {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 16px;
  }

  #styleForm > .style-section .style-section-head p {
    margin: 0;
    white-space: nowrap;
  }

  #styleForm > .operation-editor .operation-config {
    margin-bottom: 8px;
    padding: 8px 10px;
  }

  #styleForm > .operation-editor .common-operation-picker {
    padding-bottom: 7px;
  }

  #styleForm > .operation-editor .common-operation-head {
    margin-bottom: 5px;
  }

  #styleForm > .operation-editor .operation-footer {
    padding-top: 7px;
    padding-bottom: 7px;
  }
}

/* 新建款式生产工序与“修改工序”使用一致的界面结构 */
#styleForm > .operation-editor .operation-config {
  display: block;
  padding: 0;
  overflow: hidden;
  border-color: #e1ebf5;
  background: #fff;
}

.style-operation-toolbar {
  display: grid;
  padding: 10px 12px;
  grid-template-columns: minmax(340px, 1fr) minmax(250px, 390px) auto;
  align-items: end;
  gap: 12px;
  border-bottom: 1px solid #e7eef6;
}

.style-operation-price-modes {
  align-self: center;
}

.style-operation-template {
  grid-template-columns: 92px minmax(0, 1fr);
}

.style-template-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.style-template-actions .btn {
  min-height: 34px;
}

#styleForm > .operation-editor .price-mode-help {
  margin: 0;
  padding: 6px 12px;
  border-bottom: 1px solid #edf2f7;
  background: #fbfdff;
}

#styleForm > .operation-editor .role-price-selector {
  margin: 0;
  padding: 8px 12px;
  border-top: 0;
  border-bottom: 1px solid #e1ebf5;
  background: #f4f9ff;
}

.style-operation-common {
  padding: 8px 12px;
  background: #f8fbff;
}

.style-operation-common > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.style-operation-common > header > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.style-operation-common > header strong {
  color: #334c68;
  font-size: 12px;
}

.style-operation-common > header span {
  color: #8999ac;
  font-size: 9px;
}

.style-operation-common .common-operation-list {
  max-height: 67px;
  margin-top: 7px;
  overflow: auto;
  gap: 5px;
}

.style-operation-common .common-operation-button {
  display: inline-flex;
  min-height: 27px;
  padding: 0 8px;
  align-items: center;
  gap: 6px;
  border-color: #cddff1;
  color: #48627d;
  font-size: 10px;
}

.style-operation-common .common-operation-button small {
  color: #7f95ab;
  font-size: 8px;
}

#commonOperationList.edit-mode .common-operation-button {
  border-color: #88b8e8;
  background: #f2f8ff;
}

#commonOperationList.edit-mode .common-operation-button:hover {
  border-color: #2475c8;
  background: #dfefff;
  box-shadow: 0 0 0 2px rgba(74,145,220,.12);
}

.operation-pricing-table {
  font-size: 11px;
}

.operation-pricing-table th {
  height: 38px;
  border-bottom-color: #dce6f1;
  background: #eef4fa;
  color: #5a6f87;
}

.operation-pricing-table td {
  border-bottom-color: #edf2f7;
  color: #496078;
}

@media (max-width: 1120px) {
  .style-operation-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .style-template-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 760px) {
  .style-operation-toolbar { padding: 8px 10px; gap: 8px; }
  .style-operation-price-modes { overflow-x: auto; }
  .style-operation-template { grid-template-columns: 78px minmax(0, 1fr); }
  .style-template-actions > * { flex: 1; }
  .style-operation-common { padding: 8px 10px; }
  .style-operation-common > header { align-items: flex-start; }
  .style-operation-common > header > div:first-child span { display: none; }
  .style-operation-common .operation-dialog-common-actions { gap: 4px; }
  .style-operation-common .operation-dialog-common-actions button { padding: 0 5px !important; font-size: 9px !important; }
}

/* 工序明细表自适应列宽，并压缩单行高度 */
.operation-pricing-table,
.operation-dialog-table {
  width: 100%;
  table-layout: fixed;
}

.operation-editor > .table-wrap,
.operation-dialog-table-wrap {
  overflow-x: auto;
  scrollbar-gutter: stable;
  scrollbar-color: #a9bfd8 #edf3f9;
  scrollbar-width: thin;
}

.operation-editor > .table-wrap::-webkit-scrollbar,
.operation-dialog-table-wrap::-webkit-scrollbar {
  height: 9px;
}

.operation-editor > .table-wrap::-webkit-scrollbar-track,
.operation-dialog-table-wrap::-webkit-scrollbar-track {
  border-radius: 6px;
  background: #edf3f9;
}

.operation-editor > .table-wrap::-webkit-scrollbar-thumb,
.operation-dialog-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #edf3f9;
  border-radius: 6px;
  background: #a9bfd8;
}

.operation-pricing-table th,
.operation-pricing-table td,
.operation-dialog-table th,
.operation-dialog-table td {
  height: auto;
  padding: 4px 6px;
  vertical-align: middle;
}

.operation-pricing-table .operation-index-heading,
.operation-dialog-table .operation-index-heading { width: 42px; }
.operation-pricing-table .operation-name-heading,
.operation-dialog-table .operation-name-heading { width: auto; }
.operation-pricing-table.has-price-details .operation-name-heading,
.operation-dialog-table.has-price-details .operation-name-heading { width: 180px; }
.operation-pricing-table .operation-base-price-heading,
.operation-dialog-table .operation-base-price-heading { width: 112px; }
.operation-pricing-table .operation-price-toggle-heading,
.operation-dialog-table .operation-price-toggle-heading { width: 104px; }
.operation-pricing-table .operation-visible-roles-heading,
.operation-dialog-table .operation-visible-roles-heading { width: 285px; min-width: 0; }
.operation-pricing-table .operation-sort-heading,
.operation-dialog-table .operation-sort-heading { width: 68px; }
.operation-pricing-table .operation-action-heading,
.operation-dialog-table .operation-action-heading { width: 45px; }

.operation-pricing-table .operation-name,
.operation-dialog-table .operation-dialog-name {
  width: 100%;
  min-width: 0;
}

.operation-pricing-table.has-price-details .operation-size-heading,
.operation-dialog-table.has-price-details .operation-size-heading,
.operation-pricing-table.has-price-details .operation-size-price-cell,
.operation-pricing-table.has-price-details .operation-role-price-cell,
.operation-dialog-table.has-price-details .operation-dialog-size-price-cell,
.operation-dialog-table.has-price-details .operation-dialog-role-price-cell {
  width: 84px;
  min-width: 84px;
}

.operation-pricing-table.has-price-details .operation-size-price,
.operation-pricing-table.has-price-details .operation-role-price,
.operation-dialog-table.has-price-details .operation-dialog-size-price,
.operation-dialog-table.has-price-details .operation-dialog-role-price {
  width: 100%;
  min-width: 0;
  padding-right: 5px;
  padding-left: 5px;
}

.operation-pricing-table input,
.operation-pricing-table select,
.operation-dialog-table input,
.operation-dialog-table select {
  height: 30px;
}

.operation-pricing-table .operation-price,
.operation-dialog-table .operation-dialog-price {
  width: 100%;
  min-width: 0;
}

.operation-pricing-table .operation-price-cell,
.operation-dialog-table .operation-price-cell {
  min-width: 0;
}

.operation-pricing-table .operation-visible-role-cell,
.operation-dialog-table .operation-visible-role-cell {
  width: 285px;
  min-width: 0;
}

.operation-pricing-table .operation-inline-roles,
.operation-dialog-table .operation-inline-roles {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 0;
  grid-template-columns: repeat(6, max-content);
  align-items: center;
  justify-content: start;
  gap: 2px;
}

.operation-pricing-table .operation-inline-roles label,
.operation-dialog-table .operation-inline-roles label {
  min-height: 20px;
}

.operation-pricing-table .operation-sort-cell,
.operation-dialog-table .operation-dialog-sort-cell {
  width: 68px;
}

.operation-pricing-table .operation-action-cell,
.operation-dialog-table .operation-dialog-action-cell {
  width: 45px;
}

.operation-pricing-table .sort-buttons,
.operation-dialog-table .operation-dialog-sort {
  gap: 2px;
}

.operation-pricing-table .sort-buttons button,
.operation-pricing-table .delete-operation,
.operation-dialog-table .operation-dialog-sort button {
  width: 25px;
  height: 25px;
}

@media (max-width: 1360px) {
  .operation-pricing-table .operation-visible-roles-heading,
  .operation-dialog-table .operation-visible-roles-heading,
  .operation-pricing-table .operation-visible-role-cell,
  .operation-dialog-table .operation-visible-role-cell {
    width: 270px;
  }

  .operation-pricing-table .operation-inline-roles,
  .operation-dialog-table .operation-inline-roles {
    grid-template-columns: repeat(6, max-content);
  }
}

/* Ant Design Vue 风格组件规范（仅改变视觉，不改变业务结构） */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --text: rgba(0, 0, 0, .88);
  --muted: rgba(0, 0, 0, .45);
  --line: #f0f0f0;
  --line-strong: #d9d9d9;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-soft: #e6f4ff;
  --blue: #1677ff;
  --blue-soft: #e6f4ff;
  --amber: #d48806;
  --amber-soft: #fffbe6;
  --red: #ff4d4f;
  --red-soft: #fff2f0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5715;
}

button,
input,
select,
textarea {
  transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s, opacity .2s;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
select,
textarea {
  border-color: #d9d9d9;
  border-radius: 6px;
  background-color: #fff;
  color: rgba(0, 0, 0, .88);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover,
select:hover,
textarea:hover {
  border-color: #4096ff;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
select:focus,
textarea:focus,
.search-select-control:focus-within,
.search-multiselect.open .search-select-control {
  border-color: #1677ff;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, .10);
}

input::placeholder,
textarea::placeholder {
  color: rgba(0, 0, 0, .25);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #1677ff;
}

.sidebar {
  padding: 16px 12px;
  border-right: 1px solid #f0f0f0;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, .025);
}

.brand {
  min-height: 48px;
  padding: 0 12px 18px;
}

.brand strong {
  color: rgba(0, 0, 0, .88);
  font-size: 20px;
  font-weight: 600;
}

.nav-list { gap: 4px; }

.nav-item {
  position: relative;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  color: rgba(0, 0, 0, .65);
  font-size: 14px;
}

.nav-item:hover {
  background: rgba(0, 0, 0, .04);
  color: rgba(0, 0, 0, .88);
}

.nav-item.active {
  background: #e6f4ff;
  color: #1677ff;
  font-weight: 600;
}

.nav-item.active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #1677ff;
  content: "";
}

.nav-icon { color: inherit; font-size: 17px; }
.nav-badge { background: #fff1f0; color: #ff4d4f; }

.factory-card {
  padding: 14px 8px 0;
  border-top-color: #f0f0f0;
}

.factory-avatar {
  background: #e6f4ff;
  color: #1677ff;
}

.main-content { padding: 0 24px 40px; background: #f5f7fa; }
.topbar { min-height: 56px; color: rgba(0, 0, 0, .45); }
.date-chip { border-right-color: #f0f0f0; }

.section-actions { margin-bottom: 16px; }
.section-actions h2 { color: rgba(0, 0, 0, .88); font-size: 20px; font-weight: 600; }
.section-actions p { color: rgba(0, 0, 0, .45); font-size: 13px; }

.panel,
.metric-card,
.template-library-stats > div,
.cutting-stats > div,
.production-overview > div,
.payroll-stat,
.payroll-scale-stat {
  border-color: #f0f0f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}

.panel:hover,
.metric-card:hover {
  border-color: #e6e6e6;
}

.panel-heading { padding: 16px 20px; }
.panel-heading h2 { color: rgba(0, 0, 0, .88); font-size: 16px; font-weight: 600; }
.panel-heading p { color: rgba(0, 0, 0, .45); }

.btn,
.icon-tool,
.payroll-action-bar .icon-tool {
  min-height: 32px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.btn { padding: 0 15px; }

.btn-primary {
  border-color: #1677ff;
  background: #1677ff;
  color: #fff;
  box-shadow: 0 2px 0 rgba(5, 145, 255, .10);
}

.btn-primary:hover {
  border-color: #4096ff;
  background: #4096ff;
}

.btn-primary:active {
  border-color: #0958d9;
  background: #0958d9;
}

.btn-secondary,
.icon-tool,
.payroll-action-bar .icon-tool {
  border-color: #d9d9d9;
  background: #fff;
  color: rgba(0, 0, 0, .88);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .02);
}

.btn-secondary:hover,
.icon-tool:hover,
.payroll-action-bar .icon-tool:hover {
  border-color: #4096ff;
  background: #fff;
  color: #1677ff;
}

.btn-danger {
  border-color: #ff4d4f;
  background: #fff;
  color: #ff4d4f;
}

.btn-danger:hover { border-color: #ff7875; background: #fff2f0; color: #ff7875; }
.btn:disabled, button:disabled { cursor: not-allowed; opacity: .48; }

.btn:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(5, 145, 255, .10);
}

.filter-bar,
.quality-filters,
.cutting-filter-grid,
.payroll-filter-grid,
.yizhe-filter-panel,
.workers-filter-panel {
  border-color: #f0f0f0;
  border-radius: 8px;
  background: #fff;
}

.filter-bar label,
.quality-filters > label,
.cutting-filter-grid > label,
.payroll-filter-grid > label,
.yizhe-filter-panel > label {
  color: rgba(0, 0, 0, .65);
  font-weight: 400;
}

.search-box {
  min-height: 32px;
  border-color: #d9d9d9;
  border-radius: 6px;
  background: #fff;
}

.search-box:hover { border-color: #4096ff; }
.search-box:focus-within { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(5, 145, 255, .10); }

.segmented {
  padding: 2px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .04);
}

.segmented button { min-height: 28px; border-radius: 4px; }
.segmented button.active { background: #fff; color: #1677ff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.quality-tabs,
.payroll-status-tabs,
.ticket-designer-tabs,
.template-category-tabs,
.workers-tabs,
.rework-detail-tabs {
  border-bottom-color: #f0f0f0;
}

.quality-tabs button,
.payroll-status-tab-buttons > button,
.ticket-designer-tabs button,
.template-category-tabs button,
.workers-tabs button,
.rework-detail-tabs button {
  color: rgba(0, 0, 0, .65);
  font-weight: 400;
}

.quality-tabs button.active,
.payroll-status-tab-buttons > button.active,
.ticket-designer-tabs button.active,
.template-category-tabs button.active,
.workers-tabs button.active,
.rework-detail-tabs button.active {
  color: #1677ff;
  font-weight: 500;
}

.quality-tabs button.active::after,
.payroll-status-tab-buttons > button.active::after,
.ticket-designer-tabs button.active::after,
.template-category-tabs button.active::after,
.workers-tabs button.active::after {
  background: #1677ff;
}

.table-wrap,
.quality-table-wrap,
.cutting-table-scroll,
.operation-dialog-table-wrap,
.rework-detail-table-wrap {
  border-color: #f0f0f0;
  border-radius: 8px;
}

table { color: rgba(0, 0, 0, .88); }

th,
.quality-table th,
.cutting-list-head,
.worker-role-table th,
.workers-table th,
.payroll-main-table th,
.variant-library-table th,
.ticket-print-table th,
.operation-pricing-table th,
.operation-dialog-table th,
.rework-detail-table-wrap th {
  border-color: #f0f0f0;
  background: #fafafa;
  color: rgba(0, 0, 0, .65);
  font-weight: 600;
}

td,
.quality-table td,
.operation-pricing-table td,
.operation-dialog-table td,
.rework-detail-table-wrap td {
  border-color: #f0f0f0;
}

tbody tr:hover,
.orders-table tbody tr:hover,
.quality-table tbody tr:hover {
  background: #fafafa;
}

.quality-table tbody tr:nth-child(even) { background: #fff; }
.quality-table tbody tr:nth-child(even):hover { background: #fafafa; }

.status,
.quality-type-tag,
.yizhe-order-status,
.yizhe-cut-status,
.payroll-detail-status,
.review-rework-badge {
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
}

.status.approved,
.status.active,
.quality-type-tag {
  border: 1px solid #91caff;
  background: #e6f4ff;
  color: #0958d9;
}

.status.pending,
.review-rework-badge {
  border: 1px solid #ffe58f;
  background: #fffbe6;
  color: #d48806;
}

.status.rejected,
.quality-type-tag.defect {
  border: 1px solid #ffccc7;
  background: #fff2f0;
  color: #cf1322;
}

.text-button,
.worker-text-actions button,
.worker-row-actions button,
.cutting-record-actions button,
.quality-actions button,
.yizhe-order-actions button {
  color: #1677ff;
}

.modal-backdrop,
.register-backdrop {
  background: rgba(0, 0, 0, .45);
  backdrop-filter: none;
}

.modal,
.register-dialog,
.quality-form-dialog,
.quality-detail-dialog,
.operation-edit-dialog,
.sync-operations-dialog,
.cutting-report-dialog,
.cutting-adjust-dialog,
.cutting-detail-dialog,
.cutting-sheet-format-dialog,
.cutting-preview-modal,
.ticket-print-dialog,
.payroll-detail-dialog,
.yizhe-order-detail-dialog,
.delete-confirm-dialog,
.employee-scanner-dialog {
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05);
}

.modal-header {
  min-height: 55px;
  padding: 16px 24px;
  border-bottom-color: #f0f0f0;
}

.modal-header h2 { color: rgba(0, 0, 0, .88); font-size: 16px; font-weight: 600; }

.modal-actions {
  padding: 10px 16px;
  border-top-color: #f0f0f0;
  background: #fff;
}

.icon-button {
  border-radius: 6px;
  color: rgba(0, 0, 0, .45);
}

.icon-button:hover { background: rgba(0, 0, 0, .04); color: rgba(0, 0, 0, .88); }

[class*="pagination"] button {
  min-width: 32px;
  height: 32px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: rgba(0, 0, 0, .88);
}

[class*="pagination"] button:hover { border-color: #1677ff; color: #1677ff; }
[class*="pagination"] button.active { border-color: #1677ff; color: #1677ff; font-weight: 500; }

.switch input + span { background: rgba(0, 0, 0, .25); }
.switch input:checked + span { background: #1677ff; }
.progress-track { background: #f0f0f0; }
.progress-fill, .progress-fill.complete, .bar, .sync-status i { background: #1677ff; }

.toast {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  background: #fff;
  color: rgba(0, 0, 0, .88);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.login-card {
  border: 1px solid rgba(5, 5, 5, .06);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}

.login-field {
  overflow: hidden;
  border-color: #d9d9d9;
  border-radius: 6px;
}

.login-field:focus-within { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(5, 145, 255, .10); }
.auth-submit, .auth-register { min-height: 40px; border-radius: 6px; }
.auth-submit { border-color: #1677ff; background: #1677ff; }
.auth-register { border-color: #d9d9d9; color: #1677ff; }

@media (max-width: 760px) {
  .main-content { padding-right: 14px; padding-left: 14px; }
  .section-actions h2 { font-size: 18px; }
  .panel { border-radius: 8px; }
}

/* 左侧导航紧凑模式 */
@media (min-width: 761px) {
  :root { --sidebar-width: 168px; }

  .sidebar {
    padding: 10px 8px 9px;
  }

  .brand {
    min-height: 40px;
    gap: 5px;
    padding: 0 9px 9px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand strong {
    font-size: 17px;
    line-height: 1.2;
  }

  .nav-list {
    gap: 1px;
  }

  .nav-item {
    grid-template-columns: 19px 1fr auto;
    height: 32px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 12px;
  }


  .nav-icon {
    font-size: 14px;
  }

  .nav-item.active::before {
    top: 7px;
    bottom: 7px;
    width: 2px;
  }

  .nav-badge {
    min-width: 17px;
    padding: 1px 5px;
    font-size: 9px;
  }

  .factory-card {
    gap: 6px;
    padding: 8px 5px 0;
  }

  .factory-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .factory-card strong { font-size: 10px; }
  .factory-card span { margin-top: 1px; font-size: 8px; }
  .logout-button { width: 25px; height: 25px; font-size: 15px; }
}

/* 裁床款式图：明细入口缩为右下角小标签，减少图片遮挡 */
.cutting-style-thumb span {
  right: 3px;
  bottom: 3px;
  left: auto;
  max-width: calc(100% - 6px);
  padding: 1px 4px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(22, 119, 255, .82);
  font-size: 6px;
  font-weight: 500;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cutting-style-thumb:hover span {
  background: rgba(9, 88, 217, .92);
}

/* 顶部已打开页面标签 */
.topbar,
.topbar.compact,
.topbar.orders-compact,
.topbar.ticket-compact,
.topbar.detail-hidden {
  position: relative;
  z-index: 4;
  display: flex;
  min-height: 40px;
  height: 40px;
  gap: 8px;
  margin: 0 -24px 10px;
  padding: 0 24px;
  border-bottom: 1px solid #e7ebf0;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 3px rgba(28, 47, 74, .04);
  backdrop-filter: blur(8px);
}

body.dashboard-screen-mode .topbar { display: flex; }
body.dashboard-screen-mode .main-content { padding-top: 0; }

.workspace-tabs {
  display: flex;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.workspace-tabs::-webkit-scrollbar { display: none; }

.workspace-tab {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  min-width: 88px;
  max-width: 150px;
  border-right: 1px solid #edf0f4;
  background: #fafbfc;
  color: #697586;
  transition: color .16s, background .16s;
}

.workspace-tab:first-child { border-left: 1px solid #edf0f4; }
.workspace-tab:hover { background: #f3f7fc; color: #334155; }
.workspace-tab.active { background: #fff; color: #1677ff; }
.workspace-tab.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: #1677ff; content: ''; }

.workspace-tab-main {
  min-width: 0;
  flex: 1;
  padding: 0 2px 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 11px;
  cursor: pointer;
}

.workspace-tab-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tab-close { width: 22px; padding: 0; border: 0; background: transparent; color: #b2bac5; font-size: 15px; cursor: pointer; }
.workspace-tab-close:hover { color: #ff4d4f; }
.topbar-actions { flex: 0 0 auto; }

/* 标签栏单独占一行，页面原有标题和操作不再向上重叠 */
.view > .section-actions:first-child,
#templateListPanel > .section-actions:first-child {
  min-height: 44px;
  margin-top: 0;
  padding-right: 0;
}

/* 工资明细保留顶部页面标签 */
.payroll-detail-backdrop { top: 40px; }
.payroll-detail-dialog { height: calc(100vh - 40px); }

/* 按床号查看：列宽均衡，裁床单号与工序居中 */
.payroll-detail-table[data-view-mode="bed"] {
  width: 100%;
  min-width: 920px;
  table-layout: fixed;
}

.payroll-detail-table[data-view-mode="bed"] th,
.payroll-detail-table[data-view-mode="bed"] td { text-align: center; vertical-align: middle; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(1) { width: 20%; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(2) { width: 9%; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(3) { width: 11%; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(4) { width: 31%; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(5) { width: 10%; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(6) { width: 10%; }
.payroll-detail-table[data-view-mode="bed"] th:nth-child(7) { width: 9%; }
.payroll-detail-table[data-view-mode="bed"] .payroll-detail-code-with-badge { justify-content: center; }
.payroll-detail-table[data-view-mode="bed"] td:nth-child(4) { text-align: center !important; }
.payroll-detail-table[data-view-mode="bed"] .payroll-detail-group-text {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.65;
  text-align: center;
}

/* 款式、工序汇总中的长工序文本也按整列居中 */
.payroll-detail-table[data-view-mode="style"] td:nth-child(4),
.payroll-detail-table[data-view-mode="operation"] td:first-child { text-align: center !important; }
.payroll-detail-table[data-view-mode="style"] th:first-child,
.payroll-detail-table[data-view-mode="style"] td:first-child,
.payroll-detail-table[data-view-mode="operation"] th:first-child,
.payroll-detail-table[data-view-mode="operation"] td:first-child {
  padding-left: 9px;
  text-align: center !important;
}
.payroll-detail-table[data-view-mode="style"] .payroll-detail-group-list.operations,
.payroll-detail-table[data-view-mode="operation"] .payroll-detail-code-with-badge {
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

/* 工资分组的扫菲明细弹窗 */
.payroll-group-detail-backdrop { z-index: 160; padding: 26px; background: rgba(31, 43, 61, .48); }
.payroll-group-detail-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1420px, calc(100vw - 52px));
  max-height: calc(100vh - 52px);
  overflow: hidden;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(22, 37, 59, .22);
}
.payroll-group-detail-header { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 18px; border-bottom: 1px solid #e7ecf3; }
.payroll-group-detail-header h2 { margin: 0; color: #26364e; font-size: 16px; }
.payroll-group-detail-header p { margin: 3px 0 0; color: #8b99ac; font-size: 10px; }
.payroll-group-detail-summary { display: flex; gap: 28px; min-height: 44px; align-items: center; padding: 0 18px; border-bottom: 1px solid #e9edf3; background: #f8faff; color: #65758b; font-size: 10px; }
.payroll-group-detail-summary strong { margin: 0 3px; color: #2678ed; font-size: 13px; }
.payroll-group-detail-table-wrap { min-height: 0; overflow: auto; }
.payroll-group-detail-table { width: 100%; min-width: 1280px; border-collapse: collapse; }
.payroll-group-detail-table th, .payroll-group-detail-table td { height: 44px; padding: 7px 9px; border-bottom: 1px solid #edf1f5; text-align: center; font-size: 10px; }
.payroll-group-detail-table th { position: sticky; top: 0; z-index: 1; background: #f5f7fa; color: #596981; white-space: nowrap; }
.payroll-group-detail-table td { color: #44546b; }
.payroll-group-detail-table td strong, .payroll-group-detail-table td small { display: block; }
.payroll-group-detail-table td small { margin-top: 2px; color: #95a2b3; font-size: 8px; }
.payroll-group-detail-actions { display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid #e7ecf3; background: #fff; }

.payroll-history-actions { display: flex; justify-content: center; gap: 10px; white-space: nowrap; }
.payroll-history-undo { padding: 0; border: 0; background: transparent; color: #ff4d4f; font-size: 10px; cursor: pointer; }
.payroll-history-undo:hover { color: #cf1322; }

/* 工资打印方式 */
.payroll-print-backdrop { z-index: 170; }
.payroll-print-dialog { width: min(660px, calc(100vw - 32px)); max-height: calc(100vh - 36px); overflow: auto; border-radius: 9px; background: #fff; box-shadow: 0 18px 52px rgba(24, 39, 60, .22); }
.payroll-print-employees { padding: 14px 18px 4px; }
.payroll-print-employees > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.payroll-print-employees > header > div { display: flex; align-items: baseline; gap: 9px; }
.payroll-print-employees > header strong { color: #33445c; font-size: 12px; }
.payroll-print-employees > header small { color: #1677ff; font-size: 9px; }
.payroll-print-employees > header label { color: #617087; font-size: 10px; cursor: pointer; }
.payroll-print-employees > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; max-height: 176px; overflow: auto; padding: 1px; }
.payroll-print-employees > div > label { display: flex; align-items: flex-start; gap: 7px; min-width: 0; padding: 8px; border: 1px solid #e1e7ef; border-radius: 6px; background: #fff; cursor: pointer; }
.payroll-print-employees > div > label:has(input:checked) { border-color: #91caff; background: #f1f8ff; }
.payroll-print-employees > div input { margin-top: 2px; accent-color: #1677ff; }
.payroll-print-employees > div span { min-width: 0; }
.payroll-print-employees > div strong, .payroll-print-employees > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payroll-print-employees > div strong { color: #35465d; font-size: 11px; }
.payroll-print-employees > div small { margin-top: 3px; color: #8996a8; font-size: 8px; }
.payroll-print-option-title { padding: 12px 18px 0; color: #33445c; font-size: 12px; font-weight: 700; }
.payroll-print-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px; }
.payroll-print-options label { display: flex; align-items: flex-start; gap: 9px; min-height: 68px; padding: 12px; border: 1px solid #dfe6ef; border-radius: 7px; background: #fff; cursor: pointer; transition: border-color .16s, background .16s; }
.payroll-print-options label:hover { border-color: #91caff; background: #f7fbff; }
.payroll-print-options label:has(input:checked) { border-color: #1677ff; background: #eaf4ff; box-shadow: 0 0 0 1px rgba(22, 119, 255, .08); }
.payroll-print-options input { margin-top: 3px; accent-color: #1677ff; }
.payroll-print-options span { display: grid; gap: 5px; }
.payroll-print-options strong { color: #2c3d55; font-size: 13px; }
.payroll-print-options small { color: #8492a6; font-size: 9px; line-height: 1.5; }

@media (max-width: 760px) {
  .topbar,
  .topbar.compact,
  .topbar.orders-compact,
  .topbar.ticket-compact,
  .topbar.detail-hidden { display: flex; height: 38px; min-height: 38px; margin: 0 -14px 8px; padding: 0 10px; }
  .workspace-tab { min-width: 84px; max-width: 132px; }
  .workspace-tab-main { padding-left: 10px; font-size: 11px; }
  .topbar-actions { display: none; }
  .payroll-detail-backdrop { top: 38px; }
  .payroll-detail-dialog { height: calc(100vh - 38px); }
  .payroll-group-detail-backdrop { padding: 10px; }
  .payroll-group-detail-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .payroll-group-detail-summary { gap: 12px; overflow-x: auto; white-space: nowrap; }
  .payroll-print-options { grid-template-columns: 1fr; }
  .payroll-print-employees > div { grid-template-columns: 1fr 1fr; }
}

/* 员工管理：组织树 + 成员列表 */
#workersView .workers-page-title { margin-bottom: 9px; }
#workersView .workers-management-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 10px; align-items: stretch; }
#workersView .worker-role-panel,
#workersView .workers-main-panel { min-height: 650px; border: 1px solid #e6ebf2; border-radius: 8px; box-shadow: none; }
#workersView .worker-role-panel { padding-bottom: 12px; }
#workersView .worker-role-panel > header { display: flex; min-height: 64px; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #edf1f6; }
#workersView .worker-role-panel > header > div:nth-child(2) { min-width: 0; flex: 1; }
#workersView .worker-role-panel > header h3 { overflow: hidden; margin: 0; color: #2c3d55; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
#workersView .worker-role-panel > header p { margin: 2px 0 0; color: #9aa7b8; font-size: 9px; }
#workersView .worker-role-panel > header > button { display: grid; width: auto; min-width: 76px; height: 30px; place-items: center; padding: 0 8px; border: 1px solid #dfe6ef; border-radius: 6px; background: #fff; color: #1677ff; font-size: 10px; font-weight: 600; white-space: nowrap; }
.worker-role-batch-field textarea { min-height: 128px; line-height: 1.65; }
.worker-role-batch-field small { color: #8a98aa; font-size: 10px; font-weight: 400; line-height: 1.5; }
.modal-fields .worker-code-auto[readonly] { border-color: #e4e9f0; background: #f6f8fb; color: #617087; font-weight: 600; cursor: default; }
.worker-org-icon,
.workers-head-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #edf4ff; color: #1677ff; font-size: 17px; }
.worker-role-tree-all { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 5px; min-height: 38px; margin: 9px 8px 5px; padding: 0 9px; border-radius: 6px; color: #56657a; cursor: pointer; }
.worker-role-tree-all strong { font-size: 11px; }
.worker-role-tree-all small { color: #9aa7b8; font-size: 9px; }
.worker-role-tree-all:hover,
.worker-role-tree-all.active { background: #eaf4ff; color: #1677ff; }
.worker-role-tree { display: grid; gap: 2px; padding: 0 8px; }
.worker-role-tree-row { position: relative; display: flex; min-width: 0; align-items: center; border-radius: 6px; }
.worker-role-tree-row:hover,
.worker-role-tree-row.active { background: #f1f7ff; }
.worker-role-filter-button { display: grid; min-width: 0; min-height: 36px; flex: 1; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 0 8px; border: 0; background: transparent; color: #536176; text-align: left; }
.worker-role-filter-button strong { overflow: hidden; font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.worker-role-filter-button small { color: #9aa7b8; font-size: 9px; }
.worker-role-tree-row.active .worker-role-filter-button { color: #1677ff; }
.worker-role-tree-actions { display: flex; align-items: center; gap: 2px; padding-right: 4px; }
.worker-role-tree-actions button { width: auto; height: 24px; padding: 0 4px; border: 0; background: transparent; color: #1677ff; font-size: 11px; font-weight: 600; }
.worker-role-tree-actions button.danger { width: 16px; padding: 0; color: #a7b1bf; }
.worker-role-tree-actions button:hover { color: #1677ff; }
.worker-role-tree-actions button.danger:hover { color: #ff4d4f; }
#workersView .workers-main-panel { display: flex; min-width: 0; flex-direction: column; }
.workers-main-head { display: flex; min-height: 64px; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #edf1f6; }
.workers-main-head > div:nth-child(2) { min-width: 0; flex: 1; }
.workers-main-head h3 { margin: 0; color: #2c3d55; font-size: 14px; }
.workers-main-head p { margin: 2px 0 0; color: #98a5b6; font-size: 9px; }
.workers-main-head .btn { min-height: 32px; padding: 0 13px; }
#workersView .workers-tabs { min-height: 42px; gap: 25px; padding: 0 14px; }
#workersView .workers-tabs button { font-size: 11px; }
#workersView .workers-tabs button small { display: inline-flex; min-width: 18px; height: 18px; align-items: center; justify-content: center; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: #f0f2f5; color: #7d8999; font-size: 9px; font-weight: 600; }
#workersView .workers-tabs button.active small { background: #eaf4ff; color: #1677ff; }
#workersView .workers-filter-bar { grid-template-columns: minmax(220px, 1.3fr) minmax(140px, .7fr) auto; gap: 10px; min-height: 76px; padding: 10px 14px; border-bottom: 1px solid #edf1f6; background: #fbfcfe; }
#workersView .workers-filter-bar label { display: grid; gap: 4px; font-size: 9px; font-weight: 500; }
#workersView .workers-filter-bar input,
#workersView .workers-filter-bar select { height: 32px; border-color: #dfe5ed; border-radius: 5px; font-size: 10px; }
#workersView .workers-filter-bar > div { align-self: end; }
#workersView .workers-filter-bar .btn { min-height: 32px; padding: 0 11px; font-size: 10px; }
#workersView .workers-table-heading { min-height: 42px; padding: 7px 14px; border-bottom: 1px solid #edf1f6; }
#workersView .workers-table-heading strong { color: #3a4a60; font-size: 11px; }
#workersView .worker-icon-tool { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #dfe5ed; border-radius: 5px; background: #fff; font-size: 14px; }
#workersView .workers-table-wrap { flex: 1 1 auto; margin: 0; border: 0; border-radius: 0; }
#workersView .workers-table { min-width: 980px; }
#workersView .workers-table th,
#workersView .workers-table td { height: 43px; padding: 6px 8px; border-color: #edf1f6; text-align: left; font-size: 10px; }
#workersView .workers-table th { height: 38px; background: #f7f9fc; color: #5d6b80; font-size: 9px; }
#workersView .workers-table th:nth-child(1),
#workersView .workers-table td:nth-child(1) { width: 38px; text-align: center; }
#workersView .workers-table th:nth-child(2) { width: 145px; }
#workersView .workers-table th:nth-child(3) { width: 80px; }
#workersView .workers-table th:nth-child(4) { width: 110px; }
#workersView .workers-table th:nth-child(5) { width: 60px; }
#workersView .workers-table th:nth-child(6) { width: 100px; }
#workersView .workers-table th:nth-child(7) { width: 120px; }
#workersView .workers-table th:nth-child(8) { width: 90px; }
#workersView .workers-table th:nth-child(9) { width: 150px; }
#workersView .workers-table tr.selected td { background: #f0f7ff; }
.worker-management-check,
#selectAllWorkers { width: 15px; height: 15px; margin: 0; accent-color: #1677ff; }
#workersView .worker-name-cell { display: flex; align-items: center; gap: 8px; }
#workersView .worker-name-cell > i { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #d9dde3; color: #fff; font-size: 11px; font-style: normal; }
#workersView .worker-name-cell strong { color: #314158; font-size: 11px; }
#workersView .worker-name-cell small { color: #a0acbb; font-size: 8px; }
.worker-team-tag { display: inline-flex; padding: 2px 7px; border: 1px solid #a9d1ff; border-radius: 4px; background: #eef7ff; color: #1677ff; font-size: 9px; }
#workersView .worker-inline-role { height: 27px; padding: 0 19px 0 5px; color: #43536a; text-align: left; font-size: 10px; }
#workersView .worker-row-actions { justify-content: flex-start; gap: 9px; }
#workersView .worker-row-actions button { font-size: 9px; }
#workersView .workers-empty { padding: 60px 20px; text-align: center; }
#workersView .workers-pagination { min-height: 46px; padding: 8px 14px; border-top: 1px solid #edf1f6; }
.worker-status-tag { display: inline-flex; min-width: 42px; min-height: 22px; align-items: center; justify-content: center; padding: 1px 8px; border-radius: 11px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.worker-status-tag.active { background: #e8f8ef; color: #1f9d55; }
.worker-status-tag.inactive { background: #fff0f0; color: #e5484d; }
.worker-status-tag.pending { background: #fff7e6; color: #d48806; }

#onboardingView .workers-page-title { margin-bottom: 10px; }
#onboardingView .onboarding-review-panel { display: flex; min-height: 0; overflow: hidden; flex-direction: column; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgba(46, 68, 97, .04); }
.onboarding-review-head { display: flex; min-height: 60px; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid #edf1f6; }
.onboarding-review-head > div:nth-child(2) { min-width: 0; flex: 1; }
.onboarding-review-head h3 { margin: 0; color: #2c3d55; font-size: 14px; }
.onboarding-review-head p { margin: 2px 0 0; color: #98a5b6; font-size: 9px; }
.onboarding-review-head > span { padding: 4px 10px; border: 1px solid #ffe2ad; border-radius: 12px; background: #fff8e8; color: #c97900; font-size: 10px; font-weight: 600; }
#onboardingView .workers-filter-bar { grid-template-columns: minmax(300px, 1.6fr) minmax(180px, .75fr) auto; gap: 12px; min-height: 70px; padding: 9px 16px 10px; border-bottom: 1px solid #edf1f6; background: #fafcff; }
#onboardingView .workers-filter-bar label { display: grid; gap: 4px; font-size: 9px; font-weight: 500; }
#onboardingView .workers-filter-bar input,
#onboardingView .workers-filter-bar select { height: 34px; border-color: #dce4ee; border-radius: 5px; font-size: 10px; }
#onboardingView .workers-filter-bar > div { align-self: end; }
#onboardingView .workers-filter-bar .btn { min-height: 34px; padding: 0 12px; font-size: 10px; }
#onboardingView .workers-table-heading { min-height: 40px; padding: 6px 16px; border-bottom: 1px solid #edf1f6; background: #fff; }
#onboardingView .workers-table-heading strong { color: #3a4a60; font-size: 11px; }
#onboardingView .worker-icon-tool { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #dfe5ed; border-radius: 5px; background: #fff; font-size: 14px; }
#onboardingView .workers-table-wrap { overflow-x: auto; flex: 0 0 auto; margin: 0; border: 0; border-radius: 0; }
#onboardingView .workers-table { min-width: 960px; table-layout: fixed; }
#onboardingView .workers-table th,
#onboardingView .workers-table td { height: 48px; padding: 7px 12px; border-color: #edf1f6; text-align: left; font-size: 10px; }
#onboardingView .workers-table th { height: 38px; padding: 6px 12px; background: #f6f8fb; color: #5d6b80; text-align: left; font-size: 9px; }
#onboardingView .workers-table th:nth-child(1) { width: 150px; }
#onboardingView .workers-table th:nth-child(2) { width: 90px; }
#onboardingView .workers-table th:nth-child(3) { width: 120px; }
#onboardingView .workers-table th:nth-child(4) { width: 65px; }
#onboardingView .workers-table th:nth-child(5) { width: 110px; }
#onboardingView .workers-table th:nth-child(6) { width: 140px; }
#onboardingView .workers-table th:nth-child(7) { width: 90px; }
#onboardingView .workers-table th:nth-child(8) { width: 150px; }
#onboardingView .workers-table tbody tr:hover td { background: #fafcff; }
#onboardingView .worker-name-cell { display: flex; align-items: center; gap: 8px; }
#onboardingView .worker-name-cell > i { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #d9dde3; color: #fff; font-size: 11px; font-style: normal; }
#onboardingView .worker-name-cell strong { color: #314158; font-size: 11px; }
#onboardingView .worker-name-cell small { color: #a0acbb; font-size: 8px; }
#onboardingView .worker-inline-role { width: 100%; height: 29px; padding: 0 22px 0 7px; border: 1px solid #e2e8f0; border-radius: 4px; color: #43536a; text-align: left; font-size: 10px; }
#onboardingView .worker-row-actions { justify-content: flex-start; gap: 11px; }
#onboardingView .worker-row-actions button { font-size: 10px; font-weight: 550; }
#onboardingView .workers-empty { padding: 58px 20px; text-align: center; }
#onboardingView .workers-pagination { min-height: 42px; padding: 7px 16px; border-top: 1px solid #edf1f6; background: #fbfcfe; }

@media (max-width: 1100px) {
  #workersView .workers-management-layout { grid-template-columns: 205px minmax(0, 1fr); }
  #workersView .workers-filter-bar { grid-template-columns: minmax(180px, 1fr) minmax(120px, .65fr) auto; }
  #workersView .workers-filter-bar > div { grid-column: auto; justify-content: flex-end; }
  #onboardingView .workers-filter-bar { grid-template-columns: minmax(180px, 1fr) minmax(120px, .65fr) auto; }
  #onboardingView .workers-filter-bar > div { grid-column: auto; justify-content: flex-end; }
}
@media (max-width: 760px) {
  #workersView .workers-management-layout { grid-template-columns: 1fr; }
  #workersView .worker-role-panel,
  #workersView .workers-main-panel { min-height: 0; }
  #workersView .worker-role-tree { max-height: 210px; overflow: auto; }
  #workersView .workers-filter-bar { grid-template-columns: 1fr; }
  #workersView .workers-filter-bar > div { grid-column: auto; }
  #onboardingView .onboarding-review-panel { min-height: 0; }
  #onboardingView .workers-filter-bar { grid-template-columns: 1fr; }
  #onboardingView .workers-filter-bar > div { grid-column: auto; }
}

/* 工序图片：编辑、模板及裁床明细共用 */
.operation-image-heading,
.operation-pricing-table .operation-image-cell,
.operation-dialog-table .operation-image-cell,
#templateEditorBody .operation-image-cell {
  width: 64px;
  min-width: 64px;
  text-align: center;
}

.operation-image-editor {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  vertical-align: middle;
}

.operation-image-editor label { display: block; cursor: pointer; }

.operation-image-preview {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed #b7c6d8;
  border-radius: 6px;
  background: #f8fbff;
  color: #4f8edc;
  font-size: 18px;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease;
}

.operation-image-editor label:hover .operation-image-preview {
  border-color: #1677ff;
  background: #edf6ff;
}

.operation-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.operation-image-clear {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  width: 16px;
  height: 16px;
  padding: 0;
  place-items: center;
  border: 1px solid #ffccc7;
  border-radius: 50%;
  background: #fff;
  color: #ff4d4f;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.cutting-operation-name-cell,
.production-operation-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.operation-business-thumbnail {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid #e0e8f1;
  border-radius: 5px;
  background: #fff;
  object-fit: cover;
  cursor: zoom-in;
}

.operation-thumbnail-empty {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px dashed #d4dde8;
  border-radius: 5px;
  color: #a3afbd;
  font-size: 8px;
}

.production-operation-title { flex: 1; }
.production-operation-title .operation-business-thumbnail { width: 28px; height: 28px; flex-basis: 28px; }
.cutting-operation-list-name,
.cutting-operation-detail-title { display: flex; min-width: 0; align-items: center; gap: 7px; }
.cutting-operation-list-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cutting-operation-list-name .operation-business-thumbnail { width: 26px; height: 26px; flex-basis: 26px; }
.cutting-operation-detail-title .operation-business-thumbnail { width: 36px; height: 36px; flex-basis: 36px; }

body.operation-images-disabled .operation-image-heading,
body.operation-images-disabled .operation-image-cell,
body.operation-images-disabled .operation-business-thumbnail,
body.operation-images-disabled .operation-thumbnail-empty { display: none !important; }

/* 扫码加入公司 */
.company-join-dialog {
  width: min(520px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(33, 56, 89, .22);
}

.company-join-dialog .modal-header h2 { margin-bottom: 3px; }
.company-join-dialog .modal-header p { margin: 0; color: #8a98aa; font-size: 10px; }

.company-join-content {
  display: grid;
  justify-items: center;
  padding: 20px 24px 17px;
  text-align: center;
}

.company-join-qr {
  display: grid;
  width: 220px;
  height: 220px;
  place-items: center;
  padding: 12px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 20px rgba(51, 82, 119, .08);
}

.company-join-qr svg { display: block; width: 100%; height: 100%; }
.company-join-info { display: grid; gap: 3px; margin-top: 12px; }
.company-join-info span,
.company-join-code span { color: #8b98a9; font-size: 10px; }
.company-join-info strong { color: #263b55; font-size: 17px; }
.company-join-info small { color: #98a5b5; font-size: 9px; }

.company-join-code {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 5px 12px;
  border-radius: 5px;
  background: #f3f7fc;
}

.company-join-code strong { color: #1677ff; font-size: 12px; letter-spacing: .8px; }
.company-join-content > p { max-width: 400px; margin: 12px 0 0; color: #6f7e91; font-size: 10px; line-height: 1.65; }
.company-join-dialog .modal-actions { flex-wrap: wrap; }

@media (max-width: 680px) {
  .workers-main-head { flex-wrap: wrap; }
  #openCompanyJoinQr { margin-left: 35px; }
  .company-join-content { padding-right: 16px; padding-left: 16px; }
  .company-join-qr { width: 200px; height: 200px; }
  .company-join-dialog .modal-actions { flex-wrap: wrap; }
  .company-join-dialog .modal-actions .btn { flex: 1 1 120px; }
}
