/*
  Orbis Professional Theme Contract
  Loaded last on purpose. This file normalizes every authenticated workspace
  page to one enterprise design system, while themes only change controlled
  accents. It prevents older dark/light fragments from fighting each other.
*/

body[data-client-theme],
body[data-client-theme="enterprise"],
body[data-client-theme="light"] {
  --orbis-page: #eef3f7;
  --orbis-page-2: #f7fafc;
  --orbis-surface: #ffffff;
  --orbis-surface-2: #f8fbfd;
  --orbis-surface-3: #eef5f9;
  --orbis-ink: #061b33;
  --orbis-ink-2: #17324d;
  --orbis-muted: #5a7189;
  --orbis-muted-2: #7d90a4;
  --orbis-line: #cbd7e3;
  --orbis-line-strong: #aebdcb;
  --orbis-sidebar: #062b49;
  --orbis-sidebar-2: #083c61;
  --orbis-accent: #0069b4;
  --orbis-accent-2: #00a6c8;
  --orbis-accent-3: #2b83c6;
  --orbis-accent-soft: #e5f5fb;
  --orbis-success: #007f68;
  --orbis-success-soft: #e4f6f1;
  --orbis-warning: #bf7a00;
  --orbis-warning-soft: #fff4d8;
  --orbis-danger: #b42318;
  --orbis-shadow: 0 18px 38px rgba(6, 27, 51, 0.10);
  --orbis-shadow-soft: 0 8px 20px rgba(6, 27, 51, 0.07);
  --orbis-radius: 8px;
  --orbis-radius-sm: 6px;
  color-scheme: light;
  background:
    radial-gradient(circle at 82% 8%, rgba(0, 166, 200, 0.14), transparent 34rem),
    linear-gradient(180deg, #fbfdff 0%, var(--orbis-page) 100%) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme="orbis"] {
  --orbis-page: #edf4f8;
  --orbis-sidebar: #071f36;
  --orbis-sidebar-2: #0a3858;
  --orbis-accent: #0b527f;
  --orbis-accent-2: #00a6c8;
  --orbis-accent-soft: #e4f4fb;
}

body[data-client-theme="satellite"] {
  --orbis-page: #edf5fb;
  --orbis-sidebar: #052f55;
  --orbis-sidebar-2: #0a4d7c;
  --orbis-accent: #1473b8;
  --orbis-accent-2: #18a9c9;
  --orbis-accent-soft: #e6f6fb;
}

body[data-client-theme="mineral"] {
  --orbis-page: #f3f2ec;
  --orbis-page-2: #faf8f2;
  --orbis-sidebar: #172c3d;
  --orbis-sidebar-2: #244056;
  --orbis-accent: #9b6a16;
  --orbis-accent-2: #c9912c;
  --orbis-accent-3: #7f5a1c;
  --orbis-accent-soft: #fbf2de;
  --orbis-warning: #9b6a16;
  --orbis-warning-soft: #fbf2de;
}

body[data-client-theme="executive"] {
  --orbis-page: #edf1f4;
  --orbis-sidebar: #1b3244;
  --orbis-sidebar-2: #2e4c61;
  --orbis-accent: #385a72;
  --orbis-accent-2: #6a8aa0;
  --orbis-accent-soft: #e9f0f4;
}

body[data-client-theme="emerging"] {
  --orbis-page: #edf5f3;
  --orbis-sidebar: #073d39;
  --orbis-sidebar-2: #0c5f55;
  --orbis-accent: #08796c;
  --orbis-accent-2: #1ba98d;
  --orbis-accent-soft: #e5f6f1;
}

body[data-client-theme] .app-shell:not(.is-hidden) {
  background: transparent !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace {
  background: transparent !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .sidebar {
  background: linear-gradient(180deg, var(--orbis-sidebar) 0%, var(--orbis-sidebar-2) 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f8fbff !important;
  box-shadow: 12px 0 34px rgba(6, 27, 51, 0.18) !important;
}

body[data-client-theme] .sidebar,
body[data-client-theme] .sidebar nav {
  scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}

body[data-client-theme] .sidebar :is(h1, h2, h3, h4, p, span, small, strong, label, a, button) {
  color: inherit;
}

body[data-client-theme] .sidebar .brand img {
  background: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20) !important;
}

body[data-client-theme] .sidebar .nav-section-title,
body[data-client-theme] .sidebar .section-label {
  color: rgba(248, 251, 255, 0.66) !important;
  letter-spacing: 0.04em !important;
}

body[data-client-theme] .sidebar :is(.nav-item, .side-link, button) {
  color: rgba(248, 251, 255, 0.88) !important;
  background: transparent !important;
  border-color: transparent !important;
}

body[data-client-theme] .sidebar :is(.nav-item.active, .nav-item[aria-current="page"], .side-link.active, button.active) {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}

body[data-client-theme] :is(.topbar, .page-header, .module-header, .panel-header, .workspace-header) {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%) !important;
  color: var(--orbis-ink) !important;
  border: 1px solid var(--orbis-line) !important;
  border-top: 4px solid var(--orbis-accent) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .country-themed :is(.topbar, .page-header, .module-header, .panel-header, .workspace-header),
body[data-client-theme].country-themed :is(.topbar, .page-header, .module-header, .panel-header, .workspace-header) {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%) !important;
  border-top-color: var(--orbis-accent) !important;
}

body[data-client-theme] .country-themed :is(.topbar, .page-header, .module-header, .panel-header)::before,
body[data-client-theme].country-themed :is(.topbar, .page-header, .module-header, .panel-header)::before {
  height: 3px !important;
  opacity: 0.55 !important;
  border-radius: 999px !important;
}

body[data-client-theme] .workspace :is(h1, h2, h3, h4, h5, h6, strong, th, dt, .metric-value, .stat-value, .card-title, .section-title) {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(p, small, td, dd, li, .muted, .subtle, .helper-text, .card-copy, .section-copy) {
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace :is(.eyebrow, .kicker, .module-kicker, .section-kicker) {
  color: var(--orbis-accent) !important;
  letter-spacing: 0.04em !important;
}

body[data-client-theme] .workspace :is(
  .card,
  .metric-card,
  .status-card,
  .workflow-card,
  .clickable-card,
  .detail-card,
  .detail-panel,
  .summary-card,
  .insight-card,
  .tile,
  .panel,
  .data-panel,
  .scope-entry-panel,
  .country-identity-strip,
  .country-resource-brief,
  .resource-sleeve-panel,
  .opportunity-card,
  .asset-card,
  .evidence-card,
  .valuation-card,
  .risk-card,
  .esg-card,
  .deal-room-card,
  .guided-card,
  .howto-card,
  .executive-card
) {
  background: var(--orbis-surface) !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: var(--orbis-radius) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(
  .production-intelligence,
  .prospectivity-location-intelligence,
  .prospectivity-location,
  .country-intelligence-band,
  .product-intelligence,
  .satellite-market-message,
  .decision-band,
  .module-hero-band,
  .guided-question-panel,
  .guided-running-panel,
  .guided-result-panel,
  .executive-results-band,
  .commercial-viability,
  .pipeline-status-panel,
  .resource-focus-band,
  .resource-sleeves,
  .resource-sleeve-panel,
  .country-dashboard-band,
  .answer-engine-band
) {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.98)) !important;
  border: 1px solid var(--orbis-line) !important;
  border-left: 4px solid var(--orbis-accent) !important;
  border-radius: var(--orbis-radius) !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .workspace :is(.production-intelligence, .prospectivity-location-intelligence, .country-intelligence-band, .guided-question-panel, .guided-running-panel, .guided-result-panel) :is(h1, h2, h3, h4, strong) {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.production-intelligence, .prospectivity-location-intelligence, .country-intelligence-band, .guided-question-panel, .guided-running-panel, .guided-result-panel) :is(p, span, small, li) {
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace :is(.filter-band, .filter-row, .control-band, .toolbar, .table-toolbar) {
  background: var(--orbis-surface) !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: var(--orbis-radius) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] :is(input, select, textarea) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line-strong) !important;
  border-radius: 6px !important;
  color: var(--orbis-ink) !important;
  box-shadow: none !important;
}

body[data-client-theme] :is(input, select, textarea):focus {
  border-color: var(--orbis-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orbis-accent) 18%, transparent) !important;
  outline: none !important;
}

body[data-client-theme] :is(button, .button, .btn, .action-button, .pill-button, .nav-button) {
  border-radius: 6px !important;
  font-weight: 700 !important;
}

body[data-client-theme] :is(.primary-action, .primary-button, .btn-primary, button.primary, .guided-run-button) {
  background: var(--orbis-accent) !important;
  border-color: var(--orbis-accent) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--orbis-accent) 20%, transparent) !important;
}

