:root {
  --dist-primary: #5d3d68;
  --dist-primary-hover: #4a3154;
  --dist-primary-muted: #a799b7;
  --dist-primary-soft: rgba(93, 61, 104, 0.08);
  --dist-radius-lg: 10px;
  --dist-radius-rounded-5: 0.5rem;
  --dist-radius-pill: 999px;
}

.dist-theme-prosperity {
  --dist-primary: #5d3d68;
  --dist-primary-hover: #4a3154;
  --dist-primary-muted: #a799b7;
  --dist-primary-soft: rgba(93, 61, 104, 0.08);
  --dist-table-header-bg: #5d3d6814;
  --dist-table-header-fg: #101828;
  --dist-radius-lg: 10px;
  --dist-radius-rounded-5: 0.5rem;
  --dist-radius-pill: 999px;
}

.dist-theme-gradingly {
  --dist-primary: #2B85F0;
  --dist-primary-hover: #1976D2;
  --dist-primary-muted: #90C2FF;
  --dist-primary-soft: rgba(25, 118, 210, 0.08);
  --dist-table-header-bg: #f8f9fa;
  --dist-table-header-fg: #101828;
  --dist-radius-lg: 12px;
  --dist-radius-rounded-5: 0.5rem;
  --dist-radius-pill: 999px;
}

.dist-rounded-5 {
  border-radius: var(--dist-radius-rounded-5, 0.5rem) !important;
}

.dist-dashboard {
  --dist-chrome-offset: 3.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
  height: calc(100vh - var(--dist-chrome-offset));
  max-height: calc(100vh - var(--dist-chrome-offset));
  min-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dist-dash-split {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.dist-dash-left {
  width: 50%;
  min-width: 420px;
  border-right: none;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  min-height: 0;
  align-self: stretch;
}

.dist-dash-divider {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  background: #e5e7eb;
}

.dist-dash-right {
  width: 50%;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  min-height: 0;
  align-self: stretch;
}

.dist-detail-mount {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dist-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.dist-search-wrap {
  position: relative;
  width: 200px;
  max-width: 100%;
}

.dist-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0.45;
  pointer-events: none;
}

.dist-search-input {
  width: 100%;
  height: 36px;
  padding-left: 2.25rem;
  padding-right: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--dist-radius-rounded-5);
  font-size: 0.875rem;
  background: #fff;
}

.dist-filter-group {
  display: inline-flex;
  background: #f3f4f6;
  padding: 3px;
  border-radius: var(--dist-radius-rounded-5);
  gap: 2px;
}

.dist-filter-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6b7280;
  border-radius: calc(var(--dist-radius-rounded-5) * 0.65);
  cursor: pointer;
}

.dist-filter-btn:hover {
  color: #374151;
}

.dist-filter-btn.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dist-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 1rem;
  background: var(--dist-primary);
  color: #fff !important;
  border: none;
  border-radius: var(--dist-radius-rounded-5);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
}

.dist-btn-primary:hover {
  background: var(--dist-primary-hover);
  color: #fff;
}

.dist-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.dist-school-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.dist-school-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--dist-table-header-bg, #f4f4f7);
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  padding: 0.5rem 1.5rem;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--dist-table-header-fg, #2d3748);
  white-space: nowrap;
  box-shadow: 0 1px 0 #e5e7eb;
}

.dist-school-table thead th .form-check {
  font-size: 1rem;
  margin-bottom: 0;
}

.dist-th-sort {
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
}

.dist-th-sort-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dist-th-sort-label {
  pointer-events: none;
}

.dist-sort-icons {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 1px;
  color: #4b5563;
  pointer-events: none;
}

.dist-sort-icons .dist-sort-chevron {
  font-size: 0.58rem;
  line-height: 0.65;
  height: 0.65em;
  display: block;
}

.dist-th-actions {
  pointer-events: none;
}

.dist-school-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}

.dist-school-table tbody tr:hover {
  background: #fafafa;
}

.dist-school-table tbody tr.is-selected {
  background: var(--dist-primary-soft);
  box-shadow: inset 3px 0 0 var(--dist-primary);
}

