/* ================= REVENUE — только уникальные стили ================= */
/* Требует main.css */

/* ================= СЕКЦИИ ================= */
.rv-section {
  padding-top: 32px;
  padding-bottom: 16px;
}

/* Вводный абзац */
.rv-intro {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 820px;
}
.rv-intro b { color: var(--gold-light); font-weight: 800; }

/* ================= ЗАГОЛОВОК БЛОКА (золотая плашка со скошенным краем) ================= */
.rv-block-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 40px 10px 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: var(--bg-deep);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .3px;
  border-radius: 6px 0 6px 0;
  position: relative;
  margin-bottom: 28px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
}
.rv-block-title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.rv-block-title--with-sub {
  width: 100%;
  justify-content: space-between;
  clip-path: none;
  padding-right: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-radius: 6px 0 0 0;
}
.rv-block-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--bg-deep);
  opacity: .7;
  padding-right: 20px;
}

/* ================= ГРАФИК ================= */
.rv-chart-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 22px 26px;
}
.rv-chart-header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.rv-chart-month {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 600;
}
.rv-chart-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}
.rv-chart-downloads {
  font-size: 13px;
  color: var(--text-dim);
}

/* Столбики */
.rv-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 6px;
  height: 260px;
  padding: 20px 0 30px;
  border-bottom: 1px solid var(--border);
}

/* Горизонтальные линии (сетка) */
.rv-chart::before {
  content: '';
  position: absolute;
  inset: 20px 0 30px;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom,
      rgba(212,176,64,.06) 1px, transparent 1px);
  background-size: 100% 25%;
}

/* Столбик */
.rv-bar {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
}
.rv-bar-fill {
  width: 100%;
  background: rgba(240,232,208,.12);
  border: 1px solid rgba(240,232,208,.08);
  border-radius: 2px 2px 0 0;
  transform-origin: bottom;
  animation: rvGrow .6s ease-out backwards;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.rv-bar:hover .rv-bar-fill,
.rv-bar.active .rv-bar-fill {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: var(--gold-light);
  box-shadow: 0 0 18px rgba(212,176,64,.4);
}

/* Подписи месяцев под столбиками */
.rv-bar-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
  transition: color .2s;
}
.rv-bar:hover .rv-bar-label,
.rv-bar.active .rv-bar-label {
  color: var(--gold-light);
}

/* Анимация роста */
@keyframes rvGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ================= AT A GLANCE ================= */
.rv-glance {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.rv-glance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(212,176,64,.1);
  transition: background .2s;
}
.rv-glance-row:last-child { border-bottom: none; }
.rv-glance-row:hover { background: rgba(212,176,64,.04); }
.rv-glance-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.rv-glance-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-align: right;
}
.rv-glance-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}
.rv-change {
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rv-change.up { color: var(--green); }
.rv-change.down { color: var(--red); }

/* ================= ТАБЛИЦА ================= */
.rv-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.rv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.rv-table thead th {
  text-align: left;
  padding: 16px 18px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.25);
}
.rv-table thead th:not(:first-child) { text-align: right; }
.rv-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(212,176,64,.08);
  color: var(--text-muted);
  transition: background .15s;
}
.rv-table tbody td:not(:first-child) { text-align: right; }
.rv-table tbody td:first-child { color: var(--text); font-weight: 600; }
.rv-table tbody td b {
  color: var(--gold-bright);
  font-weight: 800;
}
.rv-table tbody tr:last-child td { border-bottom: none; }
.rv-table tbody tr:hover td {
  background: rgba(212,176,64,.05);
}
.rv-table tbody tr:hover td:first-child { color: var(--gold-light); }

.rv-table .up { color: var(--green); font-weight: 700; }
.rv-table .down { color: var(--red); font-weight: 700; }
.rv-table .flat { color: var(--text-dim); }

/* ================= АДАПТИВ ================= */
@media (max-width: 720px) {
  .rv-section { padding-top: 40px; padding-bottom: 24px; }
  .rv-intro { font-size: 15px; }

  .rv-block-title {
    font-size: 15px;
    padding: 9px 32px 9px 16px;
    margin-bottom: 22px;
  }
  .rv-block-title--with-sub { padding-right: 0; }
  .rv-block-sub { font-size: 11px; }

  .rv-chart-wrap { padding: 16px 14px 20px; }
  .rv-chart-header { gap: 8px; margin-bottom: 18px; }
  .rv-chart-month { font-size: 13px; }
  .rv-chart-value { font-size: 22px; }
  .rv-chart-downloads { font-size: 11px; width: 100%; }
  .rv-chart {
    height: 200px;
    gap: 3px;
    padding: 16px 0 26px;
  }
  .rv-bar-label { font-size: 9px; margin-top: 6px; }

  .rv-glance-row { padding: 14px 16px; flex-wrap: wrap; }
  .rv-glance-label { font-size: 13px; }
  .rv-glance-value { font-size: 15px; }

  .rv-table { font-size: 13px; min-width: 560px; }
  .rv-table thead th { padding: 12px 14px; font-size: 10px; }
  .rv-table tbody td { padding: 11px 14px; }
}

@media (max-width: 400px) {
  .rv-chart { height: 180px; gap: 2px; }
  .rv-bar-label { font-size: 8px; }
  .rv-chart-value { font-size: 20px; }
  .rv-glance-value { font-size: 14px; }
}