/* v9.12 Call Tracking - scoped to #callTrackingRoot; uses the portal's existing tokens where present */
#callTrackingRoot .ct-filters .toolbar { flex-wrap: wrap; gap: 10px; align-items: flex-end; }
#callTrackingRoot .ct-q { flex: 1 1 200px; }
#callTrackingRoot .ct-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 12px 0; border-bottom: 1px solid var(--border, #e2e8f0); -webkit-overflow-scrolling: touch; }
#callTrackingRoot .ct-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font: inherit; color: var(--muted, #64748b); cursor: pointer; white-space: nowrap; }
#callTrackingRoot .ct-tab.active { color: var(--text, #0f172a); border-bottom-color: var(--primary, #2563eb); font-weight: 600; }
#callTrackingRoot .ct-kpis { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
#callTrackingRoot .ct-kpi-hint { font-size: 11.5px; color: var(--muted, #64748b); margin-top: 4px; line-height: 1.3; }
#callTrackingRoot .kpi.ct-warn .kpi-val { color: #dc2626; }
#callTrackingRoot .kpi.ct-na .kpi-val { font-size: 15px; color: var(--muted, #64748b); }
#callTrackingRoot .ct-charts { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
#callTrackingRoot .ct-chart { width: 100%; height: auto; display: block; }
#callTrackingRoot .ct-grid { stroke: var(--border, #e2e8f0); stroke-width: 1; }
#callTrackingRoot .ct-axis { font-size: 10px; fill: var(--muted, #64748b); }
#callTrackingRoot .ct-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted, #64748b); margin-top: 6px; }
#callTrackingRoot .ct-legend i, #callTrackingRoot .ct-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
#callTrackingRoot .ct-dot { border-radius: 50%; }
#callTrackingRoot .ct-hbars { display: grid; gap: 6px; }
#callTrackingRoot .ct-hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
#callTrackingRoot .ct-hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#callTrackingRoot .ct-hbar-t { background: var(--surface-2, #f1f5f9); border-radius: 4px; height: 12px; overflow: hidden; }
#callTrackingRoot .ct-hbar-t span { display: block; height: 100%; border-radius: 4px; }
#callTrackingRoot .ct-click { cursor: pointer; }
#callTrackingRoot .ct-click:hover td { background: var(--surface-2, #f8fafc); }
#callTrackingRoot .ct-unmapped td { color: var(--muted, #64748b); font-style: italic; }
#callTrackingRoot .ct-mob { white-space: nowrap; font-variant-numeric: tabular-nums; }
#callTrackingRoot .ct-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
#callTrackingRoot .ct-subtabs .active { background: var(--primary, #2563eb); color: #fff; }
#callTrackingRoot .ct-listhead { margin-bottom: 8px; }
#callTrackingRoot .ct-pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
#callTrackingRoot .ct-pager .filter-select { width: auto; }
#callTrackingRoot .ct-sync { font-size: 12px; }
#callTrackingRoot .ct-current { background: #dcfce7; color: #166534; }
#callTrackingRoot .ct-partial { background: #fef9c3; color: #854d0e; }
#callTrackingRoot .ct-delayed, #callTrackingRoot .ct-no_data { background: #fee2e2; color: #991b1b; }
#callTrackingRoot .ct-kv { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#callTrackingRoot .ct-kv th { text-align: left; font-weight: 500; color: var(--muted, #64748b); padding: 6px 12px 6px 0; vertical-align: top; width: 40%; }
#callTrackingRoot .ct-kv td { padding: 6px 0; word-break: break-word; }
#callTrackingRoot .ct-legs, #callTrackingRoot .ct-lim { margin: 6px 0 12px 18px; padding: 0; font-size: 13.5px; }
#callTrackingRoot .ct-lim li { margin-bottom: 6px; }
#callTrackingRoot .ct-drawer { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 1000; display: flex; justify-content: flex-end; }
#callTrackingRoot .ct-drawer[hidden] { display: none; }
#callTrackingRoot .ct-drawer-in { background: var(--surface, #fff); width: min(480px, 100%); height: 100%; overflow-y: auto; padding: 18px; box-shadow: -8px 0 24px rgba(0, 0, 0, .12); }
#callTrackingRoot .ct-drawer-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#callTrackingRoot .ct-print-only { display: none; }
@media (max-width: 640px) {
  #callTrackingRoot .ct-filters .field { flex: 1 1 45%; }
  #callTrackingRoot .ct-charts { grid-template-columns: 1fr; }
  #callTrackingRoot .ct-kpis { grid-template-columns: repeat(2, 1fr); }
  #callTrackingRoot .ct-pager { justify-content: center; }
}
@media print {
  body.ct-printing * { visibility: hidden; }
  body.ct-printing #callTrackingRoot .ct-print, body.ct-printing #callTrackingRoot .ct-print * { visibility: visible; }
  body.ct-printing #callTrackingRoot .ct-print { position: absolute; left: 0; top: 0; width: 100%; }
  body.ct-printing #callTrackingRoot .ct-print-only { display: block; }
}
