header {
  width: 100%;
  margin: 0 auto;
  padding: 16px 0;
  gap: 16px;
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: none;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0;
}

/* .header-wrapper 
{
  max-width: 2000px;
  width: 100%;
} */

header div {
  gap: 8px;
}


/* Responsive Typography */
@media (max-width: 1400px) {
  body {
    font-size: 14px;
  }

  table {
    font-size: 0.75rem;
  }
}

@media (max-width: 800px) {
  body {
    font-size: 14px;
  }
}

/* .card {
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: none;
  transition: all 0.15s ease;
  padding: 20px;
}

.card:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
} */

.page {
  /*  width: 99%;*/
  max-width: 2000px;
}

.page-85pr {
  width: 99%;
  max-width: 1220px;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 1rem;
}

.logo-wrapper img {
  height: 32px;
  border: 1px solid var(--neutral-300);
  border-radius: 50%;
}

.logo {
  /* font-size: 24px;
  font-weight: 800;
  color: var(--accent-primary); */
  text-decoration: none;
  letter-spacing: -0.025em;
  transition: all 0.15s ease;

}

.logo:hover {
  /* color: var(--accent-hover); */
  transform: scale(1.02);
  text-decoration: underline;
}

/*a.disabled {
  cursor: default;
  color: var(--green_80);
  text-decoration: none;
}*/



#menu_main {
  /* min-width: 240px; */
  max-width: 240px;
  /* background: var(--surface-primary); */
  /* border-radius: var(--radius-md); */
  /* padding: 16px; */
  box-shadow: none;
  /* border: 1px solid var(--border-light); */
  position: sticky;
  height: fit-content;
  flex-shrink: 0;
}

/* Делаем левую боковую панель flexbox контейнером */
section.flex-column.gap-6 {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Занимаем всю высоту экрана */
  max-width: 240px;
  position: sticky;
  top: 0;
}

#menu_main div {
  margin-bottom: 12px;
}

/* #menu_main div:last-child {
        margin-bottom: 0;
    } */

/* #menu_main div::before {
      content: "";
      display: block;
      height: 1px;
      background: linear-gradient(to right, var(--border-light) 0%, transparent 100%);
      margin-bottom: 12px;
    } */

/* #menu_main div:first-child::before {
      display: none;
    } */

#menu_main div>a {
  color: var(--text-primary);
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  display: block;
  position: relative;
}

#menu_main div>span {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  border-bottom: 1px solid;
  width: min-content;
  min-width: 120px;
}

#menu_main a.sub {
  color: var(--text-secondary);
}

#menu_main div>a:hover {

  text-decoration: underline;
  transform: none;
}

#menu_main a.active {
  color: var(--neutral-50);
  background: var(--neutral-950);
  font-weight: 600;
}



#menu_main a.sub.active {
  color: var(--text-secondary);
  background: var(--text-tertiary);
  font-weight: 600;
}

/* #menu_main a.sub.active::before {
         background: var(--text-tertiary);
        transform: translateY(-50%) scale(1.5);
        box-shadow: 0 0 0 2px var(--accent-light);
      } */

.used_data {
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  margin-top: auto; /* Прижимаем к низу */
  padding: 24px 0;
  
  /* Sticky позиционирование для фиксации внизу при скролле */
  position: sticky;
  bottom: 0;
  /* background: var(--surface-primary); */
  z-index: 10;
}

.used_data a,
.used_data p {
  padding: 0 12px;
}

.used_data a {
  color: var(--text-primary);
  text-decoration: none;
}

.used_data a:hover {
  text-decoration: underline;
}

.used_data p {
  color: var(--text-secondary);
  text-transform: lowercase;
}

.header-sub {
  border-bottom: 1px solid var(--border-light);
  margin: 0 0 24px 0;
  padding-bottom: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-light);
  box-shadow: none;
}

.header-sub a {
  color: var(--text-secondary);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  border-radius: 0;
  margin: 0 16px;
}

.header-sub a:hover {
  color: var(--text-primary);
  text-decoration: none;
  background: transparent;
  border-bottom-color: var(--text-tertiary);
}

.header-sub a.active {
  color: var(--black);
  border: var(--black);
  border-bottom: 3px solid var(--black);
  background: transparent;
  font-weight: 600;
}

.table_panel {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--border-light);
}

.table_panel div {
  gap: 12px;
}

.table_panel select,
.table_panel input[type="text"] {
  max-width: var(--line2);
  width: 100%;
}


.table_filters {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  background: var(--surface-primary);
}

.table_filters > div {
  min-height: 40px;
}

/* Контейнер для заголовка фильтров */
.table_filters_header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
 
.table_filters_header > select,
.table_filters_header > input[type="text"] {
    max-width: var(--line2);
}

