:root {
  --badge-live-bg: rgba(239, 51, 64, .14);
  --badge-live-fg: #ef3340;
  --badge-success-bg: rgba(80, 168, 50, .14);
  --badge-success-fg: #50a832;
  --badge-warning-bg: rgba(246, 184, 0, .16);
  --badge-warning-fg: #b88400;
  --badge-info-bg: rgba(23, 103, 177, .13);
  --badge-info-fg: #1767b1;
  --badge-muted-bg: rgba(109, 116, 128, .13);
  --badge-muted-fg: #59606b;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.badge i {
  font-size: 1em;
  line-height: 1;
}

.badge-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-live { background: var(--badge-live-bg); color: var(--badge-live-fg); }
.badge-success { background: var(--badge-success-bg); color: var(--badge-success-fg); }
.badge-warning { background: var(--badge-warning-bg); color: var(--badge-warning-fg); }
.badge-info { background: var(--badge-info-bg); color: var(--badge-info-fg); }
.badge-muted { background: var(--badge-muted-bg); color: var(--badge-muted-fg); }

.badge-tests {
  background: rgba(23, 103, 177, .12);
  color: #1767b1;
}

.badge-medals {
  background: rgba(246, 184, 0, .16);
  color: #a97800;
}

.badge-athletes {
  background: rgba(239, 51, 64, .13);
  color: #d72e39;
}

.badge-states {
  background: rgba(80, 168, 50, .14);
  color: #3f8f27;
}

.badge-date {
  background: rgba(17, 24, 32, .08);
  color: #111820;
  border: 1px solid rgba(17, 24, 32, .08);
}

.badge-time {
  background: rgba(23, 103, 177, .11);
  color: #1767b1;
  border: 1px solid rgba(23, 103, 177, .12);
}

.badge-featured {
  background: #50a832;
  color: #fff;
}

.badge-category {
  background: rgba(80, 168, 50, .13);
  color: #3f8f27;
}

.badge-venue {
  background: rgba(20, 100, 173, .12);
  color: #1464ad;
}

.badge-capacity {
  background: rgba(17, 24, 32, .1);
  color: #111820;
}

.badge-gold {
  background: rgba(246, 184, 0, .18);
  color: #a97800;
}

.badge-silver {
  background: rgba(155, 163, 170, .22);
  color: #59606b;
}

.badge-bronze {
  background: rgba(183, 98, 19, .16);
  color: #9a520f;
}

.badge-dark,
.on-image .badge,
.live-card .badge,
.news-card .badge,
.media-card .badge {
  background: rgba(7, 16, 24, .72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
}

.live-card .badge-live,
.news-card .badge-featured {
  border: 0;
  color: #fff;
}

.live-card .badge-live { background: #ef3340; }
.news-card .badge-featured { background: #50a832; }
.on-image .badge-date,
.on-image .badge-time,
.news-card .badge-date,
.live-card .badge-time {
  background: rgba(7, 16, 24, .72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
}

.badge-link {
  color: #1457b8;
  font-weight: 800;
}

.badge-link:hover {
  text-decoration: underline;
}

.badge-score {
  background: rgba(17, 24, 32, .08);
  color: #111820;
  font-size: 12px;
}

.badge-position {
  background: #111820;
  color: #fff;
}

.badge-file {
  background: rgba(239, 51, 64, .12);
  color: #d72e39;
}

.badge-size {
  background: rgba(17, 24, 32, .1);
  color: #3f4650;
}

.compact-row .badge,
.agenda-row .badge,
.result-row .badge,
.table-card .badge {
  vertical-align: middle;
}

.compact-row .badge-group,
.agenda-row .badge-group,
.result-row .badge-group {
  gap: 6px;
}

.agenda-row .event-main,
.result-row .result-main,
.compact-row .compact-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.table-card td .badge-group {
  justify-content: flex-start;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-28 { --p: 28%; }
.progress-31 { --p: 31%; }
.progress-41 { --p: 41%; }

html[data-theme="dark"] .badge:not(.badge-dark),
html[data-theme="dark"] .badge-date,
html[data-theme="dark"] .badge-category,
html[data-theme="dark"] .badge-info,
html[data-theme="dark"] .badge-score,
html[data-theme="dark"] .badge-file,
html[data-theme="dark"] .badge-size,
html[data-theme="dark"] .badge-capacity {
  color: #dce7f2;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .badge-info {
  color: #9ed0ff;
  background: rgba(23, 103, 177, .18);
}

html[data-theme="dark"] .badge-category {
  color: #9ee088;
  background: rgba(80, 168, 50, .16);
}

html[data-theme="dark"] .badge-date,
html[data-theme="dark"] .badge-size,
html[data-theme="dark"] .badge-capacity {
  color: #c9d4df;
  background: rgba(255, 255, 255, .07);
}

.news-detail-meta .badge,
html[data-theme="dark"] .news-detail-meta .badge {
  color: #ffffff;
  background: rgba(7, 16, 24, .55);
  border: 1px solid rgba(255, 255, 255, .18);
}

.news-detail-meta .badge .bi,
html[data-theme="dark"] .news-detail-meta .badge .bi {
  color: #f1b400;
}
.medal-loading[hidden] { display: none; }
.medal-loading { display: flex; align-items: center; gap: 10px; padding: 16px; margin-bottom: 12px; border-radius: 12px; background: #eaf2fa; color: #123754; font-weight: 600; }
.medal-loading-spinner { width: 20px; height: 20px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: medal-loading-spin .8s linear infinite; }
.medal-content-loading { opacity: .45; pointer-events: none; }
.medal-filter-tabs a[aria-disabled="true"], .m-tabs a[aria-disabled="true"] { opacity: .45; cursor: wait; }
html[data-theme="dark"] .medal-loading { background: #183247; color: #e9f3fc; }
@keyframes medal-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .medal-loading-spinner { animation: none; } }
