/* Service Provider Detail layout. Visual primitives live in admin-compact.css. */

article.content:has(.spd-page) .mud-main-content,
article.content:has(.spd-page) .mud-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

article.content:has(.spd-page) .mud-container {
  container-type: inline-size;
  container-name: spd;
}

.spd-page {
  min-width: 0;
  overflow-x: hidden;
}

.spd-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid var(--mrp-border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.spd-header.is-editing {
  background: #f2fbfe;
  box-shadow: inset 0 -2px 0 var(--mrp-brand);
}

.spd-id {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 0;
}

.spd-back {
  font-size: 12.5px;
  color: var(--mrp-ink-link);
  text-decoration: none;
}

.spd-back:hover {
  color: var(--mrp-ink-link-hover);
}

.spd-crumb {
  color: #b6c2ca;
}

.spd-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--mrp-text);
}

.spd-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.spd-meta {
  font-size: 12px;
  color: var(--mrp-label);
  white-space: nowrap;
}

.spd-editing {
  font-size: 12px;
  color: var(--mrp-tint-ink);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.spd-editing-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--mrp-brand);
}

.spd-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 20px 20px;
  min-width: 0;
}

.spd-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.spd-sec {
  height: 100%;
}

.spd-sec.basic { grid-column: 1; grid-row: 1; }
.spd-sec.account { grid-column: 2; grid-row: 1; }
.spd-sec.address { grid-column: 1; grid-row: 2; }
.spd-sec.business { grid-column: 2; grid-row: 2; }
.spd-sec.compliance { grid-column: 1; grid-row: 3; }
.spd-sec.audit { grid-column: 2; grid-row: 3; }

.spd-page .mrp-r {
  align-items: start;
  padding-top: 4px;
  padding-bottom: 4px;
}

.spd-page .mrp-rv {
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  overflow-wrap: anywhere;
}

.spd-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.spd-view-provider {
  margin-right: auto;
}

.spd-actions-end {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.spd-missing {
  cursor: help;
}

.spd-cal-actions-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--mrp-divider);
}

.spd-cal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.spd-cal-note,
.spd-cal-msg {
  margin: 4px 0 0;
  font-size: 12px;
}

.mrp-fields .spd-cal-msg {
  grid-column: 1 / -1;
}

.spd-cal-note {
  color: var(--mrp-label);
}

.spd-cal-msg.ok { color: var(--mrp-ok-ink); }
.spd-cal-msg.fail { color: var(--mrp-fail-ink); }

.spd-workspace {
  background: #fff;
  border: 1px solid var(--mrp-border);
  border-radius: 10px;
  min-width: 0;
}

.spd-tab-body {
  padding: 12px 14px;
  min-width: 0;
}

.spd-users {
  font-size: 13px;
  color: var(--mrp-text);
}

.spd-user-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.spd-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spd-user-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mrp-label);
  padding: 6px 10px;
  border-bottom: 1px solid var(--mrp-border);
  white-space: nowrap;
}

.spd-user-table td {
  padding: 6px 10px;
  border-bottom: 1px dashed var(--mrp-divider);
  vertical-align: middle;
  color: var(--mrp-text);
}

.spd-user-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}

.spd-user-form {
  border-top: 1px solid var(--mrp-border);
  padding-top: 12px;
}

.spd-user-form h3,
.spd-users .spd-svc-head h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mrp-text);
}

.spd-user-hint,
.spd-user-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--mrp-label);
}

.spd-user-note {
  color: var(--mrp-warn-ink);
}

.spd-user-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.spd-user-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mrp-text);
}

.spd-user-check em {
  font-style: normal;
  color: var(--mrp-label);
  font-size: 12px;
}

.spd-user-check input {
  accent-color: #007a99;
}

.spd-budget-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.spd-page .spd-docs,
.spd-page .spd-docs .mud-table,
.spd-page .spd-docs .mud-table-cell,
.spd-page .spd-docs .mud-typography,
.spd-page .spd-docs .mud-input,
.spd-page .spd-docs .mud-input-slot,
.spd-page .spd-docs .mud-button,
.spd-page .spd-docs .mud-button-label,
.spd-page .spd-docs .mud-select,
.spd-page .spd-docs .mud-input-label {
  font-family: Inter, system-ui, sans-serif !important;
}