/* Максимально расширяем последний div внутри table_filters_header */
.table_filters_header > div:last-child {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.table_filters_add {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer;
  padding: 8px 0;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.table_filters_add:hover {
    color: var(--text-primary);
    background: var(--surface-secondary);
    border-radius: 4px;
}

.filters_active {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Кнопка сворачивания */
.collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.collapse-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.collapse-btn > img {
  transition: transform 0.3s ease;
  display: block;
}

.collapse-btn[data-expanded="false"] > img {
  transform: rotate(-90deg);
}

/* Контейнер для дополнительных фильтров */
.collapse-container {
}



.collapse-container.collapsed {
  display: none !important;
}

.collapse-container.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--line1), 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--surface-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  margin-top: 8px;
}

/* .collapse-container.filters > div {
  max-width: var(--line2);
} */



.table_pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px 0;
  background: transparent;
}

.table_pages button {
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-lg);
  font-weight: 600;
}

.table_pages button.active {
  background: var(--black);
  color: white;
  border-color: var(--black);
  /* border-radius: var(--radius-lg); */
}

.pagination-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  font-weight: 600;
  color: var(--text-secondary);
  user-select: none;
}

.table_pages button[title] {
  font-size: 16px;
  font-weight: bold;
}

.table_pages button span {
  display: inline-block;
  line-height: 1;
}

.table_row_button {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 4px 0;
}

.status-block {
  border: 1px solid;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  min-width: 60px;
  background: var(--surface-primary);
}

.status-block.active {
  background: var(--green_50);
  border-color: var(--green_600);
  color: var(--green_800);
}

.status-block.inactive {
  background: var(--red_50);
  border-color: var(--red_600);
  color: var(--red_800);
}

.status-block.pending {
  background: var(--yellow_50);
  border-color: var(--yellow_600);
  color: var(--yellow_800);
}

#form_edit_odds {
  padding: 16px;
}

#form_edit_odds>div {
  margin-bottom: 12px;
}

.event-button {
  all: unset;
  width: 210px;
  height: 25px;
  margin-bottom: 10px;
  padding-left: 0.5cm;
  margin-right: 14px;
}

.event-button:hover {
  opacity: 0.8;
}

brown-light-1 {
  background: var(--amber-100);
}

blue-light-1 {
  background: var(--blue-100);
}

green-light-1 {
  background: var(--emerald-300);
}

gray-light-1 {
  background: var(--neutral-100);
}

pink-light-1 {
  background: var(--rose-200);
}

.events_count {
  background: var(--yellow_100);
  padding: 4px 8px;
  border-radius: 40%;
}

/* ------------------- WotTank ------------------- */
.pg-24 {
  padding: 24px 0 24px 0;
}

.formula-border {
  all: unset;
  padding: 8px;
  color: black;
  background-color: var(--gray_40);
  border: 1px solid var(--gray_40);
  margin-right: 12px;
}

button.formula-border:hover {
  background-color: lightgray;
}

.orange-border-100 {
  border: 1px solid var(--orange_100) !important;
}

.border-gray {
  border: 1px solid var(--gray_40);
  padding: 8px;
  color: black;
}

.border-gray-1 {
  border: 1px solid var(--gray_400);
}

.border-white-1 {
  border: 1px solid white;
}

.market-style {
  color: black;
  white-space: nowrap;
  color: var(--text_readonly);
}

.market-template-label {
  font-size: 1em;
  color: var(--gray_600);
  margin-bottom: 8px;
}

.outcome-style {
  padding: 8px 12px 8px 12px;
  color: black;
  gap: 8px;
  background-color: var(--purple-50);
  border-radius: 4px;
  white-space: nowrap;
  color: var(--text_readonly);
  border: 1px solid var(--gray);
}

.outcome-style.bet-active {
  background-color: var(--green-50);
}

.outcome-style.bet-stop {
  background-color: var(--red-50);
}

.outcome-style.bet-won {
  border: 2px solid var(--green);
}

.outcome-style.bet-lost {
  border: 2px solid var(--red);
}

.flex-grid-center-v2 {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-gap: 12px;
}

/* ------------------- CS game event ------------------- */

.container-cs {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  grid-template-rows: 1fr;
  grid-gap: 1px;
  width: -webkit-fill-available;
  height: -webkit-fill-available;
  align-items: center;
}

.publish-block {
  border: 1px solid var(--blue_80);
  border-radius: 4px;
  background-color: white;
  color: var(--blue_80);
  line-height: 35px;
  font-weight: 600;
  padding-inline: 15px 15px;
}

.container2 {
  display: flex;
  flex-wrap: wrap;
}

.block2 {
  flex: 1 0 calc(100% / 8);
  margin-right: 8px;
  padding: 8px;
  margin-bottom: 8px;
  text-align: center;
  color: white;
}

.block2:last-child {
  margin-right: 0;
}

.block2:nth-child(6n) {
  margin-right: 0;
}

div.checked {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  background-color: var(--green_600);
}

div.unchecked {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  background-color: var(--gray-200);
}

.cr-pointer {
  cursor: pointer;
}

.market-template-block>div:not(:last-child) {
  margin-bottom: 24px;
}

.underline {
  text-decoration: underline;
}


