.sp-login-hero.is-bonus-offer,
.sp-credit-pack-card.is-bonus-offer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.sp-login-hero.is-bonus-offer::before,
.sp-credit-pack-card.is-bonus-offer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -35% 45% auto -20%;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.34), rgba(29, 78, 216, 0));
  pointer-events: none;
}

.sp-bonus5-eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(147, 197, 253, 0.6);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.92), rgba(37, 99, 235, 0.72));
  box-shadow: 0 12px 32px rgba(29, 78, 216, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sp-bonus5-highlight {
  display: grid;
  gap: 0.2rem;
  width: min(100%, 420px);
  padding: 1rem 1.15rem;
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(23, 37, 84, 0.78), rgba(30, 64, 175, 0.52));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.sp-bonus5-highlight strong {
  color: #fff;
  font-size: clamp(1.28rem, 3vw, 1.72rem);
  line-height: 1.25;
}

.sp-bonus5-highlight span {
  color: #dbeafe;
  font-size: 1rem;
  font-weight: 700;
}

/* Runtime promotion for the legacy bundle: content is drawn without adding
   children to React-owned cards. */
[data-runtime-bonus-highlight="true"]::after {
  content: attr(data-runtime-bonus-title) "\A" attr(data-runtime-bonus-subtitle);
  display: block;
  width: min(100%, 420px);
  margin: 1rem auto 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(23, 37, 84, 0.96), rgba(30, 64, 175, 0.9));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 850;
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}

[data-runtime-bonus-highlight="true"][data-runtime-offer-message]::after {
  content: attr(data-runtime-bonus-title) "\A" attr(data-runtime-bonus-subtitle) "\A\A" attr(data-runtime-offer-message);
}

.sp-credit-pack-card.is-bonus-offer {
  border-color: rgba(59, 130, 246, 0.58);
  box-shadow: 0 22px 60px rgba(29, 78, 216, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sp-credit-pack-card.is-bonus-offer .sp-price-inline {
  border-color: rgba(96, 165, 250, 0.5);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.18), rgba(59, 130, 246, 0.08));
}

.sp-bonus5-success {
  display: grid;
  gap: 0.25rem;
  width: min(100%, 520px);
  margin: 0.65rem auto 0.35rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.16), rgba(37, 99, 235, 0.12));
  color: inherit;
}

.sp-bonus5-success strong {
  color: #15803d;
  font-size: 1.05rem;
}

.sp-credit-ledger {
  border-color: rgba(34, 197, 94, 0.3);
}

.sp-credit-ledger-rows {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.sp-credit-ledger-rows p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.08);
}

.sp-credit-ledger-rows strong {
  color: #22c55e;
  font-size: 1.15rem;
}

.sp-offer-admin .sp-section-heading {
  align-items: center;
}

.sp-admin-quick-actions,
.sp-offer-admin {
  position: relative;
  overflow: hidden;
}

.tool-runtime-admin-dock {
  position: fixed;
  z-index: 240;
  inset: auto 18px 18px auto;
  width: min(760px, calc(100vw - 36px));
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: 0.7rem;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

/* The public admin entrance stays available without competing with the main
   purchase flow. The React-owned source remains in place but visually hidden;
   this footer control safely mirrors it outside the React tree. */
.admin-entry-button[data-runtime-admin-entry-source="true"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.runtime-admin-footer-entry {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 8px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
}

.runtime-admin-footer-entry-button {
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 999px;
  color: #64748b;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 160ms ease, border-color 160ms ease, color 160ms ease;
}

.runtime-admin-footer-entry-button:hover {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.34);
  opacity: 1;
}

.runtime-admin-footer-entry-button:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 3px;
  opacity: 1;
}

/* Native bundle: the same secured manager entry now lives inside the legal
   footer, where it stays available without competing with customer actions. */
.legal-footer-inner > .admin-entry-button {
  position: relative;
  justify-self: center;
  width: auto;
  min-width: 0;
  min-height: 36px;
  margin: 4px auto 0;
  padding: 5px 11px;
  grid-template-columns: auto auto;
  gap: 7px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 999px;
  color: #94a3b8;
  background: transparent;
  box-shadow: none;
  opacity: 0.74;
}

.legal-footer-inner > .admin-entry-button:hover,
.legal-footer-inner > .admin-entry-button:focus-visible {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.42);
  opacity: 1;
  transform: none;
}

.legal-footer-inner > .admin-entry-button .admin-entry-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: currentColor;
  background: transparent;
  box-shadow: none;
}

.legal-footer-inner > .admin-entry-button .admin-entry-copy {
  display: grid;
  gap: 0;
  text-align: start;
}

.legal-footer-inner > .admin-entry-button .admin-entry-copy small,
.legal-footer-inner > .admin-entry-button .admin-entry-copy strong {
  color: currentColor;
  font-size: 11px;
  line-height: 1.15;
}

.premium-studio-theme[data-theme="day"] .legal-footer-inner > .admin-entry-button {
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.24);
}

.premium-studio-theme[data-theme="day"] .legal-footer-inner > .admin-entry-button:hover,
.premium-studio-theme[data-theme="day"] .legal-footer-inner > .admin-entry-button:focus-visible {
  color: #1d4ed8;
  border-color: rgba(29, 78, 216, 0.35);
}

.sp-premium-admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(251, 191, 36, 0.52);
  border-radius: 999px;
  color: #fff7d6;
  background: linear-gradient(135deg, #92400e, #1d4ed8);
  font-weight: 900;
  white-space: nowrap;
}

.premium-studio-theme[data-theme="day"] .sp-premium-admin-badge {
  color: #713f12;
  background: linear-gradient(135deg, #fff7d6, #e7efff);
}

.tool-runtime-admin-dock .sp-admin-quick-actions,
.tool-runtime-admin-dock .sp-offer-admin {
  margin: 0;
}

.tool-runtime-admin-dock-toggle {
  position: sticky;
  z-index: 2;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(96, 165, 250, 0.58);
  border-radius: 15px;
  color: #f8fafc;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.28);
  font: inherit;
  font-weight: 850;
  text-align: center;
}

.tool-runtime-admin-dock[data-dock-collapsed="true"] {
  right: auto;
  left: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: min(250px, calc(100vw - 44px));
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tool-runtime-admin-dock[data-dock-collapsed="true"] > :not(.tool-runtime-admin-dock-toggle) {
  display: none !important;
}

.tool-runtime-admin-dock[data-dock-collapsed="true"] .tool-runtime-admin-dock-toggle {
  min-height: 48px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(29, 78, 216, 0.3);
}

.premium-studio-theme .sp-history-footer a,
.premium-studio-theme .sp-history-actions a,
.premium-studio-theme .sp-history-actions button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  padding: 0.72rem 1rem;
  justify-content: center;
  border: 1px solid rgba(147, 197, 253, 0.72);
  border-radius: 14px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #1e40af, #2563eb) !important;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.28);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.premium-studio-theme .sp-history-footer a:hover,
.premium-studio-theme .sp-history-actions a:hover,
.premium-studio-theme .sp-history-actions button:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6) !important;
  box-shadow: 0 15px 32px rgba(29, 78, 216, 0.36);
  transform: translateY(-1px);
}

.premium-studio-theme .sp-history-footer a:focus-visible,
.premium-studio-theme .sp-history-actions a:focus-visible,
.premium-studio-theme .sp-history-actions button:focus-visible {
  outline: 3px solid rgba(251, 146, 60, 0.48);
  outline-offset: 3px;
}

.sp-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sp-history-actions a,
.sp-history-actions button {
  flex: 1 1 145px;
}

.sp-history-download-group {
  display: grid;
  gap: 9px;
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid rgba(96, 165, 250, 0.25);
}

.sp-history-format-note {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #526174;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: start;
}

.sp-history-format-note strong {
  flex: 0 0 auto;
  color: #172554;
  font-size: 14px;
  font-weight: 900;
}

