:root {
  /* Brand */
  --sb-primary: #00a0ff;
  --sb-primary-strong: #0080cc;
  --sb-accent: #0052d9;
  --sb-bg: #eef6ff;
  --sb-panel: rgba(255, 255, 255, 0.92);
  --sb-text: #0d1b2a;
  --sb-muted: #64748b;
  --sb-border: rgba(0, 160, 255, 0.14);
  --sb-warning: #f59e0b;
  --sb-danger: #dc2626;
  --sb-success: #16a34a;

  /* Typography scale */
  --fs-xs:  11px;
  --fs-sm:  12px;
  --fs-base: 14px;
  --fs-md:  15px;
  --fs-lg:  16px;
  --fs-xl:  19px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  /* Semantic surface tints */
  --color-success-bg: rgba(22, 163, 74, 0.10);
  --color-warning-bg: rgba(245, 158, 11, 0.10);
  --color-danger-bg:  rgba(220, 38,  38, 0.08);
  --color-info-bg:    rgba(0,  160, 255, 0.08);

  /* Motion */
  --t-fast:   0.14s ease;
  --t-base:   0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);

  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0, 160, 255, 0.14), transparent 34rem),
    linear-gradient(135deg, #f5f9ff 0%, var(--sb-bg) 48%, #eef0ff 100%);
  color: var(--sb-text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 86px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--sb-border);
}

.topbar-title {
  font-size: 19px;
  font-weight: 800;
}

.topbar-subtitle {
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--sb-success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.13);
}

.topbar-chip {
  flex: none;
  max-width: 120px;
  min-height: 48px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sb-primary-strong);
  background: rgba(0, 160, 255, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  padding: 16px;
}

.hero-card,
.panel-card {
  border: 1px solid var(--sb-border);
  border-radius: 24px;
  background: var(--sb-panel);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
}

