:root {
  --bg: #F3F6F4;
  --surface: #FFFFFF;
  --surface-soft: #F8FAF9;
  --line: #E6ECE8;
  --line-soft: #EFF3F0;
  --ink: #15251E;
  --ink-2: #3E4E47;
  --muted: #7D8C85;
  --muted-2: #9CA9A2;
  --green-900: #082C21;
  --green-800: #0B3B2D;
  --green-700: #0B7A5C;
  --green-600: #0E9F6E;
  --green-500: #18B981;
  --mint: #E8F6F0;
  --mint-strong: #D8F0E6;
  --amber: #A96700;
  --amber-bg: #FFF5E4;
  --blue: #2563EB;
  --blue-bg: #EDF4FF;
  --rose: #B8453F;
  --rose-bg: #FDEDEC;
  --orange: #E8552D;
  --shadow: 0 1px 2px rgba(15, 40, 30, .04), 0 10px 28px rgba(15, 40, 30, .035);
  --radius: 16px;
  --sidebar: 244px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.hidden { display: none !important; }

/* layout */
.app { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(178deg, #0C3529 0%, #0A2C22 55%, #08251C 100%);
  color: #DCEAE4;
  overflow: hidden;
}
.sidebar::after {
  content: '';
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 205, 143, .13), transparent 66%);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2ED39A, #0E9F6E);
  color: #063527;
  font-size: 20px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 16px rgba(0, 0, 0, .18);
}
.brand-text b { display: block; color: #fff; font-size: 16px; font-weight: 650; letter-spacing: .01em; }
.brand-text small { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .14em; color: rgba(206, 233, 221, .48); }
.side-group { margin-top: 25px; }
.side-label {
  padding: 0 12px;
  margin-bottom: 8px;
  font-size: 9.5px;
  letter-spacing: .16em;
  color: rgba(188, 220, 206, .38);
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-btn {
  position: relative;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(224, 240, 233, .7);
  font-size: 12.5px;
  text-align: left;
  transition: background .16s, color .16s;
}
.nav-btn .ic { width: 17px; height: 17px; opacity: .85; }
.nav-btn:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-btn.active {
  background: linear-gradient(90deg, rgba(32, 195, 137, .2), rgba(32, 195, 137, .08));
  color: #fff;
  font-weight: 600;
}
.nav-btn.active .ic { color: #42DDA5; opacity: 1; }
.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #35D49A;
}
.nav-text { flex: 1; }
.nav-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(232, 85, 45, .95);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.cutoff-card {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .075);
}
.cutoff-top { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: rgba(202, 231, 218, .55); }
.cutoff-top .ic { width: 13px; height: 13px; }
.cutoff-value { margin-top: 7px; color: #fff; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cutoff-track { margin-top: 10px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.cutoff-track i { display: block; height: 100%; width: 63%; border-radius: inherit; background: linear-gradient(90deg, #2DCB94, #79EBBE); }
.cutoff-note { margin-top: 8px; font-size: 10px; color: rgba(202, 231, 218, .48); }
.mini-link {
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(221, 239, 231, .66);
  border: 1px solid rgba(255, 255, 255, .07);
  transition: .16s;
}
.mini-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.mini-link .ic { width: 14px; height: 14px; }
.mini-link span { flex: 1; }

.workspace { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.page-heading { min-width: 0; }
.crumb { font-size: 9.5px; letter-spacing: .12em; color: var(--muted-2); }
.crumb b { color: var(--green-700); font-weight: 600; }
.page-heading h1 { margin: 3px 0 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.date-chip {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-soft);
  color: var(--ink-2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.date-chip .ic { width: 13px; height: 13px; color: var(--muted); }
.global-search {
  width: 252px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F5F8F6;
  border: 1px solid transparent;
  transition: .16s;
}
.global-search:focus-within { background: #fff; border-color: #C9E2D6; box-shadow: 0 0 0 3px rgba(14, 159, 110, .08); }
.global-search .ic { width: 15px; height: 15px; color: var(--muted); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11.5px; }
.global-search input::placeholder { color: var(--muted-2); }
.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: .16s;
}
.icon-btn:hover { border-color: #CFE0D8; background: var(--surface-soft); }
.icon-btn .ic { width: 17px; height: 17px; }
.notif-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 2px #fff;
}
.profile { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); }
.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
}
.profile-meta b { display: block; font-size: 11.5px; font-weight: 600; }
.profile-meta span { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }

.view {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 30px 52px;
  flex: 1;
}

/* notifications */
.notif-wrap { position: relative; }
.notif-panel {
  position: absolute;
  top: 46px;
  right: 0;
  width: 348px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(8, 34, 24, .18);
  overflow: hidden;
  animation: pop .16s ease;
}
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.notif-head b { font-size: 12.5px; }
.notif-head button { font-size: 10.5px; color: var(--green-700); }
.notif-item { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .15s; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-soft); }
.notif-item.unread { background: #F7FCF9; }
.notif-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--mint); color: var(--green-700); }
.notif-ic .ic { width: 15px; height: 15px; }
.notif-ic.amber { background: var(--amber-bg); color: var(--amber); }
.notif-ic.blue { background: var(--blue-bg); color: var(--blue); }
.notif-main { min-width: 0; }
.notif-main b { display: block; font-size: 11.5px; font-weight: 600; }
.notif-main p { margin: 3px 0 0; font-size: 10.5px; line-height: 1.55; color: var(--muted); }
.notif-main span { display: block; margin-top: 5px; font-size: 9.5px; color: var(--muted-2); }
.notif-empty { padding: 36px 16px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* shared controls */
.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: .16s;
}
.btn .ic { width: 14px; height: 14px; }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 3px 10px rgba(11, 122, 92, .17); }
.btn-primary:hover { background: #096A50; }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: #CFE0D8; background: var(--surface-soft); }
.btn-soft { background: var(--mint); color: var(--green-700); }
.btn-soft:hover { background: var(--mint-strong); }
.btn-danger { background: #fff; border: 1px solid #EFD1CD; color: var(--rose); }
.btn-danger:hover { background: var(--rose-bg); }
.btn-sm { height: 30px; padding: 0 11px; border-radius: 8px; font-size: 11px; }
.btn:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
.link-btn { font-size: 11.5px; font-weight: 600; color: var(--green-700); }
.link-btn:hover { text-decoration: underline; }
.icon-action { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); }
.icon-action:hover { background: var(--surface-soft); color: var(--ink); }
.icon-action .ic { width: 15px; height: 15px; }

.field {
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 11.5px;
  outline: none;
  transition: .16s;
}
.field:focus { border-color: #B9DCCB; box-shadow: 0 0 0 3px rgba(14, 159, 110, .08); }
.select-field {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237D8C85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.search-box {
  height: 36px;
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.search-box:focus-within { border-color: #B9DCCB; box-shadow: 0 0 0 3px rgba(14, 159, 110, .08); }
.search-box .ic { width: 14px; height: 14px; color: var(--muted); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 11.5px; }
.search-box input::placeholder { color: var(--muted-2); }
textarea.field { height: auto; min-height: 74px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.checkbox { width: 15px; height: 15px; accent-color: var(--green-700); cursor: pointer; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px 14px; }
.card-title { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.card-sub { margin: 3px 0 0; font-size: 10.5px; color: var(--muted); }
.card-link { font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.card-link:hover { color: var(--green-700); }
.card-link .ic { width: 12px; height: 12px; }

.seg-tabs { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: #F2F6F3; border-radius: 10px; flex-wrap: wrap; }
.seg-tab {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #66756E;
  font-size: 11.5px;
  transition: .15s;
}
.seg-tab:hover { color: var(--ink); }
.seg-tab.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(16, 40, 30, .09); }
.tab-count {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  background: rgba(21, 37, 30, .06);
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}
.seg-tab.active .tab-count { background: var(--mint); color: var(--green-700); }

.badge {
  height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.pending { background: var(--amber-bg); color: var(--amber); }
.badge.ready { background: var(--blue-bg); color: var(--blue); }
.badge.shipping { background: #E8F7F0; color: var(--green-700); }
.badge.received { background: #EFF6F2; color: #3D7A61; }
.badge.done { background: #F2F4F3; color: #6B7771; }
.badge.cancelled { background: var(--rose-bg); color: var(--rose); }
.badge.processing { background: var(--blue-bg); color: var(--blue); }
.badge.resolved { background: #F2F4F3; color: #6B7771; }
.badge.unpaid { background: var(--amber-bg); color: var(--amber); }
.badge.settled { background: #EFF6F2; color: #3D7A61; }

.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--green-700); }
.delta .ic { width: 11px; height: 11px; }
.delta.down { color: var(--rose); }
.delta.flat { color: var(--muted); }

/* dashboard */
.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 26px 30px;
  border-radius: 20px;
  background: linear-gradient(116deg, #0A3327 0%, #0C4333 55%, #0E5B43 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(8, 44, 32, .16);
}
.dash-hero::before {
  content: '';
  position: absolute;
  right: 230px;
  top: -190px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 0 0 44px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .018);
  pointer-events: none;
}
.dash-hero::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 214, 154, .17), transparent 66%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 620px; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10.5px; letter-spacing: .1em; color: rgba(201, 232, 219, .66); }
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #37E0A1; box-shadow: 0 0 0 4px rgba(55, 224, 161, .12); }
.hero-title { margin: 10px 0 0; font-size: 26px; font-weight: 650; letter-spacing: -.01em; }
.hero-sub { margin: 8px 0 0; font-size: 12px; line-height: 1.75; color: rgba(221, 242, 233, .68); }
.hero-sub b { color: #fff; font-weight: 600; }
.hero-actions { display: flex; gap: 9px; margin-top: 18px; }
.hero-btn { height: 35px; padding: 0 14px; border-radius: 9px; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; transition: .16s; }
.hero-btn.white { background: #fff; color: var(--green-800); }
.hero-btn.white:hover { background: #E7F6EF; }
.hero-btn.ghost { background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .14); color: #E5F4ED; }
.hero-btn.ghost:hover { background: rgba(255, 255, 255, .13); }
.hero-btn .ic { width: 13px; height: 13px; }
.hero-timer {
  position: relative;
  z-index: 1;
  min-width: 268px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .11);
}
.timer-label { font-size: 10px; letter-spacing: .12em; color: rgba(198, 231, 217, .62); }
.timer-boxes { display: flex; align-items: flex-end; gap: 6px; margin-top: 9px; }
.timer-unit { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.timer-unit b {
  min-width: 44px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 25px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.timer-unit span { font-size: 9px; color: rgba(198, 231, 217, .55); }
.timer-sep { padding-bottom: 17px; color: rgba(255, 255, 255, .26); font-size: 18px; }
.timer-note { margin-top: 11px; font-size: 10px; color: rgba(198, 231, 217, .55); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.kpi {
  position: relative;
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: transform .16s, border-color .16s;
}
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { transform: translateY(-1px); border-color: #CFE2D8; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 11px; color: var(--muted); }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--mint); color: var(--green-700); }
.kpi-icon .ic { width: 16px; height: 16px; }
.kpi-icon.amber { background: var(--amber-bg); color: var(--amber); }
.kpi-icon.blue { background: var(--blue-bg); color: var(--blue); }
.kpi-icon.rose { background: var(--rose-bg); color: var(--rose); }
.kpi-value { margin-top: 11px; font-size: 28px; font-weight: 680; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 5px; }
.kpi-value small { font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.kpi-foot { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.kpi-foot .warn { color: var(--amber); }
.kpi-foot .danger { color: var(--rose); }
.kpi-foot .sep { width: 1px; height: 9px; background: var(--line); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(300px, .9fr); gap: 16px; margin-top: 16px; align-items: stretch; }
.dash-grid > * { min-width: 0; }
.chart-card { display: flex; flex-direction: column; }
.chart-meta { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.chart-wrap { flex: 1; padding: 2px 14px 12px; display: flex; align-items: center; }
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: #EEF3F0; stroke-width: 1; }
.chart-axis { fill: #A0ACA6; font-size: 10px; font-family: inherit; }
.chart-line { fill: none; stroke: var(--green-600); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartArea); }
.chart-dot { fill: #fff; stroke: var(--green-600); stroke-width: 2; transition: .15s; }
.chart-dot.last { fill: var(--green-600); stroke: #fff; stroke-width: 2.5; }
.chart-dot:hover { r: 5; }

.todo-list { list-style: none; margin: 0; padding: 2px 8px 12px; }
.todo-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 12px;
  border-radius: 11px;
  text-align: left;
  transition: background .15s;
}
.todo-item:hover { background: var(--surface-soft); }
.todo-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--mint); color: var(--green-700); flex-shrink: 0; }
.todo-ic .ic { width: 15px; height: 15px; }
.todo-ic.amber { background: var(--amber-bg); color: var(--amber); }
.todo-ic.blue { background: var(--blue-bg); color: var(--blue); }
.todo-ic.rose { background: var(--rose-bg); color: var(--rose); }
.todo-main { flex: 1; min-width: 0; }
.todo-main b { display: block; font-size: 11.5px; font-weight: 600; }
.todo-main span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.todo-arrow { color: var(--muted-2); }
.todo-arrow .ic { width: 14px; height: 14px; }
.todo-foot { padding: 0 20px 16px; }
.todo-foot .btn { width: 100%; }

.dash-grid.lower { grid-template-columns: minmax(0, 1.85fr) minmax(300px, .9fr); }
.latest-table .data-table { min-width: 620px; }
.latest-table .data-table th { padding-top: 9px; padding-bottom: 9px; }
.latest-table .data-table td { padding-top: 11px; padding-bottom: 11px; }
.latest-wrap { padding: 0 8px 10px; }
.latest-wrap .table-foot { border-top: 0; padding-top: 4px; }

.rank-list { list-style: none; margin: 0; padding: 4px 20px 18px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.rank-row + .rank-row { border-top: 1px solid var(--line-soft); }
.rank-no { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 650; flex-shrink: 0; }
.rank-row:nth-child(1) .rank-no { background: #FFF1D8; color: #9A6500; }
.rank-row:nth-child(2) .rank-no { background: #EFF3F1; color: #687871; }
.rank-row:nth-child(3) .rank-no { background: #F8EDE6; color: #9A6B4D; }
.rank-main { flex: 1; min-width: 0; }
.rank-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rank-line b { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-line span { font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rank-bar { margin-top: 6px; height: 5px; border-radius: 4px; background: #F0F4F2; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0E9F6E, #66D6AF); }
.rank-row:nth-child(n+4) .rank-bar i { background: #BFDDD0; }
.rank-foot { padding: 0 20px 16px; }

/* list pages */
.list-card { overflow: hidden; }
.list-toolbar { padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.filter-row { display: flex; align-items: center; gap: 9px; padding: 12px 18px; background: #FBFCFB; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.filter-row .search-box { min-width: 240px; }
.result-hint { margin-left: auto; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: #F3FAF7;
  border-bottom: 1px solid #E3F1EA;
  font-size: 11.5px;
  color: var(--ink-2);
}
.bulk-bar b { color: var(--green-700); }
.bulk-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bulk-divider { width: 1px; height: 12px; background: #D7E8DF; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11.8px; }
.data-table th {
  padding: 10px 14px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.data-table td { padding: 12px 14px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #FAFCFB; }
.data-table .row-click { cursor: pointer; }
.check-col { width: 42px; }
.check-col .checkbox { display: block; }
.order-table { min-width: 940px; }
.cell-strong { font-weight: 600; color: var(--ink); }
.cell-sub { margin-top: 3px; font-size: 10px; color: var(--muted); }
.store-cell { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.store-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--mint);
  color: var(--green-700);
  font-size: 11.5px;
  font-weight: 650;
}
.store-avatar.tone-blue { background: var(--blue-bg); color: var(--blue); }
.store-avatar.tone-amber { background: var(--amber-bg); color: var(--amber); }
.store-avatar.tone-rose { background: var(--rose-bg); color: var(--rose); }
.store-cell-text b { display: block; font-size: 11.8px; font-weight: 600; }
.store-cell-text span { display: block; margin-top: 2px; font-size: 9.8px; color: var(--muted); }
.amount-cell { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; white-space: nowrap; }
.row-btn { font-size: 11px; font-weight: 600; color: var(--green-700); padding: 3px 0; }
.row-btn:hover { text-decoration: underline; }
.row-btn.muted { color: var(--muted); font-weight: 500; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10.5px; }
.empty-state { padding: 58px 20px; text-align: center; color: var(--muted); }
.empty-state .empty-ic { width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-soft); color: var(--muted-2); }
.empty-state .empty-ic .ic { width: 20px; height: 20px; }
.empty-state b { display: block; color: var(--ink-2); font-size: 12.5px; }
.empty-state p { margin: 5px 0 0; font-size: 11px; }

/* products */
.view-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.view-tab {
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: .16s;
}
.view-tab:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.view-tab.active { background: #fff; border-color: var(--line); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.view-tab .ic { width: 14px; height: 14px; }
.view-tab-actions { margin-left: auto; display: flex; gap: 8px; }
.product-table { min-width: 900px; }
.product-cell { display: flex; align-items: center; gap: 10px; min-width: 230px; }
.thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex-shrink: 0;
  background: #F2F6F4;
}
.tone-aqua { background: #E6F7F7; }
.tone-rose { background: #FDEDF0; }
.tone-cream { background: #FBF3DF; }
.tone-peach { background: #FDEEE5; }
.tone-amber { background: #FBF1DD; }
.tone-lavender { background: #F1EDFB; }
.tone-ice { background: #EAF3FB; }
.product-cell-text b { display: block; font-size: 11.8px; font-weight: 600; }
.product-cell-text span { display: block; margin-top: 2px; font-size: 9.8px; color: var(--muted); }
.stock-cell { min-width: 140px; }
.stock-line { display: flex; align-items: center; gap: 8px; }
.stock-bar { flex: 1; max-width: 78px; height: 5px; border-radius: 4px; background: #EFF3F1; overflow: hidden; }
.stock-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }
.stock-bar i.low { background: #F0A43A; }
.stock-bar i.out { background: #E17068; }
.stock-num { font-size: 11px; font-variant-numeric: tabular-nums; }
.stock-num.low { color: var(--amber); }
.stock-num.out { color: var(--rose); }
.mini-tag { display: inline-flex; height: 20px; align-items: center; padding: 0 7px; border-radius: 5px; background: var(--surface-soft); color: var(--muted); font-size: 9.5px; }
.mini-tag.warn { background: var(--amber-bg); color: var(--amber); }
.mini-tag.danger { background: var(--rose-bg); color: var(--rose); }
.price-card { overflow: hidden; }
.price-toolbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.price-toolbar .store-picker { display: flex; align-items: center; gap: 8px; }
.price-toolbar label { font-size: 10.5px; color: var(--muted); }
.price-toolbar .field { min-width: 190px; }
.price-summary { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 10.5px; color: var(--muted); }
.price-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 18px 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #F6FAF8;
  border: 1px solid #E9F2ED;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.price-note .ic { width: 14px; height: 14px; color: var(--green-600); margin-top: 1px; flex-shrink: 0; }
.price-note b { color: var(--ink-2); font-weight: 600; }
.price-table { min-width: 780px; }
.price-input-wrap { display: flex; align-items: center; gap: 5px; }
.price-input-wrap span { font-size: 10px; color: var(--muted); }
.price-input { width: 84px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; outline: none; font-variant-numeric: tabular-nums; }
.price-input:focus { border-color: #B9DCCB; box-shadow: 0 0 0 3px rgba(14, 159, 110, .08); }
.price-delta { font-size: 10px; color: var(--muted); }
.price-delta.lower { color: var(--green-700); }
.price-delta.higher { color: var(--amber); }
.price-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line-soft); font-size: 10.5px; color: var(--muted); }
.price-foot .actions { display: flex; gap: 8px; }

/* stores */
.credit-cell { min-width: 190px; }
.credit-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.credit-line b { font-size: 11px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.credit-line span { color: var(--muted); font-variant-numeric: tabular-nums; }
.credit-bar { margin-top: 6px; height: 5px; border-radius: 4px; overflow: hidden; background: #EFF3F1; }
.credit-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green-500); }
.credit-bar i.medium { background: #E9AE4D; }
.credit-bar i.high { background: #DF7369; }
.store-table { min-width: 980px; }

/* delivery */
.delivery-toolbar { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; flex-wrap: wrap; }
.filter-chips { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip-filter {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10.5px;
}
.chip-filter:hover { border-color: #CFE0D8; color: var(--ink-2); }
.chip-filter.active { background: var(--green-700); border-color: var(--green-700); color: #fff; font-weight: 600; }
.delivery-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.board-col { background: #F7FAF8; border: 1px solid var(--line); border-radius: 15px; padding: 12px; min-height: 380px; }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 5px 12px; }
.board-title { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; }
.board-dot { width: 7px; height: 7px; border-radius: 50%; }
.board-dot.amber { background: #E9A23B; }
.board-dot.green { background: var(--green-600); }
.board-dot.gray { background: #A7B2AC; }
.board-count { height: 20px; min-width: 20px; padding: 0 6px; border-radius: 6px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 9.5px; color: var(--muted); }
.board-col-body { display: flex; flex-direction: column; gap: 9px; }
.delivery-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; box-shadow: 0 1px 2px rgba(16, 40, 30, .03); cursor: pointer; transition: .16s; }
.delivery-card:hover { border-color: #CFE2D8; box-shadow: 0 8px 20px rgba(16, 40, 30, .06); transform: translateY(-1px); }
.dc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dc-id { font-size: 10px; color: var(--muted); }
.dc-store { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.dc-store b { font-size: 12px; font-weight: 600; }
.dc-meta { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 9.8px; color: var(--muted); }
.dc-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.dc-items { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--muted); }
.dc-items b { font-size: 11px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.dc-driver { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 9.8px; color: var(--ink-2); }
.dc-driver .ic { width: 12px; height: 12px; color: var(--muted); }
.dc-actions { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-empty { padding: 32px 8px; text-align: center; font-size: 10.5px; color: var(--muted); }
.board-empty .empty-ic { width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--muted-2); }
.board-empty .ic { width: 15px; height: 15px; }
.delivery-note { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.delivery-note .ic { width: 13px; height: 13px; }

/* aftersales */
.reason-chip { display: inline-flex; height: 21px; padding: 0 7px; border-radius: 5px; align-items: center; background: var(--surface-soft); border: 1px solid var(--line); color: var(--ink-2); font-size: 9.5px; }
.case-table { min-width: 1000px; }
.case-product { display: flex; align-items: center; gap: 8px; }
.case-product .thumb { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
.case-product-text b { display: block; font-size: 11px; font-weight: 600; }
.case-product-text span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.case-amount { color: var(--rose); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* statements */
.statement-table { min-width: 960px; }
.stmt-period { font-size: 10.5px; color: var(--muted); }
.kpi-note { margin-left: auto; }
.stmt-store b { font-size: 11.8px; font-weight: 600; }
.stmt-store span { display: block; margin-top: 2px; font-size: 9.8px; color: var(--muted); }
.due-cell { font-size: 10.5px; color: var(--ink-2); }
.due-cell span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }

/* drawer */
.drawer-mask { position: fixed; inset: 0; z-index: 100; background: rgba(7, 24, 17, .4); backdrop-filter: blur(2px); animation: fade .18s ease; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 101;
  width: min(568px, 96vw);
  background: #fff;
  box-shadow: -30px 0 70px rgba(6, 24, 16, .2);
  display: flex;
  flex-direction: column;
  animation: slideIn .24s cubic-bezier(.2, .8, .2, 1);
}
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-eyebrow { font-size: 9.5px; letter-spacing: .12em; color: var(--muted); }
.drawer-title { margin: 5px 0 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.drawer-title.store-title { font-size: 19px; }
.drawer-sub { margin: 5px 0 0; font-size: 10.5px; color: var(--muted); }
.drawer-head-right { display: flex; align-items: center; gap: 9px; padding-top: 2px; }
.drawer-close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); background: #fff; }
.drawer-close:hover { background: var(--surface-soft); color: var(--ink); }
.drawer-close .ic { width: 14px; height: 14px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px 26px; background: #FBFCFB; }
.drawer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 13px 24px; border-top: 1px solid var(--line); background: #fff; }
.drawer-foot .foot-note { margin-right: auto; font-size: 10px; color: var(--muted); }
.drawer-section { margin-top: 16px; }
.drawer-section:first-child { margin-top: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.section-title h4 { margin: 0; font-size: 11.5px; font-weight: 650; }
.section-title span { font-size: 10px; color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.store-strip { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.strip-cell { padding: 12px 14px; }
.strip-cell + .strip-cell { border-left: 1px solid var(--line-soft); }
.strip-cell > span { display: block; font-size: 9.5px; color: var(--muted); }
.strip-cell b { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.strip-store { display: flex; align-items: center; gap: 9px; }
.strip-store .store-cell-text b { font-size: 12px; }
.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--amber-bg);
  color: #8B5B00;
  font-size: 10.5px;
  line-height: 1.65;
}
.alert.rose { background: var(--rose-bg); color: var(--rose); }
.alert .ic { width: 14px; height: 14px; margin-top: 1px; flex-shrink: 0; }
.alert button { font-weight: 600; color: inherit; text-decoration: underline; font-size: inherit; }
.line-list { list-style: none; margin: 0; padding: 0; }
.line-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.line-item + .line-item { border-top: 1px solid var(--line-soft); }
.line-item .thumb { width: 32px; height: 32px; border-radius: 9px; font-size: 17px; }
.line-main { flex: 1; min-width: 0; }
.line-main b { display: block; font-size: 11.2px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-main span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.line-qty { width: 52px; text-align: right; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.line-amount { width: 74px; text-align: right; font-size: 11.2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary-panel { padding: 12px 14px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 10.8px; color: var(--muted); }
.summary-row b { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.summary-row.total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--ink); }
.summary-row.total b { color: var(--orange); font-size: 16px; font-weight: 650; }
.timeline { padding: 4px 14px 6px; }
.tl-item { position: relative; padding: 0 0 15px 20px; border-left: 1px solid #E3EBE7; }
.tl-item:first-child { padding-top: 7px; }
.tl-item:last-child { padding-bottom: 7px; border-left-color: transparent; }
.tl-dot { position: absolute; left: -4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: #D8E3DD; border: 1.5px solid #fff; box-shadow: 0 0 0 1px #E3EBE7; }
.tl-item.done .tl-dot { background: var(--green-600); box-shadow: 0 0 0 1px var(--green-600); }
.tl-item.current .tl-dot { box-shadow: 0 0 0 3px var(--mint-strong); }
.tl-label { font-size: 11px; color: var(--ink-2); }
.tl-item.done .tl-label { color: var(--ink); font-weight: 500; }
.tl-item.current .tl-label { color: var(--green-700); font-weight: 600; }
.tl-time { margin-top: 3px; font-size: 9.5px; color: var(--muted); }
.note-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 10.8px; line-height: 1.7; color: var(--ink-2); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.info-cell { padding: 11px 13px; background: #fff; }
.info-cell span { display: block; font-size: 9.5px; color: var(--muted); }
.info-cell b { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; line-height: 1.5; }
.credit-panel { padding: 14px; }
.credit-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.credit-panel-head span { font-size: 10px; color: var(--muted); }
.credit-panel-head b { display: block; margin-top: 4px; font-size: 22px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.credit-panel-head small { font-size: 9.5px; color: var(--muted); }
.credit-panel .credit-bar { margin-top: 10px; height: 6px; }
.credit-foot { display: flex; justify-content: space-between; margin-top: 7px; font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; cursor: pointer; }
.mini-list li + li { border-top: 1px solid var(--line-soft); }
.mini-list li:hover { background: var(--surface-soft); }
.mini-list-left b { display: block; font-size: 10.5px; font-weight: 500; }
.mini-list-left span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.mini-list-right { text-align: right; }
.mini-list-right b { display: block; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-list-right span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.statement-hero { padding: 18px; background: linear-gradient(120deg, #0B3B2D, #0F5A43); color: #fff; border-radius: 13px; }
.statement-hero .sh-label { font-size: 10px; color: rgba(208, 236, 223, .62); }
.statement-hero .sh-amount { margin-top: 5px; font-size: 29px; font-weight: 680; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.statement-hero .sh-meta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 9.5px; color: rgba(208, 236, 223, .62); }
.statement-hero .sh-meta b { color: #fff; font-weight: 500; }
.ship-list { list-style: none; margin: 0; padding: 0; }
.ship-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; }
.ship-row + .ship-row { border-top: 1px solid var(--line-soft); }
.ship-row b { display: block; font-size: 10.5px; font-weight: 500; }
.ship-row span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.ship-row em { font-style: normal; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.adjust-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 13px; font-size: 10.5px; }
.adjust-row + .adjust-row { border-top: 1px solid var(--line-soft); }
.adjust-row span { color: var(--muted); }
.adjust-row em { font-style: normal; color: var(--rose); font-weight: 600; }
.aftersale-summary { display: flex; gap: 10px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.aftersale-summary .thumb { width: 40px; height: 40px; font-size: 21px; border-radius: 11px; }
.aftersale-summary-main { flex: 1; }
.aftersale-summary-main b { display: block; font-size: 11.5px; font-weight: 600; }
.aftersale-summary-main span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.aftersale-summary-amount { text-align: right; font-size: 15px; font-weight: 650; color: var(--rose); font-variant-numeric: tabular-nums; }
.aftersale-summary-amount span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted); font-weight: 400; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 11px; font-size: 10px; color: var(--muted); }
.case-meta b { color: var(--ink-2); font-weight: 500; }

/* modal */
.modal-mask { position: fixed; inset: 0; z-index: 200; background: rgba(7, 24, 17, .46); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 22px; animation: fade .16s ease; }
.modal {
  width: min(476px, 100%);
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(5, 22, 14, .28);
  animation: pop .18s cubic-bezier(.2, .8, .2, 1);
}
.modal.wide { width: min(520px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.modal-head p { margin: 5px 0 0; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.modal-body { padding: 16px 22px 20px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 13px 22px; background: #FAFCFB; border-top: 1px solid var(--line); }
.modal-foot .foot-note { margin-right: auto; font-size: 9.5px; color: var(--muted); }
.form-row { margin-top: 12px; }
.form-row:first-child { margin-top: 0; }
.form-row label { display: block; margin-bottom: 6px; font-size: 10.5px; color: var(--ink-2); font-weight: 500; }
.form-row .field { width: 100%; }
.form-hint { margin-top: 6px; font-size: 9.5px; color: var(--muted); line-height: 1.6; }
.form-error { margin-top: 6px; font-size: 9.5px; color: var(--rose); }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.choice {
  position: relative;
  display: block;
  padding: 10px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: .15s;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; font-size: 11px; font-weight: 600; }
.choice span { display: block; margin-top: 3px; font-size: 9px; color: var(--muted); line-height: 1.4; }
.choice:hover { border-color: #CFE2D8; }
.choice:has(input:checked) { border-color: var(--green-600); background: #F4FBF8; box-shadow: 0 0 0 2px rgba(14, 159, 110, .08); }
.choice:has(input:checked) b { color: var(--green-700); }
.dispatch-summary { padding: 11px 12px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line-soft); font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.dispatch-summary b { color: var(--ink); font-weight: 600; }
.credit-input-wrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.credit-input-wrap span { padding-left: 11px; color: var(--muted); font-size: 12px; }
.credit-input-wrap input { flex: 1; height: 38px; border: 0; outline: 0; padding: 0 11px 0 5px; font-size: 13px; font-variant-numeric: tabular-nums; }

/* toast */
#toast-root { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 300; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 10px;
  background: #12352A;
  color: #fff;
  font-size: 11.5px;
  box-shadow: 0 10px 30px rgba(5, 22, 14, .25);
  animation: toastIn .2s ease;
}
.toast .ic { width: 14px; height: 14px; color: #5FE0B0; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(28px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 1280px) {
  :root { --sidebar: 222px; }
  .view { padding: 22px 22px 44px; }
  .topbar { padding: 0 22px; }
  .global-search { width: 218px; }
  .dash-hero { padding: 23px 25px; }
  .hero-title { font-size: 24px; }
  .hero-timer { min-width: 246px; }
}

@media (max-width: 1120px) {
  :root { --sidebar: 76px; }
  .sidebar { padding: 20px 12px 16px; }
  .brand { justify-content: center; padding: 0; }
  .brand-text, .side-label, .nav-text, .nav-badge, .cutoff-card, .mini-link span { display: none; }
  .side-group { margin-top: 22px; }
  .nav-btn { justify-content: center; padding: 0; }
  .nav-btn.active::before { left: -12px; }
  .mini-link { justify-content: center; padding: 0; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .dash-grid.lower { grid-template-columns: 1fr; }
  .global-search { width: 190px; }
  .delivery-board { grid-template-columns: 1fr; }
  .board-col { min-height: 0; }
  .date-chip { display: none; }
}

@media (max-width: 860px) {
  .topbar { height: 64px; padding: 0 16px; }
  .view { padding: 16px 16px 36px; }
  .global-search, .profile-meta { display: none; }
  .dash-hero { flex-direction: column; align-items: stretch; padding: 21px; }
  .hero-timer { align-self: stretch; min-width: 0; }
  .hero-title { font-size: 22px; }
  .list-toolbar { flex-direction: column; align-items: flex-start; }
  .filter-row .search-box { min-width: 0; flex: 1; }
  .result-hint { margin-left: 0; }
  .view-tabs { flex-wrap: wrap; }
  .view-tab-actions { width: 100%; margin-left: 0; }
  .chart-meta { flex-wrap: wrap; justify-content: flex-end; }
  .topbar h1 { font-size: 16px; }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .store-strip { grid-template-columns: 1fr; }
  .strip-cell + .strip-cell { border-left: 0; border-top: 1px solid var(--line-soft); }
  .choice-grid { grid-template-columns: 1fr; }
}