.dist-school-table td {
  padding: 0.5rem 1.5rem;
  vertical-align: middle;
}

.dist-school-name {
  font-weight: 600;
  color: #111827;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dist-school-admin {
  font-size: 0.75rem;
  color: #9ca3af;
}

.dist-usage-bar {
  width: 96px;
  height: 6px;
  background: #e5e7eb;
  border-radius: var(--dist-radius-pill);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.dist-usage-fill {
  display: block;
  height: 100%;
  max-width: 100%;
  background: var(--dist-primary, #5d3d68);
  border-radius: var(--dist-radius-pill);
}

.dist-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--dist-radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.dist-pill-invited {
  background: #f3f4f6;
  color: #4b5563;
  border-color: #e5e7eb;
}

.dist-pill-trial {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.dist-pill-paid {
  background: #ecfdf5;
  color: #15803d;
  border-color: #bbf7d0;
}

.dist-pill-expired {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.dist-pill-dp {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.dist-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: var(--dist-radius-rounded-5);
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
}

.dist-icon-btn:hover {
  background: #f3f4f6;
  color: var(--dist-primary);
}

.dist-icon-reinvite {
  color: #64748b;
}

.dist-icon-reinvite:hover:not(.is-disabled) {
  color: var(--dist-primary);
  background: var(--dist-primary-soft);
}

.dist-icon-reinvite.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.dist-icon-btn.dist-row-delete {
  color: #fca5a5;
}

.dist-icon-btn.dist-row-delete:hover {
  background: #fef2f2;
  color: #f87171;
}

.dist-icon-btn.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.dist-row-actions {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
}

/* Detail panel */
.dist-detail {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.dist-detail-head {
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.dist-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dist-detail-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem;
}

.dist-detail-sub {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.dist-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 1.5rem;
  gap: 0.25rem;
  flex-shrink: 0;
}

.dist-tab {
  border: none;
  background: none;
  padding: 0.75rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.dist-tab:hover {
  color: #374151;
}

.dist-tab.is-active {
  color: var(--dist-primary);
  border-bottom-color: var(--dist-primary);
}

.dist-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  font-size: 0.6875rem;
  border-radius: var(--dist-radius-rounded-5);
  background: #f3f4f6;
  color: #6b7280;
}

.dist-tab.is-active .dist-tab-badge {
  background: var(--dist-primary-soft);
  color: var(--dist-primary);
}

.dist-detail-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.dist-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin: 1.25rem 1.5rem 0.75rem;
}

.dist-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1rem;
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

@media (max-width: 1100px) {
  .dist-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dist-field-label {
  font-size: 0.75rem;
  color: #6a7282;
}

.dist-field-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.dist-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0 1.5rem 1.25rem;
}

.dist-quick-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--dist-radius-rounded-5);
  background: #fff;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  text-align: left;
}

.dist-quick-card:hover {
  border-color: rgba(93, 61, 104, 0.25);
  background: var(--dist-primary-soft);
}

.dist-tab-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  flex-shrink: 0;
  background: #fff;
}

.dist-tab-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dist-codes-subnav {
  flex-shrink: 0;
  background: #fff;
}

.dist-tab-panel-head-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.dist-inner-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.80rem;
}

.dist-inner-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--dist-table-header-bg, #f4f4f7);
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  padding: 0.5rem 1.5rem;
  font-size: 14px;
  font-weight: 700;
  color: var(--dist-table-header-fg, #2d3748);
  box-shadow: 0 1px 0 #e5e7eb;
}

.dist-inner-table tbody td {
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

.dist-inner-table tbody tr:hover {
  background: #fafafa;
}

.dist-text-danger {
  color: #dc2626 !important;
  font-weight: 600;
}

.dist-bundle-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.25rem;
  opacity: 0;
}

.dist-inner-table tr:hover .dist-bundle-actions {
  opacity: 1;
}

.dist-empty-illustration {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: #6b7280;
}

.dist-detail-body > .dist-empty-illustration {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 8rem;
}

.dist-empty-title {
  font-weight: 600;
  margin-top: 0.75rem;
  color: #374151;
}

.dist-empty-sub {
  font-size: 0.875rem;
  margin: 0.35rem 0 1rem;
  color: #9ca3af;
}

