:root {
  --bg: #050816;
  --bg-card: #0b1020;
  --bg-card-alt: #111827;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.1);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
  --danger: #ef4444;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 60%, #000 100%);
  color: var(--text-main);
}

.top-bar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.9), rgba(5, 6, 30, 0.9));
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar__title {
  font-size: 20px;
  font-weight: 600;
}

.top-bar__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.layout {
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-auto-rows: minmax(0, auto);
  gap: 16px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-card-alt));
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.65);
  padding: 16px 18px;
}

.card--wide {
  grid-column: 1 / -1;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card__header h2 {
  font-size: 16px;
  font-weight: 600;
}

.card__body {
  margin-top: 8px;
}

.card__footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.card__footer-note {
  opacity: 0.8;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.metric {
  padding: 10px 12px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 80%);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.metric--big {
  padding: 12px 14px;
}

.metric__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.metric__value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 600;
}

.metric__note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.metric-list {
  margin-top: 8px;
}

.metric-list__item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(31, 41, 55, 0.7);
}

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

.metric-list__label {
  color: var(--text-muted);
}

.metric-list__value {
  font-weight: 500;
}

.badge {
  font-size: 11px;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.badge--green {
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 6px;
}

.table th,
.table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(31, 41, 55, 0.85);
}

.table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.8);
}

.table tr:hover td {
  background: rgba(15, 23, 42, 0.7);
}
