:root {
  --kpi-bg1: #0b1220;
  --kpi-bg2: #111b31;

  --kpi-text: rgba(255, 255, 255, 0.92);
  --kpi-muted: rgba(255, 255, 255, 0.7);

  --kpi-border: rgba(255, 255, 255, 0.14);

  --kpi-accent: #66f0c2;
  --kpi-accent2: #8aa6ff;

  /* SOLID darks for Handsontable */
  --hot-base: #0b1220;
  --hot-head: #141f38;
  --hot-cell: #0f1a31;
  --hot-cell-hover: #578e90;
  --hot-cell-bg: #132724;
  --hot-border: rgba(255, 255, 255, 0.12);
}

/* =========================================================
   KPI Handsontable Scrollbar (Activity + Monthly)
========================================================= */


/* Make the scrollbars show a pointer cursor */
#kpiHotLeads .wtHolder,
#kpiHotSales .wtHolder,
#kpiHotMonthly .wtHolder #kpiHotSales,
.wtHolder {
  cursor: pointer;
  border-radius: 0px !important;
}

/* Firefox */
#kpiHotLeads .wtHolder,
#kpiHotSales .wtHolder,
#kpiHotMonthly .wtHolder {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}

/* Chrome / Edge / Safari */
#kpiHotLeads .wtHolder::-webkit-scrollbar,
#kpiHotSales .wtHolder::-webkit-scrollbar,
#kpiHotMonthly .wtHolder::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  cursor: pointer;
}

#kpiHotLeads .wtHolder::-webkit-scrollbar-track,
#kpiHotSales .wtHolder::-webkit-scrollbar-track,
#kpiHotMonthly .wtHolder::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

#kpiHotLeads .wtHolder::-webkit-scrollbar-thumb,
#kpiHotSales .wtHolder::-webkit-scrollbar-thumb,
#kpiHotMonthly .wtHolder::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.22)
  );
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

#kpiHotLeads .wtHolder::-webkit-scrollbar-thumb:hover,
#kpiHotSales .wtHolder::-webkit-scrollbar-thumb:hover,
#kpiHotMonthly .wtHolder::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.65),
    rgba(255, 255, 255, 0.3)
  );
}

/* Corner where horizontal + vertical scrollbars meet */
#kpiHotLeads .wtHolder::-webkit-scrollbar-corner,
#kpiHotSales .wtHolder::-webkit-scrollbar-corner,
#kpiHotMonthly .wtHolder::-webkit-scrollbar-corner {
  background: rgba(255, 255, 255, 0.08);
}

#kpiHotLeads {
  border-radius: 0px !important;
}

#kpiHotSales {
  border-radius: 0px !important;
}

.kpi-wrap {
  padding: 24px 0px;
  color: var(--kpi-text);
  /* max-width: 1080px; */
  margin: 0 auto;
}

.kpi-shell {
  position: relative;
  margin: 0 auto;
  padding: 18px;
  border-radius: 22px;
  overflow: hidden;
  background: #132724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.35);
}

.kpi-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.kpi-badge {
  font-size: 16px;
}

.kpi-title h2 {
  margin: 8px 0 4px;
  font-size: 30px;
  letter-spacing: 0.2px;
  color: var(--kpi-text);
  font-weight: 700;
}

.kpi-subtitle {
  margin: 0;
  color: var(--kpi-muted);
}

/* ===== Channels checkbox grid ===== */
.kpi-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

/* Each checkbox card */
.kpi-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 12px;
  border-radius: 14px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);

  cursor: pointer;
  user-select: none;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.kpi-check span {
  color: var(--kpi-text);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.2px;
  font-weight: 600;
}

/* Accessible focus ring */
.kpi-check:focus-within {
  border-color: rgba(102, 240, 194, 0.45);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(102, 240, 194, 0.14);
}

/* Hover */
.kpi-check:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(
      600px 120px at 25% 0%,
      rgba(102, 240, 194, 0.1),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
}

/* Native checkbox -> custom */
.kpi-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;

  width: 18px;
  height: 18px;
  border-radius: 6px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.18);

  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

/* Check icon */
.kpi-check input[type="checkbox"]::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid rgba(11, 18, 32, 0.95);
  border-bottom: 2px solid rgba(11, 18, 32, 0.95);
  transform: rotate(-45deg) scale(0.85);
  opacity: 0;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

/* Checked state */
.kpi-check input[type="checkbox"]:checked {
  background: linear-gradient(
    180deg,
    var(--kpi-accent),
    rgba(102, 240, 194, 0.7)
  );
  border-color: rgba(102, 240, 194, 0.65);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
}

.kpi-check input[type="checkbox"]:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

