/* ── base ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  font-size: .9rem;
}

/* ── navbar ──────────────────────────────────────────────────────────────── */
.main-navbar {
  background: linear-gradient(135deg, #0a1628 0%, #0d2045 60%, #0f265a 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .6rem 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .95rem;
  box-shadow: 0 2px 10px rgba(59,130,246,.45);
}

.brand-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: -.01em;
}

.brand-highlight {
  color: #60a5fa;
}

.nav-pill {
  color: rgba(255,255,255,.65) !important;
  font-weight: 500;
  font-size: .85rem;
  padding: .4rem .85rem !important;
  border-radius: 8px;
  transition: all .18s;
  letter-spacing: .01em;
}

.nav-pill:hover {
  color: #fff !important;
  background: rgba(255,255,255,.09);
}

.nav-pill.active {
  color: #fff !important;
  background: rgba(59,130,246,.25);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.4);
}

/* dropdown */
.dropdown-menu-dark-custom {
  background: #0d1f40;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: .4rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  min-width: 180px;
}

.dropdown-menu-dark-custom .dropdown-item {
  color: rgba(255,255,255,.75);
  border-radius: 7px;
  padding: .5rem .85rem;
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
}

.dropdown-menu-dark-custom .dropdown-item:hover {
  background: rgba(59,130,246,.2);
  color: #fff;
}

/* user chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50px;
  padding: .3rem .75rem .3rem .35rem;
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.user-name {
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  font-weight: 500;
}

.role-badge {
  font-size: .68rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.role-badge.role-admin   { background: rgba(239,68,68,.2);  color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }
.role-badge.role-manager { background: rgba(245,158,11,.2); color: #fcd34d; border: 1px solid rgba(245,158,11,.3); }
.role-badge.role-oz      { background: rgba(99,102,241,.2); color: #a5b4fc; border: 1px solid rgba(99,102,241,.3); }
.role-badge.role-o2      { background: rgba(16,185,129,.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }

.btn-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  border-radius: 8px;
  text-decoration: none;
  transition: all .18s;
  font-size: 1rem;
}

.btn-logout:hover {
  color: #fff;
  background: rgba(239,68,68,.2);
}

/* ── sticky header wrapper ────────────────────────────────────────────────── */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.main-navbar {
  position: static !important;
}

/* ── navbar filter bar ────────────────────────────────────────────────────── */
.navbar-filterbar {
  background: linear-gradient(135deg, #0d1f40 0%, #0f265a 100%);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(0,0,0,.2);
  padding: .45rem 1.5rem;
}

.nfb-inner {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  flex-wrap: nowrap;
}

.nfb-field {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  min-width: 0;
}

.nfb-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.35);
  padding-left: .1rem;
  white-space: nowrap;
}

.nfb-search { position: relative; }

.nfb-search-icon {
  position: absolute;
  left: .6rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.3);
  font-size: .78rem;
  pointer-events: none;
}

.nfb-input {
  width: 200px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: .82rem;
  padding: .32rem .7rem .32rem 1.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color .15s, background .15s;
}
.nfb-input::placeholder { color: rgba(255,255,255,.28); }
.nfb-input:focus { outline: none; background: rgba(255,255,255,.11); border-color: rgba(59,130,246,.6); }

.nfb-select {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: .82rem;
  padding: .32rem .6rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  width: 140px;
}
.nfb-select option { background: #0d1f40; color: #e2e8f0; }
.nfb-select:focus   { outline: none; border-color: rgba(59,130,246,.6); background: rgba(255,255,255,.11); }

.nfb-btn-clear {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: .8rem;
  transition: all .15s;
}
.nfb-btn-clear:hover { background: rgba(239,68,68,.2); color: #fca5a5; border-color: rgba(239,68,68,.3); }

.nfb-count {
  margin-left: auto;
  color: rgba(255,255,255,.3);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  padding-bottom: .1rem;
}

/* ── sticky table header ─────────────────────────────────────────────────── */
.table-scroll-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-h, 110px) - 2.5rem);
}
.sticky-thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
  box-shadow: 0 1px 0 #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-scroll-wrap .ndv-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}

