/* ========================================================
   МОБИЛЬНАЯ ВЕРСИЯ: ТЕМНАЯ ТЕМА (ПО УМОЛЧАНИЮ)
   ======================================================== */
:root,
[data-theme="dark"] {
  --bg-body: #121212;
  --bg-sidebar: #161616;
  --bg-surface: #1a1a1a;
  --bg-elevated: #262626;
  --bg-elevated-hover: #303030;
  --bg-active-item: #292929;
  --bg-accent-subtle: rgba(245, 166, 35, 0.14);
  --header-bg: #161616;
  --header-text: #f0f0f0;
  --bgucoz: #121212;
  --text-main: #f0f0f0;
  --text-muted: #8c8c8c;
  --text-on-accent: #141414;
  --color-text: #f0f0f0;
  --accent: #f5a623;
  --accent-hover: #ffb536;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --warn-bg: rgba(245, 166, 35, 0.12);
  --warn-border: rgba(245, 166, 35, 0.3);
  --warn-text: #f5c469;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --danger-text: #f87171;
  --donate-bg: rgba(34, 197, 94, 0.14);
  --but-minichat: #262626;
  --radius-card: 12px;
  --radius-ui: 8px;
  --radius-badge: 6px;
  --card-radius: 12px;
  --btn-radius: 8px; 
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.25);
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================================
   МОБИЛЬНАЯ ВЕРСИЯ: СВЕТЛАЯ ТЕМА
   ======================================================== */
[data-theme="light"] {
  /* Палитра фонов openOMSI */
  --bg-body: #f2f3f5;
  --bg-sidebar: #ebedf0;
  --bg-surface: #ffffff;
  --bg-elevated: #ededf0;
  --bg-elevated-hover: #e2e4e8;
  --bg-active-item: #e2e4e8;
  --bg-accent-subtle: rgba(217, 144, 20, 0.12);
  --header-bg: #18181b;
  --header-text: #ffffff;
  --bgucoz: #e4e6eb;
  --text-main: #18181b;
  --text-muted: #71717a;
  --text-on-accent: #141414;
  --color-text: #18181b;
  --accent: #e09212;
  --accent-hover: #f5a623;
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.13);
  --warn-bg: #fef3c7;
  --warn-border: #fde68a;
  --warn-text: #92400e;
  --danger-bg: #fee2e2;
  --danger-text: #dc2626;
  --donate-bg: #e8f8ed;
  --but-minichat: #e2e4e8;
  --radius-card: 12px;
  --radius-ui: 8px;
  --radius-badge: 6px;
  --card-radius: 12px;
  --btn-radius: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.04);
}


/* === БАЗОВЫЙ СБРОС И ТИПОГРАФИКА === */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.55;
  font-size: 15px;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

img.responsive-image {
  width: 100%;
  height: auto;
  display: block;
}

/* === ШАПКА САЙТА (HEADER) === */
.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 12px;
  background-color: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.m-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--header-text);
  font-size: 18px;
  cursor: pointer;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

#pageLogo {
  display: flex;
  align-items: center;
  height: 50px;
}

#pageLogo img {
  max-height: 34px;
  width: auto;
  display: block;
}

.online-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 20px;
  color: #ffffff;
  min-height: 36px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ecc71;
  display: inline-block;
  box-shadow: 0 0 6px #2ecc71;
}

/* === БОКОВОЕ ВЫДВИЖНОЕ МЕНЮ (DRAWER) === */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-surface);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
}

body.menu-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
}

body.menu-open .drawer-nav {
  transform: translateX(0);
}

body.menu-open {
  overflow: hidden;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
}

.nav-item {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--btn-radius);
  color: var(--text-main);
  font-weight: 500;
  background: var(--bg-elevated);
}

.nav-link i {
  width: 20px;
  text-align: center;
  color: var(--accent);
  font-size: 16px;
}

/* Выпадающий список категорий в меню */
.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border-radius: var(--btn-radius);
  min-height: 46px;
  padding: 0 12px;
}

.select-wrapper i.fa-list-ul {
  width: 20px;
  text-align: center;
  color: var(--accent);
  margin-right: 12px;
  pointer-events: none;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 46px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  padding-right: 24px;
}

