/* NeoDot catalog surface: a focused layer over the generated console bundle. */
:root {
  --nd-ink: #17211f;
  --nd-muted: #66736f;
  --nd-line: #dfe7e2;
  --nd-surface: #ffffff;
  --nd-canvas: #f4f7f4;
  --nd-pine: #0f766e;
  --nd-pine-dark: #0b5f59;
  --nd-pine-soft: #e3f3ef;
  --nd-amber: #a16207;
  --nd-amber-soft: #fff7df;
  --nd-coral: #b4534b;
}

body.nd-model-plaza-route,
body.nd-groups-route {
  font-family: "Satoshi", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--nd-ink);
  background: var(--nd-canvas);
}

/* Public model plaza */
body.nd-model-plaza-route .supergpt-console {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, .035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--nd-canvas);
}

body.nd-model-plaza-route .supergpt-console > .mx-auto {
  max-width: 1220px !important;
  padding: 10px 0 56px;
}

body.nd-model-plaza-route .supergpt-console h1 {
  margin: 0 0 8px;
  color: var(--nd-ink);
  font-size: 36px !important;
  font-weight: 650 !important;
  letter-spacing: 0;
  line-height: 1.04;
}

body.nd-model-plaza-route .supergpt-console h1 + p {
  max-width: 62ch;
  margin-top: 11px;
  color: var(--nd-muted);
  font-size: 14px;
  line-height: 1.75;
}

.nd-catalog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 18px;
  align-items: stretch;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #c8e2dc;
  border-radius: 14px;
  background: linear-gradient(110deg, #f0faf6, #fbfdfb 62%);
}

.nd-catalog-kicker,
.nd-guide-kicker {
  color: var(--nd-pine);
  font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.nd-catalog-hero h2 {
  margin: 7px 0 5px;
  color: var(--nd-ink);
  font-size: 20px;
  letter-spacing: -.02em;
}

.nd-catalog-hero p {
  max-width: 64ch;
  margin: 0;
  color: var(--nd-muted);
  font-size: 13px;
  line-height: 1.7;
}

.nd-catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  align-self: stretch;
  border-left: 1px solid #c8e2dc;
}

.nd-catalog-stats span {
  display: flex;
  min-height: 60px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 14px;
  color: var(--nd-muted);
  font-size: 11px;
}

.nd-catalog-stats strong {
  color: var(--nd-ink);
  font: 650 23px/1 "SFMono-Regular", Consolas, monospace;
}

.nd-public-directory {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .9fr);
  gap: 18px;
  align-items: center;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #c8e2dc;
  border-radius: 14px;
  background: #f6fbf8;
}

.nd-public-directory h2 {
  margin: 6px 0 4px;
  color: var(--nd-ink);
  font-size: 20px;
  letter-spacing: -.025em;
}

.nd-public-directory p {
  margin: 0;
  color: var(--nd-muted);
  font-size: 13px;
  line-height: 1.65;
}

.nd-public-directory-meta {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  border-left: 1px solid #c8e2dc;
}

.nd-public-directory-meta span {
  color: var(--nd-muted);
  font-size: 12px;
}

.nd-public-directory-meta strong {
  display: inline-block;
  min-width: 56px;
  margin-right: 7px;
  color: var(--nd-pine);
  font: 650 11px/1.3 "SFMono-Regular", Consolas, monospace;
}

