/* SWORLD CRM TQ-04 — scoped monthly KPI cards, visually aligned with CRM Modern UI */
body.swcrm-tq04-dashboard .swcrm11n-page .swcrm-tq04-block {
  box-sizing: border-box;
  width: 100%; min-width: 0;
  margin: 16px 0 17px; padding: 21px 22px 17px;
  border: 1px solid #e3eaf5; border-radius: 16px;
  background: #fff; color: #0f172a;
  font-family: "Inter", "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
}
body.swcrm-tq04-dashboard .swcrm-tq04-block * { box-sizing: border-box; }
body.swcrm-tq04-dashboard .swcrm-tq04-head {
  display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin-bottom: 17px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-overline {
  display: block; color: #71829b; font-size: 10px; font-weight: 800;
  letter-spacing: 1.45px; line-height: 1.5; margin-bottom: 3px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-heading { min-width: 0; }
body.swcrm-tq04-dashboard .swcrm-tq04-heading h2 {
  margin: 0; color: #0f172a; font-size: 19px; line-height: 1.35;
  font-weight: 800; letter-spacing: -.3px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-heading p {
  color: #708098; font-size: 12px; margin: 4px 0 0; line-height: 1.5;
}
body.swcrm-tq04-dashboard .swcrm-tq04-progress {
  display: inline-flex; vertical-align: middle; padding: 2px 7px;
  border-radius: 99px; font-size: 10px; font-weight: 650;
  background: #eff6ff; color: #2563eb;
}
body.swcrm-tq04-dashboard .swcrm-tq04-filters {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px;
  flex: 0 1 auto; min-width: 0; margin: 0;
}
body.swcrm-tq04-dashboard .swcrm-tq04-filters label {
  font-size: 11px; font-weight: 700; color: #60738b; white-space: nowrap;
  margin: 0 0 0 4px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-filters select {
  width: auto; max-width: 145px; min-width: 78px; height: 35px;
  margin: 0; padding: 5px 29px 5px 10px;
  border: 1px solid #dce5f1; border-radius: 9px;
  background: #fff; color: #344054;
  font-size: 12px; font-weight: 650; line-height: 1.3;
}
body.swcrm-tq04-dashboard .swcrm-tq04-filters button {
  height: 35px; min-height: 35px; margin: 0; padding: 5px 13px;
  border: 1px solid #2e76ef; border-radius: 9px;
  background: #3185ff; box-shadow: none; color: #fff;
  font-size: 12px; font-weight: 750; line-height: 1.3; cursor: pointer;
}
body.swcrm-tq04-dashboard .swcrm-tq04-filters button:hover { background: #2367d6; }
body.swcrm-tq04-dashboard .swcrm-tq04-filters :is(select,button):focus-visible {
  outline: 2px solid #3185ff; outline-offset: 2px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-card {
  --swcrm-tq04-color: #3185ff; --swcrm-tq04-pale: #edf5ff;
  display: flex; flex-direction: column; min-width: 0; min-height: 160px;
  padding: 17px 17px 15px; border: 1px solid #e5ebf3; border-radius: 13px;
  background: linear-gradient(180deg, #fff, #fcfdff);
}
body.swcrm-tq04-dashboard .swcrm-tq04-sales { --swcrm-tq04-color: #dc930d; --swcrm-tq04-pale: #fff8e7; }
body.swcrm-tq04-dashboard .swcrm-tq04-ambassador { --swcrm-tq04-color: #109577; --swcrm-tq04-pale: #eaf8f2; }
body.swcrm-tq04-dashboard .swcrm-tq04-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-card-label {
  color: #64748b; font-size: 12px; font-weight: 730;
}
body.swcrm-tq04-dashboard .swcrm-tq04-card-symbol {
  display: flex; justify-content: center; align-items: center;
  width: 29px; height: 29px; flex: 0 0 29px;
  background: var(--swcrm-tq04-pale); border-radius: 9px;
  color: var(--swcrm-tq04-color); font-size: 18px; font-weight: 700;
}
body.swcrm-tq04-dashboard .swcrm-tq04-value {
  display: block; margin: 12px 0 13px; color: #14253d; font-size: clamp(21px, 2.1vw, 28px);
  line-height: 1.2; font-weight: 820; letter-spacing: -.5px;
  overflow-wrap: anywhere; font-variant-numeric: tabular-nums;
}
body.swcrm-tq04-dashboard .swcrm-tq04-card-bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px;
}
body.swcrm-tq04-dashboard .swcrm-tq04-trend {
  display: inline-flex; align-items: center; padding: 4px 8px;
  background: #f1f5f9; border-radius: 7px; color: #64748b;
  font-size: 11px; font-weight: 800; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
body.swcrm-tq04-dashboard .swcrm-tq04-trend.swcrm-tq04-positive { background: #eaf7ef; color: #087b53; }
body.swcrm-tq04-dashboard .swcrm-tq04-trend.swcrm-tq04-negative { background: #fff0ed; color: #c34331; }
body.swcrm-tq04-dashboard .swcrm-tq04-delta {
  color: #63748a; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums;
}
body.swcrm-tq04-dashboard .swcrm-tq04-compare {
  color: #8997aa; font-size: 11px; margin-top: 7px; line-height: 1.45;
}
body.swcrm-tq04-dashboard .swcrm-tq04-note {
  display: flex; justify-content: space-between; gap: 5px 18px; flex-wrap: wrap;
  color: #748297; margin-top: 12px; font-size: 11px; line-height: 1.55;
}
body.swcrm-tq04-dashboard .swcrm-tq04-reconcile { color: #977000; font-weight: 720; }
body.swcrm-tq04-dashboard .swcrm-tq04-error { border-color: #fbd4bc; background: #fffaf7; }
body.swcrm-tq04-dashboard .swcrm-tq04-error strong { font-size: 14px; }
body.swcrm-tq04-dashboard .swcrm-tq04-error p { margin: 5px 0; font-size: 12px; }
body.swcrm-tq04-dashboard .swcrm-tq04-error-detail { color: #9a6700; }
@media (max-width: 1150px) {
  body.swcrm-tq04-dashboard .swcrm-tq04-head { flex-direction: column; align-items: stretch; }
  body.swcrm-tq04-dashboard .swcrm-tq04-filters { justify-content: flex-start; }
}
@media (max-width: 850px) {
  body.swcrm-tq04-dashboard .swcrm-tq04-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.swcrm-tq04-dashboard .swcrm-tq04-card:first-child { grid-column: 1 / -1; }
  body.swcrm-tq04-dashboard .swcrm-tq04-value { font-size: 25px; }
}
@media (max-width: 560px) {
  body.swcrm-tq04-dashboard .swcrm11n-page .swcrm-tq04-block { padding: 16px 13px; }
  body.swcrm-tq04-dashboard .swcrm-tq04-cards { grid-template-columns: 1fr; }
  body.swcrm-tq04-dashboard .swcrm-tq04-card:first-child { grid-column: auto; }
  body.swcrm-tq04-dashboard .swcrm-tq04-card { min-height: 125px; padding: 14px; }
  body.swcrm-tq04-dashboard .swcrm-tq04-value { margin: 7px 0 11px; }
  body.swcrm-tq04-dashboard .swcrm-tq04-filters { gap: 6px; }
  body.swcrm-tq04-dashboard .swcrm-tq04-filters label { margin-left: 0; }
  body.swcrm-tq04-dashboard .swcrm-tq04-filters select { max-width: 140px; }
}
