/* One shop's business figures — shared by the owner's phone page and the admin website. */
.fig-wrap { max-width: 1100px; margin: 0 auto; }
.fig-fresh {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 14px;
  border-radius: var(--r-lg, 14px); border: 1px solid var(--border, #e4e9f0); background: var(--surface, #fff);
}
.fig-fresh .fig-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--text-faint, #94a3b8); }
.fig-fresh.live .fig-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.fig-fresh.catching_up .fig-dot { background: var(--warn, #d97706); }
.fig-fresh.offline { background: var(--warn-light, #fef3c7); border-color: transparent; }
.fig-fresh.offline .fig-dot { background: var(--warn, #d97706); }
.fig-fresh.none .fig-dot { background: var(--text-faint, #94a3b8); }
.fig-fresh-text { min-width: 0; line-height: 1.4; }
.fig-fresh-text b { display: block; font-size: 14px; }
.fig-fresh-text span { font-size: 12.5px; color: var(--text-dim, #5b6b80); }
.fig-fresh.offline .fig-fresh-text span { color: #78350f; }

.fig-periods { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; margin-bottom: 8px; }
.fig-chip {
  flex: none; border: 1px solid var(--border, #e4e9f0); background: var(--surface, #fff); color: var(--text-dim, #5b6b80);
  border-radius: 20px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer;
}
.fig-chip.on { background: var(--brand, #0ea394); border-color: var(--brand, #0ea394); color: #fff; }
.fig-chip.fig-refresh { margin-left: auto; padding: 8px 11px; display: grid; place-items: center; }
.fig-range { font-size: 12px; color: var(--text-faint, #94a3b8); margin: 2px 2px 10px; }

.fig-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.fig-tile {
  background: var(--surface, #fff); border: 1px solid var(--border, #e4e9f0); border-radius: var(--r-lg, 14px);
  padding: 13px 14px; min-width: 0;
}
.fig-tile span { display: block; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim, #5b6b80); }
.fig-tile b { display: block; font-size: 20px; margin: 6px 0 2px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.fig-tile i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-faint, #94a3b8); }
.fig-tile.tone-brand { background: linear-gradient(150deg, var(--brand, #0ea394), var(--brand-dark, #0b7f74)); border-color: transparent; color: #fff; }
.fig-tile.tone-brand span, .fig-tile.tone-brand i { color: rgba(255, 255, 255, .82); }
.fig-tile.tone-warn b { color: var(--warn, #d97706); }
.fig-tile.tone-bad b { color: var(--danger, #dc2626); }

.fig-card {
  background: var(--surface, #fff); border: 1px solid var(--border, #e4e9f0); border-radius: var(--r-lg, 14px);
  padding: 14px 16px; margin-bottom: 14px; min-width: 0;
}
.fig-card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 650; }
.fig-card h4 { margin: 12px 0 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint, #94a3b8); }
.fig-note p { margin: 6px 0 0; color: var(--text-dim, #5b6b80); line-height: 1.5; }
.fig-chart { position: relative; height: 230px; }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fig-empty { margin: 4px 0; color: var(--text-faint, #94a3b8); font-size: 13px; }

.fig-bar-row { margin-bottom: 10px; }
.fig-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.fig-bar-top span { text-transform: capitalize; }
.fig-bar { height: 7px; border-radius: 4px; background: var(--surface-3, #eef2f7); margin: 5px 0 3px; overflow: hidden; }
.fig-bar > div { height: 100%; border-radius: 4px; background: var(--brand, #0ea394); }
.fig-bar-row i { font-style: normal; font-size: 11.5px; color: var(--text-faint, #94a3b8); }

.fig-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fig-table th { text-align: left; font-size: 11px; font-weight: 650; color: var(--text-faint, #94a3b8); text-transform: uppercase; letter-spacing: .04em; padding: 0 0 6px; }
.fig-table td { padding: 7px 0; border-top: 1px solid var(--border, #e4e9f0); }
.fig-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }

.fig-mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fig-mini > div { background: var(--surface-2, #f7f9fb); border-radius: 10px; padding: 9px 11px; min-width: 0; }
.fig-mini span { display: block; font-size: 11.5px; color: var(--text-dim, #5b6b80); }
.fig-mini b { display: block; font-size: 16px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.fig-mini .tone-warn b { color: var(--warn, #d97706); }
.fig-mini .tone-bad b { color: var(--danger, #dc2626); }
.fig-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border, #e4e9f0); font-size: 13px; }
.fig-line span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-line b { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.fig-line.tone-bad b { color: var(--danger, #dc2626); }

.fig-sale { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border, #e4e9f0); }
.fig-sale:first-of-type { border-top: 0; }
.fig-sale b { display: block; font-size: 13.5px; }
.fig-sale span { display: block; font-size: 11.5px; color: var(--text-faint, #94a3b8); }
.fig-sale .r { text-align: right; flex: none; }
.fig-tag { display: inline-block !important; margin-top: 3px; padding: 1px 8px; border-radius: 10px; font-size: 11px !important;
  background: var(--surface-3, #eef2f7); color: var(--text-dim, #5b6b80) !important; text-transform: capitalize; }
.fig-tag.tone-warn { background: var(--warn-light, #fef3c7); color: #92400e !important; text-transform: none; }
.fig-foot { font-size: 11.5px; color: var(--text-faint, #94a3b8); text-align: center; padding: 6px 10px 20px; line-height: 1.5; }

@media (max-width: 760px) {
  .fig-chip { padding: 7px 12px; font-size: 12.5px; }
  .fig-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fig-tile { padding: 11px 12px; }
  .fig-tile b { font-size: 17px; }
  .fig-grid { grid-template-columns: minmax(0, 1fr); }
  .fig-chart { height: 200px; }
}
