@font-face {
    src: url('../fonts/MuseoSansCyrl500.ttf');
    font-family: 'Museo Sans Cyrl';
}

@font-face {
    src: url('../fonts/MuseoSansCyrl700.ttf');
    font-family: 'Museo Sans Cyrl Bold';
}

html, body {
    height: 100%;
}

body {
    margin: 0 auto;
    font-family: 'Museo Sans Cyrl', sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
}

.header {
    flex-shrink: 0;
}

#content {
    flex: 1 0 auto; /* Content takes available space and can grow beyond viewport */
    display: flex;
    flex-direction: column;
    /* Removed min-height: 0 to allow natural content height */
}

.footer {
    flex-shrink: 0;
}

a {
    color: #00b0f0;
}

.header {
    padding: 10px;
    border-bottom: 1px solid #b4b4c1;
}

.container {
    max-width: 1170px;
    padding: 0 15px;
    margin: 0 auto;
}

.big-title {
    font-family: 'Museo Sans Cyrl Bold';
    font-size: 54px;
    line-height: 65px;
}

.big-title span {
    color: #00b0f0;
}

.main-button {
    margin-top: 60px;
}

.btn {
    padding: 14px 35px;
    background: #00b0f0;
    border-radius: 6px;
    font-size: 17px;
    line-height: 20px;
    color: #FFFFFF;
    border: 0;
    transition: .4s;
    cursor: pointer;
}

.btn:hover {
    background: #0187b8;
}

.btn:disabled {
    background: #c8c6cb;
    cursor: not-allowed;
}

.btn-transparent {
    background: transparent;
    color: #00b0f0;
    border: 1px solid #00b0f0;
}

.btn-transparent:hover {
    background: #00b0f0;
    color: #FFFFFF;
}

.btn-transparent:disabled {
    background: transparent;
    color: #c8c6cb;
    border: 1px solid #c8c6cb;
}

.common-title {
    font-family: 'Museo Sans Cyrl Bold', sans-serif;
    font-size: 48px;
    line-height: 58px;
}

.common-title span {
    color: #00b0f0;
}

.footer {
    text-align: center;
    padding: 40px 0;
    font-size: 13px;
    line-height: 16px;
    color: #b4b4c1;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile {
    display: flex;
    align-items: center;

}

.profile-img {
    margin-right: 5px;
    width: 40px;
}

.profile-info {}

.profile-user {
    font-size: 18px;
    line-height: 18px;
}

.profile-logout {
    font-size: 12px;
    line-height: 12px;
}

