:root {
      --primary: #2563eb;
      --white: #ffffff;
      --gray-50: #f9fafb;
      --gray-100: #f3f4f6;
      --gray-200: #e5e7eb;
      --gray-300: #d1d5db;
      --gray-600: #4b5563;
      --gray-700: #374151;
      --gray-900: #111827;
      --radius: 12px;
      --shadow: 0 2px 6px rgba(0,0,0,0.05);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', sans-serif;
    }

    body {
      background-color: var(--gray-50);
      color: var(--gray-900);
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    /* SIDEBAR */
    .sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 68px;
  height: 100vh;
  background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: width 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar.expanded {
  width: 240px;
}

    .logo {
      padding: 0 1.25rem 1rem;
      font-weight: 700;
      font-size: 1.125rem;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .logo-icon {
      background: var(--primary);
      color: white;
      width: 28px;
      height: 28px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.85rem;
    }

    .sidebar:not(.expanded) .logo span {
      display: none;
    }

    .nav-links {
      flex: 1;
      padding: 0 0 1rem;
    }

    .nav-item .nav-link {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0.625rem 1.25rem;
      text-decoration: none;
      color: var(--gray-700);
      border-radius: var(--radius);
      font-weight: 500;
    }

    .sidebar:not(.expanded) .nav-link {
      justify-content: center;
      gap: 0;
      padding: 0.625rem 0;
    }

    .sidebar:not(.expanded) .nav-text {
      display: none;
    }

    .nav-link:hover, .nav-link.active {
      background: #dbeafe;
      color: var(--primary);
    }

    .user-info {
      padding: 0.75rem 1.25rem;
      display: flex;
      align-items: center;
      gap: 12px;
      border-top: 1px solid var(--gray-200);
      cursor: pointer;
    }

    .sidebar:not(.expanded) .user-info {
      padding: 0.75rem 0;
      justify-content: center;
    }

    .sidebar:not(.expanded) .user-info-text {
      display: none;
    }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
      font-size: 0.85rem;
    }

    .user-info-text span {
      display: block;
      font-size: 0.875rem;
    }

    .user-info-text .name {
      font-weight: 600;
      color: var(--gray-900);
    }

    .user-info-text .role {
      color: var(--gray-600);
    }

    /* MAIN LAYOUT */
.main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 68px;
  /* НЕТ margin-left */
}

    .content {
      padding: 1.25rem 1.25rem 0 1.25rem;
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1rem;
    }

    .section-title {
      font-size: 1.25rem;
      font-weight: 600;
    }

    .top-actions {
      display: flex;
      gap: 0.75rem;
      align-items: center;
    }

    .btn {
      padding: 0.5rem 1rem;
      border-radius: var(--radius);
      font-weight: 500;
      font-size: 0.9rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      border: 1px solid var(--gray-300);
      background: var(--white);
      color: var(--gray-700);
    }

    .btn-primary {
      background: var(--primary);
      color: white;
      border-color: var(--primary);
    }

    /* FILTERS */
    .filters-panel {
      position: fixed;
      top: 0;
      right: -320px;
      width: 300px;
      height: 100vh;
      background: var(--white);
      box-shadow: -4px 0 12px rgba(0,0,0,0.1);
      padding: 1.5rem;
      transition: right 0.3s ease;
      z-index: 900;
      overflow-y: auto;
    }

    .filters-panel.open {
      right: 0;
    }

    .overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.3);
      z-index: 800;
    }

    .overlay.active {
      display: block;
    }

    .filter-group {
      margin-bottom: 1.25rem;
    }

    .filter-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;
      font-size: 0.9rem;
    }

    .filter-group select,
    .filter-group input {
      width: 100%;
      padding: 0.625rem;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius);
      background: var(--white);
    }

    /* TABLE */
    .table-wrapper {
      background: var(--white);
      border-radius: var(--radius);
      box-shadow: var(--shadow-md);
      overflow: hidden;
      flex: 1;
      min-height: 0;
	  margin-bottom: 10px;
	  display: flex;
	  flex-direction: column;
    }

    .table-inner {
	  overflow: auto;
      height: 100%;
	  flex: 1;         /* ← занимает всё доступное пространство */
	  min-height: 0;
    }

    table {
      border-collapse: collapse;
      min-width: max-content;
    }

    th, td {
      padding: 0.875rem 1rem;
      text-align: left;
      border-bottom: 1px solid var(--gray-200);
      max-width: 200px;
	  height: 67px;
      overflow: hidden;
      text-overflow: ellipsis;
	  white-space: nowrap;
	  text-align: center; /* Горизонтальное центрирование */
	  vertical-align: middle; /* Вертикальное центрирование */
    }

    thead th {
      position: sticky;
      top: 0;
      background: var(--gray-50);
      font-weight: 600;
      font-size: 0.9rem;
      z-index: 10;
    }

    .row-new { background-color: #dbeafe !important; }
    .row-inprogress { background-color: #fef3c7 !important; }
	.row-correct { background-color: #f87171 !important; }
    .row-done { background-color: #dcfce7 !important; }
	
	
	.pagination-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.pagination-buttons .btn {
  min-width: 40px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

    /* ACTIONS */
    .actions-trigger {
      font-size: 1.3rem;
      cursor: pointer;
      color: var(--gray-600);
      transform: rotate(90deg);
      display: inline-block;
      line-height: 1;
    }

    .dropdown-menu {
      background: var(--white);
      border-radius: var(--radius);
      box-shadow: 0 6px 20px rgba(0,0,0,0.15);
      min-width: 160px;
      z-index: 1001;
      display: none;
    }

    .dropdown-menu div {
      padding: 0.5rem 1rem;
      cursor: pointer;
      font-size: 0.9rem;
    }

    .dropdown-menu div:hover {
      background: var(--gray-100);
    }

    /* MODAL — ключевые изменения здесь */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 2000;
      justify-content: center;
      align-items: flex-start;
      padding: 2rem;
      box-sizing: border-box;
	  align-items: center;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      background: var(--white);
      padding: 2rem;
      border-radius: var(--radius);
      box-shadow: 0 10px 40px rgba(0,0,0,0.25);
      max-width: calc(100% - 4rem); /* не шире экрана */
      width: fit-content; /* подстраивается под содержимое */
      max-height: calc(100vh - 4rem);
      overflow-y: auto;
    }

    .modal h2 {
      margin-bottom: 1.25rem;
      font-weight: 600;
      font-size: 1.25rem;
    }

    .form-row {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      margin-bottom: 1.25rem;
    }

    .form-group {
      flex: 1;
      min-width: 200px;
    }

    .form-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-weight: 500;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
      width: 100%;
      padding: 0.625rem;
      border: 1px solid var(--gray-300);
      border-radius: var(--radius);
    }

    .modal-footer {
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--gray-200);
    }

    .modal-footer .btn {
      padding: 0.625rem 1.5rem;
    }
	
	/* Стили подменю */
.submenu {
  display: none;
  list-style: none;
  padding-left: 2rem;
  background: var(--gray-50);
  margin-top: 4px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.submenu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 0;
}

.submenu li a:hover {
  background: var(--gray-200);
}

/* Стрелка */
.submenu-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.submenu-toggle.active .submenu-arrow {
  transform: rotate(90deg);
}

.sidebar:not(.expanded) .submenu {
  display: none !important;
}

    /* Адаптив для узких экранов */
    @media (max-width: 768px) {
      .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.5rem;
      }
    }
	
	