/*
 * OUCHEN CRM · Comfortable Midnight (2026-10-31)
 * Approved visual direction: layered midnight/petroleum instead of flat black,
 * vivid but restrained cyan, emerald, violet, amber and rose accents.
 *
 * Dark-mode only. Loaded AFTER rtl.css and page-specific styles on both the
 * CRM and the public/admin portal. Never changes theme state, data or access.
 */
html[data-color-mode="dark"]{
  --comfort-base:#0b1928;
  --comfort-nav:#0c1625;
  --comfort-panel:#142a3b;
  --comfort-raised:#1a3446;
  --comfort-input:#102637;
  --comfort-line:#345264;
  --comfort-text:#eaf3f9;
  --comfort-secondary:#c4d6e3;
  --comfort-muted:#a5bdca;
  --comfort-cyan:#63d8e4;
  --comfort-emerald:#88e3b8;
  --comfort-violet:#b6a7ff;
  --comfort-amber:#fbd28b;
  --comfort-rose:#ffadb8;
  --comfort-focus:#6ce8f0;
  --bg:var(--comfort-base);
  --panel:var(--comfort-panel);
  --surface:var(--comfort-panel);
  --ink:var(--comfort-text);
  --text:var(--comfort-text);
  --muted:var(--comfort-muted);
  --line:var(--comfort-line);
  --border:var(--comfort-line);
  --theme-fg:var(--comfort-text);
  --theme-secondary:var(--comfort-secondary);
  --theme-accent:var(--comfort-cyan);
  --theme-surface:var(--comfort-panel);
  --theme-raised:var(--comfort-raised);
  --theme-edge:var(--comfort-line);
  --theme-hover:#24495c;
  --theme-hover-text:#f3faff;
  --theme-selected:#256073;
  --ouchen-accent:var(--comfort-cyan);
  --ouchen-ink:var(--comfort-text);
  --ouchen-muted:var(--comfort-muted);
  --ouchen-line:var(--comfort-line);
  --paper:var(--comfort-base);
  --white:var(--comfort-panel);
  --teal:var(--comfort-cyan);
  color-scheme:dark;
}
html[data-color-mode="dark"] body:is(.crm-app,.admin-page,.public-page,.onboarding-page,.ouchen-landing){
  background:var(--comfort-base)!important;
  color:var(--comfort-text);
}
html[data-color-mode="dark"] :is(.crm-app,.admin-page,.public-page,.onboarding-page,.ouchen-landing)
:is(button,a,input,select,textarea,summary):focus-visible{
  outline:2px solid var(--comfort-focus)!important;
  outline-offset:3px;
}
/* Keyboard focus stays visible, and the status system is never desaturated. */
html[data-color-mode="dark"] :is(.crm-app,.admin-page,.public-page,.onboarding-page,.ouchen-landing)
:is(a,button,summary){transition:background-color .16s ease,border-color .16s ease,color .16s ease}
@media(prefers-reduced-motion:reduce){
  html[data-color-mode="dark"] :is(.crm-app,.admin-page,.public-page,.onboarding-page,.ouchen-landing)
  :is(a,button,summary){transition:none!important}
}