/* ── page wrapper ─────────────────────────────────────────────────────────── */
.page-wrapper {
  padding: 1.25rem 1.5rem;
  padding-top: calc(var(--header-h, 110px) + 1.25rem);
}

.alert-modern {
  border-radius: 10px;
  border: none;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

/* ── page title ───────────────────────────────────────────────────────────── */
.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.02em;
}

/* filter-bar removed — filters are now in the navbar */

/* ── main card / table ────────────────────────────────────────────────────── */
.main-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  overflow: hidden;
}

.table {
  margin: 0;
}

.table thead th {
  background: #f8fafc;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  padding: .75rem .85rem;
  border-bottom: 1.5px solid #f1f5f9;
  white-space: nowrap;
}

.table tbody td {
  padding: .38rem .85rem;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
  color: #334155;
  white-space: nowrap;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover td {
  background: #fafcff;
}

.customer-name {
  font-weight: 500;
  color: #0f172a;
  font-size: .8rem;
}

.text-phone {
  color: #3b82f6;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 400;
}

.text-phone:hover { text-decoration: underline; }

/* service badges */
.svc-badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .52rem;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-right: .2rem;
}
.svc-post { background: #dbeafe; color: #1d4ed8; }
.svc-tv   { background: #fef9c3; color: #854d0e; }
.svc-dsl  { background: #f3e8ff; color: #6b21a8; }

/* ── inline editing ───────────────────────────────────────────────────────── */
.inline-select,
.inline-date {
  border: 1.5px solid transparent;
  background: transparent;
  padding: .28rem .55rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color .15s;
  min-width: 120px;
  color: #64748b;
}

.inline-select:hover,
.inline-date:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.inline-select:focus,
.inline-date:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.inline-date { min-width: 138px; }

/* status colours */
.inline-select.status-ok  { color: #166534; background: #dcfce7; border-color: #bbf7d0; font-weight: 600; }
.inline-select.status-nd1 { color: #854d0e; background: #fef9c3; border-color: #fef08a; font-weight: 600; }
.inline-select.status-nd2 { color: #9a3412; background: #ffedd5; border-color: #fed7aa; font-weight: 600; }
.inline-select.status-nd3 { color: #991b1b; background: #fee2e2; border-color: #fecaca; font-weight: 600; }

/* meeting */
.inline-select.meet-yes   { color: #166534; background: #dcfce7; border-color: #bbf7d0; font-weight: 600; }
.inline-select.meet-no    { color: #991b1b; background: #fee2e2; border-color: #fecaca; font-weight: 600; }
.inline-select.meet-phone { color: #1e40af; background: #dbeafe; border-color: #bfdbfe; font-weight: 600; }

/* offer / nabídka */
.inline-select.offer-yes  { color: #166534; background: #dcfce7; border-color: #bbf7d0; font-weight: 600; }
.inline-select.offer-no   { color: #991b1b; background: #fee2e2; border-color: #fecaca; font-weight: 600; }

/* stav */
.inline-select.stav-prodej    { color: #166534; background: #dcfce7; border-color: #bbf7d0; font-weight: 600; }
.inline-select.stav-rozjednano { color: #1e40af; background: #dbeafe; border-color: #bfdbfe; font-weight: 600; }
.inline-select.stav-nezajem   { color: #991b1b; background: #fee2e2; border-color: #fecaca; font-weight: 600; }

/* prodej */
.inline-select.prodej-yes       { color: #166534; background: #dcfce7; border-color: #bbf7d0; font-weight: 600; }
.inline-select.prodej-no        { color: #991b1b; background: #fee2e2; border-color: #fecaca; font-weight: 600; }
.inline-select.prodej-rozjednano{ color: #1e40af; background: #dbeafe; border-color: #bfdbfe; font-weight: 600; }

/* ANO/NE select v nedovolávkách – kompaktní šířka */
.ndv-ano-select { width: 68px !important; min-width: 0 !important; }

/* Selects v kontaktech – auto šířka dle obsahu */
.inline-select.inline-prodej,
.inline-select.inline-meeting,
.inline-select.inline-status,
.inline-select.inline-stav { width: auto !important; min-width: 0 !important; }

/* Menší font + auto šířka sloupců dle obsahu */
.table-small-text td,
.table-small-text th { font-size: .8125rem; white-space: nowrap; }
.table-small-text td.td-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.table-small-text td.td-notes { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* number + text inputs */
.inline-number,
.inline-text {
  border: 1.5px solid transparent;
  background: transparent;
  padding: .28rem .5rem;
  border-radius: 8px;
  font-size: .8rem;
  font-family: 'Inter', sans-serif;
  color: #334155;
  transition: all .15s;
}
.inline-number { width: 72px; text-align: center; }
.inline-text   { width: 110px; }

.inline-number:hover, .inline-text:hover { border-color: #cbd5e1; background: #f8fafc; }
.inline-number:focus, .inline-text:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.inline-number::placeholder, .inline-text::placeholder { color: #cbd5e1; }

/* save feedback */
.inline-date.saving { opacity: .45; }
.inline-select.saved,  .inline-date.saved  { border-color: #22c55e !important; background: #f0fdf4 !important; }
.inline-select.save-error, .inline-date.save-error { border-color: #ef4444 !important; background: #fef2f2 !important; }

/* edit btn */
.btn-edit {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
  padding: 0;
}

.btn-edit:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #eff6ff;
}

/* empty state */
.empty-state {
  padding: 3.5rem 1rem;
  text-align: center;
  color: #94a3b8;
}

.empty-state i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: .75rem;
  opacity: .4;
}

/* count badge */
.count-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 50px;
}

/* ── modal ────────────────────────────────────────────────────────────────── */
.modal-modern {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}

.modal-modern .modal-header {
  background: #f8fafc;
  border-bottom: 1.5px solid #f1f5f9;
  padding: 1.1rem 1.4rem;
}

.form-control-modern {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .875rem;
  transition: border-color .15s, box-shadow .15s;
}

.form-control-modern:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.contact-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  padding: .85rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1.5px solid #f1f5f9;
}

.ci-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: #475569;
  font-weight: 500;
}

.ci-item i { color: #94a3b8; font-size: .85rem; }

.ls-1 { letter-spacing: .05em; }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 9px;
  font-weight: 600;
  font-size: .85rem;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  transition: all .18s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 14px rgba(37,99,235,.4);
  transform: translateY(-1px);
}

.btn-light {
  border-radius: 9px;
  font-weight: 500;
  font-size: .85rem;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  color: #475569;
}

.btn-light:hover { background: #e2e8f0; }

/* ── login ────────────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a1628 0%, #0d2045 50%, #1e3a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
}

.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(59,130,246,.4);
}

/* ── admin tables ─────────────────────────────────────────────────────────── */
.card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

.card-header-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #fff;
  border-bottom: 1.5px solid #f1f5f9;
  border-radius: 14px 14px 0 0;
}

/* ── performance page ─────────────────────────────────────────────────────── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 1rem;
}
@media (max-width: 768px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } }

.kpi-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  border: 1.5px solid #f1f5f9;
  transition: transform .18s, box-shadow .18s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.09);
}
.kpi-highlight { border-color: #fecaca; background: linear-gradient(135deg,#fff5f5,#fff); }

.kpi-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.04em;
  line-height: 1;
}
.kpi-label {
  font-size: .78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .2rem;
}
.kpi-sub {
  font-size: .75rem;
  color: #94a3b8;
  margin-top: .15rem;
}

.chart-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.chart-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 1100px) { .chart-grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 768px)  { .chart-grid-3, .chart-grid-2 { grid-template-columns: 1fr; } }

.chart-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  border: 1.5px solid #f1f5f9;
  overflow: hidden;
}
.chart-header {
  padding: .85rem 1.1rem;
  border-bottom: 1.5px solid #f1f5f9;
}
.chart-title {
  font-size: .875rem;
  font-weight: 700;
  color: #0f172a;
}
.chart-body {
  padding: 1.25rem;
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.chart-body canvas { max-height: 100%; }

.chart-body-3col {
  display: flex;
  align-items: center;
  padding: .75rem 1rem;
  min-height: 200px;
  gap: 1rem;
}
.donut-wrap {
  flex: 0 0 140px;
  width: 140px;
  height: 140px;
  position: relative;
}
.donut-wrap canvas {
  width: 140px !important;
  height: 140px !important;
}
.chart-leg-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: flex-start;
}
.leg-row {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  min-height: 20px;
}
.leg-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.leg-label {
  color: #475569;
  white-space: nowrap;
}
.leg-count {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

/* ── column dropdown filters ─────────────────────────────────────────────── */
.th-filterable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.th-filterable:hover { background: #e2e8f0; }
.th-active { color: #2563eb; }
.cfp-arrow { font-size: .65rem; margin-left: .25rem; opacity: .6; }

.th-text-filter {
  display: block;
  margin-top: .25rem;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: .15rem .35rem;
  font-size: .71rem;
  color: #334155;
  background: #fff;
  font-weight: 400;
  outline: none;
}
.th-text-filter:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.15); }

/* dropdown panel */
.cfp {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  width: 240px;
  padding: .5rem 0;
}
.cfp-search-wrap { padding: .4rem .6rem; }
.cfp-search {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .8rem;
  outline: none;
}
.cfp-search:focus { border-color: #3b82f6; }
.cfp-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 0 .25rem;
}
.cfp-item {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .5rem;
  font-size: .82rem;
  color: #334155;
  cursor: pointer;
  border-radius: 5px;
}
.cfp-item:hover { background: #f1f5f9; }
.cfp-all { border-bottom: 1px solid #f1f5f9; margin-bottom: .25rem; font-weight: 600; }
.cfp-footer {
  display: flex;
  gap: .4rem;
  padding: .5rem .6rem 0;
  border-top: 1px solid #f1f5f9;
  margin-top: .25rem;
}
.cfp-ok {
  flex: 1;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: .3rem 0;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.cfp-ok:hover { background: #1d4ed8; }
.cfp-cancel {
  flex: 1;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 6px;
  padding: .3rem 0;
  font-size: .8rem;
  cursor: pointer;
}
.cfp-cancel:hover { background: #e2e8f0; }

/* ── active filter chips bar ─────────────────────────────────────────────── */
.filter-chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  padding: 0 0 .75rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 20px;
  padding: .18rem .5rem .18rem .7rem;
  font-size: .73rem;
  font-weight: 500;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-chip-label { font-weight: 700; margin-right: .1rem; }
.filter-chip-vals  { opacity: .85; overflow: hidden; text-overflow: ellipsis; }
.filter-chip-x {
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: .7rem;
  line-height: 1;
  opacity: .65;
  transition: opacity .15s, background .15s;
}
.filter-chip-x:hover { opacity: 1; background: #bfdbfe; }
.filter-chip-clear-all {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: .73rem;
  cursor: pointer;
  padding: .18rem .5rem;
  border-radius: 20px;
  transition: color .15s;
}
.filter-chip-clear-all:hover { color: #ef4444; }

/* badge on active column header */
.cfp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  font-size: .58rem;
  font-weight: 700;
  margin-left: .3rem;
  vertical-align: middle;
  line-height: 1;
}

/* text colours */
.text-purple { color: #8b5cf6 !important; }

/* progress bar in table */
.pct-bar-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: #475569;
}
.pct-bar {
  height: 6px;
  border-radius: 99px;
  min-width: 2px;
  transition: width .4s ease;
}
.pct-green  { background: #22c55e; }
.pct-purple { background: #8b5cf6; }
.pct-red    { background: #ef4444; }

.perf-num { font-weight: 700; font-size: .9rem; }

/* ── custom tooltip ───────────────────────────────────────────────────────── */
#note-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 320px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: .8rem;
  line-height: 1.5;
  padding: .6rem .9rem;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.15);
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  border: 1px solid rgba(255,255,255,.08);
}
#note-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── misc ─────────────────────────────────────────────────────────────────── */
code {
  background: #f1f5f9;
  color: #e11d48;
  padding: .1em .4em;
  border-radius: 5px;
  font-size: .83em;
}