.hero-card {
  padding: 22px;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  padding: 5px 10px;
  color: var(--sb-primary-strong);
  background: rgba(0, 160, 255, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  margin-top: 10px;
  font-size: 25px;
  line-height: 1.25;
}

.hero-desc {
  margin-top: 8px;
  color: var(--sb-muted);
  line-height: 1.6;
}

.grid-2,
.grid-3,
.quick-grid {
  display: grid;
  gap: 12px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stats {
  margin-top: 18px;
}

.stat-mini,
.summary-card {
  padding: 14px 16px;
  border: 1px solid rgba(0, 160, 255, 0.10);
  border-left: 3px solid var(--sb-primary);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.stat-mini:active,
.summary-card:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-mini-label,
.summary-label {
  color: var(--sb-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.stat-mini-value,
.summary-value {
  margin-top: var(--sp-1);
  font-size: var(--fs-2xl);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--sb-text);
}

.summary-desc {
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
}

.section-block {
  margin-top: 16px;
  padding: 16px;
}

.section-title {
  font-size: var(--fs-lg);
  font-weight: 900;
}

/* Section header with optional action */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--sp-3);
}

.section-header-title {
  font-size: var(--fs-lg);
  font-weight: 900;
  color: var(--sb-text);
}

.section-header-action {
  flex: none;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--sb-primary-strong);
  text-decoration: none;
}

.muted {
  color: var(--sb-muted);
  font-size: 12px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.quick-action,
.todo-card,
.priority-card,
.list-item,
.action-card {
  width: 100%;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(0, 160, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.quick-action:active,
.todo-card:active,
.list-item:active,
.action-card:active {
  transform: scale(0.975);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-action {
  padding: 14px;
}

.quick-icon {
  display: block;
  font-size: 24px;
}

.quick-label,
.todo-label,
.item-title {
  display: block;
  margin-top: 8px;
  font-weight: 900;
}

.quick-desc,
.todo-desc,
.item-meta,
.item-desc {
  display: block;
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
  line-height: 1.45;
}

.priority-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  color: #fff;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--sb-primary), var(--sb-accent));
  box-shadow: 0 18px 45px rgba(0, 160, 255, 0.22);
}

.priority-callout.warning {
  background: linear-gradient(135deg, #b45309, #dc2626);
}

.priority-callout-tag,
.priority-callout-desc {
  opacity: 0.86;
  font-size: 12px;
}

.priority-callout-title {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 900;
}

.priority-callout-btn,
.refresh-btn,
.link-btn,
.action-btn,
.modal-btn,
.login-btn {
  min-height: 48px;
  padding: 12px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--sb-primary);
  border-radius: 14px;
  font-weight: 800;
}

.priority-callout-btn {
  flex: none;
  background: rgba(255, 255, 255, 0.2);
}

.link-btn {
  color: var(--sb-primary-strong);
  background: rgba(0, 160, 255, 0.08);
}

.todo-list,
.priority-list,
.device-list,
.alert-list,
.timeline,
.store-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.todo-card,
.priority-card,
.list-item,
.action-card {
  padding: 14px;
}

.todo-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.todo-left,
.todo-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.todo-icon {
  font-size: 22px;
}

.todo-right {
  text-align: right;
  color: var(--sb-primary-strong);
  flex-direction: column;
  gap: 2px;
}

.badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.badge-success {
  color: #166534;
  background: #dcfce7;
}

.badge-warning {
  color: #92400e;
  background: #fef3c7;
}

.badge-danger {
  color: #991b1b;
  background: #fee2e2;
}

.badge-info {
  color: #1e3a8a;
  background: #dbeafe;
}

.filters {
  display: grid;
  gap: 10px;
}

.search-input,
.select-input,
.note-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--sb-border);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--sb-text);
  background: #fff;
}

.note-input {
  min-height: 104px;
  resize: vertical;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip-btn {
  flex: none;
  padding: 8px 10px;
  color: var(--sb-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--sb-border);
  border-radius: 999px;
  font-weight: 800;
}

.chip-btn.active {
  color: #fff;
  background: var(--sb-primary);
}

.item-main {
  min-width: 0;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.action-btn.secondary,
.modal-btn.ghost {
  color: var(--sb-primary-strong);
  background: rgba(0, 160, 255, 0.08);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: 36px 20px 28px;
  color: var(--sb-muted);
  text-align: center;
}

.empty-state-icon {
  font-size: 38px;
  opacity: 0.35;
  line-height: 1;
}

.empty-state-title {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--sb-text);
  opacity: 0.45;
}

.empty-state-desc {
  font-size: var(--fs-sm);
  line-height: 1.55;
  max-width: 240px;
}

.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--sb-border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.tabbar-item {
  position: relative;
  display: grid;
  gap: 2px;
  color: var(--sb-muted);
  text-align: center;
  text-decoration: none;
  font-size: 9px;
  font-weight: 600;
  border-radius: 14px;
  padding: 6px 2px 7px;
  transition: color var(--t-fast);
}

.tabbar-item.active {
  color: var(--sb-primary-strong);
  background: rgba(0, 160, 255, 0.12);
  font-weight: 900;
}

.tabbar-item.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 3px;
  border-radius: 99px;
  background: var(--sb-primary);
}

.login-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
  gap: 18px;
  padding: 20px 16px 32px;
  background: radial-gradient(circle at top left, rgba(0, 82, 217, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(0, 160, 255, 0.16), transparent 30%),
    linear-gradient(180deg, #06101f 0%, #0e2244 44%, #f5f7fa 44%, #f5f7fa 100%);
}

.login-hero {
  color: #fff;
  padding: 4px 0 6px;
}

.login-logo-mark {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 14px rgba(0, 160, 255, 0.32));
}

.login-brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 160, 255, 0.15);
  border: 1px solid rgba(0, 160, 255, 0.3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.login-brand-mark-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.login-hero h1 {
  margin: 14px 0 8px;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.login-hero-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.6;
}

.login-footer-hint {
  margin-top: 16px;
  color: var(--sb-muted);
  font-size: 11px;
  text-align: center;
}

.login-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 40px rgba(14, 37, 81, 0.08);
  backdrop-filter: blur(20px);
}

.login-header {
  margin-bottom: 18px;
}

.login-header h2 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 900;
  color: #10213a;
}