/* Checked label card glow */
.kpi-check:has(input[type="checkbox"]:checked) {
  border-color: rgba(102, 240, 194, 0.28);
  background:
    radial-gradient(
      700px 140px at 20% 0%,
      rgba(102, 240, 194, 0.16),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
}

/* ===== Other channel name fields (same vibe as checkbox cards) ===== */

.kpi-grid-1 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.kpi-mt {
  margin-top: 40px;
}

.kpi-field {
  padding: 14px 14px 12px;
  border-radius: 16px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

/* same hover vibe */
.kpi-field:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(
      700px 140px at 25% 0%,
      rgba(102, 240, 194, 0.1),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
}

/* label matches muted + uppercase style */
.kpi-field label {
  display: block;
  margin-bottom: 8px;

  color: var(--kpi-muted);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.3px;
  font-weight: 700;
  text-transform: uppercase;
}

/* input styling */
.kpi-field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;

  border-radius: 12px;
  color: var(--kpi-text);

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);

  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.kpi-field input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* focus = green accent like checkbox */
.kpi-field input[type="text"]:focus {
  border-color: rgba(102, 240, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* card focus ring when clicking inside */
.kpi-field:focus-within {
  border-color: rgba(102, 240, 194, 0.3);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(102, 240, 194, 0.12);
}

/* keep spacing consistent with the checkbox grid */
.kpi-grid-2.kpi-mt {
  gap: 12px;
}

/* ===== Primary CTA button ===== */

.kpi-btn {
  appearance: none;
  border: 0 !important;
  cursor: pointer;

  width: 100%;
  min-height: 38px !important;
  padding: 14px 18px;

  border-radius: 14px;

  color: rgba(11, 18, 32, 0.96) !important;
  font-weight: 800;
  font-size: 14px !important;
  letter-spacing: 0.4px;
  text-transform: uppercase;

  background:
    radial-gradient(
      900px 220px at 20% 0%,
      rgba(255, 255, 255, 0.35),
      transparent 55%
    ),
    linear-gradient(180deg, var(--kpi-accent), rgba(102, 240, 194, 0.82));

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    0 10px 18px rgba(102, 240, 194, 0.12);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
  margin: 30px 0px !important;
}

.kpi-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.42),
    0 14px 22px rgba(102, 240, 194, 0.18);
}

.kpi-btn:active {
  transform: translateY(0px);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 8px 14px rgba(102, 240, 194, 0.1);
}

/* Keyboard focus */
.kpi-btn:focus-visible {
  outline: none;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(102, 240, 194, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

/* Disabled state */
.kpi-btn:disabled,
.kpi-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.15);
  transform: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

/* Optional: keep your existing spacing utility */
.kpi-btn.kpi-mt {
  margin-top: 14px;
}

/* ===============================
   Responsive fixes (NO outside padding)
   Put this at the END of CSS
================================ */

/* <= 640px */
@media (max-width: 640px) {
  /* no outside padding changes */
  .kpi-wrap {
    padding: 24px 0;
    /* keep as you want */
    max-width: 100%;
  }

  .kpi-shell {
    padding: 14px;
    border-radius: 18px;
  }

  .kpi-title h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .kpi-topbar {
    gap: 12px;
    margin-bottom: 10px;
  }

  .kpi-grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .kpi-check {
    padding: 12px;
    border-radius: 16px;
  }

  .kpi-field {
    padding: 14px;
    border-radius: 16px;
  }

  .kpi-field input[type="text"] {
    height: 46px;
  }

  /* override your big button margin on mobile */
  .kpi-btn {
    min-height: 52px;
    margin: 18px 0 !important;
    border-radius: 16px;
  }

  .kpi-mt {
    margin-top: 16px;
  }
}

/* <= 480px */
@media (max-width: 480px) {
  .kpi-shell {
    padding: 12px;
  }

  .kpi-title h2 {
    font-size: 22px;
  }

  .kpi-badge {
    font-size: 14px;
  }

  .kpi-check span {
    font-size: 13px;
  }

  .kpi-btn {
    font-size: 13px;
    letter-spacing: 0.35px;
    padding: 14px 14px;
  }
}

/* <= 360px */
@media (max-width: 360px) {
  .kpi-shell {
    padding: 11px;
    border-radius: 16px;
  }

  .kpi-title h2 {
    font-size: 20px;
  }

  .kpi-check {
    padding: 11px;
  }

  .kpi-field {
    padding: 12px;
  }

  .kpi-field label {
    font-size: 11px;
  }
}

/* <= 320px */
@media (max-width: 320px) {
  .kpi-shell {
    padding: 10px;
  }

  .kpi-title h2 {
    font-size: 19px;
  }

  .kpi-btn {
    min-height: 50px;
    padding: 13px 12px;
    margin: 16px 0 !important;
  }
}

/* =========================================================
   HANDSONTABLE: FORCE SOLID DARK EVERYWHERE (MASTER + CLONES)
========================================================= */

/* Outer container */
#kpiHotLeads.kpi-hot,
#kpiHotSales.kpi-hot {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--hot-base) !important;
}

#kpiHotLeads.kpi-hot.handsontable,
#kpiHotLeads.kpi-hot .handsontable,
#kpiHotLeads.kpi-hot .ht_master,
#kpiHotLeads.kpi-hot .ht_clone_top,
#kpiHotLeads.kpi-hot .ht_clone_left,
#kpiHotLeads.kpi-hot .ht_clone_top_left_corner,
#kpiHotLeads.kpi-hot .ht_clone_bottom,
#kpiHotLeads.kpi-hot .ht_clone_bottom_left_corner,
#kpiHotLeads.kpi-hot .wtHolder,
#kpiHotLeads.kpi-hot .wtHider,
#kpiHotLeads.kpi-hot .wtSpreader,
#kpiHotLeads.kpi-hot table,
#kpiHotLeads.kpi-hot table.htCore,
#kpiHotSales.kpi-hot.handsontable,
#kpiHotSales.kpi-hot .handsontable,
#kpiHotSales.kpi-hot .ht_master,
#kpiHotSales.kpi-hot .ht_clone_top,
#kpiHotSales.kpi-hot .ht_clone_left,
#kpiHotSales.kpi-hot .ht_clone_top_left_corner,
#kpiHotSales.kpi-hot .ht_clone_bottom,
#kpiHotSales.kpi-hot .ht_clone_bottom_left_corner,
#kpiHotSales.kpi-hot .wtHolder,
#kpiHotSales.kpi-hot .wtHider,
#kpiHotSales.kpi-hot .wtSpreader,
#kpiHotSales.kpi-hot table,
#kpiHotSales.kpi-hot table.htCore {
  background-color: var(--hot-base) !important;
  background: var(--hot-base) !important;
}

/* Borders */
#kpiHotLeads.kpi-hot .htCore td,
#kpiHotLeads.kpi-hot .htCore th,
#kpiHotSales.kpi-hot .htCore td,
#kpiHotSales.kpi-hot .htCore th {
  border-color: var(--hot-border) !important;
}

/* Headers (top header + row header) */
#kpiHotLeads.kpi-hot .htCore thead th,
#kpiHotLeads.kpi-hot .htCore tbody th,
#kpiHotSales.kpi-hot .htCore thead th,
#kpiHotSales.kpi-hot .htCore tbody th {
  background-color: var(--hot-head) !important;
  color: var(--kpi-text) !important;
  font-weight: 900 !important;
  border-bottom-color: var(--hot-border) !important;
}

/* Body cells */
#kpiHotLeads.kpi-hot .htCore td,
#kpiHotSales.kpi-hot .htCore td {
  background-color: var(--hot-cell) !important;
  color: var(--kpi-text) !important;
}

