/* =====================================================================
   Groxent brand layer for the whole back office + Platform Admin (2026-11-23)
   1. The template's purple (#7367f0) is replaced by the shop accent everywhere it leaked through
      Bootstrap's --bs-primary (badges, links, tabs, pagination, progress, checkboxes, focus rings...).
   2. Pills and chips look the same as the store set-up pop-up: selected = soft accent + check mark,
      not selected = plain with a small "+".
   Everything uses the --wk-accent family, so the parlour theme (pink) still wins where it is switched on:
   parlour-theme.css is loaded after this file and redefines the same variables.
   ===================================================================== */

/* safe defaults for pages without the workspace stylesheet (sign-in pages): zero specificity, so the real
   workspace values, their dark-mode versions and the parlour theme always win */
:where(:root) {
  --wk-accent: #0d9488; --wk-accent-dark: #0f766e; --wk-accent-soft: #e6f4f2;
  --wk-surface: #ffffff; --wk-sunken: #f1f2f5; --wk-border: #e7e9ee; --wk-body: #3d4350; --wk-faint: #9aa0ab;
}

:root,
[data-bs-theme=light] {
  --bs-primary: #0d9488;
  --bs-primary-rgb: 13, 148, 136;
  --bs-primary-text-emphasis: #0f766e;
  --bs-primary-bg-subtle: #ecfdf5;
  --bs-primary-border-subtle: #99f6e4;
  --bs-link-color: #0d9488;
  --bs-link-color-rgb: 13, 148, 136;
  --bs-link-hover-color: #0f766e;
  --bs-link-hover-color-rgb: 15, 118, 110;
  --bs-purple: #0d9488;
}
[data-bs-theme=dark] {
  --bs-primary: #14b8a6;
  --bs-primary-rgb: 20, 184, 166;
  --bs-primary-text-emphasis: #5eead4;
  --bs-primary-bg-subtle: rgba(13, 148, 136, .18);
  --bs-primary-border-subtle: rgba(45, 212, 191, .4);
  --bs-link-color: #2dd4bf;
  --bs-link-color-rgb: 45, 212, 191;
  --bs-link-hover-color: #5eead4;
}

