/* ── Shared ──────────────────────────────────────────────────────────────── */

.fbt-skeleton {
  font-family: sans-serif;
  padding: 1rem;
  color: #999;
  font-style: italic;
}

.fbt-error-card {
  font-family: sans-serif;
  padding: 1rem;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  background: #fff1f2;
}

.fbt-widget-heading {
  margin: 0 0 0.25rem;
  font-family: sans-serif;
}

.fbt-widget-updated {
  margin: 0 0 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* ── Dashboard / Charts ──────────────────────────────────────────────────── */

.fbt-dashboard-inner {
  font-family: sans-serif;
  padding: 1rem;
}

.fbt-dashboard-inner .fbt-widget-heading {
  margin-bottom: 0.75rem;
}

.fbt-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid #f0e6e2;
  margin-bottom: 1rem;
}

.fbt-tab {
  padding: 6px 14px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: #555;
  white-space: nowrap;
}

.fbt-tab.fbt-tab-active {
  border-bottom-color: #00919c;
  color: #00919c;
}

.fbt-tab-panel {
  display: none;
}

.fbt-tab-panel.fbt-tab-panel-active {
  display: block;
}

/* ── Tiles ───────────────────────────────────────────────────────────────── */

.fbt-tiles-latest {
  font-family: sans-serif;
}

.fbt-tiles-container {
  padding: 1rem;
}

.fbt-tiles-group {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.fbt-tiles-label {
  width: 130px;
  min-width: 130px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  padding-top: 0.5rem;
  padding-right: 1rem;
  line-height: 1.35;
}

.fbt-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.fbt-tile {
  padding: 0.625rem 0.75rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.fbt-tile-name {
  font-size: 0.7rem;
  color: #6b7280;
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.fbt-tile-value {
  font-size: 1.35rem;
  color: #00919c;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.2rem;
}

.fbt-tile-unit {
  font-size: 0.75rem;
  font-weight: 400;
}

.fbt-tile-age {
  font-size: 0.65rem;
  color: #9ca3af;
}

@media (max-width: 560px) {
  .fbt-tiles-group {
    flex-direction: column;
  }

  .fbt-tiles-label {
    width: 100%;
    min-width: 0;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0.4rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
  }

  .fbt-tiles-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    width: 100%;
  }
}

/* ── Powered-by footer ───────────────────────────────────────────────────── */

.fbt-widget-footer {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f0e6e2;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: right;
  font-family: sans-serif;
}

.fbt-widget-footer a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fbt-widget-footer a:hover {
  color: #00919c;
}

.fbt-widget-footer img {
  vertical-align: middle;
}
