@media (max-width: 849.9px) {
  .punish_header_page {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-between;
    padding: 7px;
    border-radius: 16px;
    background-color: var(--card);
  }

  .custom-select-wrapper {
    width: 100%;
  }
}

@media (min-width: 850px) {
  .punish_header_page {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    padding: 7px 7px 0 7px;
    border-radius: 16px;
    background-color: var(--card);
  }

  .custom-select-wrapper {
    width: max-content;
  }
}

label {
  cursor: inherit;
}

.segmented-control {
  border-radius: 12px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--bottom-line-table);
  outline: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  height: 50px;
}

.segmented-control .option {
  position: relative;
  cursor: pointer;
}

.segmented-control .option:hover input:not(:checked) + label span,
.segmented-control .option:active input:not(:checked) + label span,
.segmented-control .option:focus input:not(:checked) + label span {
  filter: brightness(115%);
}

.segmented-control .option:active input:not(:checked) + label span {
  transform: scale(0.95);
}

.segmented-control .option label {
  position: relative;
  display: flex;
  text-align: center;
  padding: 0 4vmin;
  background: transparent;
  font-weight: 500;
  font-size: 14px;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.segmented-control .option label::before,
.segmented-control .option label::after {
  content: "";
  width: 1px;
  background: transparent;
  position: absolute;
  top: 0;
  bottom: 0;
  will-change: background;
  -webkit-transition: background 0.2s ease;
  transition: background 0.2s ease;
}

.segmented-control .option label::before {
  left: 0;
  transform: translateX(-0.5px);
}

.segmented-control .option label::after {
  right: 0;
  transform: translateX(0.5px);
}

.segmented-control .option:first-of-type {
  grid-column: 1;
  grid-row: 1;
  box-shadow: none;
}

.segmented-control .option:first-of-type label::before {
  opacity: 0;
}

.segmented-control .option:last-of-type label::after {
  opacity: 0;
}

.segmented-control .option input {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  border: none;
  opacity: 0;
}

.segmented-control .selection {
  background: var(--button);
  border-radius: 8px;
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
  will-change: transform;
  -webkit-transition: transform 0.2s ease;
  transition: transform 0.2s ease;
}

.segmented-control .option label span {
  display: block;
  position: relative;
  z-index: 2;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  will-change: transform;
  color: var(--text-custom);
}

.segmented-control .option input:checked + label::before,
.segmented-control .option input:checked + label::after {
  background: transparent;
  z-index: 1;
}

.segmented-control .option input:checked + label {
  cursor: default;
}

.punish_state {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.punish_title {
  display: block;
  width: 100%;
  font-size: 14px;
  color: var(--text-custom);
  opacity: 0.5;
}

.not_auth_user {
  display: flex;
  font-size: 13px;
  text-align: center;
  font-weight: normal;
  color: var(--text-custom);
  background: var(--transparent);
  padding: 10px 20px;
  border-radius: 12px;
  height: 59px;
  align-items: center;
  justify-content: center;
}

.no_user_punish {
  display: flex;
  font-size: 13px;
  text-align: center;
  font-weight: normal;
  background: var(--transparent);
  padding: 10px 20px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  align-items: center;
  height: 59px;
  justify-content: center;
}

.no_user_punish::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(315deg, rgb(100 206 130 / 20%), transparent);
  z-index: 0;
}

.no_user_punish svg {
  position: absolute;
  right: -15px;
  width: 53px;
  height: auto;
  fill: var(--green);
  opacity: 0.2;
}

.no_user_punish span {
  color: var(--green);
  z-index: 2;
  position: relative;
}

.have_ban_user_punish {
  display: flex;
  font-size: 13px;
  text-align: center;
  font-weight: normal;
  background: var(--transparent);
  padding: 10px 20px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  height: 59px;
}

.have_ban_user_punish::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(315deg, rgb(255 73 64 / 20%), transparent);
  z-index: 0;
}

.have_ban_user_punish svg {
  position: absolute;
  right: -15px;
  width: 53px;
  height: auto;
  fill: var(--red);
  opacity: 0.2;
}

.have_ban_user_punish span {
  color: var(--red);
  z-index: 2;
  position: relative;
}

.have_comm_user_punish {
  display: flex;
  font-size: 13px;
  text-align: center;
  font-weight: normal;
  background: var(--transparent);
  padding: 10px 20px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  height: 59px;
}

.have_comm_user_punish::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(315deg, rgb(246 185 73 / 20%), transparent);
  z-index: 0;
}

.have_comm_user_punish svg {
  position: absolute;
  right: -15px;
  width: 53px;
  height: auto;
  fill: var(--orange);
  opacity: 0.2;
}

