/* ==========================================================================
   cyber-tabs.css v4 — оформление в духе HLTV
   Коины · Банк · Хайлайты · CSTV Chat · Админ-панель

   Подключать ПОСЛЕДНИМ (после cstv-new.css):
   <link rel="stylesheet" href="cyber-tabs.css?v=4">

   Идея: плоские тёмные панели, скругление 3–4px, заголовок-плашка,
   вкладки с подчёркиванием, плотные строки с тонкими разделителями.
   Все правила привязаны к id разделов, JS менять не нужно.
   Работает во всех скинах; в «Минимализме» ключевые свойства !important.
   ========================================================================== */

#tab-coins, #tab-bank, #tab-highlights, #tab-messages, #tab-admin{
  --cy-line: var(--border, #243349);
  --cy-panel: var(--bg-elev, #101720);
  --cy-panel-2: var(--bg-elev-2, #182233);
  --cy-acc: var(--accent, #3D7FFF);
  --cy-acc-rgb: var(--accent-rgb, 61,127,255);
  --cy-hot: var(--accent-2, #E5432F);
  --cy-ink: var(--text, #E8EEF8);
  --cy-mute: var(--muted, #8a9ab3);
  --cy-r: 4px;
  --cy-r-sm: 3px;
}

/* ==========================================================================
   Заголовок раздела — плашка как у HLTV
   ========================================================================== */
#tab-coins .panel-title, #tab-bank .panel-title, #tab-highlights .panel-title,
#tab-admin .panel-title, #tab-messages .panel-title{
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  margin: 20px 0 10px;
  padding: 9px 14px;
  font-family: var(--font-body, inherit);
  font-size: 13px !important; font-weight: 800; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--cy-ink);
  background: var(--cy-panel-2);
  border: 1px solid var(--cy-line);
  border-bottom: 2px solid rgba(var(--cy-acc-rgb), .75);
  border-radius: var(--cy-r);
}
/* заголовок, за которым сразу блок: склеиваем */
#tab-coins .panel-title:has(+ .panel-box), #tab-bank .panel-title:has(+ .panel-box),
#tab-highlights .panel-title:has(+ .panel-box), #tab-admin .panel-title:has(+ .panel-box),
#tab-messages .panel-title:has(+ .panel-box){
  margin-bottom: 0; border-radius: var(--cy-r) var(--cy-r) 0 0 !important;
}
#tab-coins .panel-title + .panel-box, #tab-bank .panel-title + .panel-box,
#tab-highlights .panel-title + .panel-box, #tab-admin .panel-title + .panel-box,
#tab-messages .panel-title + .panel-box{
  border-top: 0 !important; border-radius: 0 0 var(--cy-r) var(--cy-r) !important;
}
/* подпись между заголовком и блоком (в bank.js у неё inline margin:-6px) */
#tab-coins .panel-title + .section-sub, #tab-bank .panel-title + .section-sub,
#tab-admin .panel-title + .section-sub{ margin: 0 0 10px !important; }
#tab-coins .panel-title .section-sub, #tab-bank .panel-title .section-sub, #tab-admin .panel-title .section-sub{
  margin: 0; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--cy-mute);
}
#tab-coins > .panel-title:first-child, #tab-bank > .panel-title:first-child{ margin-top: 0; }

/* ==========================================================================
   Блоки и карточки
   ========================================================================== */
#tab-coins .panel-box, #tab-bank .panel-box, #tab-highlights .panel-box, #tab-admin .panel-box{
  padding: 14px 16px;
  background: var(--cy-panel) !important;
  border: 1px solid var(--cy-line) !important;
  border-radius: var(--cy-r) !important;
  box-shadow: none !important;
}
#tab-admin .admin-block, #tab-coins .admin-block{
  margin: 0 0 20px; padding: 14px 16px;
  background: var(--cy-panel) !important; border: 1px solid var(--cy-line) !important; border-radius: var(--cy-r) !important;
}
#tab-admin .admin-block > h3:first-child{
  margin: -14px -16px 12px; padding: 9px 14px;
  font-size: 13px; font-weight: 800; letter-spacing: .04em !important; text-transform: uppercase !important;
  background: var(--cy-panel-2) !important; border-bottom: 1px solid var(--cy-line) !important;
  border-radius: var(--cy-r) var(--cy-r) 0 0 !important; color: var(--cy-ink) !important;
}