body.nd-model-plaza-route .supergpt-console .plaza-filter-bar {
  margin-bottom: 22px;
  padding: 15px 18px 16px;
  border: 1px solid var(--nd-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
}

body.nd-model-plaza-route .supergpt-console .plaza-filter-bar > div {
  border-bottom: 1px solid #edf1ee;
  padding-bottom: 10px;
}

body.nd-model-plaza-route .supergpt-console .plaza-filter-bar > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body.nd-model-plaza-route .supergpt-console .plaza-filter-bar button {
  border-radius: 6px !important;
  box-shadow: none !important;
}

body.nd-model-plaza-route .supergpt-console .plaza-filter-bar button[aria-pressed="true"] {
  background: var(--nd-pine) !important;
  color: #fff !important;
}

body.nd-model-plaza-route .supergpt-console .plaza-filter-bar input {
  border-color: var(--nd-line) !important;
  background: #fff !important;
  border-radius: 7px !important;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--nd-line) !important;
  border-radius: 14px !important;
  background: var(--nd-surface) !important;
  box-shadow: 0 14px 34px rgba(25, 52, 44, .055) !important;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--nd-pine);
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section[data-nd-group="claude"]::before {
  background: var(--nd-amber);
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section > header {
  padding: 19px 22px 17px !important;
  border-bottom-color: #e7eeea !important;
  background: #fbfdfb;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section > header > div {
  align-items: center;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section > header span.font-semibold {
  color: var(--nd-ink) !important;
  font-size: 16px;
  letter-spacing: -.015em;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section > header p {
  color: var(--nd-muted) !important;
  line-height: 1.7;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section[data-nd-group="claude"] > header {
  border-bottom-color: #f0deb0 !important;
  background: #fffaf0;
}

body.nd-model-plaza-route .supergpt-console .plaza-group-section[data-nd-group="claude"] > header p:first-of-type {
  color: var(--nd-amber) !important;
  font-weight: 600;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table {
  scrollbar-color: #b6d2cb transparent;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table table {
  border-collapse: separate;
  border-spacing: 0;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table thead th {
  color: #71807a;
  background: #f5f8f6;
  font-size: 10px;
  letter-spacing: .08em;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table tbody tr {
  transition: background-color .18s ease, transform .18s ease;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table tbody tr:hover {
  background: #f7fbf9;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table tbody td {
  border-bottom-color: #edf1ee !important;
}

body.nd-model-plaza-route .supergpt-console .plaza-pricing-table .font-mono {
  font-variant-numeric: tabular-nums;
}

.nd-credit-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #f0d99c;
  border-radius: 8px;
  color: #7c5b18;
  background: #fff8e8;
  font-size: 12px;
  line-height: 1.65;
}

.nd-credit-note::before {
  content: "!";
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border: 1px solid #d9ad49;
  border-radius: 50%;
  font: 700 11px/1 "SFMono-Regular", Consolas, monospace;
}

/* Admin groups surface */
body.nd-groups-route main {
  background: var(--nd-canvas);
}

body.nd-groups-route main > div {
  max-width: 1440px;
}

.nd-groups-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 22px;
  align-items: end;
  margin: 0 0 22px;
  padding: 22px 24px;
  border: 1px solid var(--nd-line);
  border-radius: 14px;
  background: #fbfdfb;
  box-shadow: 0 12px 30px rgba(25, 52, 44, .045);
}

.nd-groups-guide h1 {
  margin: 7px 0 5px;
  color: var(--nd-ink);
  font-size: 26px;
  letter-spacing: -.04em;
}

.nd-groups-guide p {
  max-width: 64ch;
  margin: 0;
  color: var(--nd-muted);
  font-size: 13px;
  line-height: 1.7;
}

.nd-groups-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--nd-line);
}

.nd-groups-guide-grid div {
  padding: 12px 12px 0 0;
  border-right: 1px solid var(--nd-line);
}

.nd-groups-guide-grid div + div {
  padding-left: 12px;
}

.nd-groups-guide-grid div:last-child {
  border-right: 0;
}

.nd-groups-guide-grid strong {
  display: block;
  color: var(--nd-ink);
  font: 650 16px/1.2 "SFMono-Regular", Consolas, monospace;
}

.nd-groups-guide-grid span {
  display: block;
  margin-top: 4px;
  color: var(--nd-muted);
  font-size: 11px;
  line-height: 1.45;
}

body.nd-groups-route main table thead th {
  color: #65736e;
  background: #f1f5f2;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

body.nd-groups-route main table tbody tr {
  transition: background-color .15s ease;
}

body.nd-groups-route main table tbody tr:hover {
  background: #f4faf7;
}

body.nd-groups-route main [data-testid="credit-price-help"] {
  color: var(--nd-amber) !important;
}

@media (max-width: 760px) {
  body.nd-model-plaza-route .supergpt-console > .mx-auto {
    padding: 0 0 34px;
  }

  body.nd-model-plaza-route .supergpt-console h1,
  .nd-catalog-hero,
  .nd-public-directory,
  .nd-groups-guide {
    display: block;
    padding: 18px;
  }

  .nd-catalog-stats {
    margin-top: 18px;
    border-top: 1px solid #c8e2dc;
    border-left: 0;
  }

  .nd-catalog-stats span {
    padding: 12px 10px 0 0;
  }

  .nd-groups-guide-grid {
    margin-top: 18px;
  }

  .nd-public-directory-meta {
    margin-top: 16px;
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid #c8e2dc;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.nd-model-plaza-route .supergpt-console .plaza-pricing-table tbody tr,
  body.nd-groups-route main table tbody tr {
    transition: none;
  }
}

.nd-pricing-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.nd-badge-flagship {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.nd-badge-standard {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.nd-badge-gemini {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.nd-badge-gemini-ultra {
  background: #f5f3ff;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.nd-badge-claude {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.nd-badge-image {
  background: #fdf2f8;
  color: #9d174d;
  border: 1px solid #fbcfe8;
}



/* Upstream Sync Button and Diff Modal Styles */
.nd-sync-action-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #c8e2dc;
}

.nd-sync-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
  color: #ffffff;
  border: 1px solid #0d5f58;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}

.nd-sync-button:hover {
  background: linear-gradient(135deg, #115e59 0%, #042f2e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 118, 110, 0.3);
}

.nd-sync-tip {
  color: var(--nd-muted);
  font-size: 12px;
}

.nd-sync-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.nd-sync-modal {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.nd-sync-modal-header {
  padding: 18px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nd-sync-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #0f172a;
}

.nd-sync-modal-header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.nd-sync-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.nd-sync-close:hover {
  color: #334155;
}

.nd-sync-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.nd-sync-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 14px;
  gap: 16px;
}

.nd-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: nd-spin 0.8s linear infinite;
}

@keyframes nd-spin {
  to { transform: rotate(360deg); }
}

.nd-sync-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.nd-stat-badge {
  padding: 12px 10px;
  border-radius: 8px;
  text-align: center;
}

.nd-stat-badge strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.nd-stat-badge span {
  font-size: 11px;
  font-weight: 500;
}

.nd-stat-badge.in-sync {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.nd-stat-badge.to-update {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.nd-stat-badge.to-add {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.nd-stat-badge.to-deactivate {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.nd-sync-success-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 18px 20px;
}

.nd-sync-success-box h4 {
  margin: 0 0 6px;
  color: #15803d;
  font-size: 15px;
}

.nd-sync-success-box p {
  margin: 0 0 14px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.5;
}

.nd-sync-group-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.nd-sync-group-list li {
  font-size: 12px;
  color: #166534;
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #dcfce7;
}

.nd-sync-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 13px;
  color: #334155;
}

.nd-sync-toolbar-actions {
  display: flex;
  gap: 12px;
}

.nd-sync-link-btn {
  background: none;
  border: none;
  color: #0f766e;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-size: 12px;
}

.nd-sync-link-btn:hover {
  color: #115e59;
}

.nd-sync-cb {
  cursor: pointer;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  vertical-align: middle;
}

.nd-sync-diff-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nd-diff-item {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.nd-diff-item.to-update {
  background: #fefce8;
  border-color: #fef08a;
}

.nd-diff-item.to-add {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.nd-diff-item.to-deactivate {
  background: #fff1f2;
  border-color: #fecdd3;
}

.nd-diff-detail {
  margin-top: 8px;
  padding-left: 24px;
  font-size: 12px;
  line-height: 1.6;
}

.nd-diff-detail.warning {
  color: #b91c1c;
}

.nd-sync-modal-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.nd-btn-secondary {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.nd-btn-secondary:hover {
  background: #f1f5f9;
}

.nd-btn-primary {
  padding: 8px 18px;
  border-radius: 6px;
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nd-btn-primary:hover:not(:disabled) {
  background: #115e59;
}

.nd-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nd-sync-error {
  padding: 16px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 13px;
}