.spd-page .spd-docs .mud-table-cell {
  font-size: 13px !important;
  line-height: 1.35;
  color: var(--mrp-text);
}

.spd-page .spd-docs .mud-table-head .mud-table-cell {
  font-size: 12px !important;
  font-weight: 600;
  color: var(--mrp-label);
}

.spd-page .spd-docs .mud-button,
.spd-page .spd-docs .mud-button-label,
.spd-page .spd-docs .mud-input,
.spd-page .spd-docs .mud-input-slot,
.spd-page .spd-docs .mud-input-label {
  font-size: 13px !important;
}

.spd-brand-images {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
}

.spd-brand .mrp-sec {
  position: relative;
}

.spd-brand-images .mrp-sec {
  height: 100%;
}

.spd-brand-preview {
  display: flex;
  align-items: center;
  min-height: 84px;
  margin-bottom: 8px;
}

.spd-brand-preview img {
  max-width: 234px;
  max-height: 84px;
  object-fit: contain;
  border: 1px solid var(--mrp-border);
  border-radius: 6px;
  background: #fff;
}

.spd-brand-images .mrp-sec:nth-child(2) .spd-brand-preview {
  min-height: 180px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: #f7fbfc;
  border: 1px solid var(--mrp-border);
  border-radius: 6px;
}

.spd-brand-images .mrp-sec:nth-child(2) .spd-brand-preview img {
  width: 100%;
  max-width: 100%;
  max-height: 168px;
  border: 0;
}

.spd-brand-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.spd-brand-details {
  margin-top: 8px;
  font-size: 13px;
}

.spd-brand-details summary {
  cursor: pointer;
  color: var(--mrp-ink-link);
  font-size: 12px;
  font-weight: 600;
}

.spd-brand-html {
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--mrp-border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.spd-brand .quill-editor-wrapper .mb-2 {
  margin-bottom: 6px !important;
}

.spd-brand .mud-button,
.spd-brand .mud-button-label,
.spd-brand .mud-input,
.spd-brand .mud-input-slot,
.spd-brand .mud-input-label {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 12px !important;
}

.spd-brand .ql-toolbar.ql-snow {
  padding: 4px 6px;
}

@media (max-width: 699px) {
  .spd-brand-images {
    grid-template-columns: minmax(0, 1fr);
  }
}

.spd-notes {
  font-size: 13px;
  color: var(--mrp-text);
}

.spd-notes > h3,
.spd-notes-log h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mrp-text);
}

.spd-notes .spd-note-row {
  align-items: start;
  padding: 6px 0;
}

.spd-notes textarea.mrp-in {
  height: auto;
  min-height: 58px;
  padding: 6px 10px;
  line-height: 1.4;
  resize: vertical;
}

.spd-notes .mrp-val-banner {
  margin-bottom: 8px;
}

.spd-notes-log {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--mrp-border);
}

.spd-note-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.spd-page .photo-library-container,
.spd-photos,
.spd-page .photo-library-container .mud-typography,
.spd-photos .mud-typography,
.spd-page .photo-library-container .mud-button,
.spd-page .photo-library-container .mud-button-label,
.spd-photos .mud-button,
.spd-photos .mud-button-label,
.spd-page .photo-library-container .mud-chip,
.spd-photos .mud-chip,
.spd-page .photo-library-container .mud-expand-panel-header,
.spd-page .photo-library-container .mud-expand-panel-text,
.spd-photos .mud-input,
.spd-photos .mud-input-slot,
.spd-photos .mud-input-label,
.spd-photos .mud-input-helper-text,
.spd-photos .mud-alert-message {
  font-family: Inter, system-ui, sans-serif !important;
}

.spd-page .photo-library-container .mud-typography-h5,
.spd-photos .mud-dialog-title,
.spd-photos .mud-dialog-title .mud-typography {
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  color: var(--mrp-text) !important;
}