/* статистика: плотная сетка ячеек */
#tab-admin .stat-card-row{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--cy-line) !important; border: 1px solid var(--cy-line) !important;
  border-radius: var(--cy-r) !important; overflow: hidden;
}
#tab-admin .stat-card{ margin: 0; padding: 12px 14px; background: var(--cy-panel) !important; border: 0 !important; border-radius: 0 !important; }

/* ==========================================================================
   Строки-списки
   ========================================================================== */
#tab-coins .info-row, #tab-bank .info-row, #tab-admin .info-row{
  padding: 8px 10px; border-bottom: 1px solid var(--cy-line) !important;
  border-radius: 0 !important; transition: background-color .12s ease;
}
#tab-coins .info-row:last-child, #tab-bank .info-row:last-child, #tab-admin .info-row:last-child{ border-bottom: 0 !important; }
#tab-coins .info-row:hover, #tab-bank .info-row:hover, #tab-admin .info-row:hover{ background: rgba(var(--cy-acc-rgb), .07) !important; }
#tab-coins .mono, #tab-bank .mono{ font-variant-numeric: tabular-nums; }

#tab-coins .coin-balance-badge{
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  background: rgba(var(--cy-acc-rgb), .12); border: 1px solid rgba(var(--cy-acc-rgb), .45);
  border-radius: var(--cy-r); font-weight: 800; font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
#tab-coins .btn, #tab-bank .btn, #tab-highlights .btn, #tab-messages .btn, #tab-admin .btn{
  border-radius: var(--cy-r-sm) !important;
  border: 1px solid var(--cy-line) !important;
  background: var(--cy-panel-2) !important;
  color: var(--cy-ink) !important;
  font-weight: 700;
  transition: background-color .12s ease, border-color .12s ease, filter .12s ease;
}
#tab-coins .btn:hover, #tab-bank .btn:hover, #tab-highlights .btn:hover, #tab-messages .btn:hover, #tab-admin .btn:hover{
  border-color: var(--cy-acc) !important; background: rgba(var(--cy-acc-rgb), .14) !important;
}
#tab-coins .btn:disabled, #tab-bank .btn:disabled, #tab-highlights .btn:disabled, #tab-messages .btn:disabled, #tab-admin .btn:disabled{ opacity: .45; cursor: not-allowed; }