.gd-dist-v2-shell .dist-tab-panel-scroll--empty-v2 {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: min(58vh, 28rem);
  background: #fff;
}

.gd-dist-v2-shell .dist-empty-state-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  box-sizing: border-box;
}

.gd-dist-v2-shell .dist-empty-state-v2-icon-wrap {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.gd-dist-v2-shell .dist-empty-state-v2-icon-wrap--neutral {
  background: #f3f4f6;
}

.gd-dist-v2-shell .dist-empty-state-v2-icon {
  flex-shrink: 0;
}

.gd-dist-v2-shell .dist-empty-state-v2-icon--calendar {
  color: #2b85f0;
}

.gd-dist-v2-shell .dist-empty-state-v2-icon--cube {
  color: #9ca3af;
}

.gd-dist-v2-shell .dist-empty-state-v2-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.gd-dist-v2-shell .dist-empty-state-v2-sub {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1.25rem;
  max-width: 20rem;
  line-height: 1.45;
}

.gd-dist-v2-shell .dist-empty-state-v2-cta.dist-btn-primary {
  margin-left: 0;
  gap: 0.5rem;
}

.gd-dist-v2-shell .dist-intake-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.gd-dist-v2-shell .dist-intake-status__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.gd-dist-v2-shell .dist-intake-status__icon svg {
  display: block;
}

.gd-dist-v2-shell .dist-intake-status--completed {
  background: #e6f4ea;
  color: #1e8e3e;
}

.gd-dist-v2-shell .dist-intake-status--active {
  background: #fff4e5;
  color: #d97706;
}

.gd-dist-v2-shell .dist-intake-status--ended {
  background: #f3f4f6;
  color: #4b5563;
}

.gd-dist-v2-shell .dist-pill-lic {
  gap: 0.35rem;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.gd-dist-v2-shell .dist-pill-lic__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gd-dist-v2-shell .dist-pill-lic--needs-attention {
  background: #fffbeb;
  border-color: #fef3c7;
  color: #92400e;
}

.gd-dist-v2-shell .dist-pill-lic--needs-attention .dist-pill-lic__dot {
  background: #f59e0b;
}

.gd-dist-v2-shell .dist-pill-lic--at-risk {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #7f1d1d;
}

.gd-dist-v2-shell .dist-pill-lic--at-risk .dist-pill-lic__dot {
  background: #ef4444;
}

.dist-codes-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: none;
  background: none;
  color: var(--dist-primary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.dist-code-row-link {
  cursor: pointer;
}

.dist-badge-claimed {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: var(--dist-radius-rounded-5);
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.dist-badge-unclaimed {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: var(--dist-radius-rounded-5);
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
}

.dist-btn-report {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--dist-radius-rounded-5);
  background: #16a34a;
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.dist-btn-report:hover {
  background: #15803d;
  color: #fff;
}

.dist-placeholder-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

.dist-modal-shell .modal-content {
  border: none;
  border-radius: var(--dist-radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dist-modal-header {
  background: var(--dist-primary, #5d3d68);
  color: #fff;
  padding: 1.1rem 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dist-modal-header-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.dist-modal-header-sub {
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
  opacity: 0.85;
  color: #fff;
}

.dist-modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.dist-modal-header .close {
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
}

.dist-modal-body {
  background: #fff;
  padding: 1.25rem 1.25rem 0.5rem;
  max-height: min(70vh, 560px);
  overflow-y: auto;
}

.dist-modal-footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  gap: 0.75rem;
}

.dist-modal-footer:not(.row) {
  display: flex;
  justify-content: flex-end;
}

.dist-modal-footer.row {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  justify-content: flex-start;
}

.dist-modal-footer.row > [class*="col-"] {
  box-sizing: border-box;
}

.dist-modal-footer .btn-outline-secondary {
  border-color: #d1d5db;
  color: #374151;
  border-radius: var(--dist-radius-rounded-5, 0.5rem);
}

.dist-modal-footer .btn {
  font-weight: 600;
  padding: 0.55rem 1rem;
}

.dist-btn-confirm-muted {
  background: var(--dist-primary, #5d3d68) !important;
  border: none;
  color: #fff !important;
}

.dist-btn-confirm-muted:hover {
  filter: brightness(0.95);
  color: #fff;
}

.gd-dist-v2-shell {
  width: 100%;
}

.gd-dist-v2-shell .dist-dash-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.dist-page-leading {
  padding: 1rem 1.5rem 0.65rem;
  flex-shrink: 0;
}

.dist-page-leading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dist-page-leading-main {
  min-width: 0;
}

.dist-page-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin: 0 0 0.35rem;
}

.dist-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}

.dist-page-desc {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  max-width: 44rem;
  line-height: 1.45;
}

.dist-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  padding: 0.65rem 1.5rem 0.85rem;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e7eb;
}

.dist-stat-block-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 0.2rem;
}

.dist-stat-block-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.dist-toolbar-right {
  margin-left: auto;
  font-size: 0.875rem;
  color: #6b7280;
}

.dist-health-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--dist-radius-pill);
  vertical-align: middle;
}

.dist-health-good {
  background: #22c55e;
}

/* Licence signal: matches “At risk” pill (red) */
.dist-health-warn {
  background: #ef4444;
}

/* Licence signal: matches “Needs attention” pill (amber dot) */
.dist-health-bad {
  background: #f59e0b;
}

.dist-chevron-nav {
  color: #d1d5db;
  font-size: 1.15rem;
  font-weight: 300;
}

.dist-school-table tbody tr.is-row-link:hover .dist-chevron-nav {
  color: var(--dist-primary);
}

.dist-td-row-actions {
  position: relative;
  vertical-align: middle;
}

.dist-v2-row-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 2.5rem;
  gap: 0.15rem;
}

.gd-dist-v2-shell .dist-school-table tbody tr.is-row-link .dist-row-actions {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.gd-dist-v2-shell .dist-school-table tbody tr.is-row-link:hover .dist-row-actions,
.gd-dist-v2-shell .dist-school-table tbody tr.is-row-link:focus-within .dist-row-actions {
  opacity: 1;
  pointer-events: auto;
}

.dist-icon-btn.dist-icon-reinvite {
  position: relative;
}

.dist-v2-reinvite-tooltip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  background: var(--dist-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 4;
}

.dist-v2-reinvite-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--dist-primary);
}