/* === Client CRM: application shell, navigation and surfaces === */
html[data-color-mode="dark"] body.crm-app{
  --bg:var(--comfort-base);
  --panel:var(--comfort-panel);
  --soft:#1b3c4b;
  --ink:var(--comfort-text);
  --text:var(--comfort-text);
  --muted:var(--comfort-muted);
  --line:var(--comfort-line);
  --accent:var(--comfort-cyan);
  --secondary:var(--comfort-emerald);
  --dash-ink:var(--comfort-text);
  --dash-muted:var(--comfort-muted);
  --service-readable:#9ee5ed;
}
html[data-color-mode="dark"] body.crm-app>aside{
  background:linear-gradient(180deg,#0e2233 0%,#0c1827 100%)!important;
  color:var(--comfort-secondary);
  border-inline-end:1px solid #294356;
}
html[data-color-mode="dark"] body.crm-app>aside :is(.brand,.profile-name){color:#ebf5fb}
html[data-color-mode="dark"] body.crm-app>aside nav button:not(.active){color:#b9d0db}
html[data-color-mode="dark"] body.crm-app>aside nav button.active{
  background:#21556a!important;
  color:#f0fbff!important;
  border-inline-start:3px solid var(--comfort-cyan);
  box-shadow:inset 0 1px 0 #ffffff13!important;
}
html[data-color-mode="dark"] body.crm-app>aside nav button:is(:hover,:focus-visible){
  background:#1f4053!important;
  color:#fff!important;
}
html[data-color-mode="dark"] body.crm-app main{
  background:
    radial-gradient(ellipse 60% 42% at 95% 0%,#16455a46 0%,transparent 72%),
    var(--comfort-base)!important;
  color:var(--comfort-text);
}
html[data-color-mode="dark"] body.crm-app :is(.dashboard-intro,.heading,.dashboard-section-title,.filters){
  color:var(--comfort-text)!important;
}
html[data-color-mode="dark"] body.crm-app #serviceTabs.workspace-bar{
  background:#12293b!important;
  border:1px solid #355367!important;
  color:var(--comfort-text)!important;
  border-radius:18px;
  box-shadow:0 9px 34px #030d1838!important;
}
html[data-color-mode="dark"] body.crm-app #serviceTabs :is(.workspace-country-picker,.workspace-service-picker,.workspace-icon-menu)>summary{
  background:#1a3649!important;
  color:#dff1f8!important;
  border-color:#426379!important;
}
html[data-color-mode="dark"] body.crm-app #serviceTabs :is(.workspace-country-picker,.workspace-service-picker,.workspace-icon-menu)>summary:is(:hover,:focus-visible){
  background:#255369!important;
  color:white!important;
  border-color:#72c4d2!important;
}
html[data-color-mode="dark"] body.crm-app #serviceTabs .workspace-training{
  background:#1d4354!important;
  border-color:#43788a!important;
  color:#a9eff4!important;
}
html[data-color-mode="dark"] body.crm-app #serviceTabs .workspace-training:is(:hover,:focus-visible){
  background:#276074!important;
  color:#fff!important;
}
html[data-color-mode="dark"] body.crm-app :is(.panel,.card,.profit-secondary,.dashboard-costs>.card,.dashboard-rings>.panel,.welcome-card,
 .workspace-dropdown-panel,.workspace-profile-menu,.dashboard-filter-panel,.workspace-profile-page,
 .period-menu,.month-menu,dialog,.tablewrap,.chart-tooltip,.import-setup,.ad-form-section){
  background:var(--comfort-panel)!important;
  color:var(--comfort-text)!important;
  border-color:var(--comfort-line)!important;
  box-shadow:0 12px 34px #020a1529!important;
}
html[data-color-mode="dark"] body.crm-app :is(.chart-plot,.chart-kpis,.chart-values,.dashboard-filter-panel,.dashboard-local-scope,
 .workspace-dropdown-panel button,.period-popover,.product-table-filters,.market-context-fields,.training-video){
  background:var(--comfort-raised)!important;
  border-color:#3b5869!important;
  color:var(--comfort-secondary)!important;
}
html[data-color-mode="dark"] body.crm-app :is(.dashboard-intro h1,.heading h1,.dashboard-section-title h2,
 .workspace-profile-page h2,.panel h2,.card h2,.workspace-name>span,.profile-account-summary strong){
  color:var(--comfort-text)!important;
}
html[data-color-mode="dark"] body.crm-app :is(.dashboard-intro p,.dashboard-section-title p,.workspace-name small,
 .chart-caption,.chart-legend,.dashboard-rings>.panel>.mini,.help,.mini,.label,.profile-contact-hint){
  color:var(--comfort-muted)!important;
}
html[data-color-mode="dark"] body.crm-app :is(.workspace-all-favicon,.workspace-service-favicon,.workspace-avatar){
  border-color:#3f7483;
}
html[data-color-mode="dark"] body.crm-app :is(input,select,textarea,.period-picker summary,
 .dashboard-filter>summary,.product-country-picker>summary){
  background:var(--comfort-input)!important;
  border-color:#476477!important;
  color:var(--comfort-text)!important;
  color-scheme:dark;
}
html[data-color-mode="dark"] body.crm-app :is(input,textarea)::placeholder{color:#a1b6c7!important;opacity:1}
html[data-color-mode="dark"] body.crm-app :is(input:read-only,input:disabled){
  background:#1a3040!important;
  color:#b9cbd9!important;
}
html[data-color-mode="dark"] body.crm-app :is(.ghost,.workspace-signout,.dashboard-filter-reset,.ma-pagination button){
  background:#1c3649!important;
  border-color:#426276!important;
  color:#cfe6ef!important;
}
html[data-color-mode="dark"] body.crm-app :is(.ghost,.workspace-signout,.dashboard-filter-reset):is(:hover,:focus-visible){
  background:#2b5569!important;color:#fff!important;
}
html[data-color-mode="dark"] body.crm-app button[type=submit]:not(.ghost){
  background:#118a9a!important;
  border-color:#3fc9d2!important;
  color:#f7ffff!important;
}
html[data-color-mode="dark"] body.crm-app button[type=submit]:not(.ghost):is(:hover,:focus-visible){
  background:#20a4b2!important;
}
html[data-color-mode="dark"] body.crm-app .private{
  color:#baf1f1!important;
  background:#214656!important;
  border-color:#447a88!important;
}
html[data-color-mode="dark"] body.crm-app :is(.workspace-announcement,.profile-account-summary,.profile-page-preferences,
 .operation-foot,.dashboard-daily,.chart-kpis>div){
  border-color:var(--comfort-line)!important;
}
html[data-color-mode="dark"] body.crm-app :is(.workspace-announcement.unread,.notification-panel .unread){
  background:#193849!important;
  border-inline-start:3px solid var(--comfort-cyan);
}
html[data-color-mode="dark"] body.crm-app #serviceTabs .workspace-notification-badge{
  background:#e14f66!important;
  color:#fff!important;
  border-color:#12293b!important;
}
html[data-color-mode="dark"] body.crm-app #workspaceDialog.training-dialog .training-video{
  background:#1b3546!important;border-color:#406376!important;
}
html[data-color-mode="dark"] body.crm-app .training-frame{
  background:#0a1e2e;
}
html[data-color-mode="dark"] body.crm-app #profileEmail[readonly]{
  background:#1b3041!important;
  border-color:#3c596b!important;
  color:#bacddd!important;
}

