/* Partner portal list pages (Shared Rx, Deliveries, Patients, Providers, Medications) */
.sp-pl {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sp-pl__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sp-pl__overline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sp-slate-600);
  margin-bottom: 6px;
}

.sp-pl__title {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  color: var(--sp-navy-950);
  margin: 0;
}

.sp-pl__subtitle {
  font-size: 15px;
  line-height: 22px;
  color: #475569;
  margin: 6px 0 0;
}

.sp-pl__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sp-pl__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.sp-pl__btn--primary {
  background: var(--sp-blue-600);
  color: #fff;
}

.sp-pl__btn--primary:hover {
  background: var(--sp-blue-700);
  color: #fff;
}

.sp-pl__btn--secondary {
  background: #fff;
  color: var(--sp-navy-950);
  border-color: var(--sp-slate-300);
}

.sp-pl__btn--secondary:hover {
  background: var(--sp-gray-50);
  color: var(--sp-navy-950);
}

.sp-pl__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sp-pl__tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--sp-slate-200);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
}

.sp-pl__tile:hover {
  border-color: var(--sp-slate-300);
  background: var(--sp-gray-50);
}

.sp-pl__tile.is-active {
  border-color: var(--sp-blue-600);
  box-shadow: 0 0 0 1px var(--sp-blue-600);
}

.sp-pl__tile.is-alert {
  border-color: var(--sp-error);
}

.sp-pl__tile.is-success {
  border-color: var(--sp-success);
}

.sp-pl__tile.is-warn {
  border-color: var(--sp-warning);
}

.sp-pl__tile-value {
  font-size: 24px;
  line-height: 28px;
  font-weight: 700;
}

.sp-pl__tile-label {
  font-size: 13px;
  color: var(--sp-slate-600);
}

.sp-pl__card {
  background: #fff;
  border: 1px solid var(--sp-slate-200);
  border-radius: 12px;
  overflow: hidden;
}

.sp-pl__tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--sp-slate-200);
  overflow-x: auto;
}

.sp-pl__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sp-slate-600);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.sp-pl__tab:hover {
  color: var(--sp-navy-950);
}

.sp-pl__tab.is-active {
  color: var(--sp-blue-600);
  border-bottom-color: var(--sp-blue-600);
}

.sp-pl__tab span {
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-slate-500);
}

.sp-pl__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.sp-pl__search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.sp-pl__search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sp-slate-500);
  pointer-events: none;
}

.sp-pl__search input {
  padding-left: 36px;
  min-height: 40px;
}

.sp-pl__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sp-pl__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--sp-slate-300);
  background: #fff;
  color: var(--sp-slate-700);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.sp-pl__chip:hover {
  background: var(--sp-gray-50);
  color: var(--sp-navy-950);
}

.sp-pl__chip.is-active {
  background: var(--sp-blue-tint);
  border-color: var(--sp-blue-600);
  color: var(--sp-blue-700);
}

.sp-pl__chip span {
  font-weight: 600;
  color: var(--sp-slate-500);
}

.sp-pl table.sp-pl__table {
  width: 100%;
  margin: 0;
}

.sp-pl__table thead th {
  background: var(--sp-gray-50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sp-slate-600);
  padding: 10px 14px;
  border-bottom: 1px solid var(--sp-slate-200);
  white-space: nowrap;
}

.sp-pl__th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sp-pl__funnel {
  border: 0;
  background: transparent;
  color: var(--sp-slate-500);
  padding: 0;
  line-height: 1;
}

.sp-pl__funnel.is-on {
  color: var(--sp-blue-600);
}

.sp-pl__funnel-menu {
  position: absolute;
  z-index: 20;
  min-width: 180px;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--sp-slate-200);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 6px;
}

.sp-pl__funnel-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.sp-pl__funnel-menu button:hover,
.sp-pl__funnel-menu button.is-active {
  background: var(--sp-gray-50);
}

.sp-pl__table tbody td {
  font-size: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sp-slate-100);
  vertical-align: middle;
}

.sp-pl__muted,
.sp-pl__table .sp-pl__muted {
  font-size: 12px;
  color: var(--sp-slate-600);
}

.sp-pl__row {
  cursor: pointer;
}