.dist-icon-reinvite:not(.is-disabled):hover .dist-v2-reinvite-tooltip,
.dist-icon-reinvite:not(.is-disabled):focus .dist-v2-reinvite-tooltip {
  opacity: 1;
  visibility: visible;
}

.dist-back-row {
  margin-bottom: 0.85rem;
}

.dist-back-row a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dist-primary);
  text-decoration: none;
}

.dist-back-row a:hover {
  text-decoration: underline;
}

.gd-intake-choice {
  cursor: pointer;
  text-align: left;
}

.gd-intake-choice.is-selected {
  border-color: var(--dist-primary) !important;
  background: var(--dist-primary-soft);
  box-shadow: 0 0 0 1px var(--dist-primary-muted);
}

.gd-intake-dialog {
  max-width: 780px !important;
  min-width: 0 !important;
  width: calc(100% - 1.5rem);
  margin-left: auto;
  margin-right: auto;
}

.dist-modal-shell .gd-intake-header {
  background: var(--dist-primary);
  align-items: flex-start;
  padding: 1rem 1.5rem;
}

.gd-intake-header-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.gd-intake-header-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 0.2rem !important;
}

.gd-intake-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 2px;
}

.gd-intake-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.gd-intake-body {
  padding: 1rem 1.5rem 0.85rem;
  overflow-y: auto;
}

.gd-intake-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gd-intake-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gd-intake-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #4b5563;
  margin: 0;
}

.gd-intake-flags {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}

.gd-intake-flags .form-check {
  margin: 0;
}

.gd-intake-check-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  text-transform: none;
  letter-spacing: normal;
}

.gd-intake-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 576px) {
  .gd-intake-grid-2 {
    grid-template-columns: 1fr;
  }

  .gd-intake-mode-grid {
    grid-template-columns: 1fr !important;
  }
}