body[data-client-theme] :is(.secondary-action, .secondary-button, .btn-secondary, .ghost-button, .outline-button) {
  background: #ffffff !important;
  border-color: var(--orbis-line-strong) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] :is(.tag, .chip, .pill, .badge, .status-pill, .resource-chip, .resource-sleeve, .continent-chip) {
  background: var(--orbis-accent-soft) !important;
  border: 1px solid color-mix(in srgb, var(--orbis-accent) 38%, var(--orbis-line)) !important;
  color: var(--orbis-accent) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body[data-client-theme] :is(.tag.active, .chip.active, .pill.active, .badge.active, .status-pill.active, .resource-chip.active, .resource-sleeve.active, .continent-chip.active, [aria-pressed="true"]) {
  background: var(--orbis-accent) !important;
  border-color: var(--orbis-accent) !important;
  color: #ffffff !important;
}

body[data-client-theme] table,
body[data-client-theme] .data-table {
  background: var(--orbis-surface) !important;
  border: 1px solid var(--orbis-line) !important;
  border-collapse: collapse !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] :is(th, .table-header) {
  background: #f2f6f9 !important;
  color: var(--orbis-ink-2) !important;
  border-bottom: 1px solid var(--orbis-line) !important;
}

body[data-client-theme] :is(td, tr) {
  border-color: var(--orbis-line) !important;
}

body[data-client-theme] tr:hover td {
  background: var(--orbis-accent-soft) !important;
}

body[data-client-theme] .warning,
body[data-client-theme] .notice,
body[data-client-theme] .callout,
body[data-client-theme] .data-disclaimer,
body[data-client-theme] .source-note {
  background: var(--orbis-warning-soft) !important;
  border: 1px solid color-mix(in srgb, var(--orbis-warning) 35%, var(--orbis-line)) !important;
  border-left: 4px solid var(--orbis-warning) !important;
  color: #402900 !important;
}

body[data-client-theme] .success,
body[data-client-theme] .ready,
body[data-client-theme] .verified {
  background: var(--orbis-success-soft) !important;
  border-color: color-mix(in srgb, var(--orbis-success) 38%, var(--orbis-line)) !important;
  color: var(--orbis-success) !important;
}

body[data-client-theme] .map-shell,
body[data-client-theme] .map-panel,
body[data-client-theme] .world-map-card,
body[data-client-theme] .world-map,
body[data-client-theme] .resource-map,
body[data-client-theme] .target-footprint-map,
body[data-client-theme] .concession-target-map {
  background: #eef5f7 !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: var(--orbis-radius) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .map-style-panel,
body[data-client-theme] .map-layer-control,
body[data-client-theme] .basemap-control,
body[data-client-theme] .leaflet-control {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--orbis-ink) !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .map-style-panel *,
body[data-client-theme] .map-layer-control *,
body[data-client-theme] .basemap-control *,
body[data-client-theme] .leaflet-control * {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .leaflet-control button,
body[data-client-theme] .map-style-panel button,
body[data-client-theme] .basemap-control button {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line-strong) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .leaflet-control button.active,
body[data-client-theme] .map-style-panel button.active,
body[data-client-theme] .basemap-control button.active {
  background: var(--orbis-accent) !important;
  border-color: var(--orbis-accent) !important;
  color: #ffffff !important;
}

body[data-client-theme] .map-overlay-label,
body[data-client-theme] .map-callout,
body[data-client-theme] .country-label,
body[data-client-theme] .asset-label {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--orbis-ink) !important;
  border: 1px solid var(--orbis-line) !important;
  box-shadow: 0 8px 18px rgba(6, 27, 51, 0.16) !important;
}

body[data-client-theme] .target-pin,
body[data-client-theme] .asset-pin,
body[data-client-theme] .opportunity-pin {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orbis-accent) 24%, transparent), 0 8px 20px rgba(6, 27, 51, 0.22) !important;
}

body[data-client-theme] .orbis-engine,
body[data-client-theme] .engine-search,
body[data-client-theme] .engine-panel {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-left: 4px solid var(--orbis-accent-2) !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] a {
  color: var(--orbis-accent) !important;
}

body[data-client-theme] ::selection {
  background: color-mix(in srgb, var(--orbis-accent) 22%, white) !important;
  color: var(--orbis-ink) !important;
}

@media (max-width: 900px) {
  body[data-client-theme] .app-shell:not(.is-hidden) {
    grid-template-columns: 1fr !important;
  }

  body[data-client-theme] .sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    min-height: auto !important;
    max-height: 42vh !important;
    overflow: auto !important;
  }

  body[data-client-theme] :is(.topbar, .page-header, .module-header, .panel-header, .workspace-header) {
    margin: 8px !important;
  }

  body[data-client-theme] .workspace :is(.metric-grid, .summary-grid, .cards-grid, .resource-grid) {
    grid-template-columns: 1fr !important;
  }
}

