/* style.css — кастомные стили монитора ставок */

/* Фильтры */
.filters-card {
  margin-bottom: 1.5rem;
}

.filters-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ms-text);
  margin-bottom: 0.75rem;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 160px;
}

.filter-group--btn {
  flex-direction: row;
  gap: 0.5rem;
  align-items: flex-end;
  min-width: auto;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ms-text);
  opacity: 0.7;
}

/* Тулбар таблицы */
.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.count-badge {
  font-size: 0.85rem;
  color: var(--ms-text);
  opacity: 0.7;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.ms-select--sm {
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
}

/* Таблица ставок */
.table-scroll {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: var(--ms-shadow);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ms-surface);
  font-size: 0.92rem;
}

.rates-table th {
  background: var(--ms-primary);
  color: #fff;
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.rates-table td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
}

.rates-table tr:hover {
  background: rgba(37,99,235,0.04);
}

.rates-table tr:nth-child(even) {
  background: rgba(0,0,0,0.015);
}

.th-rate {
  text-align: right;
}

.td-rate {
  text-align: right;
  font-size: 1.1rem;
  color: #2563eb;
  font-weight: 700;
}

.td-bank {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bank-name {
  font-weight: 500;
}

.td-date {
  font-size: 0.8rem;
  opacity: 0.6;
  white-space: nowrap;
}

/* Топ-3 бейджи */
.top-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.top-badge--1 { background: #ffd700; color: #333; }
.top-badge--2 { background: #c0c0c0; color: #333; }
.top-badge--3 { background: #cd7f32; color: #fff; }

/* Чипы типа вклада */
.type-chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}
.type-chip--basic               { background: #e0e7ff; color: #3730a3; }
.type-chip--with_replenishment  { background: #dcfce7; color: #166534; }
.type-chip--with_capitalization { background: #fef9c3; color: #92400e; }
.type-chip--online              { background: #fce7f3; color: #9d174d; }

/* Пустая строка */
.empty-row {
  text-align: center;
  padding: 2rem;
  color: var(--ms-text);
  opacity: 0.5;
  font-style: italic;
}

/* Табы */
.tab-panel {
  margin-top: 1rem;
}

/* Сравнение */
.compare-hint {
  color: var(--ms-text);
  opacity: 0.7;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* История */
.chart-wrap {
  background: var(--ms-surface);
  border-radius: 8px;
  box-shadow: var(--ms-shadow);
  padding: 1.5rem;
  margin-top: 1rem;
}

.empty-msg {
  text-align: center;
  padding: 2rem;
  color: var(--ms-text);
  opacity: 0.5;
  font-style: italic;
  background: var(--ms-surface);
  border-radius: 8px;
  margin-top: 1rem;
}

/* Адаптив */
@media (max-width: 768px) {
  .filters-row {
    flex-direction: column;
  }
  .filter-group {
    min-width: 100%;
  }
  .rates-table {
    font-size: 0.82rem;
  }
  .td-rate {
    font-size: 1rem;
  }
}
