/* admin_dictionary.css */

/* Обёртка основного контента админки */
.admin-layout {
  display: flex;
  width: 100vw;
  height: 100vh;

}

.admin-main {
  flex: 1;
  background: #19191a;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-table .avatar-cell img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  display: block;
  margin: 0 auto;
}

/* Хедер страницы импорта */
.import-users-header {
  background: none;
  border-bottom: 1px solid rgba(202, 176, 113, 0.12);
  padding-bottom: 8px;
}

.import-users-header h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 18px 0;
  letter-spacing: 0.5px;
}

/* Форма фильтра */
.btn-admin {
  width: 140px;
  height: 38px;
  /* одинаковая высота для всех! */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #cab170;
  background: #19191a;
  color: #cab170;
  cursor: pointer;
  transition: border 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
}

.btn-admin:hover,
.btn-admin:focus {
  border: 1.5px solid #e7d196;
  background: rgba(202, 176, 113, 0.08);
}


.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  justify-content: space-between;
  /* Разнести элементы по краям */
}

.filter-row-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1 1 auto;
  /* Фильтры занимают всё место слева */
}

.filter-row .input {
  background: rgba(14, 15, 17, 0.70);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #fff;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: border-color 0.18s, background 0.18s;
}

.filter-row .input:focus {
  border-color: #cab170;
  outline: none;
  background: rgba(202, 176, 113, 0.04);
}

/* Стили для иконки */
.btn-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;

}

.admin-table-wrapper {
  padding-top: 0;
  padding-bottom: 24px;
  padding-left: 16px;
  /* уменьшили */
  padding-right: 16px;
  /* уменьшили */
}

/* Основная таблица */
/* ====== Новый стиль таблицы (из index.html, адаптирован) ====== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(235, 209, 168, 0.07);
  border: 1px solid #37393c;
  border-radius: 12px;
  overflow: hidden;
  font-weight: 200;
  margin-top: 0;
}

.admin-table thead {
  background: rgba(235, 209, 168, 0.07);
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 300;
  color: #fff;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  background: transparent;
}

.admin-table td {
  padding: 12px 16px;
  font-size: 12px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  white-space: nowrap;
  background: transparent;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table th.th-checkbox,
.admin-table td.td-checkbox {
  width: 40px;
  text-align: center;
  padding-left: 12px;
  padding-right: 12px;
}

.admin-table th:last-child,
.admin-table td:last-child {
  padding-right: 12px;
}

.admin-table .highlight {
  color: #ddcfa0;
}

/* Контейнер под стрелку */
.sort-indicator {
  display: inline-block;
  width: 10px;      /* фиксированная ширина */
  height: 10px;     /* фиксированная высота */
  margin-left: 6px;
  vertical-align: middle;
}

/* SVG стрелка */
.icon-dropdown {
  width: 100%;
  height: 100%;
  display: block;
}

/* Направления */
.icon-dropdown.asc {
  transform: rotate(180deg);
}
.icon-dropdown.desc {
  transform: rotate(0deg);
}

/* Если иконка отсутствует — пустое место */
.sort-indicator.empty {
  visibility: hidden;
}


.admin-table tbody tr:hover td {
  background: rgba(202, 176, 113, 0.04);
}

.admin-table .td-avatar {
  width: 88px;
}
.admin-table .avatar-stack {
  position: relative;
  width: 36px;
  height: 36px;
}
.admin-table .avatar-stack .avatar {
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
}
.admin-table .avatar-stack .flag {
  position: absolute;
  right: -4px; top: -4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1px solid #19191a;
}

