/* ============================================================
   Sekai — dashboard.css
   Главная: заголовок, стеклянные секции-панели, стат-карточки,
   платформы, лента активности.
============================================================ */

.view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Плавное каскадное появление секций при открытии/листании */
.view > * {
  animation: viewIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.view > *:nth-child(1) { animation-delay: 0ms; }
.view > *:nth-child(2) { animation-delay: 60ms; }
.view > *:nth-child(3) { animation-delay: 120ms; }
.view > *:nth-child(4) { animation-delay: 180ms; }
.view > *:nth-child(5) { animation-delay: 240ms; }
.view > *:nth-child(6) { animation-delay: 300ms; }
.view > *:nth-child(7) { animation-delay: 360ms; }

/* Заголовок страницы (без рамки, крупный) */
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 4px;
  border-bottom: none;
}

.view-head-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.view-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.view-eyebrow {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.1px;
  text-transform: none;
  color: var(--text-3);
}

.view-title {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.1px;
  color: var(--text);
  line-height: 1.12;
  text-shadow: 0 4px 30px rgba(80, 110, 255, 0.22);
}

.view-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.55;
  margin-top: 4px;
  max-width: 640px;
}

/* Декоративная цитата справа от заголовка */
.view-quote {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.2px;
  color: var(--text-3);
  text-align: right;
  max-width: 270px;
  padding-right: 4px;
  position: relative;
  top: -6px;
}

/* ============================================================
   СЕКЦИЯ — стеклянная панель-окно
============================================================ */
.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px 22px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-lg);
  box-shadow: var(--glass-shadow),
              0 0 0 1px rgba(125, 155, 255, 0.05),
              0 0 46px -14px rgba(110, 130, 255, 0.45);
  position: relative;
  overflow: hidden;
}

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

.section-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text);
}

.section-sub {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-4);
  margin-bottom: 5px;
}

.section-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  background: var(--glass-soft);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* Обзор */
.dash-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Платформы */
.dash-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

/* ============================================================
   КАРТОЧКА ПЛОЩАДКИ
============================================================ */
.platform-card {
  position: relative;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  box-shadow: 0 10px 30px rgba(2, 4, 12, 0.35),
              0 0 40px -14px rgba(110, 130, 255, 0.35);
  overflow: hidden;
}

.platform-card:hover {
  background: rgba(79, 125, 255, 0.10);
  border-color: rgba(125, 155, 255, 0.40);
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(6, 12, 40, 0.55);
}

.platform-card:active { transform: scale(0.99); }

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

.platform-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.40);
}

.platform-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Приятное цветное свечение карточек площадок */
.dash-platforms .platform-card:nth-child(1) { --pc-glow: rgba(0, 184, 148, 0.42); }
.dash-platforms .platform-card:nth-child(2) { --pc-glow: rgba(96, 130, 255, 0.42); }

.platform-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(130% 95% at 50% 0%, var(--pc-glow, rgba(120, 150, 255, 0.30)), transparent 62%);
  opacity: 0.45;
  transition: opacity var(--t);
  pointer-events: none;
  z-index: 0;
}

.platform-card:hover::after { opacity: 0.95; }

.platform-card > * { position: relative; z-index: 1; }

.platform-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.platform-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-country {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-4);
}

.platform-status { flex-shrink: 0; }

/* Статус-пилюля с «→» */
.platform-status .status {
  padding: 7px 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-line-hover);
  color: var(--text-2);
}

.platform-status .status::after {
  content: '→';
  margin-left: 7px;
  font-size: 11px;
  opacity: 0.75;
}

.platform-status .status.status-muted::before { display: none; }

.platform-status .status.status-ok {
  background: var(--ok-bg);
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--ok);
}

.platform-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 14px;
  position: relative;
}

/* Мягкая градиентная линия по всей ширине карточки */
.platform-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  right: -20px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(160, 182, 255, 0.16) 18%,
    rgba(160, 182, 255, 0.16) 82%,
    transparent);
}

.platform-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 16px;
}

.platform-stat:first-child { padding-left: 0; }

/* Вертикальная линия-разделитель между колонками (сверху вниз) */
.platform-stat + .platform-stat {
  border-left: 1px solid rgba(160, 182, 255, 0.14);
}

.platform-stat-val {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1;
}

.platform-stat-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-4);
  margin-top: 4px;
}

.platform-card.empty { opacity: 0.62; }
.platform-card.empty:hover { opacity: 1; }

/* ============================================================
   ЛЕНТА АКТИВНОСТИ
============================================================ */
.dash-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 440px;
  overflow-y: auto;
  position: relative;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
}

.dash-feed::-webkit-scrollbar { width: 6px; }
.dash-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 6px;
}

.feed-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 44px 20px;
  text-align: center;
  color: var(--text-4);
}

.feed-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: rgba(79, 125, 255, 0.14);
  border: 1px solid rgba(125, 155, 255, 0.30);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9db6ff;
  margin-bottom: 4px;
}

.feed-empty-icon svg { width: 24px; height: 24px; stroke-width: 1.5; }

