body {
  font-family: Arial, sans-serif;
  background: #f5f5f5; /* Оставь как есть - светлый серый подходит */
  margin: 40px;
  color: #333;
}

form#userForm {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

h1 {
  margin-bottom: 10px;
  font-size: 24px;
  text-align: center;
  font-weight: 600;
}

form label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  color: #555;
}

form input {
  width: 100%;
  padding: 8px 12px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border 0.2s;
}

form input:focus {
  border-color: #007BFF;
  outline: none;
}


.form-actions button:hover {
  background: #0056b3;
}

.form-actions button:active {
  transform: scale(0.98);
}

#modal {
  display: none;
  position: fixed;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 770px;
  max-height: 80vh;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  border-radius: 8px;
  z-index: 9999;
  padding: 60px 20px 20px;
  box-sizing: border-box;
}

#modal h3 {
  position: absolute;
  top: 20px;
  left: 20px;
  margin: 0;
}

#modal #closeModalX {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

#modal #closeModalX:hover {
  color: #000;
}

.table-wrapper {
  max-height: 50vh;
  overflow-y: auto;
  border-top: 1px solid #ccc;
}

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper th,
.table-wrapper td {
  border: 1px solid #ddd;
  padding: 8px 12px;
}

.table-wrapper thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.table-wrapper tr:hover {
  background: #f9f9f9;
}
.table-wrapper tbody tr {
  cursor: pointer;
  transition: background 0.2s;
}

.table-wrapper tbody tr:hover {
  background: #e9f3ff; /* нежно-синий фон */
}
.table-hint {
  font-size: 12px;
  color: #555;
  margin-top: 8px;
  text-align: center;
}
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745; /* зелёный успех */
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 99999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-20px);
}
input[readonly] {
  background-color: #f5f5f5; /* светло-серый фон */
  cursor: not-allowed;       /* курсор недоступности */
  color: #555;               /* чуть более тусклый текст */
}
input[type="text"]:not([readonly]),
input[type="password"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #fff; /* Белый фон — явно редактируемое */
  cursor: text;           /* Курсор текстовый */
}

input[type="text"]:not([readonly]):focus,
input[type="password"]:focus,
select:focus {
  border-color: #007bff;  /* Голубой бордер при фокусе */
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
  outline: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
}
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px; /* место для глаза */
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: #666;
}

.password-hint {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

#generatePassword {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #ffd200;  /* жёлтый 1С */
  color: #000;
  border: 1px solid #999;
  border-radius: 4px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

#generatePassword:hover:not(:disabled) {
  background-color: #ffcc00;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#generatePassword:disabled {
  background-color: #e5e5e5;
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
  opacity: 0.7;
}

.form-actions button:disabled,
#generatePassword:disabled {
  background-color: #ccc !important; /* серый фон */
  cursor: not-allowed !important;    /* курсор запрета */
  opacity: 0.7;                      /* чуть прозрачнее */
}



.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.form-actions button {
  flex: 0 0 auto;
  padding: 10px 20px;
  background-color: #ffd200;  /* классический жёлтый 1С */
  color: #000;
  border: 1px solid #999;
  border-radius: 7px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.form-actions button:hover:not(:disabled) {
  background-color: #ffcc00;  /* чуть насыщеннее при наведении */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.form-actions button:disabled {
  background-color: #e5e5e5;
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ffd200; /* спиннер в цвет кнопки */
  border-radius: 50%;
  width: 26px;
  height: 26px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-container {
  max-width: 400px;
  margin: 80px auto;
  background: #fff;
  border-radius: 8px;
  padding: 40px 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.login-container label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #555;
}

.login-container input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.login-container button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background-color: #ffd200; /* жёлтая 1С */
  color: #000;
  border: 1px solid #999;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.login-container button:hover {
  background-color: #ffcc00;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.login-container .hint {
  margin-top: 10px;
  font-size: 12px;
  color: #777;
  text-align: center;
}
.error-message {
  color: red;
  margin-bottom: 15px;
  text-align: center;
}

.login-container {
  max-width: 400px;
  margin: 80px auto;
  background: #fff;
  border-radius: 8px;
  padding: 40px 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.login-container label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #555;
}

.login-container input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
}

.login-container input[type="checkbox"] {
  margin-right: 8px;
}