.spd-page .photo-library-container .mud-typography-h6,
.spd-photos .mud-typography-h6 {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.spd-page .photo-library-container .mud-typography-subtitle1,
.spd-page .photo-library-container .mud-typography-body1,
.spd-page .photo-library-container .mud-typography-body2,
.spd-photos .mud-typography-body1,
.spd-photos .mud-typography-body2,
.spd-photos .mud-alert-message,
.spd-page .photo-library-container .mud-button,
.spd-page .photo-library-container .mud-button-label,
.spd-photos .mud-button,
.spd-photos .mud-button-label,
.spd-photos .mud-input,
.spd-photos .mud-input-slot,
.spd-photos .mud-input-label,
.spd-page .photo-library-container .mud-expand-panel-header,
.spd-page .photo-library-container .mud-expand-panel-text {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.spd-page .photo-library-container .mud-typography-subtitle1,
.spd-page .photo-library-container .mud-typography-body1,
.spd-page .photo-library-container .mud-typography-body2,
.spd-photos .mud-typography-body1,
.spd-photos .mud-typography-body2 {
  color: var(--mrp-text) !important;
}

.spd-page .photo-library-container .mud-typography-subtitle1 {
  font-weight: 600 !important;
}

.spd-page .photo-library-container .mud-typography-caption,
.spd-photos .mud-typography-caption,
.spd-photos .mud-input-helper-text {
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: var(--mrp-label) !important;
}

.spd-page .photo-library-container .mud-chip {
  font-size: 12px !important;
  font-weight: 600 !important;
}

.spd-page .photo-library-container .project-header .mud-typography,
.spd-page .photo-library-container .project-header .mud-typography-h6,
.spd-page .photo-library-container .project-header .mud-typography-caption,
.spd-page .photo-library-container .photo-overlay,
.spd-page .photo-library-container .photo-overlay .mud-typography,
.spd-photos .gallery-info,
.spd-photos .gallery-info .mud-typography,
.spd-photos .gallery-info .mud-typography-h6,
.spd-photos .gallery-info .mud-typography-body2,
.spd-photos .gallery-info .mud-typography-caption {
  color: #fff !important;
}

.spd-page .photo-library-container .photo-overlay,
.spd-page .photo-library-container .photo-order-badge {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}

.spd-page .photo-library-container .photo-order-badge {
  font-size: 11px;
  font-weight: 600;
}

.spd-page .photo-library-container .empty-state {
  color: var(--mrp-muted);
}

.spd-review-summary {
  margin-bottom: 8px;
}

.spd-review-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.spd-review-stat {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--mrp-text);
}

.spd-review-stat-label,
.spd-review-when {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mrp-label);
}

.spd-review-stat-label {
  display: block;
  margin-top: 2px;
}

.spd-review-overall {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spd-review-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--mrp-text-2);
}

.spd-review-subs b {
  font-weight: 600;
  color: var(--mrp-text);
}

.spd-review-when {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 12px;
}

.spd-review-tabs {
  margin-bottom: 8px;
}

.spd-review-title {
  font-weight: 600;
}

.spd-review-comment {
  color: var(--mrp-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spd-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--mrp-label);
}

.spd-review-meta a {
  color: var(--mrp-ink-link);
  text-decoration: none;
}

.spd-review-table td {
  vertical-align: top;
}

.spd-review-table td:first-child {
  white-space: nowrap;
}

.spd-review-table .mrp-pill + .mrp-pill {
  margin-left: 4px;
}

.spd-review-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--mrp-label);
}

.spd-reviews .mud-rating-item .mud-icon-root {
  font-size: 16px;
}

.spd-review-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.spd-page .accreditations-container {
  padding: 0;
  font-size: 13px;
  color: var(--mrp-text);
}

.spd-page .accreditations-container,
.spd-accred,
.spd-page .accreditations-container .mud-typography,
.spd-accred .mud-typography,
.spd-page .accreditations-container .mud-button,
.spd-page .accreditations-container .mud-button-label,
.spd-accred .mud-button,
.spd-accred .mud-button-label,
.spd-page .accreditations-container .mud-chip,
.spd-accred .mud-chip,
.spd-page .accreditations-container .mud-link,
.spd-accred .mud-input,
.spd-accred .mud-input-slot,
.spd-accred .mud-input-label,
.spd-accred .mud-input-helper-text,
.spd-accred-option,
.spd-accred-option .mud-typography {
  font-family: Inter, system-ui, sans-serif !important;
}

.spd-page .accreditations-container .mud-typography-h5,
.spd-accred .mud-dialog-title .mud-typography {
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  color: var(--mrp-text) !important;
}