.have_comm_user_punish span {
  color: var(--orange);
  z-index: 2;
  position: relative;
}

.punish_stats_head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.hide_stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--transparent);
  color: var(--text-custom);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.show_stats {
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--transparent);
  color: var(--text-custom);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.punish_string {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  font-size: 14px;
  align-items: center;
  background: var(--transparent);
  padding: 5px 5px 5px 10px;
  border-radius: 8px;
}

.punish_stats_list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
  border-radius: 8px;
  height: max-content;
  transition: 0.2s ease-in;
}

.stats_title {
  color: var(--text-custom);
}

.stats_count {
  color: var(--span);
  background: var(--span-low);
  padding: 3px 10px;
  border-radius: 4px;
}

.modern_table {
  display: flex;
  gap: 5px;
  flex-direction: column;
}

@media (max-width: 768.9px) {
  .punish_header li {
    display: grid;
    grid-template-columns: 0.3fr 1fr 1.5fr;
    padding: 10px 20px;
    justify-items: start;
    gap: 5px;
  }

  .punish_content li {
    display: grid;
    grid-template-columns: 0.3fr 1fr 1.5fr;
    padding: 15px 20px;
    background: var(--grey);
    border-radius: 12px;
    justify-items: start;
    gap: 5px;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
  }

  .none_span {
    display: none !important;
  }

  .punish_buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .punish_subinfo {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    background: var(--transparent);
    border-radius: 12px;
    padding: 5px;
    align-items: center;
  }

  .punish_right_head {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .w350 {
    width: 100%;
  }
}

@media (min-width: 769px) {
  .punish_header li {
    display: grid;
    grid-template-columns: 0.2fr 0.2fr 1fr 2fr 0.7fr 1fr;
    padding: 10px 20px;
    justify-items: start;
    gap: 5px;
  }

  .punish_content li {
    display: grid;
    grid-template-columns: 0.2fr 0.2fr 1fr 2fr 0.7fr 1fr;
    padding: 15px 20px;
    background: var(--grey);
    border-radius: 12px;
    justify-items: start;
    gap: 5px;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
  }

  .none_span {
    display: block;
  }

  .punish_buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .punish_subinfo {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    background: var(--transparent);
    border-radius: 12px;
    padding: 5px;
    align-items: center;
  }

  .punish_right_head {
    display: flex;
    flex-direction: row;
    gap: 10px;
  }

  .w350 {
    width: 350px;
  }
}

.punish_content li:hover {
  filter: brightness(115%);
}

.punish_header li span {
  font-size: 12px;
  color: var(--text-custom);
  opacity: 0.5;
  display: flex;
  align-items: center;
}

.punish_header svg {
  width: 14px;
  height: 14px;
  fill: var(--text-custom);
}

.punish_content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 527px;
  overflow: hidden;
  overflow-y: scroll;
}

.punish_content li span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-custom);
  font-size: 13px;
  font-weight: 500;
  position: relative;
}

.punish_content li span svg {
  width: 20px;
  height: auto;
  fill: var(--red);
}

.punish_content li span img {
  width: 25px;
  height: 25px;
  border-radius: 4px;
}

.current_punish,
.permanent_punish,
.expired_punish,
.remove_punish {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 15px;
  height: 30px;
  background: var(--transparent);
  border-radius: 25px;
  font-size: 12px !important;
}

.permanent_punish {
  background: rgb(255 73 64 / 10%);
  color: var(--red) !important;
}

.expired_punish {
  background: rgb(100 206 130 / 10%);
  color: var(--green) !important;
  text-decoration: line-through;
}

.remove_punish {
  background: var(--red-10, rgba(255, 73, 64, .1));
  color: var(--red, #ff4940) !important;
}

/* modal */

.punish_modal {
  display: none;
  position: fixed;
  z-index: 9998;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--bg-modal);
  pointer-events: auto;
}

.punish_modal-content {
  display: flex;
  background-color: var(--card);
  transform: translate(-50%, -50%);
  padding: 20px;
  border: 1px solid var(--transparent);
  width: 80%;
  border-radius: 16px;
  max-width: 400px;
  position: relative;
  flex-direction: column;
  z-index: 9999;
  gap: 15px;
  left: 50%;
  top: 50%;
}

.punish_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
}

.punish_close {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.punish_close svg {
  width: 20px;
  height: 20px;
  fill: var(--text-default);
  opacity: 0.5;
  transition: 0.3s;
}

.punish_close:hover svg {
  opacity: 1;
}

.punish_close:hover,
.punish_close:focus {
  color: var(--text-default);
  text-decoration: none;
  cursor: pointer;
}

.punish_body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  margin-top: 15px;
}