/* Make dimmed readable */
#kpiHotLeads.kpi-hot td.htDimmed,
#kpiHotLeads.kpi-hot th.htDimmed,
#kpiHotSales.kpi-hot td.htDimmed,
#kpiHotSales.kpi-hot th.htDimmed {
  color: var(--kpi-text) !important;
  opacity: 0.95 !important;
}

/* Hover */
#kpiHotLeads.kpi-hot .htCore tbody tr:hover td,
#kpiHotSales.kpi-hot .htCore tbody tr:hover td {
  background-color: var(--hot-cell-hover) !important;
}

/* Selection background */
#kpiHotLeads.kpi-hot .current,
#kpiHotLeads.kpi-hot .area,
#kpiHotLeads.kpi-hot .highlight,
#kpiHotSales.kpi-hot .current,
#kpiHotSales.kpi-hot .area,
#kpiHotSales.kpi-hot .highlight {
  background: rgba(102, 240, 194, 0.18) !important;
}

/* Metric column (your custom classes) */
#kpiHotLeads.kpi-hot .kpi-hot-metric,
#kpiHotSales.kpi-hot .kpi-hot-metric {
  background-color: #16213a !important;
  font-weight: 900 !important;
}

#kpiHotLeads.kpi-hot .kpi-hot-metric--leads,
#kpiHotSales.kpi-hot .kpi-hot-metric--leads {
  background-color: #1a363a !important;
}

#kpiHotLeads.kpi-hot .kpi-hot-metric--pipe,
#kpiHotSales.kpi-hot .kpi-hot-metric--pipe {
  background-color: #1f2a44 !important;
}

/* Column header dropdown button visibility */
#kpiHotLeads.kpi-hot button.changeType,
#kpiHotSales.kpi-hot button.changeType {
  opacity: 0.9 !important;
  filter: invert(1) grayscale(1) !important;
}

/* Editor textarea */
#kpiHotLeads.kpi-hot textarea.handsontableInput,
#kpiHotSales.kpi-hot textarea.handsontableInput {
  background: #0b1220 !important;
  color: var(--kpi-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
}

/* Total column highlight */
#kpiHotLeads.kpi-hot .kpi-hot-total,
#kpiHotSales.kpi-hot .kpi-hot-total {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--kpi-accent) !important;
}

#kpiHotLeads.kpi-hot .kpi-hot-total-row {
  background-color: rgba(138, 166, 255, 0.14) !important;
  color: var(--kpi-text) !important;
  font-weight: 900 !important;
}

/* Sticky first column (Day / Month label) */
#kpiHotLeads .htCore th:first-child,
#kpiHotLeads .htCore td:first-child,
#kpiHotSales .htCore th:first-child,
#kpiHotSales .htCore td:first-child,
#kpiHotMonthly .htCore th:first-child,
#kpiHotMonthly .htCore td:first-child {
  /* position: sticky !important; */
  left: 0 !important;
  z-index: 1 !important;
}
/* Fix: prevent fixed column clone from overlapping site header */
#kpiHotLeads .ht_clone_left,
#kpiHotSales .ht_clone_left,
#kpiHotMonthly .ht_clone_left {
  z-index: 1 !important;
}
/* #kpiHotLeads.kpi-hot,
#kpiHotSales.kpi-hot,
#kpiHotMonthly.kpi-hot {
  overflow: hidden;
  position: relative;
} */
/* Fix: keep top-left corner header below site nav */
#kpiHotLeads .ht_clone_top_left_corner,
#kpiHotSales .ht_clone_top_left_corner,
#kpiHotMonthly .ht_clone_top_left_corner,
#kpiHotLeads .ht_clone_top,
#kpiHotSales .ht_clone_top,
#kpiHotMonthly .ht_clone_top {
  z-index: 1 !important;
}

#kpiHotLeads .htCore th:first-child,
#kpiHotSales .htCore th:first-child {
  background-color: var(--hot-head) !important;
}

/* #kpiHotMonthly .htCore th:first-child {
  background-color: #1a363a !important;
} */

#kpiHotMonthly .htCore td:first-child {
  background-color: #243e38 !important;
  padding: 10px;
}

/* Optional: widen container on that page */
.page-id-1736 #main-content .container,
.page-id-1736 #main-content .container {
  max-width: 100%;
}

.page-id-1736 h1.entry-title {
  display: none;
}

/* =========================
   KPI layout fixes (cards + rows)
   Paste at very bottom
========================= */

/* Cards grid (Totals / Key Stats / Spreadsheet) */
/* =========================
   KPI CARDS (Totals / Key Stats / Spreadsheet)
========================= */

.kpi-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}

/* Card shell */
.kpi-card {
  position: relative;
  border-radius: 18px;
  padding: 16px 16px 14px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(
      700px 220px at 15% 0%,
      rgba(102, 240, 194, 0.1),
      transparent 55%
    ),
    radial-gradient(
      700px 220px at 85% 10%,
      rgba(138, 166, 255, 0.1),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.02)
    );

  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);

  overflow: hidden;
}

/* subtle top highlight line */
.kpi-card::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  opacity: 0.7;
}

/* Title */
.kpi-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

/* Key-value rows */
.kpi-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 10px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.14);
}

.kpi-kv:last-child {
  border-bottom: none;
}

/* Left label */
.kpi-kv span {
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
}

/* Right value */
.kpi-kv strong {
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
}

/* Add a tiny “pill” background behind values for premium look */
.kpi-kv strong {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hint card (Spreadsheet) */
.kpi-card--hint {
  background:
    radial-gradient(
      900px 260px at 15% 0%,
      rgba(102, 240, 194, 0.14),
      transparent 58%
    ),
    radial-gradient(
      900px 260px at 85% 10%,
      rgba(138, 166, 255, 0.14),
      transparent 58%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
}

.kpi-card--hint p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.45;
}

/* List styling */
.kpi-card--hint ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.kpi-card--hint li {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

/* bullet dot */
.kpi-card--hint li::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(102, 240, 194, 0.85);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
  flex: 0 0 auto;
}

.kpi-card--hint strong {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Responsive */
@media (max-width: 980px) {
  .kpi-cards {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    border-radius: 16px;
  }
}

/* Month picker + tabs alignment (top right) */
.kpi-controls {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.kpi-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.kpi-tab {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--kpi-text);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none !important;
}

.kpi-tab:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: #fff;
}
.kpi-tab.is-active {
  background: linear-gradient(
    135deg,
    rgba(102, 240, 194, 0.2),
    rgba(138, 166, 255, 0.18)
  );
  border-color: rgba(255, 255, 255, 0.24);
}

.kpi-hot {
  margin-top: 10px;
}

/* =========================================================
   HANDSONTABLE: MONTHLY - MATCH ACTIVITY TABLE STYLES
========================================================= */

/* ======= my custom ======== */


/* .wtSpreader {
    width: 100% !important;
}
.wtHider {
    height: 100% !important;
    width: 100% !important;
}
.wtHolder {
    width: 100% !important;
}
table.htCore {
    width: 100% !important;
} */

#kpiSettingsDrawer{
  top: 150px !important;
  height: calc(-150px + 100dvh) !important;
}