.spd-page .accreditations-container .mud-typography-h6,
.spd-accred .mud-typography-h6,
.spd-accred .mud-typography-subtitle2 {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.spd-page .accreditations-container .mud-typography-body1,
.spd-page .accreditations-container .mud-typography-body2,
.spd-accred .mud-typography-body1,
.spd-accred .mud-typography-body2,
.spd-page .accreditations-container .mud-button,
.spd-page .accreditations-container .mud-button-label,
.spd-accred .mud-button,
.spd-accred .mud-button-label,
.spd-page .accreditations-container .mud-link,
.spd-accred .mud-input,
.spd-accred .mud-input-slot,
.spd-accred .mud-input-label {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.spd-page .accreditations-container .mud-card-content .mud-typography-body2,
.spd-accred .mud-typography-body1,
.spd-accred .mud-typography-body2 {
  color: var(--mrp-text) !important;
}

.spd-page .accreditations-container .mud-typography-caption,
.spd-accred .mud-typography-caption,
.spd-accred .mud-input-helper-text,
.spd-accred-option .mud-typography-caption {
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: var(--mrp-label) !important;
}

.spd-page .accreditations-container .accreditation-header .mud-typography,
.spd-page .accreditations-container .accreditation-header .mud-typography-h6,
.spd-page .accreditations-container .accreditation-header .mud-typography-caption {
  color: #fff !important;
}

.spd-page .accreditations-container .mud-paper.pa-4 {
  padding: 12px !important;
}

.spd-page .accreditations-container .accreditation-header {
  padding: 8px 10px;
}

.spd-page .accreditations-container .accreditation-logo {
  width: 44px;
  height: 44px;
  margin-right: 10px;
}

.spd-page .accreditations-container .accreditation-card {
  margin-bottom: 0;
}

.spd-page .accreditations-container .certificate-preview {
  max-width: 100%;
  max-height: 120px;
}

.spd-page .accreditations-container .mud-card-content {
  padding: 10px 12px !important;
}

.spd-page .accreditations-container .mud-card-actions {
  padding: 2px 8px 8px !important;
}

.spd-page .accreditations-container .empty-state {
  padding: 28px 16px;
  color: var(--mrp-muted);
}

.spd-page .accreditations-container .mb-4 {
  margin-bottom: 10px !important;
}

.spd-accred-option {
  min-height: 36px;
}

.spd-accred-option img {
  width: 28px !important;
  height: 28px !important;
}

.spd-page .checklist-container {
  padding: 0;
  font-size: 13px;
  color: var(--mrp-text);
}

.spd-page .checklist-container,
.spd-check,
.spd-page .checklist-container .mud-table,
.spd-page .checklist-container .mud-table-cell,
.spd-page .checklist-container .mud-typography,
.spd-check .mud-typography,
.spd-page .checklist-container .mud-button,
.spd-page .checklist-container .mud-button-label,
.spd-check .mud-button,
.spd-check .mud-button-label,
.spd-page .checklist-container .mud-chip,
.spd-check .mud-chip,
.spd-page .checklist-container .mud-table-pagination,
.spd-check .mud-input,
.spd-check .mud-input-slot,
.spd-check .mud-input-label,
.spd-check .mud-input-helper-text,
.spd-check .mud-select,
.spd-check .mud-alert-message {
  font-family: Inter, system-ui, sans-serif !important;
}

.spd-page .checklist-container .header-section {
  padding: 10px 12px;
}

.spd-page .checklist-container .header-section .mud-typography-h5 {
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  color: #fff !important;
}

.spd-page .checklist-container .header-section .mud-typography-body2 {
  font-size: 13px !important;
  line-height: 1.35 !important;
  color: #fff !important;
}

.spd-page .checklist-container .stats-badge {
  gap: 6px;
  padding: 4px 10px;
  margin-left: 10px;
}

.spd-page .checklist-container .mud-table-cell,
.spd-page .checklist-container .mud-table-cell .mud-typography,
.spd-page .checklist-container .mud-typography-body2,
.spd-check .mud-table-cell,
.spd-check .mud-table-cell .mud-typography,
.spd-check .mud-typography-body2 {
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  color: var(--mrp-text);
}

.spd-page .checklist-container .mud-table-cell {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.spd-page .checklist-container .mud-table-head .mud-table-cell {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--mrp-label) !important;
}

.spd-page .checklist-container .mud-chip,
.spd-check .mud-chip {
  font-size: 12px !important;
  font-weight: 600 !important;
}

.spd-page .checklist-container .mud-button,
.spd-page .checklist-container .mud-button-label,
.spd-check .mud-button,
.spd-check .mud-button-label,
.spd-check .mud-typography-body1,
.spd-check .mud-typography-body2,
.spd-check .mud-input,
.spd-check .mud-input-slot,
.spd-check .mud-input-label,
.spd-check .mud-alert-message,
.spd-page .checklist-container .empty-state .mud-typography-body2 {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.spd-page .checklist-container .empty-state .mud-typography-h6,
.spd-check .mud-typography-h6 {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.spd-check .mud-dialog-title .mud-typography {
  font-size: 16px !important;
  font-weight: 650 !important;
  color: var(--mrp-text) !important;
}

.spd-check .mud-typography-caption,
.spd-check .mud-input-helper-text,
.spd-page .checklist-container .mud-table-pagination {
  font-size: 12px !important;
  color: var(--mrp-label) !important;
}

.spd-page .checklist-container .empty-state {
  padding: 28px 16px;
  color: var(--mrp-muted);
}

.spd-page .checklist-container .table-container {
  max-height: calc(100vh - 280px);
}

.spd-acct,
.spd-acct .mud-typography,
.spd-acct .mud-table,
.spd-acct .mud-table-cell,
.spd-acct .mud-button,
.spd-acct .mud-button-label,
.spd-acct .mud-input,
.spd-acct .mud-input-slot,
.spd-acct .mud-input-label,
.spd-acct .mud-select,
.spd-acct .mud-alert-message,
.spd-acct .mud-link,
.spd-acct p {
  font-family: Inter, system-ui, sans-serif !important;
}

.mud-dialog.spd-acct .mud-dialog-title .mud-typography,
.spd-acct .sp-create-dialog-title .mud-typography {
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  color: var(--mrp-text) !important;
}

.spd-acct .mud-table-cell,
.spd-acct .mud-table-cell .mud-typography,
.spd-acct .mud-button,
.spd-acct .mud-button-label,
.spd-acct .mud-input,
.spd-acct .mud-input-slot,
.spd-acct .mud-input-label,
.spd-acct .mud-alert-message,
.spd-acct .mud-link,
.spd-acct p,
.spd-acct .mud-card-header .mud-typography {
  font-size: 13px !important;
  line-height: 1.35 !important;
}

.spd-acct .mud-table-cell,
.spd-acct .mud-card-header .mud-typography {
  color: var(--mrp-text);
}

.spd-acct .mud-table-head .mud-table-cell {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--mrp-label) !important;
}

.spd-acct .mud-card-header .mud-typography {
  font-weight: 600 !important;
}

.spd-acct .mud-card {
  box-shadow: none !important;
}

.spd-acct .mud-card-header {
  padding: 8px 12px 0 !important;
}

.spd-acct .mud-card-content {
  padding: 8px 12px !important;
}

.spd-acct .mud-alert {
  padding: 6px 10px !important;
}

.spd-acct .mud-table-container {
  max-height: 360px !important;
}

.spd-txn .mud-table-container {
  height: calc(100vh - 200px) !important;
  max-height: calc(100vh - 200px) !important;
}

.spd-credit-errors {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #f0c2bc;
  border-radius: 8px;
  background: #fff6f5;
  color: #8f1d14;
  font-size: 12px;
}

.spd-credit-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.spd-credit-balance {
  display: flex;
  flex-direction: column;
  min-width: 120px;
  margin-right: 6px;
}

.spd-credit-balance span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mrp-label, #5b6670);
}

.spd-credit-balance strong {
  font-size: 16px;
  font-weight: 650;
  color: var(--mrp-text, #1d252c);
}

.spd-credit-bar label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mrp-label, #5b6670);
}

.spd-credit-grow {
  flex: 1 1 180px;
}

.spd-credit-in {
  height: 30px;
  width: 100%;
  min-width: 120px;
  border: 1px solid var(--mrp-border-input, #cfd8de);
  border-radius: 6px;
  padding: 0 8px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mrp-text, #1d252c);
  background: #fff;
}

.spd-credit-save {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #007a99;
  border-radius: 6px;
  background: #007a99;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.spd-credit-save:disabled {
  opacity: 0.6;
  cursor: default;
}

.spd-credit-head {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mrp-text, #1d252c);
}

.spd-credit .mud-table-container {
  height: calc(100vh - 250px) !important;
  max-height: calc(100vh - 250px) !important;
}

.spd-acct .mud-table-cell {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.spd-filters {
  font-size: 13px;
  color: var(--mrp-text);
}

.spd-filter-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 8px;
}

.spd-filter-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 560px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--mrp-border);
  border-radius: 10px;
  background: #fff;
}

.spd-filter-svc {
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--mrp-text);
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.spd-filter-svc:hover {
  background: var(--mrp-tint-soft);
}

.spd-filter-svc.on {
  background: #e1f5fa;
  color: #00566d;
  font-weight: 600;
}

.spd-filter-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spd-filter-tools {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.spd-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spd-filter-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid var(--mrp-border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.spd-filter-opt.off {
  background: var(--mrp-danger-bg);
  border-color: #f0c2bc;
  color: #8f1d14;
}

.spd-filter-opt input {
  accent-color: #007a99;
}

.spd-filter-exclude,
.spd-filter-count {
  color: var(--mrp-warn-ink);
}

.spd-filter-exclude {
  margin: 8px 0 0;
  font-size: 12px;
}

@media (max-width: 799px) {
  .spd-filter-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.spd-account-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 10px;
}

.spd-page .spd-account .mrp-r {
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 16px;
}

.spd-page .spd-account .mrp-rl {
  overflow: visible;
  text-overflow: unset;
  white-space: nowrap;
}

.spd-loading,
.spd-load-error {
  margin: 0;
  padding: 24px 20px;
}

.spd-load-error {
  color: var(--mrp-danger);
}

.spd-svc {
  display: flex;
  flex-wrap: wrap;
}

.spd-svc-pane {
  flex: 1 1 320px;
  min-width: 0;
}

.spd-svc-pane + .spd-svc-pane {
  border-left: 1px solid #e3e9ed;
  background: #fafdfe;
  padding: 12px 16px;
}

.spd-svc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.spd-svc-pane:first-child .spd-svc-head {
  padding: 10px 12px 0;
  margin-bottom: 4px;
}

.spd-svc-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.spd-svc-head span,
.spd-svc-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--mrp-label);
}

.spd-svc-count {
  color: #00607a;
}

.spd-svc-cols {
  columns: 220px 2;
  column-gap: 20px;
}

.spd-svc-group {
  break-inside: avoid;
  margin-bottom: 10px;
}

.spd-svc-group-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--mrp-tint-ink);
  margin-bottom: 4px;
}

