/* RBS Forum UI / responsive enhancement 2026-10-25
   Scope: existing public UniGameCMS theme (body.rbs-modern).
   No core module CSS/markup IDs or AJAX handlers are replaced. */
:root {
  --rbs-ui-card: #1c242f;
  --rbs-ui-card-alt: #232d3a;
  --rbs-ui-border: rgba(152, 175, 203, .20);
  --rbs-ui-soft: #aebcce;
  --rbs-ui-blue: #83b5fc;
  --rbs-ui-ease: cubic-bezier(.2, .7, .2, 1);
}
html { scroll-padding-top: 16px; }
body.rbs-modern {
  min-width: 0;
  background: radial-gradient(ellipse at 55% -35%, rgba(61, 102, 168, .18), transparent 48%), #11151b;
  overflow-wrap: anywhere;
}
body.rbs-modern .wapper { max-width: 100%; min-width: 0; }
body.rbs-modern .wapper > .content { min-width: 0; }
body.rbs-modern .container > .row > [class*="col-"],
body.rbs-modern .profile-page > [class*="col-"],
body.rbs-modern .row > [class*="col-lg-"] { min-width: 0; }
body.rbs-modern a { color: var(--rbs-ui-blue); }
body.rbs-modern a:hover { color: #accfff; text-decoration: none; }
body.rbs-modern p, body.rbs-modern li { overflow-wrap: anywhere; }
body.rbs-modern h1, body.rbs-modern h2, body.rbs-modern h3,
body.rbs-modern h4, body.rbs-modern h5 { color: #ecf3fc; overflow-wrap: anywhere; }
body.rbs-modern small, body.rbs-modern .small, body.rbs-modern .text-muted { color: #a3b1c5 !important; }
body.rbs-modern .text-primary { color: #83b5fc !important; }
body.rbs-modern .text-success { color: #6bd4a4 !important; }
body.rbs-modern .text-danger { color: #ef888b !important; }
body.rbs-modern .text-warning { color: #efc17d !important; }
body.rbs-modern img { max-width: 100%; }
body.rbs-modern .with_code, body.rbs-modern .news,
body.rbs-modern .noty-block, body.rbs-modern .ban-information {
  overflow-wrap: anywhere;
  line-height: 1.65;
}
body.rbs-modern .with_code img, body.rbs-modern .news img,
body.rbs-modern .with_code video, body.rbs-modern .with_code iframe,
body.rbs-modern .news iframe, body.rbs-modern .ban-information img {
  max-width: 100% !important;
}
body.rbs-modern .with_code pre, body.rbs-modern .with_code code,
body.rbs-modern .with_code blockquote { max-width: 100%; overflow-x: auto; }
body.rbs-modern .with_code pre { border-radius: 10px; padding: 12px; background: #111822; }
body.rbs-modern .with_code table { max-width: 100%; }
body.rbs-modern .block {
  background: linear-gradient(148deg, rgba(35, 44, 58, .96), rgba(25, 32, 43, .96));
  border: 1px solid var(--rbs-ui-border);
  box-shadow: 0 12px 30px rgba(3, 8, 17, .15);
  padding: 25px;
  margin-bottom: 22px;
}
body.rbs-modern .block.block-table { padding: 0; }
body.rbs-modern .block.block-table > .block_head { padding: 23px 24px; }
body.rbs-modern .block .block_head { font-size: 17px; line-height: 1.45; margin-bottom: 21px; }
body.rbs-modern .block .block_head > .btn { vertical-align: middle; }
body.rbs-modern .empty-element { color: var(--rbs-ui-soft); line-height: 1.6; }
body.rbs-modern .noty-block, body.rbs-modern .bs-callout {
  border-color: var(--rbs-ui-border);
  background-color: rgba(98, 141, 198, .08);
}
body.rbs-modern .btn { line-height: 1.38; max-width: 100%; white-space: normal; }
body.rbs-modern .btn:focus-visible, body.rbs-modern a:focus-visible {
  outline: 2px solid #a4ccff !important; outline-offset: 3px;
}
body.rbs-modern .btn-outline-primary { color: #a6cafd; }
body.rbs-modern .form-control, body.rbs-modern select,
body.rbs-modern textarea { max-width: 100%; }
body.rbs-modern input.form-control, body.rbs-modern select.form-control {
  min-height: 43px; text-indent: 0;
}
body.rbs-modern textarea.form-control { min-height: 96px; }
body.rbs-modern .form-control::placeholder { color: #97a8bd; opacity: 1; }
body.rbs-modern .input-group { min-width: 0; }
body.rbs-modern .input-group .form-control { min-width: 0; }
body.rbs-modern .form-group label { color: #d4e0ee; }
body.rbs-modern .pagination { flex-wrap: wrap; gap: 5px; }
body.rbs-modern .pagination .page-link {
  background-color: #222c39; color: #bed9fc; border: 1px solid var(--rbs-ui-border);
  border-radius: 8px; min-width: 36px; text-align: center;
}
body.rbs-modern .pagination .active .page-link { background: #4f82d0; color: #fff; }
body.rbs-modern #pagination2 { margin: 6px 0 24px; }
body.rbs-modern #pagination2 .pagination { justify-content: center; }
body.rbs-modern .vertical-navigation ul li a {
  display: block; min-height: 43px; padding-top: 12px; padding-bottom: 12px;
  overflow-wrap: anywhere;
}
body.rbs-modern .wapper .footer {
  background: #151d26; border-top: 1px solid var(--rbs-ui-border); margin-top: 12px;
}
body.rbs-modern .wapper .footer ul li { margin-bottom: 6px; }
body.rbs-modern .wapper .footer ul li a { color: #abbdd3; }
body.rbs-modern .wapper .footer ul li a:hover { color: #d8e8ff; }
body.rbs-modern .wapper .footer .copyright { color: #9eafc4; }

/* Header: preserve dynamic database-backed links while making them reachable. */
body.rbs-modern .wapper .header > .container { position: relative; }
body.rbs-modern .wapper .header { background: rgba(19, 27, 37, .98); }
body.rbs-modern .wapper .header .collapsible-menu > li > a,
body.rbs-modern .wapper .header .collapsible-menu > li ul > li > a {
  transition: background-color .18s var(--rbs-ui-ease), color .18s var(--rbs-ui-ease);
}
body.rbs-modern .wapper .navigation { background: #1a2531; margin-bottom: 24px; }
body.rbs-modern .wapper .navigation .breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; height: auto;
  min-height: 45px; padding: 8px 0; margin-bottom: 0;
}
body.rbs-modern .wapper .navigation .breadcrumb li { white-space: normal; }
body.rbs-modern .wapper .navigation .breadcrumb li:last-child { color: #e0ebf9; }
body.rbs-modern .logo img { width: auto; max-height: 112px; object-fit: contain; }
body.rbs-modern .monitoring-table { margin-bottom: 20px; }
body.rbs-modern .monitoring-table > table { margin-bottom: 0; }
body.rbs-modern .monitoring-table td { vertical-align: middle; }
body.rbs-modern .monitoring-table tbody tr:hover > td { background: rgba(79, 131, 207, .055); }

/* Consistent table styling: keep the original table and its JS actions. */
body.rbs-modern .table-responsive {
  max-width: 100%; min-width: 0; border: 1px solid var(--rbs-ui-border);
  border-radius: 10px; -webkit-overflow-scrolling: touch;
  scrollbar-color: #5d7189 #1b2430; scrollbar-width: thin;
}
body.rbs-modern .table-responsive > table.table { margin-bottom: 0; }
body.rbs-modern .table-responsive > table.table thead td,
body.rbs-modern .table-responsive > table.table thead th {
  background: #273242; color: #d6e5f6; font-weight: 700;
  border-color: var(--rbs-ui-border); font-size: 13px;
}
body.rbs-modern .table.table-bordered > tbody > tr > td,
body.rbs-modern .table.table-bordered > tbody > tr > th { border-color: var(--rbs-ui-border); }
body.rbs-modern .table-responsive > table.table tbody > tr:not(.hidden-tr):hover > td {
  background-color: rgba(115, 161, 229, .07);
}
body.rbs-modern .table-responsive:focus-visible { outline: 2px solid #83b5fc; outline-offset: 3px; }
body.rbs-modern .table-responsive .btn { margin-top: 2px; margin-bottom: 2px; }
body.rbs-modern .block.block-search > .input-search { margin-bottom: 21px; }
body.rbs-modern .block.block-search > .input-search .fa-search {
  color: #9fbce4; font-size: 15px; top: 14px;
}
body.rbs-modern .block.block-search > .input-search input { min-height: 47px; }
body.rbs-modern .block.block-search > .input-search input:focus { outline: none; }
body.rbs-modern .table-responsive .baninfo td:first-child { min-width: 130px; }
body.rbs-modern .table-responsive .baninfo td:last-child,
body.rbs-modern .modal-body td:last-child { white-space: normal; overflow-wrap: anywhere; }

/* Forum: readable sections and long topic titles. */
body.rbs-modern #forum, body.rbs-modern #forum_topics { min-width: 0; }
body.rbs-modern #forum > h2, body.rbs-modern #forum_topics h2 {
  font-size: 18px; font-weight: 750; margin: 19px 0 13px;
}
body.rbs-modern #forum .row .col-lg-8 > div h3,
body.rbs-modern #forum.row .col-lg-8 > div h3,
body.rbs-modern #forum_topics .row .col-lg-8 > div h3,
body.rbs-modern #forum_topics.row .col-lg-8 > div h3 {
  white-space: normal; text-overflow: clip; overflow: visible; line-height: 1.4;
}
body.rbs-modern #forum .row .col-lg-8 > div h3 a,
body.rbs-modern #forum.row .col-lg-8 > div h3 a,
body.rbs-modern #forum_topics .row .col-lg-8 > div h3 a,
body.rbs-modern #forum_topics.row .col-lg-8 > div h3 a { font-size: 15px; font-weight: 650; }
body.rbs-modern #forum .row .col-lg-8 img,
body.rbs-modern #forum.row .col-lg-8 img,
body.rbs-modern #forum_topics .row .col-lg-8 img,
body.rbs-modern #forum_topics.row .col-lg-8 img { border-radius: 10px; object-fit: cover; }
body.rbs-modern .topic-answers .top-area a { overflow-wrap: anywhere; }
body.rbs-modern .topic-answers .with_code { min-width: 0; }
body.rbs-modern .topic-answers .with_code iframe,
body.rbs-modern .topic-answers .with_code video { max-width: 100% !important; }
body.rbs-modern #new_news a h3, body.rbs-modern .news a h3 {
  white-space: normal; line-height: 1.45; overflow: visible; text-overflow: unset;
}
body.rbs-modern #last_activity p, body.rbs-modern #top_users p {
  overflow-wrap: anywhere; line-height: 1.5;
}

/* Profiles / messaging / forms / modals. */
body.rbs-modern .profile-page .block.profile .avatar { max-width: 100%; }
body.rbs-modern .profile-page .cover { max-width: 100%; }
body.rbs-modern #place_for_messages .dialog { border-radius: 10px; }
body.rbs-modern #place_for_messages .dialog > div:nth-child(1),
body.rbs-modern #place_for_messages .dialog > div:nth-child(2) {
  background: #263142; border-color: var(--rbs-ui-border);
}
body.rbs-modern #place_for_messages .dialog:hover > div { background: #2a3b51; }
body.rbs-modern .modal-content { background: #1d2836; }
body.rbs-modern .modal-header .close { color: #f2f7ff; opacity: .85; text-shadow: none; }
body.rbs-modern .modal-header .close:hover { opacity: 1; }
body.rbs-modern .modal-header .modal-title { font-size: 19px; }
body.rbs-modern .modal-body { overflow-wrap: anywhere; }
body.rbs-modern .modal-dialog { max-width: calc(100% - 24px); margin-left: auto; margin-right: auto; }
body.rbs-modern .modal-body .table-responsive { margin-bottom: 0; }
body.rbs-modern .rbs-auth-card { max-width: 100%; }
body.rbs-modern .rbs-store-step__body { overflow-wrap: anywhere; }
body.rbs-modern .rbs-store-summary { max-width: 100%; }
body.rbs-modern .mce-tinymce, body.rbs-modern .tox-tinymce { max-width: 100%; }
body.rbs-modern .tox .tox-toolbar__primary { flex-wrap: wrap; }
body.rbs-modern .rbs-inline-actions { gap: 10px; }

@media (min-width: 992px) {
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu:not(.user-menu) > li > a {
    text-overflow: ellipsis; overflow: hidden; max-width: 255px;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu {
    position: relative; z-index: 1250;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > a {
    color: #d2e6ff; font-weight: 750; padding-left: 13px; padding-right: 13px;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul {
    right: 0; left: auto; width: 276px; min-width: 236px;
    top: 70px; max-height: min(75vh, 550px); overflow-y: auto;
    border-radius: 0 0 13px 13px; padding: 8px;
    background: #1c2633; box-shadow: 0 22px 42px rgba(0,0,0,.32);
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li {
    position: relative; float: none; width: 100%; margin: 0;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li > a {
    display: block; width: 100%; height: auto; min-height: 39px;
    line-height: 1.4; padding: 10px 12px; margin: 0;
    font-size: 13px; border: 0; border-radius: 8px;
    white-space: normal; overflow-wrap: anywhere;
    color: #d2dfef; background: transparent;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li > a:hover,
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li > a.open {
    background: rgba(112, 166, 242, .12); color: #fff;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li > ul {
    position: static; width: 100%; min-width: 0; max-height: none;
    overflow: visible; border: 0; padding: 0 0 6px 11px;
    border-radius: 0; box-shadow: none; background: #202d3d;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li > ul > li > a {
    height: auto; min-height: 34px; line-height: 1.4; border: 0;
    padding: 8px 10px; margin: 0; width: 100%; overflow-wrap: anywhere;
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > ul > li > ul > li > a:hover {
    background: rgba(112, 166, 242, .1);
  }
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > a::before,
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu > a::after,
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu::before,
  body.rbs-modern .wapper .header #hidden-menu .rbs-more-menu::after { display: none !important; }
}

@media (max-width: 991.98px) {
  body.rbs-modern .wapper .header { min-height: 70px; }
  body.rbs-modern .wapper .header > .container { min-height: 70px; }
  body.rbs-modern .wapper .header .menu-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    color: #e3f0ff; background: #253447;
    border: 1px solid #3c536d; border-radius: 12px;
    width: 46px; height: 46px; margin-top: 12px; margin-bottom: 12px;
    font-size: 18px; line-height: 1;
  }
  body.rbs-modern .wapper .header .menu-trigger:before { line-height: 1; }
  body.rbs-modern .wapper .header .menu-trigger:not(.collapsed) { background: #365b8b; }
  body.rbs-modern .wapper .header .auth-in {
    margin-top: 15px; max-width: calc(100% - 65px); padding: 8px 12px;
  }
  body.rbs-modern .wapper .header #hidden-menu.collapse:not(.show):not(.collapsing) {
    display: none !important;
  }
  body.rbs-modern .wapper .header #hidden-menu.show,
  body.rbs-modern .wapper .header #hidden-menu.collapsing { display: block !important; }
  body.rbs-modern .wapper .header #hidden-menu {
    clear: both; width: 100%; padding: 10px; margin: 0 0 10px;
    background: #1b2837; border: 1px solid var(--rbs-ui-border);
    border-radius: 12px; box-shadow: 0 18px 32px rgba(0, 0, 0, .23);
  }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu { display: block; width: 100%; }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu > li { padding-right: 0; }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu > li.collapsible { padding-right: 20px; }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu > li > a {
    display: flex; align-items: center; height: auto; min-height: 48px;
    line-height: 1.4; white-space: normal; color: #d8e6f7;
    padding: 11px 12px; border-color: var(--rbs-ui-border);
  }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu > li.collapsible::before {
    color: #a8c5eb; top: 25px; right: 5px;
  }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu > li ul {
    position: static; width: 100%; max-height: none;
    overflow: visible; margin: 0; padding: 5px 0 9px 10px;
    background: rgba(98, 142, 199, .045); border: 0; box-shadow: none;
  }
  body.rbs-modern .wapper .header #hidden-menu .collapsible-menu > li ul > li > a {
    width: 100%; height: auto; min-height: 42px; margin-left: 0;
    line-height: 1.5; padding: 10px 13px; color: #c0d4ed;
  }
  body.rbs-modern .wapper .header .collapsible-menu.user-menu {
    height: 70px; width: min(185px, calc(100% - 72px));
    max-width: calc(100% - 72px); z-index: 1300;
    background: transparent;
  }
  body.rbs-modern .wapper .header .collapsible-menu.user-menu > li > a {
    border: 0; background: transparent; border-radius: 10px;
  }
  body.rbs-modern .wapper .header .collapsible-menu.user-menu > li > a h3,
  body.rbs-modern .wapper .header .collapsible-menu.user-menu > li > a p { color: #deebfa; }
  body.rbs-modern .wapper .header .collapsible-menu.user-menu > li > ul {
    right: 0; left: auto; width: min(285px, calc(100vw - 24px)) !important;
    min-width: 0 !important; max-height: calc(100dvh - 92px);
    overflow-y: auto; overflow-x: hidden; background: #1d2837;
    border: 1px solid var(--rbs-ui-border); border-radius: 0 0 12px 12px;
  }
  body.rbs-modern .wapper .header .collapsible-menu.user-menu > li > ul > li > a {
    margin-left: 0; padding: 10px 15px; height: auto; min-height: 41px;
    white-space: normal; overflow-wrap: anywhere;
  }
  body.rbs-modern .wapper .navigation { margin-bottom: 17px; }
  body.rbs-modern .logo { height: auto; margin-bottom: 16px; text-align: center; }
  body.rbs-modern .logo a { height: auto; line-height: normal; }
  body.rbs-modern .logo img { max-width: min(340px, 100%); max-height: 96px; }
  body.rbs-modern .monitoring-table { margin-bottom: 17px; }
  body.rbs-modern .block { padding: 20px; margin-bottom: 18px; }
  body.rbs-modern .block.block-table { padding: 0; }
  body.rbs-modern .block.block-table > .block_head { padding: 20px; }
  body.rbs-modern .block .block_head { margin-bottom: 16px; font-size: 17px; }
  body.rbs-modern .block.block-search > .input-search {
    margin: 0 -20px 17px; padding: 0 20px; width: calc(100% + 40px);
  }
  body.rbs-modern .block.block-search > .input-search i.fa-search { left: 31px; }
  body.rbs-modern .block.block-search > .input-search input { width: 100%; }
  body.rbs-modern .table-responsive { overflow-x: auto !important; overflow-y: hidden; }
  body.rbs-modern .table-responsive > table.table { width: max-content; min-width: 100%; }
  body.rbs-modern .modal-body .table-responsive > table.table,
  body.rbs-modern .table-responsive > table.baninfo { width: 100%; }
  body.rbs-modern .modal-body .table-responsive > table.table td,
  body.rbs-modern .table-responsive > table.baninfo td {
    white-space: normal !important; overflow-wrap: anywhere;
  }
  body.rbs-modern .rbs-store-summary { position: static; }
  body.rbs-modern .rbs-inline-actions .btn { min-height: 42px; }
  body.rbs-modern #new_news div:not(.loader) a img,
  body.rbs-modern .news div:not(.loader) a img { object-fit: cover; }
  body.rbs-modern .footer { margin-top: 10px; }
}

@media (max-width: 767.98px) {
  body.rbs-modern .topic-answers { margin-left: 0; margin-right: 0; margin-bottom: -16px; }
  body.rbs-modern .topic-answers div[id^="answer"] { border-top: 1px solid var(--rbs-ui-border); }
  body.rbs-modern .topic-answers div[id^="answer"] .top-area {
    height: auto; min-height: 43px; margin: 0; padding: 9px 12px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 7px 12px; flex-wrap: wrap;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .top-area .left-side,
  body.rbs-modern .topic-answers div[id^="answer"] .top-area .right-side {
    float: none; width: auto; padding: 0; margin: 0; min-width: 0;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area {
    display: flex; flex-direction: column; padding: 10px 0; gap: 10px;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area .left-side {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    float: none; width: 100%; padding: 0 12px;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area .left-side img {
    width: 48px; height: 48px; object-fit: cover; border-radius: 10px;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area .left-side br { display: none; }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area .left-side p {
    display: inline-flex; align-items: center; width: auto;
    padding: 4px 8px; margin: 0; border-radius: 7px;
    font-size: 11px; line-height: 1.4; background: #273547;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area .left-side p:after { display: none; }
  body.rbs-modern .topic-answers div[id^="answer"] .center-area .right-side {
    float: none; width: 100%; min-width: 0; padding: 0 12px;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .bottom-area {
    display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 12px;
  }
  body.rbs-modern .topic-answers div[id^="answer"] .bottom-area .left-side,
  body.rbs-modern .topic-answers div[id^="answer"] .bottom-area .right-side {
    float: none; width: auto; min-width: 0; padding: 0;
  }
  body.rbs-modern .topic-answers .btn-group .btn { min-width: 43px; min-height: 40px; }
  body.rbs-modern .mce-tinymce, body.rbs-modern .tox-tinymce { width: 100% !important; }
  body.rbs-modern #forum .row .col-lg-8 > div,
  body.rbs-modern #forum.row .col-lg-8 > div,
  body.rbs-modern #forum_topics .row .col-lg-8 > div,
  body.rbs-modern #forum_topics.row .col-lg-8 > div { width: calc(100% - 60px); }

  /* Card mode for the two data-driven lists. Keep tr.hidden-tr and modal nodes in DOM. */
  body.rbs-modern .rbs-mobile-cards { border: 0; background: transparent; overflow: visible !important; }
  body.rbs-modern .rbs-mobile-cards > table.table { display: block; width: 100%; min-width: 0; }
  body.rbs-modern .rbs-mobile-cards > table.table > thead { display: none; }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody { display: block; width: 100%; }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"],
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card {
    display: block; width: 100%; margin: 0 0 11px; padding: 8px 10px;
    border: 1px solid var(--rbs-ui-border) !important;
    background: linear-gradient(135deg, #243245, #1c2735);
    border-radius: 11px; box-shadow: 0 7px 20px rgba(5, 11, 20, .13);
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"]:active {
    background: #2a3c52;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"] > td,
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td {
    display: grid; grid-template-columns: 91px minmax(0, 1fr);
    width: 100%; align-items: start; gap: 10px; padding: 7px 5px !important;
    min-height: 32px; white-space: normal !important;
    background: transparent !important; border: 0 !important;
    border-bottom: 1px solid var(--rbs-ui-border) !important;
    font-size: 13px; line-height: 1.55; text-align: left;
    overflow-wrap: anywhere;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"] > td:last-child,
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td:last-child {
    border-bottom: 0 !important;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"] > td::before,
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td::before {
    content: attr(data-rbs-label); display: block; color: #9daec4;
    font-weight: 650; font-size: 11px; padding-top: 1px;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"] > td:first-child {
    color: #f0f6ff; font-weight: 750; font-size: 14px;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.hidden-tr {
    display: block; position: static; height: 0; padding: 0; margin: 0;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.hidden-tr > td {
    display: block; position: static; height: 0 !important;
    padding: 0 !important; margin: 0 !important;
    border: 0 !important; background: transparent !important;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr:not([data-toggle="modal"]):not(.hidden-tr):not(.rbs-list-card) {
    display: block; width: 100%;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr:not([data-toggle="modal"]):not(.hidden-tr):not(.rbs-list-card) > td {
    display: block; white-space: normal; text-align: center;
  }
  body.rbs-modern .rbs-mobile-cards .modal { text-align: left; }
  body.rbs-modern .rbs-mobile-cards .modal-dialog { width: auto; }
}

@media (max-width: 575.98px) {
  body.rbs-modern { font-size: 14px; }
  body.rbs-modern .container { padding-left: 12px; padding-right: 12px; }
  body.rbs-modern .row { margin-left: -7px; margin-right: -7px; }
  body.rbs-modern .row > [class*="col-"] { padding-left: 7px; padding-right: 7px; }
  body.rbs-modern .wapper .navigation .breadcrumb { font-size: 12px; }
  body.rbs-modern .block { padding: 16px; border-radius: 13px; margin-bottom: 15px; }
  body.rbs-modern .block.block-table { padding: 0; }
  body.rbs-modern .block.block-table > .block_head { padding: 16px; }
  body.rbs-modern .block .block_head { font-size: 16px; margin-bottom: 14px; }
  body.rbs-modern .block.block-search > .input-search {
    margin: 0 -16px 15px; width: calc(100% + 32px);
    padding: 0 16px;
  }
  body.rbs-modern .block.block-search > .input-search i.fa-search { left: 27px; }
  body.rbs-modern .btn:not(.btn-sm):not(.btn-lg) { min-height: 42px; }
  body.rbs-modern .modal-dialog { width: auto; max-width: calc(100% - 16px); margin: 8px auto; }
  body.rbs-modern .modal-header, body.rbs-modern .modal-body,
  body.rbs-modern .modal-footer { padding: 14px; }
  body.rbs-modern .modal-header .modal-title { font-size: 17px; }
  body.rbs-modern .modal-body .table-responsive > table.table td:first-child {
    min-width: 95px; width: 37%; font-size: 12px;
  }
  body.rbs-modern .modal-body .table-responsive > table.table td:last-child { font-size: 12px; }
  body.rbs-modern .modal-body .btn { width: 100%; margin: 4px 0; }
  body.rbs-modern .rbs-auth-links { gap: 10px; }
  body.rbs-modern .rbs-store-step { padding: 12px 0; }
  body.rbs-modern #chat .input-group { flex-wrap: wrap; }
  body.rbs-modern #chat .smile_input { min-width: 0; width: 100%; }
  body.rbs-modern #chat .input-group-btn { display: block; width: 100%; margin-top: 8px; }
  body.rbs-modern #chat #send_button { width: 100%; }
  body.rbs-modern #chat #chat_messages { height: 290px; }
  body.rbs-modern #main-slider.carousel { margin-bottom: 17px; }
  body.rbs-modern #main-slider .carousel-item img { height: auto; min-height: 0; object-fit: cover; }
  body.rbs-modern .wapper .footer { padding-top: 16px; }
  body.rbs-modern .wapper .footer .copyright { text-align: center; }
  body.rbs-modern .table-responsive > table.table > thead td { padding: 10px 11px; }
  body.rbs-modern .table-responsive > table.table > tbody td { padding: 9px 11px; }
  body.rbs-modern .profile-page .cover { background-attachment: scroll !important; }
  body.rbs-modern .profile-page .block.profile .avatar { width: min(165px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  body.rbs-modern .rbs-more-menu *, body.rbs-modern .rbs-mobile-cards * { transition-duration: 0.01ms !important; }
}

/* QA refinements: avoid the original theme's decorative neon on forum icons. */
body.rbs-modern #forum .row .col-lg-8 > img,
body.rbs-modern #forum.row .col-lg-8 > img,
body.rbs-modern #forum_topics .row .col-lg-8 > img,
body.rbs-modern #forum_topics.row .col-lg-8 > img {
  border: 1px solid var(--rbs-ui-border) !important;
  box-shadow: none !important;
  filter: none !important;
}
body.rbs-modern .wapper .footer ul {
  list-style: none !important; padding-left: 0 !important; margin-bottom: 15px;
}
body.rbs-modern .wapper .footer ul li { list-style: none !important; }
body.rbs-modern .wapper .footer strong { color: #e1edfc; }
body.rbs-modern .wapper .footer { padding-top: 24px; padding-bottom: 20px; }
body.rbs-modern .table-responsive:not(.rbs-mobile-cards) {
  overflow-x: auto !important; overflow-y: hidden;
}
@media (min-width: 992px) {
  body.rbs-modern .container > .row > .order-is-first { order: 0; }
  body.rbs-modern .container > .row > .order-is-last { order: 1; }
}
@media (min-width: 768px) {
  body.rbs-modern .rbs-ban-table > table.table { min-width: 720px; }
  body.rbs-modern .rbs-mute-table > table.table { min-width: 780px; }
  body.rbs-modern .rbs-ban-table > table.table > thead td:nth-child(1) { min-width: 140px; }
  body.rbs-modern .rbs-ban-table > table.table > thead td:nth-child(2) { min-width: 195px; }
  body.rbs-modern .rbs-ban-table > table.table > thead td:nth-child(3) { min-width: 110px; }
  body.rbs-modern .rbs-ban-table > table.table > thead td:nth-child(4) { min-width: 125px; }
  body.rbs-modern .rbs-ban-table > table.table > thead td:nth-child(5) { min-width: 140px; }
}
@media (max-width: 991.98px) {
  body.rbs-modern .wapper .header .menu-trigger.collapsed::before,
  body.rbs-modern .wapper .header .menu-trigger::before {
    content: "\2630" !important; font-family: Arial, sans-serif !important;
    font-weight: 600; font-size: 22px; line-height: 1;
  }
  body.rbs-modern .wapper .header .menu-trigger:not(.collapsed)::before {
    content: "\00d7" !important; font-size: 28px;
  }
  body.rbs-modern .wapper .header .auth-in {
    min-height: 41px; display: inline-flex; align-items: center; justify-content: center;
  }
}
@media (max-width: 767.98px) {
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td.d-flex {
    display: flex !important; align-items: flex-start !important; gap: 9px;
    flex-wrap: wrap; min-width: 0;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td.d-flex::before {
    flex: 0 0 91px; padding-top: 4px;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td.d-flex > a:last-child {
    min-width: 0; flex: 1 1 auto; width: auto; overflow-wrap: anywhere;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td.d-flex img {
    flex: 0 0 38px; width: 38px; height: 38px; object-fit: cover;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr[data-toggle="modal"]::after {
    content: "Нажмите для подробностей ›";
    display: block; padding: 6px 6px 3px; text-align: right;
    font-size: 11px; color: #95bdf0;
  }
}

/* Inline avatars in appeals/complaints stay readable and compact on phones. */
@media (max-width: 767.98px) {
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td img {
    width: 40px; height: 40px; max-width: 40px;
    border-radius: 9px; object-fit: cover; vertical-align: middle;
  }
  body.rbs-modern .rbs-mobile-cards > table.table > tbody > tr.rbs-list-card > td a {
    max-width: 100%; min-width: 0; overflow-wrap: anywhere;
  }
}


/* RBS PLAYER MODAL MOBILE FIX / 2026-10-25 r2
   Fixes narrow columns in the live server player popup (4 or 5 columns).
   Leaves player IDs, asynchronous row rendering, RCON buttons and selects intact. */

/* A modal must appear over the profile/navigation dropdown, not behind it. */
body.rbs-modern.modal-open .wapper .header #hidden-menu,
body.rbs-modern.modal-open .wapper .header .collapsible-menu.user-menu,
body.rbs-modern.modal-open .wapper .header .collapsible-menu.user-menu > li > ul {
  z-index: auto !important;
}

/* Laptop / tablet: keep meaningful column widths, with horizontal scrolling. */
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table {
  min-width: 675px;
  width: 100%;
  table-layout: auto;
}
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table thead td,
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table thead th {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table tbody > tr > td:nth-child(1) { min-width: 45px; }
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table tbody > tr > td:nth-child(2) {
  min-width: 145px; overflow-wrap: anywhere;
}
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table tbody > tr > td:nth-child(3) { min-width: 85px; }
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table tbody > tr > td:nth-child(4) {
  min-width: 160px; white-space: nowrap !important; overflow-wrap: normal !important;
}
body.rbs-modern .rbs-player-modal .rbs-player-table > table.table tbody > tr > td:nth-child(5) { min-width: 225px; }
body.rbs-modern .rbs-player-modal .rbs-player-table .input-group-prepend > .btn {
  width: auto; white-space: nowrap; overflow-wrap: normal;
}

@media (max-width: 767.98px) {
  body.rbs-modern .rbs-player-modal .modal-dialog {
    width: auto;
    max-width: calc(100% - 16px);
    margin: 8px auto;
  }
  body.rbs-modern .rbs-player-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(146, 175, 209, .3);
  }
  body.rbs-modern .rbs-player-modal .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    flex: 0 0 auto; gap: 12px; padding: 17px 16px;
    border-bottom: 1px solid rgba(146, 175, 209, .22);
  }
  body.rbs-modern .rbs-player-modal .modal-header .modal-title {
    font-size: 19px; font-weight: 750; line-height: 1.35;
  }
  body.rbs-modern .rbs-player-modal .modal-header .close {
    flex: 0 0 42px; width: 42px; height: 42px; margin: -7px -6px -7px 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(146, 175, 209, .28); border-radius: 10px;
    background: #273649; color: #eef5ff; font-size: 25px;
  }
  body.rbs-modern .rbs-player-modal .modal-body {
    flex: 1 1 auto; min-height: 0; padding: 12px;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table {
    border: 0; border-radius: 0; overflow: visible !important;
    max-width: 100%; padding: 0; background: transparent;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table {
    display: block; width: 100% !important; min-width: 0 !important;
    margin: 0; border: 0; table-layout: auto;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > thead { display: none; }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody {
    display: block; width: 100%; min-width: 0;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 9px;
    width: 100%; min-width: 0; margin: 0 0 11px;
    padding: 12px; border: 1px solid rgba(147, 176, 207, .25);
    border-radius: 12px; background: linear-gradient(140deg, #273547, #202c3a);
    box-shadow: 0 5px 14px rgba(0,0,0,.10);
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td {
    display: block; min-width: 0 !important; max-width: 100%; width: auto !important;
    padding: 0 !important; margin: 0; border: 0 !important;
    background: none !important; text-align: left; font-size: 14px;
    line-height: 1.45; vertical-align: middle;
    white-space: normal !important; word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(1) {
    grid-column: 1; grid-row: 1; align-self: start;
    display: inline-flex; justify-content: center; align-items: center;
    min-height: 35px; padding: 5px !important;
    border: 1px solid rgba(132, 179, 241, .28) !important;
    border-radius: 8px; background: rgba(62, 112, 171, .19) !important;
    color: #bcd8ff; font-size: 13px; font-weight: 800;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(2) {
    grid-column: 2 / 4; grid-row: 1; align-self: center;
    min-width: 0; color: #edf5ff; font-size: 15px; font-weight: 700;
    overflow-wrap: anywhere !important;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(3),
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(4) {
    min-width: 0; padding: 9px 10px !important;
    border-radius: 8px; background: rgba(8, 16, 27, .30) !important;
    color: #e0eafa; font-size: 13px;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(3) {
    grid-column: 1 / 3; grid-row: 2;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(4) {
    grid-column: 3; grid-row: 2;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(3)::before,
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(4)::before {
    display: block; padding-bottom: 3px;
    color: #9bafc8; font-size: 11px; font-weight: 650;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(3)::before { content: "Убийств"; }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(4)::before { content: "Время в игре"; }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(5) {
    grid-column: 1 / 4; grid-row: 3;
    margin-top: 2px; padding-top: 10px !important;
    border-top: 1px solid rgba(146, 175, 209, .20) !important;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(5)::before {
    content: "Управление игроком"; display: block;
    margin: 0 0 8px; color: #aec3df; font-size: 12px; font-weight: 650;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td:nth-child(5) .input-group {
    display: flex; align-items: stretch; flex-wrap: nowrap; gap: 8px;
    width: 100%; min-width: 0;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table .input-group-prepend {
    flex: 0 0 auto; display: flex; margin: 0;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table .input-group-prepend .btn,
  body.rbs-modern .rbs-player-modal .rbs-player-table .input-group-prepend button {
    width: auto !important; min-width: 102px;
    min-height: 42px; padding: 8px 12px; margin: 0;
    white-space: nowrap !important; overflow-wrap: normal !important;
    font-size: 13px; line-height: 1.35; border-radius: 8px !important;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table .input-group > select.form-control {
    flex: 1 1 auto; min-width: 0; width: 100%; height: 42px;
    padding: 6px 25px 6px 9px; font-size: 16px; border-radius: 8px !important;
  }
  /* Loading row / empty players row must not gain false data labels. */
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td[colspan] {
    display: block !important; grid-column: 1 / -1; grid-row: 1;
    padding: 12px !important; min-width: 0 !important; width: 100% !important;
    text-align: center; background: transparent !important;
  }
  body.rbs-modern .rbs-player-modal .rbs-player-table > table.table > tbody > tr > td[colspan]::before {
    content: none !important; display: none !important;
  }
}

@media (min-width: 992px) {
  /* Keep Bootstrap desktop modal-lg at a readable width. */
  body.rbs-modern .rbs-player-modal .modal-dialog.modal-lg {
    max-width: min(800px, calc(100% - 32px));
  }
}