.sp-pl__row:hover td {
  background: var(--sp-gray-50);
}

.sp-pl__chevron {
  color: var(--sp-slate-400);
  text-align: right;
  width: 36px;
}

.sp-pl__refill-col {
  width: 44px;
  padding-left: 4px !important;
  padding-right: 4px !important;
  text-align: center;
}

.sp-pl__refill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748B;
}

.sp-pl__refill-btn:hover,
.sp-pl__refill-btn:focus-visible {
  color: #2563EB;
  background: #EFF6FF;
  outline: none;
}

.sp-pl__dialog {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
}

.sp-pl__dialog[hidden] {
  display: none !important;
}

.sp-pl__dialog-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 28rem;
  width: calc(100% - 2rem);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.sp-pl__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--sp-slate-600);
  border-top: 1px solid var(--sp-slate-100);
}

.sp-pl__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sp-blue-tint);
  color: var(--sp-blue-700);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sp-pl__person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-pl__pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.sp-pl__pill--dur {
  background: var(--sp-success-100);
  color: var(--sp-success-600);
}

.sp-pl__pill--cat {
  background: var(--sp-slate-100);
  color: var(--sp-slate-700);
}

.sp-pl__status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.sp-pl__status.is-filling { background: var(--sp-info-100); color: var(--sp-info-600); }
.sp-pl__status.is-shipped,
.sp-pl__status.is-transit { background: #dbeafe; color: var(--sp-blue-700); }
.sp-pl__status.is-ofd { background: var(--sp-warning-100); color: var(--sp-warning-600); }
.sp-pl__status.is-delivered,
.sp-pl__status.is-consent { background: var(--sp-success-100); color: var(--sp-success-600); }
.sp-pl__status.is-exception,
.sp-pl__status.is-alert { background: var(--sp-danger-100); color: var(--sp-danger-600); }
.sp-pl__status.is-hold { background: var(--sp-warning-100); color: var(--sp-warning-600); }
.sp-pl__status.is-missing { background: var(--sp-warning-100); color: var(--sp-warning-600); }
.sp-pl__status.is-draft { background: var(--sp-slate-100); color: var(--sp-slate-700); }
.sp-pl__status.is-cancelled,
.sp-pl__status.is-imported { background: var(--sp-slate-100); color: var(--sp-slate-600); }
.sp-pl__status.is-active { background: var(--sp-success-100); color: var(--sp-success-600); }

.sp-pl__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sp-blue-600);
  margin-right: 6px;
}

.sp-pl__link-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-blue-600);
  text-decoration: none;
}

.sp-pl__price {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.sp-pl__share {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--sp-slate-300);
  background: #fff;
  color: var(--sp-navy-950);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.sp-pl__share:hover {
  background: var(--sp-gray-50);
  color: var(--sp-navy-950);
}

.sp-pl__notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--sp-info-100);
  color: var(--sp-info-600);
  font-size: 14px;
}

.sp-pl__notice a {
  font-weight: 600;
}

@media (max-width: 960px) {
  .sp-pl__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.sp-fit-viewport {
  height: 100vh;
  overflow: hidden;
}

body.sp-fit-viewport .app-root,
body.sp-fit-viewport .app-page {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

body.sp-fit-viewport .app-page > .d-flex.min-vh-100,
body.sp-fit-viewport .min-vh-100 {
  min-height: 0 !important;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
}

body.sp-fit-viewport .app-wrapper,
body.sp-fit-viewport .app-main {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.sp-fit-viewport .sp-fit-viewport__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  padding-bottom: 16px;
}

.sp-op-dash {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.sp-op-dash__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.sp-op-dash__title {
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  margin: 0;
  color: var(--sp-navy-950);
}

.sp-op-dash__tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  flex: 0 0 auto;
}

.sp-op-dash__tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--sp-slate-200);
  border-radius: 12px;
  padding: 12px 14px 14px;
  padding-right: 118px;
  text-decoration: none;
  color: inherit;
  min-height: 108px;
}

.sp-op-dash__tile:hover {
  background: var(--sp-gray-50);
  color: inherit;
}

.sp-op-dash__tile.is-unseen {
  border-color: var(--sp-blue-600);
  box-shadow: 0 0 0 1px var(--sp-blue-600);
}