/* Enterprise presentation guardrails v2: stop legacy theme leakage across authenticated pages. */
body[data-client-theme] {
  --orbis-page: #eef3f7;
  --orbis-page-2: #f7fafc;
  --orbis-surface: #ffffff;
  --orbis-surface-2: #f8fbfd;
  --orbis-surface-3: #edf4f8;
  --orbis-ink: #061b33;
  --orbis-ink-2: #17324d;
  --orbis-muted: #58708a;
  --orbis-muted-2: #758ca4;
  --orbis-line: #cbd8e4;
  --orbis-line-strong: #adbdca;
  --orbis-accent-soft: #e7f4fb;
  --orbis-shadow: 0 16px 34px rgba(6, 27, 51, 0.10);
  --orbis-shadow-soft: 0 8px 18px rgba(6, 27, 51, 0.07);
  color-scheme: light !important;
}

body[data-client-theme="enterprise"],
body[data-client-theme="light"] {
  --orbis-sidebar: #063858;
  --orbis-sidebar-2: #0b4c74;
  --orbis-accent: #006fba;
  --orbis-accent-2: #00a5c8;
}

body[data-client-theme="orbis"] {
  --orbis-sidebar: #062f4c;
  --orbis-sidebar-2: #0a496f;
  --orbis-accent: #0077aa;
  --orbis-accent-2: #11a9c9;
}

body[data-client-theme="satellite"] {
  --orbis-sidebar: #07385f;
  --orbis-sidebar-2: #0e5684;
  --orbis-accent: #126fb5;
  --orbis-accent-2: #19a8d4;
}

body[data-client-theme="mineral"] {
  --orbis-sidebar: #12334c;
  --orbis-sidebar-2: #204b68;
  --orbis-accent: #8b6b22;
  --orbis-accent-2: #b88a2c;
  --orbis-accent-soft: #f8f0df;
}

body[data-client-theme="executive"] {
  --orbis-sidebar: #1e364a;
  --orbis-sidebar-2: #2e536d;
  --orbis-accent: #3b5f78;
  --orbis-accent-2: #7898ad;
  --orbis-accent-soft: #e9f0f4;
}

body[data-client-theme="emerging"] {
  --orbis-sidebar: #073d38;
  --orbis-sidebar-2: #0a5b52;
  --orbis-accent: #08796c;
  --orbis-accent-2: #18a88e;
  --orbis-accent-soft: #e4f6f1;
}

body[data-client-theme] .app-shell,
body[data-client-theme] .workspace,
body[data-client-theme] #workspace,
body[data-client-theme] main,
body[data-client-theme] .workspace-main {
  background: transparent !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace {
  padding: clamp(14px, 1.8vw, 28px) !important;
}

body[data-client-theme] .workspace > :not(.map-shell):not(.leaflet-container),
body[data-client-theme] .workspace .view,
body[data-client-theme] .workspace .module,
body[data-client-theme] .workspace .module-body,
body[data-client-theme] .workspace .content,
body[data-client-theme] .workspace .content-panel,
body[data-client-theme] .workspace .dashboard,
body[data-client-theme] .workspace .dashboard-section {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(
  .panel,
  .card,
  .module-card,
  .section-card,
  .metric-card,
  .kpi-card,
  .summary-card,
  .status-card,
  .workflow-card,
  .clickable-card,
  .detail-card,
  .detail-panel,
  .data-panel,
  .scope-entry-panel,
  .operator-ribbon-card,
  .resource-card,
  .asset-card,
  .opportunity-card,
  .prospect-card,
  .evidence-card,
  .valuation-card,
  .risk-card,
  .esg-card,
  .trace-card,
  .deal-room-card,
  .report-card,
  .guided-card,
  .howto-card,
  .executive-card,
  .country-card,
  .country-identity-strip,
  .country-resource-brief,
  .country-operating-card,
  .country-overview-card,
  .country-brief-card,
  .resource-sleeve-panel,
  .resource-focus-card,
  .resource-profile-card,
  .engine-panel,
  .orbis-engine,
  .engine-search,
  .drilldown-panel,
  .explainability-card,
  .commercial-card,
  .package-card
) {
  background: var(--orbis-surface) !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
  text-shadow: none !important;
}

body[data-client-theme] .workspace :is(
  .module-header,
  .page-header,
  .topbar,
  .view-header,
  .panel-header,
  .workspace-header,
  .section-header,
  .country-header,
  .asset-header,
  .report-header
) {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%) !important;
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%) !important;
  border: 1px solid var(--orbis-line) !important;
  border-top: 4px solid var(--orbis-accent) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(
  .production-intelligence,
  .prospectivity-location-intelligence,
  .prospectivity-location,
  .prospectivity-where-panel,
  .compact-prospectivity-panel,
  .country-intelligence-band,
  .product-intelligence,
  .satellite-market-message,
  .decision-band,
  .module-hero-band,
  .guided-question-panel,
  .guided-running-panel,
  .guided-result-panel,
  .executive-results-band,
  .commercial-viability,
  .pipeline-status-panel,
  .resource-focus-band,
  .resource-sleeves,
  .resource-sleeve-bar,
  .country-dashboard-band,
  .answer-engine-band,
  .opportunity-finder,
  .registry-workbench,
  .discovery-workbench,
  .valuation-workbench,
  .evidence-workbench,
  .satellite-workbench,
  .strategy-workbench,
  .brief-workbench,
  .deal-room-workbench,
  .traceability-workbench,
  .esg-workbench,
  .admin-workbench,
  .country-operating-picture,
  .country-context-panel,
  .country-focus-banner,
  .country-resource-panel
) {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-left: 4px solid var(--orbis-accent) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
  opacity: 1 !important;
}

body[data-client-theme] .workspace :is(
  .dark-section,
  .dark-panel,
  .dark-band,
  .night-panel,
  .hero-band,
  .insight-band,
  .answer-first-band,
  .country-gradient,
  .flag-gradient,
  .country-ribbon,
  .country-theme-strip,
  .country-badge-line,
  .country-identity-card,
  .theme-gradient,
  .gradient-panel,
  .gradient-band,
  .metric-band,
  .workflow-band,
  .source-band,
  .proof-band
) {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-left: 4px solid var(--orbis-accent) !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .workspace :is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  strong,
  b,
  th,
  dt,
  .title,
  .subtitle,
  .headline,
  .metric-value,
  .metric-number,
  .stat-value,
  .kpi-value,
  .card-title,
  .section-title,
  .module-title,
  .asset-name,
  .resource-name,
  .country-name,
  .result-title,
  .label-value
) {
  color: var(--orbis-ink) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body[data-client-theme] .workspace :is(
  p,
  small,
  span,
  td,
  dd,
  li,
  label,
  .muted,
  .subtle,
  .helper-text,
  .description,
  .card-copy,
  .section-copy,
  .support-copy,
  .caption,
  .meta,
  .field-label,
  .label,
  .eyebrow + p
) {
  color: var(--orbis-muted) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body[data-client-theme] .workspace :is(.eyebrow, .kicker, .module-kicker, .section-kicker, .overline) {
  color: var(--orbis-accent) !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

body[data-client-theme] .workspace :is(.metric-grid, .summary-grid, .cards-grid, .resource-grid, .opportunity-grid, .country-grid, .asset-grid, .tile-grid) {
  gap: 14px !important;
}

body[data-client-theme] .workspace :is(.metric-card, .kpi-card, .summary-card, .clickable-card) {
  min-height: 110px !important;
  padding: 18px !important;
  border-top: 3px solid var(--orbis-accent) !important;
}

body[data-client-theme] .workspace :is(.metric-card, .kpi-card, .summary-card, .clickable-card):hover,
body[data-client-theme] .workspace :is(.metric-card, .kpi-card, .summary-card, .clickable-card):focus-within,
body[data-client-theme] .workspace :is(.asset-card, .opportunity-card, .resource-card):hover,
body[data-client-theme] .workspace :is(.asset-card, .opportunity-card, .resource-card):focus-within {
  border-color: color-mix(in srgb, var(--orbis-accent) 45%, var(--orbis-line)) !important;
  box-shadow: 0 18px 36px rgba(6, 27, 51, 0.13) !important;
  transform: translateY(-1px);
}

body[data-client-theme] .workspace table,
body[data-client-theme] .workspace .data-table,
body[data-client-theme] .workspace .table,
body[data-client-theme] .workspace .record-table {
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
  overflow: hidden !important;
}

body[data-client-theme] .workspace :is(thead, th, .table-head, .table-header) {
  background: #f2f6f9 !important;
  color: var(--orbis-ink-2) !important;
}

body[data-client-theme] .workspace :is(tbody, tr, td, .table-row, .record-row) {
  background: #ffffff !important;
  color: var(--orbis-ink) !important;
  border-color: var(--orbis-line) !important;
}

body[data-client-theme] .workspace :is(tr, .table-row, .record-row):hover,
body[data-client-theme] .workspace :is(tr, .table-row, .record-row):focus-within {
  background: var(--orbis-accent-soft) !important;
}

body[data-client-theme] .workspace :is(button, .button, .btn, .action-button, .pill-button, .nav-button, .module-button, .link-button) {
  border-radius: 6px !important;
  min-height: 38px;
  font-weight: 800 !important;
  text-shadow: none !important;
}

body[data-client-theme] .workspace :is(button:not(.primary-action):not(.primary-button):not(.btn-primary), .secondary-action, .secondary-button, .btn-secondary, .ghost-button, .outline-button, .link-button) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line-strong) !important;
  color: var(--orbis-ink) !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.primary-action, .primary-button, .btn-primary, button.primary, .guided-run-button, .cta-button) {
  background: var(--orbis-accent) !important;
  border: 1px solid var(--orbis-accent) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 20px color-mix(in srgb, var(--orbis-accent) 20%, transparent) !important;
}

body[data-client-theme] .workspace :is(.primary-action, .primary-button, .btn-primary, button.primary, .guided-run-button, .cta-button):hover,
body[data-client-theme] .workspace :is(button:not(.primary-action), .button, .btn, .action-button, .link-button):hover {
  filter: none !important;
  border-color: var(--orbis-accent) !important;
}

body[data-client-theme] .workspace :is(.resource-sleeve-button, .resource-chip, .continent-chip, .tag, .chip, .pill, .badge, .status-pill, .evidence-chip, .map-pill, .module-pill) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line-strong) !important;
  color: var(--orbis-ink) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.resource-sleeve-button.active, .resource-chip.active, .continent-chip.active, .tag.active, .chip.active, .pill.active, .badge.active, .status-pill.active, .evidence-chip.active, [aria-pressed="true"]) {
  background: var(--orbis-accent) !important;
  border-color: var(--orbis-accent) !important;
  color: #ffffff !important;
}

