/* CRAZY WCS SITE V39 — единая тёмная/светлая тема для всех страниц */
html{color-scheme:dark;}
html[data-theme="light"]{color-scheme:light;}

/* Переключатель темы */
.cw-theme-switcher{
  position:fixed;
  top:48px;
  right:24px;
  z-index:900;
  width:150px;
  display:grid;
  gap:14px;
  padding:12px;
  border-radius:30px;
  background:linear-gradient(155deg,rgba(21,31,65,.94),rgba(10,15,34,.96));
  border:1px solid rgba(156,139,255,.30);
  box-shadow:0 24px 65px rgba(0,0,0,.42),0 0 32px rgba(126,92,255,.18),inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter:blur(16px) saturate(135%);
}
.cw-theme-button{
  appearance:none;
  width:126px;
  min-height:108px;
  padding:12px 8px 10px;
  display:grid;
  place-items:center;
  gap:6px;
  border-radius:23px;
  border:1px solid rgba(255,255,255,.12);
  color:#dce4ff;
  background:linear-gradient(145deg,rgba(255,255,255,.08),rgba(255,255,255,.025));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 10px 24px rgba(0,0,0,.24);
  cursor:pointer;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease,color .2s ease;
}
.cw-theme-button svg{
  width:54px;
  height:54px;
  overflow:visible;
  fill:none;
  stroke:currentColor;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
  transition:transform .28s ease,filter .28s ease;
}
.cw-theme-button-dark svg path:first-child{fill:currentColor;stroke:none;}
.cw-theme-button-dark svg circle{fill:#8ea0ff;stroke:none;}
.cw-theme-button-light svg circle{fill:currentColor;stroke:currentColor;}
.cw-theme-button span{font-size:13px;line-height:1;font-weight:900;letter-spacing:.02em;}
.cw-theme-button:hover{transform:translateY(-3px);border-color:rgba(176,157,255,.62);box-shadow:0 15px 30px rgba(0,0,0,.30),0 0 22px rgba(126,92,255,.20);}
.cw-theme-button:hover svg{transform:scale(1.08) rotate(-5deg);}
.cw-theme-button-light:hover svg{transform:scale(1.08) rotate(12deg);}
.cw-theme-button.is-active{color:#fff;border-color:rgba(196,182,255,.82);background:linear-gradient(145deg,#5a66df,#8b5cf6);box-shadow:0 14px 32px rgba(83,90,215,.40),0 0 30px rgba(139,92,246,.34),inset 0 1px 0 rgba(255,255,255,.22);}
.cw-theme-button-light.is-active{color:#5a34c9;border-color:#cbbcff;background:linear-gradient(145deg,#fffef9,#eee8ff);box-shadow:0 14px 32px rgba(102,74,199,.23),0 0 30px rgba(171,139,255,.28),inset 0 1px 0 #fff;}

/* Общая бело-фиолетовая палитра */
html[data-theme="light"]{
  --bg:#f5f1ff;
  --card:#ffffff;
  --text:#211944;
  --muted:#71678f;
  --accent:#7657e8;
  --success:#24b875;
  --shadow:0 16px 38px rgba(79,55,150,.14);
  --cw-bg:#f4f0ff;
  --cw-card:rgba(255,255,255,.96);
  --cw-card2:rgba(244,239,255,.98);
  --cw-text:#211944;
  --cw-muted:#746a93;
  --cw-purple:#7657e8;
  --cw-blue:#6470e8;
  --cw-gold:#c68a16;
  --cw-green:#1e9c66;
  --cw-shadow:0 18px 48px rgba(74,49,139,.14);
}
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] body.cases-body,
html[data-theme="light"] body.history-page{
  background:
    radial-gradient(circle at 12% 2%,rgba(172,142,255,.24),transparent 29%),
    radial-gradient(circle at 92% 14%,rgba(117,89,232,.13),transparent 25%),
    linear-gradient(180deg,#fdfcff 0%,#f3efff 48%,#ebe6fb 100%) !important;
  color:#211944 !important;
}
html[data-theme="light"] body:before{
  background:
    radial-gradient(circle at 18% 12%,rgba(143,108,255,.14),transparent 31%),
    radial-gradient(circle at 86% 20%,rgba(192,167,255,.18),transparent 27%),
    radial-gradient(circle at 50% 100%,rgba(255,255,255,.95),transparent 44%) !important;
  opacity:1 !important;
}
html[data-theme="light"] ::selection{background:#bca9ff;color:#211944;}
html[data-theme="light"] *{scrollbar-color:#9b85ea #ece7fa;}

/* Баннеры и шапки */
html[data-theme="light"] .hero img{
  border-color:rgba(100,72,190,.24) !important;
  background:#ffffff !important;
  box-shadow:0 20px 46px rgba(74,48,142,.20),0 0 30px rgba(143,108,255,.16) !important;
}
html[data-theme="light"] :is(.cw-logo,.history-title-main,.page-hero h1,.admin-hero h1,.vip-hero h1,.hero-admin h1,.bg-primary h2){color:#211944 !important;text-shadow:none !important;}
html[data-theme="light"] .cw-top{color:#211944 !important;}

/* Общие поверхности и карточки */
html[data-theme="light"] :is(
  .account-bar,.server,.cats-bar,.perk,.about,.social-grid .soc,.band .pill,
  .cw-hero,.panel,.case-card,.inv-card,.reward,.admin-hero,.vip-hero,.page-hero,
  .stats-grid .stat-card,.table-card,.admin-table-card,.vip-table-card,.admin-tools,.vip-tools,
  .error-state,.empty-state,.empty,.error,.cw-pagination-wrap,.login-box,.hero-admin,
  .tabs,.sort-toolbar,.store-help-card,.delete-warning,.history-card,.skins-page,
  .info-races-hero,.shop-sort-panel,.race-priceblock
){
  color:#211944 !important;
  border-color:rgba(118,87,232,.20) !important;
  background:
    radial-gradient(circle at 92% 0%,rgba(166,137,255,.14),transparent 34%),
    linear-gradient(145deg,rgba(255,255,255,.98),rgba(245,241,255,.96)) !important;
  box-shadow:0 15px 38px rgba(75,52,145,.13),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] :is(.case-card,.inv-card,.perk,.card,.stat-card,.social-grid .soc):hover{
  border-color:rgba(118,87,232,.42) !important;
  box-shadow:0 21px 46px rgba(75,52,145,.19),0 0 24px rgba(143,108,255,.13) !important;
}
html[data-theme="light"] :is(.account-bar,.server,.cats-bar,.perk,.about,.social-grid .soc,.cw-hero,.panel,.page-hero,.history-card):after{
  background:radial-gradient(circle,rgba(144,111,255,.15),transparent 70%) !important;
}

/* Текст */
html[data-theme="light"] :is(
  h1,h2,h3,h4,.title,.name,.admin-name,.vip-name,.group-title,.history-title-main,
  .account-left .acc-project,.acc-project-link,.server .title,.perk .name,.social-grid .soc h3,
  .about strong,.modal h3,.history-title,.card-title,.item-name,.store-purchases-title
){color:#211944 !important;text-shadow:none !important;}
html[data-theme="light"] :is(
  .muted,.steam,.meta,.mini-info,.sort-hint,.user-select-hint,.case-help,.store-product-sub,
  .account-left .acc-label,.server small,.perk .tagline,.social-grid .soc p,.modal-sub,.about,
  .stat-card span,.cw-hero p,.admin-steam,.vip-steam,.cw-page-status,.shop-sort-title
){color:#71678f !important;}
html[data-theme="light"] .acc-name{color:#2b2055 !important;}
html[data-theme="light"] .acc-balance{color:#6b3fcf !important;}
html[data-theme="light"] .acc-vip{color:#845000 !important;}
html[data-theme="light"] .acc-admin{color:#b62c81 !important;}
html[data-theme="light"] .ok{color:#14885a !important;}
html[data-theme="light"] .bad,.store-error{color:#b82f5c !important;}

/* Панель аккаунта */
html[data-theme="light"] .account-bar{
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(241,236,255,.98)) !important;
}
html[data-theme="light"] .account-left .acc-project{color:#211944 !important;}
html[data-theme="light"] .account-left .acc-label{color:#756b93 !important;}
html[data-theme="light"] .acc-avatar{background-color:#ebe5ff !important;border-color:#cbbcf4 !important;box-shadow:0 0 16px rgba(82,53,151,.14) !important;}

/* Кнопки и навигация */
html[data-theme="light"] :is(.cw-btn,.cw-link,.btn,.acc-login-btn,.acc-profile-btn,.cat-link,.buy,.topup-pay-btn,.store-buy-btn,.cw-page-btn.active,.history-page-link.current,.btn-primary){
  color:#fff !important;
  border-color:rgba(255,255,255,.25) !important;
  background:linear-gradient(135deg,#6570e8,#8d5df0) !important;
  box-shadow:0 10px 24px rgba(101,87,219,.26) !important;
}
html[data-theme="light"] :is(.cw-btn,.cw-link,.btn,.acc-login-btn,.acc-profile-btn,.cat-link,.buy,.topup-pay-btn,.store-buy-btn,.btn-primary):hover{filter:brightness(1.04);}
html[data-theme="light"] .btn.gold{background:linear-gradient(135deg,#d79b2f,#8b5cf6) !important;}
html[data-theme="light"] :is(.btn.danger,.product-delete-btn){background:linear-gradient(135deg,#df507b,#a64178) !important;color:#fff !important;}
html[data-theme="light"] .copy-btn{
  color:#3c2d70 !important;
  background:rgba(255,255,255,.82) !important;
  border:1px solid rgba(118,87,232,.20) !important;
}
html[data-theme="light"] .copy-btn:hover{color:#fff !important;background:linear-gradient(135deg,#6570e8,#8d5df0) !important;}
html[data-theme="light"] .cw-page-btn:not(.active),
html[data-theme="light"] .history-page-link:not(.current){color:#47366f !important;background:#fff !important;border-color:#d3c7f3 !important;}
html[data-theme="light"] .tab:not(.active){color:#4d3b78 !important;background:#eee8ff !important;border-color:#d5c8f8 !important;box-shadow:none !important;}

/* Категории, метки и цены */
html[data-theme="light"] .map-pill{color:#4f3b86 !important;background:#eee8ff !important;border-color:#d3c5ff !important;}
html[data-theme="light"] .cat-link{color:#fff !important;}
html[data-theme="light"] .cat-count{color:#fff !important;background:linear-gradient(135deg,#4e3a9e,#684ac7) !important;border-color:rgba(255,255,255,.42) !important;}
html[data-theme="light"] :is(.chip,.priceblock,.price,.race-priceblock){color:#684200 !important;background:linear-gradient(145deg,#fff7d8,#ffe5a5) !important;border-color:rgba(229,162,34,.32) !important;box-shadow:0 9px 22px rgba(120,82,21,.13) !important;}
html[data-theme="light"] .band .pill{color:#5e3bc8 !important;background:linear-gradient(145deg,#fff,#eee8ff) !important;}
html[data-theme="light"] .pill{color:#4f3b86 !important;background:#eee8ff !important;border-color:#d3c5ff !important;}
html[data-theme="light"] .pill.green{color:#176b4c !important;background:#eafaf3 !important;border-color:#a8e3c9 !important;}
html[data-theme="light"] .pill.red{color:#a62d55 !important;background:#fff0f5 !important;border-color:#f0b8ca !important;}
html[data-theme="light"] .pill.gold{color:#765000 !important;background:#fff6d8 !important;border-color:#ecd18a !important;}
html[data-theme="light"] .pill.purple{color:#5b3bc0 !important;background:#eee8ff !important;border-color:#cdbef8 !important;}

/* Изображения карточек */
html[data-theme="light"] :is(.case-card img,.inv-card img,.case-big,.reward img){background:#eee9ff !important;}
html[data-theme="light"] :is(.perk img,.skin-image){filter:drop-shadow(0 13px 24px rgba(56,35,113,.18)) !important;}

/* Таблицы */
html[data-theme="light"] :is(.admin-table,.vip-table,.donor-table,.punish-table,.history-table,.store-products-table,table){color:#2b2055 !important;}
html[data-theme="light"] :is(.admin-table th,.vip-table th,.donor-table th,.punish-table th,.history-table thead th,.store-products-table th,.table-card th,table th){
  color:#59488b !important;
  background:linear-gradient(180deg,#eee9ff,#e7e0fb) !important;
  border-color:#d5caf0 !important;
}
html[data-theme="light"] :is(.admin-table td,.vip-table td,.donor-table td,.punish-table td,.history-table tbody td,.store-products-table td,.table-card td,table td){
  color:#30255b !important;
  background:rgba(255,255,255,.76) !important;
  border-color:#e0d7f5 !important;
}
html[data-theme="light"] tbody tr:hover td{background:#f5f1ff !important;}
html[data-theme="light"] .history-table tbody td:first-child{border-left-color:#e0d7f5 !important;}
html[data-theme="light"] .history-table tbody td:last-child{border-right-color:#e0d7f5 !important;}
html[data-theme="light"] .history-empty{color:#71678f !important;border-color:#d9cef2 !important;background:#f7f4ff !important;}

/* Поля форм */
html[data-theme="light"] :is(input,select,textarea,.input,.select,.form-select,.form-control,.search,.field input,.field select,.field textarea){
  color:#2c2057 !important;
  background:#ffffff !important;
  border-color:#cfc2f7 !important;
  box-shadow:inset 0 1px 0 #fff,0 7px 18px rgba(69,45,130,.08) !important;
}
html[data-theme="light"] :is(input,textarea)::placeholder{color:#9589b2 !important;}
html[data-theme="light"] option{color:#2c2057 !important;background:#fff !important;}
html[data-theme="light"] :is(input,select,textarea,.input,.select,.form-select,.form-control,.search):focus{outline:none !important;border-color:#8e73df !important;box-shadow:0 0 0 3px rgba(118,87,232,.14) !important;}
html[data-theme="light"] .check-row{color:#3f3269 !important;}

/* Скины */
html[data-theme="light"] .skins-page{background:linear-gradient(145deg,#ffffff,#f1ecff) !important;}
html[data-theme="light"] :is(.skins-page .bg-primary,.bg-primary){color:#211944 !important;background:linear-gradient(135deg,#eee9ff,#faf8ff) !important;border-color:#d7ccf3 !important;box-shadow:0 14px 35px rgba(75,52,145,.12) !important;}
html[data-theme="light"] :is(.card,.skins-page .card){color:#211944 !important;background:linear-gradient(145deg,#fff,#f3eeff) !important;border-color:#d9cff2 !important;box-shadow:0 15px 36px rgba(75,52,145,.13) !important;}
html[data-theme="light"] :is(.card-title,.card-title.item-name,.item-name){color:#2b2055 !important;}
html[data-theme="light"] :is(.modal-content,.skins-modal .modal-content,.skins-grid-item){color:#211944 !important;background:linear-gradient(145deg,#fff,#f2edff) !important;border-color:#d7ccf3 !important;}

/* Модальные окна на всех страницах */
html[data-theme="light"] :is(
  #modal.modal-backdrop,#topupModal.topup-modal-backdrop,.cw-modal-backdrop,
  .store-dialog-backdrop,.history-modal,.modal-overlay,.skins-page .modal,.admin-modal-backdrop
){background:rgba(61,43,109,.30) !important;backdrop-filter:blur(13px) saturate(115%) !important;}
html[data-theme="light"] :is(
  #modal .modal,#topupModal .topup-modal-window,.cw-modal,.store-dialog,.history-window,
  .modal-content,.skins-modal .modal-content,.admin-modal
){
  color:#211944 !important;
  border-color:rgba(118,87,232,.26) !important;
  background:radial-gradient(circle at 12% 0%,rgba(169,137,255,.15),transparent 33%),linear-gradient(145deg,#ffffff 0%,#f8f5ff 58%,#efeaff 100%) !important;
  box-shadow:0 30px 85px rgba(55,37,110,.27),0 0 32px rgba(143,108,255,.13),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] :is(
  #modal .modal header,#topupModal .topup-modal-window header,.cw-modal header,
  .store-dialog-head,.history-header,.modal-header,.admin-modal-head
){background:linear-gradient(135deg,#eee9ff,#f9f7ff) !important;border-color:rgba(118,87,232,.20) !important;}
html[data-theme="light"] :is(#modal .modal h3,#topupModal .topup-modal-window h3,.cw-modal h3,.store-dialog-title,.history-title,.admin-modal-head){color:#241947 !important;text-shadow:none !important;}
html[data-theme="light"] :is(#modal .modal-sub,#topupModal .modal-sub,.cw-modal .modal-sub,.store-dialog-message,.cw-help,.topup-help){color:#746a93 !important;}
html[data-theme="light"] :is(#modal .kblock,#modal .admin-extra-panel,.store-dialog-details,#topupModal .topup-box,.cw-pay-box,.admin-modal-body){color:#2b2055 !important;border-color:rgba(118,87,232,.20) !important;background:linear-gradient(145deg,#ffffff,#f2edff) !important;}
html[data-theme="light"] #modal .modal-art{background:linear-gradient(180deg,rgba(237,231,255,.88),rgba(255,255,255,.95)) !important;border-color:rgba(118,87,232,.22) !important;box-shadow:0 15px 32px rgba(73,50,138,.13),inset 0 1px 0 #fff !important;}
html[data-theme="light"] #modal .modal-art img{background:transparent !important;border:0 !important;box-shadow:none !important;filter:drop-shadow(0 17px 27px rgba(55,35,110,.18)) !important;}
html[data-theme="light"] #modal .store-selected-price{color:#6d4700 !important;border-color:rgba(215,157,43,.30) !important;background:linear-gradient(135deg,#fff9df,#ffe9ad) !important;}
html[data-theme="light"] #modal .store-eligibility{color:#4d4273 !important;border-color:#cfc2f7 !important;background:#f4f0ff !important;}
html[data-theme="light"] #modal .store-eligibility[data-state="allowed"]{color:#176b4c !important;border-color:rgba(36,184,117,.32) !important;background:#eafaf3 !important;}
html[data-theme="light"] #modal .store-eligibility[data-state="blocked"]{color:#a62d55 !important;border-color:rgba(215,72,119,.30) !important;background:#fff0f5 !important;}
html[data-theme="light"] :is(.history-close,.modal-close){color:#3a2b6f !important;}
html[data-theme="light"] :is(.history-close,.modal-close):hover{background:#ece6ff !important;}
html[data-theme="light"] .history-body iframe{background:#f5f1ff !important;}

/* Светлый переключатель */
html[data-theme="light"] .cw-theme-switcher{background:linear-gradient(155deg,rgba(255,255,255,.95),rgba(237,231,255,.97));border-color:rgba(118,87,232,.28);box-shadow:0 22px 60px rgba(70,46,133,.18),0 0 28px rgba(143,108,255,.14),inset 0 1px 0 #fff;}
html[data-theme="light"] .cw-theme-button:not(.is-active){color:#64568c;background:linear-gradient(145deg,rgba(255,255,255,.90),rgba(233,226,255,.72));border-color:rgba(118,87,232,.18);box-shadow:inset 0 1px 0 #fff,0 8px 20px rgba(73,49,135,.10);}

@media(max-width:1500px){
  .cw-theme-switcher{top:auto;right:auto;left:50%;bottom:14px;width:auto;grid-template-columns:repeat(2,68px);gap:10px;padding:8px;border-radius:24px;transform:translateX(-50%);}
  .cw-theme-button{width:68px;min-height:62px;padding:7px;border-radius:18px;gap:2px;}
  .cw-theme-button svg{width:32px;height:32px;stroke-width:4.5;}
  .cw-theme-button span{font-size:10px;}
  body{padding-bottom:90px !important;}
}
@media(max-width:560px){
  .cw-theme-switcher{bottom:9px;grid-template-columns:repeat(2,61px);}
  .cw-theme-button{width:61px;min-height:56px;border-radius:16px;}
  .cw-theme-button svg{width:29px;height:29px;}
  .cw-theme-button span{font-size:9px;}
  body{padding-bottom:82px !important;}
}


/* =========================================================
   V39 — полировка светлой темы магазина и служебных страниц
   ========================================================= */

/* 1. Мягкие белые рамки изображений товаров */
html[data-theme="light"] #perks .perk > img{
  padding:5px !important;
  border-radius:20px !important;
  background:
    radial-gradient(circle at 30% 12%,rgba(255,255,255,.98),transparent 38%),
    linear-gradient(145deg,rgba(255,255,255,.98),rgba(244,240,255,.96)) !important;
  border:1px solid rgba(255,255,255,.98) !important;
  outline:1px solid rgba(119,88,220,.10) !important;
  box-shadow:
    0 14px 30px rgba(61,42,118,.12),
    0 0 0 4px rgba(255,255,255,.56),
    inset 0 1px 0 #fff !important;
  filter:none !important;
}
html[data-theme="light"] #perks .perk:hover > img{
  border-color:#fff !important;
  outline-color:rgba(119,88,220,.18) !important;
  box-shadow:
    0 18px 36px rgba(61,42,118,.16),
    0 0 0 4px rgba(255,255,255,.72),
    0 0 24px rgba(135,103,235,.12),
    inset 0 1px 0 #fff !important;
}
html[data-theme="light"] #perks .perk{
  border-color:rgba(131,102,222,.16) !important;
  background:linear-gradient(160deg,rgba(255,255,255,.99),rgba(248,245,255,.97)) !important;
}

/* Модальная картинка: белая, воздушная поверхность без жёсткой синей окантовки */
html[data-theme="light"] #modal .modal-art{
  background:linear-gradient(145deg,rgba(255,255,255,.99),rgba(246,242,255,.96)) !important;
  border:1px solid rgba(255,255,255,.98) !important;
  outline:1px solid rgba(119,88,220,.12) !important;
  box-shadow:0 16px 34px rgba(61,42,118,.13),0 0 0 4px rgba(255,255,255,.50),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] #modal .modal-art img{
  background:transparent !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  filter:drop-shadow(0 16px 25px rgba(61,42,118,.17)) !important;
}

/* 2. Категории: возвращаем круглые кнопки-капсулы */
html[data-theme="light"] .cats-bar{
  gap:10px !important;
  padding:9px 12px !important;
  border-radius:22px !important;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(244,239,255,.96)) !important;
  border:1px solid rgba(126,94,222,.18) !important;
  box-shadow:0 14px 34px rgba(70,47,135,.13),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .cat-link{
  padding:3px !important;
  gap:6px !important;
  border:1px solid rgba(120,88,220,.14) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.78) !important;
  box-shadow:0 7px 17px rgba(69,45,130,.09),inset 0 1px 0 #fff !important;
  overflow:hidden !important;
}
html[data-theme="light"] .cat-link:hover{
  transform:translateY(-1px) !important;
  border-color:rgba(120,88,220,.26) !important;
  background:#fff !important;
  box-shadow:0 10px 22px rgba(69,45,130,.14),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] .cat-pill{
  padding:8px 16px !important;
  border-radius:999px !important;
  color:#fff !important;
  background:linear-gradient(135deg,#6470e8,#8d5df0) !important;
  box-shadow:0 6px 15px rgba(101,87,219,.23) !important;
}
html[data-theme="light"] .cat-count{
  min-width:30px !important;
  padding:6px 10px !important;
  border-radius:999px !important;
  color:#fff !important;
  background:linear-gradient(135deg,#513b9d,#7050cb) !important;
  border:1px solid rgba(255,255,255,.38) !important;
  box-shadow:none !important;
}

/* 3. Пагинация и строка "Страница X из Y" */
html[data-theme="light"] :is(.admin-pagination-wrap,.vip-pagination-wrap,.cw-pagination-wrap){
  min-height:42px !important;
  margin-top:14px !important;
  padding:9px 12px !important;
  border-radius:20px !important;
  border:1px solid rgba(125,94,222,.18) !important;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(242,237,255,.96)) !important;
  box-shadow:0 12px 28px rgba(70,47,135,.11),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] :is(.admin-pagination,.vip-pagination,.cw-pagination,.history-pagination){gap:8px !important;}
html[data-theme="light"] :is(.admin-page-status,.vip-page-status,.cw-page-status){
  color:#615583 !important;
  font-weight:850 !important;
  text-shadow:none !important;
}
html[data-theme="light"] :is(.admin-page-dots,.vip-page-dots,.cw-page-dots){color:#8879ad !important;}
html[data-theme="light"] :is(.admin-page-btn,.vip-page-btn,.cw-page-btn,.history-page-link){
  min-width:38px !important;
  height:38px !important;
  padding:0 12px !important;
  border-radius:999px !important;
  color:#4b3978 !important;
  border:1px solid rgba(126,94,222,.20) !important;
  background:linear-gradient(145deg,#fff,#f1ecff) !important;
  box-shadow:0 7px 16px rgba(68,45,128,.09),inset 0 1px 0 #fff !important;
}
html[data-theme="light"] :is(.admin-page-btn,.vip-page-btn,.cw-page-btn,.history-page-link):hover:not(:disabled):not(.disabled){
  color:#fff !important;
  border-color:rgba(255,255,255,.38) !important;
  background:linear-gradient(135deg,#6570e8,#8d5df0) !important;
  box-shadow:0 9px 20px rgba(101,87,219,.22) !important;
}
html[data-theme="light"] :is(.admin-page-btn.active,.vip-page-btn.active,.cw-page-btn.active,.history-page-link.current){
  color:#fff !important;
  border-color:rgba(255,255,255,.40) !important;
  background:linear-gradient(135deg,#6570e8,#8d5df0) !important;
  box-shadow:0 9px 22px rgba(101,87,219,.25),inset 0 1px 0 rgba(255,255,255,.22) !important;
}
html[data-theme="light"] :is(.admin-page-btn:disabled,.vip-page-btn:disabled,.cw-page-btn:disabled,.history-page-link.disabled){
  color:#aaa0c2 !important;
  background:#f3effa !important;
  border-color:#ded5ef !important;
  box-shadow:none !important;
  opacity:.72 !important;
}
html[data-theme="light"] :is(.admin-pagination:empty,.vip-pagination:empty,.cw-pagination:empty){display:none !important;}

/* 4. Читаемый текст внутри карточек покупки в светлой теме */
html[data-theme="light"] #modal .modal,
html[data-theme="light"] #modal .modal .content{
  color:#2b2055 !important;
}
html[data-theme="light"] #modal :is(.kblock li,.kblock p,.admin-extra-panel li,.admin-extra-panel p,.store-buy-label,.store-info-only p){
  color:#34285f !important;
  text-shadow:none !important;
}
html[data-theme="light"] #modal .kblock li::marker{color:#7657e8 !important;}
html[data-theme="light"] #modal .hr{
  background:linear-gradient(90deg,transparent,rgba(118,87,232,.25),transparent) !important;
}
html[data-theme="light"] #modal .badge{
  color:#fff !important;
  background:linear-gradient(135deg,#6370e3,#7657e8) !important;
  border-color:rgba(255,255,255,.38) !important;
  box-shadow:0 7px 18px rgba(92,77,194,.22) !important;
}

/* 5. Светлый выбор срока и других вариантов товара */
html[data-theme="light"] #modal .store-variant-select{
  color-scheme:light !important;
  color:#2c2057 !important;
  background:linear-gradient(145deg,#ffffff,#f6f2ff) !important;
  border:1px solid #cbbef2 !important;
  box-shadow:inset 0 1px 0 #fff,0 7px 17px rgba(69,45,130,.09) !important;
}
html[data-theme="light"] #modal .store-variant-select:hover{border-color:#a995e6 !important;}
html[data-theme="light"] #modal .store-variant-select:focus{
  color:#2c2057 !important;
  background:#fff !important;
  border-color:#8266d7 !important;
  box-shadow:0 0 0 3px rgba(118,87,232,.14),0 8px 19px rgba(69,45,130,.10) !important;
}
html[data-theme="light"] #modal .store-variant-select option{
  color:#2c2057 !important;
  background:#fff !important;
}
html[data-theme="light"] #modal .store-selected-price{
  color:#704900 !important;
  border-color:rgba(218,165,55,.28) !important;
  background:linear-gradient(145deg,#fffaf0,#ffedbf) !important;
  box-shadow:0 8px 18px rgba(139,92,20,.10),inset 0 1px 0 #fff !important;
}

@media(max-width:760px){
  html[data-theme="light"] .cats-bar{border-radius:18px !important;}
  html[data-theme="light"] .cat-link{width:auto !important;}
  html[data-theme="light"] :is(.admin-pagination-wrap,.vip-pagination-wrap,.cw-pagination-wrap){justify-content:center !important;}
  html[data-theme="light"] :is(.admin-page-status,.vip-page-status,.cw-page-status){width:100%;text-align:center;}
}

/* ========================================================================== */
/* V87 — светлая тема в стиле VK: серый фон, белые плиты, тонкие разделители */
/* ========================================================================== */
html[data-theme="light"]{
  --bg:#edeef0;
  --card:#ffffff;
  --text:#000000;
  --muted:#818c99;
  --accent:#447bba;
  --success:#24b875;
  --shadow:0 1px 0 rgba(0,0,0,.04);
  --cw-bg:#edeef0;
  --cw-card:#ffffff;
  --cw-card2:#f5f6f8;
  --cw-text:#000000;
  --cw-muted:#818c99;
  --cw-purple:#6757e8;
  --cw-blue:#447bba;
  --cw-gold:#b77900;
  --cw-green:#1f9d68;
  --cw-shadow:0 1px 0 rgba(0,0,0,.04);
}
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] body.cases-body,
html[data-theme="light"] body.history-page{
  background:#edeef0 !important;
  color:#000 !important;
}
html[data-theme="light"] body:before,
html[data-theme="light"] body:after{
  display:none !important;
  content:none !important;
  background:none !important;
}
html[data-theme="light"] *{scrollbar-color:#b8c1cc #edeef0;}
html[data-theme="light"] ::selection{background:#cfe3fa;color:#000;}

/* Главные белые поверхности */
html[data-theme="light"] :is(
  .account-bar,.server,.cats-bar,.about,.panel,.cw-hero,.page-hero,.admin-hero,.vip-hero,.hero-admin,
  .table-card,.admin-table-card,.vip-table-card,.admin-tools,.vip-tools,.stats-grid .stat-card,.stat-card,
  .history-card,.history-window,.history-modal-content,.skins-page,.login-box,.error-state,.empty-state,.empty,.error,
  .tabs,.sort-toolbar,.store-help-card,.delete-warning,.cw-pagination-wrap,.info-races-hero,.shop-sort-panel,
  .level-bank-panel,.wcs-progress-shell,.wcs-progress-card,.wcs-progress-summary,.store-buy-block,.store-info-only,
  .kblock,.modal-content,.cw-modal,.store-dialog,.admin-modal,.topup-modal-window,
  .chat-panel,.support-chat-panel,.chat-window,.support-window,.chat-admin-card,.support-admin-card,
  .site-admin-section,.admin-section,.admin-card,.settings-card,.dashboard-card,.summary-card,
  .social-grid .soc,.social-grid.social-dock .soc,.contacts-toggle-card
){
  color:#000 !important;
  background:#fff !important;
  border-color:#dce1e6 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.04) !important;
}

/* Карточки магазина и контента */
html[data-theme="light"] :is(
  #perks .store-history-card,#perks .perk,.perk,.card,.case-card,.inv-card,.reward,
  .purchase-card,.purchase-active-card,.purchase-history-card,.privilege-card,.race-card,.race-list-card,
  .skin-card,.skins-grid-item,.user-card,.admin-list-card,.vip-list-card,.punishment-card,
  .product-row,.store-product-row,.compact-product-row
){
  color:#000 !important;
  background:#fff !important;
  border-color:#dce1e6 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.04) !important;
}
html[data-theme="light"] :is(
  #perks .store-history-card,#perks .perk,.perk,.card,.case-card,.inv-card,.purchase-card,.race-card,.skin-card,.social-grid .soc
):hover{
  background:#fff !important;
  border-color:#c7d0d9 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
}
html[data-theme="light"] :is(
  #perks .store-history-card,.purchase-card,.race-card,.social-grid .soc,.account-bar,.server,.cats-bar,.panel,.table-card
):before,
html[data-theme="light"] :is(
  #perks .store-history-card,.purchase-card,.race-card,.social-grid .soc,.account-bar,.server,.cats-bar,.panel,.table-card
):after{
  display:none !important;
  content:none !important;
  background:none !important;
}

/* Шапка и баннер */
html[data-theme="light"] .hero img{
  background:#fff !important;
  border-color:#dce1e6 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.05) !important;
}
html[data-theme="light"] :is(.cw-logo,.history-title-main,.page-hero h1,.admin-hero h1,.vip-hero h1,.hero-admin h1,.bg-primary h2){
  color:#000 !important;
  text-shadow:none !important;
}

/* Текст */
html[data-theme="light"] :is(
  h1,h2,h3,h4,h5,.title,.name,.admin-name,.vip-name,.group-title,.history-title-main,
  .account-left .acc-project,.acc-project-link,.server .title,.perk .name,.social-grid .soc h3,
  .about strong,.modal h3,.history-title,.card-title,.item-name,.store-purchases-title,
  .store-history-name,.race-name,.product-title,.section-title
){color:#000 !important;text-shadow:none !important;}
html[data-theme="light"] :is(
  .muted,.steam,.meta,.mini-info,.sort-hint,.user-select-hint,.case-help,.store-product-sub,
  .account-left .acc-label,.server small,.perk .tagline,.social-grid .soc p,.modal-sub,.about,
  .stat-card span,.cw-hero p,.admin-steam,.vip-steam,.cw-page-status,.shop-sort-title,
  .store-history-variant,.store-history-description,.soc-description,.race-description,.product-description
){color:#818c99 !important;}
html[data-theme="light"] .acc-name{color:#000 !important;}
html[data-theme="light"] .acc-balance{color:#447bba !important;}

/* Верхние полосы, плашки, вложенные блоки */
html[data-theme="light"] :is(
  .store-history-type,.soc-type,.badge,.chip,.pill,.map-pill,.cat-count,.band .pill,
  .store-feature-section,.store-feature-stat,.store-feature-item,.store-skill-card,.store-feature-details,
  .admin-inherited-rights,.admin-vip-profile-summary,.vip-command-guide,.admin-command-guide,
  .wcs-progress-card,.level-bank-value,.level-bank-copy
){
  background:#f0f2f5 !important;
  border-color:#dce1e6 !important;
  color:#4a5b6d !important;
  box-shadow:none !important;
}
html[data-theme="light"] :is(.store-history-type,.soc-type,.badge){
  color:#447bba !important;
  background:#eaf2fb !important;
  border-color:#c9dcef !important;
}

/* Таблицы */
html[data-theme="light"] :is(.admin-table,.vip-table,.donor-table,.punish-table,.history-table,.store-products-table,table){
  color:#000 !important;
  background:#fff !important;
}
html[data-theme="light"] :is(.admin-table th,.vip-table th,.donor-table th,.punish-table th,.history-table thead th,.store-products-table th,.table-card th,table th){
  color:#6f7985 !important;
  background:#f5f6f8 !important;
  border-color:#dce1e6 !important;
}
html[data-theme="light"] :is(.admin-table td,.vip-table td,.donor-table td,.punish-table td,.history-table tbody td,.store-products-table td,.table-card td,table td){
  color:#000 !important;
  background:#fff !important;
  border-color:#e7e8ec !important;
}
html[data-theme="light"] tbody tr:hover td{background:#f7f8fa !important;}

/* Формы */
html[data-theme="light"] :is(input,select,textarea,.input,.select,.form-select,.form-control,.search,.field input,.field select,.field textarea){
  color:#000 !important;
  background:#fff !important;
  border-color:#d3d9de !important;
  box-shadow:none !important;
}
html[data-theme="light"] :is(input,textarea)::placeholder{color:#99a2ad !important;}
html[data-theme="light"] :is(input,select,textarea,.input,.select,.form-select,.form-control,.search):focus{
  outline:none !important;
  border-color:#447bba !important;
  box-shadow:0 0 0 2px rgba(68,123,186,.16) !important;
}

/* Кнопки: сохраняем брендовый фиолетовый акцент, но без тяжёлых свечений */
html[data-theme="light"] :is(.cw-btn,.cw-link,.btn,.acc-login-btn,.acc-profile-btn,.cat-link,.buy,.topup-pay-btn,.store-buy-btn,.cw-page-btn.active,.history-page-link.current,.btn-primary){
  color:#fff !important;
  border-color:transparent !important;
  background:linear-gradient(135deg,#6570e8,#8d5df0) !important;
  box-shadow:none !important;
}
html[data-theme="light"] :is(.copy-btn,.cw-page-btn:not(.active),.history-page-link:not(.current),.tab:not(.active),.secondary-btn){
  color:#2a5885 !important;
  background:#f0f2f5 !important;
  border-color:#dce1e6 !important;
  box-shadow:none !important;
}
html[data-theme="light"] :is(.copy-btn,.cw-page-btn:not(.active),.history-page-link:not(.current),.tab:not(.active),.secondary-btn):hover{
  background:#e7e8ec !important;
}
html[data-theme="light"] :is(.btn.danger,.product-delete-btn){
  color:#fff !important;
  background:#e64646 !important;
  box-shadow:none !important;
}

/* Цены и статусы */
html[data-theme="light"] :is(.priceblock,.price,.race-priceblock,.store-history-price,.soc-meta){
  color:#b77900 !important;
  background:transparent !important;
  border-color:transparent !important;
  box-shadow:none !important;
}
html[data-theme="light"] :is(.store-card-buy,.soc-open,.pill.green,.status-active,.status-success){
  color:#177c55 !important;
  background:#e9f7f0 !important;
  border-color:#b7e4cf !important;
  box-shadow:none !important;
}

/* Модальные окна */
html[data-theme="light"] :is(
  #modal.modal-backdrop,#topupModal.topup-modal-backdrop,.cw-modal-backdrop,.store-dialog-backdrop,
  .history-modal,.modal-overlay,.skins-page .modal,.admin-modal-backdrop
){
  background:rgba(0,0,0,.28) !important;
  backdrop-filter:blur(6px) !important;
}
html[data-theme="light"] :is(
  #modal .modal,#topupModal .topup-modal-window,.cw-modal,.store-dialog,.history-window,
  .modal-content,.skins-modal .modal-content,.admin-modal
){
  color:#000 !important;
  background:#fff !important;
  border-color:#dce1e6 !important;
  box-shadow:0 8px 30px rgba(0,0,0,.18) !important;
}

/* Чаты */
html[data-theme="light"] :is(.chat-message,.support-message,.chat-compose,.support-compose,.chat-header,.support-header){
  color:#000 !important;
  background:#fff !important;
  border-color:#e7e8ec !important;
}
html[data-theme="light"] :is(.chat-message.is-own,.support-message.is-admin){
  background:#eaf2fb !important;
  border-color:#c9dcef !important;
}

/* Переключатель темы */
html[data-theme="light"] .cw-theme-switcher{
  background:#fff !important;
  border-color:#dce1e6 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
}
html[data-theme="light"] .cw-theme-button{
  color:#2a5885 !important;
  background:#f0f2f5 !important;
  border-color:#dce1e6 !important;
  box-shadow:none !important;
}
html[data-theme="light"] .cw-theme-button.is-active{
  color:#fff !important;
  background:linear-gradient(135deg,#6570e8,#8d5df0) !important;
  border-color:transparent !important;
  box-shadow:none !important;
}

/* Контакты слева */
html[data-theme="light"] .social-grid.social-dock .soc{
  background:#fff !important;
  border-color:#dce1e6 !important;
  box-shadow:0 1px 0 rgba(0,0,0,.04) !important;
}
html[data-theme="light"] .social-grid.social-dock .soc:hover{
  background:#fff !important;
  border-color:#c7d0d9 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
}