.sp-history-format-note small {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.sp-history-footer:has(.sp-history-download-group) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.premium-studio-theme .sp-history-actions button[data-format="wav"] {
  border-color: rgba(96, 165, 250, 0.78);
  background: linear-gradient(135deg, #172554, #1d4ed8) !important;
}

.premium-studio-theme .sp-history-actions button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.premium-studio-theme .sp-history-footer.runtime-history-format-ready {
  min-height: 0;
  display: block;
  padding: 0;
}

.premium-studio-theme .sp-history-footer.runtime-history-format-ready > a[data-runtime-history-source="true"] {
  display: none !important;
}

.premium-studio-theme[data-theme="night"] .sp-history-format-note {
  color: #cbd5e1;
}

.premium-studio-theme .sp-history-list {
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.premium-studio-theme .sp-history-card {
  min-width: 0;
  overflow: hidden;
  scroll-margin-top: 92px;
}

.premium-studio-theme .sp-history-card audio {
  display: block;
  margin-bottom: 0;
}

.tool-runtime-admin-dock .sp-offer-admin {
  margin-top: 0.65rem;
  padding: 1rem;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.96);
}

.sp-admin-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.16), rgba(59, 130, 246, 0.07));
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sp-admin-quick-actions > div:first-child {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.sp-admin-quick-actions small {
  color: #60a5fa;
  font-weight: 800;
}

.sp-admin-quick-actions strong {
  color: #f8fafc;
  font-size: 1.15rem;
}

.sp-admin-quick-actions span {
  color: #cbd5e1;
}

.sp-admin-quick-buttons,
.sp-offer-admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.sp-admin-quick-buttons {
  justify-content: flex-end;
}

.sp-offer-admin-actions {
  margin-block: 0.7rem 0.25rem;
}

.sp-admin-link-button,
.sp-admin-quick-primary,
.sp-offer-collapse-button,
.sp-offer-remove-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.58rem 0.85rem;
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 12px;
  background: rgba(30, 64, 175, 0.12);
  color: #dbeafe;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.sp-admin-quick-primary {
  border-color: rgba(96, 165, 250, 0.68);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.24);
  color: #fff;
}

.sp-admin-link-button.is-whatsapp {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(22, 163, 74, 0.13);
  color: #bbf7d0;
}

.sp-offer-collapse-button {
  margin-inline-start: auto;
  border-color: rgba(147, 197, 253, 0.62);
  background: rgba(37, 99, 235, 0.2);
  color: #fff;
}

.sp-offer-remove-button {
  min-height: 38px;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(153, 27, 27, 0.12);
  color: #fecaca;
}

.sp-admin-link-button:hover,
.sp-admin-quick-primary:hover,
.sp-offer-collapse-button:hover,
.sp-offer-remove-button:hover {
  transform: translateY(-1px);
  border-color: rgba(147, 197, 253, 0.78);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.sp-admin-link-button:focus-visible,
.sp-admin-quick-primary:focus-visible,
.sp-offer-collapse-button:focus-visible,
.sp-offer-remove-button:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.62);
  outline-offset: 3px;
}

.sp-offer-remove-button:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.sp-admin-share-status {
  margin: 0.65rem 0 0;
  color: #86efac;
  font-size: 0.92rem;
  font-weight: 750;
}

.sp-admin-share-status.is-error {
  color: #fecaca;
}

.sp-offer-admin[data-collapsed="true"] {
  padding-block: 0.9rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.sp-offer-admin[data-collapsed="true"] .sp-offer-filters,
.sp-offer-admin[data-collapsed="true"] .sp-offer-runtime-body,
.sp-offer-admin[data-collapsed="true"] .sp-offer-runtime-error {
  display: none;
}

.sp-offer-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-block: 1rem;
}

.sp-premium-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sp-premium-admin-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(251, 191, 36, 0.48);
  border-radius: 999px;
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.74), rgba(29, 78, 216, 0.72));
  font-size: 0.85rem;
  font-weight: 900;
  white-space: nowrap;
}

.sp-premium-admin-meta {
  margin: -0.2rem 0 0.85rem;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 720;
}

.sp-premium-order-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block: 0.75rem;
}

.sp-premium-order-search {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 340px);
  color: #bfdbfe;
  font-size: 0.82rem;
  font-weight: 800;
}

.sp-premium-order-search input {
  width: 100%;
  min-height: 44px;
  padding: 0.62rem 0.8rem;
  border: 1px solid rgba(96, 165, 250, 0.38);
  border-radius: 12px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.54);
  font: inherit;
  font-size: 0.92rem;
}

.sp-premium-order-search input:focus {
  border-color: #60a5fa;
  outline: 3px solid rgba(96, 165, 250, 0.22);
  outline-offset: 2px;
}

.sp-premium-order-list > article[data-status="paid"] {
  border-inline-start: 4px solid #22c55e;
}

.sp-premium-order-list > article[data-status="pending"] {
  border-inline-start: 4px solid #f59e0b;
}

.sp-premium-order-state strong {
  width: fit-content;
  padding: 0.3rem 0.58rem;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.13);
  font-size: 0.8rem;
}

.sp-premium-order-list > article[data-status="paid"] .sp-premium-order-state strong {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.13);
}

.sp-premium-search-empty[hidden] {
  display: none;
}

.sp-offer-summary-grid article {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 18px;
  background: rgba(30, 64, 175, 0.08);
}

.sp-offer-summary-grid strong {
  color: #60a5fa;
  font-size: 1.7rem;
}

.sp-offer-filters {
  margin-block: 0.75rem 1rem;
}

.sp-offer-account-list {
  display: grid;
  gap: 0.7rem;
}

.sp-offer-account-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(170px, 0.8fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.22);
}

.sp-offer-account-list > article > div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.sp-offer-account-actions {
  justify-items: end;
}

.sp-offer-account-list small,
.sp-offer-account-list strong {
  overflow-wrap: anywhere;
}

[data-theme="day"] .sp-bonus5-highlight {
  background: linear-gradient(135deg, #172554, #1d4ed8);
}

[data-theme="day"] .sp-credit-pack-card.is-bonus-offer {
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.98), rgba(255, 255, 255, 0.96));
}

[data-theme="day"] .sp-bonus5-success strong {
  color: #166534;
}

[data-theme="day"] .sp-credit-ledger-rows p {
  background: #f0fdf4;
}

[data-theme="day"] .sp-credit-ledger-rows strong {
  color: #15803d;
}

[data-theme="day"] .sp-offer-summary-grid article,
[data-theme="day"] .sp-offer-account-list > article {
  background: #f5f8ff;
  border-color: #d9e2f0;
}

[data-theme="day"] .sp-offer-summary-grid strong {
  color: #1d4ed8;
}

[data-theme="day"] .sp-premium-admin-meta {
  color: #526174;
}

[data-theme="day"] .sp-premium-admin-eyebrow {
  border-color: #f2c970;
  color: #713f12;
  background: linear-gradient(135deg, #fff7d6, #e7efff);
}

[data-theme="day"] .sp-premium-order-search {
  color: #172554;
}

[data-theme="day"] .sp-premium-order-search input {
  border-color: #c7d7f1;
  color: #172033;
  background: #ffffff;
}

[data-theme="day"] .sp-premium-order-state strong {
  color: #92400e;
  background: #fff7ed;
}

[data-theme="day"] .sp-premium-order-list > article[data-status="paid"] .sp-premium-order-state strong {
  color: #166534;
  background: #f0fdf4;
}

[data-theme="day"] .sp-admin-quick-actions {
  border-color: #c7d7f1;
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  box-shadow: 0 14px 34px rgba(29, 78, 216, 0.1);
}

[data-theme="day"] .sp-admin-quick-actions strong {
  color: #172554;
}

[data-theme="day"] .sp-admin-quick-actions span {
  color: #526174;
}

[data-theme="day"] .sp-admin-link-button,
[data-theme="day"] .sp-offer-collapse-button {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

[data-theme="day"] .sp-admin-link-button.is-whatsapp {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

[data-theme="day"] .sp-offer-remove-button {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

[data-theme="day"] .sp-admin-share-status {
  color: #166534;
}

[data-theme="day"] .sp-admin-share-status.is-error {
  color: #b91c1c;
}

body:has(.premium-studio-theme[data-theme="day"]) .tool-runtime-admin-dock {
  border-color: #c7d7f1;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 64px rgba(29, 78, 216, 0.18);
}

body:has(.premium-studio-theme[data-theme="day"]) .tool-runtime-admin-dock .sp-offer-admin {
  border-color: #d9e2f0;
  background: #f5f8ff;
}

/* A clear, task-oriented manager workspace. Existing permissions and actions
   stay unchanged; the navigation and the regular-payment report gain a
   consistent responsive hierarchy. */
.sp-admin-view > .sp-admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.12);
}

.sp-admin-view > .sp-admin-tabs button {
  min-width: 0;
  min-height: 50px;
  justify-content: center;
  padding: 0.65rem 0.75rem;
  line-height: 1.25;
  white-space: normal;
}

.sp-admin-view > .sp-admin-tabs button[aria-pressed="true"] {
  border-color: rgba(147, 197, 253, 0.82);
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.24);
}

.sp-regular-admin {
  display: grid;
  gap: 1rem;
}

.sp-regular-admin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(251, 146, 60, 0.55);
  border-radius: 999px;
  color: #ffedd5;
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.92), rgba(154, 52, 18, 0.88));
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.sp-regular-admin-intro {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.sp-regular-live-status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a7f3d0;
  font-size: 0.82rem;
  font-weight: 800;
}