.spd-svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.spd-svc-sub {
  font-size: 12px;
  color: var(--mrp-label);
  margin: 2px 0 4px;
}

.spd-tree-filter {
  padding: 0 12px 8px;
}

.spd-tree-list {
  max-height: 480px;
  overflow-y: auto;
  padding: 0 8px 10px;
}

.spd-tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12.5px;
}

.spd-tree-row:hover {
  background: #f2fafc;
}

.spd-tree-row.sel {
  background: #e1f5fa;
}

.spd-tree-row.sel .spd-tree-name {
  font-weight: 600;
  color: #00566d;
}

.spd-tree-row.mid {
  padding-left: 22px;
}

.spd-tree-row.child {
  padding-left: 44px;
}

.spd-tree-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spd-tree-count {
  flex: none;
  font-size: 11px;
  color: #00566d;
}

.spd-tree-expand {
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #4a5560;
  font-size: 14px;
  flex-shrink: 0;
}

.spd-tree-spacer {
  width: 22px;
  flex-shrink: 0;
}

.spd-tree-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #007a99;
  flex-shrink: 0;
}

.spd-page .spd-svc .mud-treeview-item-content {
  min-height: 28px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-radius: 6px;
}

.spd-page .spd-svc .mud-treeview-item-content:hover {
  background: var(--mrp-tint-soft);
}

