:root {
  --green: #18a84a;
  --green-dark: #113d25;
  --green-soft: #e9f8ee;
  --ink: #17221a;
  --muted: #79827b;
  --line: #e6ece7;
  --surface: #ffffff;
  --canvas: #f3f7f4;
  --orange: #ed6b35;
  --shadow: 0 18px 48px rgba(28, 65, 40, 0.08);
}

/* Unified pricing editor: contained fields, quiet surfaces, clear units. */
.pricing-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; margin-top: 24px; }
.pricing-editor, #pricingFields { display: grid; gap: 20px; min-width: 0; }
.pricing-group { padding: 24px; }
.pricing-group-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
.pricing-group-head > span { color: #087a35; font-weight: 700; padding-top: 3px; }
.pricing-group-head p, .pricing-history > p { margin: 6px 0 0; color: #606b64; line-height: 1.6; font-size: 13px; }
.pricing-three, .pricing-two { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pricing-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pricing-vehicle + .pricing-vehicle { border-top: 1px solid #edf0ed; padding-top: 20px; margin-top: 20px; }
.pricing-vehicle h3 { margin: 0 0 14px; font-size: 15px; }
.pricing-field { display: grid; gap: 8px; min-width: 0; font-size: 13px; color: #414b44; }
.pricing-input { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 10px; border: 1px solid #dee6df; border-radius: 10px; background: #fafcf9; }
.pricing-input input { width: 100%; min-width: 0; padding: 10px 0; height: 44px; border: 0; border-radius: 6px; background: transparent; color: #17221a; }
.pricing-input small { flex: none; color: #606b64; font-size: 11px; }
.pricing-input input[readonly] { color: #68746a; }
.pricing-quote strong { display: flex; align-items: center; min-height: 44px; color: #606b64; font-size: 13px; font-weight: 500; }
.pricing-publish { padding: 24px; display: grid; gap: 12px; }
.pricing-publish > input { width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid #dee6df; border-radius: 10px; }
#pricingFeedback { color: #58635c; font-size: 13px; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.pricing-publish-actions { display: flex; justify-content: flex-end; gap: 12px; }
.pricing-publish button { min-height: 44px; }
.pricing-publish button:disabled { opacity: .55; cursor: not-allowed; }
.pricing-history { padding: 24px; position: sticky; top: 24px; }
.pricing-version { display: grid; gap: 6px; padding: 18px 0; border-bottom: 1px solid #edf0ed; }
.pricing-version strong { color: #087a35; font-size: 14px; }
.pricing-version span, .pricing-version small, .pricing-version p { font-size: 12px; line-height: 1.5; color: #606b64; margin: 0; overflow-wrap: anywhere; }
.pricing-boundary { margin-top: 22px; font-size: 12px; line-height: 1.7; color: #606b64; }
.pricing-boundary strong { color: #17221a; }
@media (max-width: 1150px) { .pricing-editor-layout { grid-template-columns: minmax(0, 1fr); } .pricing-history { position: static; } }
@media (max-width: 600px) { .pricing-three, .pricing-two { grid-template-columns: minmax(0, 1fr); } .pricing-group, .pricing-publish, .pricing-history { padding: 18px; } }

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(31, 186, 88, .34);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 20px;
  color: #fff;
  background: linear-gradient(160deg, #102d1d 0%, #114f2c 100%);
}

.brand, .sidebar-footer, .worker, .topbar, .topbar-actions, .card-head,
.metric-head, .integration-card, .version, .drawer-row, .drawer-worker {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; padding: 0 8px 30px; }
.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.35);
  overflow: hidden;
  border-radius: 13px;
  background: #18a84a;
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand strong, .brand small, .sidebar-footer strong, .sidebar-footer small { display: block; }
.brand strong { font-size: 20px; letter-spacing: 1px; }
.brand small, .sidebar-footer small { margin-top: 3px; color: rgba(255,255,255,.55); font-size: 11px; }

.nav { display: flex; flex: 1; flex-direction: column; gap: 8px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-radius: 13px;
  color: rgba(255,255,255,.66);
  background: transparent;
  text-align: left;
}
.nav-item span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: rgba(255,255,255,.08); font-size: 13px; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-item.active span { color: #164e2c; background: #ceffdc; }

.sidebar-footer { gap: 10px; padding: 17px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(0,0,0,.1); }
.sidebar-footer strong { font-size: 13px; }
.operator-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: #0f6030; background: #d3ffdf; font-weight: 800; }

.main { min-height: 100vh; margin-left: 248px; padding: 34px 38px 54px; }
.topbar { justify-content: space-between; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: #6ca27c; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 30px; letter-spacing: -.5px; }
h2 { margin-bottom: 6px; font-size: 20px; }
.topbar-actions { gap: 10px; }
.system-pill { display: flex; align-items: center; gap: 7px; margin-right: 8px; color: #5e6a61; font-size: 12px; }
.system-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(24,168,74,.1); }
.system-pill.offline { color: #a25a25; }
.system-pill.offline span { background: #d66a32; box-shadow: 0 0 0 5px rgba(214,106,50,.1); }

.ghost-button, .primary-button, .secondary-button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}
.ghost-button { border: 1px solid var(--line); color: #4f5a52; background: #fff; }
.primary-button { color: #fff; background: linear-gradient(135deg, #1fba58, #11913e); box-shadow: 0 10px 24px rgba(24,168,74,.2); }
.secondary-button { color: #137638; background: var(--green-soft); }

.view { display: none; }
.view.active { display: block; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 16px; }
.metric-card { padding: 22px; border: 1px solid rgba(216,226,218,.8); border-radius: 18px; background: #fff; box-shadow: 0 9px 28px rgba(31,72,45,.04); }
.metric-card.accent { color: #fff; border-color: transparent; background: linear-gradient(145deg, #173c27 0%, #177b3b 100%); }
.metric-head { justify-content: space-between; color: var(--muted); font-size: 12px; }
.accent .metric-head { color: rgba(255,255,255,.65); }
.metric-head em { padding: 5px 8px; border-radius: 999px; color: #15813c; background: var(--green-soft); font-size: 10px; font-style: normal; font-weight: 700; }
.metric-head em.warning { color: #ad5b25; background: #fff0df; }
.metric-card strong { display: block; margin-top: 22px; font-size: 30px; letter-spacing: -1px; }
.metric-card small { display: block; margin-top: 7px; color: #929b94; font-size: 11px; }
.metric-card.accent small { color: rgba(255,255,255,.6); }

.content-card { border: 1px solid rgba(216,226,218,.8); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.order-board { margin-top: 20px; overflow: hidden; }
.history-board { overflow: hidden; }
.card-head { justify-content: space-between; padding: 22px 24px; }
.card-head p, .staff-toolbar p, .pricing-intro p { margin-bottom: 0; color: #8b948d; font-size: 12px; line-height: 1.6; }
.filters { display: flex; gap: 8px; }
.filters select, .filters input { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: #536057; background: #fff; font-size: 12px; outline: none; }
.filters input { width: 170px; }
.history-filters { align-items: center; }
.history-filters .ghost-button { min-height: 38px; padding: 0 13px; }
.history-workers { max-width: 210px; line-height: 1.55; }
.history-workers span { display: block; color: #546057; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 18px; color: #849087; background: #f8faf8; font-size: 10px; font-weight: 700; text-align: left; letter-spacing: .4px; }
td { padding: 17px 18px; border-top: 1px solid #edf1ee; font-size: 12px; vertical-align: middle; }
td strong, td small { display: block; }
td small { margin-top: 5px; color: #929a94; }
.route-cell { max-width: 280px; }
.route-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-cell span + span { margin-top: 7px; }
.route-cell b { display: inline-grid; width: 19px; height: 19px; margin-right: 7px; place-items: center; border-radius: 6px; color: #fff; background: var(--green); font-size: 9px; }
.route-cell span + span b { background: var(--orange); }
.amount { color: #e65f2f; font-weight: 800; }
.state { display: inline-flex; align-items: center; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.state.ready, .state.completed { color: #147a39; background: var(--green-soft); }
.state.pending, .state.pending_dispatch { color: #a25a25; background: #fff0df; }
.state.assigned, .state.moving { color: #3863a7; background: #eaf1ff; }
.state.cancelled { color: #8c4545; background: #f9eaea; }
.row-action { border: 0; color: #157d3a; background: transparent; font-size: 12px; font-weight: 800; }

.staff-toolbar, .pricing-intro { display: flex; align-items: center; justify-content: space-between; padding: 24px; }
.staff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.staff-card { padding: 22px; }
.staff-head { display: flex; align-items: center; gap: 13px; }
.staff-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 15px; color: #fff; background: var(--green-dark); font-weight: 800; }
.staff-head strong, .staff-head small { display: block; }
.staff-head small { margin-top: 4px; color: #909892; font-size: 11px; }
.staff-head .staff-phone { color: #536057; font-weight: 700; }
.staff-state { margin-left: auto; }
.staff-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.staff-meta div { color: #8d9690; font-size: 10px; }
.staff-meta strong { display: block; margin-top: 6px; color: var(--ink); font-size: 13px; }
.vehicle-toolbar { margin-top: 24px; }
.vehicle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.vehicle-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 20px; }
.vehicle-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; color: #fff; background: var(--green-dark); font-weight: 800; }
.vehicle-copy strong, .vehicle-copy small { display: block; }
.vehicle-copy small { margin-top: 5px; color: #8d9690; font-size: 11px; }
.vehicle-plate { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.card-setting { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; color: #157d3a; background: #fff; font-size: 11px; font-weight: 800; }
.staff-card .card-setting { display: block; margin: 16px 0 0 auto; }
.vehicle-card .card-setting { grid-column: 3; justify-self: end; }

.pricing-intro { color: #fff; border: 0; background: linear-gradient(145deg, #143823, #16753a); }
.pricing-intro p { color: rgba(255,255,255,.65); }
.pricing-intro .eyebrow { color: #91e5a9; }
.formula-chip { padding: 15px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 800; }
.pricing-grid { display: grid; grid-template-columns: minmax(640px, 2fr) minmax(260px, 1fr); gap: 18px; margin-top: 18px; }
.pricing-table { padding: 0 24px 16px; }
.pricing-row { display: grid; grid-template-columns: 1.1fr repeat(3, .8fr); gap: 10px; align-items: center; min-height: 56px; border-top: 1px solid var(--line); font-size: 12px; }
.pricing-row-head { min-height: 40px; border-top: 0; color: #8a938c; font-size: 10px; }
.pricing-row input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; outline: none; }
.demo-warning { margin: 0 24px 24px; padding: 12px; border-radius: 10px; color: #956324; background: #fff4df; font-size: 11px; }
.version-card { padding-bottom: 22px; }
.version { gap: 12px; margin: 0 22px; padding: 17px 0; border-top: 1px solid var(--line); }
.version > span { width: 10px; height: 10px; border-radius: 50%; background: #bfc8c1; }
.version.active > span { background: var(--green); box-shadow: 0 0 0 5px rgba(24,168,74,.1); }
.version div { flex: 1; }
.version strong, .version small { display: block; }
.version small { margin-top: 5px; color: #929b94; font-size: 10px; }
.version em { color: #879188; font-size: 10px; font-style: normal; }
.version-card .secondary-button { width: calc(100% - 44px); margin: 16px 22px 0; }

.integration-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.integration-card { position: relative; gap: 16px; padding: 22px; }
.integration-icon { display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; border-radius: 17px; font-weight: 800; }
.integration-icon.wechat { color: #fff; background: #14b85b; }
.integration-icon.pay { color: #855619; background: #fff0cf; }
.integration-icon.map { color: #315c9f; background: #e9f0ff; }
.integration-icon.notice { color: #7857a5; background: #f1eaff; }
.integration-card h3 { margin-bottom: 6px; font-size: 15px; }
.integration-card p { max-width: 360px; margin-bottom: 0; color: #8a938c; font-size: 11px; line-height: 1.6; }
.integration-card .state { margin-left: auto; }
.security-card { margin-top: 18px; padding: 26px; }
.security-card ul { margin: 18px 0 0; padding-left: 20px; color: #616d63; font-size: 12px; line-height: 2; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 30; visibility: hidden; background: rgba(10,28,17,.38); opacity: 0; transition: .25s; }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 40; width: 460px; padding: 34px; overflow-y: auto; background: #fff; box-shadow: -24px 0 60px rgba(20,48,29,.18); transform: translateX(104%); transition: .3s ease; }
.drawer.open { transform: translateX(0); }
.drawer-backdrop.open { visibility: visible; opacity: 1; }
.drawer-close { position: absolute; top: 20px; right: 22px; width: 38px; height: 38px; border: 0; border-radius: 12px; color: #647068; background: #f0f4f1; font-size: 24px; }
.drawer-section { margin-top: 26px; padding: 18px; border-radius: 14px; background: #f6f8f6; }
.drawer-route { line-height: 1.7; }
.drawer-row { justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); color: #7e8980; font-size: 12px; }
.drawer-row:last-child { border-bottom: 0; }
.drawer-row strong { color: var(--ink); }
.drawer-worker { gap: 12px; margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
.drawer-worker .staff-avatar { width: 40px; height: 40px; }
.drawer-worker-list { display: grid; gap: 10px; margin-top: 16px; }
.drawer-worker-list .drawer-worker { margin-top: 0; }
.drawer-select { width: 100%; margin-top: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font: inherit; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.drawer-edit-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; font-weight: 800; }
.drawer-edit-toggle span { color: var(--green); font-size: 16px; transition: transform .2s; }
.drawer-edit-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.drawer-edit-panel { display: none; }
.drawer-edit-panel.open { display: block; }
.dispatch-panel { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf8; }
.dispatch-panel h3 { margin-bottom: 5px; font-size: 14px; }
.dispatch-panel > p { margin: 0 0 12px; color: #8b948d; font-size: 10px; }
.fee-breakdown h3 { margin-bottom: 6px; font-size: 14px; }
.fee-breakdown .drawer-row { padding: 8px 0; }
.fee-breakdown .total-row { margin-top: 4px; padding-top: 12px; }
.fee-breakdown .total-row strong { color: var(--orange); font-size: 16px; }
.fee-note { margin: 10px 0 2px; padding: 9px 10px; border-radius: 9px; color: #6f6751; background: #fff8e8; font-size: 10px; line-height: 1.6; }
.closed-note { margin-top: 16px; padding: 12px 14px; border-radius: 11px; color: #79612b; background: #fff7df; font-size: 11px; line-height: 1.7; }
.cancelled-note { color: #8a4c4c; background: #fff0f0; }
.vehicle-summary h3 { margin-bottom: 6px; font-size: 14px; }
.vehicle-summary > small { color: #89938c; font-size: 11px; }
.section-label { margin-bottom: 9px; color: #68736b; font-size: 11px; font-weight: 700; }
.participant-list { display: grid; gap: 8px; }
.participant-chip { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.participant-chip span { color: var(--ink); font-size: 12px; font-weight: 700; }
.participant-chip small { display: block; margin-top: 3px; color: #909892; font-size: 9px; font-weight: 400; }
.participant-chip button, .text-button { border: 0; color: #16803c; background: transparent; font-size: 11px; font-weight: 700; }
.lead-worker-choice { display: flex; flex: 1; flex-direction: row !important; align-items: center; gap: 9px !important; cursor: pointer; }
.lead-worker-choice input { width: 16px !important; min-height: 16px !important; accent-color: var(--green); }
.add-participant { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 9px; }
.add-participant select { min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.custom-fee-row { display: grid; grid-template-columns: 1.3fr .8fr 36px; gap: 8px; margin-bottom: 8px; }
.custom-fee-row input { min-width: 0; }
.icon-button { border: 1px solid var(--line); border-radius: 9px; color: #8b948d; background: #fff; font-size: 18px; }
.text-button { padding: 5px 0; }
.expense-review { margin-top: 22px; }
.section-title h3 { margin-bottom: 4px; font-size: 16px; }
.section-title p, .empty-note { margin: 0; color: #8b948d; font-size: 11px; }
.expense-card { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; }
.expense-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.expense-head strong, .expense-head small { display: block; }
.expense-head small { margin-top: 4px; color: #919a93; font-size: 10px; }
.expense-breakdown { margin-top: 12px; border-top: 1px solid var(--line); }
.expense-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.expense-line strong, .expense-line small { display: block; }
.expense-line small { margin-top: 3px; color: #8b948d; font-size: 10px; font-weight: 400; }
.expense-line span { font-size: 12px; font-weight: 800; }
.expense-total { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; }
.expense-total strong { color: var(--orange); font-size: 20px; }
.expense-card p { margin: 8px 0 0; color: #606b63; font-size: 11px; line-height: 1.6; }
.voucher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.voucher-grid img { display: block; width: 100%; aspect-ratio: 1; border-radius: 9px; object-fit: cover; }
.review-note { display: block; margin-top: 10px; color: #7d876f; }
.expense-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

.danger-button { min-height: 42px; padding: 0 17px; border: 0; border-radius: 12px; color: #fff; background: #ba3e3e; font-size: 12px; font-weight: 800; }
.danger-button:disabled { cursor: not-allowed; color: #a18e8e; background: #efe8e8; }
.danger-outline { border: 1px solid #e8bcbc; color: #a23737; background: #fff; }
.cancel-order-zone { margin-top: 30px; padding: 17px; border: 1px solid #efd1d1; border-radius: 14px; background: #fffafa; }
.cancel-order-zone strong { font-size: 13px; }
.cancel-order-zone > p { margin: 6px 0 13px; color: #9a7777; font-size: 10px; line-height: 1.6; }
.cancel-order-zone.is-disabled { border-color: var(--line); background: #f8faf8; }
.cancel-confirm-panel { display: none; margin-top: 13px; padding-top: 13px; border-top: 1px solid #efdada; }
.cancel-confirm-panel.open { display: block; }
.cancel-confirm-panel label { display: grid; gap: 7px; color: #765b5b; font-size: 10px; font-weight: 700; }
.cancel-confirm-panel input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #e7caca; border-radius: 10px; outline: none; }
.cancel-confirm-panel > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.delete-order-zone > p, .delete-confirm-panel { font-size: 12px; line-height: 1.65; }
.delete-confirm-panel { margin-top: 14px; padding-top: 14px; border-top: 1px solid #efd1d1; }
.delete-confirm-panel > p { overflow-wrap: anywhere; }
.delete-confirm-panel > label { display: block; margin: 10px 0 7px; }
.delete-confirm-panel > input { width: 100%; min-height: 44px; padding: 10px; border: 1px solid #dbbaba; border-radius: 10px; background: #fff; }
.delete-confirm-panel .delete-test-confirm { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; }
.delete-test-confirm input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; accent-color: #ba3e3e; }
.delete-order-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.delete-order-error { color: #a23737; }
.delete-order-zone :focus-visible { outline: 2px solid #a23737; outline-offset: 3px; }
.drawer-actions.single { grid-template-columns: 1fr; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 7px; color: #68736b; font-size: 11px; font-weight: 700; }
.form-grid input, .form-grid select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; outline: none; }
.form-grid textarea { box-sizing: border-box; width: 100%; min-height: 110px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fafbfa; font: inherit; font-weight: 400; line-height: 1.6; resize: vertical; }
.form-grid textarea:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.address-combo { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.backoffice-location { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.backoffice-location > label, .backoffice-location > .location-results { grid-column: 1 / -1; }
.backoffice-location > .secondary-button { width: 100%; min-width: 0; justify-self: stretch; }
.location-results { color: #66766c; font-size: 12px; line-height: 1.5; }
.location-results button { display: block; width: 100%; padding: 9px 10px; margin: 4px 0; text-align: left; color: #24382d; background: #fff; border: 1px solid #dce8df; border-radius: 8px; cursor: pointer; }
.location-results button:hover, .location-results button:focus-visible { border-color: #087a35; }
.location-results strong { color: #087a35; }
.map-picker-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 120; background: rgba(17, 31, 23, .56); }
.map-picker:not([hidden]) { position: fixed; z-index: 121; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow: auto; padding: 18px; background: #fff; border-radius: 16px; box-shadow: 0 20px 70px rgba(0, 0, 0, .22); }
.map-picker-head, .map-picker-tools, .map-picker-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.map-picker-head h2 { margin: 0; font-size: 20px; }
.map-picker-head button { border: 0; background: transparent; font-size: 28px; cursor: pointer; }
.map-picker > p, #mapPickerStatus { color: #66766c; font-size: 13px; }
.map-picker-search { display: flex; gap: 8px; margin: 10px 0 8px; }
.map-picker-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #dce8df; border-radius: 8px; font: inherit; }
.map-picker-search button { flex: none; padding: 9px 14px; border: 0; border-radius: 8px; color: #fff; background: #087a35; cursor: pointer; }
.map-picker-search-results { color: #66766c; font-size: 12px; }
.map-picker-search-results:not(:empty) { max-height: 145px; overflow: auto; margin-bottom: 8px; }
.map-picker-search-results button { display: block; width: 100%; padding: 8px 10px; border: 1px solid #dce8df; border-radius: 8px; background: #fff; color: #24382d; text-align: left; cursor: pointer; }
.map-picker-search-results button + button { margin-top: 4px; }
.map-picker-search-results button:hover, .map-picker-search-results button:focus-visible { border-color: #087a35; }
.map-picker-image-wrap { position: relative; width: 100%; aspect-ratio: 14 / 9; overflow: hidden; border: 1px solid #dce8df; border-radius: 12px; background: #eef3ef; }
#mapPickerImage { display: block; width: 100%; height: 100%; cursor: grab; object-fit: fill; touch-action: none; user-select: none; }
#mapPickerImage.is-dragging { cursor: grabbing; }
#mapPickerImage[hidden] { display: none; }
.map-picker-pin { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; color: #d52929; font-size: 32px; font-weight: 700; text-shadow: 0 1px 2px #fff; }
.map-picker-tools { margin: 10px 0; font-size: 12px; }
.map-picker-feedback { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.map-picker-feedback button { flex: none; padding: 6px 10px; border: 1px solid #dce8df; border-radius: 8px; background: #fff; cursor: pointer; }
.map-picker-tools button, .map-picker-actions button { padding: 9px 14px; border: 1px solid #dce8df; border-radius: 8px; background: #fff; cursor: pointer; }
.map-picker-actions { justify-content: flex-end; margin-top: 14px; }
#mapPickerConfirm { background: #087a35; border-color: #087a35; color: #fff; }
#mapPickerConfirm:disabled { opacity: .45; cursor: not-allowed; }
.paired-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.role-requirements { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.role-count-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.field-help { margin: -2px 0 11px; color: #8b948d; font-size: 10px; line-height: 1.6; }
.optional-fee-editor { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.optional-fee-row { display: grid; grid-template-columns: 1fr 1fr 38px; gap: 10px; align-items: end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.optional-fee-row:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.optional-fee-row .icon-button { min-height: 42px; }
.add-fee-control { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin-top: 11px; }
.add-fee-control select { min-width: 0; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.add-fee-control button:disabled { cursor: not-allowed; opacity: .55; }
.form-grid select[multiple] { min-height: 116px; }
.form-grid label small { color: #98a099; font-size: 9px; font-weight: 400; }
.span-2 { grid-column: 1 / -1; }
.compact-form { margin-top: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.entity-actions > span { flex: 1; }
.is-hidden { display: none !important; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; visibility: hidden; background: rgba(10,28,17,.38); opacity: 0; transition: .2s; }
.modal-backdrop.open { visibility: visible; opacity: 1; }
.modal { position: fixed; top: 50%; left: 50%; z-index: 55; width: min(720px, calc(100% - 36px)); max-height: calc(100vh - 48px); padding: 28px; overflow-y: auto; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(16,45,28,.24); opacity: 0; transform: translate(-50%, -46%) scale(.98); pointer-events: none; transition: .2s; }
.modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.modal-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-head .drawer-close { position: static; }
.entity-modal { width: min(640px, calc(100% - 36px)); }

.toast { position: fixed; right: 28px; bottom: 28px; z-index: 60; visibility: hidden; padding: 13px 18px; border-radius: 12px; color: #fff; background: #153c25; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s; font-size: 12px; }
.toast.show { visibility: visible; opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-grid, .vehicle-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; gap: 20px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 14px; }
  .brand { padding: 0; }
  .nav { flex-direction: row; justify-content: flex-end; }
  .nav-item { width: auto; }
  .nav-item { font-size: 0; }
  .sidebar-footer { display: none; }
  .main { margin-left: 0; padding: 24px 18px; }
  .topbar { flex-direction: column; }
  .topbar-actions { justify-content: flex-start; }
  .metric-grid, .integration-grid, .staff-grid, .vehicle-grid { grid-template-columns: 1fr; }
  .filters { flex-wrap: wrap; }
  .drawer { width: min(430px, 100%); }
  .form-grid { grid-template-columns: 1fr; }
  .address-combo { grid-template-columns: 1fr; }
  .paired-fields, .role-count-grid { grid-template-columns: 1fr; }
  .optional-fee-row, .add-fee-control { grid-template-columns: 1fr; }
  .optional-fee-row .icon-button { min-height: 36px; }
  .span-2 { grid-column: auto; }
}

/* --------------------------------------------------------------------------
   搬家蜗服务空间主题
   与小程序共享颜色、圆角、层级和反馈；桌面端保留多列扫描效率。
   -------------------------------------------------------------------------- */
:root {
  --green: #087a35;
  --green-strong: #08652f;
  --green-dark: #163d26;
  --green-soft: #edf7f0;
  --ink: #171b18;
  --muted: #717a73;
  --line: #e5e9e6;
  --surface: #ffffff;
  --canvas: #f7f8f6;
  --orange: #df5a20;
  --danger: #a43f43;
  --shadow: 0 10px 34px rgba(21, 32, 25, .045);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

body { color: var(--ink); background: var(--canvas); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, .nav-item, .metric-card, .staff-card, .vehicle-card, .row-action, .card-setting { transform: scale(1); transform-origin: center; transition: transform 140ms var(--ease-out), opacity 140ms var(--ease-out), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out); }
button:active, .nav-item:active, .metric-card:active, .staff-card:active, .vehicle-card:active, .row-action:active, .card-setting:active { opacity: .84; transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(8, 122, 53, .2); outline-offset: 2px; }

.sidebar { width: 236px; padding: 24px 18px; color: var(--ink); border-right: 1px solid var(--line); background: rgba(255, 255, 255, .97); }
.brand { gap: 12px; padding: 0 8px 28px; }
.brand-mark { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff; }
.brand strong { color: var(--ink); font-size: 19px; letter-spacing: .3px; }
.brand small, .sidebar-footer small { color: #828a84; font-size: 11px; }
.nav { gap: 5px; }
.nav-item { position: relative; gap: 0; min-height: 46px; padding: 0 16px; border-radius: 13px; color: #667069; font-size: 13px; font-weight: 600; }
.nav-item span { display: none; }
.nav-item.active { color: var(--green-strong); background: var(--green-soft); box-shadow: none; }
.nav-item.active::before { position: absolute; top: 10px; bottom: 10px; left: 0; width: 3px; border-radius: 999px; background: var(--green); content: ""; }
.sidebar-footer { min-height: 64px; gap: 11px; padding: 11px 8px; align-items: center; border-top: 1px solid var(--line); }
.sidebar-footer > div:last-child { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.sidebar-footer strong { color: #343d36; font-size: 12px; line-height: 1.25; }
.sidebar-footer small { margin-top: 2px; line-height: 1.3; }
.operator-avatar { width: 38px; height: 38px; border-radius: 12px; color: #ffffff; background: var(--green-dark); }

.main { min-height: 100vh; margin-left: 236px; padding: 34px 40px 56px; }
.topbar { min-height: 78px; margin-bottom: 30px; align-items: flex-start; }
.topbar h1 { margin: 4px 0 0; color: var(--ink); font-size: 32px; font-weight: 720; letter-spacing: -.8px; }
.eyebrow { margin-bottom: 7px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: 1.4px; }
.topbar-actions { gap: 9px; align-items: center; }
.system-pill { margin-right: 10px; color: #667069; font-size: 12px; }
.system-pill span { width: 7px; height: 7px; background: var(--green); box-shadow: 0 0 0 4px rgba(8, 122, 53, .09); }
.ghost-button, .primary-button, .secondary-button { min-height: 42px; padding: 0 17px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.ghost-button { border-color: var(--line); color: #4f5952; background: #ffffff; }
.primary-button { border: 1px solid var(--green); color: #ffffff; background: var(--green); box-shadow: none; }
.secondary-button { border: 1px solid transparent; color: var(--green-strong); background: var(--green-soft); }

.metric-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 14px; }
.metric-card { min-height: 140px; width: 100%; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: 20px; background: #ffffff; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.metric-card.accent { color: var(--green-strong); border-color: #bcdcc6; background: var(--green-soft); }
.metric-card.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(22, 122, 59, .14); }
.metric-card:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.metric-head, .accent .metric-head { color: #717a73; font-size: 12px; }
.metric-head em { color: var(--green-strong); background: #f4faf6; }
.metric-card strong { margin-top: 23px; color: var(--ink); font-size: 32px; font-weight: 730; letter-spacing: -.8px; }
.metric-card.accent strong { color: var(--green-strong); }
.metric-card small, .metric-card.accent small { color: #858d87; font-size: 11px; }

.content-card { border: 1px solid var(--line); border-radius: 22px; background: #ffffff; box-shadow: var(--shadow); }
.order-board { margin-top: 18px; }
.card-head { gap: 22px; padding: 22px 24px; border-bottom: 1px solid #eef0ee; }
.card-head h2, .staff-toolbar h2, .pricing-intro h2 { margin: 0; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.card-head p, .staff-toolbar p, .pricing-intro p { color: #7b847d; font-size: 12px; }
.filters { gap: 8px; align-items: center; }
.filters select, .filters input { height: 40px; border-color: var(--line); border-radius: 12px; color: #4f5952; background: #fafbfa; font-size: 12px; }
.filters input { width: 190px; }

.table-wrap { max-height: calc(100vh - 330px); overflow: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead { position: sticky; z-index: 2; top: 0; background: #fafbfa; }
th { padding: 13px 16px; color: #7b847d; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 650; letter-spacing: .25px; text-align: left; }
td { padding: 17px 16px; color: #3e4740; border-bottom: 1px solid #eef0ee; font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.route-cell b { color: var(--green); background: transparent; font-size: 10px; }
.route-cell span + span b { color: var(--green); background: transparent; }
.amount { color: var(--orange); font-weight: 750; }
.state { padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.state.ready, .state.completed { color: var(--green-strong); background: var(--green-soft); }
.row-action { min-height: 36px; padding: 0 10px; border-radius: 10px; color: var(--green-strong); font-weight: 700; }

.staff-toolbar, .pricing-intro { padding: 24px; }
.staff-grid, .vehicle-grid { gap: 14px; margin-top: 16px; }
.staff-card, .vehicle-card { border-radius: 20px; }
.staff-card { padding: 22px; }
.staff-avatar, .vehicle-icon { border-radius: 14px; background: var(--green-dark); }
.staff-meta { border-top-color: #eef0ee; }
.vehicle-card { padding: 20px; }
.vehicle-plate { border-top-color: #eef0ee; }
.card-setting { border-color: var(--line); border-radius: 11px; color: var(--green-strong); background: #ffffff; }

.pricing-intro { color: var(--ink); border: 1px solid #bcdcc6; background: var(--green-soft); }
.pricing-intro p { color: #667069; }
.pricing-intro .eyebrow { color: var(--green); }
.formula-chip { border-color: #cfe5d6; border-radius: 14px; color: var(--green-strong); background: rgba(255, 255, 255, .72); }
.pricing-row, .version { border-top-color: #eef0ee; }
.pricing-row input, .form-grid input, .form-grid select, .add-participant select, .add-fee-control select { border-color: var(--line); border-radius: 12px; background: #fafbfa; }
.demo-warning { border-radius: 12px; }
.integration-grid { gap: 14px; }
.integration-card { gap: 16px; padding: 22px; }
.integration-icon { border-radius: 15px; }
.integration-icon.wechat { background: var(--green); }
.security-card { padding: 26px; }

.drawer-backdrop, .modal-backdrop { background: rgba(16, 23, 18, .4); transition: visibility 0s linear 220ms, opacity 220ms var(--ease-out); }
.drawer-backdrop.open, .modal-backdrop.open { transition-delay: 0s; }
.drawer { width: 520px; padding: 34px 36px 48px; box-shadow: -24px 0 70px rgba(19, 34, 24, .16); transform: translateX(104%); transition: transform 260ms var(--ease-out); }
.drawer-close { border-radius: 12px; color: #616a63; background: #f1f3f1; }
.drawer-section { border: 1px solid #e8ece9; border-radius: 16px; background: #fafbfa; }
.drawer-route { color: #263029; font-size: 14px; line-height: 1.75; }
.drawer-row { border-bottom-color: #e8ece9; color: #747d76; font-size: 12px; }
.drawer-row strong { color: var(--ink); font-weight: 650; }
.drawer-worker { border-color: var(--line); border-radius: 14px; background: #ffffff; }
.drawer-edit-toggle, .dispatch-panel, .participant-chip, .expense-card, .cancel-order-zone { border-radius: 15px; }
.drawer-edit-toggle { border-color: var(--line); }
.dispatch-panel, .role-requirements, .optional-fee-editor, .address-combo { border-color: var(--line); background: #fafbfa; }
.participant-chip { border-color: var(--line); }
.fee-breakdown .total-row strong, .expense-total strong { color: var(--orange); }
.danger-button { border-radius: 12px; color: #ffffff; background: var(--danger); }
#showCancelOrder,
#confirmCancelOrder { color: #ffffff; }

.modal { border: 1px solid rgba(229, 233, 230, .95); border-radius: 24px; box-shadow: 0 34px 90px rgba(19, 34, 24, .22); transform: translate(-50%, -47%) scale(.98); transition: transform 220ms var(--ease-out), opacity 180ms var(--ease-out); }
.modal.open { transform: translate(-50%, -50%) scale(1); }
.form-grid { gap: 16px; }
.form-grid label { color: #626c64; font-size: 11px; }
.form-grid input, .form-grid select { min-height: 44px; }
.toast { border-radius: 14px; background: var(--green-dark); box-shadow: 0 16px 44px rgba(21, 32, 25, .18); transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out), visibility 0s linear 180ms; }
.toast.show { transition-delay: 0s; }

/* 人员详情：整卡打开，在同一弹窗核对评价并编辑资料。 */
.staff-card { position: relative; cursor: pointer; }
.staff-card:focus-visible { outline: 3px solid rgba(8, 122, 53, .2); outline-offset: 3px; }
.staff-card .card-setting { padding-right: 15px; padding-left: 15px; background: #fafbfa; }
.staff-detail-modal { width: min(980px, calc(100% - 40px)); padding: 30px; overflow: hidden; }
.staff-detail-modal .modal-head { margin-bottom: 22px; }
.staff-detail-shell { display: grid; grid-template-columns: minmax(300px, .88fr) minmax(430px, 1.12fr); gap: 22px; align-items: start; }
.staff-detail-shell.is-create { grid-template-columns: minmax(0, 640px); justify-content: center; }
.staff-detail-panel { min-width: 0; max-height: calc(100vh - 190px); padding: 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: 20px; background: #f7f9f7; }
.staff-detail-profile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; }
.staff-detail-avatar { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 17px; color: #ffffff; background: var(--green-dark); font-size: 17px; font-weight: 760; }
.staff-detail-profile strong, .staff-detail-profile small { display: block; }
.staff-detail-profile strong { color: var(--ink); font-size: 16px; }
.staff-detail-profile small { margin-top: 4px; overflow: hidden; color: #78817a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.staff-detail-profile .state { align-self: start; }
.staff-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.staff-detail-stats div { padding: 0 12px; text-align: center; }
.staff-detail-stats div + div { border-left: 1px solid var(--line); }
.staff-detail-stats span, .staff-detail-stats strong { display: block; }
.staff-detail-stats span { color: #838b85; font-size: 10px; }
.staff-detail-stats strong { margin-top: 7px; color: var(--ink); font-size: 17px; }
.staff-review-section { margin-top: 22px; }
.staff-review-heading, .staff-review-meta, .staff-form-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.staff-review-heading strong, .staff-review-heading small, .staff-form-heading strong, .staff-form-heading small { display: block; }
.staff-review-heading strong, .staff-form-heading strong { color: var(--ink); font-size: 14px; }
.staff-review-heading small, .staff-form-heading small { margin-top: 4px; color: #838b85; font-size: 10px; }
.staff-review-heading > span { flex: 0 0 auto; color: var(--green-strong); font-size: 10px; font-weight: 700; }
.staff-review-list { margin-top: 12px; }
.staff-review-item { padding: 15px; border: 1px solid #e5eae6; border-radius: 15px; background: #ffffff; }
.staff-review-item + .staff-review-item { margin-top: 10px; }
.staff-review-stars { display: flex; gap: 2px; align-items: center; }
.staff-review-stars img { display: block; width: 15px; height: 15px; }
.staff-review-meta time { color: #8a938c; font-size: 10px; }
.staff-review-item p { margin: 11px 0 0; color: #313a33; font-size: 12px; line-height: 1.65; }
.staff-review-item > small { display: block; margin-top: 8px; color: #8a938c; font-size: 10px; }
.staff-review-empty { margin: 0; padding: 32px 16px; border: 1px dashed #dbe2dd; border-radius: 14px; color: #89918b; background: rgba(255, 255, 255, .7); font-size: 11px; text-align: center; }
.staff-review-empty--error { color: var(--danger); border-color: #efd3d5; background: #fff8f8; }
.staff-detail-form { max-height: calc(100vh - 190px); padding: 2px 4px 2px 0; overflow-y: auto; }
.staff-form-heading { min-height: 50px; padding: 0 2px 12px; border-bottom: 1px solid var(--line); }
.staff-detail-avatar img, .staff-avatar img { width:100%;height:100%;object-fit:cover;border-radius:inherit;background:#fff; }
.staff-identity-bar { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-block:1px solid var(--line); }
.staff-identity-bar[hidden] { display:none; }
.staff-identity-bar strong { font-size:13px; }
.staff-identity-bar small { display:block;margin-top:6px;color:#778078;font-size:11px;line-height:1.5; }
.staff-identity-actions { display:flex;gap:8px;flex-shrink:0; }
.staff-identity-actions button { display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 12px;white-space:nowrap; }
.staff-photo-viewer { width:min(780px,90vw);max-height:88vh;overflow:auto;border:1px solid var(--line);border-radius:18px;padding:24px;color:var(--ink); }
.staff-photo-viewer::backdrop { background:rgb(0 0 0 / .5); }
.staff-photo-viewer h2 { margin:0 0 16px;font-size:18px; }
.staff-photo-viewer img { display:block;max-width:100%;max-height:65vh;object-fit:contain;margin:16px auto; }
.staff-photo-viewer img[hidden] { display:none; }
@media(max-width:600px) { .staff-identity-bar { align-items:flex-start;flex-direction:column; } }
.staff-detail-form .entity-actions { position: sticky; z-index: 2; bottom: -2px; padding: 16px 0 2px; border-top: 1px solid var(--line); background: #ffffff; }
.staff-detail-form { row-gap:10px; }
.staff-detail-form .staff-form-heading { min-height:40px;padding-bottom:8px; }
.staff-detail-form > .account-note { margin:4px 0; }
.staff-detail-form .staff-identity-bar { padding:10px 0; }
.staff-detail-form input, .staff-detail-form select { min-height:40px;height:40px; }

@media (hover: hover) and (pointer: fine) {
  .nav-item:hover { color: var(--ink); background: #f3f5f3; }
  .nav-item.active:hover { color: var(--green-strong); background: var(--green-soft); }
  .ghost-button:hover, .card-setting:hover { border-color: #cfd6d1; background: #f9faf9; }
  .primary-button:hover { background: #086b30; }
  .secondary-button:hover { background: #e2f1e7; }
  tbody tr:hover td { background: #fafbfa; }
  .row-action:hover { background: var(--green-soft); }
  .staff-card:hover { border-color: #bfd8c6; box-shadow: 0 14px 36px rgba(21, 32, 25, .075); }
  .staff-card:hover .card-setting { border-color: #c8d9cd; color: var(--green-strong); background: var(--green-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 1120px) {
  .main { padding-right: 28px; padding-left: 28px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
  .card-head { align-items: flex-start; }
}

@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { flex: 0 0 auto; }
  .nav { overflow-x: auto; }
  .nav-item { width: auto; min-width: 76px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
  .main { margin-left: 0; padding: 24px 18px 42px; }
  .metric-grid { grid-template-columns: 1fr; }
  .card-head { flex-direction: column; }
  .filters { width: 100%; }
  .filters input { flex: 1; min-width: 150px; }
  .table-wrap { max-height: none; }
  .drawer { width: min(520px, 100%); }
  .staff-detail-modal { width: min(680px, calc(100% - 24px)); padding: 22px; overflow-y: auto; }
  .staff-detail-shell { grid-template-columns: 1fr; }
  .staff-detail-panel, .staff-detail-form { max-height: none; overflow: visible; }
}
.booking-selection-row { padding:14px 0; border-bottom:1px solid #e7ece8; line-height:1.5; }
.booking-selection-row strong { display:block; font-size:14px; font-weight:600; }
.booking-selection-row small { display:block; margin-top:6px; color:#69756d; font-size:13px; overflow-wrap:anywhere; }
.booking-quote-form { margin-top:20px; padding:18px; background:#f0f6f2; border-radius:16px; }
.booking-quote-form p { color:#56655c; font-size:13px; line-height:1.6; }
.booking-quote-form label { display:block; margin:16px 0; font-size:14px; }
.booking-quote-form small { display:block; color:#69756d; margin:6px 0; line-height:1.5; }
.booking-quote-form input, .booking-quote-form textarea { box-sizing:border-box; width:100%; min-height:44px; padding:10px 12px; margin-top:8px; border:1px solid #dbe5de; border-radius:10px; background:#fff; color:#202923; font:inherit; }
.booking-quote-form input:focus, .booking-quote-form textarea:focus { outline:2px solid #087a35; outline-offset:2px; }
.booking-quote-form button { width:100%; min-height:44px; }

/* Order entry: grouping follows the role/item rather than a dense field grid. */
.role-requirements, .optional-fee-editor { padding:20px; background:#fbfcfb; }
.role-requirements .section-label, .optional-fee-editor .section-label { font-size:15px; color:var(--ink); }
.role-requirements .field-help, .optional-fee-editor .field-help { margin:8px 0 16px; font-size:12px; color:#65716a; }
.personnel-form-row + .personnel-form-row { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.personnel-form-heading, .material-fee-heading, .personnel-reference, .material-fee-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.personnel-form-heading { margin-bottom:10px; }
.personnel-form-heading strong, .material-fee-heading strong { color:var(--ink); font-size:14px; }
.personnel-form-heading span { color:var(--green-strong); font-size:12px; }
.personnel-form-fields, .material-fee-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.personnel-form-fields label, .material-fee-fields label, .optional-fee-row label { min-width:0; font-size:12px; font-weight:500; }
.personnel-form-fields input, .material-fee-fields input { font-size:15px; min-height:44px; font-variant-numeric:tabular-nums; }
.personnel-reference { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); flex-wrap:wrap; font-size:12px; line-height:1.6; }
.personnel-reference button, .material-fee-foot button { min-height:36px; flex-shrink:0; }
.personnel-reference button:disabled { color:#737d77; cursor:not-allowed; }
.role-requirements .personnel-billing-note { margin:4px 0 0; }
.material-fee-row { margin:12px 0; padding:16px; background:#fff; border:1px solid var(--line); border-radius:14px; }
.material-fee-heading { margin-bottom:14px; }
.material-fee-heading small, .fee-detail-copy { display:block; margin-top:5px; color:#65716a; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.material-fee-heading .icon-button { flex:0 0 36px; height:36px; }
.material-fee-foot { margin-top:8px; align-items:flex-start; }
.material-fee-foot small { color:#65716a; font-size:11px; line-height:1.6; }
.optional-fee-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px; padding-top:16px; }
.optional-fee-name { grid-column:1 / -1; font-size:13px; }
.optional-fee-row > .span-2 { grid-column:1 / -1; }
.fee-quantity-control { display:flex; gap:6px; min-width:0; }
.fee-quantity-control input { flex:1; width:0; min-width:0; }
.fee-quantity-control select { flex:0 0 60px; width:60px; padding-right:4px; padding-left:6px; }
.add-fee-control { grid-template-columns:minmax(0,1fr) auto; }
.form-grid label input:focus-visible, .form-grid label select:focus-visible { outline:2px solid var(--green-strong); outline-offset:2px; }
@media (max-width:600px) {
  .role-requirements, .optional-fee-editor { padding:14px; }
  .material-fee-row { padding:12px; }
  .personnel-form-heading, .material-fee-foot { flex-wrap:wrap; }
  .personnel-form-fields, .material-fee-fields { gap:10px; }
  .add-fee-control { grid-template-columns:minmax(0,1fr); }
  .add-fee-control button { width:100%; }
}
[hidden] { display: none !important; }
.auth-locked > :not(#employeeLogin):not(#employeePassword):not(script) { display: none !important; }
.employee-overlay { position: fixed; inset: 0; z-index: 3000; background: #f2f6f3; overflow-y: auto; display: grid; place-items: center; padding: 24px; }
.topbar { flex-wrap: wrap; gap: 20px; }
.topbar > div:first-child { flex: 1 1 240px; }
.topbar .topbar-actions { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; }
.topbar-actions button { flex-shrink: 0; white-space: nowrap; }
.employee-card { width: min(100%, 440px); background: white; border: 1px solid #dde7df; border-radius: 22px; padding: 32px; box-shadow: 0 12px 40px #183d2110; }
.employee-card h1 { font-size: 28px; }
.employee-card p { color: #63746a; margin: 14px 0; line-height: 1.6; }
.employee-card label { display: grid; gap: 8px; margin: 20px 0; font-weight: 600; }
.employee-card input { width: 100%; min-height: 46px; padding: 10px 12px; background: #f7f9f8; border: 1px solid #dbe5df; border-radius: 10px; }
.employee-card button { min-height: 46px; margin-top: 8px; }
.employee-card :focus-visible, .employee-accounts :focus-visible { outline: 3px solid #79bfa0; outline-offset: 3px; }
.employee-accounts { padding: 24px; }
.employee-accounts .card-head { padding: 0 0 20px; gap: 16px; }
.employee-accounts pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; font-size: 12px; }
.employee-accounts details, #employeeAccountEditor { margin-top: 24px; }
.employee-check { display: flex !important; align-items: center; gap: 10px; }
.employee-check input { width: 20px !important; min-height: 20px; }
body[data-employee-role="customer_service"] #drawerContent form,
body[data-employee-role="customer_service"] #drawerContent button { display: none !important; }
body[data-employee-role="dispatcher"] #saveStaffButton,
body[data-employee-role="dispatcher"] #deleteStaffButton,
body[data-employee-role="dispatcher"] #vehicleForm [type="submit"],
body[data-employee-role="dispatcher"] #deleteVehicleButton { display: none !important; }
@media (max-width: 700px) { .employee-card { padding: 24px; } .topbar-actions { flex-wrap: wrap; } .employee-accounts .card-head { flex-wrap: wrap; } }
.order-note-images{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.order-note-images button{width:86px;height:86px;padding:0;border:0;background:transparent;cursor:pointer}
.order-note-images img{width:100%;height:100%;object-fit:cover;border-radius:8px}
.note-image-dialog{max-width:90vw;max-height:90vh;padding:16px;border:0;border-radius:12px}
.note-image-dialog::backdrop{background:rgba(0,0,0,.65)}
.note-image-dialog img{display:block;max-width:80vw;max-height:75vh;object-fit:contain}
.note-image-dialog button{display:block;margin:12px auto 0;padding:8px 24px}