.login-container button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background-color: #ffd200; /* жёлтая 1С */
  color: #000;
  border: 1px solid #999;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.login-container button:hover {
  background-color: #ffcc00;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.login-container .hint {
  margin-top: 10px;
  font-size: 12px;
  color: #777;
  text-align: center;
}
.remember-device {
  display: flex;
  flex-direction: row-reverse; /* Переставляем: чекбокс справа, текст слева */
  align-items: center;
  justify-content: flex-end; /* Прижать к правому краю контейнера */
  gap: 8px; /* Отступ между чекбоксом и текстом */
  margin-top: 15px;
}

.remember-device label {
  font-size: 14px;
  color: #555;
  margin: 0;
  cursor: pointer;
}

.remember-device input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.error-message {
  margin-top: 10px;
  padding: 10px 15px;
  background: #ffe0e0;
  border: 1px solid #ff8888;
  border-radius: 4px;
  color: #b10000;
  font-size: 14px;
}
.form-options {
  margin: 15px 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
}

.checkbox-wrapper input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}
.table-wrapper tbody tr.disabled-row {
  color: #888;
  background: #f9f9f9;
  cursor: not-allowed;
}

.table-wrapper tbody tr.disabled-row:hover {
  background: #f9f9f9; /* Не подсвечивается */
}
.disabled-row {
  pointer-events: auto;
}
/* Для активных (новых) строк */
.table-wrapper tbody tr:hover {
  background-color: #f0f8ff; /* нежно-голубой или другой светлый оттенок */
}

.table-wrapper tbody tr.selectable-row {
  transition: background 0.2s ease;
}

.table-wrapper tbody tr.selectable-row:hover {
  background-color: #f0f8ff; /* цвет выделения при ховере */
  cursor: pointer;
}
/* Для новых пользователей */
.selectable-row {
  transition: background 0.2s ease;
}

.selectable-row:hover {
  background: #f0f8ff; /* Светлая подсветка */
  cursor: pointer;
}
.select-block {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  background: #f9f9f9;
}


.or-divider {
  text-align: center;
  font-weight: bold;
  margin: 8px 0;    /* одинаковый отступ сверху и снизу */
}

.or-divider span {
  background: #fff;
  padding: 0 10px;
  position: relative;
  z-index: 1;
}

.or-divider::before {
  content: "";
  display: block;
  margin-top: -10x;
  position: relative;
  z-index: 0;
}

.btn-find {
  background: #FFD600; /* мягкий жёлтый */
  border: 1px solid #ccc;
  padding: 5px 15px;
  cursor: pointer;
  border-radius: 4px;
}
.btn-find:hover {
  background: #FFC400;
}

/* --- Мобайл адаптация --- */
@media (max-width: 768px) {
  body {
    margin: 20px; /* Меньше отступ по бокам */
  }

  h1 {
    font-size: 20px;
  }

  form label {
    font-size: 13px;
  }

  form input,
  input[type="text"]:not([readonly]),
  input[type="password"],
  select {
    font-size: 14px;
    padding: 10px;
  }

  .form-actions {
    flex-direction: column; /* Кнопки под друг другом */
    gap: 10px;
  }

  .form-actions button {
    width: 100%;
  }

  #modal {
    width: 95%;
    max-width: 100%;
    max-height: 90vh;
    padding: 50px 15px 15px;
  }

  #modal h3 {
    font-size: 18px;
  }

  .table-wrapper th,
  .table-wrapper td {
    font-size: 13px;
    padding: 6px 8px;
  }

  .login-container {
    max-width: 95%;
    margin: 40px auto;
    padding: 30px 20px;
  }

  .login-container h1 {
    font-size: 22px;
  }

  .login-container label {
    font-size: 13px;
  }

  .login-container input,
  .login-container button {
    font-size: 14px;
  }

  .remember-device {
    flex-direction: column-reverse; /* Чтобы красиво сжалось */
    align-items: flex-start;
  }

.manual-block {
  border: 1px solid #ddd;
  background: #f9f9f9;   /* тот же серый фон */
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
}

  .toast {
    width: calc(100% - 40px);
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: 10px;
  }
}
/* --- Адаптация под мобильные устройства --- */
@media (max-width: 768px) {
  body {
    margin: 15px; /* меньше внешних отступов */
  }

  form#userForm {
    width: 100%;
    max-width: none; /* убираем ограничение */
    padding: 20px 15px;
    border-radius: 8px;
  }

  h1 {
    font-size: 20px;
  }

  .form-actions {
    flex-direction: column;
    gap: 12px;
  }

  .form-actions button {
    width: 100%;
  }

  /* --- Модалка --- */
  #modal {
    width: 90%;         /* почти весь экран */
    max-width: 500px;   /* но не слишком огромная */
    max-height: 80vh;   /* максимум 80% высоты экрана */
    padding: 50px 20px 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow-y: auto;   /* скролл если контент не помещается */
  }

  #modal h3 {
    font-size: 18px;
  }

  /* Таблицы внутри модалки */
  .table-wrapper {
    max-height: 50vh;
  }

  .table-wrapper th,
  .table-wrapper td {
    font-size: 13px;
    padding: 6px 8px;
  }

  .login-container {
    width: 100%;
    max-width: none;
    margin: 40px auto;
    padding: 30px 20px;
  }

  .toast {
    width: calc(100% - 40px);
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    right: auto;
  }

  /* Перестройка блоков выбора */
  .select-block,



}
#toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #323232;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