/* Distinct dark rows while preserving semantic colored values and charts. */
html[data-color-mode="dark"] body.crm-app :is(.tablewrap,.product-table,.orders-table){border-color:var(--comfort-line)!important}
html[data-color-mode="dark"] body.crm-app :is(th,.tablewrap th){
  background:#1e3a4e!important;
  border-color:#3a5a6c!important;
  color:#d7e8f0!important;
}
html[data-color-mode="dark"] body.crm-app :is(td,.tablewrap td){
  border-color:#2e4a5c!important;
  color:#d8e8f0!important;
}
html[data-color-mode="dark"] body.crm-app tbody tr:nth-child(even):not(:hover)>td:not([class*="ma-"]){
  background:#193142;
}
html[data-color-mode="dark"] body.crm-app tbody tr:nth-child(odd):not(:hover)>td:not([class*="ma-"]){
  background:#152b3c;
}
html[data-color-mode="dark"] body.crm-app tbody tr:is(:hover,:focus-within)>td{
  background:#245064!important;
  color:#f2fbff!important;
}
html[data-color-mode="dark"] body.crm-app :is(.red,.redText,.down,.ma-text-danger){color:var(--comfort-rose)!important}
html[data-color-mode="dark"] body.crm-app :is(.greenText,.up,.ma-text-positive){color:var(--comfort-emerald)!important}
html[data-color-mode="dark"] body.crm-app :is(.warning,.notice.warning){
  background:#48392d!important;color:#f7dda9!important;border-color:#806346!important;
}
html[data-color-mode="dark"] body.crm-app .warning :is(p,small,strong,a){color:#f7dda9!important}

/* Monthly Analysis — selectively lifts surfaces, not the profit/status meaning. */
html[data-color-mode="dark"] body.crm-app .ma{
  background:#132c3b;
  border-color:#345768;
  --ma-ink:#edf5fa;
  --ma-muted:#afcbd6;
  --ma-line:#3b5c6b;
  --ma-teal:#7cdee8;
  --ma-green:#85e4be;
}
html[data-color-mode="dark"] body.crm-app .ma .ma-priority{
  box-shadow:0 8px 24px #03101e24;
}
html[data-color-mode="dark"] body.crm-app .ma .ma-table th:nth-child(odd){background:#254657!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table th:nth-child(even){background:#2b4d5e!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table td:nth-child(odd){background:#182f40!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table td:nth-child(even){background:#203b4a!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table tbody tr:not(.ma-detail-row):is(:hover,:focus-within)>td{
  background:#2a5465!important;
}
html[data-color-mode="dark"] body.crm-app .ma .ma-table .ma-detail-row td{background:#1b3344!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table .ma-text-danger{color:#ffadb8!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table .ma-text-positive{color:#96edc5!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-table .ma-text-attention{color:#ffda96!important}
html[data-color-mode="dark"] body.crm-app .ma .ma-pagination button{
  background:#1b3b4d!important;color:#d5f1f4!important;border-color:#436776!important;
}

/* Simulation — earlier specific CSS forced bright price breakdown cards. */
html[data-color-mode="dark"] body.crm-app .product-simulation{
  --ps-ink:var(--comfort-text);
  --ps-muted:var(--comfort-muted);
  --ps-border:var(--comfort-line);
  --ps-blue:var(--comfort-cyan);
}
html[data-color-mode="dark"] body.crm-app .product-simulation :is(.ps-section,.ps-service,.ps-metric,.ps-detail){
  background:#173043!important;border-color:#395d71!important;color:var(--comfort-text);
}
html[data-color-mode="dark"] body.crm-app .product-simulation :is(.ps-step-heading,.ps-guide,.ps-market-fees,.ps-mixed-mode){
  background:#203e51!important;border-color:#456677!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown,
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss .ps-price-breakdown{
  background:#1e3d48!important;border-color:#4c7477!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown>div{
  border-color:#42616b!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown>div span{
  color:#bbd4dc!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown>div strong{
  color:#e5f5f6!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss .ps-price-breakdown>div strong{
  color:#ffc4cf!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation :is(.ps-price-panel,.ps-metric-profit){
  border-color:#448071!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss{
  border-color:#915562!important;
}

/* Service catalog and account menus, including client modal surfaces. */
html[data-color-mode="dark"] body.crm-app :is(.ready-services-dialog,.ready-services-dialog .ready-services-shell,
 .ready-services-dialog .catalog-client-heading,.ready-services-dialog .catalog-client-card,
 .ready-services-dialog .catalog-country-tile){
  background:var(--comfort-panel)!important;
  border-color:var(--comfort-line)!important;
  color:var(--comfort-text);
}
html[data-color-mode="dark"] body.crm-app .ready-services-dialog .catalog-client-card{
  border-top-color:var(--catalog-accent,var(--comfort-cyan))!important;
}
html[data-color-mode="dark"] body.crm-app .ready-services-dialog :is(.catalog-template-main h3,.catalog-country-tile strong){
  color:var(--comfort-text)!important;
}

/* === Owner administration: use same layered palette, preserve sidebar === */
html[data-color-mode="dark"] body.admin-page{
  --admin-bg:var(--comfort-base);
  --admin-card:var(--comfort-panel);
  --admin-ink:var(--comfort-text);
  --admin-muted:var(--comfort-muted);
  --admin-line:var(--comfort-line);
  --admin-primary:var(--comfort-cyan);
  --admin-soft:#1e4757;
  --admin-shadow:0 12px 32px #020b1838;
  background:var(--comfort-base)!important;
  color:var(--comfort-text);
}
html[data-color-mode="dark"] body.admin-page>main{
  background:radial-gradient(ellipse at 92% 2%,#194c6040,transparent 45%),var(--comfort-base)!important;
}
html[data-color-mode="dark"] body.admin-page .site-nav{
  background:#14293c!important;
  border-color:var(--comfort-line)!important;
}
html[data-color-mode="dark"] body.admin-page .site-nav>nav{
  background:var(--comfort-nav)!important;
  border-color:#2b4155!important;
}
html[data-color-mode="dark"] body.admin-page .site-nav>nav a:not([aria-current=page]){
  color:#bbd1dd!important;
}
html[data-color-mode="dark"] body.admin-page .site-nav>nav a[aria-current=page]{
  background:#24576b!important;color:#f4fbff!important;
  border-color:#4596a8!important;
}
html[data-color-mode="dark"] body.admin-page :is(.admin-metric,.admin-card,.admin-panel,.admin-section,.admin-note,
 .form-card,.catalog-admin-card,.admin-catalog-dialog,.catalog-country,.admin-table-wrap){
  background:var(--comfort-panel)!important;
  color:var(--comfort-text)!important;
  border-color:var(--comfort-line)!important;
}
html[data-color-mode="dark"] body.admin-page :is(.admin-metric span,.admin-page-description,.admin-filters label){
  color:var(--comfort-muted)!important;
}
html[data-color-mode="dark"] body.admin-page :is(.admin-metric strong,.page-intro h1,.section-title h2,
 .admin-statistics h2,.admin-statistics h3){color:var(--comfort-text)!important}
html[data-color-mode="dark"] body.admin-page :is(input,select,textarea){
  background:var(--comfort-input)!important;
  color:var(--comfort-text)!important;
  border-color:#466477!important;
}
html[data-color-mode="dark"] body.admin-page :is(th,.admin-table th){
  background:#213e50!important;color:#d8eaf2!important;border-color:#375568!important;
}
html[data-color-mode="dark"] body.admin-page :is(td,.admin-table td){
  background:#162d3f!important;color:#dbeaf2!important;border-color:#304c5b!important;
}
html[data-color-mode="dark"] body.admin-page tbody tr:nth-child(even)>td{
  background:#1b3546!important;
}
html[data-color-mode="dark"] body.admin-page tbody tr:is(:hover,:focus-within)>td{
  background:#294e60!important;
}
html[data-color-mode="dark"] body.admin-page .admin-statistics{
  --stat-ink:var(--comfort-text);
  --stat-muted:var(--comfort-muted);
  --stat-line:var(--comfort-line);
  --stat-card:var(--comfort-panel);
  --stat-bg:var(--comfort-base);
  --stat-accent:var(--comfort-cyan);
  --stat-accent-soft:#1d4757;
}
html[data-color-mode="dark"] body.admin-page .admin-statistics :is(.stat-filterbar,.stat-kpi,
 .stat-composition-card,.stat-snapshot,.stat-panel,.stat-table-wrap){
  background:var(--comfort-panel)!important;border-color:var(--comfort-line)!important;
}
html[data-color-mode="dark"] body.admin-page .stat-composition-card .stat-composition-select{
  background:var(--comfort-input)!important;border-color:#496779!important;
}
html[data-color-mode="dark"] body.admin-page .stat-composition-card .stat-composition-select select{
  color:var(--comfort-text)!important;
}

/* === Public marketing, onboarding, support and legal pages === */
html[data-color-mode="dark"] body:is(.public-page,.onboarding-page,.ouchen-landing){
  --ink:var(--comfort-text);
  --muted:var(--comfort-muted);
  --line:var(--comfort-line);
  --surface:var(--comfort-panel);
  --paper:var(--comfort-base);
  --teal:var(--comfort-cyan);
  --deep:#0c2537;
  --white:var(--comfort-panel);
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) :is(
 main,.cap-section,.cap-facts,.cap-benefits,.cap-story,.cap-reviews,
 .marketing-faq,.reviews-section,.offers-section,.signup-section,.feature-route,.actual-screens-section){
 background-color:var(--comfort-base)!important;
 color:var(--comfort-text);
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) :is(
 .feature-card,.pricing-card,.form-card,.onboarding-card,.support-guide,.support-ticket,
 .support-channels>a,.access-card,.legal-copy,.review-card,.actual-screen,.section-card,
 .marketing-faq details,.cap-benefit-grid>article){
 background:var(--comfort-panel)!important;
 border-color:var(--comfort-line)!important;
 color:var(--comfort-text)!important;
 box-shadow:0 12px 30px #020b1829;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) :is(
 .page-intro h1,.form-card h2,.pricing-card h2,.feature-card h3,.review-card h3,.legal-copy h2){
 color:var(--comfort-text)!important;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) :is(
 .page-intro p,.feature-card p,.review-card p,.form-help,.pricing-card p,.legal-copy p){
 color:var(--comfort-muted)!important;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) :is(input,textarea,select){
 background:var(--comfort-input)!important;
 border-color:#476477!important;
 color:var(--comfort-text)!important;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) :is(input,textarea)::placeholder{
 color:#9bb5c5;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) .pricing-card.featured{
 background:linear-gradient(140deg,#174354,#183149)!important;
 border-color:#62c1cd!important;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) .pricing-card.coming-soon{
 background:#192b3c!important;
}
html[data-color-mode="dark"] :is(.public-page,.onboarding-page,.ouchen-landing) .theme-toggle{
 background:#1c394b!important;color:#d6f7f8!important;border-color:#476d7c!important;
}

/* Readable statuses keep their meaning: green success, amber caution, rose error. */
html[data-color-mode="dark"] :is(.crm-app,.admin-page,.public-page,.onboarding-page) :is(
 .status-pill.active,.status-badge.success,.success-badge){
 background:#1f4a3f!important;color:#a5f1c9!important;border-color:#427b67!important;
}
html[data-color-mode="dark"] :is(.crm-app,.admin-page,.public-page,.onboarding-page) :is(
 .status-pill.pending,.status-badge.pending){
 background:#55402d!important;color:#ffdfaa!important;border-color:#846446!important;
}
html[data-color-mode="dark"] :is(.crm-app,.admin-page,.public-page,.onboarding-page) :is(
 .status-pill.suspended,.status-badge.danger,.error-badge){
 background:#59323e!important;color:#ffc4cd!important;border-color:#925466!important;
}
/* Avoid flashing a user switching themes, without a persistent all-black wash. */
@media(max-width:767px){
 html[data-color-mode="dark"] body.crm-app main{
  background:var(--comfort-base)!important;
 }
 html[data-color-mode="dark"] body.crm-app #serviceTabs.workspace-bar{
  border-radius:13px;box-shadow:none!important;
 }
}


/*
 * Accessible light-on-dark table chips: "Classement des opportunités".
 *
 * The generic dark .mini color declaration has greater specificity than the
 * former .percentage-badge exception. The light chip background therefore
 * inherited pale text and became hard to read. Keep a soft light badge but
 * explicitly pair it with dark ink in all table states.
 */
html[data-color-mode="dark"] body.crm-app .tablewrap table tbody td .percentage-badge,
html[data-color-mode="dark"] body.crm-app .tablewrap table tbody tr:is(:hover,:focus-within) td .percentage-badge{
  color:#123346!important;
  background:#eaf5f8!important;
  border:1px solid #c2dbe3!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.5;
  opacity:1!important;
  text-shadow:none!important;
  box-shadow:inset 0 1px 0 #ffffffaa;
}
/* Rank numerals 4–10 were cyan on a very pale tile after theme swapping.
   Preserve the medal colors for ranks 1–3, but give the other ranks dark ink. */
html[data-color-mode="dark"] body.crm-app .tablewrap .product-rank{
  background:#eaf5f8!important;
  color:#123346!important;
  border:1px solid #bfdbe3;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-color-mode="dark"] body.crm-app .tablewrap .product-rank.rank-1{
  background:#fff0c2!important;
  color:#805700!important;
  border-color:#e2c77a;
}
html[data-color-mode="dark"] body.crm-app .tablewrap .product-rank.rank-2{
  background:#e6edf2!important;
  color:#455b6d!important;
  border-color:#c8d4df;
}
html[data-color-mode="dark"] body.crm-app .tablewrap .product-rank.rank-3{
  background:#f8e6d7!important;
  color:#8c542a!important;
  border-color:#dec8b5;
}


/*
 * Simulation d'un nouveau produit — dark mode visibility corrections.
 * The original simulator uses dark-teal ink on dark-green price cards and
 * low contrast navy values on slider labels and fee descriptions.
 * Use a bright emerald/rose for recommendations, and clearly legible
 * secondary text throughout. Keep light mode and calculation JS untouched.
 */
html[data-color-mode="dark"] body.crm-app .product-simulation{
  --ps-ink:#eaf5fa;
  --ps-muted:#b5d0da;
  --ps-green:#7af0bd;
  --ps-red:#ffb7c3;
  --ps-blue:#78e2f1;
}
html[data-color-mode="dark"] body.crm-app .product-simulation :is(
 .ps-page-heading h2,.ps-step-heading h3,.ps-field,.ps-field-title,
 .ps-control-heading,.ps-control-heading strong,.ps-volume-heading,
 .ps-bottom-grid h4,.ps-price-panel-title h4
){color:#f3fbff!important}
html[data-color-mode="dark"] body.crm-app .product-simulation :is(
 .ps-page-heading p,.ps-step-heading p,.ps-field small,.ps-slider small,
 .ps-volume-row span,.ps-price-explanation,.ps-metric small,
 .ps-metric span:not(.ps-metric-icon),.ps-guide p
){color:#c6dce5!important}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-control-heading span{
  color:#78e2f1!important;
  font-weight:850;
  font-variant-numeric:tabular-nums;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-money-box>span{
  color:#b5d0da!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-money-box input{
  color:#f2faff!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation input[type="range"]{
  background:linear-gradient(to right,#23c4d7 var(--ps-progress,50%),#3b6475 var(--ps-progress,50%))!important;
  accent-color:#29cbdb;
}
html[data-color-mode="dark"] body.crm-app .product-simulation input[type="range"]::-webkit-slider-thumb{
  background:#42d8e8;box-shadow:0 0 0 3px #102c37,0 0 0 4px #58cbd6;
}
html[data-color-mode="dark"] body.crm-app .product-simulation input[type="range"]::-moz-range-thumb{
  background:#42d8e8;box-shadow:0 0 0 3px #102c37,0 0 0 4px #58cbd6;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-service{
  color:#eaf5fa!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-service:is(:hover,.is-active){
  background:#204658!important;
  color:#f3fbff!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-market-fees{
  background:#203e51!important;
  border-color:#456678!important;
  color:#d0e5ea!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-market-fees-heading :is(span,strong){
  color:#f0f9fc!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-market-fees-values,
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-market-fees-values>span{
  color:#d0e5ea!important;
  opacity:1;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-market-fees-values bdi{
  color:#f2fbff!important;
  font-weight:750;
}
/* Recommendation: the numeric value is now bright emerald, not dark green. */
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel:not(.loss){
  background:#143d35!important;
  border-color:#448b78!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel .ps-price-amount{
  color:#7af0bd!important;
  font-weight:900;
  text-shadow:none!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss .ps-price-amount{
  color:#ffb7c3!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-currency{
  color:#bcd6db!important;
  opacity:1;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-description{
  background:#194a3a!important;
  color:#e9f8f7!important;
  border:1px solid #397968!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss .ps-price-description{
  background:#623944!important;
  color:#ffcbcc!important;
  border-color:#945563!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-explanation{
  color:#c6dce5!important;
  border-color:#508173!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown{
  background:#1e3d48!important;
  border-color:#52746d!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown>div span{
  color:#d0e5ea!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-breakdown>div strong{
  color:#f5fcff!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss .ps-price-breakdown{
  background:#392e38!important;
  border-color:#855561!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-price-panel.loss .ps-price-breakdown>div strong{
  color:#ffcbcc!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation :is(
 .ps-metric strong,.ps-detail-line strong,.ps-volume-heading strong
){color:#f0f8fc!important}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-metric-profit strong,
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-detail-total strong:not(.loss){
  color:#8ceac1!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-metric-loss strong,
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-detail-total strong.loss{
  color:#ffb7c3!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-detail-line>span{
  color:#c6dce5!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-guide h4{
  color:#e9faff!important;
}
html[data-color-mode="dark"] body.crm-app .product-simulation .ps-result-warning{
  background:#54313a!important;color:#ffc6cd!important;border-color:#a46370!important;
}