/* синяя = --accent-2 (как в styles.css) */
#tab-coins .btn-blue, #tab-bank .btn-blue, #tab-highlights .btn-blue, #tab-messages .btn-blue, #tab-admin .btn-blue{
  background: var(--accent-2, var(--cy-acc)) !important; border-color: var(--accent-2, var(--cy-acc)) !important; color: #fff !important;
}
#tab-coins .btn-blue:hover, #tab-bank .btn-blue:hover, #tab-highlights .btn-blue:hover, #tab-messages .btn-blue:hover, #tab-admin .btn-blue:hover{
  background: var(--accent-2, var(--cy-acc)) !important; border-color: var(--accent-2, var(--cy-acc)) !important; filter: brightness(1.12) !important;
}
#tab-coins .btn-green, #tab-bank .btn-green, #tab-admin .btn-green, #tab-messages .btn-green, #tab-highlights .btn-green{
  background: color-mix(in srgb, var(--green, #2ec46e) 16%, transparent) !important;
  border-color: var(--green, #2ec46e) !important; color: var(--green, #2ec46e) !important;
}
#tab-coins .btn-green:hover, #tab-bank .btn-green:hover, #tab-admin .btn-green:hover, #tab-messages .btn-green:hover, #tab-highlights .btn-green:hover{
  background: var(--green, #2ec46e) !important; color: #062012 !important;
}
#tab-coins .btn-red, #tab-bank .btn-red, #tab-admin .btn-red, #tab-messages .btn-red, #tab-highlights .btn-red{
  background: color-mix(in srgb, var(--red, #E5432F) 16%, transparent) !important;
  border-color: var(--red, #E5432F) !important; color: var(--red, #E5432F) !important;
}
#tab-coins .btn-red:hover, #tab-bank .btn-red:hover, #tab-admin .btn-red:hover, #tab-messages .btn-red:hover, #tab-highlights .btn-red:hover{
  background: var(--red, #E5432F) !important; color: #fff !important;
}
#tab-coins .btn-ghost, #tab-bank .btn-ghost, #tab-highlights .btn-ghost, #tab-messages .btn-ghost, #tab-admin .btn-ghost{ background: transparent !important; }

/* ==========================================================================
   Поля ввода
   ========================================================================== */
#tab-coins :is(input[type=text],input[type=number],input[type=search],input[type=email],input:not([type]),select,textarea),
#tab-bank :is(input[type=text],input[type=number],input[type=search],input:not([type]),select,textarea),
#tab-highlights :is(input[type=text],input[type=url],input[type=number],input:not([type]),select,textarea),
#tab-messages :is(input[type=text],input[type=search],input:not([type]),select,textarea),
#tab-admin :is(input[type=text],input[type=number],input[type=search],input[type=email],input[type=url],input[type=date],input:not([type]),select,textarea){
  background: var(--bg, #070A10) !important;
  color: var(--cy-ink) !important;
  border: 1px solid var(--cy-line) !important;
  border-radius: var(--cy-r-sm) !important;
  transition: border-color .12s ease, box-shadow .12s ease;
}
#tab-coins :is(input,select,textarea):focus, #tab-bank :is(input,select,textarea):focus,
#tab-highlights :is(input,select,textarea):focus, #tab-messages :is(input,select,textarea):focus,
#tab-admin :is(input,select,textarea):focus{
  outline: none; border-color: var(--cy-acc) !important; box-shadow: 0 0 0 2px rgba(var(--cy-acc-rgb), .2) !important;
}

/* ==========================================================================
   Вкладки-подпункты: подчёркивание, как на HLTV
   ========================================================================== */
#tab-admin .tour-subnav, #tab-coins .tour-subnav, #tab-messages .msg-extras-picker-tabs{
  display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 16px; padding: 0 6px;
  background: var(--cy-panel); border: 1px solid var(--cy-line); border-radius: var(--cy-r);
  overflow: visible;
}
#tab-admin .tour-subnav > button, #tab-coins .tour-subnav > button, #tab-messages .msg-extras-picker-tabs > button{
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0; padding: 11px 14px;
  background: transparent; color: var(--cy-mute);
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  font-size: 13px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
#tab-admin .tour-subnav > button:hover, #tab-coins .tour-subnav > button:hover, #tab-messages .msg-extras-picker-tabs > button:hover{
  color: var(--cy-ink); background: rgba(var(--cy-acc-rgb), .06);
}
#tab-admin .tour-subnav > button.active, #tab-coins .tour-subnav > button.active, #tab-messages .msg-extras-picker-tabs > button.active{
  color: var(--cy-ink); border-bottom-color: var(--cy-acc);
}
#tab-admin .tour-subnav > button:focus-visible, #tab-coins .tour-subnav > button:focus-visible,
#tab-messages .msg-extras-picker-tabs > button:focus-visible{ outline: 2px solid var(--cy-acc); outline-offset: -2px; }
#tab-admin .tour-subnav .nav-alert-dot{
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--cy-hot); color: #fff; font-size: 11px; font-weight: 800; line-height: 17px;
}
#tab-admin .tour-subnav.users-status-filter > button{ padding: 8px 12px; font-size: 12.5px; }
#tab-messages .msg-extras-picker-tabs{ margin: 0; border-width: 0 0 1px; border-radius: 0; }

/* плашки */
#tab-admin .admin-pill{
  display: inline-block; padding: 1px 7px; border-radius: var(--cy-r-sm);
  border: 1px solid currentColor; color: var(--cy-acc);
  background: color-mix(in srgb, currentColor 12%, transparent);
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
}

/* ==========================================================================
   Банк
   ========================================================================== */
#tab-bank .bank-cards-row{ display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 4px 0 16px; }
#tab-bank .bank-card{ border-radius: 10px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
#tab-bank .bc-number{ font-variant-numeric: tabular-nums; letter-spacing: .08em; }

/* ==========================================================================
   Хайлайты
   ========================================================================== */
