:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --btn: #3b82f6;
  --sidebar: #1e293b;
  --sidebar-hover: #334155;
  --border: #1f2937;
}

* {
  box-sizing: border-box;
}

/* карточка для логина */
.center {
  min-height: 100svh;
  display: grid;
  place-items: center;
}
.card {
  background: var(--card);
  padding: 28px;
  border-radius: 16px;
  max-width: 420px;
  width: 92%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
h1 {
  margin: 0 0 6px;
}
.muted {
  color: var(--muted);
  margin-top: 10px;
}

/* кнопки */
.btn {
  background: var(--btn);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.btn.small {
  padding: 8px 12px;
  border-radius: 8px;
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:hover:not(:disabled) {
  background: #2563eb;
}
body_login {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, Segoe UI, Roboto, Arial;
  display: flex;
  min-height: 100vh;
}
/* карточка для логина */




body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f6f6f9;
  color: #333;
}

.header {
  background: #2c3e50;
  color: #fff;
  padding: 10px 20px;
}
.header .brand {
  font-weight: bold;
  font-size: 18px;
}
.header .btn.small {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
}

.layout {
  display: flex;
  min-height: calc(100vh - 50px);
}

.sidebar {
  width: 200px;
  background: #34495e;
  padding: 10px;
}
.sidebar ul {
  list-style: none;   /* убираем маркеры */
  margin: 0;
  padding: 0;
}
.sidebar a {
  display: block;
  padding: 8px;
  margin: 4px 0;
  text-decoration: none;
  color: #ecf0f1;
  border-radius: 4px;
}
.sidebar a.active,
.sidebar a:hover {
  background: #1abc9c;
  color: #fff;
}

.main-content {
  flex: 1;
  padding: 20px;
  background: #fff;
}

.pagination {
  margin-bottom: 10px;
  font-size: 14px;
}

.table-responsive {
  overflow-x: auto;
}

.data-table,
.sub-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.data-table th,
.data-table td,
.sub-table th,
.sub-table td {
  border: 1px solid #ddd;
  padding: 8px;
}
.data-table th {
  background: #f2f2f2;
  text-align: left;
}
.sub-table th {
  background: #fafafa;
}

.label {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
}
.label.status {
  background: #00ced1;
}
.label.role.admin {
  background: #8b00ff;
}

.text-muted {
  color: #777;
  font-size: 12px;
}
.text-primary {
  color: #007bff;
}
.text-warning {
  color: #f39c12;
}

.user-info {
  display: block;
  font-size: 13px;
  margin: 2px 0;
}
.user-info.active {
  font-weight: bold;
  color: #007f00;
}
/* Контейнеры должны растягиваться */
.users,
.users .content {
  width: 100%;
  max-width: 100%;
}

/* Обёртка для таблицы */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* Основная таблица всегда на всю ширину */
.data-table {
  width: 100%;
  table-layout: fixed; /* распределяет ширину по столбцам */
}

/* Вложенная таблица (sub-table) пусть ведёт себя компактно */
.sub-table {
  width: 100%;
  table-layout: auto;
}
section {
  width: 100%;
  max-width: 100%;
}

section .content {
  width: 100%;
  max-width: 100%;
}
/*###############################*/
/* Контейнер карточек — только он управляет сеткой */
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* максимум 3 в ряд */
}

/* Адаптив: на средних — 2, на узких — 1 */
@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Внешний вид кликабельной карточки */
.cards .card {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e5eaea;
  border-radius: 8px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cards .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Иконка в круге */
.cards .card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #008cdb;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-right: 16px;
  flex-shrink: 0;
}

/* Текст */
.cards .card__text {
  font-size: 18px;
  line-height: 1.2;
  color: #1a1a1a;
}
