/* ======================================== */
:root {
  --bg: #05010a;
  --bg2: #0b0220;
  --surface: #0f0a24;
  --surface2: #140c2e;
  --border: rgba(255, 255, 255, 0.10);
  --text: #e9e7ff;
  --muted: #8f96b3;

  --cyan: #00f5ff;
  --magenta: #ff2bd6;
  --yellow: #fcee09;
  --red: #ff3b6a;

  --glow-cyan: 0 0 18px rgba(0, 245, 255, 0.35);
  --glow-magenta: 0 0 18px rgba(255, 43, 214, 0.30);
}

html {
  height: 100%;
  background: radial-gradient(1200px 800px at 20% 0%, rgba(255, 43, 214, 0.10), transparent 55%),
              radial-gradient(900px 700px at 90% 10%, rgba(0, 245, 255, 0.10), transparent 60%),
              linear-gradient(180deg, var(--bg2), var(--bg));
  background-color: var(--bg);
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  /* Keep same background on body as a fallback, but ensure html also has it */
  background: radial-gradient(1200px 800px at 20% 0%, rgba(255, 43, 214, 0.10), transparent 55%),
              radial-gradient(900px 700px at 90% 10%, rgba(0, 245, 255, 0.10), transparent 60%),
              linear-gradient(180deg, var(--bg2), var(--bg));
  background-color: var(--bg);
  color: var(--text);
  min-height: 100%;
  line-height: 1.5;
  overflow-x: hidden; /* prevents 100vw sections from causing white gutters */
}

/* ========================================
   2. Центрирование контента (логин, регистрация и т.д.)
   ======================================== */
.revo-page--center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

/* ========================================
   3. Карточка контента
   ======================================== */
.revo-hero__content--center {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), var(--glow-magenta);
}

/* ========================================
   4. Бейдж (например, "New", "Beta")
   ======================================== */
.revo-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 43, 214, 0.12);
  color: var(--magenta);
  border: 1px solid rgba(255, 43, 214, 0.30);
  text-shadow: var(--glow-magenta);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ========================================
   5. Заголовки
   ======================================== */
.revo-title {
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.revo-accent {
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

.revo-subtitle {
  margin: 0 auto 24px auto;
  max-width: 60ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

/* ========================================
   6. Кнопки
   ======================================== */
.revo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 44px;
  letter-spacing: 0.2px;
}

.revo-btn:not(.revo-btn--primary):not(.revo-btn--ghost) {
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  color: #09010f;
  border: none;
  box-shadow: var(--glow-magenta), var(--glow-cyan);
}

.revo-btn:not(.revo-btn--primary):not(.revo-btn--ghost):hover {
  opacity: 0.95;
  box-shadow: 0 0 22px rgba(255, 43, 214, 0.35), 0 0 22px rgba(0, 245, 255, 0.35);
}

.revo-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px) scale(1.01);
}

.revo-btn:active {
  transform: translateY(0) scale(0.99);
}

.revo-btn--primary {
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  color: #09010f;
  border: none;
  box-shadow: var(--glow-magenta), var(--glow-cyan);
}

.revo-btn--primary:hover {
  opacity: 0.95;
  box-shadow: 0 0 22px rgba(255, 43, 214, 0.35), 0 0 22px rgba(0, 245, 255, 0.35);
}