.spd-page .spd-svc .mud-treeview-item {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.spd-page .spd-svc .mud-treeview-item-content .mud-typography {
  font-size: 12.5px !important;
}

.spd-page .spd-svc .mud-checkbox-true .mud-icon-root,
.spd-page .spd-svc input[type="checkbox"] {
  color: var(--mrp-primary) !important;
  accent-color: var(--mrp-primary);
}

@container spd (max-width: 999px) {
  .spd-sections {
    grid-template-columns: 1fr 1fr;
  }

  .spd-sec.basic,
  .spd-sec.account,
  .spd-sec.address,
  .spd-sec.business,
  .spd-sec.compliance,
  .spd-sec.audit {
    grid-column: auto;
    grid-row: auto;
  }
}

@container spd (max-width: 899px) {
  .spd-meta { display: none; }
  .spd-header-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
  .mrp-fields.w { grid-template-columns: minmax(0, 1fr); }
}

@container spd (max-width: 599px) {
  .spd-header { padding: 10px 12px; }
  .spd-header .spd-meta,
  .spd-header .mrp-kbd { display: none; }
  .spd-main { padding: 10px 12px 16px; }
  .spd-sections { grid-template-columns: minmax(0, 1fr); }
  .mrp-r {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 40px;
  }
  .mrp-in,
  .mrp-sel,
  .mrp-seg { height: 38px; font-size: 14px; }
  .mrp-btn { height: 40px; }
  .mrp-btn.sm { height: 32px; }
  .spd-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--mrp-border);
    margin: 0 -12px;
    padding: 10px 12px;
    z-index: 4;
  }
  .spd-actions-end .mrp-btn { flex: 1; }
  .spd-svc-pane + .spd-svc-pane { border-left: 0; border-top: 1px solid #e3e9ed; }
}