/* ---------- buttons the template paints purple with fixed colours ---------- */
html body .btn-outline-primary {
  --bs-btn-color: var(--wk-accent);
  --bs-btn-border-color: var(--wk-accent);
  --bs-btn-hover-bg: var(--wk-accent);
  --bs-btn-hover-border-color: var(--wk-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--wk-accent-dark);
  --bs-btn-active-border-color: var(--wk-accent-dark);
  --bs-btn-disabled-color: var(--wk-accent);
  --bs-btn-disabled-border-color: var(--wk-accent);
  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
html body .btn-label-primary {
  background-color: var(--wk-accent-soft) !important;
  color: var(--wk-accent-dark) !important;
  border-color: transparent !important;
}
html body .btn-label-primary:hover,
html body .btn-label-primary:focus-visible { background-color: var(--wk-accent) !important; color: #fff !important; }
html body .btn-text-primary { color: var(--wk-accent) !important; }
html body .progress { --bs-progress-bar-bg: var(--wk-accent); }
html body .progress-bar:not([class*=" bg-"]) { background-color: var(--wk-accent); }
html body .text-primary { color: var(--wk-accent) !important; }
html body .bg-primary { background-color: var(--wk-accent) !important; }
html body .border-primary { border-color: var(--wk-accent) !important; }
html body .bg-label-primary { background-color: var(--wk-accent-soft) !important; color: var(--wk-accent-dark) !important; }
html body .badge.bg-primary { background-color: var(--wk-accent) !important; }
html body .page-item.active .page-link,
html body .pagination .active > .page-link { background-color: var(--wk-accent) !important; border-color: var(--wk-accent) !important; color: #fff !important; }
html body .page-link:focus { box-shadow: 0 0 0 3px var(--wk-accent-soft) !important; }
html body .form-check-input:focus { border-color: var(--wk-accent) !important; box-shadow: 0 0 0 3px var(--wk-accent-soft) !important; }
html body .form-range::-webkit-slider-thumb { background-color: var(--wk-accent); }
html body .form-range::-moz-range-thumb { background-color: var(--wk-accent); }
html body .nav-tabs .nav-link.active,
html body .nav-tabs .nav-item.show .nav-link { color: var(--wk-accent-dark); }
html body .nav-tabs .nav-link.active { box-shadow: 0 -2px 0 var(--wk-accent) inset; }
html body .dropdown-item.active,
html body .dropdown-item:active { background-color: var(--wk-accent-soft) !important; color: var(--wk-accent-dark) !important; }
html body .list-group-item.active { background-color: var(--wk-accent) !important; border-color: var(--wk-accent) !important; }
html body .spinner-border.text-primary, html body .spinner-grow.text-primary { color: var(--wk-accent) !important; }

/* ---------- pill tabs (nav-pills): clear selected state ---------- */
html body .nav-pills .nav-link {
  border-radius: 999px;
  font-weight: 600;
  color: var(--wk-body);
  transition: background-color .12s, color .12s, box-shadow .12s;
}
html body .nav-pills .nav-link:hover:not(.active) { background: var(--wk-accent-soft); color: var(--wk-accent-dark); }
html body .nav-pills .nav-link.active,
html body .nav-pills .show > .nav-link {
  background: var(--wk-accent) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px -8px var(--wk-accent);
}

/* ---------- toggle pills (btn-check + outline button): + when off, check mark when on ---------- */
html body .btn-check + .btn[class*="btn-outline-"] {
  border-radius: 999px;
  border-width: 1.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html body .btn-check + .btn[class*="btn-outline-"]::before {
  content: '+';
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--wk-sunken);
  color: var(--wk-faint);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
html body .btn-check[type=radio] + .btn[class*="btn-outline-"]::before { content: ''; width: 12px; height: 12px; border: 2px solid var(--wk-faint); background: transparent; }
html body .btn-check + .btn-outline-primary,
html body .btn-check + .btn-outline-secondary { color: var(--wk-body); border-color: var(--wk-border); background: var(--wk-surface); }
html body .btn-check + .btn-outline-primary:hover,
html body .btn-check + .btn-outline-secondary:hover { color: var(--wk-accent-dark); border-color: var(--wk-accent); background: var(--wk-surface); }
html body .btn-check:checked + .btn-outline-primary,
html body .btn-check:checked + .btn-outline-secondary {
  background: var(--wk-accent-soft) !important;
  border-color: var(--wk-accent) !important;
  color: var(--wk-accent-dark) !important;
  font-weight: 700;
}
html body .btn-check:checked + .btn[class*="btn-outline-"]::before { content: '\2713'; background: var(--wk-accent); color: #fff; border: 0; width: 16px; height: 16px; }
html body .btn-check:focus-visible + .btn { box-shadow: 0 0 0 3px var(--wk-accent-soft) !important; }
/* segmented controls (btn-group) keep their joined shape and no extra icon */
html body .btn-group > .btn-check + .btn[class*="btn-outline-"] { border-radius: 0; }
html body .btn-group > .btn-check + .btn[class*="btn-outline-"]::before { display: none; }
html body .btn-group > .btn-check:first-child + .btn { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
html body .btn-group > .btn:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

/* ---------- multi-select chips (Select2) ---------- */
html body .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background: var(--wk-accent-soft) !important;
  border: 1px solid var(--wk-accent) !important;
  color: var(--wk-accent-dark) !important;
  border-radius: 999px !important;
  font-weight: 600;
  padding: 2px 10px 2px 22px !important;
}
html body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--wk-accent-dark) !important;
  border: 0 !important;
  left: 6px !important;
}
html body .select2-container--default .select2-results__option--highlighted[aria-selected],
html body .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background-color: var(--wk-accent) !important; color: #fff !important; }
html body .select2-container--default .select2-results__option[aria-selected=true],
html body .select2-container--default .select2-results__option--selected { background-color: var(--wk-accent-soft) !important; color: var(--wk-accent-dark) !important; }

/* ---------- date picker and notices ---------- */
html body .flatpickr-day.selected,
html body .flatpickr-day.startRange,
html body .flatpickr-day.endRange { background: var(--wk-accent) !important; border-color: var(--wk-accent) !important; }
html body .flatpickr-day.inRange { background: var(--wk-accent-soft) !important; border-color: var(--wk-accent-soft) !important; box-shadow: -5px 0 0 var(--wk-accent-soft), 5px 0 0 var(--wk-accent-soft) !important; }
html body .flatpickr-day.today:not(.selected) { border-color: var(--wk-accent) !important; }
html body .swal2-styled.swal2-confirm { background-color: var(--wk-accent) !important; }
html body .swal2-styled.swal2-confirm:focus { box-shadow: 0 0 0 3px var(--wk-accent-soft) !important; }

/* ---------- reusable chip set for new screens: <div class="gx-chips"><button class="gx-chip on"> ---------- */
html body .gx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
html body .gx-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--wk-border); background: var(--wk-surface); color: var(--wk-body);
  border-radius: 999px; padding: 6px 13px 6px 10px; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s, transform .06s; user-select: none;
}
html body .gx-chip::before {
  content: '+'; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: var(--wk-sunken); color: var(--wk-faint); font-size: 12px; font-weight: 800; line-height: 1;
}
html body .gx-chip:hover { border-color: var(--wk-accent); color: var(--wk-accent-dark); }
html body .gx-chip:active { transform: scale(.97); }
html body .gx-chip.on, html body .gx-chip.active, html body .gx-chip[aria-pressed=true] {
  background: var(--wk-accent-soft); border-color: var(--wk-accent); color: var(--wk-accent-dark); font-weight: 700;
}
html body .gx-chip.on::before, html body .gx-chip.active::before, html body .gx-chip[aria-pressed=true]::before { content: '\2713'; background: var(--wk-accent); color: #fff; }
html body .btn-group > .btn-check:checked + .btn[class*="btn-outline-"] {
  background: var(--wk-accent) !important; border-color: var(--wk-accent) !important; color: #fff !important; font-weight: 700;
}