.sp-regular-live-status span {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.sp-regular-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-block: 0;
}

.sp-regular-admin-toolbar {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 17px;
  background: rgba(15, 23, 42, 0.18);
}

.sp-regular-admin-toolbar .sp-offer-filters {
  margin: 0;
}

.sp-regular-admin-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
}

.sp-regular-export {
  flex: 0 0 auto;
  min-height: 44px;
}

.sp-regular-order-list {
  display: grid;
  gap: 0.85rem;
}

.sp-regular-order-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.75fr) minmax(160px, 0.8fr);
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-inline-start: 4px solid #f59e0b;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.23);
}

.sp-regular-order-list > article[data-status="paid"] {
  border-inline-start-color: #22c55e;
}

.sp-regular-order-list > article[data-status="failed"] {
  border-inline-start-color: #ef4444;
}

.sp-regular-order-identity,
.sp-regular-order-status,
.sp-regular-order-details {
  display: grid;
  align-content: start;
  gap: 0.28rem;
  min-width: 0;
}

.sp-regular-order-identity strong {
  color: #f8fafc;
  font-size: 1.02rem;
}

.sp-regular-order-list small,
.sp-regular-order-list strong {
  overflow-wrap: anywhere;
}

.sp-regular-order-media {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.7rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(96, 165, 250, 0.22);
}

.sp-regular-order-media audio {
  display: block;
  width: 100%;
  min-height: 48px;
}

.sp-regular-order-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.sp-regular-order-actions button {
  min-height: 46px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(96, 165, 250, 0.52);
  border-radius: 13px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.18);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.sp-regular-order-actions button.is-whatsapp {
  border-color: rgba(34, 197, 94, 0.46);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.14);
}

.sp-regular-order-actions button:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.sp-regular-order-actions button:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.58);
  outline-offset: 3px;
}

.sp-regular-order-actions button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.sp-regular-file-waiting {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 13px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  font-weight: 750;
}

[data-theme="day"] .sp-admin-view > .sp-admin-tabs {
  border-color: #d9e2f0;
  background: #eef4ff;
}

[data-theme="day"] .sp-regular-admin-intro {
  color: #526174;
}

[data-theme="day"] .sp-regular-live-status,
.tool-runtime-admin-dock[data-theme="day"] .sp-regular-live-status {
  color: #166534;
}

[data-theme="day"] .sp-regular-admin-toolbar,
[data-theme="day"] .sp-regular-order-list > article {
  border-color: #d9e2f0;
  background: #f5f8ff;
}

[data-theme="day"] .sp-regular-order-identity strong {
  color: #172554;
}