#tab-highlights .hl-section{ margin-top: 18px; }
#tab-highlights .section-head{
  padding: 0 0 8px; margin: 0 0 10px; border-bottom: 2px solid rgba(var(--cy-acc-rgb), .75);
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 13px;
}
#tab-highlights .hl-theater{
  padding: 0; background: var(--cy-panel); border: 1px solid var(--cy-line); border-radius: var(--cy-r);
}
#tab-highlights .hl-row{
  border-radius: 0; border-bottom: 1px solid var(--cy-line); background: transparent;
  transition: background-color .12s ease;
}
#tab-highlights .hl-row:hover{ background: rgba(var(--cy-acc-rgb), .08); }
#tab-highlights .hl-row.cur{ background: rgba(var(--cy-acc-rgb), .16); box-shadow: inset 3px 0 0 var(--cy-acc); }
#tab-highlights .hl-th{ border-radius: var(--cy-r-sm); }
#tab-highlights .hl-row-title{ font-weight: 700; }
#tab-highlights .hl-year{
  display: flex; align-items: center; gap: 10px; margin: 18px 0 8px;
  font-weight: 800; letter-spacing: .04em; color: var(--cy-ink);
}
#tab-highlights .hl-year::after{ content: ""; flex: 1; height: 1px; background: var(--cy-line); }
#tab-highlights .hl-form{
  margin-top: 16px; padding: 14px 16px; background: var(--cy-panel);
  border: 1px solid var(--cy-line); border-radius: var(--cy-r);
}
/* фильтры — компактные кнопки-таблетки */
#tab-highlights .hl-filters{ display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
#tab-highlights .hl-fbtn{
  padding: 5px 12px; border-radius: var(--cy-r-sm); border: 1px solid var(--cy-line);
  background: var(--cy-panel); color: var(--cy-mute); font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}
#tab-highlights .hl-fbtn:hover{ color: var(--cy-ink); border-color: var(--cy-acc); }
#tab-highlights .hl-fbtn.on{ color: #fff; background: rgba(var(--cy-acc-rgb), .28); border-color: var(--cy-acc); }
#tab-highlights select.hl-fsel{ padding: 5px 10px; font-size: 12.5px; max-width: 200px; }
#tab-highlights .hl-count{ border-radius: var(--cy-r-sm); border: 1px solid var(--cy-line); background: var(--cy-panel-2); padding: 1px 8px; }

/* ==========================================================================
   CSTV Chat
   (раскладка flex и мобильный полноэкранный режим — из styles.css / mobile-pc-update.css)
   ========================================================================== */
#tab-messages .msg-shell, #tab-admin .msg-shell{
  background: var(--cy-panel); border: 1px solid var(--cy-line); border-radius: 8px; box-shadow: none;
}
#tab-messages .msg-list-col{ border-right: 1px solid var(--cy-line); background: rgba(0,0,0,.16); }
#tab-messages .msg-conv-item, #tab-coins .msg-conv-item{
  border-radius: 0; border: 0; border-bottom: 1px solid var(--cy-line); background: transparent;
}
#tab-messages .msg-conv-item:hover, #tab-coins .msg-conv-item:hover{ background: rgba(var(--cy-acc-rgb), .07); transform: none; }
#tab-messages .msg-conv-item.active{ background: rgba(var(--cy-acc-rgb), .16); box-shadow: inset 3px 0 0 var(--cy-acc); }
#tab-messages .msg-conv-pinned{ border-left: 3px solid var(--cy-hot); }
#tab-messages .msg-conv-name{ font-weight: 700; }
#tab-messages .msg-conv-preview, #tab-messages .msg-conv-time{ color: var(--cy-mute); font-size: 12.5px; }
#tab-messages .msg-unread-badge{ border-radius: 999px; background: var(--cy-hot); color: #fff; font-weight: 800; }
#tab-messages .msg-new-convo{ border-top: 1px solid var(--cy-line); }
#tab-messages .msg-thread-col{ background: var(--cy-panel); }
#tab-messages .msg-thread-head{ background: var(--cy-panel-2); border-bottom: 1px solid var(--cy-line); }
#tab-messages .msg-pinned-bar{ border-radius: 0; border: 0; border-bottom: 1px solid var(--cy-line); border-left: 3px solid var(--cy-hot); background: rgba(229,67,47,.08); }