.gd-intake-control {
  height: 38px;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.375rem 0.75rem;
}

.gd-intake-control:focus {
  border-color: var(--dist-primary);
  box-shadow: 0 0 0 1px var(--dist-primary-muted);
}

select.gd-intake-control.gd-intake-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 2.25rem;
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.65rem) center;
  background-size: 16px 16px;
}

.gd-intake-plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.gd-intake-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gd-intake-plan-card:hover {
  border-color: #d1d5db;
}

.gd-intake-plan-card.is-selected {
  border-color: var(--dist-primary);
  background: var(--dist-primary-soft);
  box-shadow: 0 0 0 1px var(--dist-primary-muted);
}

.gd-intake-plan-card-main {
  min-width: 0;
}

.gd-intake-plan-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.gd-intake-plan-desc {
  display: block;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.gd-intake-sparkle {
  flex-shrink: 0;
  vertical-align: middle;
  font-size: 12px;
  filter: none;
  color: #f59e0b;
}

.gd-intake-plan-radio {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
}

.gd-intake-plan-radio--on {
  border-color: var(--dist-primary);
  background: var(--dist-primary);
}

.gd-intake-cap-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}

.gd-intake-cap-hint {
  flex: 1;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}

.gd-intake-stepper {
  display: flex;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

.gd-intake-stepper-btn {
  width: 32px;
  border: none;
  background: #fff;
  color: #6b7280;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gd-intake-stepper-btn:hover:not(:disabled) {
  background: #f9fafb;
}

.gd-intake-stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gd-intake-stepper-input {
  width: 56px;
  border: none;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.25rem;
  -moz-appearance: textfield;
  appearance: textfield;
}

.gd-intake-stepper-input::-webkit-outer-spin-button,
.gd-intake-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.gd-intake-mode-block {
  margin-top: 1.1rem;
  margin-bottom: 0.65rem;
}

.gd-intake-mode-heading {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.gd-intake-mode-lead {
  font-size: 12px;
  color: #6b7280;
  margin-top: 0.2rem;
  line-height: 1.45;
}

.gd-intake-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.gd-intake-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gd-intake-mode-card:hover:not(:disabled) {
  border-color: #d1d5db;
}

.gd-intake-mode-card.is-selected {
  border-color: var(--dist-primary);
  background: var(--dist-primary-soft);
  box-shadow: 0 0 0 1px var(--dist-primary-muted);
}

.gd-intake-mode-card:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gd-intake-mode-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.gd-intake-mode-icon--on {
  background: var(--dist-primary);
  color: #fff;
}

.gd-intake-mode-text {
  flex: 1;
  min-width: 0;
}

.gd-intake-mode-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.25;
}

.gd-intake-mode-desc {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 0.2rem;
  line-height: 1.35;
}

.gd-intake-mode-radio {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  flex-shrink: 0;
  margin-top: 4px;
}

.gd-intake-mode-radio--on {
  border-color: var(--dist-primary);
  background: var(--dist-primary);
}

.gd-intake-panel-shell {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  margin-bottom: 0.5rem;
}

.gd-intake-panel-dashed {
  border: 2px dashed #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
}

.gd-intake-preview-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--dist-primary-soft);
  color: var(--dist-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.gd-intake-preview-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.35rem;
}

.gd-intake-preview-desc {
  font-size: 12px;
  color: #6b7280;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.gd-intake-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.gd-intake-summary-left {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.gd-intake-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #4b5563;
}

