:root {
  --ink: #27324d;
  --ink-strong: #18213b;
  --muted: #5f6a84;
  --muted-strong: #5d6882;
  --paper: #f4f7ff;
  --panel: #ffffff;
  --line: #e8ecf7;
  --primary: #4968f2;
  --primary-deep: #3653d9;
  --primary-soft: #eef1ff;
  --violet: #8068ed;
  --sky: #4eafe6;
  --mint: #39b990;
  --amber: #ec9a38;
  --rose: #e76070;
  --warning-text: #8a4f0c;
  --danger-text: #a23849;
  --shadow-sm: 0 8px 24px rgba(52, 71, 135, .07);
  --shadow: 0 20px 54px rgba(52, 71, 135, .11);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
  --motion-fast: 140ms;
  --motion-base: 260ms;
  --motion-view: 420ms;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: #c6cee8 transparent;
  scrollbar-width: thin;
}
body::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
body::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #c6cee8; background-clip: padding-box; }
body::-webkit-scrollbar-thumb:hover, .drawer-body::-webkit-scrollbar-thumb:hover, .table-wrap::-webkit-scrollbar-thumb:hover { background-color: #aeb9dc; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(73, 104, 242, .2);
  outline-offset: 2px;
}
::selection { background: #dfe5ff; color: var(--ink-strong); }
.hidden { display: none !important; }
.site-filing { display:flex; flex-wrap:wrap; justify-content:center; gap:6px 18px; padding:14px 16px; color:var(--muted); font-size:12px; line-height:1.8; text-align:center; overflow-wrap:anywhere; }
.site-filing a { color:inherit; text-underline-offset:3px; }
.site-filing a:focus-visible { outline:2px solid var(--primary); outline-offset:4px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* 登录 */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(460px, 1.08fr) minmax(390px, .92fr);
  gap: clamp(38px, 7vw, 120px);
  align-items: center;
  padding: clamp(30px, 6vw, 86px);
  overflow: hidden;
  background: #edf2ff;
  position: relative;
}
.login-shell::before, .login-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.login-shell::before { width: 460px; height: 460px; right: -210px; top: -220px; background: rgba(128, 104, 237, .12); }
.login-shell::after { width: 300px; height: 300px; left: -130px; bottom: -150px; background: rgba(78, 175, 230, .13); }
.login-brand {
  align-self: stretch;
  max-width: 820px;
  min-height: 620px;
  padding: clamp(42px, 6vw, 78px);
  border-radius: 34px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 30px 80px rgba(73, 104, 242, .24);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-brand::before, .login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.login-brand::before { width: 300px; height: 300px; right: -110px; top: -100px; }
.login-brand::after { width: 170px; height: 170px; right: 80px; bottom: -90px; }
.brand-plate, .mini-plate {
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--primary);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(36, 60, 169, .16);
}
.brand-logo {
  width: min(360px, 82%);
  max-height: 132px;
  object-fit: contain;
  object-position: left center;
  border-radius: 22px;
  background: #fff;
}
.side-brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}
.brand-plate { width: 76px; height: 76px; border-radius: 22px; font-size: 36px; }
.login-brand h1 {
  max-width: 760px;
  margin: 38px 0 24px;
  font-size: clamp(40px, 4.8vw, 68px);
  line-height: 1.12;
  letter-spacing: -.045em;
  position: relative;
}
.login-brand > p { max-width: 620px; margin: 0; color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.85; position: relative; }
.login-route { display: flex; align-items: center; gap: 12px; margin-top: 54px; color: rgba(255,255,255,.78); font-size: 13px; position: relative; }
.login-route i { height: 1px; flex: 1; max-width: 68px; background: rgba(255,255,255,.32); }
.login-card {
  justify-self: center;
  width: 100%;
  max-width: 440px;
  min-width: 0;
  padding: 42px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 26px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.login-card h2 { margin: 0 0 9px; color: var(--ink-strong); font-size: 29px; letter-spacing: -.035em; }
.login-card p { margin: 0; color: var(--muted); }
label { display: grid; gap: 9px; color: #53607c; font-size: 13px; font-weight: 700; }
label small { color: var(--muted); font-size: 11px; line-height: 1.6; font-weight: 500; }
.login-card label { margin-top: 36px; }
.login-card input { height: 52px; }

/* 通用按钮 */
.button, .file-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 18px;
  background: #f0f3fa;
  color: #4e5a76;
  font-size: 13px;
  font-weight: 750;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-base) var(--ease-out), transform var(--motion-fast) var(--ease-out);
}
.button:hover, .file-button:hover { background: #e8ecf7; color: var(--ink-strong); transform: translateY(-1px); }
.button:active, .file-button:active { transform: translateY(0) scale(.98); transition-duration: 80ms; }
.button.primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(73, 104, 242, .18); }
.button.primary:hover { background: var(--primary-deep); }
.button.quiet { background: #f3f5fb; color: #5c6883; border-color: var(--line); }
.login-card .button { width: 100%; height: 52px; margin-top: 18px; }
.login-card .form-hint { margin-top: 16px; text-align: center; font-size: 12px; }
.file-button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; cursor: pointer; }
.file-button:focus-within { outline: 3px solid rgba(73, 104, 242, .2); outline-offset: 2px; }

/* 主框架 */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.app-shell:not(.hidden) { animation: app-reveal var(--motion-view) var(--ease-out) both; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 244px;
  padding: 22px 16px;
  background: rgba(255,255,255,.97);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 13px; padding: 5px 10px 29px; }
