.platform-screen {
  position: relative;
  flex: 1;
  min-height: 19rem;
  padding: 0.875rem;
  overflow: hidden;
  background: #f7f7f7;
  border: 1px solid #f0efef;
  border-radius: 0.875rem;
  font-size: 11px;
  line-height: 1.3;
  color: #0a0a0a;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.pd {
  --t: 12s;
  position: relative;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pd b { font-weight: 600; }
.pd small { font-size: 9.5px; color: #6c6b6b; }
.pd-muted { color: #6c6b6b; }
.pd-green { color: #0c7d53; }

/* Timeline helpers. Base styles are the resting (final) state; keyframes hide
   elements until their cue so reduced-motion users see the finished screen. */
.pd-in-a, .pd-in-b, .pd-in-c, .pd-in-d, .pd-in-e,
.pd-until-a, .pd-until-d, .pd-until-e, .pd-in-b-out-c, .pd-in-d-out-e,
.pd-grow-b, .pd-dots-1, .pd-dots-2, .pd-dots-3, .pd-type, .pd-caret, .pd-tms-bar, .pd-cal-now, .pd-spin,
.pd-elig-stage, .pd-pay {
  animation-duration: var(--t);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pd-in-a { animation-name: pd-in-a; }
.pd-in-b { animation-name: pd-in-b; }
.pd-in-c { animation-name: pd-in-c; }
.pd-in-d { animation-name: pd-in-d; }
.pd-in-e { animation-name: pd-in-e; }
.pd-until-a { animation-name: pd-until-a; opacity: 0; }
.pd-until-d { animation-name: pd-until-d; opacity: 0; }
.pd-until-e { animation-name: pd-until-e; opacity: 0; }
.pd-in-b-out-c { animation-name: pd-in-b-out-c; opacity: 0; }
.pd-in-d-out-e { animation-name: pd-in-d-out-e; opacity: 0; }
.pd-grow-b { animation-name: pd-grow-b; transform-origin: bottom; }
.pd-dots-1 { animation-name: pd-dots-1; opacity: 0; }
.pd-dots-2 { animation-name: pd-dots-2; opacity: 0; }
.pd-dots-3 { animation-name: pd-dots-3; opacity: 0; }

.nb-panel[hidden] .pd,
.nb-panel[hidden] .pd * {
  animation-play-state: paused;
}

@keyframes pd-in-a {
  0%, 4% { opacity: 0; transform: translateY(6px); }
  8%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}
@keyframes pd-in-b {
  0%, 18% { opacity: 0; transform: translateY(6px); }
  22%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}
@keyframes pd-in-c {
  0%, 34% { opacity: 0; transform: translateY(6px); }
  38%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}
@keyframes pd-in-d {
  0%, 50% { opacity: 0; transform: translateY(6px); }
  54%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}
@keyframes pd-in-e {
  0%, 66% { opacity: 0; transform: translateY(6px); }
  70%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}
@keyframes pd-until-a {
  0%, 4% { opacity: 1; }
  6%, 100% { opacity: 0; }
}
@keyframes pd-until-d {
  0%, 50% { opacity: 1; }
  53%, 100% { opacity: 0; }
}
@keyframes pd-until-e {
  0%, 66% { opacity: 1; }
  69%, 100% { opacity: 0; }
}
@keyframes pd-in-b-out-c {
  0%, 18% { opacity: 0; transform: translateY(-4px); }
  22%, 32% { opacity: 1; transform: none; }
  36%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes pd-in-d-out-e {
  0%, 50% { opacity: 0; }
  52%, 66% { opacity: 1; }
  68%, 100% { opacity: 0; }
}
@keyframes pd-grow-b {
  0%, 16% { transform: scaleY(0); }
  32%, 96% { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}
@keyframes pd-dots-1 {
  0%, 10% { opacity: 0; }
  12%, 20% { opacity: 1; }
  22%, 100% { opacity: 0; }
}
@keyframes pd-dots-2 {
  0%, 40% { opacity: 0; }
  42%, 50% { opacity: 1; }
  52%, 100% { opacity: 0; }
}
@keyframes pd-dots-3 {
  0%, 58% { opacity: 0; }
  60%, 66% { opacity: 1; }
  68%, 100% { opacity: 0; }
}

/* Shared chrome */
.pd-ico {
  display: inline-block;
  width: 10px;
  height: 10px;
  vertical-align: -1px;
  background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat;
  mask: var(--m) center / contain no-repeat;
}
.pd-ico-video { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 13 5.2 3.1a.5.5 0 0 0 .8-.4V8.3a.5.5 0 0 0-.8-.4L16 11'/%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3C/svg%3E"); }
.pd-ico-building { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01'/%3E%3C/svg%3E"); }
.pd-ico-spark { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2l1.8 5.6L19.5 9l-5.7 1.4L12 16l-1.8-5.6L4.5 9l5.7-1.4z'/%3E%3Cpath d='M19 15l.9 2.6 2.6.9-2.6.9L19 22l-.9-2.6-2.6-.9 2.6-.9z'/%3E%3C/svg%3E"); }
.pd-ico-search { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.pd-ico-shield { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5z'/%3E%3C/svg%3E"); }
.pd-ico-chat { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 21l1.9-5.4A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }
.pd-ico-waves { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M2 8c2-2 4-2 6 0s4 2 6 0 4-2 6 0M2 14c2-2 4-2 6 0s4 2 6 0 4-2 6 0M2 20c2-2 4-2 6 0s4 2 6 0 4-2 6 0'/%3E%3C/svg%3E"); }
.pd-ico-cal { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E"); }
.pd-ico-clock { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6l4 2'/%3E%3C/svg%3E"); }
.pd-ico-card { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E"); }

.pd-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid #e6e5e5;
  background: #fff;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.5;
  color: #393737;
  white-space: nowrap;
}
.pd-badge--muted { color: #6c6b6b; background: #f7f7f7; }
.pd-badge--soft { background: #f0efef; border-color: #e6e5e5; color: #171717; }
.pd-badge--active { background: #e7f4ee; border-color: #cfe8db; color: #0c7d53; }
.pd-badge-swap {
  position: relative;
  display: inline-grid;
}
.pd-badge-swap > * { grid-area: 1 / 1; justify-self: start; }

.pd-check {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0c7d53;
  position: relative;
}
.pd-check::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1.5px;
  width: 3px;
  height: 5px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.pd-check--light { background: #fff; }
.pd-check--light::after { border-color: #0a0a0a; }

/* 1. Calendar */
.pd-cal-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 11.5px;
}
.pd-cal-head .pd-chev { color: #6c6b6b; font-size: 14px; line-height: 1; }
.pd-cal-date b { color: #6c6b6b; font-weight: 500; margin-left: 2px; }
.pd-cal-today {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: #0a0a0a;
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
}
.pd-cal-count {
  position: relative;
  height: 12px;
  margin-top: -4px;
  font-size: 9.5px;
  color: #6c6b6b;
}
.pd-cal-count > span { position: absolute; left: 0; top: 0; }
.pd-cal-week {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 9px;
  color: #6c6b6b;
}
.pd-cal-week span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pd-cal-week i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 600;
  color: #0a0a0a;
}
.pd-cal-week .is-today i { background: #0a0a0a; color: #fff; }
.pd-cal-day {
  --row: 2.9rem;
  position: relative;
  flex: 1;
  min-height: calc(var(--row) * 5);
  margin-top: 2px;
  border-top: 1px solid #ebeaea;
}
.pd-cal-hour {
  height: var(--row);
  border-bottom: 1px solid #ebeaea;
}
.pd-cal-hour span {
  position: absolute;
  left: 0;
  margin-top: -6px;
  font-size: 8.5px;
  color: #9a9999;
}
.pd-cal-now {
  position: absolute;
  left: 30px;
  right: 0;
  top: 0;
  height: 1px;
  background: #dc2626;
  animation-name: pd-cal-now;
  animation-timing-function: linear;
  z-index: 3;
}
.pd-cal-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #dc2626;
}
@keyframes pd-cal-now {
  0% { transform: translateY(calc(var(--row) * 0.35)); }
  96%, 100% { transform: translateY(calc(var(--row) * 3.6)); }
}
.pd-slot {
  position: absolute;
  left: 34px;
  right: 2px;
  top: calc(var(--row) * var(--top) + 2px);
  height: calc(var(--row) * var(--h) - 4px);
  padding: 4px 7px;
  border-radius: 6px;
  background: #171717;
  color: #fff;
  overflow: hidden;
  z-index: 2;
}
.pd-slot:has(.pd-slot-chip) .pd-slot-name { padding-right: 5.75rem; }
.pd-slot-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
}
.pd-slot-meta {
  display: block;
  font-size: 9px;
  line-height: 1.25;
  opacity: 0.8;
}
.pd-slot-chip {
  position: absolute;
  right: 6px;
  top: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pd-slot--personal {
  background: #e4e3e3;
  color: #171717;
}
.pd-slot--personal .pd-slot-meta { color: #393737; opacity: 1; }
.pd-slot--new { background: #0a0a0a; }
.pd-slot-chip .pd-ico { width: 8px; height: 8px; vertical-align: -0.5px; }

.pd-ico-mail { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E"); }

.pd-cal-pop,
.pd-cal-mail {
  position: absolute;
  right: 8px;
  top: calc(var(--row) * var(--top));
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(13.5rem, calc(100% - 3rem));
  padding: 8px 9px;
  border: 1px solid #e6e5e5;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 18px 36px -18px rgba(10, 10, 10, 0.35);
}
.pd-cal-pop-head,
.pd-cal-mail-head { display: flex; align-items: center; gap: 5px; font-size: 10.5px; }
.pd-cal-pop-head small,
.pd-cal-mail-head small { margin-left: auto; }
.pd-cal-pop-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 7px;
  border: 1px solid #ebeaea;
  border-radius: 6px;
  font-size: 10px;
}
.pd-cal-pop-field b { font-weight: 500; }
.pd-cal-pop-btn {
  align-self: flex-end;
  margin-top: 1px;
  padding: 2px 9px;
  border-radius: 6px;
  background: #0a0a0a;
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
}
.pd-cal-mail-body { font-size: 10.5px; line-height: 1.4; color: #393737; }
.pd-cal-mail-foot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 600;
  color: #6c6b6b;
}
.pd-cal-mail-foot .pd-spin { border-color: rgba(10, 10, 10, 0.15); border-top-color: #393737; }

/* 2. Revenue Management */
.pd-rcm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pd-rcm-title { font-weight: 600; font-size: 12px; }
.pd-rcm-range {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid #e6e5e5;
  background: #fff;
  font-size: 9.5px;
  color: #393737;
}
.pd-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 8px;
  overflow: hidden;
}
.pd-kpi {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 9px;
  border-right: 1px solid #f0efef;
  min-width: 0;
}
.pd-kpi:last-child { border-right: 0; }
.pd-kpi span { font-size: 9px; color: #6c6b6b; white-space: nowrap; }
.pd-kpi b { font-size: 13px; letter-spacing: -0.02em; }
.pd-kpi small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-rcm-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
}
.pd-chart,
.pd-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 9px;
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 8px;
  min-width: 0;
}
.pd-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
}
.pd-chart-head .pd-muted { font-weight: 500; font-size: 9px; }
.pd-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; font-weight: 500; color: #6c6b6b; }
.pd-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.pd-legend-dark { background: #171717; }
.pd-legend-light { background: #d9d8d8; }
.pd-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  flex: 1;
  min-height: 92px;
  align-items: end;
}
.pd-bar-pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  height: 100%;
  align-items: end;
  padding-bottom: 12px;
}
.pd-bar-pair span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  font-size: 8.5px;
  color: #6c6b6b;
}
.pd-bar {
  display: block;
  height: calc(var(--v) * 100%);
  border-radius: 3px 3px 0 0;
}
.pd-bar--dark { background: #171717; }
.pd-bar--light { background: #d9d8d8; }
.pd-action {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 5px 0;
  border-top: 1px solid #f0efef;
}
.pd-action:nth-of-type(2) { border-top: 0; }
.pd-action-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #f0efef;
  font-size: 9px;
  font-weight: 600;
}
.pd-action-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pd-action-copy b { font-size: 10px; }
.pd-action-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-meter {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 999px;
  background: #f0efef;
  overflow: hidden;
}
.pd-meter::after {
  content: "";
  display: block;
  height: 100%;
  width: calc(var(--v) * 100%);
  background: #393737;
  border-radius: 999px;
}
.pd-action-amt {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: -0.01em;
}
.pd-action-amt--swap { position: relative; display: inline-grid; }
.pd-action-amt--swap em { grid-area: 1 / 1; font-style: normal; justify-self: end; }
.pd-done {
  color: #0c7d53;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7f4ee;
  font-size: 9.5px;
  line-height: 1.6;
}

/* 3. Eligibility */
.pd-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  background: #fff;
  border: 1px solid #e6e5e5;
  border-radius: 7px;
  font-size: 10.5px;
}
.pd-search .pd-ico-search { color: #6c6b6b; width: 11px; height: 11px; }
.pd-search-text { display: inline-flex; align-items: center; }
.pd-type {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  max-width: 4.4em;
  animation-name: pd-type;
  animation-timing-function: steps(8, end);
}
@keyframes pd-type {
  0%, 4% { max-width: 0; }
  12%, 96% { max-width: 4.4em; }
  100% { max-width: 0; }
}
.pd-caret {
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-left: 1px;
  background: #0a0a0a;
  animation-name: pd-caret;
  animation-timing-function: steps(1, end);
}
@keyframes pd-caret {
  0%, 2% { opacity: 1; }
  3%, 5% { opacity: 0; }
  6%, 8% { opacity: 1; }
  9%, 11% { opacity: 0; }
  12%, 14% { opacity: 1; }
  15%, 100% { opacity: 0; }
}
.pd-search-ph {
  position: absolute;
  left: 26px;
  top: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  color: #9a9999;
  pointer-events: none;
}
.pd-results {
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  top: calc(0.875rem + 32px);
  z-index: 5;
  padding: 4px;
  background: #fff;
  border: 1px solid #e6e5e5;
  border-radius: 8px;
  box-shadow: 0 12px 28px -14px rgba(10, 10, 10, 0.25);
}
.pd-result {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 6px;
}
.pd-result.is-selected { background: #f0efef; }
.pd-result > span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.pd-result b { font-size: 10.5px; }
.pd-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #0a0a0a;
  color: #fff;
  font-style: normal;
  font-size: 9px;
  font-weight: 600;
}
.pd-plan {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 8px;
}
.pd-plan-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pd-plan-row .pd-ico-shield { width: 13px; height: 13px; color: #393737; }
.pd-plan-title { font-weight: 600; font-size: 11.5px; }
.pd-plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 9.5px;
  color: #6c6b6b;
}
.pd-plan-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-btn-swap { position: relative; display: inline-grid; }
.pd-btn-swap > * { grid-area: 1 / 1; }
.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  background: #0a0a0a;
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pd-btn--busy { background: #393737; }
.pd-btn--done { background: #fff; color: #0a0a0a; border: 1px solid #e6e5e5; }
.pd-spin {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation-name: pd-spin;
  animation-duration: 0.8s;
  animation-timing-function: linear;
  animation-fill-mode: none;
}
@keyframes pd-spin { to { transform: rotate(360deg); } }
.pd-link { font-size: 9.5px; font-weight: 600; color: #6c6b6b; }
.pd-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  padding-top: 7px;
  border-top: 1px solid #f0efef;
}
.pd-plan-grid span { display: flex; flex-direction: column; line-height: 1.25; }
.pd-plan-grid b { font-size: 10.5px; }

/* Eligibility plays first, then the patient payment-link page. */
.pd-elig-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  animation-name: elig-stage;
}
.pd-elig-stage > .pd-search,
.pd-elig-stage > .pd-plan {
  min-width: 0;
  max-width: 100%;
}
.pd-elig .pd-type { animation-name: elig-type; }
.pd-elig .pd-caret { animation-name: elig-caret; }
.pd-elig .pd-until-a { animation-name: elig-until-a; }
.pd-elig .pd-in-b-out-c { animation-name: elig-results; }
.pd-elig .pd-in-c { animation-name: elig-plan; }
.pd-elig .pd-until-d { animation-name: elig-until-d; }
.pd-elig .pd-in-d-out-e { animation-name: elig-checking; }
.pd-elig .pd-until-e { animation-name: elig-until-e; }
.pd-elig .pd-in-e { animation-name: elig-result; }
.pd-elig .pd-results {
  left: 0;
  right: 0;
  top: calc(28px + 0.5rem);
}
@keyframes elig-stage {
  0%, 64% { opacity: 1; }
  72%, 97% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes elig-type {
  0%, 2% { max-width: 0; }
  10%, 98% { max-width: 4.4em; }
  100% { max-width: 0; }
}
@keyframes elig-caret {
  0%, 2% { opacity: 1; }
  3%, 5% { opacity: 0; }
  6%, 8% { opacity: 1; }
  9%, 11% { opacity: 0; }
  12%, 100% { opacity: 0; }
}
@keyframes elig-until-a {
  0%, 2% { opacity: 1; }
  5%, 100% { opacity: 0; }
}
@keyframes elig-results {
  0%, 12% { opacity: 0; transform: translateY(-4px); }
  16%, 26% { opacity: 1; transform: none; }
  30%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes elig-plan {
  0%, 26% { opacity: 0; transform: translateY(6px); }
  30%, 100% { opacity: 1; transform: none; }
}
@keyframes elig-until-d {
  0%, 38% { opacity: 1; }
  41%, 100% { opacity: 0; }
}
@keyframes elig-checking {
  0%, 38% { opacity: 0; }
  41%, 48% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes elig-until-e {
  0%, 48% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@keyframes elig-result {
  0%, 48% { opacity: 0; transform: translateY(6px); }
  52%, 100% { opacity: 1; transform: none; }
}
@keyframes elig-pay {
  0%, 66% { opacity: 0; transform: translateY(8px); }
  74%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(8px); }
}

.pd-pay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation-name: elig-pay;
}
.pd-pay-card {
  width: 100%;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px 11px;
  background: #fff;
  border: 1px solid #e6e5e5;
  border-radius: 12px;
  box-shadow: 0 18px 36px -24px rgba(10, 10, 10, 0.35);
}
.pd-pay-head b { display: block; font-size: 13px; letter-spacing: -0.01em; }
.pd-pay-head p {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.35;
  color: #6c6b6b;
}
.pd-pay-visit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 8px;
  background: #f7f7f7;
}
.pd-pay-visit > b { font-size: 11px; }
.pd-pay-when {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  color: #6c6b6b;
  font-size: 10px;
}
.pd-pay-when span { display: inline-flex; align-items: center; gap: 4px; }
.pd-pay-when .pd-ico { width: 10px; height: 10px; }
.pd-pay-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid #e6e5e5;
  font-size: 10px;
  color: #6c6b6b;
}
.pd-pay-due b { color: #0a0a0a; font-size: 11px; }
.pd-pay-opt {
  padding: 7px 8px;
  border: 1px solid #e6e5e5;
  border-radius: 10px;
  background: #fff;
}
.pd-pay-opt.is-selected {
  border-color: #0a0a0a;
  background: #fafafa;
  box-shadow: 0 0 0 1px #0a0a0a;
}
.pd-pay-opt-top {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 12px;
  gap: 7px;
  align-items: center;
}
.pd-pay-opt-top > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pd-pay-opt-top b { font-size: 11px; }
.pd-pay-opt-top small { font-size: 9px; }
.pd-pay-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f0efef;
  color: #6c6b6b;
}
.pd-pay-opt.is-selected .pd-pay-ico { background: #e7e7e7; color: #0a0a0a; }
.pd-pay-ico .pd-ico { width: 12px; height: 12px; }
.pd-pay-opt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #f0efef;
  font-size: 10px;
  color: #6c6b6b;
}
.pd-pay-opt-foot b { color: #0a0a0a; font-size: 11px; }
.pd-pay-save {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 600;
  color: #0c7d53;
}
.pd-pay-go {
  justify-content: center;
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
}

/* 3a. Scribe and code suggestions */
.pd-cs-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #ebeaea;
  border-radius: 10px;
  background: #fff;
}
.pd-cs-note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.pd-cs-drafted {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a9898;
}
.pd-cs-note p { margin: 0; font-size: 11px; line-height: 1.45; color: #393737; }
.pd-cs-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border: 1px solid #e3e2e2;
  border-radius: 8px;
  background: linear-gradient(135deg, #fafafa 0%, #f3f3f3 55%, #fbfbfb 100%);
}
.pd-cs-shimmer {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9a9898, transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: pd-cs-shimmer 2.4s linear infinite;
}
@keyframes pd-cs-shimmer {
  from { background-position: -50% 0; }
  to { background-position: 150% 0; }
}
.pd-cs-head { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; }
.pd-cs-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(25, 25, 25, 0.08);
  color: #191919;
}
.pd-cs-spark .pd-ico { width: 9px; height: 9px; }
.pd-cs-title {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #191919;
  white-space: nowrap;
}
.pd-cs-count {
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(25, 25, 25, 0.08);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.6;
}
.pd-cs-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 9.5px; }
.pd-cs-actions.pd-badge-swap { display: inline-grid; }
.pd-cs-actions.pd-badge-swap > * { justify-self: end; }
.pd-cs-accept,
.pd-cs-added { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #191919; white-space: nowrap; }
.pd-cs-added { color: #0c7d53; }
.pd-cs-dismiss { color: #6c6b6b; white-space: nowrap; }
.pd-cs-tick {
  width: 7px;
  height: 4px;
  margin-top: -2px;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
.pd-cs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(25, 25, 25, 0.07);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.75);
}
.pd-cs-code {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(25, 25, 25, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 500;
  color: #191919;
}
.pd-cs-desc {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: #191919;
}
.pd-cs-rate,
.pd-cs-tier {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.7;
  white-space: nowrap;
}
.pd-cs-rate { border: 1px solid #a7dcc1; background: #eaf6ef; color: #0c6b47; }
.pd-cs-tier { border: 1px solid rgba(25, 25, 25, 0.16); background: rgba(25, 25, 25, 0.06); color: #191919; }
.pd-cs-tier--alt { border-color: #f1cf8a; background: #fdf4e2; color: #8a5a00; }
@media (max-width: 639px) {
  .pd-cs-dismiss { display: none; }
  .pd-cs-tier { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-cs-shimmer { animation: none; }
}

/* 3b. Interpreter */
.pd-ico-lang { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E"); }
.pd-ico-vol { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4zM15.5 8.5a5 5 0 0 1 0 7M19 5a10 10 0 0 1 0 14'/%3E%3C/svg%3E"); }
.pd-ico-ear { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0'/%3E%3Cpath d='M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4'/%3E%3C/svg%3E"); }
.pd-ico-skip { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 4 10 8-10 8zM19 5v14'/%3E%3C/svg%3E"); }

.pd-tr { gap: 0.5rem; }
.pd-tr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-tr-rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #393737;
}
.pd-tr-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d92d20;
  animation: pd-tr-rec 1.4s ease-in-out infinite;
}
@keyframes pd-tr-rec { 50% { opacity: 0.35; } }
.pd-tr-langs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid #e6e5e5;
  border-radius: 999px;
  background: #fff;
  font-size: 10px;
  color: #393737;
}
.pd-tr-langs small {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pd-tr-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 7px;
  border: 1px solid #ebeaea;
  border-radius: 8px;
  background: #fafafa;
}
.pd-tr-pair-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.pd-tr-pair-row small { font-weight: 500; }
.pd-tr-pair-row b {
  padding: 3px 8px;
  border: 1px solid #e6e5e5;
  border-radius: 6px;
  background: #fff;
  font-size: 10.5px;
  font-weight: 500;
}
.pd-tr-controls { display: flex; align-items: center; gap: 4px; }
.pd-tr-status { display: inline-grid; margin-right: auto; }
.pd-tr-status > * { grid-area: 1 / 1; justify-self: start; }
.pd-tr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #e6e5e5;
  border-radius: 999px;
  background: #fafafa;
  font-size: 10px;
  color: #6c6b6b;
  white-space: nowrap;
}
.pd-tr-pill--speak {
  border-color: #b9dcf3;
  background: #eef7fd;
  color: #1e5a85;
}
.pd-tr-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #6c6b6b;
}
.pd-tr-icon-btn .pd-ico { width: 11px; height: 11px; }
.pd-tr-turn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #ebeaea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px -24px rgba(10, 10, 10, 0.3);
}
.pd-tr-who { display: flex; align-items: center; gap: 6px; }
.pd-tr-chip {
  padding: 1px 6px;
  border-radius: 4px;
  background: #f0efef;
  font-size: 9.5px;
  font-weight: 600;
  color: #393737;
}
.pd-tr-chip--dr { background: #191919; color: #fff; }
.pd-tr-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; color: #9a9898; }
.pd-tr-turn p { margin: 0; font-size: 11.5px; line-height: 1.45; color: #191919; }
.pd-tr-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
  color: #6c6b6b;
}
.pd-tr-tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
  font-size: 8.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a9898;
}
@media (prefers-reduced-motion: reduce) {
  .pd-tr-rec-dot { animation: none; }
}

/* 4. Messaging */
.pd-msg {
  gap: 0;
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 36px -24px rgba(10, 10, 10, 0.3);
}
.pd-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-bottom: 1px solid #f0efef;
  background: #fff;
}
.pd-msg-title { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 11px; }
.pd-msg-title .pd-ico { width: 11px; height: 11px; }
.pd-msg-close { font-size: 14px; line-height: 1; color: #6c6b6b; }
.pd-msg-threads {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 10px;
  border-bottom: 1px solid #f0efef;
  background: #fafafa;
}
.pd-thread {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #e6e5e5;
  background: #fff;
  font-size: 9px;
  font-weight: 500;
  color: #393737;
  white-space: nowrap;
}
.pd-thread.is-active { background: #0a0a0a; border-color: #0a0a0a; color: #fff; }
.pd-msg-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 10px;
  min-height: 0;
}
.pd-bubble {
  max-width: 82%;
  padding: 6px 9px;
  border-radius: 11px;
  font-size: 10.5px;
  line-height: 1.3;
}
.pd-bubble p { margin: 0; }
.pd-bubble small { display: block; margin-top: 3px; font-size: 8.5px; }
.pd-bubble--in { align-self: flex-start; background: #f0efef; color: #0a0a0a; border-bottom-left-radius: 4px; }
.pd-bubble--in small { color: #6c6b6b; }
.pd-bubble--out { align-self: flex-end; background: #0a0a0a; color: #fff; border-bottom-right-radius: 4px; }
.pd-bubble--out small { color: rgba(255, 255, 255, 0.65); }
.pd-bubble--out em {
  display: inline-block;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-style: normal;
  font-weight: 600;
  color: #fff;
}
.pd-typing {
  align-self: flex-end;
  display: inline-flex;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 11px;
  background: #0a0a0a;
  margin-bottom: -6px;
}
.pd-typing i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  animation: pd-typing-dot 1s ease-in-out infinite;
}
.pd-typing i:nth-child(2) { animation-delay: 0.15s; }
.pd-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pd-typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-2px); opacity: 1; }
}
.pd-composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 10px 10px;
  padding: 0 4px 0 10px;
  height: 28px;
  border: 1px solid #e6e5e5;
  border-radius: 999px;
  font-size: 10px;
  color: #9a9999;
}
.pd-send {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #0a0a0a;
  position: relative;
}
.pd-send::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 5px;
  height: 5px;
  border: solid #fff;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}

/* 5. ePrescribing */
.pd-ico-pill { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 11h-4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h4M6 7v13a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7'/%3E%3Crect x='4' y='2' width='16' height='5' rx='1'/%3E%3C/svg%3E"); }

.pd-rx { gap: 0.625rem; }
.pd-rx-pop {
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 36px -26px rgba(10, 10, 10, 0.3);
}
.pd-rx-pop-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid #f0efef;
  background: #fafafa;
  font-size: 10.5px;
  font-weight: 600;
  color: #393737;
}
.pd-rx-pop-head .pd-ico { width: 11px; height: 11px; }
.pd-rx-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
}
.pd-rx-row + .pd-rx-row { border-top: 1px solid #f0efef; }
.pd-rx-row-ico {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 999px;
  background: #f0efef;
  color: #6c6b6b;
}
.pd-rx-row-ico .pd-ico { width: 10px; height: 10px; }
.pd-rx-row-ico--ctrl { color: #b42318; }
.pd-rx-row-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pd-rx-row-body > b { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; }
.pd-rx-row-meta { font-size: 9.5px; color: #6c6b6b; }
.pd-rx-row-meta em { font-style: normal; }
.pd-rx-sent { color: #0c7d53; font-weight: 600; }
.pd-rx-sched {
  padding: 0 4px;
  border: 1px solid rgba(180, 35, 24, 0.4);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
  color: #b42318;
}
.pd-rx-row-actions { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.pd-rx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: #6c6b6b;
}
.pd-rx-icon-btn .pd-ico { width: 11px; height: 11px; }
.pd-rx-primary {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid #e6e5e5;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  color: #393737;
}
.pd-rx-assign {
  padding: 1px 6px;
  border: 1px dashed #c9c8c8;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 600;
  color: #6c6b6b;
}
.pd-rx-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e6e5e5;
  border-radius: 10px;
  box-shadow: 0 18px 36px -26px rgba(10, 10, 10, 0.3);
}
.pd-rx-card-head { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.pd-rx-card-head small { margin-left: auto; }
.pd-rx-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d4a017;
}
.pd-rx-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.pd-rx-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pd-rx-field--wide { grid-column: span 2; }
.pd-rx-field--full { grid-column: 1 / -1; }
.pd-rx-field small {
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pd-rx-field b {
  display: block;
  padding: 4px 7px;
  border: 1px solid #e6e5e5;
  border-radius: 6px;
  background: #fff;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-rx-quote {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  color: #6c6b6b;
}
.pd-rx-quote span { opacity: 0.6; }
.pd-rx-actions { display: flex; align-items: center; gap: 10px; }
.pd-rx-approve { background: #fff; color: #0a0a0a; border: 1px solid #e6e5e5; }

/* 6. TMS chart */
.pd-tabs {
  display: flex;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ebeaea;
  overflow: hidden;
}
.pd-tabs span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 500;
  color: #6c6b6b;
  white-space: nowrap;
}
.pd-tabs .is-active { background: #0a0a0a; color: #fff; font-weight: 600; }
.pd-tabs .pd-ico { width: 9px; height: 9px; }
.pd-course {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 9px;
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 8px;
}
.pd-course-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}
.pd-course-sub { font-size: 9.5px; color: #6c6b6b; }
.pd-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.pd-progress-label {
  position: relative;
  display: inline-grid;
  min-width: 44px;
  font-size: 9.5px;
  font-weight: 600;
}
.pd-progress-label em { grid-area: 1 / 1; font-style: normal; }
.pd-progress-bar {
  display: block;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #f0efef;
  overflow: hidden;
}
.pd-tms-bar {
  display: block;
  height: 100%;
  width: 41.7%;
  border-radius: 999px;
  background: #0a0a0a;
  animation-name: pd-tms-bar;
}
@keyframes pd-tms-bar {
  0%, 6% { width: 0; }
  24%, 64% { width: 38.9%; }
  70%, 96% { width: 41.7%; }
  100% { width: 0; }
}
.pd-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.pd-stepper span {
  position: relative;
  padding-top: 8px;
  font-size: 8.5px;
  color: #6c6b6b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-stepper span::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: #e6e5e5;
}
.pd-stepper .is-done::before { background: #0a0a0a; }
.pd-stepper .is-current { color: #0a0a0a; font-weight: 600; }
.pd-stepper .is-current::before { background: #0a0a0a; opacity: 0.45; }
.pd-params {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.pd-params span {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 7px;
  line-height: 1.25;
}
.pd-params b { font-size: 10.5px; }
.pd-sessions {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 2px 9px;
  background: #fff;
  border: 1px solid #ebeaea;
  border-radius: 8px;
}
.pd-session {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #f0efef;
  font-size: 10px;
}
.pd-session:last-of-type { border-bottom: 0; }
.pd-session > span:not(.pd-badge-swap) { color: #393737; }
.pd-session-note {
  padding: 4px 0 5px;
  font-size: 9px;
  color: #6c6b6b;
}

@media (max-width: 639px) {
  .pd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-kpi { border-bottom: 1px solid #f0efef; }
  .pd-kpi:nth-child(even) { border-right: 0; }
  .pd-kpi:last-child { grid-column: span 2; border-bottom: 0; border-right: 0; }
  .pd-rcm-body { grid-template-columns: 1fr; }
  .pd-bars { min-height: 84px; }
  .pd-chart-head { flex-wrap: wrap; gap: 2px 8px; }
  .pd-plan-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .pd,
  .pd * {
    animation: none !important;
  }
  .pd-pay { opacity: 1; transform: none; }
  .pd-elig-stage { opacity: 0; }
}

.nb-panel-stage.platform-screen {
  align-self: stretch;
  width: 100%;
  height: auto;
  font-family: var(--nb-sans, inherit);
}

.nb-panel-stage > .pd {
  height: auto;
  min-height: 0;
}

.nb-panel-stages {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
