﻿:root {
  --bg: #f3f8f5;
  --panel: #ffffff;
  --ink: #16211c;
  --muted: #55685e;
  --ok: #0f8b4c;
  --bad: #c13636;
  --line: #d7e4db;
  --accent: #1f7a6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #dcf4e8 0%, var(--bg) 44%),
    radial-gradient(circle at 90% 10%, #d7efff 0%, rgba(255, 255, 255, 0) 40%);
}

.bg-blur {
  position: fixed;
  width: 32vw;
  height: 32vw;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.bg-a {
  background: #b9d8ff;
  top: -8vw;
  right: 2vw;
}

.bg-b {
  background: #b5efce;
  bottom: -10vw;
  left: -4vw;
}

.container {
  width: min(1280px, 94vw);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(16, 48, 40, 0.15);
  background: #fff;
}

.hero h1 {
  margin: 0;
  font-size: 46px;
  letter-spacing: 1px;
}

.hero p {
  margin: 8px 0;
  color: var(--muted);
}

.live-status {
  margin: 2px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(44, 162, 106, 0.35);
  color: #0b6f3d;
  background: rgba(184, 245, 209, 0.45);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #16b85f;
  box-shadow: 0 0 0 4px rgba(22, 184, 95, 0.18);
  animation: live-dot-green 1s infinite;
}

.live-status.is-alert {
  border-color: rgba(210, 83, 83, 0.4);
  color: #9e1e1e;
  background: rgba(255, 214, 214, 0.5);
}

.live-status.is-alert .live-dot {
  background: #d64545;
  box-shadow: 0 0 0 4px rgba(210, 83, 83, 0.2);
  animation: live-dot-red 1s infinite;
}

@keyframes live-dot-green {
  0% {
    transform: scale(0.86);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.0);
    opacity: 1;
  }
  100% {
    transform: scale(0.86);
    opacity: 0.45;
  }
}

@keyframes live-dot-red {
  0% {
    transform: scale(0.86);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.0);
    opacity: 1;
  }
  100% {
    transform: scale(0.86);
    opacity: 0.45;
  }
}

#meta {
  font-size: 13px;
  color: var(--muted);
}

section {
  margin-top: 24px;
}

h2 {
  margin: 0 0 12px;
  font-size: 32px;
  letter-spacing: 0.5px;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 282px;
  padding: 16px 18px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.34));
  box-shadow: 0 18px 42px rgba(24, 56, 49, 0.17), 0 4px 11px rgba(14, 38, 32, 0.09),
    inset 0 1px 1px rgba(255, 255, 255, 0.88), inset 0 -1px 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px) saturate(132%);
  -webkit-backdrop-filter: blur(16px) saturate(132%);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 48%, rgba(147, 210, 255, 0.22));
  z-index: -1;
}

.card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  right: -54px;
  top: -66px;
  background: radial-gradient(circle, rgba(113, 198, 255, 0.3), rgba(113, 198, 255, 0));
  z-index: -1;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 22px 48px rgba(24, 56, 49, 0.21), 0 7px 14px rgba(14, 38, 32, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.9), inset 0 -1px 1px rgba(255, 255, 255, 0.36);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-title-wrap {
  min-width: 0;
}

.card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.25px;
  word-break: break-word;
}

.strategy-sub {
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
  word-break: break-all;
}

.status-chip {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.status-ok {
  color: #0b6f3d;
  background: linear-gradient(160deg, rgba(184, 245, 209, 0.75), rgba(140, 227, 178, 0.64));
  border-color: rgba(44, 162, 106, 0.52);
}

.status-bad {
  color: #9e1e1e;
  background: linear-gradient(160deg, rgba(255, 214, 214, 0.78), rgba(255, 188, 188, 0.68));
  border-color: rgba(210, 83, 83, 0.52);
}

.metric-grid {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.metric-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.metric-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.metric-row b {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: #1b2722;
  font-variant-numeric: tabular-nums;
}

.metric-row-full {
  grid-template-columns: 92px 1fr;
  border-top: 1px dashed rgba(84, 117, 102, 0.32);
  padding-top: 8px;
  margin-top: 2px;
}

.weight-text {
  text-align: left !important;
  word-break: break-word;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(112, 141, 127, 0.24);
}

.message {
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
  color: #4f6157;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.62);
  word-break: break-word;
}

.time {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #edf2ec;
  font-size: 12px;
}

th {
  background: #edf5f0;
  font-size: 12px;
  color: #324239;
  position: sticky;
  top: 0;
}

.pager {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pager button {
  border: 1px solid var(--line);
  background: #fff;
  color: #324239;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ok {
  color: var(--ok);
}

.bad {
  color: var(--bad);
}

@media (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .card h3 {
    font-size: 20px;
  }

  .metric-row {
    grid-template-columns: minmax(130px, 1fr) auto;
  }
}

@media (max-width: 820px) {
  .hero-top {
    align-items: flex-start;
  }

  .hero-logo {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    min-height: auto;
    padding: 14px;
    border-radius: 16px;
  }

  .card-head {
    gap: 10px;
  }

  .card h3 {
    font-size: 18px;
  }

  .metric-row {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .metric-row b {
    font-size: 15px;
  }

  .metric-row-full {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .weight-text {
    text-align: left !important;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  .pager {
    justify-content: flex-start;
  }
}