/* Add premium shadow to Activity table container */

/* Force solid base bg on master + clones */
#kpiHotMonthly.handsontable,
#kpiHotMonthly .handsontable,
#kpiHotMonthly .ht_master,
#kpiHotMonthly .ht_clone_top,
#kpiHotMonthly .ht_clone_left,
#kpiHotMonthly .ht_clone_top_left_corner,
#kpiHotMonthly .ht_clone_bottom,
#kpiHotMonthly .ht_clone_bottom_left_corner,
#kpiHotMonthly .wtHolder,
#kpiHotMonthly .wtHider,
#kpiHotMonthly .wtSpreader,
#kpiHotMonthly table,
#kpiHotMonthly table.htCore {
  background-color: var(--hot-base) !important;
  background: var(--hot-base) !important;
}

/* Borders */
#kpiHotMonthly .htCore td,
#kpiHotMonthly .htCore th {
  border-color: var(--hot-border) !important;
}

/* Headers */
#kpiHotMonthly .htCore thead th,
#kpiHotMonthly .htCore tbody th {
  background-color: var(--hot-head) !important;
  color: var(--kpi-text) !important;
  font-weight: 900 !important;
}

/* Body cells */
#kpiHotMonthly .htCore td {
  background-color: var(--hot-cell) !important;
  color: var(--kpi-text) !important;
}

/* Dimmed readable */
#kpiHotMonthly td.htDimmed,
#kpiHotMonthly th.htDimmed {
  color: var(--kpi-text) !important;
  opacity: 0.95 !important;
}

/* Hover */
#kpiHotMonthly .htCore tbody tr:hover td {
  background-color: var(--hot-cell-hover) !important;
}

/* Selection */
#kpiHotMonthly .current,
#kpiHotMonthly .area,
#kpiHotMonthly .highlight {
  background: rgba(102, 240, 194, 0.18) !important;
}

/* Metric column (your custom classes) */
#kpiHotMonthly .kpi-hot-metric {
  background-color: #16213a !important;
  font-weight: 900 !important;
}

/* Emphasis rows (optional but nice) */
#kpiHotMonthly .kpi-hot-metric--emph {
  background-color: rgba(138, 166, 255, 0.16) !important;
}

/* Editor input (even though monthly is read-only, safe) */
#kpiHotMonthly textarea.handsontableInput {
  background: #0b1220 !important;
  color: var(--kpi-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px !important;
}

.hot-display-license-info {
  display: none !important;
}

/* =========================
   Year Selector Dropdown
========================= */

.kpi-year-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-year-selector label {
  color: var(--kpi-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.kpi-year-selector select,
#kpiFyStartSelect {
  appearance: none;
  -webkit-appearance: none;
  width: 120px;
  height: 44px;
  padding: 0 36px 0 14px;
  border-radius: 12px;
  color: var(--kpi-text);
  background: rgba(255, 255, 255, 0.04)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.65)' d='M2 4l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.kpi-year-selector select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.06);
}

.kpi-year-selector select:focus {
  border-color: rgba(102, 240, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.kpi-year-selector select option {
  background: #0b1220;
  color: var(--kpi-text);
}

/* =========================
   Activity Year/Month Select Group
========================= */

.kpi-control-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.kpi-select-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-select-control label {
  color: var(--kpi-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.kpi-select-control select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 100px;
  height: 44px;
  padding: 0 36px 0 14px;
  border-radius: 12px;
  color: var(--kpi-text);
  background: rgba(255, 255, 255, 0.04)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.65)' d='M2 4l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.kpi-select-control select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.06);
}

.kpi-select-control select:focus {
  border-color: rgba(102, 240, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.kpi-select-control select option {
  background: #0b1220;
  color: var(--kpi-text);
}

/* Month select should be wider */
#kpiMonthSelectActivity {
  min-width: 140px;
}

@media (max-width: 980px) {
  .kpi-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .kpi-tabs {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .kpi-control-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .kpi-select-control {
    width: 100%;
  }

  .kpi-select-control select {
    width: 100%;
  }

  #kpiMonthSelectActivity {
    min-width: 100%;
  }
}

/* =========================
   Summary Flex Layout (Responsive)
========================= */

.kpi-summary-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}

.kpi-summary-flex .kpi-card--summary {
  flex: 1 1 300px;
  min-width: 280px;
}

@media (max-width: 980px) {
  .kpi-summary-flex {
    flex-direction: column;
  }

  .kpi-summary-flex .kpi-card--summary {
    flex: 1 1 100%;
  }
}

/* =========================
   Settings Button
========================= */

.kpi-settings-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  color: var(--kpi-text) !important;
  transition: all 0.15s ease;
}

.kpi-settings-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.kpi-settings-btn:focus {
  outline: none;
  border-color: rgba(102, 240, 194, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14) !important;
}

/* =========================
   Settings Drawer
========================= */

.kpi-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 9998;
  pointer-events: none;
}

.kpi-drawer-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.kpi-drawer {
  position: fixed;
  /* top & height set dynamically by JS to clear admin bar + site header */
  top: 90px;
  right: 0;
  width: 100%;
  max-width: clamp(260px, 38vw, 380px);
  height: calc(100dvh - 110px);
  background: #132724;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  border-radius: 22px 0 0 22px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease;
  display: flex;
  flex-direction: column;
}