.feed-empty-t {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

.feed-empty-s {
  font-size: 12.5px;
  color: var(--text-4);
  max-width: 340px;
  line-height: 1.55;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
  animation: slideUp 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feed-item:hover {
  background: rgba(79, 125, 255, 0.08);
  border-color: var(--glass-line);
}

.feed-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(79, 125, 255, 0.16);
  border: 1px solid rgba(125, 155, 255, 0.32);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9db6ff;
  flex-shrink: 0;
}

.feed-item-icon svg { width: 14px; height: 14px; stroke-width: 2; }

.feed-item-body {
  flex: 1;
  min-width: 0;
}

.feed-item-text {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
  word-break: break-word;
}

.feed-item-text b {
  color: var(--text);
  font-weight: 500;
}

.feed-item-time {
  font-size: 10.5px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.feed-item.ok .feed-item-icon {
  color: var(--ok);
  border-color: rgba(52, 211, 153, 0.35);
  background: var(--ok-bg);
}
.feed-item.warn .feed-item-icon {
  color: var(--warn);
  border-color: rgba(253, 224, 140, 0.32);
  background: var(--warn-bg);
}
.feed-item.err .feed-item-icon {
  color: var(--err);
  border-color: rgba(255, 150, 150, 0.32);
  background: var(--err-bg);
}

/* ============================================================
   СТАТ-КАРТОЧКИ (обзор) — как на макете
============================================================ */
.stat-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: 0 12px 34px rgba(2, 4, 12, 0.40),
              0 0 0 1px rgba(125, 155, 255, 0.05),
              0 0 42px -14px rgba(110, 130, 255, 0.40);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 152px;
  position: relative;
  overflow: hidden;
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}

.stat-card:hover {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.045) 100%);
  border-color: rgba(125, 155, 255, 0.38);
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(6, 12, 40, 0.55);
}

/* Стрелка-переход в правом верхнем углу */
.stat-card::before {
  content: '→';
  position: absolute;
  top: 20px;
  right: 22px;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-4);
  transition: color var(--t-fast), transform var(--t-fast);
  pointer-events: none;
  z-index: 3;
}

.stat-card:hover::before {
  color: var(--text-2);
  transform: translateX(3px);
}

/* Декоративный спарклайн справа */
.stat-card::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: 0;
  width: 56%;
  height: 56%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  pointer-events: none;
  opacity: 0.7;
  z-index: 1;
  transition: opacity var(--t);
}

.stat-card:hover::after { opacity: 0.95; }

/* Спарклайны по позициям: синий / фиолетовый / бирюзовый */
.dash-overview .stat-card:nth-child(1)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 90' preserveAspectRatio='none'%3E%3Cpath d='M0,74 C36,70 56,42 96,50 C136,58 156,28 196,38 L220,34 L220,90 L0,90 Z' fill='%234f7dff' fill-opacity='0.10'/%3E%3Cpath d='M0,74 C36,70 56,42 96,50 C136,58 156,28 196,38 L220,34' fill='none' stroke='%234f7dff' stroke-width='2' stroke-linecap='round' stroke-opacity='0.85'/%3E%3C/svg%3E");
}
.dash-overview .stat-card:nth-child(2)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 90' preserveAspectRatio='none'%3E%3Cpath d='M0,62 C34,58 60,74 98,66 C136,58 158,38 198,46 L220,42 L220,90 L0,90 Z' fill='%238b5cf6' fill-opacity='0.10'/%3E%3Cpath d='M0,62 C34,58 60,74 98,66 C136,58 158,38 198,46 L220,42' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-opacity='0.85'/%3E%3C/svg%3E");
}
.dash-overview .stat-card:nth-child(3)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 90' preserveAspectRatio='none'%3E%3Cpath d='M0,78 C40,76 54,48 92,56 C130,64 152,32 190,42 L220,38 L220,90 L0,90 Z' fill='%232dd4bf' fill-opacity='0.10'/%3E%3Cpath d='M0,78 C40,76 54,48 92,56 C130,64 152,32 190,42 L220,38' fill='none' stroke='%232dd4bf' stroke-width='2' stroke-linecap='round' stroke-opacity='0.85'/%3E%3C/svg%3E");
}

.stat-card-head {
  position: relative;
  z-index: 2;
  order: 1;
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(79, 125, 255, 0.16);
  border: 1px solid rgba(125, 155, 255, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9db6ff;
  margin-bottom: 0;
  box-shadow: 0 6px 18px rgba(40, 70, 200, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.stat-card-icon svg {
  width: 19px;
  height: 19px;
}

/* Цветные иконки по позициям */
.dash-overview .stat-card:nth-child(1) .stat-card-icon {
  background: rgba(79, 125, 255, 0.18);
  border-color: rgba(125, 155, 255, 0.40);
  color: #9db6ff;
}
.dash-overview .stat-card:nth-child(2) .stat-card-icon {
  background: rgba(139, 92, 246, 0.20);
  border-color: rgba(167, 139, 250, 0.42);
  color: #c4b5fd;
  box-shadow: 0 6px 18px rgba(110, 70, 220, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.dash-overview .stat-card:nth-child(3) .stat-card-icon {
  background: rgba(45, 212, 191, 0.16);
  border-color: rgba(45, 212, 191, 0.40);
  color: #7ef0df;
  box-shadow: 0 6px 18px rgba(20, 180, 160, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.stat-card-value {
  order: 3;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: var(--text);
  line-height: 1;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.stat-card-label {
  order: 2;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.1px;
  text-transform: none;
  color: var(--text-3);
  margin-top: 12px;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

/* ============================================================
   АДАПТИВ
============================================================ */
@media (max-width: 1200px) {
  .dash-platforms { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dash-overview,
  .dash-platforms { grid-template-columns: 1fr; }
  .view-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .view-title { font-size: 28px; }
}