.admin-table .td-toggle .toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.admin-table .td-toggle .toggle-switch input {
  opacity: 0; width: 0; height: 0;
}
.admin-table .td-toggle .toggle-switch .slider {
  position: absolute; inset: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  transition: .2s;
}
.admin-table .td-toggle .toggle-switch .slider::before {
  content: "";
  position: absolute;
  left: 2px; bottom: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.admin-table .td-toggle .toggle-switch input:checked + .slider {
  background: #cab170;
}
.admin-table .td-toggle .toggle-switch input:checked + .slider::before {
  transform: translateX(20px);
}
/* ====== Конец нового стиля таблицы ====== */

.pagination {
  /* margin: 10px 0 10px 0; */
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
}

.pagination-link {
  display: inline-block;
  min-width: 34px;
  padding: 4px 10px;
  background: #0D0D0D4D;
  border: 1px solid #cab170;
  color: #a9acbc;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: background .18s, color .18s;
}

.pagination-link.active,
.pagination-link:hover {
  background: #cab170;
  color: #19191a;
}

.pagination-dots {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  color: #cab170;
  font-size: 16px;
  line-height: 1.7;
  pointer-events: none;
}

.pagination-select {
  padding: 4px 14px 4px 10px;
  border-radius: 8px;
  background: #0D0D0D4D;
  color: #a9acbc;
  border: 1px solid #cab170;
  font-size: 15px;
  outline: none;
  cursor: pointer;
  transition: border 0.18s, box-shadow 0.18s;
  height: 32px;
  /* max-width: 90px; */
}

.pagination-select option {
  background: #151515;
  color: #a9acbc;        /* светлый текст */
}

.pagination-select:focus {
  border: 1.5px solid #e7d196;
  box-shadow: 0 0 0 2px rgba(202, 177, 112, 0.15);
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 10px 0;
  gap: 10px;
}

#per-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pagination-label {
  color: #a9acbc;
  font-size: 14px;
  font-weight: 400;

}

.columns-settings-btn {
  margin-left: 0;
  /* если надо только этой кнопке */
}

.btn-signin,
.btn-back {
  background: none;
  border: 1px solid #cab170;
  color: #cab170;
}

.columns-settings-btn:hover,
.columns-settings-btn:focus,
.btn-signin:hover,
.btn-signin:focus,
.btn-back:hover,
.btn-back:focus {
  background: rgba(202, 176, 113, 0.08);
  color: #fff;
}

/* Стили модального окна */
.modal-columns {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-columns[style*="display: flex"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #222;
  color: #cab170;
  padding: 12px 32px 20px 32px;
  border-radius: 18px;
  min-width: 340px;
  box-shadow: 0 8px 32px #000c;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  /* включаем flex-контейнер */
  justify-content: center;
  /* центрируем по горизонтали */
  align-items: center;
  flex-direction: column;
}

.modal-content-title {
  margin-bottom: 10px;
  text-align: center;
}

#columnsForm label {
  display: block;
  font-size: 15px;
  margin-bottom: 10px;
  cursor: pointer;
}

#columnsForm input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #cab170;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 1020px) {

  .admin-table th,
  .admin-table td {
    font-size: 12px;
    padding: 5px 5px;
  }
}

@media (max-width: 600px) {
  .admin-table {
    font-size: 11px;
  }

  .filter-row {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .import-users-header {
    padding: 12px 6px 8px 6px;
  }

  .admin-table-wrapper {
    padding: 0 4px 16px 4px;
  }
}


/* /css/disconary_inputs.css */

.admin-table input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(14, 15, 17, 0.7);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #fff;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: border-color 0.18s, background 0.18s;
}

.admin-table input:focus {
  border-color: #cab170;
  background: rgba(202, 176, 113, 0.04);
  outline: none;
}

/* Новый: скрываем кнопки Save/Cancel из потока */
.btn-save,
.btn-cancel {
  display: none;
}

.admin-table.editing-mode tr:not(.row-editing) .input {
  opacity: 0.5;
  transition: opacity 0.3s;
}

.flag-input {
  visibility: hidden;
  transition: visibility 0.6s;
}

.row-editing .flag-input {
  visibility: visible;
  transition: visibility 0.6s;
}


