@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&family=JetBrains+Mono:wght@400;500&display=swap");

/* Scoped rollout: apply only to sample pages that opt in with .ds-refresh */
body.ds-refresh {
  --color-primary: #1b708b;
  --color-accent: #2d9cba;
  --color-charcoal: #123f55;
  --color-slate: #64748b;
  --color-light-gray: #f1f5f9;
  --color-white: #ffffff;

  --color-success: #059669;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --color-info: #1b708b;

  --bg-primary: #f4f7fb;
  --bg-secondary: #f8fafb;
  --bg-card: #ffffff;
  --bg-card-raised: #ffffff;
  --heading-color: #334155;
  --text-primary: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-color: rgba(13, 31, 45, 0.08);

  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 360ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --surface-subtle: #f8fafb;
  --surface-tint: rgba(27, 112, 139, 0.04);
  --surface-strong: #eef4f8;
  --table-rule: #e8eef4;
}

:root[data-theme="dark"] body.ds-refresh {
  --bg-primary: #0d1f2d;
  --bg-secondary: #123044;
  --bg-card: rgba(27, 112, 139, 0.14);
  --bg-card-raised: #123044;
  --heading-color: #f1f5f9;
  --text-primary: #f1f5f9;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.5);
  --border-color: rgba(45, 156, 186, 0.25);
  --shadow-color: rgba(0, 0, 0, 0.35);
  --color-primary: #2d9cba;
  --color-accent: #49b4d1;
  --color-charcoal: #2d9cba;
  --surface-subtle: rgba(255, 255, 255, 0.03);
  --surface-tint: rgba(45, 156, 186, 0.08);
  --surface-strong: rgba(45, 156, 186, 0.12);
  --table-rule: rgba(255, 255, 255, 0.08);
}

body.ds-refresh {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
}

body.ds-refresh .navbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
}

body.ds-refresh .navbar.scrolled {
  box-shadow: 0 2px 12px var(--shadow-color);
}

body.ds-refresh .logo {
  letter-spacing: -0.02em;
}

body.ds-refresh .nav-link.active,
body.ds-refresh .nav-link:hover {
  color: var(--color-primary);
}

body.ds-refresh .navbar-search-input {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

body.ds-refresh .navbar-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(27, 112, 139, 0.18);
}

body.ds-refresh .section,
body.ds-refresh main .section {
  background: var(--bg-primary);
}

body.ds-refresh .card,
body.ds-refresh .op-surface-card,
body.ds-refresh .op-link-card,
body.ds-refresh .sales-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 2px rgba(13, 31, 45, 0.05), 0 6px 20px rgba(13, 31, 45, 0.06);
}

body.ds-refresh .op-feedback-drawer-panel,
body.ds-refresh .drawer-panel,
body.ds-refresh .custom-drawer,
body.ds-refresh .crm-form-drawer,
body.ds-refresh .crm-detail-drawer,
body.ds-refresh .crm-modal,
body.ds-refresh .sv-modal,
body.ds-refresh .io-modal-lg {
  background: var(--bg-card-raised);
  border-left: 1px solid var(--border-color);
}

body.ds-refresh .crm-detail-backdrop.active,
body.ds-refresh .crm-form-backdrop.active,
body.ds-refresh .crm-modal-overlay.active,
body.ds-refresh .sv-overlay.active,
body.ds-refresh .io-modal-overlay {
  background: rgba(13, 31, 45, 0.52);
  backdrop-filter: blur(4px);
}

:root[data-theme="dark"] body.ds-refresh .crm-detail-backdrop.active,
:root[data-theme="dark"] body.ds-refresh .crm-form-backdrop.active,
:root[data-theme="dark"] body.ds-refresh .crm-modal-overlay.active,
:root[data-theme="dark"] body.ds-refresh .sv-overlay.active,
:root[data-theme="dark"] body.ds-refresh .io-modal-overlay {
  background: rgba(0, 0, 0, 0.58);
}

body.ds-refresh .btn,
body.ds-refresh button.btn {
  border-radius: var(--radius-md);
  font-family: var(--font-body);
}

body.ds-refresh .btn-primary {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
  color: #ffffff;
}

body.ds-refresh .btn-primary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

body.ds-refresh .btn-secondary,
body.ds-refresh .btn-ghost {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

body.ds-refresh .btn-secondary:hover,
body.ds-refresh .btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

body.ds-refresh input,
body.ds-refresh select,
body.ds-refresh textarea {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
}

body.ds-refresh input:focus,
body.ds-refresh select:focus,
body.ds-refresh textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(27, 112, 139, 0.15);
}

body.ds-refresh .sync-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

body.ds-refresh .sync-table td {
  border-bottom: 1px solid var(--border-color);
}

body.ds-refresh .badge {
  border-radius: 999px;
}

body.ds-refresh .page-header {
  padding: clamp(24px, 3.4vw, 36px) 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  background:
    radial-gradient(circle at top right, rgba(45, 156, 186, 0.1), transparent 28%),
    var(--bg-primary);
}

body.ds-refresh .page-description {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 720px;
  line-height: 1.6;
}

body.ds-refresh .page-title {
  color: var(--heading-color);
  letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
}

body.ds-refresh .container {
  max-width: 1280px;
}

body.ds-refresh .footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

body.ds-refresh .section.section-workspace {
  padding: 18px 0 32px;
}

body.ds-refresh .section.section-workspace > .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

body.ds-refresh .workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

body.ds-refresh .workspace-title {
  margin: 0;
  color: var(--heading-color);
  letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

body.ds-refresh .workspace-subtitle {
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Section layouts */
body.ds-refresh .op-layout,
body.ds-refresh .sales-layout {
  gap: 28px;
  align-items: start;
}

body.ds-refresh .op-content,
body.ds-refresh .sales-content {
  min-width: 0;
}

/* Sidebars */
body.ds-refresh .op-sidebar,
body.ds-refresh .sales-sidebar {
  background: var(--bg-card);
  border-color: var(--border-color);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(13, 31, 45, 0.04);
}

body.ds-refresh .op-sidebar-label,
body.ds-refresh .sales-sidebar-label {
  background: var(--surface-subtle);
  border-left-color: var(--color-primary);
  color: var(--text-primary);
}

body.ds-refresh .op-sidebar-utility {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

body.ds-refresh .op-sidebar-utility-btn {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), background-color var(--dur-base) var(--ease-standard);
}

body.ds-refresh .op-sidebar-utility-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--surface-subtle);
}

body.ds-refresh .op-sidebar-utility-status {
  min-height: 14px;
  margin-top: 6px;
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}

/* Section / sub tabs */
body.ds-refresh .crm-tab-bar,
body.ds-refresh .op-subtab-nav,
body.ds-refresh .op-pc-subtab-nav {
  margin-top: 4px;
  border-bottom-color: rgba(27, 112, 139, 0.32);
}

body.ds-refresh .tool-btn,
body.ds-refresh .op-subtab-btn,
body.ds-refresh .op-pc-subtab-btn {
  border-radius: 6px 6px 0 0;
  color: var(--text-secondary);
  font-weight: 500;
}

body.ds-refresh .tool-btn.active,
body.ds-refresh .op-subtab-btn.active,
body.ds-refresh .op-pc-subtab-btn.active {
  color: var(--color-charcoal);
  border-bottom-color: var(--color-charcoal);
}

/* Surface cards */
body.ds-refresh .op-surface-card,
body.ds-refresh .op-link-card,
body.ds-refresh .crm-stat-card,
body.ds-refresh .prosp-stat-card,
body.ds-refresh .sv-card,
body.ds-refresh .sales-prosp-note,
body.ds-refresh .sales-prosp-empty,
body.ds-refresh .sales-sidebar,
body.ds-refresh .card {
  border-radius: 10px;
  border-color: var(--border-color);
  box-shadow: 0 1px 2px rgba(13, 31, 45, 0.04);
}

body.ds-refresh .op-link-card:hover,
body.ds-refresh .sales-prosp-note:hover,
body.ds-refresh .crm-stat-link:hover,
body.ds-refresh .prosp-stat-card:hover {
  box-shadow: 0 2px 8px rgba(13, 31, 45, 0.08);
  border-color: #d6e1ea;
}

/* Headers, stat strips, and action bars */
body.ds-refresh .tool-panel-header,
body.ds-refresh .op-panel-header {
  margin-bottom: 22px;
}

body.ds-refresh .op-panel-header.compact {
  margin-bottom: 0;
}

body.ds-refresh .tool-panel-header h2,
body.ds-refresh .op-panel-header h2 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  letter-spacing: -0.02em;
  color: var(--heading-color);
}

body.ds-refresh .tool-panel-header p,
body.ds-refresh .op-panel-header p {
  margin: 0;
  max-width: 760px;
  color: var(--text-secondary);
}

body.ds-refresh .crm-stats,
body.ds-refresh .stats-grid,
body.ds-refresh .prosp-stats {
  gap: 14px;
}

body.ds-refresh .crm-stat-card,
body.ds-refresh .prosp-stat-card,
body.ds-refresh .stat-card,
body.ds-refresh .op-pc-bucket {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

body.ds-refresh .crm-stats.crm-stats-grid {
  gap: 16px;
}

body.ds-refresh #tool-overview .crm-stat-card {
  min-height: 132px;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--bg-card-raised);
  box-shadow: 0 1px 2px rgba(13, 31, 45, 0.04);
}

body.ds-refresh #tool-overview .crm-stat-card::before {
  height: 0;
}

body.ds-refresh #tool-overview .crm-stat-number {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  line-height: 1;
}

body.ds-refresh #tool-overview .crm-stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

body.ds-refresh #tool-overview .crm-stat-link:hover {
  border-color: rgba(45, 156, 186, 0.32);
  box-shadow: 0 4px 16px rgba(13, 31, 45, 0.08);
  transform: translateY(-1px);
}

body.ds-refresh #tool-overview .tool-panel-header {
  margin-bottom: 18px;
}

body.ds-refresh #tool-overview .tool-panel-header h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
}

body.ds-refresh .crm-stat-card::before,
body.ds-refresh .prosp-stat-card::before,
body.ds-refresh .stat-card::before,
body.ds-refresh .op-pc-bucket::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}

body.ds-refresh .crm-stat-number,
body.ds-refresh .prosp-stat-number,
body.ds-refresh .stat-number,
body.ds-refresh .metric .n,
body.ds-refresh .stat .n {
  color: var(--heading-color) !important;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

body.ds-refresh .crm-stat-label,
body.ds-refresh .prosp-stat-label,
body.ds-refresh .stat-label {
  color: var(--text-secondary);
}

body.ds-refresh .crm-action-bar,
body.ds-refresh .crm-deals-toolbar,
body.ds-refresh .op-filter-bar,
body.ds-refresh .prosp-filter-bar,
body.ds-refresh .sales-prosp-toolbar,
body.ds-refresh .sv-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--surface-subtle);
}

body.ds-refresh .sv-toolbar,
body.ds-refresh .sales-prosp-toolbar {
  align-items: flex-start;
}

body.ds-refresh .crm-action-bar > .crm-search,
body.ds-refresh .crm-action-bar > .crm-filter-select,
body.ds-refresh .prosp-filter-bar > .crm-search,
body.ds-refresh .prosp-filter-bar > .crm-filter-select {
  margin: 0;
}

body.ds-refresh .crm-filter-select,
body.ds-refresh .sv-member-filter {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
}

body.ds-refresh .crm-deals-toolbar,
body.ds-refresh .sales-prosp-toolbar {
  justify-content: space-between;
}

body.ds-refresh .crm-filter-tabs,
body.ds-refresh .crm-view-toggle,
body.ds-refresh .sales-prosp-toolbar-actions,
body.ds-refresh .sv-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.ds-refresh .crm-filter-tab,
body.ds-refresh .crm-view-btn,
body.ds-refresh .sv-btn-group button,
body.ds-refresh .sv-btn-ghost {
  border-radius: 999px;
}

body.ds-refresh .crm-filter-tab,
body.ds-refresh .crm-view-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
}

body.ds-refresh .crm-filter-tab.active,
body.ds-refresh .crm-view-btn.active {
  background: var(--surface-tint);
  color: var(--heading-color);
  border-color: rgba(27, 112, 139, 0.22);
}

/* Table system */
body.ds-refresh .crm-table-container,
body.ds-refresh .op-surface-card,
body.ds-refresh .sv-card,
body.ds-refresh .table {
  background: var(--bg-card-raised);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

body.ds-refresh .crm-table,
body.ds-refresh .sync-table,
body.ds-refresh .sales-prosp-table,
body.ds-refresh .op-pc-table,
body.ds-refresh .sv-table,
body.ds-refresh #oc-table,
body.ds-refresh #po-lines-table {
  width: 100%;
  border-collapse: collapse;
}

body.ds-refresh .crm-table thead th,
body.ds-refresh .sync-table thead th,
body.ds-refresh .sales-prosp-table thead th,
body.ds-refresh .op-pc-table thead th,
body.ds-refresh .sv-table thead th,
body.ds-refresh #oc-table thead th,
body.ds-refresh #po-lines-table thead th {
  padding: 12px 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

body.ds-refresh .crm-table td,
body.ds-refresh .sync-table td,
body.ds-refresh .sales-prosp-table td,
body.ds-refresh .op-pc-table td,
body.ds-refresh .sv-table td,
body.ds-refresh #oc-table td,
body.ds-refresh #po-lines-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--table-rule);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  vertical-align: middle;
}

body.ds-refresh .crm-table th:first-child,
body.ds-refresh .crm-table td:first-child,
body.ds-refresh .sync-table th:first-child,
body.ds-refresh .sync-table td:first-child,
body.ds-refresh .sales-prosp-table th:first-child,
body.ds-refresh .sales-prosp-table td:first-child,
body.ds-refresh .op-pc-table th:first-child,
body.ds-refresh .op-pc-table td:first-child,
body.ds-refresh .sv-table th:first-child,
body.ds-refresh .sv-table td:first-child,
body.ds-refresh #oc-table th:first-child,
body.ds-refresh #oc-table td:first-child,
body.ds-refresh #po-lines-table th:first-child,
body.ds-refresh #po-lines-table td:first-child {
  text-align: left;
}

body.ds-refresh .crm-table td:has(.row-name),
body.ds-refresh .crm-table td:has(.row-name-link),
body.ds-refresh .sync-table td:has(.op-pc-txn-link),
body.ds-refresh .sales-prosp-table td:has(.sales-prosp-row-name),
body.ds-refresh .sv-table td:nth-child(2) {
  text-align: left;
}

body.ds-refresh .num,
body.ds-refresh .sls-rev-num,
body.ds-refresh .op-pc-table th[style*="text-align:right"],
body.ds-refresh .op-pc-table td[style*="text-align:right"],
body.ds-refresh .sync-table th[style*="text-align:right"],
body.ds-refresh .sync-table td[style*="text-align:right"],
body.ds-refresh #oc-table th[style*="text-align:right"],
body.ds-refresh #oc-table td[style*="text-align:right"],
body.ds-refresh #po-lines-table th[style*="text-align:right"],
body.ds-refresh #po-lines-table td[style*="text-align:right"] {
  text-align: right;
}

body.ds-refresh .crm-table tbody tr:last-child td,
body.ds-refresh .sync-table tbody tr:last-child td,
body.ds-refresh .sales-prosp-table tbody tr:last-child td,
body.ds-refresh .op-pc-table tbody tr:last-child td,
body.ds-refresh .sv-table tbody tr:last-child td,
body.ds-refresh #oc-table tbody tr:last-child td,
body.ds-refresh #po-lines-table tbody tr:last-child td {
  border-bottom: none;
}

body.ds-refresh .crm-table tbody tr:hover,
body.ds-refresh .sync-table tbody tr:hover,
body.ds-refresh .sales-prosp-table tbody tr:hover,
body.ds-refresh .op-pc-table tbody tr:hover,
body.ds-refresh .sv-table tbody tr:hover,
body.ds-refresh #oc-table tbody tr:hover,
body.ds-refresh #po-lines-table tbody tr:hover {
  background: var(--surface-subtle);
}

body.ds-refresh .crm-table .row-name,
body.ds-refresh .row-name-link,
body.ds-refresh .sales-prosp-row-name {
  font-weight: 600;
  color: var(--text-primary);
}

body.ds-refresh .row-name-link:hover,
body.ds-refresh .op-pc-txn-row:hover .op-pc-txn-link,
body.ds-refresh .sales-prosp-row-name:hover {
  color: #1b708b;
}

body.ds-refresh .num,
body.ds-refresh .sls-rev-num,
body.ds-refresh .op-pc-table td[style*="text-align:right"],
body.ds-refresh .crm-table td:nth-child(4),
body.ds-refresh .crm-table td:nth-child(5) {
  font-family: var(--font-mono);
  font-size: 12px;
}

body.ds-refresh .crm-sort-btn {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

body.ds-refresh .crm-sort-btn:hover {
  color: var(--text-secondary);
}

body.ds-refresh .badge-success {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}

body.ds-refresh .badge-warning {
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
}

body.ds-refresh .badge-error {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

body.ds-refresh .badge-info {
  background: rgba(27, 112, 139, 0.14);
  color: #15566d;
}

:root[data-theme="dark"] body.ds-refresh .badge {
  border: 1px solid rgba(111, 179, 201, 0.18);
  background: rgba(111, 179, 201, 0.12);
  color: #b9dce6;
}

:root[data-theme="dark"] body.ds-refresh .badge-info,
:root[data-theme="dark"] body.ds-refresh .ds-chip.teal,
:root[data-theme="dark"] body.ds-refresh .op-status-new,
:root[data-theme="dark"] body.ds-refresh .op-status-queued {
  border-color: rgba(111, 179, 201, 0.34);
  background: rgba(45, 156, 186, 0.22);
  color: #b9dce6;
}

:root[data-theme="dark"] body.ds-refresh .badge-success,
:root[data-theme="dark"] body.ds-refresh .ds-chip.success,
:root[data-theme="dark"] body.ds-refresh .op-status-reviewed,
:root[data-theme="dark"] body.ds-refresh .op-status-actioned,
:root[data-theme="dark"] body.ds-refresh .op-status-resolved {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

:root[data-theme="dark"] body.ds-refresh .badge-warning,
:root[data-theme="dark"] body.ds-refresh .ds-chip.warn {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(217, 119, 6, 0.2);
  color: #fcd34d;
}

:root[data-theme="dark"] body.ds-refresh .badge-error,
:root[data-theme="dark"] body.ds-refresh .ds-chip.err,
:root[data-theme="dark"] body.ds-refresh .op-status-dismissed,
:root[data-theme="dark"] body.ds-refresh .op-status-blocked {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
}

body.ds-refresh .chip,
body.ds-refresh .op-badge,
body.ds-refresh .sls-status,
body.ds-refresh .sls-dq,
body.ds-refresh .op-status-pill {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
}

body.ds-refresh .op-copy-block,
body.ds-refresh .sales-prosp-note {
  border-color: var(--table-rule);
}

body.ds-refresh .surface-stack-sm {
  display: grid;
  gap: 12px;
}

body.ds-refresh .surface-stack-md {
  display: grid;
  gap: 16px;
}

body.ds-refresh .surface-stack-lg {
  display: grid;
  gap: 24px;
}

body.ds-refresh .surface-top-sm {
  margin-top: 16px;
}

body.ds-refresh .surface-top-md {
  margin-top: 24px;
}

body.ds-refresh .surface-bottom-md {
  margin-bottom: 16px;
}

body.ds-refresh .surface-pad-md {
  padding: 16px 20px;
}

body.ds-refresh .surface-pad-lg {
  padding: 20px;
}

body.ds-refresh .table-wrap,
body.ds-refresh .op-table-wrap {
  overflow: auto;
}

body.ds-refresh .surface-empty-center {
  padding: 24px;
  text-align: center;
}

body.ds-refresh .toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

body.ds-refresh .toolbar-inline .toolbar-select,
body.ds-refresh .toolbar-inline .toolbar-input {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font: inherit;
}

body.ds-refresh .toolbar-status {
  font-size: 0.83rem;
  color: var(--text-muted);
}

body.ds-refresh .form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.ds-refresh .field-stack {
  display: grid;
  gap: 4px;
}

body.ds-refresh .field-stack label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

body.ds-refresh .field-stack input,
body.ds-refresh .field-stack select,
body.ds-refresh .field-stack textarea {
  width: 100%;
  box-sizing: border-box;
}

body.ds-refresh .guidance-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.ds-refresh .section-eyebrow {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.ds-refresh .section-eyebrow.primary {
  color: var(--color-primary);
}

body.ds-refresh .section-eyebrow.muted {
  color: var(--text-muted);
}

body.ds-refresh .guidance-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
}

body.ds-refresh .guidance-list.primary {
  color: var(--text-secondary);
}

body.ds-refresh .guidance-list.muted {
  color: var(--text-muted);
}

body.ds-refresh .support-copy {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

body.ds-refresh .support-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
}

body.ds-refresh .section-title-sm {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

body.ds-refresh .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.ds-refresh .th-center {
  text-align: center !important;
}

body.ds-refresh .th-right {
  text-align: right !important;
}

body.ds-refresh .th-tight {
  min-width: 36px;
}

body.ds-refresh .sv-card,
body.ds-refresh .crm-table-container,
body.ds-refresh #op-feedback-table-wrap,
body.ds-refresh .dn-table-wrap,
body.ds-refresh .sync-table-wrap {
  overflow-x: auto;
}

body.ds-refresh .sv-legend,
body.ds-refresh .sales-tools-grid,
body.ds-refresh .op-card-grid {
  gap: 14px;
}

body.ds-refresh .sales-tools-card,
body.ds-refresh .op-link-card {
  position: relative;
}

body.ds-refresh .sales-tools-card::before,
body.ds-refresh .op-link-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  opacity: 0.9;
}

body.ds-refresh .sv-type-filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-subtle);
}

body.ds-refresh .sv-type-btn {
  border-radius: 999px;
}

body.ds-refresh .sv-type-btn.active {
  background: var(--color-primary);
  color: #ffffff;
}

/* Design-system sample page */
body.ds-refresh .ds-sample-stack {
  display: grid;
  gap: 24px;
}

body.ds-refresh .ds-sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

body.ds-refresh .ds-sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body.ds-refresh .ds-sample-card {
  background: var(--bg-card-raised);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 22px 24px;
}

body.ds-refresh .ds-sample-card h3 {
  margin: 0 0 14px;
  color: var(--heading-color);
  font-size: 1rem;
}

body.ds-refresh .ds-chip,
body.ds-refresh .ds-sku {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
}

body.ds-refresh .ds-chip.teal {
  background: rgba(27, 112, 139, 0.1);
  border-color: rgba(27, 112, 139, 0.2);
  color: var(--color-charcoal);
}

body.ds-refresh .ds-chip.grey {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

body.ds-refresh .ds-chip.success {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

body.ds-refresh .ds-chip.warn {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

body.ds-refresh .ds-chip.err {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

body.ds-refresh .ds-sku {
  border-radius: 4px;
  color: #ffffff;
}

body.ds-refresh .ds-sku.imperial {
  color: #4e4848;
}

/* Legacy CRM drawer content has inline colors; keep it readable during refresh. */
body.ds-refresh .crm-detail-drawer [style*="background:#fff"],
body.ds-refresh .crm-detail-drawer [style*="background: #fff"],
body.ds-refresh .crm-detail-drawer [style*="background:#f8f9fa"],
body.ds-refresh .crm-detail-drawer [style*="background: #f8f9fa"] {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

body.ds-refresh .crm-detail-drawer [style*="border:1px solid #e5e7eb"],
body.ds-refresh .crm-detail-drawer [style*="border: 1px solid #e5e7eb"],
body.ds-refresh .crm-detail-drawer [style*="border:1px dashed #dee2e6"],
body.ds-refresh .crm-detail-drawer [style*="border: 1px dashed #dee2e6"],
body.ds-refresh .crm-detail-drawer [style*="border:1px solid #dee2e6"] {
  border-color: var(--border-color) !important;
}

body.ds-refresh .crm-detail-drawer [style*="color:#6c757d"],
body.ds-refresh .crm-detail-drawer [style*="color: #6c757d"],
body.ds-refresh .crm-detail-drawer [style*="color:#475569"] {
  color: var(--text-secondary) !important;
}

body.ds-refresh .crm-detail-drawer [style*="color: #475569"],
body.ds-refresh .crm-detail-drawer [style*="color:#334155"],
body.ds-refresh .crm-detail-drawer [style*="color: #334155"] {
  color: var(--text-primary) !important;
}

body.ds-refresh .crm-detail-drawer [style*="border-top:1px solid #f1f3f4"] {
  border-top-color: var(--border-color) !important;
}

body.ds-refresh .crm-detail-drawer [style*="background:#fff8e1"],
body.ds-refresh .crm-detail-drawer [style*="background: #fff8e1"],
body.ds-refresh .crm-detail-drawer [style*="background:#f0fdf4"],
body.ds-refresh .crm-detail-drawer [style*="background: #f0fdf4"] {
  background: var(--surface-subtle) !important;
  border-color: var(--border-color) !important;
}

body.ds-refresh .crm-detail-drawer [style*="border:1px dashed #ffc107"],
body.ds-refresh .crm-detail-drawer [style*="border: 1px dashed #ffc107"],
body.ds-refresh .crm-detail-drawer [style*="border:1px solid #bbf7d0"],
body.ds-refresh .crm-detail-drawer [style*="border: 1px solid #bbf7d0"] {
  border-color: var(--border-color) !important;
}

body.ds-refresh .crm-detail-drawer [style*="color:#856404"],
body.ds-refresh .crm-detail-drawer [style*="color: #856404"],
body.ds-refresh .crm-detail-drawer [style*="color:#166534"],
body.ds-refresh .crm-detail-drawer [style*="color: #166534"],
body.ds-refresh .crm-detail-drawer [style*="color:#8b9ec7"],
body.ds-refresh .crm-detail-drawer [style*="color: #8b9ec7"] {
  color: var(--text-primary) !important;
}

body.ds-refresh #arap-drawer-panel {
  background: var(--bg-card-raised) !important;
  border-left: 1px solid var(--border-color) !important;
}

body.ds-refresh #arap-drawer-panel > div[style*="background:#0f1929"],
body.ds-refresh #arap-drawer-panel > div[style*="background: #0f1929"] {
  background: var(--bg-card-raised) !important;
  border-bottom-color: var(--border-color) !important;
}

body.ds-refresh #arap-drawer-panel [style*="color:#475569"],
body.ds-refresh #arap-drawer-panel [style*="color: #475569"],
body.ds-refresh #arap-drawer-panel [style*="color:#64748b"],
body.ds-refresh #arap-drawer-panel [style*="color: #64748b"] {
  color: var(--text-secondary) !important;
}

body.ds-refresh #arap-drawer-panel [style*="color:#334155"],
body.ds-refresh #arap-drawer-panel [style*="color: #334155"],
body.ds-refresh #arap-drawer-panel [style*="color:#e2e8f0"],
body.ds-refresh #arap-drawer-panel [style*="color: #e2e8f0"],
body.ds-refresh #arap-drawer-panel [style*="color:#f1f5f9"],
body.ds-refresh #arap-drawer-panel [style*="color: #f1f5f9"] {
  color: var(--text-primary) !important;
}

body.ds-refresh #arap-drawer-panel [style*="background:#334155"],
body.ds-refresh #arap-drawer-panel [style*="background: #334155"],
body.ds-refresh #arap-drawer-panel [style*="background:#1e293b"],
body.ds-refresh #arap-drawer-panel [style*="background: #1e293b"],
body.ds-refresh #arap-drawer-panel [style*="background:rgba(255,255,255,0.02)"],
body.ds-refresh #arap-drawer-panel [style*="background: rgba(255,255,255,0.02)"] {
  background: var(--surface-subtle) !important;
}

:root[data-theme="dark"] body.ds-refresh .crm-detail-drawer .badge[style*="background:#f59e0b"],
:root[data-theme="dark"] body.ds-refresh .crm-detail-drawer .badge[style*="background: #f59e0b"] {
  background: rgba(56, 189, 248, 0.18) !important;
  color: #b9dce6 !important;
  border: 1px solid rgba(102, 194, 215, 0.45) !important;
}

body.ds-refresh .crm-reach-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

body.ds-refresh .crm-reach-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-subtle);
}

body.ds-refresh .crm-reach-pill strong {
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1;
  color: var(--heading-color);
}

body.ds-refresh .crm-reach-pill span {
  font-size: 10px;
  line-height: 1;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ds-refresh .crm-venue-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
}

body.ds-refresh .crm-venue-title {
  color: var(--heading-color);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
}

body.ds-refresh .crm-venue-subtle,
body.ds-refresh .crm-venue-address,
body.ds-refresh .crm-venue-notes {
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.45;
}

body.ds-refresh .crm-venue-address a,
body.ds-refresh .crm-inline-link {
  color: var(--accent-color);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

body.ds-refresh .crm-venue-address a:hover,
body.ds-refresh .crm-inline-link:hover {
  text-decoration: underline;
}

body.ds-refresh .crm-inline-link {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

body.ds-refresh .crm-venue-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

body.ds-refresh .crm-venue-meta-grid:empty {
  display: none;
}

body.ds-refresh .crm-venue-meta-row {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-subtle);
}

body.ds-refresh .crm-venue-meta-row span {
  color: var(--text-secondary);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ds-refresh .crm-venue-meta-row strong {
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

body.ds-refresh .crm-venue-notes {
  padding-top: 4px;
  border-top: 1px solid var(--border-color);
}

body.ds-refresh .crm-detail-fields > :not(.crm-detail-field) {
  grid-column: 1 / -1;
  min-width: 0;
}

body.ds-refresh .crm-detail-fields > :not(.crm-detail-field) > [style*="display:grid"] {
  width: 100%;
}

@media (max-width: 1024px) {
  body.ds-refresh .crm-stats.crm-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  body.ds-refresh .op-layout,
  body.ds-refresh .sales-layout,
  body.ds-refresh .tool-layout {
    grid-template-columns: 1fr;
  }

  body.ds-refresh .op-sidebar,
  body.ds-refresh .sales-sidebar,
  body.ds-refresh .tool-sidebar {
    position: static !important;
    top: auto;
  }

  body.ds-refresh .crm-action-bar,
  body.ds-refresh .crm-deals-toolbar,
  body.ds-refresh .op-filter-bar,
  body.ds-refresh .prosp-filter-bar,
  body.ds-refresh .sales-prosp-toolbar,
  body.ds-refresh .sv-toolbar {
    padding: 14px;
  }

  body.ds-refresh .crm-action-bar > *,
  body.ds-refresh .prosp-filter-bar > *,
  body.ds-refresh .sv-toolbar > *,
  body.ds-refresh .sales-prosp-toolbar > * {
    width: 100%;
  }

  body.ds-refresh .sv-btn-group,
  body.ds-refresh .crm-view-toggle,
  body.ds-refresh .crm-filter-tabs,
  body.ds-refresh .sales-prosp-toolbar-actions {
    width: 100%;
  }

  body.ds-refresh .form-grid-3,
  body.ds-refresh .guidance-grid-2 {
    grid-template-columns: 1fr;
  }
}