.select-wrapper i.fa-caret-down {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Переключатель цветовой темы */
.theme-switcher {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.theme-switcher-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-elevated);
  padding: 4px;
  border-radius: var(--btn-radius);
}

.theme-tab {
  min-height: 38px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
}

.theme-tab.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* === ОСНОВНОЙ КОНТЕЙНЕР, ПОИСК И ХЛЕБНЫЕ КРОШКИ === */
.main-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 14px 24px;
}

.search-box {
  margin-bottom: 16px;
}

#search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 5px 6px 5px 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 55, 9, 0.15);
}

#search > i.fa-search {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

#search input[type="text"] {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 16px; /* Не дает iOS увеличивать экран при вводе */
  font-family: inherit;
  outline: none;
  padding: 0;
}

#search input[type="text"]::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

#search .search-submit,
#search button[type="submit"],
#search input[type="submit"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color:#000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(150, 42, 3, 0.3);
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

#search .search-submit:hover,
#search button[type="submit"]:hover,
#search input[type="submit"]:hover {
  opacity: 0.94;
}

#search .search-submit:active,
#search button[type="submit"]:active,
#search input[type="submit"]:active {
  transform: scale(0.96);
  box-shadow: 0 1px 3px rgba(150, 42, 3, 0.2);
}

#search .search-submit:disabled,
#search button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Плашка категории и результатов поиска */
.searchrez {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  font-size: 14px;
  box-shadow: var(--shadow);
}

.searchrez .sep {
  color: var(--text-muted);
  margin: 0 4px;
}

/* === КАРТОЧКИ МАТЕРИАЛОВ В ЛЕНТЕ (ВИД МАТЕРИАЛОВ) === */
.portfolio-wide-item {
  position: relative;
  display: block;
  border-radius: var(--card-radius);
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--bg-surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

.portfolio-wide-item img.responsive-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-wide-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
  border-radius: 11px;
}

