:root {
  /* Глубокий черный фон вместо темно-синего */
  --bg: #050505;
  
  /* Панели стали темнее и контрастнее */
  --panel: rgba(12, 12, 12, 0.9);
  --panel-2: rgba(20, 20, 20, 0.7);
  
  /* Обводки теперь едва заметные серые или темно-зеленые */
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(46, 204, 113, 0.15); /* Легкий зеленый оттенок в обводках */
  
  /* Текст чисто белый для контраста на черном */
  --text: #ffffff;
  --muted: #888888;

  /* Основной акцентный цвет - Неоновый зеленый (как на лого) */
  --accent: #2ecc71; 
  --accent-glow: rgba(46, 204, 113, 0.4);
  --accent-dim: rgba(46, 204, 113, 0.1);

  /* Вспомогательные цвета переведены в оттенки зеленого/серого */
  --green: #2ecc71;       /* Активный статус */
  --blue: #aaddff;        /* Инфо (сделан холодным бело-голубым) */
  --orange: #f1c40f;      /* Трафик (желто-зеленый) */
  --red: #e74c3c;         /* Ошибки/Истечение */
  
  --radius-xl: 22px;
  --radius-lg: 17px;
  --radius-md: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.8); /* Тени глубже */
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  
  /* Фон: Черный + Едва заметная сетка (под стиль лого) + Зеленое свечение снизу */
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(circle at 50% 100%, rgba(46, 204, 113, .15), transparent 50%),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto, auto;
}

button, select { font: inherit; }
button { cursor: pointer; }

.page-shell {
  width: min(100%, 960px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px 34px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  /* Более темный градиент панели */
  background: linear-gradient(180deg, rgba(10, 10, 10, .85), rgba(5, 5, 5, .95));
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  padding: 0 28px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0, 0, 0, .6);
}

.brand, .top-actions, .profile-line, .section-head, .btn-row, .stat-label {
  display: flex;
  align-items: center;
}

.brand { gap: 14px; }
.brand h1 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 30px);
  /* Заголовок теперь зеленый с легким свечением */
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 0 20px var(--accent-glow);
}

.brand img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.topbar .brand img {
  width: auto;
  max-width: 80px; /* максимальная ширина */
  height: auto;
  max-height: 70px; /* максимальная высота */
}

/* Логотип-маркер (полоски) теперь зеленые */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}
.brand-mark i {
  display: block;
  width: 4px;
  border-radius: 20px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.brand-mark i:nth-child(1) { height: 13px; opacity: 0.6; }
.brand-mark i:nth-child(2) { height: 24px; opacity: 0.8; }
.brand-mark i:nth-child(3) { height: 18px; opacity: 0.9; }
.brand-mark i:nth-child(4) { height: 27px; }

.top-actions { gap: 12px; }
.icon-btn {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  color: var(--muted); /* Иконки по умолчанию серые */
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(20, 20, 20, .5);
  transition: .2s ease;
}
/* При наведении становятся зелеными */
.icon-btn:hover { 
  color: var(--accent); 
  border-color: var(--accent); 
  background: var(--accent-dim);
  transform: translateY(-1px); 
  box-shadow: 0 0 15px var(--accent-dim);
}
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; opacity: .9; }

.glass-card {
  margin: 38px 30px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  /* Карточки почти черные, стекло */
  background: linear-gradient(180deg, rgba(20, 20, 20, .6), rgba(10, 10, 10, .8));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 38px rgba(0,0,0,.5);
}

.subscription-card { padding: 39px 38px 36px; }
.profile-line { gap: 16px; margin-bottom: 22px; }

/* Бейдж проверки (галочка) */
.check-badge, .step-icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--accent);
  border-radius: 50%;
  border: 1px solid var(--accent-glow);
  background: var(--accent-dim);
  box-shadow: 0 0 20px rgba(46, 204, 113, 0.1);
}
.check-badge svg, .step-icon svg { width: 27px; height: 27px; fill: currentColor; }

.profile-line h2 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -0.04em; color: #fff; }
.profile-line p { margin: 4px 0 0; color: var(--muted); font-weight: 600; font-size: 18px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  min-height: 80px;
  padding: 14px 16px 15px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-md);
  background: rgba(15, 15, 15, .8);
  overflow: hidden;
  position: relative;
}
/* Эффект свечения внутри статистики */
.stat::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 0 0, currentColor, transparent 62%);
  opacity: .08; /* Снижена прозрачность для строгости */
}

/* Цвета карточек статистики адаптированы под ч/б стиль */
.stat-blue { color: var(--blue); border-color: rgba(170, 221, 255, 0.2); }
.stat-green { color: var(--green); border-color: rgba(46, 204, 113, 0.3); box-shadow: 0 0 15px rgba(46, 204, 113, 0.05); }
.stat-red { color: var(--red); border-color: rgba(231, 76, 60, 0.2); }
.stat-orange { color: var(--orange); border-color: rgba(241, 196, 15, 0.2); }

