/* Защита от горизонтального скролла */
html, body { 
  overflow-x: hidden; 
  max-width: 100vw; 
}

/* Адаптация фона под тему */
.bg-light {
  background-color: var(--light-card, #f8f9fa) !important;
  color: var(--text-dark, #212529) !important;
}

/* Таблицы */
.table {
  color: var(--text-primary);
  border-color: rgba(0,0,0,0.1);
}

.table thead {
  background: var(--light-card, #f8f9fa);
  border-bottom: 2px solid rgba(0,0,0,0.1);
  font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0,0,0,0.03);
}

/* Типографика */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-secondary, #666);
}

/* Списки */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

ul li, ol li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: var(--text-secondary, #666);
}

/* Важные блоки */
.highlight-box {
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
  background: rgba(var(--primary-rgb, 0,123,255), 0.05);
  border-radius: 4px;
}

.highlight-box p:last-child {
  margin-bottom: 0;
}

/* Разделители */
hr {
  margin: 2.5rem 0;
  border-color: var(--border-color, rgba(0,0,0,0.1));
}

/* Адаптивность */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}