.gd-intake-seat-num {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.gd-intake-seat-suffix {
  font-size: 13px;
  color: #6b7280;
  margin-right: 0.35rem;
}

.gd-intake-preview-email {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: not-allowed;
}

.gd-intake-preview-email.is-enabled {
  color: var(--dist-primary);
  cursor: pointer;
}

.gd-intake-preview-email.is-enabled:hover {
  background: var(--dist-primary-soft);
}

.gd-intake-preview-email:disabled {
  opacity: 0.45;
}

.gd-intake-footer {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: #fff !important;
  border-top: 1px solid #e5e7eb !important;
  padding: 0.85rem 1.5rem 1rem !important;
}

.gd-intake-footer-cancel {
  border-color: #e5e7eb;
  color: #374151;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

.gd-intake-submit {
  background: var(--dist-primary) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  min-width: 8rem;
}

.gd-intake-submit:hover {
  background: var(--dist-primary-hover) !important;
  color: #fff !important;
}

html.gd-intake-modal-open {
  overflow: hidden !important;
}

#gdIntakeSessionModal .modal-dialog.gd-intake-dialog {
  max-height: calc(100vh - 1rem);
  margin: 0.5rem auto;
  display: flex;
  align-items: center;
}

#gdIntakeSessionModal .modal-content {
  max-height: calc(100vh - 1rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#gdIntakeSessionModal .gd-intake-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#gdIntakeSessionModal .dist-modal-header {
  flex-shrink: 0;
}

#gdIntakeSessionModal .dist-modal-body.gd-intake-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#gdIntakeSessionModal .gd-intake-summary-bar {
  flex-shrink: 0;
}

#gdIntakeSessionModal .dist-modal-footer.gd-intake-footer {
  flex-shrink: 0;
}

#gdIntakeSessionModal .gd-intake-panel-shell {
  padding: 0.75rem;
}

#gdIntakeSessionModal .gd-intake-panel-dashed {
  padding: 1rem 0.85rem 1.15rem;
}