.stat-label {
  gap: 7px;
  color: rgba(255, 255, 255, .4);
  font-size: 18px;
  font-weight: 650;
  margin-bottom: 5px;
}
.stat-label svg { width: 18px; height: 18px; fill: currentColor; }
.stat strong {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 20px;
  line-height: 1.22;
}

.install-card { padding: 39px 38px 38px; }
.section-head { justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; color: #fff; }

.platform-select {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  height: 47px;
  padding: 0 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(20, 20, 20, .6);
  color: var(--muted);
}
.platform-select select {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  appearance: none;
  cursor: pointer;
  font-size: 18px;
}

/* Баннер клиента - теперь в стиле "Matrix/Terminal" */
.client-banner {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  margin-bottom: 18px;
  overflow: hidden;
  color: var(--accent); /* Текст зеленый */
  font-size: 22px;
  font-weight: 800;
  border: 1px solid var(--accent-glow);
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(46, 204, 113, .1), rgba(0, 0, 0, .8));
  box-shadow: inset 0 0 25px rgba(46, 204, 113, .05), 0 0 15px rgba(46, 204, 113, .05);
}
.client-banner .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}
.shard {
  position: absolute;
  right: 14px;
  width: 20px;
  height: 58px;
  transform: skewX(-20deg);
  background: linear-gradient(180deg, rgba(46, 204, 113, .2), transparent);
}
.shard-two { right: 32px; opacity: .55; }

@keyframes pulse {
  0% { opacity: 1; box-shadow: 0 0 10px var(--accent); }
  50% { opacity: 0.5; box-shadow: 0 0 2px var(--accent); }
  100% { opacity: 1; box-shadow: 0 0 10px var(--accent); }
}

.step-list { display: grid; gap: 14px; }
.step-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  padding: 25px 26px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: rgba(18, 18, 18, .6);
  transition: border-color 0.3s;
}
.step-item:hover {
  border-color: rgba(46, 204, 113, 0.2);
}
.step-icon { margin-top: 2px; color: var(--muted); border-color: var(--stroke); background: rgba(255,255,255,0.03); }
.step-icon.success { color: var(--green); background: var(--accent-dim); border-color: var(--accent-glow); }
.step-item h3 { margin: 0 0 12px; font-size: 22px; letter-spacing: -0.02em; color: #fff; }
.step-item p { margin: 0 0 17px; color: var(--muted); font-size: 18px; line-height: 1.5; }
.step-item:last-child p { margin-bottom: 0; }

.btn-row { gap: 10px; flex-wrap: wrap; }

/* Кнопки действий - зеленые неоновые */
.action-btn, .store-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  color: #000; /* Черный текст на зеленой кнопке для читаемости */
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 800;
  text-decoration: none;
  transition: .2s ease;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.action-btn:hover, .store-btn:hover { 
  background: #27ae60; 
  transform: translateY(-2px); 
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}
.store-btn svg { width: 19px; height: 19px; fill: currentColor; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  translate: -50% 20px;
  opacity: 0;
  pointer-events: none;
  padding: 12px 18px;
  border: 1px solid var(--accent-glow);
  border-radius: 999px;
  background: rgba(10, 10, 10, .95);
  color: var(--accent);
  box-shadow: 0 20px 55px rgba(0,0,0,.8);
  transition: .22s ease;
}
.toast.show { opacity: 1; translate: -50% 0; }

@media (max-width: 720px) {
  .page-shell { padding: 0; }
  .panel { border-radius: 0; border-left: 0; border-right: 0; }
  .topbar { height: 73px; padding: 0 28px; }
  .glass-card { margin: 36px 28px; }
  .subscription-card, .install-card { padding: 34px 35px; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .top-actions { gap: 8px; }
  .icon-btn { width: 42px; height: 42px; }
  .glass-card { margin: 24px 14px; border-radius: 16px; }
  .subscription-card, .install-card { padding: 24px 18px; }
  .profile-line h2 { font-size: 22px; }
  .profile-line p, .stat-label, .step-item p, .platform-select select { font-size: 16px; }
  .stats-grid { gap: 10px; }
  .stat strong { font-size: 18px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .platform-select { width: 100%; }
  .step-item { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px; }
  .step-item h3 { font-size: 20px; }
  .client-banner { font-size: 19px; }
}


.refresh-section {
      margin-top: 24px;
      display: flex;
      justify-content: center;
    }
    
    /* Переопределяем стиль action-btn для этой конкретной кнопки */
    .refresh-btn {
      background: transparent;
      border: 1px solid var(--accent);
      color: var(--accent);
      box-shadow: none;
      width: 100%;
      max-width: 260px;
      justify-content: center;
      font-size: 16px;
    }
    
    .refresh-btn:hover {
      background: var(--accent-dim);
      box-shadow: 0 0 15px var(--accent-dim);
      transform: translateY(-1px);
    }
    
    .refresh-btn:active {
      transform: translateY(0);
    }
    
    .refresh-icon {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    
    /* Анимация вращения при загрузке */
    .refresh-btn.loading .refresh-icon {
      animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }