/* Custom theme — colors from --hop-c-* (Settings → Theme → Custom) */
html[data-hop-theme="custom"] {
  --hop-c-sidebar: #123C32;
  --hop-c-bg: #F8F4EA;
  --hop-c-bg-soft: #F5EFE0;
  --hop-c-text: #1F1F1F;
  --hop-c-muted: #6B6254;
  --hop-c-border: #DED3BE;
  --hop-c-accent: #C9A227;
  --hop-c-accent-dark: #A8861F;
  --hop-c-accent-light: #E8D48B;
  --hop-c-accent-soft: rgba(201, 162, 39, 0.22);
  --hop-c-accent-glow: rgba(201, 162, 39, 0.45);
  --hop-c-card: #ffffff;
  --hop-c-nav-text: #D6CFC0;
  --hop-c-nav-muted: #9A9080;
  /* Bridge legacy NEXORA cyan tokens → custom accent */
  --nx-gold: var(--hop-c-accent);
  --nx-gold-2: var(--hop-c-accent-dark);
  --nxt-cyan: var(--hop-c-accent);
  --nxt-cyan-dim: var(--hop-c-accent-soft);
  /* Dashboard FO / TA widgets — follow custom sidebar + accent */
  --dash-widget-bg: var(--hop-c-sidebar);
  --dash-widget-bg-deep: color-mix(in srgb, var(--hop-c-sidebar) 82%, #000);
  --dash-widget-bg-header: color-mix(in srgb, var(--hop-c-sidebar) 72%, #fff);
  --dash-widget-border: color-mix(in srgb, var(--hop-c-accent) 40%, transparent);
  --dash-widget-text: var(--hop-c-bg);
  --dash-widget-muted: color-mix(in srgb, var(--hop-c-bg) 62%, var(--hop-c-sidebar));
  --dash-widget-accent: var(--hop-c-accent);
  --dash-widget-accent-fg: var(--hop-c-sidebar);
  --dash-widget-shadow: color-mix(in srgb, var(--hop-c-sidebar) 35%, transparent);
  --dash-widget-row-alt: var(--hop-c-sidebar);
  --dash-widget-surface-border: rgba(255, 255, 255, 0.12);
  --dash-widget-ctrl-border: color-mix(in srgb, var(--hop-c-accent) 40%, transparent);
}

html[data-hop-theme="custom"] {
  color-scheme: light;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard).workspace-shell:not(.hidden) {
  background: var(--hop-c-bg) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-theme.hop-shell {
  background: var(--hop-c-bg) !important;
  color: var(--hop-c-text) !important;
  border-color: var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-nav {
  background: var(--hop-c-sidebar) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: var(--hop-c-nav-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-nav-group,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-nav-caret {
  color: var(--hop-c-nav-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-nav-item,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-nav-btn {
  color: var(--hop-c-nav-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-nav-item:hover,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--hop-c-card) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-nav-item.active,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-nav-btn.active {
  background: var(--hop-c-accent-soft) !important;
  color: var(--hop-c-accent-light) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-core:not(.nx-core--logo) {
  --nx-core-glow-a: var(--hop-c-accent-glow, rgba(201, 162, 39, 0.5));
  --nx-core-glow-b: color-mix(in srgb, var(--hop-c-accent-light, #E8D48B) 70%, transparent);
  background: radial-gradient(circle at 30% 30%, var(--hop-c-accent-light), var(--hop-c-accent) 70%) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px 2px var(--nx-core-glow-a) !important;
  animation: nx-pulse 3.2s ease-in-out infinite !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-brand-word {
  color: var(--hop-c-card) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-brand-sub {
  color: var(--hop-c-nav-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-main {
  background: var(--hop-c-bg) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-display,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-title,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) h2 {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-text-dim,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-text-faint,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-eyebrow {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-card,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-form-card {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.06), 0 8px 24px rgba(15, 39, 68, 0.04);
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-card::before {
  background: transparent !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-card:hover,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-form-card:hover {
  background: var(--hop-c-card) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-btn {
  border: 1px solid var(--hop-c-border) !important;
  background: var(--hop-c-card) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-btn:hover {
  border-color: var(--hop-c-border) !important;
  background: var(--hop-c-bg-soft) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-btn-primary {
  background: var(--hop-c-accent) !important;
  border-color: var(--hop-c-accent) !important;
  color: var(--hop-c-card) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .nx-btn-primary:hover {
  background: var(--hop-c-accent-dark) !important;
  border-color: var(--hop-c-accent-dark) !important;
  color: var(--hop-c-card) !important;
}

/* KPI / dashboard cards */
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-kpi-card {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.06);
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-kpi-card:hover {
  background: var(--hop-c-card) !important;
  border-color: var(--hop-c-border) !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-kpi-label {
  color: var(--hop-c-muted) !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-kpi-value {
  color: var(--hop-c-text) !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-kpi-value.is-na {
  color: var(--hop-c-muted) !important;
}

/* Invoice / ledger chrome */
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-topbar {
  background: var(--hop-c-card) !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-title {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-mobile-back {
  border: 1px solid var(--hop-c-border) !important;
  background: var(--hop-c-card) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-ctrl,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-search,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-party-toggle,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-form-grid input,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-form-grid select,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-form-grid textarea {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-text-btn {
  color: var(--hop-c-accent-dark) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-sep {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.05);
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card span {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card strong {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--paid {
  border-left: 3px solid #15803d !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--paid strong { color: #15803d !important; }
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--unpaid {
  border-left: 3px solid #1F5C70 !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--unpaid strong { color: #1F5C70 !important; }
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--overdue {
  border-left: 3px solid #b91c1c !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--overdue strong { color: #b91c1c !important; }
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-card--total {
  border-left: 3px solid #3F3A32 !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-op {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-table-card {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.06), 0 8px 24px rgba(15, 39, 68, 0.04);
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-table-head {
  border-bottom: 1px solid var(--hop-c-border) !important;
  background: var(--hop-c-card) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-table-head strong {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-count {
  background: #EFE7D8 !important;
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-table th {
  color: var(--hop-c-accent-dark) !important;
  background: #FBF7EE !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-table td {
  color: var(--hop-c-text) !important;
  border-bottom: 1px solid #EFE7D8 !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-table tbody tr:hover {
  background: var(--hop-c-bg-soft) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-row.is-selected {
  background: #F3EBD0 !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-empty {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-badge--paid {
  background: #dcfce7 !important;
  color: #15803d !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-badge--unpaid,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-badge--open {
  background: #E8F0F2 !important;
  color: #1F5C70 !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-badge--overdue {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .inv-badge--partial {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

/* Party / module tables */
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-table,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-table {
  color: var(--hop-c-text);
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-table th,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-table th {
  color: var(--hop-c-accent-dark) !important;
  background: #FBF7EE !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-table td,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-table td {
  color: var(--hop-c-text) !important;
  border-bottom: 1px solid #EFE7D8 !important;
}

/* Commission bar */
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.06);
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-title strong,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-party,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-results strong {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-meta,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-fields label,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-results span {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-meta b {
  color: var(--hop-c-accent-dark) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-bar-fields input {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-table th {
  color: var(--hop-c-accent-dark) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-comm-table td {
  color: var(--hop-c-text) !important;
}

/* Theme picker cards */
.hop-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  max-width: 720px;
}
.hop-theme-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}
.hop-theme-card:hover { border-color: rgba(37, 224, 255, 0.35); }
.hop-theme-card.is-active {
  border-color: rgba(37, 224, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(37, 224, 255, 0.25);
}
.hop-theme-swatch {
  height: 72px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-columns: 28% 1fr;
}
.hop-theme-swatch-side { background: #05070c; }
.hop-theme-swatch-main {
  background: linear-gradient(180deg, #0a0e18, #0e1524);
  position: relative;
}
.hop-theme-swatch-main::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: 14px; height: 10px;
  border-radius: 4px;
  background: rgba(37, 224, 255, 0.25);
}
.hop-theme-swatch--custom .hop-theme-swatch-side { background: var(--hop-c-sidebar); }
.hop-theme-swatch--custom .hop-theme-swatch-main {
  background: var(--hop-c-bg);
}
.hop-theme-swatch--custom .hop-theme-swatch-main::after {
  background: var(--hop-c-accent);
}
.hop-theme-card h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}
.hop-theme-card p {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.75;
  line-height: 1.4;
}
.hop-theme-card .hop-theme-badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #67e8f9;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-theme-card {
  background: var(--hop-c-card) !important;
  border: 1px solid var(--hop-c-border) !important;
  color: var(--hop-c-text) !important;
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-theme-card.is-active {
  border-color: var(--hop-c-accent) !important;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.25);
}
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-theme-card .hop-theme-badge {
  color: var(--hop-c-accent-dark) !important;
}

/* Doc preview modal stays readable in bright mode */
html[data-hop-theme="custom"] .hop-doc-preview-modal {
  color: var(--hop-c-text);
}

/* ========== Parties (full light surface — was broken/mixed) ========== */
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-view--parties,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-view--parties .pty-page,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-view--parties .mod-page {
  background: var(--hop-c-bg) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-topbar {
  background: var(--hop-c-card) !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-topbar-title {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-topbar-sub {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-layout {
  background: var(--hop-c-bg) !important;
  border: none !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-sidebar {
  background: var(--hop-c-card) !important;
  border-right: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-detail {
  background: var(--hop-c-card) !important;
  border-left: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-search {
  background: #FBF7EE !important;
  border: 1px solid var(--hop-c-border) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-search:focus {
  border-color: var(--hop-c-accent) !important;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-list-header {
  color: var(--hop-c-muted) !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
  background: #FBF7EE !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item-wrap {
  border-bottom: 1px solid #EFE7D8 !important;
  background: transparent !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item-wrap.is-active {
  background: var(--hop-c-bg-soft) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item {
  background: transparent !important;
  color: var(--hop-c-text) !important;
  border-bottom: none !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item:hover {
  background: #FBF7EE !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item.is-active {
  background: #F3EBD0 !important;
  border-left: 3px solid var(--hop-c-accent) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item-name {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item-bal {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-item-bal.is-due {
  color: #b91c1c !important;
  font-weight: 600;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-badge-c {
  background: #F3EBD0 !important;
  color: var(--hop-c-accent-dark) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-badge-v {
  background: #ede9fe !important;
  color: #6d28d9 !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-empty-list,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-no-selection,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-no-selection p {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-detail-header {
  background: var(--hop-c-card) !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-detail-name {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-detail-type {
  background: #F3EBD0 !important;
  border: 1px solid var(--hop-c-border) !important;
  color: var(--hop-c-accent-dark) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-meta-row {
  color: #3F3A32 !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-meta-text em {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-meta-ico {
  background: #EFE7D8 !important;
  color: var(--hop-c-accent) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-chip {
  background: #FBF7EE !important;
  border: 1px solid var(--hop-c-border) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-chip:hover {
  border-color: var(--hop-c-border) !important;
  background: var(--hop-c-bg-soft) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-chip svg {
  color: var(--hop-c-accent) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-action-btn {
  background: #EFE7D8 !important;
  color: #5C5346 !important;
  border: 1px solid var(--hop-c-border);
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-action-btn:hover {
  background: var(--hop-c-border) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-section {
  background: var(--hop-c-card) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-header strong {
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-total-sale {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-total-sale em {
  color: var(--hop-c-accent-dark) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-other {
  border-top: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-other summary,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-other-hint {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-other summary span {
  background: #EFE7D8 !important;
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-table th {
  color: var(--hop-c-accent-dark) !important;
  background: #FBF7EE !important;
  border-bottom: 1px solid var(--hop-c-border) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-table td {
  color: var(--hop-c-text) !important;
  border-bottom: 1px solid #EFE7D8 !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-row:hover {
  background: var(--hop-c-bg-soft) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-view {
  color: var(--hop-c-muted) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-row:hover .pty-txn-view-ico {
  color: var(--hop-c-accent) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .pty-txn-amt.is-due {
  color: #b91c1c !important;
}

/* Generic module pages in bright mode */
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-view--module .mod-page,
html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-view--fullpage {
  background: var(--hop-c-bg) !important;
  color: var(--hop-c-text) !important;
}

html[data-hop-theme="custom"] :is(#hop-executive-workspace, #dashboard) .hop-view-header {
  color: var(--hop-c-text);
}

/* Custom theme builder UI (always available on Theme page) */
.hop-custom-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px 14px;
}
.hop-custom-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  opacity: 0.92;
}
.hop-custom-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hop-custom-color-row input[type="color"] {
  width: 42px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.hop-custom-color-row input[type="text"] {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(127, 127, 127, 0.35);
  background: transparent;
  color: inherit;
  text-transform: uppercase;
}
.hop-custom-preset-btn {
  font-size: 0.78rem !important;
  padding: 6px 10px !important;
}