/*подсказка*/
@keyframes colorChange {
    0% { color: #90b4c1; }
    50% { color: #6acbee; }
    100% { color: #90b4c1; }
  }
  
  .test-help {
    margin-top: 50px;
    color: #90b4c1;
    animation: colorChange 1s 4 alternate; /* используем анимацию colorChange в течение 2 секунд, 10 раз с чередующимися изменениями цвета */
  }
  
  
/* Стили для элементов, видимых только преподавателям и администраторам */
.teacher-only,
.admin-only {
  display: none;
}

/* Стили для навигации */
.navigation {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: #333;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-link:hover {
  background-color: #f0f0f0;
}

/* Стили для преподавательской панели */
.teacher-panel {
  padding: 40px 0;
  min-height: 100vh;
}

.teacher-panel .container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

.teacher-panel .navigation {
  margin-bottom: 30px;
}

.teacher-panel h1 {
  margin-bottom: 40px;
}

.teacher-panel h2 {
  margin: 40px 0 20px 0;
  font-size: 36px;
  line-height: 44px;
  color: #333;
}

.teacher-panel .table-container {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}

/* Стили для таблицы пользователей */
.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.users-table th,
.users-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.users-table th {
  background: linear-gradient(135deg, #00b0f0, #0187b8);
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.users-table tbody tr:hover {
  background-color: #f8f9fa;
}

.users-table tbody tr:last-child td {
  border-bottom: none;
}

/* Стили для ячеек с информацией о пользователе */
.user-info-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-small {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00b0f0, #0187b8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.user-details {
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

/* Стили для бейджей ролей и статусов */
.role-badge,
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.role-student {
  background: #e3f2fd;
  color: #1976d2;
}

.role-badge.role-teacher {
  background: #f3e5f5;
  color: #7b1fa2;
}

.role-badge.role-admin {
  background: #ffebee;
  color: #d32f2f;
}

.status-badge.status-online {
  background: #e8f5e8;
  color: #2e7d32;
}

.status-badge.status-recent {
  background: #fff3e0;
  color: #f57c00;
}

.status-badge.status-inactive {
  background: #fafafa;
  color: #616161;
}

.status-badge.status-never {
  background: #ffebee;
  color: #d32f2f;
}

.status-badge.status-unknown {
  background: #f5f5f5;
  color: #9e9e9e;
}

/* Стили для кнопок действий */
.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 16px;
}

.users-table, .stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.users-table th, .users-table td,
.stats-table th, .stats-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.users-table th, .stats-table th {
  background-color: #f5f5f5;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stat-card {
  background: #f9f9;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
 font-weight: bold;
  color: #00b0f0;
}

/* Стили для административной панели */
.admin-panel {
  padding: 40px 0;
  min-height: 100vh;
}

.admin-panel .container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

.admin-panel h1 {
  margin-bottom: 40px;
}

.admin-actions {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.form-section {
  background: #f9f9f9;
  border-radius: 8px;
  margin: 40px 0;
  overflow: hidden;
}

.form-section .form {
  padding: 0;
}

.form-section .form .container {
  padding: 0;
}

.form-section .form-content {
  max-width: 100%;
  margin-right: 0;
  padding: 40px;
}

.form-section h2 {
  font-size: 36px;
  line-height: 44px;
  margin-bottom: 40px;
  color: #333;
}

.form-section .form-details {
  max-width: 100%;
  margin-top: 0;
}

.form-section .form-group {
  position: relative;
  border: 1px solid #C1BBBB;
  background: #FFF;
  padding: 12px 23px 13px 23px;
  width: 100%;
  height: 74px;
  box-sizing: border-box;
  transition: .2s ease all;
  margin-bottom: 20px;
}

.form-section .form-input {
  width: 100%;
  height: 100%;
  padding: 0;
  outline: 0;
  border: 0;
  font-family: 'Museo Sans Cyrl Bold', sans-serif;
  font-size: 18px;
  line-height: 22px;
  color: #00b0f0;
  background: transparent;
}

.form-section .form-lable {
  color: #333;
  font-size: 18px;
  line-height: 22px;
  position: absolute;
  left: 23px;
  top: 26px;
  transition: .2s ease all;
  pointer-events: none;
}

.form-section .form-input:focus~.form-lable,
.form-section .form-input:not(:focus):valid~.form-lable {
  top: 12px;
  font-size: 14px;
}

.form-section .form-input:valid,
.form-section .form-input:focus {
  margin-top: 27px;
  height: auto;
}

.form-section .form-group:focus-within {
  border-left: 5px solid #00b0f0;
}

.form-section .password-input-group {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-section .password-input-group .form-input {
  flex: 1;
  position: relative;
}

.form-section .password-input-group .btn-secondary {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.form-section .password-input-group .btn-secondary:first-of-type {
  right: 36px;
}

.form-section .password-input-group .btn-secondary:last-of-type {
  right: 0;
}

.form-section .form-group:focus-within .password-input-group .btn-secondary,
.form-section .form-input:not(:focus):valid ~ .btn-secondary {
  opacity: 1;
}

.form-section .password-input-group .form-lable {
  position: absolute;
  left: 0;
  top: 26px;
  transition: .2s ease all;
  pointer-events: none;
  z-index: 1;
}

.form-section .password-input-group .form-input:focus ~ .form-lable,
.form-section .password-input-group .form-input:not(:focus):valid ~ .form-lable {
  top: 12px;
  font-size: 14px;
}

.form-section .password-input-group .btn-secondary {
  padding: 6px 8px;
  min-width: 32px;
  font-size: 12px;
}

.form-section .form-button {
  margin-top: 40px;
  text-align: center;
}

.stats-section h2 {
  margin-bottom: 30px;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 176, 240, 0.1);
}

.stat-card h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.role-stats {
  text-align: left;
  margin-top: 15px;
}

.role-stats div {
  margin: 8px 0;
  font-size: 14px;
  color: #666;
}

/* Common UI Components Styles */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.spinner {
  width: 40px;
 height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #00b0f0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.alert {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.alert-info { background-color: #d1ecf1; border-left: 4px solid #00b0f0; color: #0c5460; }
.alert-success { background-color: #d4edda; border-left: 4px solid #28a745; color: #155724; }
.alert-warning { background-color: #fff3cd; border-left: 4px solid #ffc107; color: #856404; }
.alert-error { background-color: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; }

.alert-close {
  background: none;
  border: none;
 font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0.5);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 400px;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 4px;
}

.input-error {
  border-color: #dc3545 !important;
}

/* Password input group styles */
.password-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.password-input-group .form-control {
  flex: 1;
}

.password-input-group .btn-secondary {
  padding: 8px 10px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
  flex-shrink: 0;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-input-group .btn-secondary:hover {
  background: #5a6268;
}
/* Responsive design для админ-панели */
@media (max-width: 1100px) {
  .form-section .form-content {
    padding: 30px 20px;
  }

  .form-section h2 {
    font-size: 32px;
    line-height: 40px;
  }
}

@media (max-width: 850px) {
  .form-section .form-group {
    width: 100%;
  }
}

@media (max-width: 770px) {
  .admin-panel {
    padding: 20px 0;
  }

  .admin-panel .container {
    padding: 0 10px;
  }

  .admin-panel h1 {
    font-size: 36px;
    line-height: 44px;
    margin-bottom: 30px;
  }

  .admin-actions {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
  }

  .form-section .form-content {
    padding: 20px 15px;
  }

  .form-section h2 {
    font-size: 28px;
    line-height: 36px;
    margin-bottom: 30px;
  }

  .form-section .form-group {
    height: 60px;
    padding: 10px 18px;
  }

  .form-section .form-lable {
    font-size: 16px;
    left: 18px;
    top: 22px;
  }

  .form-section .form-input:focus~.form-lable,
  .form-section .form-input:not(:focus):valid~.form-lable {
    top: 8px;
    font-size: 12px;
  }

  .form-section .password-input-group .btn-secondary {
    right: 0;
  }

  .form-section .password-input-group .btn-secondary:first-of-type {
    right: 32px;
  }

  .form-section .password-input-group .btn-secondary:last-of-type {
    right: 0;
  }

  .stats-overview {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .stat-card {
    padding: 15px;
  }
}

@media (max-width: 600px) {
  .admin-panel {
    padding: 15px 0;
  }

  .form-section .form-content {
    padding: 15px 10px;
  }

  .form-section h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .form-section .form-group {
    height: 55px;
    padding: 8px 15px;
  }

  .form-section .form-lable {
    font-size: 14px;
    left: 15px;
    top: 18px;
  }

  .form-section .password-input-group .btn-secondary {
    right: 0;
  }

  .form-section .password-input-group .btn-secondary:first-of-type {
    right: 30px;
  }

  .form-section .password-input-group .btn-secondary:last-of-type {
    right: 0;
  }

  .form-section .password-input-group .btn-secondary {
    padding: 4px 6px;
    min-width: 28px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .admin-panel {
    padding: 10px 0;
  }

  .admin-panel .container {
    padding: 0 5px;
  }

  .admin-panel h1 {
    font-size: 28px;
    line-height: 36px;
    margin-bottom: 20px;
  }

  .admin-actions {
    gap: 10px;
    margin-bottom: 20px;
  }

  .admin-actions .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .form-section .form-content {
    padding: 10px 8px;
  }

  .form-section h2 {
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 20px;
  }

  .form-section .form-group {
    height: 50px;
    padding: 6px 12px;
  }

  .form-section .form-lable {
    font-size: 12px;
    left: 12px;
    top: 16px;
  }

  .form-section .form-input:focus~.form-lable,
  .form-section .form-input:not(:focus):valid~.form-lable {
    top: 6px;
    font-size: 10px;
  }

  .form-section .form-input {
    font-size: 16px; /* Предотвращает зум на iOS */
  }

  .form-section .password-input-group .btn-secondary {
    right: 0;
  }

  .form-section .password-input-group .btn-secondary:first-of-type {
    right: 26px;
  }

  .form-section .password-input-group .btn-secondary:last-of-type {
    right: 0;
  }

  .form-section .password-input-group .btn-secondary {
    padding: 3px 4px;
    min-width: 24px;
    font-size: 8px;
  }

  .form-section .form-button .btn {
    width: 100%;
    padding: 12px;
  }

  .stats-section h2 {
    font-size: 24px;
    line-height: 32px;
    margin-bottom: 20px;
  }

  .stats-overview {
    gap: 10px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .stat-value {
    font-size: 20px;
  }

  .role-stats div {
    font-size: 12px;
    margin: 6px 0;
  }
}

@media (max-width: 320px) {
  .admin-panel h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .form-section h2 {
    font-size: 18px;
    line-height: 26px;
  }

  .form-section .form-group {
    height: 45px;
    padding: 4px 10px;
  }

  .form-section .form-lable {
    left: 10px;
    top: 14px;
  }

  .form-section .password-input-group {
    right: 10px;
  }

  .stats-section h2 {
    font-size: 20px;
    line-height: 28px;
  }

  .stat-card h3 {
    font-size: 14px;
  }

  .stat-value {
    font-size: 18px;
  }
}

/* Responsive design */

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  .common-title {
    font-size: 36px;
    line-height: 44px;
  }

  .navigation {
    flex-direction: column;
    gap: 10px;
  }

  .modal-content {
    min-width: 90%;
  }

  .password-input-group {
    flex-direction: column;
    align-items: stretch;
  }

  .password-input-group .btn-secondary {
    align-self: flex-end;
    width: auto;
  }
/* Responsive design для teacher-users */
@media (max-width: 1100px) {
  .teacher-panel .table-container {
    padding: 15px;
  }

  .users-table th,
  .users-table td {
    padding: 12px;
  }
}

@media (max-width: 850px) {
  .users-table th:nth-child(6),
  .users-table td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 770px) {
  .teacher-panel {
    padding: 20px 0;
  }

  .teacher-panel .container {
    padding: 0 10px;
  }

  .teacher-panel h1 {
    font-size: 36px;
    line-height: 44px;
    margin-bottom: 30px;
  }

  .teacher-panel h2 {
    font-size: 28px;
    line-height: 36px;
    margin: 30px 0 20px 0;
  }

  .teacher-panel .navigation {
    margin-bottom: 20px;
  }

  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .users-table th,
  .users-table td {
    padding: 10px;
  }

  .users-table th:nth-child(1),
  .users-table td:nth-child(1) {
    display: none;
  }

  .user-info-cell {
    gap: 8px;
  }

  .user-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .user-name {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .teacher-panel {
    padding: 15px 0;
  }

  .stats-overview {
    grid-template-columns: 1fr;
  }

  .users-table th:nth-child(7),
  .users-table td:nth-child(7) {
    display: none;
  }

  .btn-small {
    padding: 4px 8px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .teacher-panel h1 {
    font-size: 28px;
    line-height: 36px;
  }

  .teacher-panel h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .users-table {
    font-size: 14px;
  }

  .users-table th,
  .users-table td {
    padding: 8px;
  }

  .role-badge,
  .status-badge {
    padding: 2px 8px;
    font-size: 10px;
  }
}

@media (max-width: 320px) {
  .teacher-panel h1 {
    font-size: 24px;
    line-height: 32px;
  }

  .teacher-panel h2 {
    font-size: 20px;
    line-height: 28px;
  }

  .users-table th,
  .users-table td {
    padding: 6px;
  }

  .user-avatar-small {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
}

/* Responsive design для админ-панели */
}

/* Стили для переключателя доступа к обучению */
.learning-access-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 100px;
}

.learning-access-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  cursor: pointer;
}

.learning-access-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.learning-access-toggle input:checked + .toggle-slider {
  background-color: #00b0f0;
}

.learning-access-toggle input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.access-status {
  font-size: 10px;
  color: #666;
  text-align: center;
  white-space: nowrap;
}

/* Стили для уведомлений */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease-out;
}

.notification-success {
  background-color: #28a745;
}

.notification-error {
  background-color: #dc3545;
}

.notification-info {
  background-color: #17a2b8;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Стили для модального окна пользователей потока */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.stream-info {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.stream-info p {
  margin: 8px 0;
  color: #666;
}

.users-list {
  display: grid;
  gap: 12px;
}

.user-card {
  background: #f9f9f9;
  padding: 16px;
  border-radius: 6px;
  border-left: 4px solid #00b0f0;
}

.user-card h4 {
  margin: 0 0 8px 0;
  color: #333;
}

.user-card p {
  margin: 4px 0;
  font-size: 14px;
  color: #666;
}

/* Стили для карточек потоков и организаций */
.stream-card, .organization-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.3s ease;
}

.stream-card:hover, .organization-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stream-card h3, .organization-card h3 {
  margin: 0 0 12px 0;
  color: #333;
}

.stream-card p, .organization-card p {
  margin: 6px 0;
  color: #666;
}

.stream-actions, .organization-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
  border: 1px solid #dc3545;
}

.btn-danger:hover {
  background: #c82333;
}

/* Стили для секций управления */
.organizations-section, .streams-section {
  margin-top: 40px;
}

.organizations-header, .streams-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.organizations-list, .streams-list {
  display: grid;
  gap: 16px;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header, .modal-body {
    padding: 16px;
  }

  .user-card {
    padding: 12px;
  }
}

/* Стили для вкладок в модальном окне добавления пользователя */
.add-user-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #dee2e6;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #6c757d;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn.active {
  color: #00b0f0;
  border-bottom-color: #00b0f0;
}

.tab-btn:hover {
  color: #00b0f0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Стили для результатов поиска пользователей */
.search-results {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin-top: 10px;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f8f9fa;
}

.search-result-item.selected {
  background-color: #e3f2fd;
  border-left: 4px solid #00b0f0;
}

.search-result-item.already-in-stream {
  background-color: #f8f9fa;
  opacity: 0.7;
}

.search-result-item.already-in-stream .btn-disabled {
  background: #6c757d;
  color: white;
  cursor: not-allowed;
  opacity: 0.6;
}

.search-result-item:last-child {
  border-bottom: none;
}

.user-info h4 {
  margin: 0 0 4px 0;
  color: #333;
  font-size: 16px;
}

.user-info p {
  margin: 2px 0;
  font-size: 13px;
  color: #666;
}

/* Стили для кнопки действия в модальном окне */
.modal-actions {
  margin-bottom: 20px;
  text-align: center;
}

/* Стили для кнопки "Добавить" в результатах поиска */
.search-result-item .btn {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 80px;
}