.sp-op-dash__tile.is-alert {
  border-color: #fecaca;
}

.sp-op-dash__tile-go {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-blue-600);
  white-space: nowrap;
}

.sp-op-dash__tile-value {
  font-size: 28px;
  line-height: 32px;
  font-weight: 700;
}

.sp-op-dash__tile-value.is-alert {
  color: var(--sp-danger-600);
}

.sp-op-dash__tile-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-navy-950);
}

.sp-op-dash__tile-hint {
  font-size: 12px;
  color: var(--sp-slate-600);
}

.sp-op-dash__body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(280px, 1fr);
  gap: 12px;
  overflow: hidden;
}

.sp-op-dash__recent,
.sp-op-dash__side {
  min-height: 0;
  overflow: hidden;
}

.sp-op-dash__recent {
  display: flex;
  flex-direction: column;
}

.sp-op-dash__recent-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.sp-op-dash__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sp-op-dash__panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sp-op-dash__panel:first-child {
  flex: 1 1 auto;
}

.sp-op-dash__panel-body {
  padding: 0 14px 12px;
  overflow: auto;
  min-height: 0;
}

.sp-op-dash__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px 8px;
}

.sp-op-dash__card-head h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.sp-op-dash__card-head a {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-blue-600);
  text-decoration: none;
  white-space: nowrap;
}

.sp-op-dash__table thead th {
  padding: 8px 12px;
}

.sp-op-dash__table tbody td {
  padding: 8px 12px;
}

.sp-op-dash__empty {
  margin: 0;
  font-size: 13px;
  color: var(--sp-slate-600);
}

.sp-op-dash__attn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sp-slate-100);
}

.sp-op-dash__attn:last-of-type {
  border-bottom: 0;
}

.sp-op-dash__attn-copy {
  font-size: 13px;
  margin-top: 4px;
}

.sp-op-dash__more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-blue-600);
  text-decoration: none;
}

.sp-op-dash__cfp {
  font-size: 18px;
  font-weight: 700;
  margin: 0 14px 4px;
}

.sp-op-dash__panel .sp-pl__overline,
.sp-op-dash__panel .sp-pl__muted,
.sp-op-dash__links {
  padding-left: 14px;
  padding-right: 14px;
}

.sp-op-dash__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
}

.sp-op-dash__links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-blue-600);
  text-decoration: none;
}

@media (max-width: 1366px) {
  body.sp-fit-viewport .sp-fit-viewport__content {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .sp-op-dash {
    gap: 10px;
  }

  .sp-op-dash__title {
    font-size: 24px;
    line-height: 30px;
  }

  .sp-op-dash__tile {
    min-height: 92px;
    padding: 10px 12px;
  }

  .sp-op-dash__tile-value {
    font-size: 24px;
    line-height: 28px;
  }
}

@media (max-width: 1100px) {
  .sp-op-dash__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-op-dash__body {
    grid-template-columns: 1fr;
  }

  body.sp-fit-viewport {
    height: auto;
    overflow: auto;
  }
}

.sp-op-agree {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  padding: 14px 16px;
  flex: 0 0 auto;
}

.sp-op-agree.is-wait {
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.sp-op-agree__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B45309;
  flex: 0 0 auto;
}

.sp-op-agree.is-wait .sp-op-agree__icon {
  color: #1D4ED8;
}

.sp-op-agree__body h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.sp-op-agree__body p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--sp-slate-600);
}

.sp-op-agree__steps {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  font-size: 14px;
}

.sp-op-agree__steps .is-done {
  color: #15803d;
}

.sp-op-dash__table {
  width: 100%;
}

.sp-op-dash__empty-rx {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  width: 100%;
  text-align: center;
  color: var(--sp-slate-600);
  padding: 24px;
}

.sp-op-dash__empty-rx i {
  font-size: 28px;
  color: var(--sp-slate-400);
}

.sp-op-dash__empty-rx p {
  margin: 0;
  font-weight: 600;
  color: var(--sp-navy-950);
}

.sp-op-share-pause {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 1rem;
}

.sp-op-share-pause a {
  font-weight: 600;
  color: var(--sp-blue-600);
  text-decoration: none;
}