/* Статическая ширина колонки Actions */
.admin-table th.actions,
.admin-table td.actions {
  width: 240px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #ebd1a8;
  background: rgba(235, 209, 168, 0.07);
  border: 1px solid rgba(235, 209, 168, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-action:hover,
.btn-action:focus {
  background: rgba(235, 209, 168, 0.15);
  border-color: rgba(235, 209, 168, 0.45);
  color: #fff;
}

/* общий стиль для иконки сортировки */
.sort-icon {
  width: 12px;
  height: 12px;
  vertical-align: middle;
  margin-left: 4px;
  transition: transform 0.2s;
}

/* класс для восходящей сортировки (переворачивает вниз стрелку вверх) */
.sort-icon.asc {
  transform: rotate(180deg);
}

.btn-admin:disabled,
.btn-admin[disabled],
.btn-action:disabled,
.btn-action[disabled] {
  background: rgba(202, 176, 113, 0.122);
  /* более приглушённый фон */
  border-color: rgba(202, 176, 113, 0.12);
  color: rgba(235, 209, 168, 0.5);
  /* полупрозрачный текст */
  cursor: not-allowed;
  /* запретная иконка курсора */
  box-shadow: none;
  /* без тени при наведении */
}


.flag-input.modal-field-input,
.flag-input.modal-file-input {
  width: 100%;
  background: rgba(14, 15, 17, 0.70);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #fff;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: border-color 0.18s, background 0.18s;
  cursor: pointer;
}

.flag-input.modal-file-input:focus {
  border-color: #cab170;
  outline: none;
  background: rgba(202, 176, 113, 0.04);
}

/* Chrome, Edge, Safari */
.flag-input.modal-file-input::-webkit-file-upload-button {
  background: #cab170;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 6px;
  color: #1f1f1a;
  font-size: 14px;
  cursor: pointer;
}

/* Firefox */
.flag-input.modal-file-input::file-selector-button {
  background: #cab170;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 6px;
  color: #1f1f1a;
  font-size: 14px;
  cursor: pointer;
}

/* IE10+ */
.flag-input.modal-file-input::-ms-browse {
  background: #cab170;
  border: none;
  padding: 6px 10px;
  margin-right: 8px;
  border-radius: 6px;
  color: #1f1f1a;
  font-size: 14px;
  cursor: pointer;
}

.flag-input.modal-file-input:disabled {
  opacity: 0.5;
}

.icon-select {
  min-width: 100px;
  max-width: 100px;
  /* ограничиваем ширину */
  background: rgba(14, 15, 17, 0.7);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #cab170;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: border-color 0.18s, background 0.18s;
  cursor: pointer;
}

.icon-select:focus {
  border-color: #cab170;
  background: rgba(202, 176, 113, 0.04);
  outline: none;
}

.icon-select option {
  background: #19191a;
  color: #fff;
  font-size: 13px;
}


/* === Icon combobox (вместо select) === */
.icon-combobox {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.icon-combobox .icon-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
  flex: 0 0 auto;
}

.icon-combobox .icon-input {
  min-width: 140px;
  max-width: 180px;
  /* компактно */
  background: rgba(14, 15, 17, 0.70);
  border: 1px solid rgba(202, 176, 113, 0.16);
  color: #cab170;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  transition: border-color 0.18s, background 0.18s;
}

.icon-combobox .icon-input:focus {
  border-color: #cab170;
  background: rgba(202, 176, 113, 0.04);
  outline: none;
}

.icon-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 36px;
  /* чтобы не наезжать на превью */
  width: 260px;
  max-height: 260px;
  overflow-y: auto;
  background: #19191a;
  border: 1px solid rgba(202, 176, 113, 0.16);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 50;
  display: none;
}

.icon-suggestions.open {
  display: block;
}

.icon-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  color: #fff;
  font-size: 13px;
}

.icon-suggestion:hover,
.icon-suggestion.active {
  background: rgba(202, 176, 113, 0.10);
}

.icon-suggestion img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: #222;
}