.revo-btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.revo-btn--ghost:hover {
  background: rgba(0, 245, 255, 0.10);
  border-color: rgba(0, 245, 255, 0.55);
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.revo-btn--sm {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.revo-btn--ghost.revo-btn--sm {
  border: none;
}

.revo-btn--ghost.revo-btn--sm:hover {
  background: rgba(240, 185, 11, 0.15);
  color: #F0B90B;
}

/* ========================================
   7. Формы
   ======================================== */
.revo-form {
  margin-top: 20px;
  text-align: left;
}

.revo-field {
  margin-bottom: 16px;
}

.revo-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.revo-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.revo-field input:focus {
  outline: none;
  border-color: rgba(0, 245, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.22), var(--glow-cyan);
}

.revo-error {
  background: rgba(255, 59, 106, 0.14);
  border: 1px solid rgba(255, 59, 106, 0.35);
  color: var(--red);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  text-align: left;
  box-shadow: 0 0 18px rgba(255, 59, 106, 0.18);
}

.revo-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.revo-link:hover {
  text-decoration: underline;
}

/* ========================================
   8. Навбар
   ======================================== */
.revo-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 1, 10, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.revo-nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.revo-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  color: #FFFFFF;
}

.revo-brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: var(--glow-magenta);
  flex-shrink: 0;
}

.revo-brand__text {
  color: #FFFFFF;
}

.revo-nav__links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.revo-nav__link {
  height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.revo-nav__link:hover {
  background: rgba(0, 245, 255, 0.10);
  color: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.revo-nav__link--active {
  background: rgba(255, 43, 214, 0.14) !important;
  color: var(--magenta) !important;
  font-weight: 700;
  box-shadow: var(--glow-magenta);
}

.revo-nav__link--active:hover {
  background: rgba(255, 43, 214, 0.22) !important;
}

.revo-nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.revo-user {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.revo-nav__right form {
  margin: 0;
  padding: 0;
  display: inline-flex;
}

.revo-nav__right button {
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
}

/* ========================================
   9. Контейнеры и основной контент страницы
   ======================================== */
.revo-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.revo-main {
  padding: 48px 0 56px;
  min-height: calc(100vh - 80px);
}

.revo-page-title {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text);
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.revo-page-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 36px 0;
  max-width: 70ch;
  line-height: 1.6;
}

/* ========================================
   10. Сетка карточек
   ======================================== */
.revo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.revo-card {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.revo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), var(--glow-cyan);
  border-color: rgba(0, 245, 255, 0.35);
}

.revo-card__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
  letter-spacing: 0.2px;
}

.revo-card__desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

/* ========================================
   11. Таблица
   ======================================== */
.revo-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.revo-table th {
  background: rgba(255, 43, 214, 0.12);
  padding: 16px;
  text-align: left;
  font-weight: 800;
  color: var(--magenta);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid rgba(255, 43, 214, 0.25);
}