.punish_body span {
  display: flex;
  justify-content: center;
  text-align: center;
  color: var(--text-default);
  font-size: 14px;
  flex-direction: column;
}

.punish_buy {
  display: flex;
  gap: 5px;
  background: var(--money-bg);
  color: var(--money);
  height: 41px;
  align-items: center;
  padding: 0 15px;
  border-radius: 8px;
  width: 100%;
  justify-content: center;
  text-wrap: nowrap;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
}

.punish_buy:hover {
  filter: brightness(115%);
}

.punish_buy span {
  font-size: 10px;
  font-weight: 700;
  background: var(--money);
  color: black;
  padding: 3px 10px;
  border-radius: 25px;
}

.punish_info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 5px;
  width: 100%;
}

.icon_subinfo {
  display: flex;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 8px;
}

.icon_subinfo svg {
  width: 16px;
  height: auto;
  fill: var(--text-custom);
}

.text_subinfo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 35px;
}

.text_subinfo p {
  line-height: 0;
  font-size: 11px;
  opacity: 0.5;
  color: var(--text-custom);
  margin-top: 8px;
}

.text_subinfo span {
  display: flex;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 700;
  margin-top: -3px;
}

.punish_take_admin {
  font-size: 13px;
  color: var(--text-custom);
}

.punish_muself {
  background: linear-gradient(-270deg, var(--span-low), transparent) !important;
  border: 1px solid var(--span-low);
}

#load_next {
  display: flex;
  justify-content: center;
  margin: 5px 0;
  color: var(--text-custom);
  font-size: 14px;
  cursor: pointer;
}

.load_container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.update_element {
  display: flex;
  background: transparent;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  position: relative;
}