[data-theme="day"] .sp-regular-order-actions button {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

[data-theme="day"] .sp-regular-order-actions button.is-whatsapp {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

[data-theme="day"] .sp-regular-file-waiting {
  color: #92400e;
  background: #fff7ed;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-admin-dock-toggle {
  border-color: #93b4ec;
  color: #ffffff;
  background: linear-gradient(135deg, #1e40af, #2563eb);
}

@media (max-width: 760px) {
  .sp-bonus5-highlight {
    padding: 0.85rem 0.95rem;
    border-radius: 17px;
  }

  .sp-offer-summary-grid {
    grid-template-columns: 1fr;
  }

  .sp-premium-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-admin-view > .sp-admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 7px;
  }

  .sp-regular-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sp-regular-admin-tools,
  .sp-regular-order-list > article {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sp-regular-admin-tools .sp-premium-order-search,
  .sp-regular-export {
    width: 100%;
  }

  .sp-regular-order-actions {
    grid-template-columns: 1fr;
  }

  .sp-offer-account-list > article {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .sp-offer-admin .sp-section-heading {
    align-items: flex-start;
  }

  .sp-admin-quick-actions {
    display: grid;
    padding: 0.9rem;
  }

  .tool-runtime-admin-dock {
    inset: auto 8px calc(78px + env(safe-area-inset-bottom, 0px)) 8px;
    width: auto;
    max-height: min(72vh, 680px);
    padding: 0.5rem;
    border-radius: 19px;
  }

  .tool-runtime-admin-dock-toggle {
    min-height: 50px;
  }

  .tool-runtime-admin-dock[data-dock-collapsed="true"] {
    right: auto;
    left: 50%;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    width: min(270px, calc(100vw - 150px));
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: translateX(-50%);
  }

  .tool-runtime-admin-dock[data-dock-collapsed="true"] .tool-runtime-admin-dock-toggle {
    min-height: 50px;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.32);
  }

  .sp-admin-quick-buttons,
  .sp-offer-admin-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sp-admin-link-button,
  .sp-admin-quick-primary,
  .sp-offer-collapse-button {
    width: 100%;
  }

  .sp-offer-collapse-button {
    margin-inline-start: 0;
  }

  .sp-offer-account-actions {
    justify-items: stretch;
  }

  .sp-premium-order-tools,
  .sp-premium-order-search {
    width: 100%;
  }
}

/* Studio Pro payment and credit reconciliation. This panel lives inside the
   native Studio Pro summary so it follows the same full-screen scroll flow on
   desktop and mobile, without creating another floating manager window. */
.sp-reconciliation-panel {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid #d4e0f0;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f7faff);
}

.sp-reconciliation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sp-reconciliation-heading > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sp-reconciliation-heading small {
  color: #2563eb;
  font-weight: 850;
}

.sp-reconciliation-heading h4 {
  margin: 0;
  color: #172554;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.sp-reconciliation-heading p {
  max-width: 760px;
  margin: 2px 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.65;
}

.sp-reconciliation-heading > span {
  flex: 0 0 auto;
  padding: 0.45rem 0.68rem;
  border: 1px solid #fdba74;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 0.76rem;
  font-weight: 900;
}

.sp-reconciliation-heading > span[data-clear="true"] {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.sp-reconciliation-refresh {
  justify-self: start;
  padding: 0.55rem 0.9rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1d4ed8;
  background: #eff6ff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
}

.sp-reconciliation-panel[data-state="loading"] .sp-reconciliation-refresh {
  opacity: 0.55;
  pointer-events: none;
}

.sp-reconciliation-panel[data-state="loading"]::after {
  content: "בודקים עסקאות, קרדיטים וסטטוסי חשבון…";
  padding: 14px;
  border-radius: 12px;
  color: #475569;
  background: #f8fafc;
  text-align: center;
  font-weight: 750;
}

.sp-reconciliation-body {
  display: grid;
  gap: 12px;
}

.sp-reconciliation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sp-reconciliation-summary article {
  min-width: 0;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.sp-reconciliation-summary span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 750;
}

.sp-reconciliation-summary strong {
  color: #172554;
  font-size: 1.25rem;
}

.sp-reconciliation-list {
  display: grid;
  gap: 9px;
}

.sp-reconciliation-list > article {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(170px, 1fr) minmax(230px, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #fed7aa;
  border-inline-start: 4px solid #f97316;
  border-radius: 13px;
  background: #fffaf5;
}

.sp-reconciliation-list > article[data-severity="critical"] {
  border-color: #fecaca;
  border-inline-start-color: #dc2626;
  background: #fff7f7;
}

.sp-reconciliation-list > article > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sp-reconciliation-list strong,
.sp-reconciliation-list small,
.sp-reconciliation-list p {
  overflow-wrap: anywhere;
}

.sp-reconciliation-list small {
  color: #64748b;
  font-size: 0.74rem;
}

.sp-reconciliation-list p {
  margin: 0;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
}

.sp-reconciliation-actions button {
  min-height: 40px;
  padding: 0.58rem 0.85rem;
  border: 1px solid #1d4ed8;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.sp-reconciliation-actions button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.sp-reconciliation-actions span {
  color: #991b1b;
  font-size: 0.74rem;
  font-weight: 800;
}

.sp-reconciliation-clear {
  margin: 0;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  color: #166534;
  background: #f0fdf4;
  text-align: center;
  font-weight: 850;
}

@media (max-width: 980px) {
  .sp-reconciliation-list > article {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sp-reconciliation-panel {
    padding: 12px 9px;
    border-radius: 13px;
  }

  .sp-reconciliation-heading {
    flex-direction: column;
  }

  .sp-reconciliation-summary {
    grid-template-columns: 1fr;
  }

  .sp-reconciliation-list > article {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .sp-reconciliation-actions button {
    width: 100%;
    white-space: normal;
  }
}

/* Runtime CRM: a dedicated, scrollable manager workspace instead of a card
   floating over the old dashboard. It stays outside React's tree so the
   production bundle remains stable while presenting one coherent CRM view. */
.tool-runtime-admin-dock:not([data-dock-collapsed="true"]) {
  inset: 82px 12px 12px;
  width: auto;
  max-height: none;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  border-radius: 26px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.tool-runtime-admin-dock:not([data-dock-collapsed="true"]) .tool-runtime-admin-dock-toggle {
  width: auto;
  min-height: 42px;
  margin-inline-start: auto;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.tool-runtime-crm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.92), rgba(29, 78, 216, 0.78));
  color: #fff;
}

.tool-runtime-crm-header > div {
  display: grid;
  gap: 0.28rem;
}

.tool-runtime-crm-header small {
  color: #bfdbfe;
  font-weight: 800;
}

.tool-runtime-crm-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.tool-runtime-crm-header button {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 13px;
  color: #172554;
  background: #fff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.tool-runtime-crm-tabs {
  position: sticky;
  z-index: 3;
  top: 52px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-block: 0.85rem;
  padding: 0.55rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 17px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
}

.tool-runtime-crm-tabs button {
  min-width: 0;
  min-height: 48px;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.7);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.tool-runtime-crm-tabs button[aria-pressed="true"] {
  color: #fff;
  border-color: #93c5fd;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.26);
}

.tool-runtime-admin-dock[data-crm-view] > .sp-admin-quick-actions {
  display: none;
}

.tool-runtime-admin-dock .sp-regular-runtime-body {
  display: grid;
  gap: 1rem;
}

.tool-runtime-admin-dock[data-theme="day"]:not([data-dock-collapsed="true"]) {
  border-color: #c8d8ef;
  background: rgba(238, 244, 255, 0.98);
  box-shadow: 0 26px 72px rgba(23, 37, 84, 0.26);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-tabs {
  border-color: #d9e2f0;
  background: rgba(255, 255, 255, 0.94);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-tabs button {
  color: #526174;
  border-color: #d9e2f0;
  background: #f5f8ff;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-tabs button[aria-pressed="true"] {
  color: #fff;
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #1e40af, #2563eb);
}

.tool-runtime-admin-dock[data-theme="day"] .sp-regular-admin-intro,
.tool-runtime-admin-dock[data-theme="day"] .sp-regular-order-list small {
  color: #526174;
}

.tool-runtime-admin-dock[data-theme="day"] .sp-regular-order-list > article,
.tool-runtime-admin-dock[data-theme="day"] .sp-regular-admin-toolbar {
  border-color: #d9e2f0;
  background: #fff;
}

.tool-runtime-admin-dock[data-theme="day"] .sp-regular-order-identity strong {
  color: #172554;
}

@media (max-width: 760px) {
  .tool-runtime-admin-dock:not([data-dock-collapsed="true"]) {
    inset: 70px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    padding: 0.65rem;
    border-radius: 20px;
    scrollbar-gutter: auto;
  }

  .tool-runtime-crm-header {
    align-items: stretch;
    flex-direction: column;
    padding: 1rem;
  }

  .tool-runtime-crm-header button {
    width: 100%;
  }

  .tool-runtime-crm-tabs {
    top: 50px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-runtime-admin-dock .sp-section-heading {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .sp-premium-summary-grid {
    grid-template-columns: 1fr;
  }

  .sp-regular-summary-grid {
    grid-template-columns: 1fr;
  }

  .sp-admin-view > .sp-admin-tabs button {
    min-height: 54px;
    padding-inline: 0.5rem;
    font-size: 0.88rem;
  }

  .tool-runtime-admin-dock[data-dock-collapsed="true"] {
    width: min(230px, calc(100vw - 128px));
  }

  .tool-runtime-admin-dock[data-dock-collapsed="true"] .tool-runtime-admin-dock-toggle {
    padding-inline: 0.75rem;
    font-size: 0.88rem;
  }

  .premium-studio-theme .sp-history-card {
    padding: 14px;
    border-radius: 17px;
  }

  .premium-studio-theme .sp-history-card audio {
    min-height: 48px;
    border-radius: 12px;
  }

  .sp-history-format-note {
    display: grid;
    gap: 2px;
  }

  .sp-history-format-note strong {
    font-size: 13px;
  }

  .sp-history-format-note small {
    font-size: 11px;
  }
}

/* Dashboard plan summaries v4. Pricing and package scope stay visible even
   when a customer area has no transactions yet. Live counters remain sourced
   from the existing reports and native Studio Pro metrics. */
.tool-runtime-crm-dashboard-grid button {
  min-height: 258px;
  grid-template-rows: auto auto auto auto auto 1fr;
  gap: 0.58rem;
}

.tool-runtime-crm-income-note {
  margin: -0.35rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 650;
}

.tool-runtime-crm-income {
  min-width: 0;
  padding: 0.62rem 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  background: rgba(6, 95, 70, 0.2);
}

.tool-runtime-crm-income > span {
  color: #a7f3d0;
  font-size: 0.72rem;
  font-weight: 800;
}

.tool-runtime-crm-income > strong {
  min-width: 0;
  color: #ecfdf5;
  font-size: 0.96rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tool-runtime-crm-plan-summary {
  min-width: 0;
  padding: 0.72rem 0.78rem;
  display: grid;
  gap: 0.18rem;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 14px;
  background: rgba(30, 64, 175, 0.18);
}

.tool-runtime-crm-plan-summary > strong {
  color: #ffffff;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.2;
}

.tool-runtime-crm-plan-summary > small {
  color: #dbeafe;
  font-size: 0.75rem;
  line-height: 1.42;
}

.tool-runtime-crm-dashboard-grid button > [data-crm-dashboard-value] {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-plan-summary {
  border-color: #c9d8ef;
  background: linear-gradient(145deg, #eef4ff, #e2ebfb);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-plan-summary > strong {
  color: #172554;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-plan-summary > small {
  color: #526174;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-income-note {
  color: #526174;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-income {
  border-color: #a7dfc8;
  background: #ecfdf5;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-income > span {
  color: #047857;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-income > strong {
  color: #065f46;
}

@media (max-width: 760px) {
  .tool-runtime-crm-dashboard-grid button {
    min-height: 244px;
  }
}

/* Unified manager workspace. The compatibility layer stays outside React's
   managed tree, while the original Studio Pro and assisted views remain the
   source of truth for their data and actions. */
.tool-runtime-admin-dock:not([data-dock-collapsed="true"]) {
  inset:
    var(--runtime-crm-top, 82px)
    var(--runtime-crm-right, 12px)
    var(--runtime-crm-bottom, 12px)
    var(--runtime-crm-left, 12px);
  width: auto;
  max-height: none;
  padding: clamp(0.7rem, 1.8vw, 1.15rem);
  border-radius: 24px;
}

.tool-runtime-admin-dock:not([data-dock-collapsed="true"]) .tool-runtime-admin-dock-toggle {
  position: absolute;
  z-index: 6;
  top: clamp(0.8rem, 1.6vw, 1.1rem);
  left: clamp(0.8rem, 1.6vw, 1.1rem);
  width: auto;
  min-height: 38px;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-color: rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow: none;
}

.tool-runtime-crm-header {
  margin-top: 0;
  padding-inline-start: clamp(4.6rem, 9vw, 6.5rem);
}

.tool-runtime-crm-header-status,
.tool-runtime-crm-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #eff6ff;
  background: rgba(15, 23, 42, 0.22);
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.tool-runtime-crm-live {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.tool-runtime-crm-tabs {
  top: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 0.55rem;
}

.tool-runtime-crm-secondary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.34);
}

.tool-runtime-crm-secondary > span {
  margin-inline-end: 0.2rem;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 850;
}

.tool-runtime-crm-secondary button {
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.56);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.tool-runtime-crm-secondary button[aria-pressed="true"] {
  color: #ffffff;
  border-color: #93c5fd;
  background: #1d4ed8;
}

.tool-runtime-crm-dashboard {
  display: grid;
  gap: 1rem;
}

.tool-runtime-admin-dock > [hidden] {
  display: none !important;
}

.tool-runtime-crm-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.tool-runtime-crm-dashboard-grid button {
  position: relative;
  min-width: 0;
  min-height: 164px;
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 18px;
  color: #e2e8f0;
  background: linear-gradient(145deg, rgba(30, 58, 138, 0.3), rgba(15, 23, 42, 0.46));
  font: inherit;
  text-align: start;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-runtime-crm-dashboard-grid button:hover,
.tool-runtime-crm-dashboard-grid button:focus-visible {
  border-color: #60a5fa;
  box-shadow: 0 16px 34px rgba(29, 78, 216, 0.18);
  transform: translateY(-2px);
}

.tool-runtime-crm-dashboard-grid button > span {
  color: #93c5fd;
  font-size: 0.88rem;
  font-weight: 850;
}

.tool-runtime-crm-dashboard-grid button > strong {
  color: #ffffff;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.2;
}

.tool-runtime-crm-dashboard-grid button > small {
  color: #cbd5e1;
  line-height: 1.5;
}

.tool-runtime-crm-dashboard-grid button > b {
  align-self: end;
  justify-self: start;
  color: #fbbf24;
  font-size: 0.82rem;
}

.sp-admin-view[data-runtime-crm-unified="true"] > .sp-admin-title,
.sp-admin-view[data-runtime-crm-unified="true"] > .sp-admin-tabs {
  display: none !important;
}

.sp-admin-view[data-runtime-crm-mode="overlay"] > * {
  visibility: hidden !important;
  pointer-events: none !important;
}

.sp-admin-view[data-runtime-crm-mode="native"] {
  padding-top: var(--runtime-crm-native-offset, 210px) !important;
}

.tool-runtime-admin-dock[data-native-bridge="true"]:not([data-dock-collapsed="true"]) {
  bottom: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.tool-runtime-admin-dock[data-native-bridge="true"]:not([data-dock-collapsed="true"]) > .tool-runtime-admin-dock-toggle,
.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-header,
.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-tabs,
.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-secondary {
  pointer-events: auto;
}

.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-header,
.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-tabs,
.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-secondary {
  box-shadow: 0 12px 30px rgba(23, 37, 84, 0.14);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-secondary {
  border-color: #d9e2f0;
  background: rgba(255, 255, 255, 0.94);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-secondary > span {
  color: #64748b;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-secondary button {
  color: #526174;
  border-color: #d9e2f0;
  background: #f5f8ff;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-secondary button[aria-pressed="true"] {
  color: #ffffff;
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-dashboard-grid button {
  color: #334155;
  border-color: #d9e2f0;
  background: linear-gradient(145deg, #ffffff, #f5f8ff);
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-dashboard-grid button > span {
  color: #2563eb;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-dashboard-grid button > strong {
  color: #172554;
}

.tool-runtime-admin-dock[data-theme="day"] .tool-runtime-crm-dashboard-grid button > small {
  color: #526174;
}

@media (max-width: 920px) {
  .tool-runtime-crm-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .tool-runtime-admin-dock:not([data-dock-collapsed="true"]) {
    inset:
      var(--runtime-crm-top, 70px)
      var(--runtime-crm-right, 6px)
      var(--runtime-crm-bottom, calc(6px + env(safe-area-inset-bottom, 0px)))
      var(--runtime-crm-left, 6px);
  }

  .tool-runtime-crm-header {
    min-height: 112px;
    padding: 1rem;
    padding-inline-start: 4.9rem;
  }

  .tool-runtime-crm-header-status {
    justify-self: start;
  }

  .tool-runtime-crm-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-runtime-crm-tabs button:first-child {
    grid-column: 1 / -1;
  }

  .tool-runtime-crm-secondary {
    flex-wrap: wrap;
  }

  .tool-runtime-crm-secondary > span {
    flex-basis: 100%;
  }

  .tool-runtime-crm-secondary button {
    flex: 1 1 30%;
  }

  .tool-runtime-crm-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .tool-runtime-crm-dashboard-grid button {
    min-height: 138px;
  }
}

@media (max-width: 420px) {
  .tool-runtime-admin-dock:not([data-dock-collapsed="true"]) .tool-runtime-admin-dock-toggle {
    top: 0.65rem;
    left: 0.65rem;
    min-height: 34px;
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
  }

  .tool-runtime-crm-header {
    padding-inline-start: 4.2rem;
  }

  .tool-runtime-crm-header h2 {
    font-size: 1.28rem;
  }

  .tool-runtime-crm-tabs button {
    min-height: 44px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-login-hero.is-bonus-offer::before,
  .sp-credit-pack-card.is-bonus-offer::before {
    animation: none !important;
  }

  .sp-admin-link-button,
  .sp-admin-quick-primary,
  .sp-offer-collapse-button,
  .sp-offer-remove-button {
    transition: none !important;
  }

  .premium-studio-theme .sp-history-footer a,
  .premium-studio-theme .sp-history-actions a,
  .tool-runtime-history-download-actions button {
    transition: none !important;
  }
}

/* Manager CRM: four primary customer areas, with operational reports kept in
   one quieter secondary drawer. This layer intentionally overrides older
   dashboard rules without changing any authorization or data logic. */
.premium-studio-theme .sp-admin-view {
  width: min(100%, 1240px);
  gap: 18px;
}

.premium-studio-theme .sp-admin-title {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(96, 165, 250, 0.28);
  background:
    radial-gradient(circle at 12% 20%, rgba(59, 130, 246, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(30, 58, 138, 0.36), rgba(15, 23, 42, 0.18));
}

.premium-studio-theme .sp-admin-title h2 {
  margin-top: 4px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.premium-studio-theme .sp-admin-view > .sp-admin-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
}

.premium-studio-theme .sp-admin-dashboard-home {
  width: min(620px, 100%);
  min-height: 76px;
  margin-inline: auto;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  text-align: start;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 19px;
  color: #eaf2ff;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.28), rgba(15, 23, 42, 0.22));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  font: inherit;
  cursor: pointer;
}

.premium-studio-theme .sp-admin-dashboard-home > svg {
  width: 27px;
  height: 27px;
  color: #60a5fa;
}

.premium-studio-theme .sp-admin-dashboard-home span {
  display: grid;
  gap: 2px;
}

.premium-studio-theme .sp-admin-dashboard-home strong {
  font-size: 1.08rem;
}

.premium-studio-theme .sp-admin-dashboard-home small {
  color: #bfdbfe;
  line-height: 1.4;
}

.premium-studio-theme .sp-admin-dashboard-home b {
  padding: 7px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.22);
  font-size: 0.78rem;
  white-space: nowrap;
}

.premium-studio-theme .sp-admin-dashboard-home[aria-pressed="true"] {
  color: #ffffff;
  border-color: #60a5fa;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 14px 32px rgba(29, 78, 216, 0.28);
}

.premium-studio-theme .sp-admin-view > .sp-admin-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 64px;
  border-radius: 15px;
  font-weight: 850;
}

.premium-studio-theme .sp-admin-view > .sp-admin-tabs button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.premium-studio-theme .sp-admin-view > .sp-admin-tabs button span {
  min-width: 0;
}

.premium-studio-theme .sp-admin-secondary-nav {
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.12);
}

.premium-studio-theme .sp-admin-secondary-nav summary {
  min-height: 58px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-weight: 850;
}

.premium-studio-theme .sp-admin-secondary-nav summary::-webkit-details-marker {
  display: none;
}

.premium-studio-theme .sp-admin-secondary-nav summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  font-size: 20px;
}

.premium-studio-theme .sp-admin-secondary-nav[open] summary::after {
  content: "−";
}

.premium-studio-theme .sp-admin-secondary-nav summary small {
  color: #94a3b8;
  font-weight: 650;
}

.premium-studio-theme .sp-admin-secondary-nav > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 0 12px 12px;
}

.premium-studio-theme .sp-admin-business-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.premium-studio-theme .sp-admin-business-totals article {
  min-width: 0;
  padding: 17px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.18);
}

.premium-studio-theme .sp-admin-business-totals span,
.premium-studio-theme .sp-admin-business-totals small {
  color: #bfdbfe;
}

.premium-studio-theme .sp-admin-business-totals strong {
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1;
}

.premium-studio-theme .sp-admin-secondary-nav button {
  min-height: 48px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 13px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.14);
  font: inherit;
  font-weight: 800;
}

.premium-studio-theme .sp-admin-secondary-nav button[aria-pressed="true"] {
  color: #ffffff;
  border-color: #60a5fa;
  background: linear-gradient(135deg, #1e40af, #2563eb);
}

.premium-studio-theme .sp-admin-crm-overview {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.16), rgba(15, 23, 42, 0.16));
}

.premium-studio-theme .sp-admin-crm-overview h3 {
  margin: 3px 0;
  font-size: clamp(24px, 3vw, 32px);
}

.premium-studio-theme .sp-admin-crm-overview p {
  margin: 0;
  color: #cbd5e1;
}

.premium-studio-theme .sp-admin-crm-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.premium-studio-theme .sp-admin-crm-shortcuts button {
  min-width: 0;
  min-height: 108px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 6px;
  text-align: start;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 17px;
  color: #eff6ff;
  background: rgba(15, 23, 42, 0.24);
  font: inherit;
  cursor: pointer;
}

.premium-studio-theme .sp-admin-crm-shortcuts button:hover,
.premium-studio-theme .sp-admin-crm-shortcuts button:focus-visible {
  border-color: #60a5fa;
  background: rgba(30, 64, 175, 0.3);
  transform: translateY(-2px);
}

.premium-studio-theme .sp-admin-crm-shortcuts strong {
  font-size: 1.02rem;
}

.premium-studio-theme .sp-admin-crm-shortcuts span {
  color: #bfdbfe;
  font-size: 0.84rem;
  line-height: 1.45;
}

.premium-studio-theme .sp-regular-order-list > article {
  display: grid !important;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 0.75fr) minmax(160px, 0.8fr) !important;
}

.premium-studio-theme .sp-regular-order-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: 100%;
}

.premium-studio-theme .sp-regular-order-actions button {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* One CRM language for all four customer areas. The underlying actions and
   data sources remain separate, while headings, lists and metrics feel like
   one operational workspace. */
.premium-studio-theme .sp-crm-customer-area {
  padding: clamp(18px, 3vw, 28px);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.premium-studio-theme .sp-crm-customer-area > .sp-section-heading {
  margin-bottom: 2px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
}

.premium-studio-theme .sp-crm-customer-area .sp-offer-summary-grid article,
.premium-studio-theme .sp-admin-business-totals article {
  min-height: 92px;
  align-content: center;
}

.premium-studio-theme .sp-studio-customers-admin .sp-customer-list,
.premium-studio-theme .sp-premium-order-list,
.premium-studio-theme .sp-regular-order-list {
  gap: 10px;
}

.premium-studio-theme .sp-studio-customers-admin .sp-customer-list > button,
.premium-studio-theme .sp-premium-order-list > article,
.premium-studio-theme .sp-regular-order-list > article {
  border-radius: 16px;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.07);
}

.premium-studio-theme[data-theme="day"] .sp-crm-customer-area {
  border-color: #c7d7f1;
  background: linear-gradient(145deg, #ffffff, #f5f8ff);
}

.premium-studio-theme[data-theme="day"] .sp-admin-title,
.premium-studio-theme[data-theme="day"] .sp-admin-crm-overview,
.premium-studio-theme[data-theme="day"] .sp-admin-secondary-nav {
  border-color: #c7d7f1;
  background:
    radial-gradient(circle at 12% 20%, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(145deg, #ffffff, #eef4ff);
}

.premium-studio-theme[data-theme="day"] .sp-admin-crm-overview p,
.premium-studio-theme[data-theme="day"] .sp-admin-secondary-nav summary small {
  color: #526174;
}

.premium-studio-theme[data-theme="day"] .sp-admin-crm-shortcuts button,
.premium-studio-theme[data-theme="day"] .sp-admin-secondary-nav button,
.premium-studio-theme[data-theme="day"] .sp-admin-dashboard-home,
.premium-studio-theme[data-theme="day"] .sp-admin-business-totals article {
  color: #172554;
  border-color: #c7d7f1;
  background: #f5f8ff;
}

.premium-studio-theme[data-theme="day"] .sp-admin-dashboard-home small,
.premium-studio-theme[data-theme="day"] .sp-admin-business-totals span,
.premium-studio-theme[data-theme="day"] .sp-admin-business-totals small {
  color: #526174;
}

.premium-studio-theme[data-theme="day"] .sp-admin-dashboard-home[aria-pressed="true"] {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.premium-studio-theme[data-theme="day"] .sp-admin-dashboard-home[aria-pressed="true"] small {
  color: #dbeafe;
}

.premium-studio-theme[data-theme="day"] .sp-admin-crm-shortcuts span {
  color: #526174;
}

.premium-studio-theme[data-theme="day"] .sp-admin-secondary-nav summary::after {
  color: #1d4ed8;
  background: #dbeafe;
}

.premium-studio-theme[data-theme="day"] .sp-admin-secondary-nav button[aria-pressed="true"] {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #1e40af, #2563eb);
}

.premium-studio-theme[data-theme="day"] .sp-regular-order-list .sp-status[data-status="pending"] {
  color: #92400e;
  border: 1px solid #fcd34d;
  background: #fffbeb;
}

.premium-studio-theme[data-theme="day"] .sp-regular-order-list .sp-status[data-status="active"] {
  color: #065f46;
  border: 1px solid #6ee7b7;
  background: #ecfdf5;
}

@media (max-width: 900px) {
  .premium-studio-theme .sp-admin-crm-shortcuts,
  .premium-studio-theme .sp-admin-business-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .premium-studio-theme .sp-admin-view {
    width: 100%;
    gap: 14px;
    padding-inline: 12px;
    overflow: visible;
  }

  .premium-studio-theme .sp-admin-title {
    min-height: 112px;
    padding: 20px 18px;
  }

  .premium-studio-theme .sp-admin-view > .sp-admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .premium-studio-theme .sp-admin-view > .sp-admin-tabs button {
    min-height: 62px;
    padding: 9px 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    text-align: start;
  }

  .premium-studio-theme .sp-admin-view > .sp-admin-tabs .assisted-tab-badge {
    position: absolute;
    inset-block-start: 4px;
    inset-inline-start: 4px;
  }

  .premium-studio-theme .sp-admin-secondary-nav summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .premium-studio-theme .sp-admin-secondary-nav summary small {
    display: none;
  }

  .premium-studio-theme .sp-admin-secondary-nav > div,
  .premium-studio-theme .sp-admin-crm-shortcuts,
  .premium-studio-theme .sp-admin-business-totals {
    grid-template-columns: 1fr;
  }

  .premium-studio-theme .sp-admin-dashboard-home {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .premium-studio-theme .sp-admin-dashboard-home b {
    display: none;
  }

  .premium-studio-theme .sp-admin-crm-shortcuts button {
    min-height: 86px;
  }

  .premium-studio-theme .sp-regular-order-list > article {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 15px !important;
  }

  .premium-studio-theme .sp-regular-order-identity,
  .premium-studio-theme .sp-regular-order-status,
  .premium-studio-theme .sp-regular-order-details {
    width: 100%;
  }

  .premium-studio-theme .sp-regular-order-status,
  .premium-studio-theme .sp-regular-order-details {
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
  }

  .premium-studio-theme .sp-regular-order-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .premium-studio-theme .sp-regular-order-actions button {
    width: 100% !important;
    min-height: 50px;
    white-space: normal;
  }

  .premium-studio-theme .sp-crm-customer-area {
    padding: 15px;
    border-radius: 20px;
  }
}

@media (max-width: 420px) {
  .premium-studio-theme .sp-admin-view > .sp-admin-tabs button {
    font-size: 0.82rem;
  }

  .premium-studio-theme .sp-admin-title h2 {
    font-size: 28px;
  }
}

/* Unified CRM shell v2. The runtime reports and the native Studio Pro areas
   share one fixed workspace, one navigation bar and exactly one vertical
   scroller. React-owned nodes are never moved or cloned. */
html.runtime-crm-open,
body.runtime-crm-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.tool-runtime-admin-dock[data-dock-collapsed="false"] {
  position: fixed;
  z-index: 260;
  inset:
    var(--runtime-crm-top, 76px)
    var(--runtime-crm-right, 0px)
    var(--runtime-crm-bottom, 0px)
    var(--runtime-crm-left, 0px);
  width: auto;
  max-height: none;
  margin: 0;
  padding: clamp(10px, 1.8vw, 18px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.12), transparent 31rem),
    linear-gradient(145deg, #eef4ff, #e5edfb);
  box-shadow: none;
  backdrop-filter: none;
  scroll-behavior: auto;
}

.tool-runtime-crm-chrome {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  gap: 8px;
  margin: -2px 0 12px;
  padding: 2px 0 2px;
  background: linear-gradient(180deg, #edf3ff 0%, #edf3ff 88%, rgba(237, 243, 255, 0));
}

.tool-runtime-crm-header {
  min-height: 92px;
  margin: 0;
  padding: clamp(15px, 2.2vw, 22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(23, 37, 84, 0.16);
}

.tool-runtime-crm-header h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
}

.tool-runtime-crm-tabs {
  position: static;
  top: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 7px;
  border-color: #d2deef;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(23, 37, 84, 0.09);
}

.tool-runtime-crm-tabs button {
  min-height: 46px;
  white-space: nowrap;
}

.tool-runtime-crm-secondary {
  margin: 0;
  padding: 0;
  display: block;
  border: 1px solid #d2deef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 18px rgba(23, 37, 84, 0.07);
}

.tool-runtime-crm-secondary > summary {
  min-height: 44px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  list-style: none;
  cursor: pointer;
}

.tool-runtime-crm-secondary > summary::-webkit-details-marker {
  display: none;
}

.tool-runtime-crm-secondary > summary::after {
  content: "+";
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border-radius: 9px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 19px;
  font-weight: 900;
}

.tool-runtime-crm-secondary[open] > summary::after {
  content: "−";
}

.tool-runtime-crm-secondary > summary span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.tool-runtime-crm-secondary > summary strong {
  color: #172554;
  font-size: 0.84rem;
}

.tool-runtime-crm-secondary > summary small {
  color: #64748b;
  font-size: 0.72rem;
}

.tool-runtime-crm-secondary > div {
  padding: 0 8px 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.tool-runtime-crm-secondary:not([open]) > div {
  display: none;
}

.tool-runtime-crm-secondary button {
  min-height: 40px;
  color: #526174;
  border-color: #d9e2f0;
  background: #f5f8ff;
}

.tool-runtime-crm-secondary button[aria-pressed="true"] {
  color: #fff;
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #1e40af, #2563eb);
}

.tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-section,
.tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-offer-admin,
.tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-admin-quick-actions {
  width: min(100%, 1240px);
  margin-inline: auto;
}

.tool-runtime-admin-dock[data-dock-collapsed="false"] > .tool-runtime-crm-chrome {
  width: min(100%, 1240px);
  margin-inline: auto;
}

.sp-admin-view[data-runtime-crm-mode="overlay"] > * {
  visibility: hidden !important;
  pointer-events: none !important;
}

.sp-admin-view[data-runtime-crm-mode="native"] {
  position: fixed !important;
  z-index: 250 !important;
  inset:
    var(--runtime-crm-top, 76px)
    var(--runtime-crm-right, 0px)
    var(--runtime-crm-bottom, 0px)
    var(--runtime-crm-left, 0px) !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding:
    var(--runtime-crm-native-offset, 222px)
    clamp(10px, 2.4vw, 30px)
    max(24px, env(safe-area-inset-bottom, 0px)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.12), transparent 31rem),
    linear-gradient(145deg, #eef4ff, #e5edfb) !important;
  scroll-behavior: auto;
}

.sp-admin-view[data-runtime-crm-mode="native"] > :not(.sp-admin-title):not(.sp-admin-tabs) {
  width: min(100%, 1240px);
  margin-inline: auto;
}

.premium-studio-theme[data-theme="day"] .sp-admin-view[data-runtime-crm-mode="native"] {
  color: #172554 !important;
}

.premium-studio-theme[data-theme="day"] .sp-admin-view[data-runtime-crm-mode="native"] .sp-metric-grid > *,
.premium-studio-theme[data-theme="day"] .sp-admin-view[data-runtime-crm-mode="native"] > .sp-section {
  color: #172554 !important;
  border-color: #c8d8ef !important;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(23, 37, 84, 0.08);
  opacity: 1 !important;
}

.tool-runtime-admin-dock[data-native-bridge="true"][data-dock-collapsed="false"] {
  inset:
    var(--runtime-crm-top, 76px)
    var(--runtime-crm-right, 0px)
    var(--runtime-crm-bottom, 0px)
    var(--runtime-crm-left, 0px);
  width: auto;
  height: auto;
  max-height: none;
  padding: clamp(10px, 1.8vw, 18px);
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.tool-runtime-admin-dock[data-native-bridge="true"] .tool-runtime-crm-chrome {
  pointer-events: auto;
}

.tool-runtime-admin-dock[data-native-bridge="true"] > :not(.tool-runtime-crm-chrome) {
  display: none !important;
}

@media (max-width: 760px) {
  .tool-runtime-admin-dock[data-dock-collapsed="false"],
  .tool-runtime-admin-dock[data-native-bridge="true"][data-dock-collapsed="false"] {
    inset:
      var(--runtime-crm-top, 68px)
      var(--runtime-crm-right, 0px)
      var(--runtime-crm-bottom, 0px)
      var(--runtime-crm-left, 0px);
    padding: 7px 7px max(12px, env(safe-area-inset-bottom, 0px));
    scrollbar-gutter: auto;
  }

  .tool-runtime-crm-chrome {
    gap: 6px;
    margin-bottom: 9px;
  }

  .tool-runtime-crm-header {
    min-height: 76px;
    padding: 12px 14px;
    align-items: flex-start;
    flex-direction: row;
  }

  .tool-runtime-crm-header h2 {
    font-size: 1.18rem;
    line-height: 1.25;
  }

  .tool-runtime-crm-header small {
    font-size: 0.7rem;
  }

  .tool-runtime-crm-header-status {
    min-height: 28px;
    padding: 0.3rem 0.55rem;
    font-size: 0.68rem;
  }

  .tool-runtime-crm-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .tool-runtime-crm-tabs::-webkit-scrollbar {
    display: none;
  }

  .tool-runtime-crm-tabs button,
  .tool-runtime-crm-tabs button:first-child {
    min-width: max-content;
    min-height: 42px;
    padding-inline: 14px;
    flex: 0 0 auto;
    grid-column: auto;
    scroll-snap-align: start;
    font-size: 0.78rem;
  }

  .tool-runtime-crm-secondary > summary {
    min-height: 40px;
    padding-block: 6px;
  }

  .tool-runtime-crm-secondary > summary small {
    display: none;
  }

  .tool-runtime-crm-secondary > div {
    grid-template-columns: 1fr;
  }

  .tool-runtime-crm-dashboard-grid {
    gap: 9px;
  }

  .tool-runtime-crm-dashboard-grid button {
    min-height: 112px;
    padding: 14px;
  }

  .sp-admin-view[data-runtime-crm-mode="native"] {
    inset:
      var(--runtime-crm-top, 68px)
      var(--runtime-crm-right, 0px)
      var(--runtime-crm-bottom, 0px)
      var(--runtime-crm-left, 0px) !important;
    padding:
      var(--runtime-crm-native-offset, 196px)
      7px
      max(18px, env(safe-area-inset-bottom, 0px)) !important;
    scrollbar-gutter: auto;
  }

  .sp-admin-view[data-runtime-crm-mode="native"] .sp-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .tool-runtime-crm-header-status {
    display: none;
  }

  .tool-runtime-crm-header {
    min-height: 68px;
  }

  .tool-runtime-crm-dashboard-grid button {
    min-height: 104px;
  }
}

/* Full-screen CRM workspace v3. The manager area is a page, not a floating
   card. Native Studio Pro sections remain the source of truth, while the
   runtime navigation stays above them without placing a translucent layer
   over the customer data. */
.tool-runtime-admin-dock[data-dock-collapsed="false"] {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #edf3ff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.tool-runtime-admin-dock[data-dock-collapsed="false"] > .tool-runtime-crm-chrome {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.tool-runtime-crm-chrome {
  gap: 0;
  padding: 0;
  background: #edf3ff;
  box-shadow: 0 8px 24px rgba(23, 37, 84, 0.08);
}

.tool-runtime-crm-header {
  min-height: 76px;
  padding: 14px clamp(16px, 3vw, 34px);
  border: 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.5);
  border-radius: 0;
  box-shadow: none;
}

.tool-runtime-crm-tabs {
  margin: 0;
  padding: 8px clamp(10px, 2vw, 24px);
  border: 0;
  border-bottom: 1px solid #d6e0ef;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.tool-runtime-crm-secondary {
  border-width: 0 0 1px;
  border-color: #d6e0ef;
  border-radius: 0;
  background: #f8fbff;
  box-shadow: none;
}

.tool-runtime-crm-secondary > summary {
  padding-inline: clamp(14px, 2.5vw, 30px);
}

.tool-runtime-crm-secondary > div {
  padding-inline: clamp(14px, 2.5vw, 30px);
}

.tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-section,
.tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-offer-admin,
.tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-admin-quick-actions {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(16px, 2.4vw, 30px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:has(.premium-studio-theme[data-theme="day"])
  .tool-runtime-admin-dock[data-native-bridge="true"][data-dock-collapsed="false"],
.tool-runtime-admin-dock[data-native-bridge="true"][data-dock-collapsed="false"] {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.sp-admin-view[data-runtime-crm-mode="native"] {
  background: #edf3ff !important;
  color: #172554 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.sp-admin-view[data-runtime-crm-mode="native"] > :not(.sp-admin-title):not(.sp-admin-tabs) {
  width: min(100%, 1480px);
}

.premium-studio-theme[data-theme="day"]
  .sp-admin-view[data-runtime-crm-mode="native"] > .sp-section {
  padding: clamp(14px, 2vw, 26px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.premium-studio-theme[data-theme="day"]
  .sp-admin-view[data-runtime-crm-mode="native"] :is(h1, h2, h3, h4, p, span, strong, small, label) {
  opacity: 1 !important;
}

.premium-studio-theme[data-theme="day"]
  .sp-admin-view[data-runtime-crm-mode="native"] > .sp-section :is(h1, h2, h3, h4, strong, label) {
  color: #172554;
}

.premium-studio-theme[data-theme="day"]
  .sp-admin-view[data-runtime-crm-mode="native"] > .sp-section :is(p, small) {
  color: #526174;
}

@media (max-width: 760px) {
  .tool-runtime-crm-header {
    min-height: 64px;
    padding: 10px 13px;
  }

  .tool-runtime-crm-header h2 {
    font-size: 1.08rem;
  }

  .tool-runtime-crm-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 7px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .tool-runtime-crm-tabs button,
  .tool-runtime-crm-tabs button:first-child {
    min-width: 0;
    min-height: 40px;
    padding: 7px 4px;
    flex: initial;
    white-space: normal;
    line-height: 1.15;
    font-size: 0.72rem;
  }

  .tool-runtime-crm-secondary > summary {
    padding-inline: 11px;
  }

  .tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-section,
  .tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-offer-admin,
  .tool-runtime-admin-dock[data-dock-collapsed="false"] > .sp-admin-quick-actions {
    padding: 12px 10px max(18px, env(safe-area-inset-bottom, 0px));
  }

  .sp-admin-view[data-runtime-crm-mode="native"] {
    padding:
      var(--runtime-crm-native-offset, 196px)
      0
      max(18px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .premium-studio-theme[data-theme="day"]
    .sp-admin-view[data-runtime-crm-mode="native"] > .sp-section {
    padding: 12px 10px 24px !important;
  }
}

@media (max-width: 420px) {
  .tool-runtime-crm-header {
    min-height: 58px;
  }

  .tool-runtime-crm-header small {
    display: none;
  }

  .tool-runtime-crm-tabs button,
  .tool-runtime-crm-tabs button:first-child {
    font-size: 0.68rem;
  }
}

/* Studio Pro business summary v5. The source metrics remain the native
   manager cards; this compact strip only makes them easier to scan before the
   existing customer list. */
.tool-runtime-crm-studio-summary {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(14px, 2.2vw, 24px);
  display: grid;
  gap: 12px;
  border-bottom: 1px solid #d6e0ef;
  background: #f8fbff;
}

.sp-admin-view[data-runtime-crm-mode="native"] > .tool-runtime-crm-studio-summary {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  border: 1px solid #d6e0ef;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(23, 37, 84, 0.06);
}

.tool-runtime-crm-studio-summary[hidden] {
  display: none !important;
}

.tool-runtime-crm-studio-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tool-runtime-crm-studio-heading > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tool-runtime-crm-studio-heading small {
  color: #3b82f6;
  font-weight: 850;
}

.tool-runtime-crm-studio-heading h3 {
  margin: 0;
  color: #172554;
  font-size: clamp(1.12rem, 2.3vw, 1.55rem);
}

.tool-runtime-crm-studio-heading > span {
  flex: 0 0 auto;
  padding: 0.5rem 0.72rem;
  border: 1px solid #f0c46b;
  border-radius: 999px;
  color: #854d0e;
  background: #fff9e8;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.tool-runtime-crm-studio-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tool-runtime-crm-studio-metrics article {
  min-width: 0;
  min-height: 72px;
  padding: 11px 13px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #d4e0f0;
  border-radius: 13px;
  background: #ffffff;
}

.tool-runtime-crm-studio-metrics span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 750;
}

.tool-runtime-crm-studio-metrics strong {
  min-width: 0;
  color: #172554;
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .tool-runtime-crm-studio-summary {
    padding: 12px 10px;
  }

  .sp-admin-view[data-runtime-crm-mode="native"] > .tool-runtime-crm-studio-summary {
    width: calc(100% - 14px);
    margin: 0 7px 10px;
    border-radius: 15px;
  }

  .tool-runtime-crm-studio-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tool-runtime-crm-studio-heading > span {
    white-space: normal;
  }

  .tool-runtime-crm-studio-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .tool-runtime-crm-studio-metrics article {
    min-height: 66px;
    padding: 9px 10px;
  }
}