.kpi-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .kpi-drawer {
    max-width: 100%;
    border-left: none;
    border-radius: 22px 22px 0 0;
    top: auto !important;
    bottom: 0;
    height: 90dvh !important;
    transform: translateY(100%);
  }
  .kpi-drawer.is-open {
    transform: translateY(0);
  }
}

.kpi-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kpi-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--kpi-text);
}

.kpi-drawer-close {
  appearance: none;
  border: none !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  color: var(--kpi-text) !important;
  cursor: pointer;
  transition: background 0.15s ease !important;
}

.kpi-drawer-close:hover {
  background: rgba(255, 255, 255, 0.14) !important;
}

.kpi-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.06);
}

.kpi-drawer-body::-webkit-scrollbar {
  width: 6px;
}

.kpi-drawer-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.kpi-drawer-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.2));
  border-radius: 999px;
}

.kpi-drawer-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(102,240,194,0.6), rgba(102,240,194,0.35));
}

.kpi-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #132724;
    flex-shrink: 0;
    justify-content: center;
    display: flex;
    gap: 10px;
}

.kpi-drawer-hint {
  margin: 0 0 16px;
  color: var(--kpi-muted);
  font-size: 13px;
}

.kpi-drawer-checks {
  display: grid;
  gap: 10px;
}

.kpi-drawer-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.kpi-drawer-check:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.kpi-drawer-check:has(input:checked) {
  background: rgba(102, 240, 194, 0.12);
  border-color: rgba(102, 240, 194, 0.3);
}

.kpi-drawer-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.kpi-drawer-check input[type="checkbox"]:checked {
  background: linear-gradient(
    180deg,
    var(--kpi-accent),
    rgba(102, 240, 194, 0.75)
  );
  border-color: var(--kpi-accent);
}

.kpi-drawer-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid rgba(11, 18, 32, 0.95);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.kpi-drawer-check span {
  color: var(--kpi-text);
  font-size: 14px;
  font-weight: 600;
}

.kpi-drawer-fields {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.kpi-drawer-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--kpi-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kpi-drawer-field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--kpi-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.kpi-drawer-field input[type="text"]:focus {
  border-color: rgba(102, 240, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
}

.kpi-drawer-submit {
  width: 100%;
  border: none !important;
  color: #000 !important;
}
.kpi-drawer-submit:hover{
  color: #000000 !important;
}

/* Mobile drawer full width */
@media (max-width: 400px) {
  .kpi-drawer {
    max-width: 100%;
    right: -100%;
  }
}

/* =========================
   Card spacing fix
========================= */

.kpi-mb {
  margin-bottom: 16px;
}

/* Save button in table header */
.kpi-btn--save {
  width: auto;
  min-height: 40px;
  padding: 10px 20px;
  margin: 0 !important;
  font-size: 13px;
  border: none !important;
}

.kpi-savebar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 4px 0 12px;
}

.kpi-btn--save-bar {
  min-height: 40px;
  padding: 8px 18px;
  white-space: nowrap;
  color: #000 !important;
  font-size: 14px !important;
}

/* =========================
   Monthly Grid Section Headers
========================= */

#kpiHotMonthly .kpi-hot-section {
  background-color: rgba(102, 240, 194, 0.12) !important;
  color: var(--kpi-accent) !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(102, 240, 194, 0.25) !important;
}

#kpiHotMonthly .kpi-hot-metric--total {
  background-color: rgba(138, 166, 255, 0.14) !important;
  color: var(--kpi-accent2) !important;
}

#kpiHotMonthly .kpi-hot-num--total {
  background-color: rgba(138, 166, 255, 0.08) !important;
  font-weight: 800;
}

#kpiHotMonthly .kpi-hot-empty {
  background-color: transparent !important;
  border-color: transparent !important;
  height: 20px;
}

#kpiHotMonthly .kpi-hot-summary {
  background-color: rgba(255, 255, 255, 0.04) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
}

/* Hot header row styling */
#kpiHotMonthly .htCore thead th {
  white-space: nowrap;
  font-size: 12px;
  padding: 3px 8px !important;
  vertical-align: middle !important;
}

/* Adjust monthly hot head layout */
.kpi-hot-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.kpi-hot-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--kpi-text);
}

.kpi-hot-head p {
  margin: 0;
}

/* =========================
   Active Months Row (code row)
========================= */

.kpi-code-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  flex-wrap: wrap;
}

.kpi-code-months {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.kpi-code-month {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--kpi-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kpi-code-month:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.kpi-code-month:has(input:checked) {
  background: rgba(102, 240, 194, 0.14);
  border-color: rgba(102, 240, 194, 0.35);
  color: var(--kpi-accent);
}

.kpi-code-month input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
}

.kpi-code-month input[type="checkbox"]:checked {
  background: linear-gradient(
    180deg,
    var(--kpi-accent),
    rgba(102, 240, 194, 0.75)
  );
  border-color: var(--kpi-accent);
}

.kpi-code-month input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid rgba(11, 18, 32, 0.95) !important;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.kpi-btn--ghost {
  width: auto;
  min-height: 40px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--kpi-text) !important;
  font-size: 12px;
  padding-top: 40px;
}

.kpi-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Responsive */
@media (max-width: 640px) {
  .kpi-hot-head {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-year-selector {
    width: 100%;
  }

  .kpi-year-selector select {
    width: 100%;
  }

  .kpi-code-row {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-code-months {
    justify-content: center;
  }

  .kpi-btn--ghost {
    width: 100%;
  }
}

/* NEW SHIT */

/* =========================================================
   CHANNEL EDITOR (Setup + Settings) — Scoped + Non-overridable
   REQUIREMENT:
   - Setup (#kpiChannelEditor) = 2 columns desktop, 1 column mobile
   - Settings (#kpiChannelEditor_global) = ALWAYS 1 column,
#kpiChannelEditor_period) = ALWAYS 1 column
   - Every selector MUST start with #kpiChannelEditor or #kpiChannelEditor_global / #kpiChannelEditor_period
========================================================= */

/* -------------------------
   GRID LAYOUT
------------------------- */

/* Setup editor: 2 columns */
#kpiChannelEditor.kpi-channel-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

/* Setup editor: mobile 1 column */
@media (max-width: 640px) {
  #kpiChannelEditor.kpi-channel-editor {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Settings editor: ALWAYS 1 column */
#kpiChannelEditor_global.kpi-channel-editor,
#kpiChannelEditor_period.kpi-channel-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

/* -------------------------
   ROW CARD (matches old vibe)
------------------------- */

#kpiChannelEditor .kpi-channel-row,
#kpiChannelEditor_global .kpi-channel-row,
#kpiChannelEditor_period .kpi-channel-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 9px 9px;
  border-radius: 14px;

  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);

  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

#kpiChannelEditor .kpi-channel-row:hover,
#kpiChannelEditor_global .kpi-channel-row:hover,
#kpiChannelEditor_period .kpi-channel-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(
      600px 120px at 25% 0%,
      rgba(102, 240, 194, 0.1),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
}

#kpiChannelEditor .kpi-channel-row:focus-within,
#kpiChannelEditor_global .kpi-channel-row:focus-within,
#kpiChannelEditor_period .kpi-channel-row:focus-within {
  border-color: rgba(102, 240, 194, 0.35);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(102, 240, 194, 0.12);
}