#toast.show {
  opacity: 1;
}
#toast.hide {
  opacity: 0;
}

h2 {
  margin-bottom: 20px;
  font-size: 22px;
  color: #333;
}

.request-details {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 30px;
}

.request-details p {
  margin: 8px 0;
}

.request-details blockquote {
  background: #fafafa;
  border-left: 4px solid #4CAF50;
  margin: 10px 0;
  padding: 10px 15px;
  font-style: italic;
}

.actions {
  text-align: left; /* 👈 теперь выравнивание слева */
  margin-top: 20px;
}

.actions form {
  display: inline-block;
  margin-right: 10px;
}
button {
  font-size: 14px;
  padding: 10px 22px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s ease;
}

button.approve-btn {
  background: #4CAF50;
  color: #fff;
}

button.reject-btn {
  background: #f44336;
  color: #fff;
}

button:hover {
  opacity: 0.9;
}

p.info {
  margin-top: 20px;
  font-size: 14px;
  color: #777;
}
.input-with-button {
  display: flex;
  align-items: stretch; /* тянет кнопку по высоте input */
  width: 100%;
  gap: 4px; /* ← например, 4-8px */
}

.input-with-button input {
  flex: 1;
  margin: 0;
  height: 35px; /* высота строки */
}


.input-with-button .btn-find {
  border-left: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #FFD600;
  height: 35px; /* совпадает с input */
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 8px;  /* скруглит все углы одинаково */
}

.input-with-button .btn-find:hover {
  background: #FFC400;
}
/* Единый стиль для всех трёх кнопок */
.form-actions button,
#generatePassword {
  display: inline-block;     /* Не растягиваем на всю строку */
  min-width: 220px;          /* Фиксируешь ширину сам! */
  padding: 10px 20px;
  background: #FFD600;
  color: #000;
  border: 1px solid #999;
  border-radius: 6px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
  text-align: center;        /* Выравнивает текст по центру */
}

.form-actions button:hover:not(:disabled),
#generatePassword:hover:not(:disabled) {
  background-color: #FFCC00;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.form-actions button:disabled,
#generatePassword:disabled {
  background-color: #e5e5e5;
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
  opacity: 0.7;
}
/* Уменьшить шрифт всей таблицы внутри модалки */
#modal table {
  font-size: 14px;
}

/* Ограничить ширину колонки «Статус» и переносить длинный текст */
#modal table td:last-child {
  display: flex;
  align-items: center;  /* по вертикали выравнивает иконку и текст */
  gap: 4px;             /* небольшой зазор между иконкой и текстом */
  white-space: nowrap;  /* запрещает перенос самой строки целиком */
  font-size: 14px;      /* можешь подогнать размер шрифта */
}

.select-block {
  position: relative; /* для позиционирования */
}

.logout-btn {
  position: absolute;
  top: 15px;
  right: 15px;
``
  padding: 8px 17px;
  background: #FFD600;
  color: #000;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
 
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #d32f2f;
}

/* Затемнение фона */
#explanationModal {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex; /* центрирование */
  align-items: center;
  justify-content: center;
}

/* Контент модалки */
#explanationModal .modal-content {
  background: #fff; /* белый фон */
  border: 2px solid #FFD600; /* фирменный жёлтый */
  border-radius: 6px;
  max-width: 500px;
  width: 100%;
  padding: 20px 25px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  font-family: Arial, sans-serif;
}

/* Заголовок */
#explanationModal h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* Пояснение */
#explanationModal p {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

/* Текстовое поле */
#explanationInput {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 15px;
}

/* Кнопка сохранить */
#submitExplanation {
  background: #FFD600;
  border: none;
  border-radius: 4px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: bold;
  color: #333;
  transition: background 0.2s ease;
}

#submitExplanation:hover {
  background: #FFC400;
}

/* Крестик закрытия */
#explanationModal .close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

#explanationModal .close:hover {
  color: #333;
}