.portfolio-wide-item h3 {
  position: absolute;
  top: 8px;
  left: 14px;
  right: 14px;
  margin: 0;
  z-index: 2;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.portfolio-wide-item .matbar {
  position: absolute;
  bottom: 10px;
  left: 14px;
  right: 14px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

/* === СТРАНИЦА МАТЕРИАЛА === */
.entry-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.entry-title {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

/* Кнопки скачивания и внешних ссылок */
.addmat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  margin-bottom: 10px;
  border-radius: var(--btn-radius);
  background: var(--accent);
  color: #000 !important;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(37, 140, 66, 0.25);
}

.addmat:active {
  transform: translateY(1px);
}

.addmat.addmatvk {
  background: #0077ff;
  box-shadow: 0 2px 6px rgba(0, 119, 255, 0.25);
}

.downum {
  margin-left: 4px;
  font-family: inherit;
  font-weight: 700;
}

/* Предупреждение о битых ссылках и быстрый поиск в ИИ/Поисковиках */
.errormod {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  padding: 12px 14px;
  border-radius: var(--btn-radius);
  font-size: 13.5px;
  line-height: 1.45;
  margin: 12px 0 16px;
}

.errormod i {
  margin-right: 6px;
  color: #d97706;
}

.errormod a {
  display: inline-block;
  font-weight: 700;
  text-decoration: underline;
  padding: 2px 4px;
}

/* Скриншоты и описание */
.screenshots-list a {
  display: block;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.entry-message {
  margin: 14px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.entry-message, .meta-row, .subtitle {
  --entry-font-size: 14px;
  font-size: var(--entry-font-size);
  line-height: 1.5;
  transition: font-size 0.2s ease;
}

/* Стили для кнопок управления (по желанию) */
.font-controls {
  display: flex;
  gap: 10px;
  padding: 12px 0 0 0;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.font-controls button {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--btn-radius);
  color:var(--text-main);
  width: 33%;
}

.entry-message img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.entry-message iframe,
.textmessage iframe {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
  border: none;
}

.meta-row {
  margin: 8px 0;
}

.meta-row span,
.meta-row b {
  font-weight: 600;
}

/* Блок поддержки авторов */
.donate-box {
  padding: 12px 14px;
  background: var(--donate-bg);
  border-radius: var(--btn-radius);
  margin: 12px 0;
}

#authormoney span {
  text-align: center;
  display: block;
  margin: 8px 0;
  font-size: 16px;
  word-break: break-all;
}

.subtitle {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Таблицы (статистика материала и пользовательские таблицы в описании) */
table {
  border-collapse: collapse;
  width: 100%;
  text-align: center;
  margin: 12px 0;
  font-size: 17px;
}

table th,
table td {
  padding: 6px 4px;
}

table.stats-table {
  background: var(--bg-elevated);
  border-radius: var(--btn-radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* === ИНТЕРАКТИВНЫЙ РЕЙТИНГ МАТЕРИАЛА В ТАБЛИЦЕ СТАТИСТИКИ === */
table.stats-table td.m-rate-cell {
  cursor: pointer;
  position: relative;
  /* background: rgba(245, 158, 11, 0.12); */
  color: var(--text-main);
  transition: background-color 0.15s ease, transform 0.1s ease;
  user-select: none;
  width: 25%;
}

table.stats-table td.m-rate-cell:active,
table.stats-table td.m-rate-cell.active {
  background: rgba(245, 158, 11, 0.24);
}

.m-star-icon {
  margin-right: 4px;
}

/* Выдвижная плашка с выбором звезд 1..5 */
.m-rate-drawer {
  margin: -6px 0 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  animation: mRateSlide 0.18s ease-out;
}

@keyframes mRateSlide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.m-rate-drawer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#mRateStatusText {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.m-stars-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
}

.m-star-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.m-star-btn i {
  color: #f59e0b;
  font-size: 15px;
}

.m-star-btn:active,
.m-star-btn.selected {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #ffffff;
  transform: scale(0.96);
}

.m-star-btn.selected i,
.m-star-btn:active i {
  color: #ffffff;
}

/* ==========================================================================
   NEWCOMMSTYLE — СТИЛЬ КОММЕНТАРИЕВ И БЕЙДЖЕЙ ГРУПП
   ========================================================================== */

.com-order-wrap {
  margin: 8px 0;
}

.aurComm {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 10px 0;
  width: 100%;
  max-width: 100%;
  clear: both;
}

.aurComm::after {
  content: "";
  display: table;
  clear: both;
}

.aurCommAva {
  float: left;
  width: 42px;
  height: 42px;
}

.aurCommAva img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.name_ava {
  color: #ffffff;
  font-size: 18px;
  text-align: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  line-height: 36px;
  font-weight: bold;
  text-transform: capitalize;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.25);
}

.color_ava0 { background: #3A539B; }
.color_ava1 { background: #1abc9c; }
.color_ava2 { background: #2ecc71; }
.color_ava3 { background: #3498db; }
.color_ava4 { background: #9b59b6; }
.color_ava5 { background: #f1c40f; }
.color_ava6 { background: #e67e22; }
.color_ava7 { background: #e74c3c; }
.color_ava8 { background: #d35400; }
.color_ava9 { background: #f39c12; }

.aurCommBody {
  margin-left: 46px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
  min-width: 0;
  max-width: calc(100% - 46px);
}

.aurCommUser {
  font-weight: bold;
  text-decoration: none;
  text-transform: capitalize;
  color: var(--text-main);
}

.aurCommLink {
  text-decoration: none;
}

.aurCommTime {
  color: var(--text-muted);
  text-decoration: none;
}

.aurCommUser:hover,
.aurCommTime:hover,
.aurCommLink:hover,
.comment_answer:hover {
  text-decoration: underline;
}

.userpole,
.timepole {
  display: block;
}

.timepole {
  font-size: 12px;
  color: var(--text-muted);
}

.slesh {
  font-size: 11px;
  border-right: 1px solid var(--border);
  margin: 0 5px;
}

.comnum {
  float: right;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

.comnum:hover {
  text-decoration: underline;
}

.aurComm a,
.rating_comment {
  display: inline;
}

.rating_comment {
  float: right;
  margin-left: 6px;
}

.rating_comment b {
  padding: 1px 5px;
  border-radius: 50px;
}

.like2 {
  text-decoration: none !important;
  color: var(--accent);
  margin: 0;
  padding: 0 4px !important;
  border-radius: 5px;
  background: var(--bg-elevated);
  float: right;
}

.likes2,
.likes {
  background: url(/img/rlike.png) 5px 0px no-repeat;
  padding: 0 11px;
}

.likes0 {
  background: url(/img/rlike.png) 5px 0px no-repeat;
  padding: 0 9px;
  opacity: 0.7;
}

.aurComm:hover .likes0,
.aurComm:hover .likehovercom {
  opacity: 1;
}

.likehover,
.likehovercom {
  opacity: 0.7;
}

.likes2hover {
  background: url(/img/rlike.png) 5px 0px no-repeat;
  padding: 0 11px;
  display: inline;
}

.comment_like {
  float: right;
  color: var(--accent);
}

.textmessage,
.cMessage,
.uc-message {
  font-size: 15px;
  padding: 4px 0;
  color: var(--text-main) !important;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
}

/* Принудительно красим текст внутри комментария под текущую тему (кроме ссылок и бейджей групп) */
.aurCommBody,
.textmessage *:not(a):not([class*="com_group"]):not([class*="acid"]) {
  color: var(--text-main) !important;
}

.textmessage img {
  max-width: 100% !important;
  height: auto !important;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 4px 0;
  display: block;
}

.textmessage img:hover {
  border-color: var(--accent);
}

.aurCommDel {
  display: none;
  float: right;
  width: 11px;
  height: 11px;
  background: url(/img/comX.png) 0 0 no-repeat;
  opacity: 0.5;
}

.aurCommDel:hover {
  opacity: 1;
}

.aurCommRED {
  margin-right: 5px;
  display: none;
  float: right;
  width: 11px;
  height: 11px;
  background: url(/img/comR.png) 0 0 no-repeat;
  opacity: 0.5;
}

.aurCommRED:hover {
  opacity: 1;
}

.aurCommTopugol {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--bg-elevated);
  margin-left: 34px;
}

.aurCommInput {
  width: 100%;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid var(--border) !important;
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: 6px;
  padding: 4px 8px;
}

.aurCommText {
  font-size: 10px;
  color: var(--text-muted);
}

.aurCommSecurity {
  padding-left: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aurCommSecurity .securityCode {
  width: 84px;
  height: 28px;
  color: var(--text-main);
  text-transform: uppercase;
  font-size: 12px !important;
  padding: 2px 6px;
  border: 1px solid var(--border) !important;
  background: var(--bg-surface);
  border-radius: 4px;
}

.aurCommSecurity #secuImgC {
  height: 26px;
}

.aurCommInputName {
  width: 120px;
  max-width: 100%;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid var(--border) !important;
  background: var(--bg-surface);
  color: var(--text-main);
  border-radius: 4px;
}

.likeplus10,
.likeminus10 {
  margin: 0;
  padding: 10px !important;
  border-radius: 8px;
}

.likeplus10 {
  background: rgba(46, 204, 113, 0.16) !important;
}

.likeminus10 {
  background: rgba(231, 76, 60, 0.16) !important;
}

.ratebackground {
  color: var(--text-main) !important;
}

.acid1,
.acid2 {
  background: #008bec;
}

.com_group_id3,
.acid3 {
  background: #2563eb !important;
}

.com_group_id4,
.acid4 {
  background: #ef0000 !important;
}

.com_group_id5,
.acid5 {
  background: #b400ff !important;
}

.com_group_id251,
.acid251 {
  background: rgb(25, 167, 25) !important;
}

.com_group_id4,
.com_group_id3,
.com_group_id5,
.author_name_id,
.com_group_id251,
.acid251 {
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 50px;
  font-size: 11px;
  display: inline-block;
}

.no-adb-1 {
  display: block;
  color: #ef4444;
  line-height: 1.4;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
  background: #fee2e2;
  text-align: center;
}

.addmat1 {
  margin: 14px 0;
  padding: 12px;
  border-radius: var(--btn-radius);
  background: var(--bg-elevated);
  color: var(--text-muted);
  text-align: center;
  font-size: 13.5px;
}

/* === ПАГИНАЦИЯ И ПОДВАЛ (FOOTER) === */
.pageselector {
  margin: 16px 0;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.pageselector a,
.pageselector b,
.pageselector span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  margin: 3px;
  border-radius: 8px;
  font-weight: 600;
}

.pageselector b {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.footer-up-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  margin: 18px 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  color: var(--text-main);
  font-weight: 600;
}

.footer-section {
  text-align: center;
  padding: 20px 14px 32px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer-section a {
  display: inline-block;
  margin-left: 8px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  color: var(--text-main);
  font-weight: 500;
}

/* ==========================================================================
   ДОПОЛНЕНИЕ: КНОПКА (+), ШТОРКА КАТЕГОРИЙ, ФОРМЫ И ОТВЕТЫ НА КОММЕНТАРИИ
   ========================================================================== */

/* 1. Кнопка (+) в шапке и выплывающая шторка (Bottom Sheet) */
.m-add-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 0;
  background: rgba(0, 0, 0, 0.0);
  color: #ffffff !important;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.m-add-trigger:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.m-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.m-sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.m-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  padding: 10px 16px 26px;
  z-index: 301;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.m-bottom-sheet.open {
  transform: translateY(0);
}

.m-sheet-handle {
  width: 42px;
  height: 5px;
  background: var(--border);
  border-radius: 10px;
  margin: 0 auto 10px;
}
.m-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.m-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.m-cat-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 14px;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.m-cat-tile i {
  font-size: 18px;
  color: var(--accent);
  width: 22px;
  text-align: center;
}
.m-cat-tile:active {
  transform: scale(0.97);
  border-color: var(--accent);
}

/* 2. Кнопки редактирования материала (на главной и внутри) */
.m-card-wrap {
  position: relative;
}
.m-edit-fab {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.m-edit-fab:active {
  background: var(--accent);
}

.m-entry-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.m-edit-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--btn-radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 14px;
}
.m-edit-entry-btn i {
  color: var(--accent);
  font-size: 16px;
}
.m-edit-entry-btn:active {
  border-color: var(--accent);
}

/* 3. Мобильная форма добавления/редактирования материала */
.m-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
ul.form-fields {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.m-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}/* 3. Мобильная форма добавления/редактирования материала (перебивает base.min.css) */
.m-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.m-clean-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  width: 100% !important;
}

.m-field-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}

.m-label {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.m-label i {
  color: var(--accent);
  width: 16px;
  text-align: center;
}
.m-label .req,
.m-label font[color="red"],
.m-label .manStar {
  color: #ef4444 !important;
  margin-left: 2px;
}

/* Поля ввода и исправление нахлеста селектора категорий uCoz (.u-combo) */
.m-control {
  width: 100% !important;
  max-width: 100% !important;
}

.m-control input[type="text"],
.m-control input[type="url"],
.m-control input[type="email"],
.m-control input[type="number"],
.m-control input[type="password"],
.m-control select,
.m-control textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 44px;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-elevated) !important;
  color: var(--text-main) !important;
  font-size: 16px !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  outline: none;
  margin: 0 !important;
}

.m-control textarea {
  min-height: 160px !important;
  line-height: 1.45 !important;
  resize: vertical;
}

/* Приручаем кастомный выпадающий список категорий uCoz (.u-combo) */
.m-control .u-combo,
.m-control table.u-combo {
  width: 100% !important;
  max-width: 100% !important;
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  margin: 0 !important;
}
.m-control .u-combo td {
  padding: 4px 8px !important;
}
.m-control #catSelector9 {
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  line-height: 36px !important;
  background: transparent !important;
  color: var(--text-main) !important;
  font-size: 15px !important;
  text-align: left !important;
}

/* Прячем лишнее системное двоеточие ". *:" над полем описания */
.m-msg-box > span:first-child,
.m-msg-box .manTd1 {
  display: none !important;
}

/* Блок загрузки файлов и скриншотов */
.m-files-box {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px;
}
.m-files-box input[type="file"] {
  display: block;
  width: 100%;
  margin: 6px 0;
  font-size: 13px;
  color: var(--text-main);
}

/* Кнопка и блок дополнительных полей */
.m-extra-toggle {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.m-extra-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 4px;
}


/* Кнопки Сохранить / Добавить внизу формы */
.form-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 8px !important;
  width: 100% !important;
}
.form-buttons input[type="submit"],
.form-buttons button[type="submit"],
#ldF18 {
  width: 100% !important;
  min-height: 48px !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  background: #258c42 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.form-buttons input[type="reset"],
.form-buttons input[type="button"] {
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--btn-radius) !important;
  background: var(--bg-elevated) !important;
  color: var(--text-muted) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
}

/* 4. Кнопка «Ответить» и мобильная форма комментариев */
.m-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--accent) !important;
  padding: 2px 6px;
  border-radius: 4px;
}
.m-reply-btn i{margin-right: 6px;}
.m-reply-btn:active {
  background: var(--bg-elevated);
}
.u-rate-btn i{padding:0 7px; color:var(--text-muted)}
.m-rate-ico {
  padding: 2px 5px;
  color: var(--text-muted);
}
.m-rate-ico.green:active { color: #22c55e; }
.m-rate-ico.red:active { color: #ef4444; }

.m-comm-form-wrap {
  margin-top: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 10px;
}
.m-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 13.5px;
}
.m-reply-cancel {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.m-bbcodes-bar {
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.m-bbcodes-bar input,
.m-bbcodes-bar button {
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 12px;
}
.m-comm-textarea {
  width: 100% !important;
  min-height: 96px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border) !important;
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  font-size: 16px !important;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.m-comm-textarea:focus {
  border-color: var(--accent) !important;
}
.m-comm-submit {
  width: 100% !important;
  min-height: 46px;
  margin-top: 10px;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  background: var(--accent) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700;
  cursor: pointer;
}

/* === ИСПРАВЛЕНИЕ ВЫПАДАЮЩЕГО СПИСКА КАТЕГОРИЙ UCOZ (.u-combo) === */
.u-combolist {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  padding: 6px 4px !important;
  z-index: 9999 !important;
  max-height: 260px !important;
  overflow-y: auto !important;
}

/* Возвращаем нормальный вид чекбоксам внутри списка категорий */
.u-combolist input[type="checkbox"] {
  display: inline-block !important;
  position: static !important;
  opacity: 1 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 8px 0 4px !important;
  vertical-align: middle !important;
  accent-color: var(--accent);
}

.u-combolist div,
.u-combolist label {
  display: flex !important;
  align-items: center !important;
  min-height: 36px !important;
  padding: 4px 8px !important;
  font-size: 15px !important;
  color: var(--text-main) !important;
  border-radius: 6px;
}

.u-combolist div:hover {
  background: var(--bg-elevated) !important;
}

/* === ПРОФИЛЬ / ВХОД В БОКОВОМ МЕНЮ === */
.m-user-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.m-profile-btn {
  flex: 1;
  min-width: 0;
  /* white-space: nowrap; */
  /* overflow: hidden; */
  /* text-overflow: ellipsis; */
}

.m-menu-ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.m-menu-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-pm-badge {
  margin-left: auto;
  background: #22c55e;
  color: #ffffff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
}

.m-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 46px;
  border-radius: var(--btn-radius);
  background: var(--bg-elevated);
  color: var(--text-muted) !important;
  font-size: 16px;
  flex-shrink: 0;
}

.m-logout-btn:active {
  color: #ef4444 !important;
}

/* === ЖЕСТКАЯ ФИКСАЦИЯ СПИСКА КАТЕГОРИЙ (#uCatsMenu7 / .u-combolist) === */
div[id^="uCatsMenu"] {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100vw !important;
  padding: 0 14px !important;
  box-sizing: border-box !important;
  z-index: 9999 !important;
}

div[id^="uCatsMenu"] > .u-combolist,
.u-combolist {
  position: relative !important;
  left: 0 !important;
  top: 4px !important;
  width: 100% !important;
  max-width: 772px !important;
  margin: 0 auto !important;
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--accent) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  padding: 6px 4px !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.u-combolist input[type="checkbox"] {
  display: inline-block !important;
  position: static !important;
  opacity: 1 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 8px 0 4px !important;
  vertical-align: middle !important;
  accent-color: var(--accent);
}

/* === КНОПКИ РЕДАКТИРОВАНИЯ И УДАЛЕНИЯ МАТЕРИАЛОВ И КОММЕНТАРИЕВ === */

.m-mod-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.m-mod-btn.del {
  color: #ff6b6b !important;
}
.m-mod-btn:active {
  transform: scale(0.92);
}


.m-entry-act {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--btn-radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 14px;
}
.m-entry-act.edit i {
  color: var(--accent);
}
.m-entry-act.del {
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3);
}
.m-entry-act:active {
  opacity: 0.8;
}

/* ==========================================================================
   МОДУЛЬ «ПОЛЬЗОВАТЕЛИ», ЛС, ФОРМЫ ВХОДА И ШТАТНАЯ ПАНЕЛЬ ($MODER_PANEL$)
   ========================================================================== */

/* 1. Штатная панель модерации ($MODER_PANEL$) на карточках, в материале и комментариях */
.m-card-moder {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 15;
  -webkit-backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
}
.m-card-moder img {
  width: 18px !important;
  height: 18px !important;
  vertical-align: middle;
}

.m-entry-moder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-radius: var(--btn-radius);
  background: var(--bg-elevated);
  font-size: 13.5px;
  font-weight: 600;
}
.m-moder-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.m-comm-moder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}
.m-own-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-main) !important;
  margin-right: 4px;
  font-size: 13px;
}
.m-own-act.del {
  color: #ef4444 !important;
}

/* 2. Карточки Входа, Регистрации и Доступ запрещен */
.m-auth-card,
.m-denied-card,
.m-profile-card,
.m-pm-card,
.m-users-list-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.m-card-title {
  margin: 0 0 16px;
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.m-card-title i {
  color: var(--accent);
}

.m-auth-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.m-auth-footer a {
  font-weight: 700;
}

.m-login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
}
.m-check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.m-check-label input[type="checkbox"] {
  display: inline-block !important;
  position: static !important;
  opacity: 1 !important;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.m-social-divider {
  position: relative;
  text-align: center;
  margin: 10px 0 6px;
}
.m-social-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.m-social-divider span {
  position: relative;
  background: var(--bg-surface);
  padding: 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.m-social-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.m-denied-card {
  text-align: center;
  padding: 28px 18px;
}
.m-denied-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.m-denied-text {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 18px;
}

/* 3. Персональная страница профиля (PDA) */
.m-prof-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.m-prof-ava-wrap {
  flex-shrink: 0;
}
.m-prof-ava,
.m-prof-ava-wrap img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
}
.m-prof-ava-letter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
}
.m-prof-main {
  flex: 1;
  min-width: 0;
}
.m-prof-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.m-prof-username {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  word-break: break-word;
}
.m-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.m-status-pill.online {
  background: rgba(34, 197, 94, 0.16);
  color: #22c55e;
}
.m-status-pill.offline {
  background: var(--bg-elevated);
  color: var(--text-muted);
}
.m-prof-realname {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}
.m-prof-group {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

.m-prof-status {
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 14px;
  border-left: 3px solid var(--accent);
}

.m-prof-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.m-stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  color: var(--text-main) !important;
}
.m-stat-box b {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.m-stat-box span {
  font-size: 12px;
  color: var(--text-muted);
}

.m-prof-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.m-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: var(--btn-radius);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}
.m-btn-primary {
  background: var(--accent);
  color: #ffffff !important;
}
.m-btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-main) !important;
}

.m-prof-details {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.m-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.m-detail-row:last-child {
  border-bottom: none;
}
.m-detail-label {
  color: var(--text-muted);
}
.m-detail-val {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

/* 4. Личные сообщения (ЛС) и Список пользователей */
.m-pm-card table,
.m-users-list-card table {
  width: 100% !important;
  text-align: left;
  font-size: 14px;
}
.m-pm-card input[type="text"],
.m-pm-card textarea,
.m-users-filter input[type="text"],
.m-users-filter select {
  width: 100% !important;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border) !important;
  background: var(--bg-elevated) !important;
  color: var(--text-main) !important;
  font-size: 15px !important;
  margin: 4px 0;
}
.m-pm-card input[type="submit"],
.m-pm-card input[type="button"],
.m-users-filter input[type="submit"],
.m-users-filter input[type="button"] {
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  margin-top: 6px;
  cursor: pointer;
}
.m-comm-error {
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
}

/* === ПАНЕЛЬ СОРТИРОВКИ МАТЕРИАЛОВ В КАТЕГОРИИ === */
.m-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  box-shadow: var(--shadow);
}

.m-sort-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.m-sort-label i {
  color: var(--accent);
}

.m-sort-select-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.m-sort-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 0 30px 0 12px;
  border: none !important;
  background: transparent !important;
  color: var(--text-main) !important;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.m-sort-select-wrap i.fa-caret-down {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.com-order-block{
  display: flex;
  flex-wrap: nowrap;
}

.com-order-block {
    text-align: center !important;
    white-space: nowrap;
    margin-bottom: 15px;
}
.com-order-select, .eRating{margin-left:5px}