.dist-bundle-type-paid {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--dist-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.gd-intake-label-optional {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #9ca3af;
  margin-left: 0.35rem;
}

.gd-intake-deadline-hint {
  font-size: 0.6875rem;
  color: #9ca3af;
  line-height: 1.35;
  margin-top: 0.35rem;
}

.dist-intake-row-actions {
  gap: 0.35rem;
}

.dist-inner-table .dist-intake-login-col {
  width: 1%;
  white-space: nowrap;
  padding-right: 0.75rem;
}

.dist-inner-table .dist-intake-menu-col {
  width: 1%;
  white-space: nowrap;
  padding-left: 0.5rem;
  padding-right: 1rem;
}

.dist-intake-login-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.dist-row-menu {
  position: relative;
  display: inline-flex;
}

.dist-row-menu-popover {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 190px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 0.35rem 0;
}

.dist-row-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: none;
  background: transparent;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.dist-row-menu-item:hover {
  background: #f9fafb;
  color: #111827;
  text-decoration: none;
}

.dist-bundle-type-trial {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--dist-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.dist-bundle-type-over-limit {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--dist-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dist-licences-over-limit {
  color: #dc2626 !important;
  font-weight: 700;
}

.dist-detail-head-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.dist-intake-session-detail {
  max-width: 100%;
}

.dist-intake-detail-head {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.dist-intake-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.dist-intake-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
}

.dist-intake-breadcrumb a:hover {
  color: var(--dist-primary, #2b85f0);
  text-decoration: underline;
}

.dist-intake-breadcrumb-sep {
  color: #d1d5db;
}

.dist-intake-breadcrumb-current {
  color: #374151;
  font-weight: 500;
}

.dist-intake-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dist-intake-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}

.dist-intake-detail-sub {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.dist-intake-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.dist-intake-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.dist-intake-action-btn:hover:not(:disabled) {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #111827;
  text-decoration: none;
}

.dist-intake-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dist-intake-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 1rem 1.5rem 1.15rem;
  border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 900px) {
  .dist-intake-detail-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .dist-intake-detail-stats {
    grid-template-columns: 1fr;
  }
}

.dist-intake-stat-block {
  min-width: 0;
}

.dist-intake-stat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.dist-intake-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.dist-intake-stat-sub {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: #9ca3af;
}

.dist-intake-candidates-panel {
  margin: 1rem 1.5rem 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.dist-intake-candidates-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.dist-intake-candidates-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
}

.dist-intake-candidates-meta {
  font-size: 0.8125rem;
  color: #9ca3af;
}

.dist-intake-session-row {
  cursor: pointer;
}

.dist-intake-session-row:hover {
  background: #f9fafb;
}

.dist-intake-session-row:focus-visible {
  outline: 2px solid var(--dist-primary, #2b85f0);
  outline-offset: -2px;
}

.dist-settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem 3rem;
}

.dist-settings-section {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.dist-settings-section-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.dist-settings-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.dist-settings-section-sub {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.2rem 0 0;
  line-height: 1.4;
}

.dist-settings-section-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dist-settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.dist-settings-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5563;
}

.dist-settings-input {
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #111827;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.dist-settings-input:focus {
  border-color: var(--dist-primary, #2b85f0);
}

.dist-settings-input--error {
  border-color: #fca5a5;
}

.dist-settings-input--error:focus {
  border-color: #ef4444;
}

.dist-settings-hint {
  font-size: 0.6875rem;
  color: #9ca3af;
  line-height: 1.4;
}

.dist-settings-error {
  font-size: 0.6875rem;
  color: #ef4444;
  line-height: 1.4;
}

.dist-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

.dist-settings-status {
  font-size: 0.6875rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dist-settings-action-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dist-settings-btn-reset {
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dist-settings-btn-reset:hover:not(:disabled) {
  border-color: #d1d5db;
  background: #f9fafb;
}

.dist-settings-btn-reset:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.dist-settings-btn-save {
  height: 2rem;
  padding: 0 0.875rem;
  border: none;
  border-radius: 8px;
  background: var(--dist-primary, #2b85f0);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: opacity 0.15s;
}

.dist-settings-btn-save:hover:not(:disabled) {
  opacity: 0.88;
}

.dist-settings-btn-save:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* URL slug composite input */
.dist-settings-slug-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s;
}

.dist-settings-slug-wrap:focus-within {
  border-color: var(--dist-primary, #2b85f0);
}

.dist-settings-slug-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.625rem;
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  font-size: 0.6875rem;
  font-family: monospace;
  color: #9ca3af;
  white-space: nowrap;
}

.dist-settings-slug-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 0.625rem;
  font-size: 0.8125rem;
  font-family: monospace;
  color: #111827;
  background: transparent;
  min-width: 0;
  height: 2.25rem;
}

.dist-settings-slug-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.625rem;
  border: none;
  border-left: 1px solid #e5e7eb;
  background: transparent;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--dist-primary, #2b85f0);
  cursor: pointer;
  white-space: nowrap;
}

.dist-settings-slug-copy:hover:not(:disabled) {
  background: rgba(43, 133, 240, 0.05);
}

.dist-settings-slug-copy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Logo upload area */
.dist-settings-logo-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fff;
}

.dist-settings-logo-preview {
  width: 4rem;
  height: 4rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.dist-settings-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.dist-settings-logo-controls {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dist-settings-logo-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.dist-settings-btn-outline {
  height: 2rem;
  padding: 0 0.625rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.dist-settings-btn-outline:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}

.dist-settings-btn-outline--danger {
  color: #dc2626;
}

.dist-settings-btn-outline--danger:hover {
  border-color: #fca5a5;
  background: #fff;
}

.dist-settings-logo-url-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dist-settings-logo-url-input {
  flex: 1;
  height: 2rem;
  padding: 0 0.625rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #111827;
  outline: none;
  background: #fff;
  transition: border-color 0.15s;
}

.dist-settings-logo-url-input:focus {
  border-color: var(--dist-primary, #2b85f0);
}

/* Colour picker row */
.dist-settings-color-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dist-settings-color-swatch-label {
  position: relative;
  width: 2.5rem;
  height: 2.25rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  flex-shrink: 0;
}

.dist-settings-color-swatch-label--static {
  cursor: default;
}

.dist-settings-color-swatch-label input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dist-settings-color-swatch-bg {
  position: absolute;
  inset: 0;
}

.dist-settings-color-hex {
  max-width: 9rem;
}

.dist-settings-color-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.dist-settings-color-preset {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
  outline-offset: 2px;
}

.dist-settings-color-preset:hover {
  transform: scale(1.12);
}

.dist-settings-color-preset.is-active {
  border-color: #111827;
}

.dist-settings-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--dist-primary, #2b85f0);
  text-decoration: none;
}

.dist-settings-link:hover {
  text-decoration: underline;
}

.dist-settings-clear-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.dist-settings-clear-link:hover {
  color: #374151;
}
