/* Dashboard → My Commission Plan (technician plan, Q4 2026). Tokens only; the
   dashboard dark theme redefines the semantic tokens, so no dark overrides. */
.cp .tech-plan {
  --tp-base: var(--cp-accent);
  --tp-extra: var(--cp-success);
  --tp-pace: color-mix(in srgb, var(--cp-accent) 28%, transparent);
  --tp-track: var(--surface-3, var(--cp-gray-10));
  margin: 0 0 var(--space-4, 16px);
  padding: var(--space-4, 16px) var(--space-5, 20px) var(--space-5, 20px);
  background: var(--surface);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm);
}
.cp .tech-plan-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2, 8px) var(--space-4, 16px);
  margin-bottom: var(--space-4, 16px);
}
.cp .tech-plan-title { display: flex; align-items: center; gap: var(--space-3, 12px); }
.cp .tech-plan-title h3 { margin: 0; font-size: var(--text-lg, 18px); font-weight: var(--weight-bold, 700); color: var(--content-1); }
.cp .tech-plan-chip {
  font-size: var(--text-xs, 12px); font-weight: var(--weight-semibold, 600);
  color: var(--cp-accent); background: var(--cp-accent-soft);
  padding: 2px var(--space-2, 8px); border-radius: 999px;
}
.cp .tech-plan-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2, 8px); font-size: var(--text-sm, 13px); color: var(--content-2); }
.cp .tech-plan-meta strong { color: var(--content-1); }
.cp .tech-plan-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--content-3); }
.cp .tech-plan-live { display: inline-flex; align-items: center; gap: 6px; color: var(--cp-success); font-weight: var(--weight-semibold, 600); }
.cp .tech-plan-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--cp-success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cp-success) 20%, transparent); }

.cp .tech-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4, 16px); }
@media (max-width: 1100px) { .cp .tech-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp .tech-plan-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .cp .tech-plan-grid { grid-template-columns: 1fr; } }

.cp .tech-plan-card {
  display: flex; flex-direction: column; gap: var(--space-2, 8px);
  padding: var(--space-4, 16px);
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md, 8px);
  min-width: 0;
}
.cp .tech-plan-card-label { font-size: var(--text-xs, 12px); font-weight: var(--weight-semibold, 600); text-transform: uppercase; letter-spacing: .04em; color: var(--content-3); }
.cp .tech-plan-big { font-size: 30px; line-height: 1.1; font-weight: var(--weight-bold, 700); color: var(--content-1); font-variant-numeric: tabular-nums; }
.cp .tech-plan-big small { font-size: var(--text-sm, 13px); font-weight: var(--weight-medium, 500); color: var(--content-2); margin-left: 4px; }
.cp .tech-plan-sub { font-size: var(--text-sm, 13px); color: var(--content-2); }
.cp .tech-plan-sub strong { color: var(--content-1); }

.cp .tech-plan-bar { position: relative; height: 12px; margin: 26px 0 4px; background: var(--tp-track); border-radius: 999px; }
.cp .tech-plan-bar.slim { height: 6px; margin: 2px 0; }
.cp .tech-plan-bar > span[class^="fill"] { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.cp .tech-plan-bar .fill-base { background: var(--tp-base); }
.cp .tech-plan-bar .fill-extra { background: var(--tp-extra); border-radius: 0 999px 999px 0; }
.cp .tech-plan-bar-threshold .fill-base { border-radius: 999px 0 0 999px; }
.cp .tech-plan-bar .fill-pace { background: repeating-linear-gradient(-45deg, var(--tp-pace) 0 6px, transparent 6px 10px); border-radius: 0 999px 999px 0; }
.cp .tech-plan-bar .marker { position: absolute; top: -6px; bottom: -6px; width: 2px; background: var(--content-1); }
.cp .tech-plan-bar .marker em {
  position: absolute; bottom: calc(100% + 4px); right: 0; white-space: nowrap;
  font-style: normal; font-size: 11px; font-weight: var(--weight-semibold, 600); color: var(--content-1);
}
.cp .tech-plan-bar .marker-2 em { bottom: auto; top: calc(100% + 4px); }
.cp .tech-plan-bar-goal { margin-bottom: 22px; }

.cp .tech-plan-legend { display: flex; flex-wrap: wrap; gap: var(--space-3, 12px); font-size: var(--text-xs, 12px); color: var(--content-2); }
.cp .tech-plan-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cp .tech-plan-legend .sw.base { background: var(--tp-base); }
.cp .tech-plan-legend .sw.extra { background: var(--tp-extra); }
.cp .tech-plan-legend .sw.pace { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--cp-accent) 55%, transparent) 0 3px, transparent 3px 5px); border: 1px solid color-mix(in srgb, var(--cp-accent) 40%, transparent); }