@media (max-width: 999px) {
  .spd-sections {
    grid-template-columns: 1fr 1fr;
  }

  .spd-sec.basic,
  .spd-sec.account,
  .spd-sec.address,
  .spd-sec.business,
  .spd-sec.compliance,
  .spd-sec.audit {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 899px) {
  .spd-meta { display: none; }
  .spd-header-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
  .spd-page .mrp-fields.w { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 599px) {
  .spd-header { padding: 10px 12px; }
  .spd-header .spd-meta,
  .spd-header .mrp-kbd { display: none; }
  .spd-main { padding: 10px 12px 16px; }
  .spd-sections { grid-template-columns: minmax(0, 1fr); }
  .spd-page .mrp-r {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 40px;
  }
  .spd-page .mrp-in,
  .spd-page .mrp-sel,
  .spd-page .mrp-seg { height: 38px; font-size: 14px; }
  .spd-page .mrp-btn { height: 40px; }
  .spd-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--mrp-border);
    margin: 0 -12px;
    padding: 10px 12px;
    z-index: 4;
  }
  .spd-actions-end .mrp-btn { flex: 1; }
  .spd-svc-pane + .spd-svc-pane { border-left: 0; border-top: 1px solid #e3e9ed; }
}

.spd-lead-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 8px;
}

.spd-lead-toolbar h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--mrp-text, #1d252c);
}

.spd-lead-summary {
  margin-bottom: 4px;
}

.spd-lead-hidden {
  display: none !important;
}

.spd-lead {
  background: #fff;
  color: #1d252c;
  font-size: 13px;
}

.spd-lead-dialog {
  font-family: Inter, system-ui, sans-serif;
}

.spd-lead-dialog .mud-dialog-title {
  padding: 12px 16px 4px !important;
}

.spd-lead-dialog .mud-dialog-title .mud-typography {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  color: #1d252c !important;
}

.spd-lead-dialog .mud-dialog-content {
  padding: 0 8px 8px !important;
  font-family: Inter, system-ui, sans-serif;
  color: #1d252c;
}

.spd-lead-dialog .mud-dialog-actions {
  padding: 8px 16px 14px !important;
  gap: 8px;
}

.spd-lead-cancel,
.spd-lead-save {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

.spd-lead-cancel {
  border: 1px solid #cfd8de;
  background: #fff;
  color: #1d252c;
}

.spd-lead-save {
  border: 1px solid #007a99;
  background: #007a99;
  color: #fff;
}

.spd-lead-save:hover {
  background: #006680;
}

.spd-lead-save:disabled,
.spd-lead-cancel:disabled {
  opacity: 0.6;
  cursor: default;
}