/* пузыри (стикеры и видео-кружки не трогаем) */
#tab-messages .msg-bubble:not(.sticker-bubble):not(.circle-bubble),
#tab-admin .msg-bubble:not(.sticker-bubble):not(.circle-bubble){
  border: 1px solid var(--cy-line); border-radius: 12px 12px 12px 4px; box-shadow: none;
}
#tab-messages .msg-bubble.mine:not(.sticker-bubble):not(.circle-bubble),
#tab-admin .msg-bubble.mine:not(.sticker-bubble):not(.circle-bubble){
  background: rgba(var(--cy-acc-rgb), .22); border-color: rgba(var(--cy-acc-rgb), .6); border-radius: 12px 12px 4px 12px;
}
#tab-messages .msg-bubble.theirs:not(.sticker-bubble):not(.circle-bubble),
#tab-admin .msg-bubble.theirs:not(.sticker-bubble):not(.circle-bubble){ background: var(--cy-panel-2); }
#tab-messages .msg-bubble.pinned:not(.sticker-bubble){ box-shadow: inset 3px 0 0 var(--cy-hot); }
#tab-messages .msg-bubble-quote{ border-radius: var(--cy-r-sm); background: rgba(0,0,0,.25); }
#tab-messages .msg-bubble-time{ color: var(--cy-mute); font-variant-numeric: tabular-nums; }
#tab-messages .msg-reaction-pill{ border-radius: 999px; border: 1px solid var(--cy-line); background: var(--cy-panel-2); }
#tab-messages .msg-input-row{ background: var(--cy-panel-2) !important; border-top: 1px solid var(--cy-line) !important; }
#tab-messages .msg-reply-bar{ background: rgba(var(--cy-acc-rgb), .08); }
#tab-messages .msg-extras-picker{ background: var(--cy-panel); border: 1px solid var(--cy-line); border-radius: var(--cy-r); box-shadow: 0 10px 30px -10px rgba(0,0,0,.7); }
#tab-messages .msg-proposal-card{ border: 1px solid var(--cy-line); border-radius: var(--cy-r); background: var(--cy-panel-2); padding: 10px 12px; }

/* групповые чаты (messenger-plus.js) */
#tab-messages .gp-panel{ border-bottom: 1px solid var(--cy-line); background: rgba(var(--cy-acc-rgb), .04); }
#tab-messages .gp-poll-opt{ border-radius: var(--cy-r-sm); border: 1px solid var(--cy-line); background: var(--cy-panel-2); }
#tab-messages .gp-poll-opt:hover{ border-color: var(--cy-acc); }
#tab-messages .gp-sticky{ background: var(--cy-panel-2); border-top: 1px solid var(--cy-line); }

/* ==========================================================================
   Таблицы в админке
   ========================================================================== */
#tab-admin table{ border-collapse: collapse; width: 100%; }
#tab-admin th{
  padding: 8px 10px; text-align: left; background: var(--cy-panel-2) !important; color: var(--cy-mute) !important;
  font-size: 11.5px; font-weight: 800; letter-spacing: .05em !important; text-transform: uppercase !important;
  border-bottom: 2px solid rgba(var(--cy-acc-rgb), .5) !important;
}
#tab-admin td{ padding: 7px 10px; border-bottom: 1px solid var(--cy-line) !important; }
#tab-admin tbody tr:nth-child(even){ background: rgba(var(--cy-acc-rgb), .03) !important; }
#tab-admin tbody tr:hover{ background: rgba(var(--cy-acc-rgb), .08) !important; }

#tab-coins .empty, #tab-bank .empty, #tab-highlights .empty, #tab-admin .empty, #tab-messages .empty{
  padding: 22px 16px; text-align: center; color: var(--cy-mute);
  border: 1px dashed var(--cy-line); border-radius: var(--cy-r); background: transparent;
}

/* ==========================================================================
   Мобильные
   ========================================================================== */
@media (max-width: 760px){
  #tab-coins .panel-title, #tab-bank .panel-title, #tab-highlights .panel-title,
  #tab-admin .panel-title, #tab-messages .panel-title{ padding: 8px 12px; }
  #tab-admin .tour-subnav, #tab-coins .tour-subnav{ flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #tab-admin .tour-subnav::-webkit-scrollbar, #tab-coins .tour-subnav::-webkit-scrollbar{ display: none; }
  #tab-admin .tour-subnav > button, #tab-coins .tour-subnav > button{ flex: 0 0 auto; }
}
@media (max-width: 820px){
  /* открытый диалог — полноэкранный (mobile-pc-update.css) */
  #tab-messages .msg-shell.thread-open{ border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce){
  #tab-coins *, #tab-bank *, #tab-highlights *, #tab-messages *, #tab-admin *{ transition: none !important; }
}