.mini-plate { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 21px; }
.side-brand strong, .side-brand span { display: block; }
.side-brand strong { color: var(--ink-strong); font-size: 19px; letter-spacing: .02em; }
.side-brand span { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav button {
  position: relative;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #65708b;
  text-align: left;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 680;
  transition: background var(--motion-base) var(--ease-out), color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}
.sidebar nav button:hover { background: #f4f6fc; color: var(--ink-strong); transform: translateX(2px); }
.sidebar nav button.active { background: var(--primary-soft); color: var(--primary-deep); }
.sidebar nav button.active::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 6px 6px 0; background: var(--primary); animation: nav-marker var(--motion-base) var(--ease-out) both; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nav-icon, .button-icon, .metric-head svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; opacity: .88; }
.sidebar nav button.active .nav-icon { opacity: 1; }
.button-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.sidebar nav b { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 999px; background: #ffe8ec; color: var(--danger-text); text-align: center; font-size: 10px; }
.sidebar nav b:empty { display: none; }
.side-foot { margin-top: auto; padding: 18px 9px 5px; border-top: 1px solid var(--line); display: flex; gap: 11px; align-items: center; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(57, 185, 144, .11); }
.side-foot strong, .side-foot small { display: block; }
.side-foot strong { color: #4c5874; font-size: 12px; }
.side-foot small { margin-top: 3px; color: #707b94; font-size: 11px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar {
  height: 88px;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0 34px;
  border-bottom: 1px solid rgba(232,236,247,.9);
  background: rgba(244,247,255,.88);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar h1 { margin: 0; color: var(--ink-strong); font-size: 24px; letter-spacing: -.035em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 15px; }
.admin-chip { display: flex; align-items: center; gap: 10px; padding: 5px 8px 5px 5px; }
.admin-chip > span { width: 38px; height: 38px; border-radius: 12px; background: #e6eaff; color: var(--primary-deep); display: grid; place-items: center; font-weight: 850; }
.admin-chip strong, .admin-chip small { display: block; }
.admin-chip strong { color: #4a5571; font-size: 12px; }
.admin-chip small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.menu-button { display: none; width: 46px; height: 46px; padding: 10px; border: 0; border-radius: 12px; background: transparent; }
.menu-button span { display: block; height: 2px; margin: 6px 0; background: var(--ink); }
.sidebar-backdrop { display:none; }
#content { max-width: 1580px; margin: auto; padding: 30px 34px 70px; outline: none; position: relative; transition: opacity var(--motion-fast) ease, filter var(--motion-base) ease; }
#content.is-loading { opacity: .68; filter: saturate(.78); pointer-events: none; }
#content.is-loading::before { content: ""; position: fixed; z-index: 24; top: 87px; left: 244px; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--primary), var(--sky), transparent); transform-origin: left center; animation: loading-sweep 1s var(--ease-standard) infinite; }
#content > .view-enter { animation: view-arrive var(--motion-view) var(--ease-out) both; animation-delay: calc(var(--motion-index, 0) * 45ms); }

/* 今日工作 */
.dashboard-intro {
  min-height: 170px;
  padding: 30px 34px;
  border: 1px solid #dde4ff;
  border-radius: 24px;
  background: #eaf0ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  position: relative;
}
.dashboard-intro::before, .dashboard-intro::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.dashboard-intro::before { width: 210px; height: 210px; right: 150px; top: -115px; background: rgba(128, 104, 237, .11); }
.dashboard-intro::after { width: 150px; height: 150px; right: -35px; bottom: -72px; background: rgba(78, 175, 230, .15); }
.dashboard-intro > div { position: relative; z-index: 1; }
.dashboard-intro h2 { margin: 0 0 9px; color: var(--ink-strong); font-size: clamp(25px, 2.3vw, 34px); letter-spacing: -.04em; }
.dashboard-intro p { margin: 0; color: var(--muted-strong); font-size: 13px; line-height: 1.8; }
.intro-date { min-width: 150px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; background: rgba(255,255,255,.72); text-align: center; box-shadow: var(--shadow-sm); }
.intro-date strong, .intro-date span { display: block; }
.intro-date strong { color: var(--primary-deep); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.intro-date span { margin-top: 8px; color: var(--muted); font-size: 11px; }
.dashboard-label { margin: 25px 2px 13px; display: flex; align-items: center; justify-content: space-between; }
.dashboard-label h3 { margin: 0; color: var(--ink-strong); font-size: 15px; }
.dashboard-label span { color: var(--muted); font-size: 11px; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 14px; }
.metric {
  min-height: 148px;
  padding: 21px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}
.metric:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(52, 71, 135, .11); }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-head span { display: block; color: var(--muted); font-size: 12px; }
.metric-head svg { width: 34px; height: 34px; padding: 8px; border-radius: 11px; color: var(--primary-deep); background: var(--primary-soft); }
.metric.attention .metric-head svg { color: var(--warning-text); background: #fff5df; }
.metric strong { display: block; margin-top: 13px; color: var(--ink-strong); font-family: "DIN Alternate", "Roboto Condensed", sans-serif; font-size: 34px; line-height: 1; }
.metric em { display: block; margin-top: 13px; color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.55; }
.metric.attention strong { color: var(--warning-text); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 18px; margin-top: 18px; }
.sheet { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-sm); transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out); }
.sheet:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(52, 71, 135, .1); }
.sheet-head { min-height: 62px; padding: 0 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.sheet-head h3 { margin: 0; color: var(--ink-strong); font-size: 15px; }
.sheet-head button { min-height: 44px; border: 0; background: transparent; color: var(--primary-deep); display: inline-flex; align-items: center; font-size: 12px; font-weight: 750; }
.sheet-head button:hover { color: var(--primary-deep); }
.queue { margin: 0; padding: 0; list-style: none; }
.queue li { padding: 17px 22px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; }
.queue li:last-child { border: 0; }
.queue strong, .queue span { display: block; }
.queue strong { overflow: hidden; color: #34405d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.queue small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.queue .amount { margin-bottom: 6px; color: var(--ink-strong); font-family: "DIN Alternate", sans-serif; font-size: 16px; font-weight: 800; text-align: right; }

/* 列表与表格 */
.section-toolbar { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.section-toolbar > div:first-child { min-width: 220px; }
.section-toolbar h2 { margin: 0; color: var(--ink-strong); font-size: 19px; letter-spacing: -.025em; }
.section-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-toolbar .search { margin-left: auto; width: min(350px, 38vw); }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-sm); }
table { width: 100%; min-width: 850px; border-collapse: separate; border-spacing: 0; }
.mobile-cell-value { display:contents; }
th { padding: 14px 18px; background: #f6f8fd; color: #65708a; text-align: left; font-size: 12px; font-weight: 750; letter-spacing: .03em; white-space: nowrap; }
td { padding: 16px 18px; border-bottom: 1px solid var(--line); color: #495571; font-size: 13.5px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out); }
tbody tr:hover { background: #fafbff; }
tbody tr:active { transform: scale(.998); }
.primary-cell strong, .primary-cell small { display: block; }
.primary-cell strong { color: #35415e; }
.primary-cell small, td small { margin-top: 5px; color: var(--muted); font-size:12px; }
.data { font-family: "DIN Alternate", "Roboto Condensed", sans-serif; font-variant-numeric: tabular-nums; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.mini-button { min-height:44px; border: 1px solid transparent; border-radius: 9px; padding: 8px 12px; background: #f1f3f9; color: #4f5b75; font-size: 12px; font-weight: 750; white-space: nowrap; }
.mini-button:hover { background: #e9edf7; }
.mini-button.primary { background: var(--primary-soft); color: var(--primary-deep); }
.mini-button.primary:hover { background: #e2e7ff; }
.mini-button.warn { background: #fff3df; color: var(--warning-text); }
.mini-button.danger { background: #ffebee; color: #c84859; }
.product-cell { display: flex; align-items: center; gap: 14px; min-width: 270px; }
.product-cell img, .product-placeholder { width: 58px; height: 58px; flex: 0 0 58px; border: 1px solid var(--line); border-radius: 13px; background: #f2f5fb; object-fit: cover; }
.product-placeholder { display: grid; place-items: center; color: #9aa4ba; font-size: 10px; }
.product-image-uploader { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #f7f9fc; }
.product-image-preview { width: 112px; height: 112px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cbd3e1; border-radius: 14px; background: #fff; color: #8e98ad; font-size: 12px; }
.product-image-preview img { width: 100%; height: 100%; object-fit: contain; }
.product-image-uploader small { display: block; margin-top: 9px; color: var(--muted); line-height: 1.6; }
.permission-guide { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; background: #f1f7f3; color: #51605a; line-height: 1.6; }
.permission-guide strong { color: #26493a; }
.logistics-admin { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: #f7f9fc; border: 1px solid var(--line); }
.logistics-admin h3 { margin: 0; font-size: 15px; }
.logistics-admin > p { margin: 0; color: var(--muted); }
.logistics-admin-event { display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: start; }
.logistics-admin-event i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(64,93,230,.1); }
.logistics-admin-event div { display: grid; gap: 3px; }
.logistics-admin-event small { color: var(--muted); }

/* 状态 */
.status { display: inline-flex !important; width: fit-content; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: #f0f3f9; color: var(--muted); font-size: 11px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.pending, .status.low, .status.pending_confirm, .status.pending_payment, .status.pending_outbound { background: #fff3df; color: var(--warning-text); }
.status.approved, .status.available, .status.completed, .status.active, .status.accepted { background: #e8f8f2; color: #176c52; }
.status.rejected, .status.cancelled, .status.inquiry, .status.disabled, .status.inactive { background: #ffebee; color: var(--danger-text); }
.status.shipped, .status.replied { background: #e8f4ff; color: #3583b7; }
.status.pending_assignment, .status.pending_accept, .status.in_progress { background:#edf0ff; color:var(--primary-deep); }
.status.pending_quote, .status.waiting_parts, .status.pending_completion, .status.partial { background:#fff3df; color:var(--warning-text); }
.status.quote_disputed, .status.unpaid { background:#ffebee; color:var(--danger-text); }
.status.paid, .status.published { background:#e8f8f2; color:#176c52; }
.status.draft { background:#f0f3f9; color:#6f7992; }

/* 维修与教程 */
.repair-filter { display:flex; gap:8px; margin:-6px 0 16px; padding:0 34px 4px 0; overflow:auto; scrollbar-width:none; -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%); mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 28px),transparent 100%); }
.repair-filter::-webkit-scrollbar { display:none; }
.repair-filter button { min-height:46px; padding:0 15px; border:1px solid var(--line); border-radius:23px; background:#fff; color:#59657f; font-size:12px; white-space:nowrap; }
.repair-filter button.active { border-color:var(--primary); background:var(--primary); color:#fff; }
.unassigned { color:var(--warning-text); font-weight:700; }
.repair-detail-banner { padding:20px; border-radius:16px; display:flex; align-items:center; justify-content:space-between; gap:20px; background:#eaf0ff; }
.repair-detail-banner span,.repair-detail-banner strong { display:block; }.repair-detail-banner span { color:var(--primary-deep); font-size:12px; font-weight:800; }.repair-detail-banner strong { margin-top:6px; color:var(--ink-strong); font-size:17px; }.repair-detail-banner b { padding:8px 11px; border-radius:9px; background:#fff; color:#59657f; font-size:12px; }
.repair-note { padding:14px 16px; border-radius:13px; background:#f5f7fc; color:#59647d; font-size:12px; line-height:1.65; }.repair-note strong,.repair-note span { display:block; }.repair-note strong { margin-bottom:4px; color:#35415e; }
.repair-images { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }.repair-images a { aspect-ratio:1; overflow:hidden; border-radius:12px; background:#eef1f7; }.repair-images img { width:100%; height:100%; object-fit:cover; }
.repair-empty-note { padding:26px; border-radius:13px; background:#f7f9fd; color:var(--muted); text-align:center; font-size:12px; }
.repair-log { margin:0; padding:0; list-style:none; }.repair-log li { min-height:58px; position:relative; padding:2px 0 18px 30px; }.repair-log li::before { content:""; position:absolute; left:8px; top:14px; bottom:-3px; width:1px; background:#dce2f1; }.repair-log li:last-child::before { display:none; }.repair-log i { position:absolute; left:3px; top:7px; width:11px; height:11px; border:3px solid #fff; border-radius:50%; background:var(--primary); box-shadow:0 0 0 1px var(--primary); }.repair-log strong,.repair-log span,.repair-log small { display:block; }.repair-log strong { color:#3d4964; font-size:13px; }.repair-log span { margin-top:4px; color:var(--muted); font-size:11px; }.repair-log small { margin-top:5px; color:#53607b; font-size:12px; line-height:1.5; }
.quote-history { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }.quote-history > strong { display:block; margin-bottom:10px; color:var(--ink-strong); font-size:13px; }.quote-history details { margin-top:8px; border:1px solid var(--line); border-radius:12px; background:#f8f9fd; overflow:hidden; }.quote-history summary { min-height:44px; padding:12px 14px; display:flex; justify-content:space-between; gap:12px; color:#4f5b75; cursor:pointer; font-size:12px; }.quote-history summary b { color:#3e4963; }.quote-history details > .order-lines,.quote-history details > .detail-line,.quote-history details > .repair-note { margin-left:12px; margin-right:12px; }.quote-history details > .repair-note { margin-bottom:12px; }
.tutorial-admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.tutorial-admin-card { min-height:190px; padding:18px; display:grid; grid-template-columns:110px minmax(0,1fr); gap:18px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-sm); }.tutorial-admin-art { min-height:154px; display:grid; place-items:center; border-radius:14px; color:#fff; background:var(--violet); font-size:38px; font-weight:850; }.tutorial-admin-card:nth-child(even) .tutorial-admin-art { background:var(--sky); }.tutorial-admin-card span { color:var(--primary-deep); font-size:12px; }.tutorial-admin-card h3 { margin:10px 0 7px; color:var(--ink-strong); font-size:16px; line-height:1.45; }.tutorial-admin-card p { margin:0; overflow:hidden; color:#53607b; font-size:12.5px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }.tutorial-admin-card > div:last-child > div { margin-top:14px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tutorial-admin-art img { width:100%; height:100%; min-height:154px; object-fit:cover; }
.tutorial-media-editor { margin:16px 0; padding:16px; border:1px solid var(--line); border-radius:16px; background:#f8faff; }
.tutorial-media-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:12px; }
.tutorial-media-head strong { color:var(--ink-strong); font-size:14px; }
.tutorial-media-head small { color:var(--muted); font-size:12px; }
.tutorial-media-preview,.tutorial-video-preview { min-height:110px; margin-bottom:12px; display:grid; place-items:center; overflow:hidden; border:1px dashed #cbd3e1; border-radius:12px; color:#8e98ad; background:#fff; }
.tutorial-media-preview img { width:100%; max-height:200px; object-fit:contain; }
.tutorial-video-preview video { width:100%; max-height:240px; background:#16213b; }
.tutorial-photo-list { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; color:#8e98ad; font-size:12px; }
.tutorial-photo { width:84px; height:84px; position:relative; overflow:hidden; border-radius:10px; }
.tutorial-photo img { width:100%; height:100%; object-fit:cover; }
.tutorial-photo button { position:absolute; top:3px; right:3px; width:24px; height:24px; padding:0; border:0; border-radius:50%; color:#fff; background:#17213bcc; cursor:pointer; }
.customer-levels { margin-bottom:18px; padding:20px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-sm); }
.customer-levels-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:16px; }
.customer-levels-heading h3 { margin:0 0 5px; font-size:17px; color:var(--ink-strong); }
.customer-levels-heading p { margin:0; font-size:12px; color:var(--muted); }
.discount-product-matches { display:grid; gap:6px; margin-top:-10px; }
.drawer-body > .form-hint { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.discount-product-option { width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:#f7f9fd; color:var(--ink-strong); text-align:left; cursor:pointer; display:flex; justify-content:space-between; gap:12px; }
.discount-product-option:hover { border-color:#7c91e9; background:#f0f3ff; }
.discount-product-option span,.discount-product-matches small { color:var(--muted); font-size:12px; }
.discount-rules { border-top:1px solid var(--line); padding-top:15px; }
.discount-rules h3 { margin:0 0 12px; font-size:15px; }
.discount-rule { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 0; border-top:1px solid var(--line); }
.discount-rule:first-child { border-top:0; }
.discount-rule small { display:block; margin-top:4px; color:var(--muted); }
.customer-level-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:10px; }
.customer-level-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 15px; border:1px solid var(--line); border-radius:13px; background:#f8faff; }
.customer-level-row strong,.customer-level-row small { display:block; }
.customer-level-row small { margin-top:4px; color:var(--muted); font-size:11px; }

/* 表单与搜索 */
input, select, textarea { width: 100%; border: 1px solid #dce1ee; border-radius: 11px; background: #fff; color: var(--ink); padding: 0 13px; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
input, select { height: 44px; }
.order-payment-confirm { display: flex; align-items: center; gap: 10px; line-height: 1.5; cursor: pointer; }
.order-payment-confirm input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
textarea { min-height: 98px; padding-top: 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #747f99; }
input:hover, select:hover, textarea:hover { border-color: #cbd3e7; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(73,104,242,.09); }
.search { position: relative; }
.search input { padding-left: 39px; background: rgba(255,255,255,.9); }
.search::before { content: ""; position: absolute; z-index: 1; left: 14px; top: 13px; width: 11px; height: 11px; border: 2px solid #8c97af; border-radius: 50%; }
.search::after { content: ""; position: absolute; z-index: 1; left: 25px; top: 26px; width: 7px; height: 2px; background: #8c97af; transform: rotate(45deg); }
.filter-row { display: flex; gap: 10px; }
.filter-row select { width: auto; min-width: 132px; }

/* 空状态与侧滑表单 */
.empty-state { padding: 70px 24px; color: var(--muted); text-align: center; }
.empty-state::before { content: ""; display: block; width: 42px; height: 42px; margin: 0 auto 17px; border: 6px solid #e4e8f5; border-top-color: #b8c4ef; border-radius: 50%; }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink-strong); font-size: 17px; }
.empty-state span { font-size: 12px; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(28,36,65,.35); backdrop-filter: blur(2px); opacity: 0; transition: opacity var(--motion-base) ease; }
.drawer-panel { position: absolute; inset: 0 0 0 auto; width: min(550px, 94vw); border-radius: 24px 0 0 24px; background: var(--panel); box-shadow: -20px 0 70px rgba(35,48,95,.18); display: flex; flex-direction: column; overflow: hidden; transform: translate3d(104%,0,0); opacity: .92; transition: transform var(--motion-base) var(--ease-out), opacity var(--motion-fast) ease; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: translate3d(0,0,0); opacity: 1; }
.drawer-panel > header { min-height: 88px; padding: 0 26px; border-bottom: 1px solid var(--line); background: #fbfcff; display: flex; align-items: center; justify-content: space-between; }
.drawer-panel h2 { margin: 0; color: var(--ink-strong); font-size: 22px; }
.drawer-panel header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.close-button { width: 46px; height: 46px; border: 0; border-radius: 13px; background: #f0f2f8; position: relative; }
.close-button:hover { background: #e8ecf5; }
.close-button span { position: absolute; left: 13px; top: 22px; width: 20px; height: 2px; background: #5b6680; transform: rotate(45deg); }
.close-button span:last-child { transform: rotate(-45deg); }
.drawer-body { padding: 26px; overflow: auto; display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product-reference-select { height: 34px; margin-top: 7px; padding: 0 10px; background: #f6f8fe; color: #52617d; font-size: 12px; }
.settings-card { max-width: 880px; padding: 28px; display: grid; gap: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow-sm); }
.settings-card label { display: grid; gap: 8px; color: var(--ink-strong); font-size: 12px; font-weight: 750; }
.settings-card .settings-section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.settings-section-title strong { color: var(--ink-strong); font-size: 16px; }
.settings-section-title span, .settings-actions p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.settings-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.settings-actions p { max-width: 560px; margin: 0; }
.settings-actions button { min-width: 150px; }
.form-section { padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 15px; color: var(--ink-strong); font-size: 14px; }
.drawer-actions { position: sticky; bottom: -26px; z-index: 2; margin-top: 4px; padding: 18px 0 26px; background: rgba(255,255,255,.96); display: flex; gap: 10px; }
.drawer-actions .button { flex: 1; }
.detail-list { display: grid; border-top: 1px solid var(--line); }
.detail-line { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 30px; font-size: 13px; }
.detail-line span:first-child { color: var(--muted); }
.detail-line strong { color: #3d4965; text-align: right; }
.order-lines { padding: 4px 14px; border: 1px solid var(--line); border-radius: 14px; background: #f7f9fd; }
.order-price-section { display: grid; gap: 12px; }
.order-price-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.order-price-heading h3 { margin:0; color:var(--ink-strong); font-size:15px; }
.order-price-heading span { color:var(--primary-deep); font-size:12px; font-weight:700; }
.order-price-line { padding: 15px 0; border-bottom:1px solid var(--line); }
.order-price-line:last-child { border-bottom:0; }
.order-price-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; font-size:13px; }
.order-price-head small { display:block; margin-top:5px; color:var(--muted); font-size:11px; }
.order-price-head > strong { white-space:nowrap; color:var(--primary-deep); }
.order-price-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:13px; }
.order-price-fields label { min-width:0; }
.order-price-fields input { width:100%; }
.order-price-hint { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.order-price-history-body { padding:0 14px 12px; color:var(--muted-strong); font-size:12px; line-height:1.5; }
.order-price-history-body p { margin:8px 0 0; }
.order-sheet-drawer .drawer-panel { width:min(1080px,96vw); }
.order-sheet-drawer .drawer-body { gap:22px; background:#f8faff; }
.order-sheet-drawer .drawer-panel > header { background:#fff; }
.order-document-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.order-document-meta > div { min-width:0; padding:14px 16px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.order-document-meta small { display:block; margin-bottom:7px; color:var(--muted); font-size:11px; }
.order-document-meta strong { display:block; overflow-wrap:anywhere; color:var(--ink-strong); font-size:13px; }
.order-sheet-drawer .order-price-section,.order-document-delivery { padding:22px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-sm); }
.order-document-delivery h3 { margin:0 0 12px; color:var(--ink-strong); font-size:15px; }
.order-document-table { overflow:hidden; border:1px solid var(--line); border-radius:14px; }
.order-document-head,.order-document-row { display:grid; grid-template-columns:minmax(180px,2fr) minmax(94px,1fr) minmax(74px,.7fr) minmax(86px,.8fr) minmax(106px,1fr) minmax(118px,1.1fr); gap:12px; align-items:center; padding:12px 14px; }
.order-document-head { background:#f1f4fb; color:var(--muted-strong); font-size:11px; font-weight:750; }
.order-document-row { border-top:1px solid var(--line); font-size:12px; }
.order-document-product { min-width:0; }
.order-document-product strong { display:block; color:var(--ink-strong); font-size:13px; }
.order-document-product small { display:block; margin-top:4px; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.order-document-row label { min-width:0; display:grid; gap:5px; color:var(--muted); font-size:10px; }
.order-document-row input { width:100%; min-width:0; height:38px; padding:0 9px; font-size:12px; }
.order-document-row input[readonly] { background:#f1f4f9; color:var(--ink-strong); cursor:default; }
.order-amount-control { display:flex; min-width:0; }
.order-amount-control input { min-width:0; border-radius:9px 0 0 9px; }
.order-amount-control button { width:32px; flex:0 0 32px; border:1px solid var(--line); border-left:0; border-radius:0 9px 9px 0; background:#f2f5ff; color:var(--primary-deep); cursor:pointer; font-size:18px; }
.order-amount-control button:hover { background:#e7ecff; }
.order-document-totals { display:grid; gap:11px; max-width:440px; margin-left:auto; padding:17px 0 0; border-top:1px solid var(--line); }
.order-document-totals > div:not(.order-document-grand) { display:flex; justify-content:space-between; gap:16px; color:var(--muted-strong); font-size:12px; }
.order-document-totals strong { color:var(--ink-strong); }
.order-document-grand { padding-top:10px; border-top:1px solid var(--line); }
.order-document-grand label { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; font-weight:800; }
.order-document-grand .order-amount-control { width:190px; }
.order-document-grand input { font-size:17px; font-weight:800; color:var(--primary-deep); text-align:right; }
.order-document-totals > small { color:var(--muted); text-align:right; font-size:11px; }
@media(max-width:760px) {
  .order-sheet-drawer .drawer-panel { width:100vw; }
  .order-sheet-drawer .drawer-body { padding:16px; }
  .order-document-meta { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .order-sheet-drawer .order-price-section,.order-document-delivery { padding:16px; }
  .order-document-head { display:none; }
  .order-document-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .order-document-product { grid-column:1/-1; }
  .order-document-row > span { display:none; }
}
.admin-order-progress { display:flex; padding:8px 4px 20px; }
.admin-order-stage { flex:1; position:relative; padding-top:24px; color:var(--muted); text-align:center; font-size:10px; }
.admin-order-stage::before { content:""; position:absolute; top:8px; left:0; right:0; height:2px; background:#dbe1f0; }
.admin-order-stage:first-child::before { left:50%; }
.admin-order-stage:last-child::before { right:50%; }
.admin-order-stage i { position:absolute; z-index:1; top:3px; left:50%; width:12px; height:12px; transform:translateX(-50%); border:3px solid #fff; border-radius:50%; background:#c6cede; box-shadow:0 0 0 1px #c6cede; }
.admin-order-stage.done { color:var(--primary-deep); font-weight:750; }
.admin-order-stage.done::before,.admin-order-stage.done i { background:var(--primary); box-shadow:0 0 0 1px var(--primary); }
.admin-order-cancelled { padding:14px 16px; border-radius:12px; background:#ffebee; color:var(--danger-text); font-size:12px; font-weight:700; }
.order-line { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: 12px; }
.order-line:last-child { border: 0; }
.order-line small { display: block; margin-top: 4px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; transform: translate(-50%, 18px); padding: 12px 18px; border-radius: 12px; background: var(--ink-strong); color: #fff; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: .18s ease-out; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes app-reveal { from { opacity: .01; } to { opacity: 1; } }
@keyframes nav-marker { from { transform: scaleY(.35); opacity: .2; } to { transform: scaleY(1); opacity: 1; } }
@keyframes loading-sweep { 0% { transform: scaleX(0); opacity: 0; } 35% { opacity: 1; } 78% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes view-arrive {
  from { opacity: .01; transform: translate3d(0, 14px, 0) scale(.995); filter: blur(5px); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .section-toolbar { flex-wrap: wrap; }
  .section-toolbar .search { order: 3; width: 100%; margin-left: 0; }
  .toolbar-actions { margin-left: auto; }
  .tutorial-admin-grid { grid-template-columns:1fr; }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .repair-table { min-width:760px; }
  .repair-table th:nth-child(6), .repair-table td:nth-child(6) { display:none; }
  .repair-table th:last-child, .repair-table td:last-child { width:92px; }
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; padding: 28px 20px; }
  .login-brand { display: none; }
  .login-card { padding: 30px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); box-shadow: var(--shadow); transition: transform .18s ease-out; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position:fixed; inset:0; z-index:25; display:block; border:0; background:rgba(29,38,70,.32); opacity:0; pointer-events:none; transition:opacity .18s ease-out; }
  .sidebar-backdrop.show { opacity:1; pointer-events:auto; }
  body.nav-open { overflow:hidden; }
  .workspace { width: 100%; }
  .topbar { height: 76px; padding: 0 18px; }
  .menu-button { display: block; }
  .topbar p, .top-actions .quiet, .admin-chip div { display: none; }
  #content { padding: 20px 16px 60px; }
  #content.is-loading::before { left: 0; top: 75px; }
  .dashboard-intro { min-height: 150px; padding: 24px; }
  .intro-date { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric:last-child { grid-column: 1 / -1; }
  .section-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .toolbar-actions .button, .toolbar-actions .file-button { flex: 1; }
  .section-toolbar .search { width: 100%; }
  .filter-row { overflow: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-card { padding: 20px; }
}

@media (max-width: 700px) {
  .table-wrap { overflow:visible; border:0; border-radius:0; background:transparent; box-shadow:none; }
  table, tbody { width:100%; min-width:0; display:block; }
  thead { display:none; }
  tbody { display:grid; gap:12px; }
  tbody tr { display:block; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow-sm); }
  tbody tr:hover { background:var(--panel); }
  td { min-height:49px; padding:12px 14px; border-bottom:1px solid var(--line); display:grid; grid-template-columns:82px minmax(0,1fr); gap:12px; align-items:center; overflow-wrap:anywhere; }
  td:last-child { border-bottom:0; }
  td::before { content:attr(data-label); color:var(--muted-strong); font-size:11px; font-weight:750; }
  .mobile-cell-value { min-width:0; display:block; }
  .mobile-cell-value > * { min-width:0; }
  .product-cell { min-width:0; }
  .row-actions { justify-content:stretch; }
  .row-actions .mini-button, .mobile-cell-value > .mini-button { width:100%; }
  .toolbar-actions { display:grid; grid-template-columns:1fr 1fr; }
  .toolbar-actions .button, .toolbar-actions .file-button { width:100%; }
  .toolbar-actions .button.primary:last-child { grid-column:1 / -1; }
  .metrics { grid-template-columns:1fr 1fr; }
  .metric:last-child { grid-column:1 / -1; }
  .repair-images { grid-template-columns:repeat(3,1fr); }
  .repair-table tbody { gap:14px; }
  .repair-table td:first-child { min-height:62px; background:#f4f6ff; }
  .repair-table td:first-child .mobile-cell-value > strong { color:var(--primary-deep); font-size:14px; }
  .repair-table td:last-child { padding-top:14px; padding-bottom:14px; }
  .tutorial-admin-card { grid-template-columns:84px minmax(0,1fr); padding:14px; }.tutorial-admin-art { min-height:132px; }
}

@media (max-width: 520px) {
  .topbar h1 { font-size: 20px; }
  .admin-chip { padding: 0; }
  .dashboard-intro h2 { font-size: 24px; }
  .dashboard-intro p { max-width: 270px; }
  .dashboard-intro { padding:22px; }
  .dashboard-intro h2 { font-size:22px; line-height:1.35; }
  .dashboard-intro p { max-width:none; }
  .metric { min-height: 126px; }
  .queue li { padding: 15px 17px; }
  .drawer-panel { width: 100vw; border-radius: 0; }
}

@media (max-width: 350px) {
  .metrics { grid-template-columns:1fr; }
  .metric:last-child { grid-column:auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  #content > .view-enter { animation: none !important; }
  #content.is-loading { opacity: 1; filter: none; }
}
.print-dialog { position:fixed; inset:0; z-index:90; display:grid; place-items:center; padding:18px; }
.print-dialog-backdrop { position:absolute; inset:0; background:rgba(25,36,69,.46); backdrop-filter:blur(5px); }
.print-dialog-panel { position:relative; width:min(620px,100%); max-height:min(800px,94vh); display:flex; flex-direction:column; overflow:hidden; border:1px solid #e3e8f3; border-radius:22px; background:#fff; box-shadow:0 28px 90px rgba(24,34,75,.24); }
.print-dialog-panel>header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid var(--line); background:linear-gradient(125deg,#f9fbff,#f1f5ff); }
.print-dialog-panel>header small { display:block; color:var(--muted); font-size:11px; letter-spacing:.03em; }
.print-dialog-panel>header h2 { margin:5px 0 0; color:var(--ink-strong); font-size:22px; }
.print-close { width:34px; height:34px; border:0; border-radius:10px; background:#edf1f9; color:#61708c; font-size:24px; cursor:pointer; }
.print-dialog-body { padding:24px; overflow:auto; display:grid; gap:18px; }
.print-dialog-body label { display:grid; gap:7px; color:var(--ink-strong); font-size:13px; font-weight:600; }
.print-dialog-body input:not([type=checkbox]),.print-dialog-body select,.print-dialog-body textarea { width:100%; min-height:42px; border:1px solid #d8e0ef; border-radius:11px; padding:9px 12px; background:#fff; color:var(--ink-strong); font:inherit; }
.print-dialog-body textarea { min-height:78px; resize:vertical; line-height:1.6; }
.print-dialog-body input:focus,.print-dialog-body select:focus,.print-dialog-body textarea:focus { outline:2px solid #aebcff; outline-offset:1px; }
.print-template-picker p,.print-help { margin:6px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.print-template-summary { padding:16px; border:1px solid #dfe6f8; border-radius:14px; background:#f7f9ff; display:grid; gap:5px; font-size:13px; }
.print-template-summary strong { color:var(--ink-strong); }
.print-template-summary span { color:var(--muted); }
.print-price-toggle { width:100%; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border:1px solid #dfe6f8; border-radius:14px; background:#fff; color:var(--ink-strong); text-align:left; cursor:pointer; }
.print-price-toggle:hover { border-color:#b6c3f4; background:#f9faff; }
.print-price-toggle:focus-visible { outline:2px solid #8296f4; outline-offset:2px; }
.print-price-toggle span { display:grid; gap:4px; min-width:0; }
.print-price-toggle strong { font-size:14px; }
.print-price-toggle small { color:var(--muted); font-size:11px; line-height:1.5; }
.print-price-toggle i { position:relative; flex:none; width:43px; height:25px; border-radius:99px; background:#c8d0df; transition:background .18s ease; }
.print-price-toggle i::after { content:''; position:absolute; top:3px; left:3px; width:19px; height:19px; border-radius:50%; background:#fff; box-shadow:0 1px 4px #23345133; transition:transform .18s ease; }
.print-price-toggle.is-on i { background:#4262e8; }
.print-price-toggle.is-on i::after { transform:translateX(18px); }
.print-manage-actions,.print-actions { display:flex; flex-wrap:wrap; gap:9px; }
.print-actions { justify-content:flex-end; padding-top:10px; border-top:1px solid var(--line); }
.print-actions .button { min-width:125px; }
.print-manage-actions .button.subtle { color:#b04d5b; }
.print-template-form { display:grid; gap:17px; }
.print-template-form .form-grid { margin:0; }
.print-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.print-options label { display:flex; align-items:center; gap:9px; padding:10px 12px; border:1px solid #e4e9f4; border-radius:11px; background:#fbfcff; font-weight:500; }
.print-options input { width:17px; height:17px; accent-color:#4b64e8; }
@media (max-width:600px) { .print-dialog { padding:0; align-items:end; } .print-dialog-panel { width:100%; max-height:92vh; border-radius:20px 20px 0 0; } .print-dialog-body { padding:18px; } .print-options { grid-template-columns:1fr 1fr; } .print-manage-actions .button { flex:1; } }
.order-alerts { position:relative; }
.inventory-scope { display:flex; flex-wrap:wrap; align-items:end; gap:16px; padding:16px 0 22px; }
.inventory-scope label { display:grid; gap:7px; min-width:190px; color:var(--ink-strong); font-size:13px; }
.inventory-scope select { min-height:42px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink-strong); font:inherit; }
.inventory-scope p { margin:0 0 10px; color:var(--muted); font-size:12px; }
.inventory-ledger-heading { margin-top:28px; }
.stocktake-help { margin:0 0 20px; color:#53617b; font-size:13px; line-height:1.8; }
.stocktake-table { min-width:0; max-width:100%; max-height:52vh; overflow:auto; }
.stocktake-table input { width:110px; min-width:88px; }
.stocktake-difference { color:#a84e19; font-weight:700; }
.stocktake-mobile-label { display:none; }
@media (min-width:701px) {
  .stocktake-table table { min-width:0; table-layout:fixed; }
  .stocktake-table th,.stocktake-table td { padding:12px 10px; overflow-wrap:anywhere; }
  .stocktake-table th { white-space:normal; }
  .stocktake-table th:nth-child(1) { width:44%; }
  .stocktake-table th:nth-child(2) { width:18%; }
  .stocktake-table th:nth-child(3) { width:24%; }
  .stocktake-table th:nth-child(4) { width:14%; }
  .stocktake-table input { width:100%; min-width:0; }
}
@media (max-width:700px) {
  .stocktake-table { max-height:none; overflow:visible; }
  .stocktake-table td { grid-template-columns:70px minmax(0,1fr); }
  .stocktake-table .stocktake-product-cell { display:block; background:#f7f9ff; }
  .stocktake-table .stocktake-product-cell::before { display:block; margin-bottom:7px; }
  .stocktake-table .stocktake-product-cell strong { font-size:14px; line-height:1.5; }
  .stocktake-table .stocktake-product-cell small { display:grid; gap:4px; margin-top:8px; line-height:1.5; }
  .stocktake-table .stocktake-mobile-label { display:inline; color:var(--muted-strong); }
  .stocktake-meta-separator { display:none; }
  .stocktake-table input { width:100%; min-width:0; }
}
.repair-media-section { margin:20px 0; }
.repair-media-section h4 { margin:0 0 10px; color:var(--ink-strong); font-size:14px; }
.repair-video-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.repair-video-grid video { width:100%; max-height:260px; background:#15213c; border-radius:12px; }
.repair-signatures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:20px 0; }
.repair-signature { padding:14px; border:1px solid var(--line); border-radius:12px; }
.repair-signature img { display:block; width:100%; max-height:150px; object-fit:contain; background:#fff; margin:10px 0; }
.repair-signature small { display:block; color:var(--muted); line-height:1.7; }
.repair-dispatch-actions { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.repair-dispatch-actions .button.danger { color:#a13246; background:#fff0f3; border:1px solid #efc4cd; }
.inventory-scope select:focus-visible,.repair-signature-canvas:focus-visible { outline:2px solid #8196f0; outline-offset:2px; }
.repair-transfer-note { padding:12px 14px; border:1px solid #e4e9f4; background:#f7f9ff; border-radius:12px; line-height:1.7; }
.repair-upload-editor { display:grid; gap:12px; padding:16px 0; border-top:1px solid var(--line); }
.repair-upload-editor .repair-images { margin:0; }
.repair-upload-status { color:var(--muted); font-size:12px; line-height:1.7; }
.repair-report-preview { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.repair-report-preview img,.repair-report-preview video { display:block; width:100%; height:150px; object-fit:contain; background:#f2f5fb; border-radius:10px; }
.repair-upload-remove { padding:6px 10px; margin-top:6px; }
.repair-signature-canvas { display:block; width:100%; height:160px; touch-action:none; background:#fff; border:1px dashed #b5bfd5; border-radius:10px; }
@media(max-width:600px) { .inventory-scope label { flex:1; min-width:140px; } .inventory-scope p { width:100%; } .repair-signatures { grid-template-columns:1fr; } .stocktake-table { margin:0 -8px; } }
.order-alerts[hidden],.alert-panel[hidden],.alert-button b[hidden] { display:none !important; }
.alert-button { position:relative; white-space:nowrap; font-size:14px; }
.alert-button b { position:absolute; top:-7px; right:-6px; min-width:19px; height:19px; padding:0 4px; border-radius:20px; display:grid; place-items:center; background:#e34d5e; color:#fff; font-size:10px; line-height:1; }
.alert-panel { position:absolute; top:calc(100% + 12px); right:0; width:min(360px,calc(100vw - 28px)); padding:17px; border:1px solid #dce4f5; border-radius:18px; background:#fff; box-shadow:0 22px 50px rgba(26,39,91,.17); color:#243456; }
.alert-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.alert-panel-head strong { font-size:16px; }
.alert-hint { margin:10px 0 14px !important; color:#74809a !important; font-size:11px !important; line-height:1.5; }
.alert-items { max-height:300px; overflow:auto; display:grid; gap:6px; }
.alert-item { width:100%; padding:11px 12px; display:grid; gap:4px; border:1px solid #e8edf8; border-radius:11px; background:#f8faff; text-align:left; color:#263757; cursor:pointer; }
.alert-item:hover,.alert-item:focus-visible { border-color:#9caefa; background:#f1f4ff; }
.alert-item strong { font-size:12px; }
.alert-item span,.alert-empty { color:#66748e; font-size:11px; }
.alert-view-all { width:100%; margin-top:12px; }
@media (max-width:860px) { .top-actions .alert-button { display:inline-flex; align-items:center; gap:4px; } .alert-button span { display:none; } .alert-panel { right:-57px; } .alert-hint { display:block !important; } }
.direct-sale-entry { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:18px 0 26px; padding:20px 24px; border:1px solid #cbd6fb; border-radius:18px; background:linear-gradient(110deg,#f7f9ff,#ecf1ff); }
.direct-sale-entry > div { display:grid; gap:5px; }
.direct-sale-entry strong { color:#203256; font-size:18px; }
.direct-sale-entry span { color:#677792; font-size:13px; }
.direct-product-results { max-height:220px; overflow:auto; display:grid; gap:6px; margin:8px 0 18px; }
.direct-product-results button { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; padding:10px 13px; border:1px solid #dbe3f4; border-radius:10px; background:#fff; text-align:left; color:#213153; cursor:pointer; }
.direct-product-results button:hover:not(:disabled) { border-color:#6581ee; background:#f5f7ff; }
.direct-product-results button:disabled { opacity:.48; cursor:not-allowed; }
.direct-product-results small,.direct-sale-line small { color:#75819a; font-size:12px; }
.direct-product-results p { color:#75819a; font-size:13px; }
.direct-sale-line { display:grid; grid-template-columns:minmax(130px,1.8fr) 90px 120px 100px auto; align-items:end; gap:10px; padding:13px 0; border-top:1px solid #e7ebf5; }
.direct-sale-line > div { display:grid; gap:4px; }
.direct-sale-line label { margin:0; }
.direct-sale-line input { min-width:0; }
.direct-sale-line > button { border:0; background:transparent; color:#b74756; cursor:pointer; padding:8px; }
.direct-sale-line > strong { white-space:nowrap; text-align:right; padding-bottom:10px; }
@media(max-width:760px) { .direct-sale-entry { align-items:flex-start; flex-direction:column; } .direct-sale-line { grid-template-columns:minmax(0,1fr) minmax(72px,90px); } .direct-sale-line > div { grid-column:1/-1; } .direct-sale-line > strong { text-align:left; } }
