:root {
  --bg: #f4f8ff;
  --text: #0c1f47;
  --muted: #5f7095;
  --line: #dbe6ff;
  --card: #ffffff;
  --primary: #2669ff;
  --primary-strong: #1147c8;
  --primary-soft: #e8f0ff;
  --ok: #0f9b63;
  --warn: #d58a00;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7faff 0%, var(--bg) 55%, #eef4ff 100%);
}

.page-glow {
  position: fixed;
  inset: -120px auto auto -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 105, 255, 0.18) 0%, rgba(38, 105, 255, 0.03) 50%, transparent 72%);
  pointer-events: none;
}

.container {
  width: min(1380px, calc(100% - 40px));
  margin: 28px auto 50px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4a76e8;
}

h1 {
  margin: 7px 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-launch-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.feed-launch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(38, 80, 175, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.feed-launch-card.active {
  border-color: #245ede;
  box-shadow: 0 10px 24px rgba(17, 71, 200, 0.2);
  background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
}

.feed-launch-card h3 {
  margin: 0;
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.feed-icon {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #edf3ff;
  border: 1px solid #d7e4ff;
  font-size: 16px;
}

.feed-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feed-launch-btn {
  padding-inline: 14px;
}

.tab-btn {
  border: 1px solid #cadbff;
  background: #ffffff;
  color: #274c9e;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #eef4ff;
}

.tab-btn.active {
  color: #ffffff;
  border-color: #245ede;
  background: linear-gradient(135deg, #2d71ff 0%, #1147c8 100%);
  box-shadow: 0 8px 20px rgba(17, 71, 200, 0.28);
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 10px 24px rgba(17, 71, 200, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(17, 71, 200, 0.38);
}

.btn-accent {
  background: linear-gradient(135deg, #2f7dff 0%, #0042c8 100%);
  box-shadow: 0 10px 24px rgba(0, 66, 200, 0.34);
}

.btn-secondary {
  color: #1d3b81;
  background: var(--card);
  border-color: #cadeff;
}

.btn-secondary:hover {
  background: #f2f7ff;
}

.btn-ghost {
  color: #3559ab;
  background: #edf3ff;
}

.btn-ghost:hover {
  background: #e2ecff;
}

.btn-sm {
  padding: 8px 12px;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(38, 80, 175, 0.06);
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stat-card h2 {
  margin: 8px 0 0;
  font-size: 30px;
}

.ok {
  color: var(--ok);
}

.warn {
  color: var(--warn);
}

.diff-positive {
  color: #ff0000;
}

.diff-negative {
  color: #d58a00;
}

.muted {
  color: #8a98bb;
}

.feed-card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(22, 58, 149, 0.07);
}

.feed-card {
  margin-bottom: 14px;
}

.feed-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.quick-filter-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, #2d71ff 0%, #1147c8 100%);
  box-shadow: 0 8px 20px rgba(17, 71, 200, 0.24);
}

h3 {
  margin: 0;
  font-size: 21px;
}

.feed-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  color: #0f7f53;
  background: #d9f8ea;
}

.badge-warning {
  color: #966200;
  background: #ffefcc;
}

.badge-neutral {
  color: #536188;
  background: #e8edfb;
}

.feed-delta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.delta {
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 7px 10px;
}

.delta strong {
  font-size: 14px;
}

.delta.plus {
  color: #0f7f53;
  background: #d9f8ea;
}

.delta.neutral {
  color: #365cae;
  background: #eaf1ff;
}

.delta.minus {
  color: #996000;
  background: #fff0cf;
}

.feed-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel {
  margin-bottom: 14px;
}

.progress-panel {
  margin-bottom: 14px;
}

.progress-track {
  margin-top: 12px;
  width: 100%;
  height: 12px;
  background: #e7efff;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #d4e2ff;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4a8bff 0%, #2669ff 55%, #1147c8 100%);
  transition: width 0.25s ease;
}

.progress-text {
  margin: 10px 0 0;
  font-size: 13px;
}

.filters {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #445985;
}

select,
input {
  width: 100%;
  background: #f5f9ff;
  border: 1px solid #d3e1ff;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

select:focus,
input:focus {
  border-color: #79a1ff;
  box-shadow: 0 0 0 3px rgba(66, 128, 255, 0.15);
}

.table-wrap {
  margin-top: 14px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #e8eeff;
  font-size: 13px;
}

th {
  color: #496293;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  background: #fcfdff;
}

tr:hover td {
  background: #f9fbff;
}

@media (max-width: 960px) {
  .feed-launch-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
    margin-top: 18px;
  }

  .feed-launch-card {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