/* Active glow */
#kpiChannelEditor .kpi-channel-row:has(.kpi-channel-active:checked),
#kpiChannelEditor_global .kpi-channel-row:has(.kpi-channel-active:checked),
#kpiChannelEditor_period .kpi-channel-row:has(.kpi-channel-active:checked) {
  border-color: rgba(102, 240, 194, 0.28);
  background:
    radial-gradient(
      700px 140px at 20% 0%,
      rgba(102, 240, 194, 0.16),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
}

/* -------------------------
   CHECKBOX (custom)
------------------------- */

#kpiChannelEditor .kpi-channel-active,
#kpiChannelEditor_global .kpi-channel-active,
#kpiChannelEditor_period .kpi-channel-active {
  appearance: none;
  -webkit-appearance: none;

  width: 18px;
  height: 18px;
  border-radius: 6px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.18);

  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;

  cursor: pointer;
}

#kpiChannelEditor .kpi-channel-active::after,
#kpiChannelEditor_global .kpi-channel-active::after,
#kpiChannelEditor_period .kpi-channel-active::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid rgba(11, 18, 32, 0.95);
  border-bottom: 2px solid rgba(11, 18, 32, 0.95);
  transform: rotate(-45deg) scale(0.85);
  opacity: 0;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

#kpiChannelEditor .kpi-channel-active:checked,
#kpiChannelEditor_global .kpi-channel-active:checked,
#kpiChannelEditor_period .kpi-channel-active:checked {
  background: linear-gradient(
    180deg,
    var(--kpi-accent),
    rgba(102, 240, 194, 0.7)
  );
  border-color: rgba(102, 240, 194, 0.65);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
}

#kpiChannelEditor .kpi-channel-active:checked::after,
#kpiChannelEditor_global .kpi-channel-active:checked::after,
#kpiChannelEditor_period .kpi-channel-active:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

/* -------------------------
   INPUT (channel name)
------------------------- */

#kpiChannelEditor .kpi-channel-name,
#kpiChannelEditor_global .kpi-channel-name,
#kpiChannelEditor_period .kpi-channel-name {
  flex: 1;
  height: 44px;
  padding: 0 12px;

  border-radius: 12px;
  color: var(--kpi-text);

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);

  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.kpi-drawer-editor .kpi-channel-editor .kpi-channel-row .kpi-channel-name{
  height: 36px !important;
  font-size: 0.9rem !important;
}
.kpi-drawer-editor .kpi-channel-editor .kpi-channel-row .kpi-channel-remove{
  height: 36px !important;
  min-height: 36px !important;
}

.kpi-drawer{
  z-index: 9999 !important;
}

#kpiChannelEditor .kpi-channel-name::placeholder,
#kpiChannelEditor_global .kpi-channel-name::placeholder,
#kpiChannelEditor_period .kpi-channel-name::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

#kpiChannelEditor .kpi-channel-name:focus,
#kpiChannelEditor_global .kpi-channel-name:focus,
#kpiChannelEditor_period .kpi-channel-name:focus {
  border-color: rgba(102, 240, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* -------------------------
   REMOVE BUTTON (compact)
------------------------- */

#kpiChannelEditor .kpi-channel-remove,
#kpiChannelEditor_global .kpi-channel-remove,
#kpiChannelEditor_period .kpi-channel-remove {
  width: auto !important;
  min-height: 36px !important;
  height: 40px;
  padding: 0 14px !important;
  margin: 0 !important;

  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--kpi-text);

  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;

  box-shadow: none;
  transition: all 0.15s ease;

  cursor: pointer;
}

#kpiChannelEditor .kpi-channel-remove:hover,
#kpiChannelEditor_global .kpi-channel-remove:hover,
#kpiChannelEditor_period .kpi-channel-remove:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* -------------------------
   ADD CHANNEL BUTTON spacing
------------------------- */

#kpiAddChannel,
#kpiAddChannel_settings {
  margin-top: 12px !important;
}

#kpiFyStartSelect option {
  color: #000;
}

/* ==========================================================
   ISSUE 1 — Per-period Channel Prompt Banner
========================================================== */

.kpi-period-banner {
  margin: 0 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(102, 240, 194, 0.28);
  background:
    radial-gradient(
      800px 160px at 0% 0%,
      rgba(102, 240, 194, 0.1),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.02)
    );
  padding: 14px 16px;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.kpi-period-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.kpi-period-banner-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.45;
}

.kpi-period-banner-text strong {
  color: var(--kpi-accent);
}

.kpi-period-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.kpi-banner-btn {
  appearance: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 8px 14px;
  white-space: nowrap;
  transition: all 0.15s ease;
  line-height: 1;
}

.kpi-banner-btn--primary {
  background: linear-gradient(
    180deg,
    var(--kpi-accent),
    rgba(102, 240, 194, 0.82)
  ) !important;
  color: rgba(11, 18, 32, 0.95) !important;
  border: none !important;
  box-shadow: 0 6px 18px rgba(102, 240, 194, 0.18) !important;
}

.kpi-banner-btn--primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.kpi-banner-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.kpi-banner-btn--ghost {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: var(--kpi-text) !important;
}