body[data-client-theme] .workspace .resource-sleeve-panel {
  display: grid !important;
  grid-template-columns: minmax(220px, 320px) 1fr !important;
  gap: 18px !important;
  align-items: start !important;
  padding: 18px !important;
}

body[data-client-theme] .workspace .resource-sleeve-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

body[data-client-theme] .workspace .country-flag-mark,
body[data-client-theme] .workspace .country-avatar,
body[data-client-theme] .workspace .country-code-badge {
  background: var(--orbis-accent-soft) !important;
  background-image: none !important;
  border: 1px solid color-mix(in srgb, var(--orbis-accent) 35%, var(--orbis-line)) !important;
  color: var(--orbis-accent) !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace .country-identity-strip,
body[data-client-theme] .workspace .country-operating-summary,
body[data-client-theme] .workspace .country-focus-summary {
  display: grid !important;
  grid-template-columns: minmax(220px, 360px) 1fr !important;
  gap: 20px !important;
  align-items: center !important;
}

body[data-client-theme] .workspace :is(.warning, .notice, .callout, .data-disclaimer, .source-note, .country-focus-note) {
  background: #fff8e6 !important;
  background-image: none !important;
  border: 1px solid #e4c879 !important;
  border-left: 4px solid #c48a1b !important;
  color: #3a2a09 !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.warning, .notice, .callout, .data-disclaimer, .source-note, .country-focus-note) * {
  color: #3a2a09 !important;
}

body[data-client-theme] .workspace :is(.success, .ready, .verified, .healthy, .passed) {
  background: #e6f7f1 !important;
  border-color: #9fd7c5 !important;
  color: #006b58 !important;
}

body[data-client-theme] .workspace .map-shell,
body[data-client-theme] .workspace .map-panel,
body[data-client-theme] .workspace .world-map-card,
body[data-client-theme] .workspace .world-map,
body[data-client-theme] .workspace .resource-map,
body[data-client-theme] .workspace .target-footprint-map,
body[data-client-theme] .workspace .concession-target-map,
body[data-client-theme] .workspace .leaflet-container {
  background: #eaf3f7 !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  overflow: hidden !important;
}

body[data-client-theme] .workspace .map-style-panel,
body[data-client-theme] .workspace .map-layer-control,
body[data-client-theme] .workspace .basemap-control,
body[data-client-theme] .workspace .leaflet-control,
body[data-client-theme] .workspace .map-legend,
body[data-client-theme] .workspace .map-status-card {
  background: rgba(255, 255, 255, 0.96) !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  color: var(--orbis-ink) !important;
  box-shadow: 0 12px 28px rgba(6, 27, 51, 0.14) !important;
}

body[data-client-theme] .workspace .map-style-panel *,
body[data-client-theme] .workspace .map-layer-control *,
body[data-client-theme] .workspace .basemap-control *,
body[data-client-theme] .workspace .leaflet-control *,
body[data-client-theme] .workspace .map-legend *,
body[data-client-theme] .workspace .map-status-card * {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.map-overlay-label, .map-callout, .country-label, .asset-label, .leaflet-tooltip, .leaflet-popup-content-wrapper) {
  background: rgba(255, 255, 255, 0.96) !important;
  background-image: none !important;
  color: var(--orbis-ink) !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 22px rgba(6, 27, 51, 0.16) !important;
}

body[data-client-theme] .workspace :is(.map-overlay-label, .map-callout, .country-label, .asset-label, .leaflet-tooltip, .leaflet-popup-content-wrapper) * {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.target-pin, .asset-pin, .opportunity-pin, .map-dot, .resource-dot) {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orbis-accent) 22%, transparent), 0 8px 20px rgba(6, 27, 51, 0.22) !important;
}