.revo-table td {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.revo-table tr:hover {
  background: rgba(0, 245, 255, 0.06);
}

/* ========================================
   12. Утилиты
   ======================================== */
.text-center { text-align: center; }
.mb-32 { margin-bottom: 32px; }
.mt-40 { margin-top: 40px; }

.revo-accent-text {
  color: var(--cyan);
  font-weight: 600;
  text-shadow: var(--glow-cyan);
}

/* ========================================
   13. Дополнительные элементы (HLR/утилиты)
   ======================================== */

/* Home: today stats card */
.home-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-stats__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.home-stats__title {
  margin-bottom: 0;
}

.home-stats__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.home-stats__status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.home-stats__panel {
  margin-top: 6px;
}

.home-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

@media (max-width: 560px) {
  .home-stats__grid {
    grid-template-columns: 1fr;
  }
}

.home-stats__tile {
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.home-stats__value {
  font-size: 30px;
  font-weight: 800;
  transition: all 0.4s;
}

.home-stats__label {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.home-stats__value--total {
  color: #F0B90B;
}

.home-stats__value--answered {
  color: #4CAF50;
}

.home-stats__value--asr {
  color: #00f5ff;
  text-shadow: var(--glow-cyan);
}

.home-stats__value--no-answer {
  color: #FFB74D;
}

.home-stats__value--failed {
  color: #EB5757;
}
.revo-card__subtitle {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.revo-pre {
  margin-top: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
  color: var(--text);
  overflow: auto;
  max-height: 520px;
}

.revo-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 14px 0;
}

.revo-kv {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.revo-kv b {
  color: var(--text);
  font-weight: 700;
}

.revo-card input[type="file"] {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  box-sizing: border-box;
}

.revo-card input[type="file"]:focus {
  outline: none;
  border-color: rgba(0, 245, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.22), var(--glow-cyan);
}

.revo-muted {
  color: var(--muted);
}

/* ========================================
   14. Upload (красивый input file)
   ======================================== */
.revo-upload {
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  transition: all 0.25s ease;
}

.revo-upload--drag {
  border-color: rgba(255, 0, 247, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.18), var(--glow-cyan);
  background: rgba(0, 245, 255, 0.06);
}

.revo-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.revo-upload__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.revo-upload__btn {
  padding: 10px 14px;
  min-height: 40px;
}

.revo-upload__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.revo-upload__name {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
}

.revo-upload__hint {
  font-size: 12px;
  color: var(--muted);
}

/* ========================================
   15. Stats (подробная статистика)
   ======================================== */

.stats {
  width: 100%;
}

.stats__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}

.stats__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stats__header::after {
  content: "";
  width: 72px;
  height: 2px;
  margin-top: 4px;
  background: rgba(0, 245, 255, 0.35);
  box-shadow: var(--glow-cyan);
}

.stats__title {
  margin: 0 0 10px 0;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1.05;
}

.stats__subtitle {
  margin: 0 0 18px 0;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.6;
  font-size: 15px;
}

/* ------------------------------------------------
   Layout: controls (left) + overview (right) + table (bottom)
   ------------------------------------------------ */

.stats__main {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "controls"
    "loader"
    "status"
    "overview"
    "table";
  gap: 20px;
  align-items: start;
}

/* Make children of statsResults become grid items */
#statsResults.stats__results {
  display: contents;
}

#statsResults.stats__results[hidden] {
  display: none;
}

@media (min-width: 1100px) {
  .stats__main {
    grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
    grid-template-areas:
      "controls overview"
      "loader loader"
      "status status"
      "table table";
    gap: 24px;
  }
}

.stats__controls {
  grid-area: controls;
}

#statsStatus {
  grid-area: status;
}

#statsLoader {
  grid-area: loader;
}

.stats__overview {
  grid-area: overview;
}

.stats__tablePanel {
  grid-area: table;
}

/* ------------------------------------------------
   Controls (period)
   ------------------------------------------------ */

.stats__controls {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: end;
  padding: 18px;
}

.stats__presets {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.stats__field {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stats__controls > .stats__field:last-of-type {
  grid-column: 1 / -1;
}

.stats__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 4px;
}

@media (min-width: 1100px) {
  .stats__field {
    grid-column: 1 / -1;
  }

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

.stats__input,
.stats__select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  color: var(--text);
  font-size: 15px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.stats__input:focus,
.stats__select:focus {
  outline: none;
  border-color: rgba(0, 245, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.22), var(--glow-cyan);
}

.stats__select option {
  background: #0b0220;
  color: var(--text);
}

/* Preset buttons (active state) */
.stats__preset {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text) !important;
  box-shadow: none;
}

.stats__preset:hover {
  border-color: rgba(0, 245, 255, 0.45) !important;
  background: rgba(0, 245, 255, 0.08) !important;
  color: var(--cyan) !important;
  box-shadow: var(--glow-cyan);
}

.stats__preset.is-active {
  border-color: rgba(0, 245, 255, 0.70) !important;
  background: rgba(0, 245, 255, 0.14) !important;
  color: var(--cyan) !important;
  box-shadow: var(--glow-cyan);
}

/* Dark date picker */
.stats__input[type="date"] {
  color-scheme: dark;
}

.stats__input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  opacity: 0.9;
}

/* ------------------------------------------------
   Status + loader
   ------------------------------------------------ */

.stats__status {
  margin-top: 0;
  min-height: 0;
  color: var(--muted);
  font-size: 14px;
}