.update_element svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-custom);
  stroke-linecap: round;
  stroke-dasharray: 100, 150;
  stroke-dashoffset: 0;
}
/* Compact player lookup styled like the requested dark search control. */
.punishment-search {
  position: relative;
  width: min(100%, 176px);
  min-width: 0;
  height: 41px;
  min-height: 41px;
  flex: 0 0 176px;
  padding: 0;
  overflow: hidden;
  border: 0 !important;
  border-radius: 8px;
  background: #1b1b1b !important;
  box-shadow: none !important;
}
.punishment-search input {
  display: block;
  width: 100%;
  height: 41px !important;
  box-sizing: border-box;
  padding: 0 38px 0 16px !important;
  border: 0 !important;
  border-radius: inherit;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #bcbcbc;
  font-size: 12px;
}
.punishment-search input::placeholder {
  color: #777 !important;
  opacity: 1;
}
.punishment-search:focus-within { background: #202020 !important; }
.punishment-search .punishment-search-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  fill: #4b4b4b;
  pointer-events: none;
}
/* Punishment page: compact filter rail and full-width record table. */
.row.punish-page-layout {
  display: grid;
  grid-template-columns: minmax(280px, 334px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0;
}
.row.punish-page-layout > .col-md-3,
.row.punish-page-layout > .col-md-9 {
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
}
.punish-page-layout .card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
}
.punish-page-layout .card-header {
  position: relative;
  border-bottom: 0;
}
.punish-page-layout .card-header::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 1px;
  background: var(--bottom-line-table, rgb(255 255 255 / 8%));
  pointer-events: none;
}
.punishment-sidebar-card .card-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.punish_filter_block,
.punish_search_block,
.punish_server_block {
  min-width: 0;
}
.punish_filter_block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.punish_filter_block > .punish_title,
.punish_stats_head > .punish_title {
  color: var(--text-custom);
  opacity: .58;
}
.punish_filter_block .segmented-control {
  height: 40px;
  padding: 3px;
  border-radius: 9px;
}
.punish_filter_block .segmented-control .selection {
  border-radius: 7px;
}
.punish_filter_block .segmented-control .option label {
  padding: 0 8px;
  font-size: 13px;
}
.punish_search_block .punishment-search {
  width: 100%;
  flex: 0 1 auto;
}
.punish_server_block,
.punish_server_block .custom-select-wrapper {
  width: 100%;
  min-width: 0;
}
.punish_server_block .custom-select-wrapper {
  margin: 0;
}
.punishment-sidebar-card .punish_state {
  padding-top: 0;
}
.punishment-sidebar-card .punish_state > hr {
  margin: 2px 0 0;
}
.punishment-sidebar-card .punish_stats_head {
  min-height: 34px;
}
.punishment-sidebar-card .punish_stats_list {
  gap: 5px;
}
.punishment-sidebar-card .punish_string {
  min-height: 36px;
  padding: 5px 7px 5px 10px;
  background: #1e1e1e;
}
.punishment-sidebar-card .stats_count {
  min-width: 38px;
  text-align: center;
  background: #24262c;
  color: #7f9bff;
  border: 1px solid rgb(127 155 255 / 10%);
}
.punishment-list-card .card-container {
  min-width: 0;
}
.punishment-list-card .modern_table {
  gap: 4px;
}
.punishment-list-card .punish_header li,
.punishment-list-card .punish_content li {
  display: grid;
  grid-template-columns: 30px 34px minmax(130px, 1fr) minmax(180px, 2fr) minmax(90px, .72fr) minmax(115px, 1fr);
  column-gap: 8px;
  align-items: center;
  justify-items: start;
}
.punishment-list-card .punish_header li {
  padding: 8px 12px;
}
.punishment-list-card .punish_header li span {
  font-size: 12px;
  opacity: .72;
}
.punishment-list-card .punish_header li span:nth-child(2) {
  justify-content: center;
}
.punishment-list-card .punish_content {
  max-height: min(68vh, 760px);
  gap: 4px;
  padding-right: 2px;
}
.punishment-list-card .punish_content li {
  min-height: 42px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #202020;
  cursor: pointer;
}
.punishment-list-card .punish_content li:hover {
  filter: brightness(1.08);
}
.punishment-list-card .punish_content li span {
  min-width: 0;
  justify-content: flex-start;
  overflow: hidden;
  color: #c6c6c6;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.punishment-list-card .punish_content li span:first-child {
  justify-content: center;
}
.punishment-list-card .punish_content li span:nth-child(2) {
  justify-content: center;
  overflow: visible;
}
.punishment-list-card .punish_content li span img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 5px;
}
.punishment-list-card .punish_content li span svg {
  width: 18px;
  height: 18px;
}
.punishment-list-card .current_punish {
  background: rgb(100 206 130 / 12%);
  color: #62ce82 !important;
}
.punishment-list-card .permanent_punish {
  background: rgb(255 73 64 / 12%);
  color: #ff4940 !important;
}
.punishment-list-card .remove_punish {
  background: rgb(105 135 255 / 20%);
  color: #7f9bff !important;
  text-decoration: none;
}
.punishment-list-card .expired_punish {
  background: rgb(100 206 130 / 12%);
  color: #62ce82 !important;
}
#punish_content:empty::after {
  content: "Наказаний не найдено";
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 14px;
}
@media (max-width: 850px) {
  .row.punish-page-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .punishment-list-card .punish_content {
    max-height: 60vh;
  }
}
@media (max-width: 768.9px) {
  .punishment-list-card .punish_header li,
  .punishment-list-card .punish_content li {
    grid-template-columns: 26px 30px minmax(100px, 1fr) minmax(130px, 1.4fr);
    gap: 6px;
  }
  .punishment-list-card .punish_content li {
    padding: 8px;
  }
  .punishment-list-card .punish_header li span:nth-child(n + 5),
  .punishment-list-card .punish_content li span:nth-child(n + 5) {
    display: none;
  }
  .punish_search_block .punishment-search {
    width: 100%;
  }
}
.punish_filter_block .segmented-control .selection { background: #7f9bff; }
.punish_filter_block .segmented-control .option input:checked + label span { color: #fff; }
.punishment-sidebar-card .stats_count { color: #7f9bff !important; font-size: 12px; font-weight: 700; }

/* Align the punishment panels with the page gutters and let the records panel fill the viewport. */
.row.punish-page-layout { gap: 10px; margin-left: -12px; margin-right: -12px; }
.punishment-list-card { min-height: calc(100vh - 100px); }
@media (max-width: 850px) {
  .row.punish-page-layout { margin-left: 0; margin-right: 0; }
  .punishment-list-card { min-height: 0; }
}
/* Screenshot-matched game selector and three-way punishment filter. */
.punish_filter_block .punishment-type-filter {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 38px;
  padding: 3px;
  border-radius: 8px;
}
.punish_filter_block .punishment-type-filter .option label {
  padding: 0 4px;
  font-size: 12px;
  white-space: nowrap;
}
.punish_filter_block .punishment-type-filter .selection {
  border-radius: 6px;
}
.punish_game_block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.punish_game_option {
  display: inline-flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 9px;
  background: #1d1d1d;
  color: #c7c7c7;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, filter .16s ease;
}
.punish_game_option:hover { filter: brightness(1.12); }
.punish_game_option svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}
.punish_game_option.is-active {
  border-color: #d1840d;
  background: #d1840d;
  color: #fff;
}
#punish_content.admin-list:empty::after {
  content: "Администраторы не найдены";
}
.punishment-list-card .admin_list_status svg {
  width: 18px;
  height: 18px;
  fill: #ff4940;
}
.punishment-list-card .admin_list_row {
  cursor: default;
}