body[data-client-theme] .theme-picker,
body[data-client-theme] .topbar-actions select,
body[data-client-theme] .filter-band select,
body[data-client-theme] .filter-band input,
body[data-client-theme] .workspace :is(input, select, textarea) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line-strong) !important;
  color: var(--orbis-ink) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

body[data-client-theme] .theme-picker {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  border: 1px solid var(--orbis-line) !important;
  background: #ffffff !important;
}

body[data-client-theme] .theme-picker span {
  color: var(--orbis-muted) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

body[data-client-theme] .sidebar {
  background: linear-gradient(180deg, var(--orbis-sidebar), var(--orbis-sidebar-2)) !important;
  color: #ffffff !important;
}

body[data-client-theme] .sidebar * {
  text-shadow: none !important;
}

body[data-client-theme] .sidebar :is(.brand-title, h1, h2, h3, strong, .nav-item, .side-link, button) {
  color: #ffffff !important;
}

body[data-client-theme] .sidebar :is(p, small, span:not(.brand-title), .nav-section-title, .section-label) {
  color: rgba(255, 255, 255, 0.72) !important;
}

body[data-client-theme] .sidebar :is(.nav-item.active, .nav-item[aria-current="page"], .side-link.active, button.active) {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.26) !important;
}

body[data-client-theme] .workspace .admin-only,
body[data-client-theme] .workspace .internal-only,
body[data-client-theme] .workspace .provider-debug,
body[data-client-theme] .workspace .cutover-debug,
body[data-client-theme] .workspace .secret-name,
body[data-client-theme] .workspace .hash-value {
  font-family: inherit !important;
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace a {
  color: var(--orbis-accent) !important;
}

body[data-client-theme] .workspace hr,
body[data-client-theme] .workspace .divider {
  border-color: var(--orbis-line) !important;
}

body[data-client-theme] .workspace ::selection {
  background: color-mix(in srgb, var(--orbis-accent) 20%, white) !important;
  color: var(--orbis-ink) !important;
}

@media (max-width: 1100px) {
  body[data-client-theme] .workspace .resource-sleeve-panel,
  body[data-client-theme] .workspace .country-identity-strip,
  body[data-client-theme] .workspace .country-operating-summary,
  body[data-client-theme] .workspace .country-focus-summary {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body[data-client-theme] .workspace {
    padding: 10px !important;
  }

  body[data-client-theme] .workspace :is(.topbar, .page-header, .module-header, .view-header, .panel-header, .workspace-header) {
    padding: 16px !important;
  }

  body[data-client-theme] .workspace :is(.metric-grid, .summary-grid, .cards-grid, .resource-grid, .opportunity-grid, .country-grid, .asset-grid, .tile-grid) {
    grid-template-columns: 1fr !important;
  }
}

/* Enterprise presentation contract v3: one mature visual system across every Orbis workspace. */
body[data-client-theme] {
  --orbis-page: #f3f7fa;
  --orbis-surface: #ffffff;
  --orbis-surface-soft: #f8fbfd;
  --orbis-surface-tint: #edf5fa;
  --orbis-ink: #071b2f;
  --orbis-ink-soft: #16314d;
  --orbis-muted: #58718a;
  --orbis-line: #cfdae5;
  --orbis-line-strong: #b8c8d7;
  --orbis-sidebar: #062f4c;
  --orbis-sidebar-2: #074365;
  --orbis-accent: #006fba;
  --orbis-accent-2: #00a5c8;
  --orbis-accent-soft: #e8f5fb;
  --orbis-success: #0a755b;
  --orbis-success-soft: #e8f8f2;
  --orbis-warning: #9a6600;
  --orbis-warning-soft: #fff6df;
  --orbis-shadow-soft: 0 16px 36px rgba(6, 27, 51, 0.08);
  --orbis-shadow-card: 0 8px 20px rgba(6, 27, 51, 0.06);
  background: var(--orbis-page) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme="orbis"] {
  --orbis-sidebar: #071d34;
  --orbis-sidebar-2: #073d5e;
  --orbis-accent: #008ec8;
  --orbis-accent-2: #00c5d8;
  --orbis-accent-soft: #e6f8fc;
}

body[data-client-theme="satellite"] {
  --orbis-sidebar: #06395f;
  --orbis-sidebar-2: #075c87;
  --orbis-accent: #0078c8;
  --orbis-accent-2: #33b7e8;
  --orbis-accent-soft: #e7f5ff;
}

body[data-client-theme="mineral"] {
  --orbis-sidebar: #17324b;
  --orbis-sidebar-2: #253c55;
  --orbis-accent: #9a6a00;
  --orbis-accent-2: #d69a18;
  --orbis-accent-soft: #fff6de;
}

body[data-client-theme="executive"] {
  --orbis-sidebar: #1b2c3e;
  --orbis-sidebar-2: #263c50;
  --orbis-accent: #315d7e;
  --orbis-accent-2: #6f8fa8;
  --orbis-accent-soft: #eef4f7;
}

body[data-client-theme="emerging"] {
  --orbis-sidebar: #083d3b;
  --orbis-sidebar-2: #0c5b52;
  --orbis-accent: #00836f;
  --orbis-accent-2: #1bbf95;
  --orbis-accent-soft: #e8f8f2;
}

body[data-client-theme="light"] {
  --orbis-page: #f7fafc;
  --orbis-surface: #ffffff;
  --orbis-surface-soft: #fbfdff;
  --orbis-sidebar: #103853;
  --orbis-sidebar-2: #164b70;
  --orbis-accent: #006fba;
  --orbis-accent-2: #18a6d5;
  --orbis-accent-soft: #eef8fc;
}

body[data-client-theme] .app-shell {
  display: grid !important;
  grid-template-columns: 272px minmax(0, 1fr) !important;
  min-height: 100vh !important;
  background: var(--orbis-page) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace,
body[data-client-theme] .main-content,
body[data-client-theme] #workspace,
body[data-client-theme] #dashboardView {
  background: var(--orbis-page) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace {
  padding: 16px 18px 28px !important;
}

body[data-client-theme] .sidebar {
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  width: 272px !important;
  min-width: 272px !important;
  overflow-y: auto !important;
  padding: 16px 14px 44px !important;
  background: linear-gradient(180deg, var(--orbis-sidebar), var(--orbis-sidebar-2)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 10px 0 26px rgba(6, 27, 51, 0.16) !important;
  scrollbar-color: rgba(255, 255, 255, 0.42) rgba(255, 255, 255, 0.08) !important;
}

body[data-client-theme] .sidebar :is(.brand, .sidebar-brand, .brand-lockup) {
  min-height: 64px !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 22px !important;
}

body[data-client-theme] .sidebar img,
body[data-client-theme] .brand-logo img {
  width: 54px !important;
  height: 54px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  padding: 4px !important;
}

body[data-client-theme] .sidebar :is(.brand-title, h1, h2, h3, strong, b, .nav-item, .side-link, button) {
  color: #ffffff !important;
  text-shadow: none !important;
}

body[data-client-theme] .sidebar :is(p, small, span:not(.brand-title), .nav-section-title, .section-label, .nav-group-label) {
  color: rgba(255, 255, 255, 0.74) !important;
  text-shadow: none !important;
}

body[data-client-theme] .sidebar :is(.nav-item, .side-link, .module-nav button, .nav-button) {
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.88) !important;
  min-height: 38px !important;
}

body[data-client-theme] .sidebar :is(.nav-item:hover, .side-link:hover, .module-nav button:hover, .nav-button:hover),
body[data-client-theme] .sidebar :is(.nav-item.active, .nav-item[aria-current="page"], .side-link.active, .module-nav button.active, .nav-button.active) {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

body[data-client-theme] .workspace :is(.topbar, .page-header, .module-header, .view-header, .panel-header, .workspace-header, .country-header, .scope-header) {
  background: #ffffff !important;
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%) !important;
  border: 1px solid var(--orbis-line) !important;
  border-top: 4px solid var(--orbis-accent) !important;
  border-radius: 0 !important;
  box-shadow: var(--orbis-shadow-card) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.topbar, .page-header, .module-header, .view-header, .panel-header, .workspace-header, .country-header, .scope-header)::before,
body[data-client-theme] .workspace :is(.topbar, .page-header, .module-header, .view-header, .panel-header, .workspace-header, .country-header, .scope-header)::after {
  background: none !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.panel, .card, .metric-card, .summary-card, .info-card, .data-card, .action-card, .module-card, .country-card, .resource-card, .asset-card, .opportunity-card, .result-card, .stat-card, .kpi-card, .workflow-card, .tile, .sleeve-chip, .resource-chip, .focus-chip, .country-chip) {
  background: var(--orbis-surface) !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 7px !important;
  box-shadow: var(--orbis-shadow-card) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.production-intelligence, .country-dashboard-panel, .country-intelligence-panel, .prospectivity-location-intelligence, .country-resource-matrix, .country-resource-brief, .country-operating-summary, .country-focus-summary, .commercial-viability, .guided-answer, .guided-answer-panel, .guided-answer-module, .executive-results, .opportunity-finder, .satellite-product-band, .strategy-lab, .deal-room-panel, .evidence-panel, .valuation-panel, .registry-panel, .traceability-panel, .esg-panel, .resource-sleeve-panel, .resource-focus-panel) {
  background: var(--orbis-surface) !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.production-intelligence, .country-dashboard-panel, .country-intelligence-panel, .prospectivity-location-intelligence, .country-resource-matrix, .country-resource-brief, .country-operating-summary, .country-focus-summary, .commercial-viability, .guided-answer, .guided-answer-panel, .guided-answer-module, .executive-results, .opportunity-finder, .satellite-product-band, .strategy-lab, .deal-room-panel, .evidence-panel, .valuation-panel, .registry-panel, .traceability-panel, .esg-panel, .resource-sleeve-panel, .resource-focus-panel) * {
  text-shadow: none !important;
}

body[data-client-theme] .workspace :is(h1, h2, h3, h4, h5, h6, strong, b, th, label, dt, .title, .card-title, .metric-value, .kpi-value, .headline, .summary-value, .result-title) {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(p, small, span, td, dd, li, .muted, .description, .supporting-text, .caption, .subtext, .eyebrow) {
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace :is(.eyebrow, .section-kicker, .module-kicker, .label, .metric-label, .table-label) {
  color: var(--orbis-muted) !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
}

body[data-client-theme] .workspace :is(.metric-grid, .summary-grid, .cards-grid, .resource-grid, .opportunity-grid, .country-grid, .asset-grid, .tile-grid, .kpi-grid) {
  gap: 14px !important;
}

body[data-client-theme] .workspace :is(table, .data-table, .resource-table, .asset-table, .opportunity-table) {
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 7px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  box-shadow: var(--orbis-shadow-card) !important;
}

body[data-client-theme] .workspace :is(thead, .table-head) {
  background: #f2f6f9 !important;
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace :is(tr, .table-row) {
  background: #ffffff !important;
  border-color: var(--orbis-line) !important;
}

body[data-client-theme] .workspace :is(tr:hover, .table-row:hover, .clickable-row:hover, [data-drilldown]:hover) {
  background: var(--orbis-accent-soft) !important;
  cursor: pointer !important;
}

body[data-client-theme] .workspace :is(button, .button, .table-action, .secondary-action, .pill-button, .chip-button, .drill-button) {
  border-radius: 999px !important;
  border: 1px solid var(--orbis-line-strong) !important;
  background: #ffffff !important;
  color: var(--orbis-ink) !important;
  box-shadow: none !important;
  font-weight: 800 !important;
}

body[data-client-theme] .workspace :is(button:hover, .button:hover, .table-action:hover, .secondary-action:hover, .pill-button:hover, .chip-button:hover, .drill-button:hover) {
  border-color: var(--orbis-accent) !important;
  color: var(--orbis-accent) !important;
  background: var(--orbis-accent-soft) !important;
}

body[data-client-theme] .workspace :is(.primary-action, .primary-button, button.primary, .is-active, .active-resource, .active-filter, .sleeve-chip.active, .resource-chip.active) {
  background: var(--orbis-accent) !important;
  border-color: var(--orbis-accent) !important;
  color: #ffffff !important;
}

body[data-client-theme] .workspace :is(.primary-action, .primary-button, button.primary, .is-active, .active-resource, .active-filter, .sleeve-chip.active, .resource-chip.active) * {
  color: #ffffff !important;
}

body[data-client-theme] .workspace :is(.status-pill, .badge, .tag, .pill, .confidence-badge, .readiness-badge) {
  background: var(--orbis-success-soft) !important;
  border: 1px solid #b7e4d4 !important;
  color: var(--orbis-success) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.warning, .notice, .callout, .data-disclaimer, .source-note, .country-focus-note, .user-message, .context-note) {
  background: var(--orbis-warning-soft) !important;
  background-image: none !important;
  border: 1px solid #ead28d !important;
  border-left: 4px solid var(--orbis-warning) !important;
  color: #3b2a05 !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.warning, .notice, .callout, .data-disclaimer, .source-note, .country-focus-note, .user-message, .context-note) * {
  color: #3b2a05 !important;
}

body[data-client-theme] .workspace .filter-band,
body[data-client-theme] .workspace .toolbar,
body[data-client-theme] .workspace .action-bar,
body[data-client-theme] .workspace .control-bar {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-card) !important;
}

body[data-client-theme] .theme-picker,
body[data-client-theme] .topbar-actions select,
body[data-client-theme] .filter-band select,
body[data-client-theme] .filter-band input,
body[data-client-theme] .workspace :is(input, select, textarea) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line-strong) !important;
  border-radius: 6px !important;
  color: var(--orbis-ink) !important;
  box-shadow: none !important;
}

body[data-client-theme] .theme-picker {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px 6px !important;
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 6px !important;
}

body[data-client-theme] .theme-picker span {
  color: var(--orbis-muted) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

body[data-client-theme] .workspace .map-shell,
body[data-client-theme] .workspace .map-panel,
body[data-client-theme] .workspace .world-map-card,
body[data-client-theme] .workspace .world-map,
body[data-client-theme] .workspace .resource-map,
body[data-client-theme] .workspace .target-footprint-map,
body[data-client-theme] .workspace .concession-target-map,
body[data-client-theme] .workspace .leaflet-container {
  background: #dfeff5 !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-soft) !important;
  color: var(--orbis-ink) !important;
  overflow: hidden !important;
}

body[data-client-theme] .workspace :is(.world-map, .resource-map, .target-footprint-map, .concession-target-map) {
  min-height: clamp(520px, 62vh, 760px) !important;
}

body[data-client-theme] .workspace .leaflet-tile-pane {
  filter: saturate(0.92) contrast(0.98) brightness(1.03) !important;
}

body[data-client-theme] .workspace :is(.map-style-panel, .map-layer-control, .basemap-control, .leaflet-control, .map-legend, .map-status-card, .map-overlay-label, .map-callout, .country-label, .asset-label, .leaflet-tooltip, .leaflet-popup-content-wrapper) {
  background: rgba(255, 255, 255, 0.96) !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 28px rgba(6, 27, 51, 0.16) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.map-style-panel, .map-layer-control, .basemap-control, .leaflet-control, .map-legend, .map-status-card, .map-overlay-label, .map-callout, .country-label, .asset-label, .leaflet-tooltip, .leaflet-popup-content-wrapper) * {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.country-fill, .country-polygon, .country-shape) {
  fill: color-mix(in srgb, var(--orbis-accent) 34%, #d9ecf6) !important;
  stroke: color-mix(in srgb, var(--orbis-accent) 70%, #ffffff) !important;
}

body[data-client-theme] .workspace :is(.target-pin, .asset-pin, .opportunity-pin, .map-dot, .resource-dot) {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orbis-accent) 24%, transparent), 0 8px 20px rgba(6, 27, 51, 0.24) !important;
}

body[data-client-theme] .workspace :is(.country-identity-strip, .country-color-strip, .country-ribbon, .country-flag-strip, .flag-band) {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  border-left: 4px solid var(--orbis-accent) !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-card) !important;
}

body[data-client-theme] .workspace :is(.flag-gradient, .country-gradient, .theme-gradient, .rainbow-band, .country-theme-bar) {
  background: var(--orbis-accent-soft) !important;
  background-image: none !important;
}

body[data-client-theme] .workspace :is(.resource-sleeve-panel, .resource-sleeves, .sleeve-list) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-card) !important;
}

body[data-client-theme] .workspace :is(.resource-sleeve-panel, .resource-sleeves, .sleeve-list) :is(.sleeve-chip, .resource-chip) {
  min-height: 52px !important;
  padding: 10px 16px !important;
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.resource-sleeve-panel, .resource-sleeves, .sleeve-list) :is(.sleeve-chip:hover, .resource-chip:hover) {
  background: var(--orbis-accent-soft) !important;
  border-color: var(--orbis-accent) !important;
}

body[data-client-theme] .workspace :is(.orbis-engine, .feedback-widget, .feedback-panel, .ai-search, .engine-panel) {
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .workspace :is(.admin-only, .internal-only, .provider-debug, .cutover-debug, .operational-health, .provider-queue, .secret-name, .hash-value) {
  font-family: inherit !important;
}

body[data-client-theme] .workspace :is(.secret-name, .hash-value, code) {
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace a {
  color: var(--orbis-accent) !important;
}

body[data-client-theme] .workspace hr,
body[data-client-theme] .workspace .divider {
  border-color: var(--orbis-line) !important;
}

body[data-client-theme] .workspace ::selection {
  background: color-mix(in srgb, var(--orbis-accent) 20%, #ffffff) !important;
  color: var(--orbis-ink) !important;
}

@media (max-width: 1180px) {
  body[data-client-theme] .app-shell {
    grid-template-columns: 1fr !important;
  }

  body[data-client-theme] .sidebar {
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: 42vh !important;
  }
}

@media (max-width: 760px) {
  body[data-client-theme] .workspace {
    padding: 10px !important;
  }

  body[data-client-theme] .workspace :is(.topbar, .page-header, .module-header, .view-header, .panel-header, .workspace-header, .country-header, .scope-header) {
    padding: 16px !important;
  }

  body[data-client-theme] .workspace :is(.metric-grid, .summary-grid, .cards-grid, .resource-grid, .opportunity-grid, .country-grid, .asset-grid, .tile-grid, .kpi-grid) {
    grid-template-columns: 1fr !important;
  }

  body[data-client-theme] .workspace :is(.world-map, .resource-map, .target-footprint-map, .concession-target-map) {
    min-height: 460px !important;
  }
}

/* Enterprise presentation contract v4: remove legacy visual residue from user-facing modules. */
body[data-client-theme] .workspace :is(
  .country-dashboard,
  .country-operating-picture,
  .country-identity,
  .country-identity-strip,
  .country-resource-brief,
  .country-resource-panel,
  .country-focus-note,
  .resource-focus-notice,
  .opportunity-finder,
  .prospectivity-location-intelligence,
  .production-intelligence,
  .agriculture-monitoring-panel,
  .satellite-market-message,
  .orbis-strength-panel,
  .guided-answer,
  .guided-question-panel,
  .guided-running-panel,
  .guided-result-panel,
  .commercial-viability,
  .decision-module,
  .decision-now,
  .source-routed-opportunities,
  .concession-profile,
  .concession-target-panel,
  .evidence-controlled-output,
  .deal-room-section,
  .sovereign-registry-section,
  .registry-workbench,
  .portfolio-valuation,
  .portfolio-validation,
  .traceability-workbench,
  .esg-workbench,
  .satellite-workbench,
  .executive-workbench,
  .answer-engine-panel
) {
  background: #ffffff !important;
  background-image: none !important;
  color: var(--orbis-ink) !important;
  border: 1px solid var(--orbis-line) !important;
  border-radius: 8px !important;
  box-shadow: var(--orbis-shadow-card) !important;
}

body[data-client-theme] .workspace :is(
  .country-dashboard,
  .country-operating-picture,
  .country-identity,
  .country-identity-strip,
  .country-resource-brief,
  .country-resource-panel,
  .country-focus-note,
  .resource-focus-notice,
  .opportunity-finder,
  .prospectivity-location-intelligence,
  .production-intelligence,
  .agriculture-monitoring-panel,
  .satellite-market-message,
  .orbis-strength-panel,
  .guided-answer,
  .guided-question-panel,
  .guided-running-panel,
  .guided-result-panel,
  .commercial-viability,
  .decision-module,
  .decision-now,
  .source-routed-opportunities,
  .concession-profile,
  .concession-target-panel,
  .evidence-controlled-output,
  .deal-room-section,
  .sovereign-registry-section,
  .registry-workbench,
  .portfolio-valuation,
  .portfolio-validation,
  .traceability-workbench,
  .esg-workbench,
  .satellite-workbench,
  .executive-workbench,
  .answer-engine-panel
) :is(h1,h2,h3,h4,h5,strong,.metric-value,.stat-value,.kpi-value,.card-title,.section-title) {
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(
  .country-dashboard,
  .country-operating-picture,
  .country-identity,
  .country-identity-strip,
  .country-resource-brief,
  .country-resource-panel,
  .country-focus-note,
  .resource-focus-notice,
  .opportunity-finder,
  .prospectivity-location-intelligence,
  .production-intelligence,
  .agriculture-monitoring-panel,
  .satellite-market-message,
  .orbis-strength-panel,
  .guided-answer,
  .guided-question-panel,
  .guided-running-panel,
  .guided-result-panel,
  .commercial-viability,
  .decision-module,
  .decision-now,
  .source-routed-opportunities,
  .concession-profile,
  .concession-target-panel,
  .evidence-controlled-output,
  .deal-room-section,
  .sovereign-registry-section,
  .registry-workbench,
  .portfolio-valuation,
  .portfolio-validation,
  .traceability-workbench,
  .esg-workbench,
  .satellite-workbench,
  .executive-workbench,
  .answer-engine-panel
) :is(p,small,span,li,td,th,dd,dt,label) {
  color: var(--orbis-muted) !important;
}

body[data-client-theme] .workspace :is(
  .country-dashboard,
  .country-operating-picture,
  .country-identity,
  .country-resource-brief,
  .opportunity-finder,
  .production-intelligence,
  .prospectivity-location-intelligence,
  .commercial-viability,
  .guided-question-panel,
  .guided-running-panel,
  .decision-module
) :is(.card,.metric-card,.summary-card,.factset-card,.decision-card,.opportunity-card,.resource-card,.asset-card,.tile-card,.drill-card,.value-card,.risk-card,.evidence-card) {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid var(--orbis-line) !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-soft) !important;
}

body[data-client-theme] .workspace :is(.decision-strip,.decision-grid,.factset-step-grid,.focused-intelligence-grid,.metric-strip,.summary-strip,.resource-focus-strip,.answer-flow-strip) {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

body[data-client-theme] .workspace :is(.section-dark,.dark-panel,.legacy-dark-panel,.gradient-panel,.hero-dark-panel) {
  background: #ffffff !important;
  background-image: none !important;
  color: var(--orbis-ink) !important;
  border: 1px solid var(--orbis-line) !important;
}

body[data-client-theme] .workspace :is(.section-dark,.dark-panel,.legacy-dark-panel,.gradient-panel,.hero-dark-panel) * {
  color: inherit !important;
}

body[data-client-theme] .workspace :is(.step-card,.flow-step,.process-step) {
  min-height: 72px !important;
  background: #ffffff !important;
  border: 1px solid var(--orbis-line) !important;
  color: var(--orbis-ink) !important;
  box-shadow: var(--orbis-shadow-card) !important;
}

body[data-client-theme] .workspace :is(.step-card,.flow-step,.process-step) .step-number,
body[data-client-theme] .workspace :is(.step-badge,.number-badge) {
  background: var(--orbis-accent) !important;
  color: #ffffff !important;
  border-radius: 999px !important;
}

body[data-client-theme] .workspace :is(.resource-sleeves,.resource-sleeve-panel,.sleeve-list) {
  align-items: stretch !important;
  background: #ffffff !important;
}

body[data-client-theme] .workspace :is(.resource-sleeves,.resource-sleeve-panel,.sleeve-list) :is(.sleeve-chip,.resource-chip) {
  background: #ffffff !important;
  min-width: 132px !important;
  color: var(--orbis-ink) !important;
}

body[data-client-theme] .workspace :is(.resource-sleeves,.resource-sleeve-panel,.sleeve-list) :is(.sleeve-chip,.resource-chip) :is(small,span) {
  color: var(--orbis-muted) !important;
}

body[data-client-theme="orbis"] {
  --orbis-accent: #00a3e0;
  --orbis-accent-2: #0b5cab;
  --orbis-sidebar: #072b45;
}

body[data-client-theme="satellite"] {
  --orbis-accent: #0072ce;
  --orbis-accent-2: #37a6ff;
  --orbis-sidebar: #082f57;
}

body[data-client-theme="mineral"] {
  --orbis-accent: #b88700;
  --orbis-accent-2: #d6a51f;
  --orbis-sidebar: #17324b;
}

body[data-client-theme="executive"] {
  --orbis-accent: #385a7c;
  --orbis-accent-2: #66788a;
  --orbis-sidebar: #15283b;
}

body[data-client-theme="emerging"] {
  --orbis-accent: #007a5a;
  --orbis-accent-2: #00a676;
  --orbis-sidebar: #08382f;
}

body[data-client-theme="light"] {
  --orbis-accent: #006bb6;
  --orbis-accent-2: #1f8acb;
  --orbis-sidebar: #063b62;
}