.stats__status[data-kind="warn"] {
  color: var(--yellow);
}

.stats__status[data-kind="error"] {
  color: var(--red);
}

.stats__loader {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 245, 255, 0.30);
  background: rgba(0, 245, 255, 0.06);
  box-shadow: var(--glow-cyan);
  width: min(520px, 100%);
}

.stats__loader--top {
  margin: 6px 0 14px;
}

.stats__loaderTop {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats__loaderTop::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  animation: statsPulse 1s ease-in-out infinite;
}

@keyframes statsPulse {
  0% { transform: scale(0.75); opacity: 0.45; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.75); opacity: 0.45; }
}

.stats__loaderText {
  color: var(--cyan);
  font-weight: 700;
}

.stats__loaderPct {
  color: var(--cyan);
  font-weight: 700;
  margin-left: auto;
}

.stats__loaderHint {
  color: var(--muted);
  font-size: 12px;
}

.stats__progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stats__progressBar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.25), rgba(0, 245, 255, 0.9));
  box-shadow: var(--glow-cyan);
  transition: width 0.4s ease;
}

/* ------------------------------------------------
   Panels (overview + table)
   ------------------------------------------------ */

.stats__panel {
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Summary */
.stats__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 520px) {
  .stats__summary {
    grid-template-columns: 1fr;
  }
}

.stats__summaryItem {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.stats__summaryLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stats__summaryValue {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

/* KPI grid */
.stats__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 520px) {
  .stats__kpis {
    grid-template-columns: 1fr;
  }
}

.stats__kpi {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.stats__kpiLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stats__kpiValue {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(252, 238, 9, 0.20);
  letter-spacing: 0.2px;
  word-break: break-word;
}

/* Drilldown */
.stats__drill {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Table */
.stats__tableHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.stats__tableTitle {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.stats__tableActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats__tableWrap {
  margin-top: 10px;
  max-height: none;              /* no internal scrolling */
  overflow: visible;             /* page scroll only */
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface2), var(--surface));
}

.stats__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.stats__table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 43, 214, 0.14);
  backdrop-filter: blur(10px);
  padding: 8px 10px;             /* more compact */
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.2;
}

.stats__table td {
  padding: 7px 10px;             /* more compact */
  font-size: 16px;               /* bigger */
  line-height: 1.25;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stats__table tbody tr:hover td {
  background: rgba(0, 245, 255, 0.06);
}

.stats__table tbody tr:last-child td {
  border-bottom: none;
}

.stats__table td:nth-child(2),
.stats__table td:nth-child(3) {
  text-align: right;
  white-space: nowrap;
}

.stats__table td:first-child {
  text-align: left;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .stats__table td:first-child {
    max-width: 220px;
  }
}

/* ------------------------------------------------
   Table: full width + TOTAL row
   ------------------------------------------------ */

/* Make the table panel narrower (centered) */
.stats__tablePanel--full {
  width: 100%;
  max-width: 1080px;   /* уменьшает весь блок */
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px; /* возвращаем скругление */
  padding-left: 18px;  /* согласуем с .stats__panel */
  padding-right: 18px;
}


@media (max-width: 520px) {
  .stats__tablePanel--full {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Total row styling (sticky bottom inside scroll container) */
.stats__totalRow td {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--yellow);
  background: rgba(252, 238, 9, 0.10);
  border-top: 1px solid rgba(252, 238, 9, 0.28);
  font-size: 16px;
}

/* Sticky footer cells */
.stats__table tfoot td {
  position: static;
}

/* Keep TOTAL row readable when hovering other rows */
.stats__table tfoot tr:hover {
  background: rgba(252, 238, 9, 0.10);
}

/* Slightly emphasize totals numbers */
#statsTableTotalCalls,
#statsTableTotalSpend {
  color: var(--yellow);
  text-shadow: 0 0 18px rgba(252, 238, 9, 0.20);
}
