/* VKS FINAL COLOR FIX
   Final pass removing legacy Bootstrap-blue accents from the logged-in panel.
   Semantic success/warning/danger colors stay intact; the PRIMARY brand accent is VKS red. */

:root,
[data-bs-theme="dark"]{
  --bs-primary:#ff3647;
  --bs-primary-rgb:255,54,71;
  --bs-link-color:#ff5c69;
  --bs-link-hover-color:#ff7b86;
  --bs-focus-ring-color:rgba(255,54,71,.22);
  --vks-blue:#ff5362; /* legacy V2 variable: intentionally remapped to brand red */
}

/* Primary buttons / outlines / links — beat old page-level inline CSS too */
html[data-bs-theme="dark"] body.vks-app .btn-primary,
html[data-bs-theme="dark"] body.vks-app .btn-brand{
  --bs-btn-bg:#ff3647;
  --bs-btn-border-color:#ff3647;
  --bs-btn-hover-bg:#e72b3d;
  --bs-btn-hover-border-color:#e72b3d;
  --bs-btn-active-bg:#cf2233;
  --bs-btn-active-border-color:#cf2233;
  background:linear-gradient(135deg,#ff3647,#d91f31) !important;
  border-color:transparent !important;
  color:#fff !important;
  box-shadow:0 8px 24px rgba(255,54,71,.16) !important;
}
html[data-bs-theme="dark"] body.vks-app .btn-outline-primary{
  --bs-btn-color:#ff6572;
  --bs-btn-border-color:rgba(255,54,71,.42);
  --bs-btn-hover-bg:rgba(255,54,71,.14);
  --bs-btn-hover-border-color:rgba(255,54,71,.62);
  --bs-btn-hover-color:#fff;
  color:#ff6572 !important;
  border-color:rgba(255,54,71,.42) !important;
  background:rgba(255,54,71,.055) !important;
  box-shadow:none !important;
}
html[data-bs-theme="dark"] body.vks-app .btn-outline-primary:hover,
html[data-bs-theme="dark"] body.vks-app .btn-outline-primary:focus,
html[data-bs-theme="dark"] body.vks-app .btn-outline-primary:active{
  color:#fff !important;
  border-color:rgba(255,54,71,.68) !important;
  background:rgba(255,54,71,.16) !important;
  box-shadow:0 0 0 3px rgba(255,54,71,.08) !important;
}
html[data-bs-theme="dark"] body.vks-app .text-primary,
html[data-bs-theme="dark"] body.vks-app a:not(.btn):not(.nav-link):not(.dropdown-item).text-primary{
  color:#ff6572 !important;
}

/* Bootstrap primary badges become VKS red, not blue */
html[data-bs-theme="dark"] body.vks-app .bg-primary,
html[data-bs-theme="dark"] body.vks-app .text-bg-primary,
html[data-bs-theme="dark"] body.vks-app .badge.bg-primary,
html[data-bs-theme="dark"] body.vks-app .badge.text-bg-primary{
  background:rgba(255,54,71,.17) !important;
  color:#ff7581 !important;
  border:1px solid rgba(255,54,71,.20) !important;
}

/* Active list rows — fixes the bright blue selection visible in admin/credits.php */
html[data-bs-theme="dark"] body.vks-app .list-group-item.active,
html[data-bs-theme="dark"] body.vks-app .list-group-item-action.active,
html[data-bs-theme="dark"] body.vks-app .list-group-item.active:hover,
html[data-bs-theme="dark"] body.vks-app .list-group-item-action.active:hover{
  color:#fff !important;
  background:linear-gradient(90deg,rgba(255,54,71,.22),rgba(255,54,71,.10)) !important;
  border-color:rgba(255,54,71,.30) !important;
  box-shadow:inset 3px 0 0 #ff3647 !important;
}
html[data-bs-theme="dark"] body.vks-app .list-group-item.active .text-muted,
html[data-bs-theme="dark"] body.vks-app .list-group-item-action.active .text-muted{
  color:#c8cdd4 !important;
}

/* Tabs / pills / pagination */
html[data-bs-theme="dark"] body.vks-app .nav-tabs .nav-link.active,
html[data-bs-theme="dark"] body.vks-app .nav-pills .nav-link.active,
html[data-bs-theme="dark"] body.vks-app .page-item.active .page-link{
  color:#fff !important;
  background:rgba(255,54,71,.15) !important;
  border-color:rgba(255,54,71,.38) !important;
}
html[data-bs-theme="dark"] body.vks-app .page-link{
  color:#d7dce2 !important;
  background:#10151b !important;
  border-color:rgba(255,255,255,.09) !important;
}
html[data-bs-theme="dark"] body.vks-app .page-link:hover{
  color:#ff6976 !important;
  background:rgba(255,54,71,.08) !important;
  border-color:rgba(255,54,71,.25) !important;
}

/* Dropdown active item — fixes Narzędzia -> Kredyty and all other sections */
html[data-bs-theme="dark"] body.vks-app .vks-topnav .dropdown-item.active,
html[data-bs-theme="dark"] body.vks-app .vks-topnav .dropdown-item:active,
html[data-bs-theme="dark"] body.vks-app .dropdown-menu .dropdown-item.active,
html[data-bs-theme="dark"] body.vks-app .dropdown-menu .dropdown-item:active{
  color:#ff6976 !important;
  background:linear-gradient(90deg,rgba(255,54,71,.18),rgba(255,54,71,.08)) !important;
  box-shadow:inset 2px 0 0 #ff3647 !important;
}

/* Forms: selections, checks, focus and upload/drop zones */
html[data-bs-theme="dark"] body.vks-app .form-control:focus,
html[data-bs-theme="dark"] body.vks-app .form-select:focus,
html[data-bs-theme="dark"] body.vks-app textarea.form-control:focus{
  border-color:rgba(255,54,71,.52) !important;
  box-shadow:0 0 0 3px rgba(255,54,71,.09) !important;
}
html[data-bs-theme="dark"] body.vks-app .form-check-input:checked{
  background-color:#ff3647 !important;
  border-color:#ff3647 !important;
}
html[data-bs-theme="dark"] body.vks-app .form-check-input:focus{
  border-color:rgba(255,54,71,.48) !important;
  box-shadow:0 0 0 .2rem rgba(255,54,71,.12) !important;
}
html[data-bs-theme="dark"] body.vks-app .dropzone.dragover,
html[data-bs-theme="dark"] body.vks-app .dz-lite.dragover{
  border-color:rgba(255,54,71,.65) !important;
  background:rgba(255,54,71,.07) !important;
}

/* Select2 / Choices / common custom selected states if present */
html[data-bs-theme="dark"] body.vks-app .select2-container--default .select2-results__option--highlighted[aria-selected],
html[data-bs-theme="dark"] body.vks-app .select2-container--default .select2-results__option[aria-selected="true"],
html[data-bs-theme="dark"] body.vks-app .choices__item.is-highlighted,
html[data-bs-theme="dark"] body.vks-app .dropdown-option.active{
  background:rgba(255,54,71,.16) !important;
  color:#fff !important;
}

/* Legacy custom blue surfaces found in the panel */
html[data-bs-theme="dark"] body.vks-app .icon-new{
  background:rgba(255,54,71,.10) !important;
  color:#ff6572 !important;
}
html[data-bs-theme="dark"] body.vks-app .badge-soft{
  background:rgba(255,54,71,.10) !important;
  border-color:rgba(255,54,71,.22) !important;
  color:#ff818c !important;
}

/* Dashboard V2: remove the one intentionally blue stat accent */
body.vks-app .vks-stat-grid .col-6:nth-child(3) .vks-stat-card:before,
body.vks-app .vks-stat-grid .col-md-4:nth-child(3) .vks-stat-card:before{
  background:#ff5362 !important;
}
body.vks-app .vks-stat-grid .col-6:nth-child(3) .vks-stat-icon,
body.vks-app .vks-stat-grid .col-md-4:nth-child(3) .vks-stat-icon{
  color:#ff7581 !important;
  background:rgba(255,54,71,.08) !important;
}

/* Browser text selection in the app */
body.vks-app ::selection{background:rgba(255,54,71,.35);color:#fff;}
\n\n/* =========================================================
   UNREAD / NEW MESSAGES — GREEN GLOW
   ========================================================= */
body.vks-app .vks-unread-badge{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-width:26px;
  height:26px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(34,197,94,.22) !important;
  border:1px solid rgba(74,222,128,.58) !important;
  color:#5cff8a !important;
  font-weight:800;
  line-height:1;
  text-shadow:0 0 8px rgba(74,222,128,.70);
  box-shadow:0 0 10px rgba(34,197,94,.52), 0 0 22px rgba(34,197,94,.26), inset 0 0 10px rgba(34,197,94,.10) !important;
}
body.vks-app .nav-chip .vks-unread-badge{
  min-width:28px;
  height:28px;
  padding:0 8px;
}
body.vks-app .vks-unread-badge.d-none{display:none !important;}
