:root {
  --bg: #f3f2ec;
  --bg-2: #eeede5;
  --surface: #ffffff;
  --surface-2: #faf9f4;
  --ink: #1b1d1a;
  --ink-2: #444a43;
  --muted: #858a80;
  --muted-2: #a6aaa1;
  --line: #e6e3d8;
  --line-2: #d8d4c7;
  --dark: #17211b;
  --dark-2: #223028;
  --accent: #d97757;
  --accent-2: #bd5e40;
  --accent-soft: #fbede7;
  --olive: #6f8158;
  --olive-soft: #eef2e7;
  --sky: #5d84a8;
  --sky-soft: #eaf1f7;
  --amber: #a9792c;
  --amber-soft: #fbf2df;
  --red: #b64b43;
  --red-soft: #f9eae8;
  --violet: #77638b;
  --shadow-sm: 0 1px 2px rgba(24, 33, 27, .04);
  --shadow-md: 0 14px 40px rgba(24, 33, 27, .09);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --num: "SF Pro Display", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: #dedbd1;
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.mono { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.red { color: var(--red); }
.green { color: var(--olive); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ------------------------------------------------------------------ desktop shell */
.desktop-mode { display: grid; place-items: center; min-height: 100vh; padding: 22px; }
.clean.desktop-mode { padding: 0; background: var(--bg); display: block; }

.desktop {
  width: 1440px;
  height: 900px;
  display: flex;
  overflow: hidden;
  position: relative;
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 36px 90px rgba(22, 31, 25, .22);
}
.clean .desktop { border-radius: 0; box-shadow: none; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--dark);
  color: #fff;
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -120px;
  bottom: 90px;
  border-radius: 50%;
  background: rgba(217, 119, 87, .055);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 22px; }
.brand-mark {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: .03em; }
.brand-sub { margin-top: 3px; font-size: 9px; color: #7e8a82; letter-spacing: .16em; }
.side-label {
  font-size: 9.5px;
  color: #68766d;
  letter-spacing: .18em;
  margin: 15px 10px 8px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  height: 41px;
  padding: 0 11px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a4afa7;
  font-size: 12.5px;
  position: relative;
  transition: background .15s, color .15s;
}
.nav-item svg { color: #839087; }
.nav-item:hover { background: rgba(255,255,255,.045); color: #fff; }
.nav-item.active { background: rgba(217, 119, 87, .15); color: #fff; }
.nav-item.active svg { color: #efa88e; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px;
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.09);
  color: #cfd7d1;
  font-size: 9.5px;
  font-family: var(--num);
}
.nav-badge.hot { background: rgba(217, 119, 87, .26); color: #ffd8ca; }
.sidebar-bottom { margin-top: auto; position: relative; z-index: 1; }
.connection {
  margin: 0 4px 12px;
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.075);
  background: rgba(255,255,255,.035);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aab5ad;
  font-size: 10.5px;
}
.connection .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fa874;
  box-shadow: 0 0 0 3px rgba(143, 168, 116, .13);
  flex: 0 0 auto;
}
.connection .spacer { flex: 1; }
.side-user {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 7px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.avatar {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d9d5c8;
  color: #354038;
  font-size: 11.5px;
  font-weight: 600;
}
.avatar.dark { background: #2d3b33; color: #d7ded8; }
.side-user .name { color: #eef2ee; font-size: 11.5px; font-weight: 500; }
.side-user .role { color: #7f8c83; font-size: 9.5px; margin-top: 2px; }
.side-user .dots { margin-left: auto; color: #68766d; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  height: 64px;
  flex: 0 0 64px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(252,251,247,.86);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.crumb { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 8px; }
.crumb b { color: var(--ink-2); font-weight: 500; }
.crumb .sep { color: #c2c0b6; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.sync-pill {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10.5px;
}
.sync-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--olive); }
.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: #6e756c;
  border-radius: 8px;
  display: grid;
  place-items: center;
  position: relative;
}
.icon-btn:hover { background: #fff; border-color: var(--line); }
.icon-btn .notif {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px #fcfbf7;
}
.user-chip { display: flex; align-items: center; gap: 8px; margin-left: 6px; padding-left: 8px; }
.user-chip .avatar { width: 29px; height: 29px; flex-basis: 29px; font-size: 10.5px; background: var(--dark); color: #e7ede8; }
.user-chip .name { font-size: 11.5px; color: var(--ink-2); }
.user-chip .role { font-size: 9.5px; color: var(--muted); margin-top: 1px; }

.content { padding: 22px 28px 14px; flex: 1; overflow: hidden; }

/* ------------------------------------------------------------------ headings */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.page-head h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.025em;
}
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; }
.page-sub .strong { color: var(--ink-2); font-weight: 500; }
.head-actions { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.back-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 7px;
}
.back-line:hover { color: var(--ink); }

.btn {
  height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .15s, background .15s, transform .15s;
}
.btn:hover { border-color: #c2bfb3; background: #fdfcf8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 5px 12px rgba(217,119,87,.18); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn.dark:hover { background: #26382e; border-color: #26382e; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 10.5px; border-radius: 6px; }
.btn.danger { color: var(--red); border-color: #ead0cc; background: #fffafa; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-icon-only { width: 32px; padding: 0; }

/* ------------------------------------------------------------------ kpi */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi {
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.kpi.is-alert { background: #fdf7f4; border-color: #ecd7ce; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { color: var(--muted); font-size: 10.5px; }
.kpi-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: #777d72;
}
.kpi.is-alert .kpi-icon { background: var(--accent-soft); border-color: #f1d8ce; color: var(--accent-2); }
.kpi-value {
  margin-top: 9px;
  font-family: var(--num);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -.03em;
  font-weight: 590;
  color: var(--ink);
}
.kpi-value .unit { font-family: var(--font); font-size: 10.5px; color: var(--muted); margin-left: 4px; font-weight: 400; letter-spacing: 0; }
.kpi-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9.5px; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-family: var(--num); font-size: 9.5px; font-weight: 600; padding: 2px 5px; border-radius: 4px; }
.trend.up { background: var(--olive-soft); color: #5d7148; }
.trend.down { background: var(--red-soft); color: var(--red); }
.trend.flat { background: var(--surface-2); color: var(--muted); }
.kpi-foot .link { color: var(--accent-2); font-weight: 500; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card-head {
  min-height: 54px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #efede5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 9.5px; }
.card-link { color: var(--muted); font-size: 10px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.card-link:hover { color: var(--accent-2); }
.card-body { padding: 14px 16px; }
.card-body.tight { padding: 0; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 9.5px;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.green { background: var(--olive-soft); color: #5b7046; border-color: #e0e8d5; }
.chip.amber { background: var(--amber-soft); color: #916526; border-color: #f1e2c5; }
.chip.red { background: var(--red-soft); color: #aa443b; border-color: #f0d6d2; }
.chip.blue { background: var(--sky-soft); color: #4d7294; border-color: #dce8f1; }
.chip.clay { background: var(--accent-soft); color: #b45e41; border-color: #f2d9cf; }
.chip.gray { background: #f5f4ee; color: #777c72; border-color: #e9e6dc; }
.chip.violet { background: #f1edf5; color: #6d5b80; border-color: #e5deec; }
.chip.no-dot i { display: none; }

.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #efdccf;
  background: #fdf6f2;
  color: #8f533c;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 1.5;
}
.alert.info { border-color: #dce7ef; background: #f4f8fb; color: #52718b; }
.alert .spacer { flex: 1; }
.alert b { font-weight: 600; }

/* ------------------------------------------------------------------ dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.chart-card { height: 290px; display: flex; flex-direction: column; }
.chart-card .card-body { padding: 8px 12px 10px; flex: 1; min-height: 0; }
.chart-card svg { width: 100%; height: 100%; overflow: visible; }
.chart-legend { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 9.5px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.chart-legend i.olive { background: var(--olive); }
.seg {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.seg button { border: 0; background: transparent; color: var(--muted); font-size: 9.5px; padding: 3px 7px; border-radius: 4px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.05); }

.donut-wrap { display: flex; align-items: center; gap: 16px; padding: 3px 2px 4px; }
.donut { width: 136px; height: 136px; flex: 0 0 136px; position: relative; }
.donut svg { width: 136px; height: 136px; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-family: var(--num); font-size: 20px; font-weight: 590; letter-spacing: -.03em; }
.donut-center span { color: var(--muted); font-size: 8.5px; margin-top: 2px; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.legend-row .dot { width: 6px; height: 6px; border-radius: 2px; flex: 0 0 auto; }
.legend-row .name { color: var(--ink-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-row .val { color: var(--muted); font-family: var(--num); font-size: 9.5px; }
.donut-note { border-top: 1px solid #f0eee6; margin-top: 8px; padding-top: 9px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9.5px; }
.donut-note b { color: var(--ink-2); font-weight: 500; }

.todo-list { padding: 5px 0; }
.todo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f2f0e8;
}
.todo-row:last-child { border-bottom: 0; }
.todo-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  flex: 0 0 auto;
}
.todo-icon.warn { background: var(--amber-soft); color: var(--amber); }
.todo-icon.danger { background: var(--red-soft); color: var(--red); }
.todo-icon.info { background: var(--sky-soft); color: var(--sky); }
.todo-main { flex: 1; min-width: 0; }
.todo-main strong { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.todo-main span { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.todo-num { font-family: var(--num); font-size: 15px; font-weight: 590; }
.todo-arrow { color: #b8b9b0; }

/* ------------------------------------------------------------------ tables */
.table-wrap { width: 100%; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th {
  height: 35px;
  padding: 0 11px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted);
  background: #faf9f4;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  height: 48px;
  padding: 6px 11px;
  border-bottom: 1px solid #f1efe8;
  color: var(--ink-2);
  font-size: 10.5px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fcfbf7; }
.data-table .primary { color: var(--ink); font-weight: 500; font-size: 11px; }
.data-table .num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.data-table .small { font-size: 9.5px; color: var(--muted); }
.cell-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell-stack > .chip { align-self: flex-start; }
.cell-stack .top { display: flex; align-items: center; gap: 5px; min-width: 0; }
.cell-stack .top .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-inline { display: flex; align-items: center; gap: 6px; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn { border: 0; background: transparent; color: var(--accent-2); padding: 0; font-size: 10.5px; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.row-actions { display: flex; align-items: center; gap: 9px; }
.row-actions .sep { width: 1px; height: 10px; background: var(--line-2); }
.tag-stack { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; overflow: hidden; }
.supplier-mini { font-size: 10px; color: var(--ink-2); }
.supplier-mini + .supplier-mini::before { content: "·"; margin-right: 4px; color: #b8b9b0; }
.table-foot {
  height: 41px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0eee7;
  color: var(--muted);
  font-size: 9.5px;
}
.pagination { display: flex; align-items: center; gap: 3px; }
.page-btn { width: 23px; height: 23px; border: 1px solid transparent; background: transparent; border-radius: 5px; display: grid; place-items: center; color: var(--muted); font-family: var(--num); font-size: 9.5px; }
.page-btn:hover { background: var(--surface-2); }
.page-btn.on { background: var(--dark); color: #fff; }

/* ------------------------------------------------------------------ filters / tabs */
.filter-bar {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { color: var(--muted); font-size: 9.5px; }
.input-shell {
  height: 32px;
  min-width: 0;
  border: 1px solid var(--line-2);
  background: #fdfcf9;
  border-radius: 6px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a8e84;
  font-size: 10.5px;
}
.input-shell input { border: 0; background: transparent; outline: 0; min-width: 0; width: 100%; color: var(--ink-2); font-size: 10.5px; }
.input-shell input::placeholder { color: #a9aca3; }
.input-shell .chev { color: #a8aba1; }
.filter-actions { margin-left: auto; display: flex; gap: 7px; }
.filter-bar .field.search { width: 196px; }
.filter-bar .field.w150 { width: 142px; }
.filter-bar .field.w120 { width: 120px; }
.filter-bar .field.w100 { width: 104px; }

.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.tabs { display: flex; align-items: center; gap: 3px; border-bottom: 1px solid var(--line); flex: 1; }
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  height: 33px;
  padding: 0 10px;
  font-size: 10.5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tab .count { font-family: var(--num); font-size: 9px; color: #a9aca3; }
.tab.on { color: var(--ink); font-weight: 500; }
.tab.on::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.tab.on .count { color: var(--accent-2); }
.tab-actions { display: flex; gap: 7px; padding-bottom: 6px; }

/* ------------------------------------------------------------------ order detail */
.order-hero { padding: 15px 17px; display: flex; gap: 18px; align-items: stretch; }
.order-hero .hero-main { flex: 1; min-width: 0; }
.hero-title-row { display: flex; align-items: center; gap: 8px; }
.hero-title-row .mono { font-size: 15px; font-weight: 590; letter-spacing: .01em; }
.hero-sub { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1.6fr .9fr .9fr; gap: 16px; margin-top: 13px; }
.hero-item .label { color: var(--muted); font-size: 9px; margin-bottom: 4px; }
.hero-item .value { color: var(--ink-2); font-size: 10.5px; line-height: 1.55; }
.hero-item .value strong { color: var(--ink); font-weight: 500; }
.hero-side { width: 198px; flex: 0 0 198px; border-left: 1px solid var(--line); padding-left: 17px; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.hero-amount { font-family: var(--num); font-size: 21px; font-weight: 590; letter-spacing: -.02em; }
.hero-amount-label { color: var(--muted); font-size: 9px; }
.hero-actions { display: flex; gap: 6px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(286px, 1fr); gap: 12px; margin-top: 12px; }
.supplier-panel { overflow: hidden; }
.supplier-panel + .supplier-panel { margin-top: 10px; }
.sp-head {
  height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fcfbf7;
  border-bottom: 1px solid #efede5;
}
.supplier-badge {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: var(--olive-soft);
  color: var(--olive);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.supplier-badge.b { background: var(--amber-soft); color: var(--amber); }
.sp-name { font-size: 11.5px; font-weight: 500; }
.sp-meta { color: var(--muted); font-size: 9.5px; margin-left: 2px; }
.sp-amount { margin-left: auto; font-family: var(--num); font-size: 12px; font-weight: 590; }
.compact-table th { height: 30px; background: #fff; }
.compact-table td { height: 44px; }
.compact-table td, .compact-table th { padding-left: 14px; padding-right: 14px; }
.product-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.produce {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.035);
}
.produce svg { width: 26px; height: 26px; }
.produce.sm { width: 26px; height: 26px; flex-basis: 26px; border-radius: 6px; }
.produce.sm svg { width: 20px; height: 20px; }
.produce.lg { width: 52px; height: 52px; flex-basis: 52px; border-radius: 10px; }
.produce.lg svg { width: 38px; height: 38px; }
.product-name { font-size: 10.5px; color: var(--ink); line-height: 1.35; }
.product-sub { font-size: 9px; color: var(--muted); margin-top: 2px; }
.avail { font-family: var(--num); font-size: 10.5px; }
.avail b { font-weight: 590; color: var(--ink); }
.avail span { color: var(--muted); }

.return-list { padding: 2px 0; }
.return-item { padding: 12px 15px; border-bottom: 1px solid #f1efe8; }
.return-item:last-child { border-bottom: 0; }
.ri-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ri-top .mono { font-size: 10px; color: var(--ink-2); }
.ri-meta { margin-top: 6px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9.5px; }
.ri-amount { margin-top: 7px; display: flex; align-items: baseline; gap: 8px; }
.ri-amount strong { font-family: var(--num); font-size: 15px; font-weight: 590; }
.ri-amount span { color: var(--muted); font-size: 9.5px; }
.empty-note { padding: 24px 16px; color: var(--muted); font-size: 10px; text-align: center; }

.timeline { padding: 9px 15px 11px; }
.timeline-item { position: relative; padding: 0 0 9px 19px; border-left: 1px solid #e5e2d8; margin-left: 4px; }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5c2b7;
  box-shadow: 0 0 0 3px #fff;
}
.timeline-item.done::before { background: var(--olive); }
.timeline-item.current::before { background: var(--accent); }
.timeline-item .tl-title { color: var(--ink-2); font-size: 10.5px; line-height: 1.45; }
.timeline-item .tl-time { color: var(--muted); font-size: 9px; margin-top: 3px; }
.timeline-item .tl-note { color: var(--muted); font-size: 9px; margin-top: 4px; line-height: 1.5; }

/* ------------------------------------------------------------------ return detail */
.summary-strip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr .9fr;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}
.summary-cell .label { color: var(--muted); font-size: 9px; margin-bottom: 5px; }
.summary-cell .value { color: var(--ink-2); font-size: 10.5px; line-height: 1.5; }
.summary-cell .value strong { color: var(--ink); font-weight: 500; }
.summary-cell .value.money { font-family: var(--num); font-size: 18px; font-weight: 590; letter-spacing: -.02em; }

.item-remark { color: var(--muted); font-size: 9.5px; line-height: 1.45; max-width: 170px; }
.evidence-row { display: flex; align-items: center; gap: 4px; }
.evidence {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0,0,0,.06);
  flex: 0 0 28px;
}
.evidence .produce { width: 28px; height: 28px; border: 0; border-radius: 0; flex-basis: 28px; }
.evidence .produce svg { width: 21px; height: 21px; }
.evidence .ev-count { position: absolute; right: 0; bottom: 0; background: rgba(23,33,27,.68); color: #fff; font-size: 7px; line-height: 1.4; padding: 0 2px; }
.ev-more { color: var(--muted); font-size: 9px; margin-left: 2px; }
.erp-card { padding: 10px 14px; border-bottom: 1px solid #f1efe8; }
.erp-card:last-child { border-bottom: 0; }
.erp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.erp-num { font-family: var(--num); font-size: 10.5px; color: var(--ink); font-weight: 500; }
.erp-supplier { color: var(--muted); font-size: 9.5px; margin-top: 4px; }
.erp-meta { display: flex; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.erp-meta b { color: var(--ink-2); font-weight: 500; font-family: var(--num); }

/* ------------------------------------------------------------------ accounts / modal */
.tab-cards { display: flex; gap: 8px; margin-bottom: 12px; }
.tab-card {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}
.tab-card.on { border-color: #e7c7b9; background: #fffaf7; box-shadow: 0 0 0 2px rgba(217,119,87,.06); }
.tab-card .tc-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.tab-card.on .tc-icon { background: var(--accent-soft); color: var(--accent-2); }
.tab-card .tc-label { color: var(--muted); font-size: 9.5px; }
.tab-card .tc-value { color: var(--ink); font-family: var(--num); font-size: 16px; font-weight: 590; margin-top: 1px; }

.modal-layer {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 27, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(1px);
}
.modal {
  width: 458px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(20,28,23,.26);
  overflow: hidden;
}
.modal-head { padding: 18px 20px 13px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid #f0eee7; }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.modal-close { width: 28px; height: 28px; border: 0; background: var(--surface-2); color: var(--muted); border-radius: 7px; display: grid; place-items: center; }
.modal-body { padding: 16px 20px 6px; }
.form-row { display: flex; gap: 10px; }
.form-row .field { flex: 1; margin-bottom: 12px; }
.form-row .field.full { flex-basis: 100%; }
.form-label { color: var(--ink-2); font-size: 10px; margin-bottom: 5px; display: flex; align-items: center; gap: 4px; }
.form-label .req { color: var(--accent); }
.form-input, .form-select {
  height: 35px;
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #fdfcf9;
  padding: 0 10px;
  color: var(--ink-2);
  font-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.form-input.focus { border-color: #d9947c; background: #fff; box-shadow: 0 0 0 3px rgba(217,119,87,.09); }
.form-help { color: var(--muted); font-size: 9px; margin-top: 4px; line-height: 1.5; }
.form-note { background: #faf8f2; border: 1px solid #eee9dc; border-radius: 7px; padding: 8px 10px; color: #7e8177; font-size: 9px; line-height: 1.55; margin: 2px 0 12px; }
.modal-foot { padding: 12px 20px 17px; display: flex; justify-content: flex-end; gap: 8px; }
.password-wrap { position: relative; }
.password-wrap .eye { position: absolute; right: 9px; top: 9px; color: var(--muted); }

/* ------------------------------------------------------------------ reports */
.report-filter { display: flex; align-items: center; gap: 8px; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 12px; margin-top: 12px; }
.report-bottom { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr); gap: 12px; margin-top: 12px; }
.report-chart { height: 287px; display: flex; flex-direction: column; }
.report-chart .card-body { padding: 4px 10px 8px; flex: 1; min-height: 0; }
.ranking { padding: 5px 15px 9px; }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #f2f0e8; }
.rank-row:last-child { border-bottom: 0; }
.rank-idx { width: 17px; height: 17px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-family: var(--num); font-size: 8.5px; display: grid; place-items: center; flex: 0 0 auto; }
.rank-idx.top { background: var(--accent-soft); color: var(--accent-2); }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 10px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 6px; }
.rank-name b { font-family: var(--num); font-weight: 590; color: var(--ink); }
.rank-sub { color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.bar-track { height: 4px; border-radius: 4px; background: #f0eee6; margin-top: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--olive); }
.bar-fill.clay { background: var(--accent); }
.bar-fill.sky { background: var(--sky); }
.bar-fill.amber { background: #c39a4d; }
.share-cell { display: flex; align-items: center; gap: 8px; }
.share-cell .bar-track { flex: 1; margin: 0; width: 74px; }
.share-cell span { color: var(--muted); font-size: 9px; font-family: var(--num); width: 30px; }

/* ------------------------------------------------------------------ sync */
.sync-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.sync-card { padding: 14px 15px; }
.sync-card .sc-top { display: flex; align-items: center; justify-content: space-between; }
.sync-card h3 { margin: 0; font-size: 11.5px; font-weight: 500; }
.sync-card .sc-icon { width: 27px; height: 27px; border-radius: 7px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.sync-card .sc-time { margin-top: 11px; font-family: var(--num); font-size: 17px; font-weight: 590; }
.sync-card .sc-sub { margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.sync-card .sc-status { margin-top: 10px; display: flex; align-items: center; gap: 6px; color: var(--olive); font-size: 9.5px; }
.sync-card .sc-status.warn { color: var(--amber); }

/* ------------------------------------------------------------------ prototype chrome */
.proto-toggle {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 100;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: #1b2720;
  color: #eef3ef;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  box-shadow: 0 12px 30px rgba(20,28,23,.24);
}
.h5-mode .proto-toggle { bottom: 92px; }
.proto-panel {
  position: fixed;
  right: 18px;
  bottom: 68px;
  width: 292px;
  max-height: 70vh;
  overflow: auto;
  background: #18241d;
  color: #fff;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  box-shadow: 0 22px 60px rgba(18,25,20,.32);
  z-index: 101;
  padding: 12px;
  display: none;
}
.h5-mode .proto-panel { bottom: 140px; }
.proto-panel.open { display: block; }
.proto-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 2px 9px; }
.proto-head strong { font-size: 11.5px; font-weight: 500; }
.proto-head span { color: #89978d; font-size: 9px; }
.proto-group { margin-top: 8px; }
.proto-group-title { color: #7f8d82; font-size: 9px; letter-spacing: .12em; margin: 8px 3px 5px; }
.proto-link { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: transparent; color: #c9d2ca; text-align: left; padding: 7px 8px; border-radius: 6px; font-size: 10.5px; }
.proto-link:hover { background: rgba(255,255,255,.06); }
.proto-link.on { background: rgba(217,119,87,.18); color: #fff; }
.proto-link .num { margin-left: auto; color: #718075; font-family: var(--num); font-size: 8.5px; }
.proto-tip { margin: 9px 3px 2px; color: #718075; font-size: 9px; line-height: 1.5; border-top: 1px solid rgba(255,255,255,.08); padding-top: 8px; }

/* ------------------------------------------------------------------ H5 */
.h5-mode { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: #d8d5ca; }
.clean.h5-mode { display: block; padding: 0; background: var(--bg); }
.phone {
  width: 410px;
  height: 864px;
  padding: 10px;
  border-radius: 48px;
  background: #101713;
  box-shadow: 0 40px 100px rgba(17,24,19,.3);
}
.clean .phone { width: 390px; height: 844px; padding: 0; border-radius: 0; box-shadow: none; background: transparent; }
.h5-screen {
  width: 100%;
  height: 100%;
  border-radius: 39px;
  overflow: hidden;
  background: #f5f4ee;
  display: flex;
  flex-direction: column;
  position: relative;
}
.clean .h5-screen { border-radius: 0; }
.statusbar {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 24px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #171b16;
  background: transparent;
  position: relative;
  z-index: 3;
}
.status-right { display: flex; align-items: center; gap: 5px; }
.status-right svg { width: 14px; height: 14px; }
.h5-nav {
  height: 54px;
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  gap: 8px;
}
.h5-nav h1 { margin: 0; font-size: 21px; line-height: 1.15; letter-spacing: -.03em; font-weight: 600; }
.h5-nav h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.h5-nav .nav-side { width: 32px; height: 32px; display: grid; place-items: center; }
.h5-nav .h5-avatar { width: 33px; height: 33px; border-radius: 50%; background: var(--dark); color: #e9efe9; display: grid; place-items: center; font-size: 11px; font-weight: 500; }
.h5-nav.detail { justify-content: flex-start; position: relative; }
.h5-nav.detail h2 { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.h5-nav.detail .nav-right { margin-left: auto; }
.h5-back {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.h5-back:hover { background: rgba(0,0,0,.04); }
.h5-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px; scrollbar-width: none; }
.h5-body::-webkit-scrollbar { display: none; }
.h5-body.no-pad { padding: 0; }
.h5-tab {
  height: 68px;
  flex: 0 0 68px;
  border-top: 1px solid #e8e5da;
  background: rgba(255,255,255,.94);
  display: flex;
  padding: 7px 9px 10px;
  gap: 3px;
}
.tab-item {
  flex: 1;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #9a9e94;
  font-size: 9px;
  border-radius: 8px;
}
.tab-item.active { color: var(--accent-2); }
.tab-item.active svg { stroke-width: 2; }
.h5-bottom {
  flex: 0 0 auto;
  background: rgba(255,255,255,.98);
  border-top: 1px solid #e9e6dc;
  padding: 11px 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 4;
}
.h5-bottom .total { flex: 1; min-width: 0; }
.h5-bottom .total .t-label { color: var(--muted); font-size: 9px; }
.h5-bottom .total .t-value { font-family: var(--num); font-size: 17px; font-weight: 590; margin-top: 2px; letter-spacing: -.02em; }
.h5-bottom .total .t-value small { font-family: var(--font); font-size: 9px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.h5-btn {
  height: 45px;
  padding: 0 19px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 7px 16px rgba(217,119,87,.22);
  white-space: nowrap;
}
.h5-btn:active { transform: translateY(1px); }
.h5-btn.dark { background: var(--dark); box-shadow: none; }
.h5-btn.block { width: 100%; }
.h5-btn.ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); box-shadow: none; }

.h5-topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 2px 0 13px; }
.h5-topline .eyebrow { color: var(--muted); font-size: 9.5px; letter-spacing: .01em; }
.h5-topline h1 { margin: 4px 0 0; font-size: 22px; line-height: 1.15; font-weight: 600; letter-spacing: -.035em; }
.h5-summary { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9.5px; margin: 0 2px 11px; }
.h5-summary b { color: var(--ink-2); font-weight: 500; }
.h5-summary .sep { width: 1px; height: 9px; background: #d5d2c8; }
.segmented {
  height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  background: #ecebe3;
  border-radius: 10px;
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 7px;
  color: #858a80;
  font-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.06); font-weight: 500; }
.segmented .n { font-family: var(--num); font-size: 9px; color: var(--muted); }
.segmented button.on .n { color: var(--accent-2); }

.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(24,33,27,.03);
}
.order-card:active { background: #fdfcf8; }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oc-top .mono { font-size: 9.5px; color: var(--muted); }
.oc-title { margin: 7px 0 0; font-size: 14.5px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
.oc-addr { margin: 5px 0 0; display: flex; align-items: flex-start; gap: 4px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.oc-addr svg { flex: 0 0 auto; margin-top: 1px; }
.oc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.oc-meta .sep { width: 1px; height: 8px; background: #d8d5ca; }
.oc-foot { margin-top: 10px; padding-top: 9px; border-top: 1px solid #f1efe8; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oc-suppliers { display: flex; gap: 4px; align-items: center; overflow: hidden; }
.supplier-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: #f4f3ec; color: #6d736a; font-size: 8.5px; white-space: nowrap; }
.supplier-tag.more { background: var(--accent-soft); color: var(--accent-2); }
.oc-link { display: inline-flex; align-items: center; gap: 1px; color: var(--accent-2); font-size: 9.5px; font-weight: 500; white-space: nowrap; }

.h5-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.h5-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.h5-card-head .h { font-size: 10.5px; color: var(--muted); }
.h5-card-head .strong { font-size: 11px; font-weight: 500; color: var(--ink); }
.h5-order-hero { background: var(--dark); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; position: relative; overflow: hidden; }
.h5-order-hero::after { content: ""; position: absolute; width: 130px; height: 130px; border-radius: 50%; right: -44px; top: -52px; border: 1px solid rgba(255,255,255,.08); }
.h5-order-hero .mono { color: #9eaaa1; font-size: 9.5px; }
.h5-order-hero h2 { margin: 7px 0 0; font-size: 17px; line-height: 1.3; font-weight: 600; }
.h5-order-hero .addr { margin: 6px 0 0; display: flex; gap: 5px; align-items: flex-start; color: #b7c0b8; font-size: 9.5px; line-height: 1.5; }
.h5-order-hero .hero-meta { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); display: flex; gap: 14px; color: #9eaaa1; font-size: 9px; }
.h5-order-hero .hero-meta b { display: block; color: #eef2ed; font-weight: 500; font-size: 10px; margin-top: 2px; }
.h5-section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 3px 2px 8px; }
.h5-section-title h3 { margin: 0; font-size: 12.5px; font-weight: 600; }
.h5-section-title span { color: var(--muted); font-size: 9px; }
.supplier-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 10px; }
.sg-head { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #fbfaf6; border-bottom: 1px solid #f0eee6; }
.sg-logo { width: 22px; height: 22px; border-radius: 6px; background: var(--olive-soft); color: var(--olive); display: grid; place-items: center; flex: 0 0 auto; }
.sg-logo.b { background: var(--amber-soft); color: var(--amber); }
.sg-name { font-size: 10.5px; font-weight: 500; }
.sg-count { color: var(--muted); font-size: 8.5px; margin-left: auto; }
.item-row { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #f3f1e9; }
.item-row:last-child { border-bottom: 0; }
.item-check { position: relative; display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.item-check input { position: absolute; opacity: 0; }
.item-check span { display: block; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #c9c6bb; background: #fff; position: relative; }
.item-check input:checked + span { background: var(--accent); border-color: var(--accent); }
.item-check input:checked + span::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.item-main { flex: 1; min-width: 0; }
.item-name-line { display: flex; align-items: center; gap: 5px; }
.item-name { font-size: 11px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.item-right { text-align: right; flex: 0 0 auto; }
.item-price { font-family: var(--num); font-size: 10.5px; font-weight: 590; }
.item-avail { color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.item-avail b { color: var(--olive); font-weight: 600; }
.supplier-note { padding: 8px 12px; background: #fbfaf6; color: var(--muted); font-size: 8.5px; line-height: 1.5; border-top: 1px solid #f0eee6; }
.h5-sticky {
  flex: 0 0 auto;
  background: rgba(255,255,255,.98);
  border-top: 1px solid #e9e6dc;
  padding: 10px 16px 19px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.h5-sticky .selection { flex: 1; min-width: 0; }
.h5-sticky .selection .s1 { font-size: 11px; font-weight: 500; color: var(--ink); }
.h5-sticky .selection .s2 { margin-top: 2px; color: var(--muted); font-size: 9px; }

.form-note-h5 { display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; background: #fbf3e5; border: 1px solid #f0e2c7; color: #87672f; border-radius: 9px; font-size: 9px; line-height: 1.5; margin: 2px 0 10px; }
.return-form-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px; margin-bottom: 10px; }
.rf-head { display: flex; align-items: center; gap: 9px; }
.rf-main { flex: 1; min-width: 0; }
.rf-name { font-size: 12px; font-weight: 600; }
.rf-sub { color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.rf-avail { text-align: right; color: var(--muted); font-size: 8.5px; }
.rf-avail b { display: block; font-family: var(--num); color: var(--ink); font-size: 11px; margin-bottom: 2px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #f1efe8; }
.qty-label { font-size: 9.5px; color: var(--muted); }
.qty-label b { color: var(--ink-2); font-weight: 500; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; height: 29px; background: #fdfcf9; }
.stepper button { width: 27px; height: 100%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.stepper .num { min-width: 42px; text-align: center; font-family: var(--num); font-size: 11px; font-weight: 500; }
.stepper .unit { color: var(--muted); font-family: var(--font); font-size: 8px; font-weight: 400; margin-left: 2px; }
.photo-label { display: flex; align-items: center; justify-content: space-between; margin: 11px 0 6px; color: var(--muted); font-size: 8.5px; }
.photo-label .req { color: var(--accent); }
.photo-row { display: flex; gap: 6px; }
.photo-thumb { width: 51px; height: 51px; border-radius: 8px; overflow: hidden; position: relative; flex: 0 0 51px; border: 1px solid var(--line); }
.photo-thumb .produce { width: 51px; height: 51px; flex-basis: 51px; border-radius: 0; border: 0; }
.photo-thumb .produce svg { width: 39px; height: 39px; }
.photo-thumb .del { position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%; background: rgba(20,26,22,.62); color: #fff; display: grid; place-items: center; font-size: 8px; }
.upload-tile { width: 51px; height: 51px; border: 1px dashed #d4d0c4; border-radius: 8px; background: #fbfaf6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9b9e94; font-size: 7.5px; flex: 0 0 51px; }
.remark-box { margin-top: 10px; min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fdfcf9; padding: 7px 9px; color: #747a70; font-size: 9.5px; line-height: 1.45; }
.remark-box.empty { color: #b0b2aa; }
.collapse-row { display: flex; align-items: center; gap: 9px; background: #f3f1e9; border: 1px solid #e5e1d5; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; color: #747a70; font-size: 9.5px; }
.collapse-row .plus-stack { width: 23px; height: 23px; border-radius: 6px; background: #fff; display: grid; place-items: center; color: var(--muted); }
.collapse-row .more { margin-left: auto; color: var(--accent-2); font-size: 9px; }

.success-wrap { padding: 17px 16px 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.success-icon { width: 62px; height: 62px; border-radius: 50%; background: var(--olive-soft); color: var(--olive); display: grid; place-items: center; margin: 7px 0 13px; position: relative; }
.success-icon::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid #dfe8d2; }
.success-title { font-size: 20px; font-weight: 600; letter-spacing: -.03em; margin: 0; }
.success-sub { margin: 7px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; max-width: 280px; }
.success-no { margin-top: 14px; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; }
.success-no .label { color: var(--muted); font-size: 8.5px; }
.success-no .mono { font-size: 10.5px; font-weight: 500; margin-top: 3px; }
.success-card { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 9px; padding: 11px 13px; text-align: left; }
.success-card h4 { margin: 0 0 7px; font-size: 9px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.success-erp { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f2f0e8; }
.success-erp:last-child { border-bottom: 0; padding-bottom: 0; }
.success-erp .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--olive); flex: 0 0 auto; }
.success-erp .name { flex: 1; color: var(--ink-2); font-size: 9px; }
.success-erp .num { color: var(--muted); font-family: var(--num); font-size: 8.5px; }
.success-actions { width: 100%; margin-top: 13px; display: flex; flex-direction: column; gap: 8px; }

.history-date { color: var(--muted); font-size: 9px; margin: 2px 2px 6px; }
.history-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.hc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hc-top .mono { font-size: 8.5px; color: var(--muted); }
.hc-main { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.hc-main .name { font-size: 11px; font-weight: 500; }
.hc-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 8.5px; margin-top: 5px; }
.hc-amount { margin-left: auto; font-family: var(--num); font-size: 11.5px; font-weight: 590; }
.hc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding-top: 7px; border-top: 1px solid #f2f0e8; color: var(--muted); font-size: 8.5px; }

.h5-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mini-kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.mini-kpi .label { color: var(--muted); font-size: 8.5px; }
.mini-kpi .value { font-family: var(--num); font-size: 20px; font-weight: 590; margin-top: 5px; letter-spacing: -.03em; }
.mini-kpi .value small { font-family: var(--font); font-size: 8px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.mini-kpi .foot { color: var(--muted); font-size: 8px; margin-top: 3px; }
.month-select { display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); font-size: 10px; }
.mini-chart { display: flex; align-items: flex-end; gap: 12px; height: 116px; padding: 4px 4px 0; }
.mc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.mc-bar { width: 100%; max-width: 31px; border-radius: 5px 5px 2px 2px; background: #e8d6cc; position: relative; }
.mc-bar.on { background: var(--accent); }
.mc-bar .v { position: absolute; top: -14px; left: 0; right: 0; text-align: center; color: var(--muted); font-family: var(--num); font-size: 7.5px; white-space: nowrap; }
.mc-label { color: var(--muted); font-size: 8px; }
.supplier-bars { padding: 2px 0 1px; }
.sb-row { margin-bottom: 10px; }
.sb-row:last-child { margin-bottom: 0; }
.sb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 9.5px; }
.sb-top .n { color: var(--ink-2); }
.sb-top .a { color: var(--muted); font-family: var(--num); font-size: 8.5px; }
.sb-track { height: 6px; background: #f0eee6; border-radius: 4px; margin-top: 5px; overflow: hidden; }
.sb-fill { height: 100%; border-radius: 4px; background: var(--olive); }
.sb-fill.clay { background: var(--accent); }
.sb-fill.sky { background: var(--sky); }
.h5-table { width: 100%; border-collapse: collapse; }
.h5-table th { text-align: left; color: var(--muted); font-size: 8px; font-weight: 400; padding: 0 0 7px; border-bottom: 1px solid #f0eee6; }
.h5-table td { padding: 8px 0; border-bottom: 1px solid #f4f2eb; font-size: 9px; color: var(--ink-2); }
.h5-table tr:last-child td { border-bottom: 0; }
.h5-table .num { font-family: var(--num); text-align: right; }
.h5-table th.num { text-align: right; }

.profile-hero { background: var(--dark); color: #fff; border-radius: 16px; padding: 18px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.profile-hero .avatar { width: 48px; height: 48px; flex-basis: 48px; background: #34453a; color: #fff; font-size: 16px; }
.profile-hero h2 { margin: 0; font-size: 16px; font-weight: 600; }
.profile-hero p { margin: 4px 0 0; color: #9eaaa1; font-size: 9px; }
.profile-stats { display: flex; padding: 12px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.profile-stat { flex: 1; text-align: center; border-right: 1px solid #f0eee6; }
.profile-stat:last-child { border-right: 0; }
.profile-stat .v { font-family: var(--num); font-size: 16px; font-weight: 590; }
.profile-stat .l { color: var(--muted); font-size: 8px; margin-top: 2px; }
.menu-list { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.menu-row { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-bottom: 1px solid #f2f0e8; color: var(--ink-2); font-size: 10.5px; }
.menu-row:last-child { border-bottom: 0; }
.menu-row .ico { width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.menu-row .chev { margin-left: auto; color: #b7b9b0; }

/* small helpers */
.hr { height: 1px; background: #f0eee6; margin: 10px 0; }
.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.mt12 { margin-top: 12px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap6 { gap: 6px; }
.gap8 { gap: 8px; }
.gap10 { gap: 10px; }
.grow { flex: 1; min-width: 0; }
.w100 { width: 100%; }

/* ------------------------------------------------------------------ v2 additions */
.return-item.compact { padding: 9px 15px; background: #fcfbf7; }
.return-item.compact .ri-amount { margin-top: 5px; }
.return-item.compact .ri-amount strong { font-size: 13px; }
.return-item.compact .ri-meta { margin-top: 4px; }

.modal.wide { width: 540px; }
.check-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.check-pill { display: inline-flex; align-items: center; cursor: pointer; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line-2); background: #fdfcf9; color: #6f756b; font-size: 10px; display: inline-flex; align-items: center; gap: 5px; }
.check-pill span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 1px solid #c9c6bb; background: #fff; }
.check-pill input:checked + span { border-color: #e3b8a7; background: #fff8f4; color: var(--accent-2); }
.check-pill input:checked + span::before { content: "✓"; border-color: var(--accent); background: var(--accent); color: #fff; font-size: 7px; line-height: 9px; text-align: center; }
.coverage-preview { border: 1px solid #eee9dc; background: #faf9f4; border-radius: 9px; padding: 9px 12px; }
.cp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 5px 0; border-bottom: 1px solid #eeeae0; font-size: 9.5px; }
.cp-row:last-child { border-bottom: 0; }
.cp-row span { color: var(--muted); }
.cp-row b { color: var(--ink-2); font-weight: 500; text-align: right; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 7px; }
.pay-method { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fdfcf9; display: flex; flex-direction: column; gap: 2px; cursor: pointer; position: relative; }
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method span { color: var(--ink-2); font-size: 10.5px; }
.pay-method small { color: var(--muted); font-size: 8.5px; }
.pay-method:has(input:checked) { border-color: #e3b8a7; background: #fff8f4; box-shadow: 0 0 0 2px rgba(217,119,87,.06); }
.pay-method:has(input:checked) span { color: var(--accent-2); font-weight: 500; }

.tight-table td { height: 40px; }
.tight-table th { height: 31px; }
.compact-return .erp-card { padding: 8px 14px; }
.compact-return .timeline { padding: 7px 15px 8px; }
.compact-return .timeline-item { padding-bottom: 7px; }

.compact-supplier .card-head { min-height: 48px; padding: 10px 14px 8px; }
.compact-supplier .erp-card { padding: 8px 14px; }
.compact-supplier .timeline-item { padding-bottom: 6px; }
.compact-supplier .timeline { padding: 7px 15px 8px; }
.compact-supplier.detail-grid { margin-top: 7px !important; }

/* ---------------- real app additions ---------------- */
body.app-desktop { background: var(--bg); }
body.app-desktop .desktop { width: 100vw; height: 100vh; border-radius: 0; box-shadow: none; margin: 0; }
body.app-h5 { background: #d8d5ca; }
body.app-h5 .phone { width: 410px; height: 864px; }
@media (max-width: 520px) {
  body.app-h5 { background: var(--bg); }
  body.app-h5 .phone { width: 100vw; height: 100vh; padding: 0; border-radius: 0; box-shadow: none; }
  body.app-h5 .h5-screen { border-radius: 0; }
}
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: var(--bg); }
.login-brand { background: var(--dark); color: #fff; padding: 54px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-brand::after { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); right: -160px; bottom: -180px; }
.login-brand .brand { padding: 0; }
.login-copy { max-width: 560px; position: relative; z-index: 1; }
.login-copy h1 { font-size: 42px; line-height: 1.15; letter-spacing: -.04em; margin: 0 0 18px; font-weight: 600; }
.login-copy p { color: #a8b4ab; font-size: 13px; line-height: 1.8; margin: 0; }
.login-points { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; max-width: 480px; }
.login-point { border: 1px solid rgba(255,255,255,.1); border-radius: 9px; padding: 13px 14px; color: #c7d1c9; font-size: 11px; line-height: 1.6; background: rgba(255,255,255,.025); }
.login-point b { display: block; color: #fff; font-size: 12px; margin-bottom: 3px; font-weight: 500; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 390px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 22px 60px rgba(24,33,27,.1); padding: 30px 30px 26px; }
.login-card h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.login-card .sub { color: var(--muted); font-size: 11px; margin: 7px 0 22px; line-height: 1.6; }
.login-field { margin-bottom: 13px; }
.login-field label { display: block; color: var(--ink-2); font-size: 10px; margin-bottom: 6px; }
.login-field input { width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 7px; padding: 0 11px; background: #fdfcf9; outline: 0; font-size: 12px; }
.login-field input:focus { border-color: #d9947c; background: #fff; box-shadow: 0 0 0 3px rgba(217,119,87,.09); }
.login-btn { width: 100%; height: 41px; border: 0; border-radius: 7px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 500; margin-top: 5px; }
.login-btn:disabled { opacity: .55; }
.login-error { background: var(--red-soft); color: var(--red); border: 1px solid #efd3cf; border-radius: 7px; padding: 8px 10px; font-size: 10px; margin-bottom: 12px; display: none; }
.login-error.show { display: block; }
.login-hint { border-top: 1px solid #f0eee7; margin-top: 18px; padding-top: 13px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.login-hint code { background: #f5f4ee; border-radius: 3px; padding: 1px 4px; color: var(--ink-2); }
.login-switch { display: flex; gap: 5px; padding: 3px; background: #f5f4ee; border-radius: 8px; margin-bottom: 19px; }
.login-switch button { flex: 1; border: 0; height: 30px; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10px; }
.login-switch button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.06); }

.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.7; }
.empty-state strong { display: block; color: var(--ink-2); font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px); background: #1b2720; color: #fff; border-radius: 8px; padding: 10px 16px; font-size: 11px; z-index: 1000; opacity: 0; pointer-events: none; transition: .2s; max-width: 70vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }
.alert.warn { background: #fbf3e5; border-color: #f0e2c7; color: #87672f; }
.alert.warn b { color: #6d5125; }
.warn-dot { width: 6px; height: 6px; border-radius: 50%; background: #c39a4d; display: inline-block; }
.status-tag { display:inline-flex; align-items:center; gap:4px; min-height:21px; padding:1px 7px; border-radius:5px; font-size:9.5px; background:#f5f4ee; color:#777c72; border:1px solid #e9e6dc; }
.status-tag.ok { background: var(--olive-soft); color: #5b7046; border-color: #e0e8d5; }
.status-tag.warn { background: var(--amber-soft); color: #916526; border-color: #f1e2c5; }
.status-tag.danger { background: var(--red-soft); color: #aa443b; border-color: #f0d6d2; }
.mini-progress { width: 90px; height: 5px; border-radius: 4px; background: #f0eee6; overflow: hidden; display: inline-block; vertical-align: middle; }
.mini-progress i { display:block; height:100%; background: var(--accent); }
.table-link { color: var(--accent-2); cursor: pointer; text-decoration: none; }
.table-link:hover { text-decoration: underline; }
.btn-row { display:flex; gap:6px; align-items:center; }
.section-gap { margin-top: 12px; }
.form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-grid-2 .full { grid-column:1/-1; }
.field input, .field select { height:32px; border:1px solid var(--line-2); border-radius:6px; background:#fdfcf9; padding:0 9px; color:var(--ink-2); font-size:10.5px; outline:0; }
.field input:focus, .field select:focus { border-color:#d9947c; background:#fff; box-shadow:0 0 0 3px rgba(217,119,87,.08); }
.modal .form-input, .modal .form-select { cursor:default; }
.modal .form-input input { width:100%; border:0; background:transparent; outline:0; font:inherit; color:var(--ink-2); }
.check-list { display:flex; flex-wrap:wrap; gap:8px; }
.check-list label { display:flex; align-items:center; gap:5px; border:1px solid var(--line-2); background:#fdfcf9; border-radius:6px; padding:6px 9px; font-size:10px; color:var(--ink-2); }
.check-list input { accent-color: var(--accent); }
.driver-phone { width: 390px; min-height: 760px; margin: 0 auto; background: var(--bg); border-radius: 28px; overflow:hidden; box-shadow: 0 22px 60px rgba(20,28,23,.16); }
.driver-top { background: var(--dark); color: #fff; padding: 18px 18px 16px; }
.driver-top .back { color:#c9d2ca; font-size:10px; text-decoration:none; }
.driver-top h1 { margin: 9px 0 3px; font-size: 21px; letter-spacing: -.03em; }
.driver-top p { margin:0; color:#a7b1a9; font-size:9px; }
.driver-body { padding:14px 16px 22px; }
.driver-card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 13px; margin-bottom:9px; }
.driver-card h3 { margin:0; font-size:12px; }
.driver-card p { margin:5px 0 0; color:var(--muted); font-size:9px; line-height:1.5; }
.driver-tabs { display:flex; gap:4px; background:#ecebe3; border:1px solid var(--line); border-radius:9px; padding:3px; margin-bottom:11px; }
.driver-tabs a, .driver-tabs button { flex:1; text-align:center; border:0; background:transparent; color:var(--muted); border-radius:6px; padding:6px 4px; font-size:9.5px; text-decoration:none; }
.driver-tabs .on { background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.05); }
.driver-bottom { display:flex; gap:8px; margin-top:12px; }
.photo-input { display:none; }
.photo-add { width:48px; height:48px; border:1px dashed #d4d0c4; border-radius:7px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--muted); font-size:7px; cursor:pointer; background:#fbfaf6; flex:0 0 48px; }
.return-photo { width:48px; height:48px; object-fit:cover; border-radius:7px; border:1px solid var(--line); }
.driver-item-qty { width:64px; height:29px; border:1px solid var(--line-2); border-radius:6px; padding:0 7px; font-size:10px; background:#fdfcf9; }
.driver-check-line { display:flex; gap:8px; align-items:flex-start; }
.driver-check-line input[type=checkbox] { margin-top:3px; accent-color:var(--accent); }
.driver-item { border-bottom:1px solid #f2f0e8; padding:9px 0; }
.driver-item:last-child { border-bottom:0; }
.driver-item .nm { font-size:10.5px; color:var(--ink); }
.driver-item .meta { color:var(--muted); font-size:8.5px; margin-top:2px; }
.driver-item .right { text-align:right; }
.driver-form-row { display:flex; gap:8px; align-items:center; justify-content:space-between; margin-top:8px; }
.driver-form-row label { color:var(--muted); font-size:9px; }
.driver-form-row input[type=text] { flex:1; height:30px; border:1px solid var(--line-2); border-radius:6px; padding:0 8px; background:#fdfcf9; font-size:9.5px; }
.driver-note { color:var(--muted); font-size:8.5px; line-height:1.55; margin-top:6px; }
body.app-desktop .content { overflow-y: auto; }
body.app-desktop .content::-webkit-scrollbar { width: 8px; }
body.app-desktop .content::-webkit-scrollbar-thumb { background: #d7d3c7; border-radius: 8px; }
.driver-date-form { display:flex; align-items:center; gap:5px; margin:0 0 10px; }
.driver-date-form input { flex:1; min-width:0; height:29px; border:1px solid var(--line-2); border-radius:6px; background:#fdfcf9; padding:0 6px; font-size:9px; color:var(--ink-2); }
.driver-date-form span { color:var(--muted); font-size:8px; }
.driver-date-form button { height:29px; border:0; border-radius:6px; background:var(--accent); color:#fff; padding:0 10px; font-size:9px; }
.segmented a { flex:1; display:flex; align-items:center; justify-content:center; gap:5px; border-radius:7px; color:#858a80; font-size:10.5px; text-decoration:none; }
.segmented a.on { background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.06); font-weight:500; }

/* ---------------- readability pass ---------------- */
body.app-desktop { font-size: 14px; }
body.app-desktop .desktop { font-size: 14px; }
body.app-desktop .sidebar { width: 236px; }
body.app-desktop .main { margin-left: 0; }
body.app-desktop .brand { padding: 20px 20px 20px; }
body.app-desktop .brand-name { font-size: 17px; }
body.app-desktop .brand-sub { font-size: 8px; }
body.app-desktop .side-label { font-size: 10px; margin: 24px 20px 8px; }
body.app-desktop .nav { padding: 0 10px; gap: 4px; }
body.app-desktop .nav-item { font-size: 13px; height: 43px; padding: 0 13px; gap: 10px; border-radius: 7px; }
body.app-desktop .nav-item svg { width: 17px; height: 17px; }
body.app-desktop .sidebar-bottom { padding: 14px 14px 16px; }
body.app-desktop .connection { font-size: 10px; }
body.app-desktop .side-user .name { font-size: 11px; }
body.app-desktop .side-user .role { font-size: 9.5px; }
body.app-desktop .topbar { height: 66px; padding: 0 28px; }
body.app-desktop .crumb { font-size: 12.5px; }
body.app-desktop .sync-pill { font-size: 10.5px; padding: 6px 10px; }
body.app-desktop .user-chip .name { font-size: 11.5px; }
body.app-desktop .user-chip .role { font-size: 9.5px; }
body.app-desktop .content { padding: 24px 30px 34px; }
body.app-desktop .page-head { margin-bottom: 20px; }
body.app-desktop .page-head h1 { font-size: 30px; }
body.app-desktop .page-sub { font-size: 13px; line-height: 1.55; }
body.app-desktop .btn { height: 35px; padding: 0 13px; font-size: 11.5px; border-radius: 6px; }
body.app-desktop .btn.sm { height: 32px; font-size: 11px; }
body.app-desktop .icon-btn { width: 32px; height: 32px; }
body.app-desktop .kpi { min-height: 128px; padding: 15px 17px 13px; }
body.app-desktop .kpi-label { font-size: 12px; }
body.app-desktop .kpi-value { font-size: 32px; margin: 9px 0 5px; }
body.app-desktop .kpi-value .unit { font-size: 10.5px; }
body.app-desktop .kpi-foot { font-size: 10.5px; }
body.app-desktop .kpi-icon { width: 27px; height: 27px; }
body.app-desktop .alert { font-size: 11.5px; padding: 10px 12px; line-height: 1.6; }
body.app-desktop .card-head { padding: 15px 17px 12px; }
body.app-desktop .card-head h2 { font-size: 15px; }
body.app-desktop .card-head p { font-size: 11px; }
body.app-desktop .card-link { font-size: 10.5px; }
body.app-desktop .data-table th { height: 40px; font-size: 11px; }
body.app-desktop .data-table td { height: 54px; font-size: 12.5px; }
body.app-desktop .data-table .small { font-size: 10.5px; }
body.app-desktop .data-table .num { font-size: 12.5px; }
body.app-desktop .data-table .primary { font-size: 12.5px; }
body.app-desktop .product-name { font-size: 12.5px; }
body.app-desktop .product-sub { font-size: 10.5px; margin-top: 3px; }
body.app-desktop .supplier-mini { font-size: 10.5px; }
body.app-desktop .cell-stack { gap: 3px; }
body.app-desktop .table-foot { font-size: 10.5px; padding: 10px 16px; }
body.app-desktop .pagination .page-btn { min-width: 27px; height: 27px; font-size: 10px; }
body.app-desktop .filter-bar { padding: 10px 13px; gap: 10px; }
body.app-desktop .field-label { font-size: 10.5px; }
body.app-desktop .input-shell { height: 34px; font-size: 11.5px; }
body.app-desktop .input-shell input { font-size: 11.5px; }
body.app-desktop .filter-actions .btn { height: 34px; }
body.app-desktop .tabs-row { margin-top: 14px; }
body.app-desktop .tabs .tab { font-size: 11.5px; }
body.app-desktop .chip { font-size: 9.5px; min-height: 23px; }
body.app-desktop .status-tag { font-size: 10px; min-height: 23px; }
body.app-desktop .summary-strip { min-height: 104px; }
body.app-desktop .summary-cell { padding: 13px 16px; }
body.app-desktop .summary-cell .label { font-size: 10.5px; }
body.app-desktop .summary-cell .value { font-size: 13px; margin-top: 8px; }
body.app-desktop .summary-cell .value.money { font-size: 20px; }
body.app-desktop .form-label, body.app-desktop .form-help, body.app-desktop .form-note { font-size: 10.5px; }
body.app-desktop .form-input { height: 34px; font-size: 11.5px; }
body.app-desktop .form-input input { font-size: 11.5px; }
body.app-desktop .modal h2 { font-size: 18px; }
body.app-desktop .modal p { font-size: 11px; }
body.app-desktop .modal-body { font-size: 11.5px; }
body.app-desktop .check-list label { font-size: 11px; padding: 7px 10px; }
body.app-desktop .config-status { padding: 6px 16px 12px; }
body.app-desktop .config-status > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid #f0eee7; font-size: 11px; }
body.app-desktop .config-status > div:last-child { border-bottom: 0; }
body.app-desktop .config-status span { color: var(--muted); flex: 0 0 78px; }
body.app-desktop .config-status b { font-weight: 500; color: var(--ink-2); text-align: right; word-break: break-all; }
body.app-desktop .detail-grid { gap: 14px; }
body.app-desktop .back-line { font-size: 11.5px; }
body.app-desktop .card { border-radius: 10px; }
body.app-login .login-hint { font-size: 10px; }
body.app-login .login-card { width: 410px; padding: 34px 32px 28px; }
body.app-login .login-card h2 { font-size: 28px; }
body.app-login .login-card .sub { font-size: 12px; line-height: 1.65; }
body.app-login .login-field label { font-size: 11.5px; }
body.app-login .login-field input { height: 44px; font-size: 13px; }
body.app-login .login-btn { height: 45px; font-size: 13px; }
body.app-login .login-hint { font-size: 10.5px; line-height: 1.75; }
body.app-login .login-point { font-size: 11.5px; }
body.app-login .login-copy p { font-size: 14px; }
body.app-desktop .form-label { font-size: 11.5px; }
body.app-desktop .form-help, body.app-desktop .form-note { font-size: 11px; }
body.app-desktop .config-status > div { font-size: 11.5px; }
body.app-desktop .data-table td { font-size: 13px; }
body.app-desktop .data-table th { font-size: 11.5px; }