.cp .tech-plan-callout {
  margin-top: var(--space-1, 4px); padding: var(--space-2, 8px) var(--space-3, 12px);
  font-size: var(--text-sm, 13px); color: var(--content-1);
  border-radius: var(--radius-md, 8px);
  background: color-mix(in srgb, var(--cp-success) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--cp-success) 30%, transparent);
}
.cp .tech-plan-mini { margin-top: auto; padding-top: var(--space-2, 8px); border-top: 1px solid var(--border-1); }
.cp .tech-plan-mini-row { display: flex; justify-content: space-between; gap: var(--space-2, 8px); font-size: var(--text-sm, 13px); color: var(--content-2); }
.cp .tech-plan-mini-row strong { color: var(--content-1); font-variant-numeric: tabular-nums; }
.cp .tech-plan-mini small, .cp .tech-plan-goal small { font-size: var(--text-xs, 12px); color: var(--content-3); }

.cp .tech-plan-goals { display: grid; gap: var(--space-2, 8px); }
.cp .tech-plan-goal {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-3, 12px);
  padding: var(--space-2, 8px) var(--space-3, 12px); font-size: var(--text-sm, 13px); color: var(--content-2);
  background: var(--surface); border: 1px solid var(--border-1); border-radius: var(--radius-md, 8px);
}
.cp .tech-plan-goal strong { color: var(--content-1); font-variant-numeric: tabular-nums; }
.cp .tech-plan-goal-name { font-weight: var(--weight-bold, 700); color: var(--cp-accent); }
.cp .tech-plan-foot { margin-top: auto; padding-top: var(--space-2, 8px); border-top: 1px solid var(--border-1); font-size: var(--text-sm, 13px); color: var(--content-2); display: flex; gap: var(--space-2, 8px); align-items: center; }
.cp .tech-plan-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--content-inv); background: var(--cp-success); }

.cp .tech-plan-lines { margin: var(--space-1, 4px) 0 0; display: grid; gap: 6px; }
.cp .tech-plan-lines div { display: flex; justify-content: space-between; gap: var(--space-2, 8px); font-size: var(--text-sm, 13px); }
.cp .tech-plan-lines dt { color: var(--content-2); }
.cp .tech-plan-lines dd { margin: 0; color: var(--content-1); font-weight: var(--weight-semibold, 600); font-variant-numeric: tabular-nums; }
.cp .tech-plan-lines .pending dt, .cp .tech-plan-lines .pending dd { color: var(--content-3); font-weight: var(--weight-medium, 500); font-style: italic; }

.cp .tech-plan-tasks { margin-top: auto; padding-top: var(--space-2, 8px); border-top: 1px solid var(--border-1); display: grid; gap: var(--space-2, 8px); }
.cp .tech-plan-task { display: flex; gap: var(--space-2, 8px); align-items: flex-start; font-size: var(--text-sm, 13px); color: var(--content-1); }
.cp .tech-plan-task div { display: grid; }
.cp .tech-plan-task small { font-size: var(--text-xs, 12px); color: var(--content-3); }
.cp .tech-plan-task-icon { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--content-inv); background: var(--cp-warning); }
.cp .tech-plan-task-icon.ok { background: var(--cp-success); }

.cp .tech-plan-bar { margin-top: var(--space-2, 8px); }
.cp .tech-plan-bar.has-markers { margin-top: 26px; }
.cp .tech-plan-bar.has-two-markers { margin-bottom: 22px; }
.cp .tech-plan-callout.neutral {
  background: var(--surface);
  border-color: var(--border-1);
}
.cp .tech-plan-check.warn { background: var(--cp-warning); }
.cp .tech-plan-goal.reached .tech-plan-goal-name { color: var(--cp-success); }
.cp .tech-plan-card > .tech-plan-task { margin-top: var(--space-1, 4px); }
@media (prefers-reduced-motion: no-preference) {
  .cp .tech-plan-bar > span[class^="fill"] { transition: width var(--dur-base, 200ms) var(--ease-out, ease-out); }
}

/* Superadmin preview: pick which enrolled technician's card to see. */
.cp .tech-plan-title { flex-wrap: wrap; }
.cp .tech-plan-chip-preview { color: var(--content-2); background: var(--surface-2); border: 1px solid var(--border-1); }
.cp .tech-plan-preview { white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-2, 8px); font-size: var(--text-sm, 13px); color: var(--content-2); }
.cp .tech-plan-preview-select {
  min-height: 32px;
  padding: 0 var(--space-3, 12px);
  font: inherit;
  font-weight: var(--weight-semibold, 600);
  color: var(--content-1);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md, 8px);
}
.cp .tech-plan-preview-select:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cp .tech-plan-bar .marker.label-right em { right: auto; left: 0; }
/* Sales team goal card */
.cp .tech-plan-note { display: block; margin-top: auto; padding-top: var(--space-2, 8px); border-top: 1px solid var(--border-1); font-size: var(--text-xs, 12px); color: var(--content-3); }