.login-header p {
  margin: 0;
  color: #7a8599;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-btn {
  background: linear-gradient(135deg, #00a0ff 0%, #0052d9 100%);
  box-shadow: 0 12px 24px rgba(0, 160, 255, 0.28);
  border-radius: 16px;
  font-size: 16px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  background: rgba(15, 23, 42, 0.42);
}

.modal-card {
  padding: 18px;
  border-radius: 24px 24px 0 0;
  background: #fff;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-subtitle {
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.toast {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 92px;
  z-index: 60;
  padding: 12px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  text-align: center;
}

@media (min-width: 720px) {
  .app-shell {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ---- Bar chart (reports page) ---- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding: 0 2px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 4px;
}

.chart-val {
  font-size: 9px;
  color: var(--sb-muted);
  white-space: nowrap;
  line-height: 1;
}

.chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  background: var(--sb-accent);
  border-radius: 4px 4px 0 0;
  min-height: 3px;
  transition: height 0.3s ease;
}

.chart-label {
  font-size: 9px;
  color: var(--sb-muted);
  white-space: nowrap;
}

.chart-empty {
  color: var(--sb-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

/* ---- Device sales ranking ---- */
.device-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sb-border);
}

.device-row:last-child {
  border-bottom: none;
}

.device-row-rank {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sb-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-row-info {
  flex: 1;
  min-width: 0;
}

.device-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-row-bar-wrap {
  height: 4px;
  background: var(--sb-bg);
  border-radius: 2px;
  margin-top: 4px;
}

.device-row-bar {
  height: 100%;
  background: var(--sb-accent);
  border-radius: 2px;
  min-width: 4px;
  transition: width 0.3s ease;
}

.device-row-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sb-text);
  flex-shrink: 0;
}

/* ── 佣金页 ── */
.commission-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.commission-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--sb-border); }
.commission-row:last-child { border-bottom: none; }
.commission-period { font-weight: 600; font-size: 14px; min-width: 64px; color: var(--sb-text); }
.commission-total { flex: 1; font-size: 15px; font-weight: 700; color: var(--sb-text); }
.commission-status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.status-unsettled { background: rgba(245,158,11,.15); color: #b45309; }
.status-settled { background: rgba(34,197,94,.12); color: #15803d; }
.commission-detail-list { display: flex; flex-direction: column; gap: 0; }
.commission-detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--sb-border); }
.commission-detail-row:last-child { border-bottom: none; }
.commission-detail-no { font-size: 13px; font-weight: 600; color: var(--sb-text); }
.commission-detail-date { font-size: 11px; color: var(--sb-muted); margin-top: 2px; }
.commission-detail-amount { font-size: 16px; font-weight: 700; color: #16a34a; text-align: right; }
.commission-detail-meta { font-size: 11px; color: var(--sb-muted); text-align: right; margin-top: 2px; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 20px; margin-top: 4px; }
.chip-green { background: rgba(34,197,94,.12); color: #15803d; }
.chip-orange { background: rgba(245,158,11,.15); color: #b45309; }
.empty-hint { color: var(--sb-muted); font-size: 13px; padding: 20px 0; text-align: center; }

/* ── QR Scanner Overlay ── */
#qr-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.qr-view {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px 32px;
}
#qr-video {
  width: 100%;
  border-radius: 14px;
  display: block;
  background: #1a1a1a;
  max-height: 58vh;
  object-fit: cover;
}
.qr-frame {
  position: absolute;
  top: 24px;
  left: 20px;
  right: 20px;
  height: calc(58vh + 0px);
  pointer-events: none;
  border-radius: 14px;
}
.qr-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--sb-primary);
  border-style: solid;
}
.qr-corner.tl { top: 10px; left: 10px; border-width: 3px 0 0 3px; border-radius: 5px 0 0 0; }
.qr-corner.tr { top: 10px; right: 10px; border-width: 3px 3px 0 0; border-radius: 0 5px 0 0; }
.qr-corner.bl { bottom: 10px; left: 10px; border-width: 0 0 3px 3px; border-radius: 0 0 0 5px; }
.qr-corner.br { bottom: 10px; right: 10px; border-width: 0 3px 3px 0; border-radius: 0 0 5px 0; }
#qr-hint {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  margin: 0;
}
#qr-cancel {
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.25);
  background: transparent;
  margin-top: 4px;
}

/* ── Status dot semantic variants ── */
.status-dot.offline {
  background: var(--sb-muted);
  box-shadow: none;
}

.status-dot.warning {
  background: var(--sb-warning);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.status-dot.danger {
  background: var(--sb-danger);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

/* ── Skeleton loading ── */
@keyframes sb-shimmer {
  0%   { background-position: -400px 0 }
  100% { background-position: 400px 0 }
}

.skeleton {
  background: linear-gradient(90deg, #edf1f7 25%, #e2e8f0 50%, #edf1f7 75%);
  background-size: 800px 100%;
  animation: sb-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-text   { height: 13px; border-radius: 4px; }
.skeleton-value  { height: 26px; border-radius: 6px; margin-top: 6px; }
.skeleton-label  { height: 11px; border-radius: 4px; margin-top: 8px; width: 60%; }

/* ── Panel card header helper ── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}

.panel-header-title {
  font-size: var(--fs-md);
  font-weight: 900;
  color: var(--sb-text);
}

.panel-header-action {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--sb-primary-strong);
  text-decoration: none;
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--sb-border);
  margin: 14px 0;
}

/* ── Metric row (icon + label + value inline) ── */
.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sb-border);
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--color-info-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.metric-body {
  flex: 1;
  min-width: 0;
}

.metric-label {
  font-size: var(--fs-sm);
  color: var(--sb-muted);
  font-weight: 600;
}

.metric-value {
  font-size: var(--fs-lg);
  font-weight: 900;
  color: var(--sb-text);
  letter-spacing: -0.3px;
}

/* ── Number display (large KPI) ── */
.kpi-value {
  font-size: var(--fs-3xl);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--sb-text);
}

.kpi-label {
  margin-top: 4px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--sb-muted);
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
}

.kpi-trend.up   { background: var(--color-success-bg); color: var(--sb-success); }
.kpi-trend.down { background: var(--color-danger-bg);  color: var(--sb-danger); }
.kpi-trend.flat { background: var(--color-info-bg);    color: var(--sb-muted); }