.kpi-banner-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.kpi-banner-btn--dismiss {
  background: transparent !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.kpi-banner-btn--dismiss:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.8) !important;
}

.kpi-drawer-hint-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: rgba(138, 166, 255, 0.18);
  border: 1px solid rgba(138, 166, 255, 0.3);
  color: var(--kpi-accent2);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .kpi-period-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .kpi-period-banner-actions {
    justify-content: flex-start;
  }
}


/* ==========================================================
   ISSUE 2 — FY View Toggle (Monthly tab)
========================================================== */

.kpi-fy-toggle-wrap {
  display: flex;
  align-items: center;
  
}

.kpi-fy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.15s ease;
  height: 44px;
}

.kpi-fy-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.kpi-fy-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.kpi-fy-toggle-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  flex-shrink: 0;
}

.kpi-fy-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.kpi-fy-toggle input[type="checkbox"]:checked ~ .kpi-fy-toggle-track {
  background: linear-gradient(
    135deg,
    var(--kpi-accent),
    rgba(102, 240, 194, 0.75)
  );
  border-color: var(--kpi-accent);
}

.kpi-fy-toggle input[type="checkbox"]:checked ~ .kpi-fy-toggle-track::after {
  transform: translateX(16px);
  background: rgba(11, 18, 32, 0.9);
}

.kpi-fy-toggle-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--kpi-muted);
  text-transform: uppercase;
  letter-spacing: 0.35px;
  white-space: nowrap;
}

.kpi-fy-toggle-label em {
  font-style: normal;
  color: var(--kpi-accent);
  margin-left: 4px;
}

/* ==========================================================
   ISSUE 3 — Charts Tab
========================================================== */

.kpi-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.kpi-chart-card {
  background:
    radial-gradient(
      600px 200px at 10% 0%,
      rgba(102, 240, 194, 0.08),
      transparent 60%
    ),
    radial-gradient(
      600px 200px at 90% 10%,
      rgba(138, 166, 255, 0.08),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.015)
    );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 18px 18px 14px;
  position: relative;
  overflow: hidden;
}

.kpi-chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
}

.kpi-chart-card h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.88);
}

/* Full-width card (revenue chart spans both columns) */
.kpi-chart-card--full {
  grid-column: 1 / -1;
}

.kpi-chart-wrap {
  position: relative;
  width: 100%;
}

/* Donut chart: constrain height */
.kpi-chart-card:not(.kpi-chart-card--full) .kpi-chart-wrap {
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Revenue chart: taller */
.kpi-chart-card--full .kpi-chart-wrap {
  max-height: 280px;
}

.kpi-chart-wrap canvas {
  max-height: 100% !important;
}

@media (max-width: 860px) {
  .kpi-charts-grid {
    grid-template-columns: 1fr;
  }

  .kpi-chart-card--full {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .kpi-chart-card {
    padding: 14px 14px 12px;
  }
}

/* =========================================================
   UX v2: Drawer Tabs
========================================================= */
.kpi-dtabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 10px;
  padding: 4px;
}

.kpi-dtab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 7px;
  background: transparent;
  border: none !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.kpi-dtab.is-active {
  background: rgba(255, 255, 255, 0.11) !important;
  color: #fff !important;
}

.kpi-dtab:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.kpi-dtab-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  background: #66f0c2;
  color: #0b1220;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* =========================================================
   UX v2: Delete Confirmation Modal
========================================================= */
.kpi-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.kpi-modal-backdrop.is-visible {
  display: flex;
}

.kpi-modal-box {
  background: #111b31;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 28px 28px 24px;
  max-width: 440px;
  width: calc(100% - 32px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
}

.kpi-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
}

.kpi-modal-body {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}

.kpi-modal-body strong {
  color: #fff;
}

.kpi-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.kpi-btn--danger {
  background: #c53030;
  color: #fff;
  border: none;
}

.kpi-btn--danger:hover {
  background: #9b2c2c;
}

#kpiDeleteConfirmBtn{
  background: radial-gradient(
      900px 220px at 20% 0%,
      rgba(255, 255, 255, 0.35),
      transparent 54%
    ),
    linear-gradient(180deg, var(--kpi-accent), rgba(102, 240, 194, 0.82)) !important;
}

/* =========================================================
   UX v2: Auto-save Status Indicator
========================================================= */
.kpi-autosave-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.kpi-autosave-status:not(:empty) {
  opacity: 1;
}

.kpi-autosave-status--saving {
  color: rgba(255, 255, 255, 0.55);
}

.kpi-autosave-status--saved {
  color: #66f0c2;
}

.kpi-autosave-status--error {
  color: #ff6b6b;
}

/* =========================================================
   UX v2: Tooltips
========================================================= */
[data-kpi-tip] {
  position: relative;
}

[data-kpi-tip]::after {
  content: attr(data-kpi-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2845;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: normal;
  max-width: 240px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 200;
}

[data-kpi-tip]:hover::after {
  opacity: 1;
}

#kpiHotLeads.kpi-hot .htCore thead th,
#kpiHotLeads.kpi-hot .htCore tbody th,
#kpiHotSales.kpi-hot .htCore thead th,
#kpiHotSales.kpi-hot .htCore tbody th {
  background-color: var(--hot-cell-bg) !important;
  color: #fff !important;
  padding-top: 6px;
}

.wtHider {
    height: 100% !important;
}

#kpiHotLeads.kpi-hot .htCore td.cell-bg-color,
#kpiHotSales.kpi-hot .htCore td.cell-bg-color {
  background-color: #243e38 !important;
  cursor: pointer;
  padding: 10px;
}

#kpiHotLeads.kpi-hot .htCore tbody tr:hover td,
#kpiHotSales.kpi-hot .htCore tbody tr:hover td {
  background-color: var(--hot-cell-bg) !important;
}

#kpiHotMonthly td.htDimmed,
#kpiHotMonthly th.htDimmed {
  background-color: #14332a !important;
  padding-top: 10px;
  height: 36px !important;
}
#kpiHotMonthly .htCore thead th {
  background-color: #132724 !important;
}
/* #kpiHotMonthly .htCore thead th:hover {background-color: #81d3c7 !important;} */