.betstop {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--gray);
}

.betstop.active {
  background-color: var(--green);
}

/*<----------- For input "checkbox" platoon------------->*/

input[id="platoon"] {
  display: none;
}

label[for="platoon"] {
  cursor: pointer;
  font-weight: normal;
  vertical-align: middle;
}

label[for="platoon"]:before {
  content: " ";
  color: var(--text-primary);
  display: inline-block;
  font: 15px/20px Arial;
  position: relative;
  text-align: center;
  text-indent: 0px;
  width: 20px;
  height: 20px;
  background: var(--surface-primary);
  border: 1px solid var(--blue_600);
  border-radius: 5px;
  border-image: initial;
  vertical-align: middle;
}

input[id="platoon"]:checked+label[for="platoon"]:before {
  content: "✔";
  background: var(--blue-600);
  color: var(--white);
}

button.gray-hover:hover {
  background-color: var(--gray_50);
}

.flex-grid-1-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
}


.text-size5 {
  font-size: 1.5em;
  line-height: 20px;
  font-weight: 400;
}

.flex-grid-3col {
  display: grid;
  grid-template-columns: 4fr 1fr 4fr;
  align-items: center;
}

.width-min {
  width: min-content;
}

.text-align-end {
  text-align: end;
}

.text-align-start {
  text-align: start;
}

.width-availab {
  width: -webkit-fill-available;
}

.nowrap {
  white-space: nowrap;
}

.clip-15 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 15ch;
}

.pg-top-bot-8 {
  padding: 8px 0 8px 0;
}

#hl-block,
#ll-block {
  opacity: 0;
  transition: opacity 0.4s linear 0.1s;
}

#hl-block.visible {
  opacity: 1;
}

#ll-block.visible {
  opacity: 1;
}





/* 2025 Years */
.outcome-gray span,
.outcome-red span,
.outcome-yellow span {
  padding: 4px;
  border-radius: 12px;
  min-height: 24px;
  min-width: 24px;
}

.outcome-red span {
  background-color: var(--red-500);
}

.outcome-yellow span {
  background-color: var(--yellow-200);
}

/* Modern 2025 Enhancements */

/* Enhanced main content area */
main {
  padding: 0;
  background: transparent;
  flex: 1;
  min-width: 0;
  margin: 0 auto;
  width: 100%;
}

/* Modern page wrapper */
.page {
  padding: 0;
  /* max-width: 1600px; */
  /* margin: 0 auto; */
  width: 100%;
}

.page.header-page {
  padding: 0 32px;
  max-width: none;
  width: 100%;
}

/* Enhanced layout structure */
.section-main {
  align-items: flex-start;
  max-width: 2000px;
  margin: 0 auto;
  /* padding: 20px 0; */
  width: 100%;
  flex-direction: row;
  display: flex;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Enhanced tooltips */
[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 8px;
}

/* Modern scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-tertiary);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-dark);
}

/* Enhanced focus states */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Table enhancements */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  box-shadow: none;
  border: 1px solid var(--border-light);
  margin: 24px 0;
}

/* table {
  margin: 0;
  width: 100%;
  min-width: 100%;
} */

/* tbody tr {
  border-bottom: 1px solid var(--border-light);
}

tbody tr:last-child {
  border-bottom: none;
} */

/* Responsive table columns */
th.col-id {
  width: 80px;
  min-width: 80px;
}

th.col-date {
  width: 120px;
  min-width: 120px;
}

th.col-status {
  width: 100px;
  min-width: 100px;
}

th.col-actions {
  width: 120px;
  min-width: 120px;
}

th.col-name {
  min-width: 150px;
}

th.col-description {
  min-width: 200px;
}

/* Content wrapper for better layout */
.content-wrapper {
  background: var(--surface-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: none;
  padding: 24px;
  margin-top: 24px;
}

.content-wrapper.no-margin {
  margin-top: 0;
}

/* Form improvements */
/* .form_read,
.form_edit {
  margin: 0;
  box-shadow: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
} */

/* Enhanced responsive design */
@media (max-width: 1024px) {
  #menu_main {
    min-width: 240px;
    max-width: 240px;
  }

  section.flex-row {
    padding: 16px 24px;
    width: calc(100% - 48px);
  }
}

@media (max-width: 768px) {
  header {
    padding: 16px 20px;
  }

  section.flex-row {
    padding: 16px 20px;
    width: calc(100% - 40px);
  }
}

@media (max-width: 768px) {
  section.flex-row {
    flex-direction: column;
    gap: 16px;
  }

  #menu_main {
    min-width: 100%;
    margin-right: 0;
    margin-bottom: 16px;
    position: static;
  }

  .header-sub {
    margin: 16px 0;
    gap: 16px;
  }

  .table_panel {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

/* Print styles */
@media print {

  header,
  #menu_main,
  .table_panel,
  .table_pages {
    display: none !important;
  }

  body {
    background: var(--surface-primary) !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid var(--border-light) !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000;
    --border-medium: #000;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}