#kpiHotLeads.kpi-hot .htCore tr:hover .cell-bg-color,
#kpiHotSales.kpi-hot .htCore tr:hover .cell-bg-color {
  background-color: var(--hot-cell-hover) !important;
}

/* =========================================================
   Team Management
========================================================= */

.kpi-member-name-msg--ok    { color: var(--kpi-accent); }
.kpi-member-name-msg--error { color: #ff8a8a; }

/* Member switcher in topbar — matches .kpi-select-control style */
.kpi-member-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-member-switcher label {
  color: var(--kpi-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  white-space: nowrap;
}

.kpi-member-switcher select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 140px;
  height: 44px;
  padding: 0 36px 0 14px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.45)' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 12px center,
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: var(--kpi-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.kpi-member-switcher select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(255, 255, 255, 0.06);
}

.kpi-member-switcher select:focus {
  border-color: rgba(102, 240, 194, 0.55);
  box-shadow: 0 0 0 3px rgba(102, 240, 194, 0.14);
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.kpi-member-switcher select option {
  background: #0b1220;
  color: var(--kpi-text);
}

/* Read-only savebar */
.kpi-savebar--readonly {
  background: transparent;
  border-top: none;
  justify-content: flex-start;
}

.kpi-savebar--readonly .kpi-autosave-status {
  color: var(--kpi-muted);
  font-size: 12px;
  font-style: italic;
}

/* Team tab content */
.kpi-team-upgrade {
  padding: 24px 0 8px;
  color: var(--kpi-muted);
  font-size: 14px;
}

.kpi-team-upgrade p {
  margin-bottom: 16px;
}

.kpi-team-usage {
  padding: 16px 0 12px;
}

.kpi-team-usage-label {
  font-size: 13px;
  color: var(--kpi-muted);
  margin-bottom: 8px;
}

.kpi-team-usage-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.kpi-team-usage-fill {
  height: 100%;
  background: var(--kpi-accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.kpi-team-invite {
  padding: 20px 0 16px;
  border-top: 1px solid var(--kpi-border);
}

.kpi-team-invite h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--kpi-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.kpi-team-invite-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.kpi-team-email-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  color: var(--kpi-text);
  font-size: 14px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s;
}

.kpi-team-email-input:focus {
  border-color: var(--kpi-accent);
}

.kpi-team-email-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.kpi-team-msg {
  font-size: 13px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
}

.kpi-team-msg--ok {
  background: rgba(102, 240, 194, 0.1);
  color: var(--kpi-accent);
  border: 1px solid rgba(102, 240, 194, 0.2);
}

.kpi-team-msg--error {
  background: rgba(255, 90, 90, 0.1);
  color: #ff8a8a;
  border: 1px solid rgba(255, 90, 90, 0.2);
}

/* Team members list */
.kpi-team-list {
  padding-top: 20px;
  border-top: 1px solid var(--kpi-border);
  margin-top: 4px;
}

.kpi-team-list h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--kpi-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.kpi-team-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-team-row {
  display: grid;
  grid-template-columns: 1fr 100px 110px 180px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.kpi-team-row--head span:nth-child(2),
.kpi-team-row--head span:nth-child(3),
.kpi-team-row--head span:nth-child(4) {
  text-align: center !important;
}

.kpi-team-row--head {
  background: rgba(255,255,255,0.04);
  color: var(--kpi-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
}

.kpi-team-row:not(.kpi-team-row--head) {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
}

.kpi-team-row:not(.kpi-team-row--head):hover {
  background: rgba(255,255,255,0.04);
}

.kpi-team-email {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.kpi-team-email small {
  color: var(--kpi-muted);
  font-size: 11px;
}

.kpi-team-date {
  color: var(--kpi-muted);
  font-size: 12px;
  text-align: center !important;
}

/* All cells */
.handsontable td,
.handsontable th {
  height: 36px !important;
  line-height: 36px !important;
}

/* Status badges */
.kpi-team-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-align: center;
}

.kpi-team-status--active {
  background: rgba(102, 240, 194, 0.12);
  color: var(--kpi-accent);
  border: 1px solid rgba(102, 240, 194, 0.25);
}

.kpi-team-status--pending {
  background: rgba(255, 200, 100, 0.1);
  color: #ffc864;
  border: 1px solid rgba(255, 200, 100, 0.2);
}

.kpi-team-status--disabled {
  background: rgba(255,255,255,0.05);
  color: var(--kpi-muted);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Action buttons in the team table */

/* .kpi-team-actions{
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 3px 8px !important;
  border-radius: 20px !important;
  text-align: center !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
} */
/* .kpi-team-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
} */
 .kpi-team-actions {
    display: flex;
    gap: 0px !important;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 5px !important;
}

.kpi-team-action {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14) !important;
  border-radius: 20px !important;
  color: var(--kpi-text) !important;
  cursor: pointer;
  font-size: 11px !important;
  padding: 4px 20px !important;
  transition: background 0.15s, border-color 0.15s;
  font-weight: 700 !important;
}
[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover {
    background-color: inherit !important;
    color: #fff ;
}

.kpi-btn--ghost {
    margin: 0 !important;
}
.kpi-btn--ghost:hover{
  color: #ffffff !important;
}

.kpi-drawer-submit{
      margin: 0px !important;
}

.kpi-team-action:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.24) !important;
}

.kpi-team-action--disable:hover {
  background: rgba(255, 180, 50, 0.12) !important;
  border-color: rgba(255, 180, 50, 0.3) !important;
  color: #ffb432;
}

.kpi-team-action--enable:hover {
  background: rgba(102, 240, 194, 0.12);
  border-color: rgba(102, 240, 194, 0.3);
  color: var(--kpi-accent);
}

.kpi-team-action--remove:hover {
  background: rgba(255, 80, 80, 0.12);
  border-color: rgba(255, 80, 80, 0.3);
  color: #ff7070;
}

.kpi-team-pending-label {
  font-size: 11px;
  color: var(--kpi-muted);
  font-style: italic;
}

@media (max-width: 680px) {
  .kpi-team-row {
    grid-template-columns: 1fr 80px;
    grid-template-rows: auto auto;
  }

  .kpi-team-date {
    display: none;
  }

  .kpi-team-actions {
    grid-column: 1 / -1;
  }
}
